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

set of parameters describing audio stream this structure is shared between audio_stream.h and sink/source interface TODO: compressed formats More...

#include <src/include/module/audio/audio_stream.h>

Data Fields

uint32_t id
 
uint32_t pipeline_id
 
enum sof_ipc_frame frame_fmt
 Sample data format.
 
enum sof_ipc_frame valid_sample_fmt
 
uint32_t rate
 Number of data frames per second [Hz].
 
uint16_t channels
 Number of samples in each frame.
 
uint16_t align_frame_cnt
 align_frame_cnt indicates minimum number of frames that satisfies both byte align and frame align requirements.
 
uint16_t align_shift_idx
 the free/available bytes of sink/source right shift align_shift_idx, the result multiplied by align_frame_cnt is the frame count free/available that can meet the align requirement.
 
bool overrun_permitted
 indicates whether overrun is permitted
 
bool underrun_permitted
 indicates whether underrun is permitted
 
uint32_t buffer_fmt
 enum sof_ipc_buffer_format
 
uint16_t chmap [SOF_IPC_MAX_CHANNELS]
 channel map - SOF_CHMAP_
 
enum sof_audio_buffer_state state
 audio stream state
 

Detailed Description

set of parameters describing audio stream this structure is shared between audio_stream.h and sink/source interface TODO: compressed formats

Field Documentation

◆ align_frame_cnt

uint16_t sof_audio_stream_params::align_frame_cnt

align_frame_cnt indicates minimum number of frames that satisfies both byte align and frame align requirements.

E.g: Consider an algorithm that processes in blocks of 3 frames configured to process 16-bit stereo using xtensa HiFi3 SIMD. Therefore with 16-bit stereo we have a frame size of 4 bytes, and SIMD intrinsic requirement of 8 bytes(2 frames) for HiFi3 and an algorithim requirement of 3 frames. Hence the common processing block size has to align with frame(1), intrinsic(2) and algorithm (3) giving us an optimum processing block size of 6 frames.

◆ align_shift_idx

uint16_t sof_audio_stream_params::align_shift_idx

the free/available bytes of sink/source right shift align_shift_idx, the result multiplied by align_frame_cnt is the frame count free/available that can meet the align requirement.

◆ buffer_fmt

uint32_t sof_audio_stream_params::buffer_fmt

enum sof_ipc_buffer_format

◆ channels

uint16_t sof_audio_stream_params::channels

Number of samples in each frame.

◆ chmap

uint16_t sof_audio_stream_params::chmap[SOF_IPC_MAX_CHANNELS]

channel map - SOF_CHMAP_

◆ frame_fmt

enum sof_ipc_frame sof_audio_stream_params::frame_fmt

Sample data format.

◆ id

uint32_t sof_audio_stream_params::id

◆ overrun_permitted

bool sof_audio_stream_params::overrun_permitted

indicates whether overrun is permitted

◆ pipeline_id

uint32_t sof_audio_stream_params::pipeline_id

◆ rate

uint32_t sof_audio_stream_params::rate

Number of data frames per second [Hz].

◆ state

enum sof_audio_buffer_state sof_audio_stream_params::state

audio stream state

◆ underrun_permitted

bool sof_audio_stream_params::underrun_permitted

indicates whether underrun is permitted

◆ valid_sample_fmt

enum sof_ipc_frame sof_audio_stream_params::valid_sample_fmt

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