Sound Open Firmware
Loading...
Searching...
No Matches
ring_buffer.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2023 Intel Corporation. All rights reserved.
4 *
5 */
6
13#ifndef __SOF_RING_BUFFER_H__
14#define __SOF_RING_BUFFER_H__
15
16#include <sof/audio/sink_api.h>
20#include <rtos/bit.h>
21#include <sof/common.h>
22#include <ipc/topology.h>
23#include <sof/coherent.h>
24
110struct comp_dev;
111struct ring_buffer;
113
118 /* public: read only */
123 uint8_t __sparse_cache *_data_buffer;
126};
127
137struct ring_buffer *ring_buffer_create(struct comp_dev *dev, size_t min_available,
138 size_t min_free_space, bool is_shared,
139 uint32_t id);
140
143#endif /* __SOF_RING_BUFFER_H__ */
Audio buffer operations, descriptors, and unified audio buffer interfaces.
Cache-coherent multi-core shared memory access abstractions.
struct ring_buffer * ring_buffer_create(struct comp_dev *dev, size_t min_available, size_t min_free_space, bool is_shared, uint32_t id)
Create and allocate a lockless async circular ring buffer.
Audio Stream API definition.
Audio sink API helpers and stream configuration.
Audio source API helpers and stream configuration.
Audio component base device "class" used by all other component types.
Definition component.h:587
Lockless asynchronous circular ring buffer structure.
Definition ring_buffer.h:117
size_t _write_offset
Producer write offset in bytes.
Definition ring_buffer.h:124
size_t _read_offset
Consumer read offset in bytes.
Definition ring_buffer.h:125
uint8_t * _data_buffer
Pointer to circular data buffer memory.
Definition ring_buffer.h:123
struct sof_audio_buffer audio_buffer
Embedded audio buffer base structure.
Definition ring_buffer.h:119
size_t data_buffer_size
Total allocated data buffer capacity in bytes.
Definition ring_buffer.h:121
Base class for all audio buffers.
Definition audio_buffer.h:92
set of parameters describing audio stream this structure is shared between audio_stream....
Definition audio_stream.h:49