|
Sound Open Firmware
|
Audio buffer operations, descriptors, and unified audio buffer interfaces. More...


Go to the source code of this file.
Data Structures | |
| struct | audio_buffer_ops |
| Audio buffer virtual operations table. More... | |
| struct | sof_audio_buffer |
| Base class for all audio buffers. More... | |
Macros | |
Buffer type identifiers | |
| #define | BUFFER_TYPE_LEGACY_BUFFER 1 |
| Legacy comp_buffer type (pipeline 1.0) | |
| #define | BUFFER_TYPE_RING_BUFFER 2 |
| Lockless async circular ring buffer type (cross-core) | |
Functions | |
| static struct sof_sink * | audio_buffer_get_sink (struct sof_audio_buffer *buffer) |
| Return pointer to sink interface of audio buffer. | |
| static struct sof_source * | audio_buffer_get_source (struct sof_audio_buffer *buffer) |
| Return pointer to source interface of audio buffer. | |
| static bool | audio_buffer_is_shared (struct sof_audio_buffer *buffer) |
| Check if audio buffer is shared across cores. | |
| static bool | audio_buffer_hw_params_configured (struct sof_audio_buffer *buffer) |
| Check if buffer hardware parameters are configured. | |
| static void | audio_buffer_set_hw_params_configured (struct sof_audio_buffer *buffer) |
| Mark buffer hardware parameters as configured (state set to READY). | |
| static void | audio_buffer_reset_params (struct sof_audio_buffer *buffer) |
| Reset buffer parameters state to initial. | |
| static enum sof_audio_buffer_state | audio_buffer_get_state (const struct sof_audio_buffer *buffer) |
| Retrieve current buffer state. | |
| static void | audio_buffer_set_state (struct sof_audio_buffer *buffer, enum sof_audio_buffer_state state) |
| Set buffer state. | |
| static void | audio_buffer_set_eos (struct sof_audio_buffer *buffer) |
| Mark buffer state as end-of-stream (EOS). | |
| static uint16_t | audio_buffer_get_chmap (struct sof_audio_buffer *buffer, size_t index) |
| Retrieve channel map value for a given channel index. | |
| static void | audio_buffer_set_chmap (struct sof_audio_buffer *buffer, size_t index, uint16_t value) |
| Set channel map value for a given channel index. | |
| static struct sof_audio_stream_params * | audio_buffer_get_stream_params (struct sof_audio_buffer *buffer) |
| Retrieve pointer to runtime stream parameters. | |
| static struct sof_audio_buffer * | sof_audio_buffer_from_sink (struct sof_sink *sink) |
| Retrieve enclosing sof_audio_buffer from sink interface pointer. | |
| static struct sof_audio_buffer * | sof_audio_buffer_from_source (struct sof_source *source) |
| Retrieve enclosing sof_audio_buffer from source interface pointer. | |
| void | audio_buffer_init (struct sof_audio_buffer *buffer, uint32_t buffer_type, bool is_shared, const struct source_ops *source_ops, const struct sink_ops *sink_ops, const struct audio_buffer_ops *audio_buffer_ops, struct sof_audio_stream_params *audio_stream_params) |
| Initialize audio buffer structure and virtual operation tables. | |
| void | audio_buffer_free (struct sof_audio_buffer *buffer) |
| Free audio buffer and all allocated resources. | |
| static void | audio_buffer_reset (struct sof_audio_buffer *buffer) |
| Reset all buffer data and positions leaving configuration intact. | |
| int | audio_buffer_source_set_ipc_params (struct sof_source *source, struct sof_ipc_stream_params *params, bool force_update) |
| Set IPC stream parameters via source interface wrapper. | |
| int | audio_buffer_source_on_audio_format_set (struct sof_source *source) |
| Audio format set callback via source interface wrapper. | |
| int | audio_buffer_source_set_alignment_constants (struct sof_source *source, const uint32_t byte_align, const uint32_t frame_align_req) |
| Set alignment constraints via source interface wrapper. | |
| int | audio_buffer_sink_set_ipc_params (struct sof_sink *sink, struct sof_ipc_stream_params *params, bool force_update) |
| Set IPC stream parameters via sink interface wrapper. | |
| int | audio_buffer_sink_on_audio_format_set (struct sof_sink *sink) |
| Audio format set callback via sink interface wrapper. | |
| int | audio_buffer_sink_set_alignment_constants (struct sof_sink *sink, const uint32_t byte_align, const uint32_t frame_align_req) |
| Set alignment constraints via sink interface wrapper. | |
| uint32_t | audio_buffer_sink_get_lft (struct sof_sink *sink) |
| Get linear free time (LFT) duration in microseconds from sink interface wrapper. | |
Audio buffer operations, descriptors, and unified audio buffer interfaces.