Sound Open Firmware
Loading...
Searching...
No Matches
audio_stream Struct Reference

Audio stream is a circular buffer aware of audio format of the data in the buffer so provides API for reading and writing not only bytes, but also samples and frames. More...

#include <audio_stream.h>

Data Fields

uint32_t size
 Runtime buffer size in bytes (period multiple).
uint32_t avail
 Available bytes for reading.
uint32_t free
 Free bytes for writing.
void * w_ptr
 Buffer write pointer.
void * r_ptr
 Buffer read position.
void * addr
 Buffer base address.
void * end_addr
 Buffer end address.
uint8_t byte_align_req
uint8_t frame_align_req
struct sof_audio_stream_params runtime_stream_params

Detailed Description

Audio stream is a circular buffer aware of audio format of the data in the buffer so provides API for reading and writing not only bytes, but also samples and frames.

Audio stream does not perform any memory allocations. A client (a component buffer or dma) must allocate the memory for the underlying data buffer and provide it to the initialization routine.

Once the client is done with reading/writing the data, it must commit the consumption/production and update the buffer state by calling audio_stream_consume()/audio_stream_produce() (just a single call following series of reads/writes).

Field Documentation

◆ addr

void* audio_stream::addr

Buffer base address.

◆ avail

uint32_t audio_stream::avail

Available bytes for reading.

◆ byte_align_req

uint8_t audio_stream::byte_align_req

◆ end_addr

void* audio_stream::end_addr

Buffer end address.

◆ frame_align_req

uint8_t audio_stream::frame_align_req

◆ free

uint32_t audio_stream::free

Free bytes for writing.

◆ r_ptr

void* audio_stream::r_ptr

Buffer read position.

◆ runtime_stream_params

struct sof_audio_stream_params audio_stream::runtime_stream_params

◆ size

uint32_t audio_stream::size

Runtime buffer size in bytes (period multiple).

◆ w_ptr

void* audio_stream::w_ptr

Buffer write pointer.


The documentation for this struct was generated from the following file: