|
Sound Open Firmware
|
The Static Audio Pipeline subsystem provides compile-time and runtime declarative topology construction for hostless, microcontroller, and standalone embedded platforms running Sound Open Firmware. More...
Data Structures | |
| struct | sof_static_caps |
| Audio stream format and sample rate capability descriptor. More... | |
| struct | sof_static_comp |
| Declarative component descriptor. More... | |
| struct | sof_static_module_ops |
| Static pipeline module driver operations. More... | |
| struct | sof_static_buffer |
| Declarative intermediate audio buffer descriptor. More... | |
| struct | sof_static_route |
| Declarative graph route connecting an upstream component to a downstream component. More... | |
| struct | sof_static_pcm |
| Declarative PCM endpoint descriptor. More... | |
| struct | sof_static_kcontrol |
| Declarative static kcontrol descriptor. More... | |
| struct | sof_static_pipeline_desc |
| Declarative audio pipeline descriptor. More... | |
| struct | sof_static_topology |
| Top-level static audio topology descriptor. More... | |
Macros | |
| #define | SOF_STATIC_RATE_8K SOF_RATE_8000 |
| Supported sample rate bitmasks for static capability negotiation. | |
| #define | SOF_STATIC_RATE_11K SOF_RATE_11025 |
| 11025 Hz | |
| #define | SOF_STATIC_RATE_12K SOF_RATE_12000 |
| 12000 Hz | |
| #define | SOF_STATIC_RATE_16K SOF_RATE_16000 |
| 16000 Hz | |
| #define | SOF_STATIC_RATE_22K SOF_RATE_22050 |
| 22050 Hz | |
| #define | SOF_STATIC_RATE_24K SOF_RATE_24000 |
| 24000 Hz | |
| #define | SOF_STATIC_RATE_32K SOF_RATE_32000 |
| 32000 Hz | |
| #define | SOF_STATIC_RATE_44K1 SOF_RATE_44100 |
| 44100 Hz | |
| #define | SOF_STATIC_RATE_48K SOF_RATE_48000 |
| 48000 Hz | |
| #define | SOF_STATIC_RATE_64K SOF_RATE_64000 |
| 64000 Hz | |
| #define | SOF_STATIC_RATE_88K2 SOF_RATE_88200 |
| 88200 Hz | |
| #define | SOF_STATIC_RATE_96K SOF_RATE_96000 |
| 96000 Hz | |
| #define | SOF_STATIC_RATE_176K4 SOF_RATE_176400 |
| 176400 Hz | |
| #define | SOF_STATIC_RATE_192K SOF_RATE_192000 |
| 192000 Hz | |
| #define | SOF_STATIC_RATE_384K (1 << 14) |
| 384000 Hz | |
| #define | SOF_STATIC_FMT_S16_LE BIT(SOF_IPC_FRAME_S16_LE) |
| Supported PCM frame format bitmasks (matching enum sof_ipc_frame) | |
| #define | SOF_STATIC_FMT_S24_4LE BIT(SOF_IPC_FRAME_S24_4LE) |
| #define | SOF_STATIC_FMT_S32_LE BIT(SOF_IPC_FRAME_S32_LE) |
| #define | SOF_STATIC_FMT_FLOAT BIT(SOF_IPC_FRAME_FLOAT) |
| #define | SOF_STATIC_FMT_S24_3LE BIT(SOF_IPC_FRAME_S24_3LE) |
| #define | SOF_STATIC_FMT_S24_4LE_MSB BIT(SOF_IPC_FRAME_S24_4LE_MSB) |
| #define | SOF_STATIC_FMT_U8 BIT(SOF_IPC_FRAME_U8) |
| #define | SOF_STATIC_FMT_S16_4LE BIT(SOF_IPC_FRAME_S16_4LE) |
| #define | SOF_STATIC_FMT_A_LAW BIT(SOF_IPC_FRAME_A_LAW) |
| #define | SOF_STATIC_FMT_MU_LAW BIT(SOF_IPC_FRAME_MU_LAW) |
| #define | SOF_STATIC_RATE_MASK_ALL |
| Mask covering all supported sample rates. | |
| #define | SOF_STATIC_FMT_MASK_ALL |
| Mask covering all supported frame formats. | |
| #define | SOF_STATIC_CAPS(_fmt, _rate, _ch) |
| Helper macro to initialize a static capability structure. | |
| #define | SOF_STATIC_COMP_MODULE(...) { .type = SOF_STATIC_COMP_MODULE, __VA_ARGS__ } |
| Declare a processing module component. | |
| #define | SOF_STATIC_COMP_HOST(...) { .type = SOF_STATIC_COMP_HOST, .ep_type = SOF_STATIC_EP_USB_TERMINAL, __VA_ARGS__ } |
| Declare a USB/Host streaming endpoint component. | |
| #define | SOF_STATIC_COMP_DAI(...) { .type = SOF_STATIC_COMP_DAI, .ep_type = SOF_STATIC_EP_DAI, __VA_ARGS__ } |
| Declare a hardware DAI endpoint component. | |
| #define | SOF_STATIC_MODULE(_id, _ppl, _name, _dir, _uuid, _fmt, _rate, _ch, _blob, _blob_sz) |
| Generic constructor macro for an audio processing module component. | |
| #define | SOF_STATIC_MODULE_RATE_CONV(_id, _ppl, _name, _dir, _uuid, _fmt, _in_rate, _out_rate, _ch) |
| Generic constructor macro for a sample rate converter component (SRC / ASRC). | |
| #define | SOF_STATIC_ENDPOINT_USB(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _term_id) |
| Simple constructor macro for a USB / UAC2 streaming endpoint. | |
| #define | SOF_STATIC_ENDPOINT_DAI(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _type, _idx, _clk_fmt) |
| Generic constructor macro for a hardware Digital Audio Interface (DAI) endpoint. | |
| #define | SOF_STATIC_ENDPOINT_DAI_CFG(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _type, _idx, _clk_fmt, _cfg_fn) |
| Constructor macro for a hardware DAI endpoint with custom platform configuration callback. | |
| #define | DECLARE_STATIC_MODULE_OPS(name, ops) |
| Macro to automatically register static module operations at system startup. | |
| #define | SOF_STATIC_BUFFER(...) { .flags = SOF_MEM_FLAG_DMA | SOF_MEM_FLAG_USER, .fmt = SOF_IPC_FRAME_INVALID, __VA_ARGS__ } |
| Helper macro to declare an intermediate audio buffer with standard flags. | |
| #define | SOF_STATIC_ROUTE(...) { __VA_ARGS__ } |
| Helper macro to declare a connection route. | |
| #define | SOF_STATIC_PCM(...) { __VA_ARGS__ } |
| Helper macro to declare a static PCM stream. | |
| #define | SOF_STATIC_KCONTROL_VOLUME(...) { .type = SOF_STATIC_CTRL_VOLUME, __VA_ARGS__ } |
| Helper macro to declare a volume kcontrol. | |
| #define | SOF_STATIC_KCONTROL_SWITCH(...) { .type = SOF_STATIC_CTRL_SWITCH, __VA_ARGS__ } |
| Helper macro to declare a boolean switch/bypass kcontrol. | |
| #define | SOF_STATIC_KCONTROL_ENUM(...) { .type = SOF_STATIC_CTRL_ENUM, __VA_ARGS__ } |
| Helper macro to declare an enumeration selector kcontrol. | |
| #define | SOF_STATIC_KCONTROL_BINARY(...) { .type = SOF_STATIC_CTRL_BINARY, __VA_ARGS__ } |
| Helper macro to declare a binary configuration kcontrol. | |
Typedefs | |
| typedef int(* | sof_static_kcontrol_handler_fn) (const struct sof_static_kcontrol *ctl, int32_t val, void *priv) |
| Custom kcontrol callback handler type. | |
Enumerations | |
| enum | sof_static_comp_type { SOF_STATIC_COMP_MODULE = 0 , SOF_STATIC_COMP_HOST , SOF_STATIC_COMP_DAI } |
| Category of a static pipeline component. More... | |
| enum | sof_static_ep_type { SOF_STATIC_EP_NONE = 0 , SOF_STATIC_EP_USB_TERMINAL , SOF_STATIC_EP_DAI } |
| Hardware endpoint binding type. More... | |
| enum | sof_static_ctrl_type { SOF_STATIC_CTRL_VOLUME = 0 , SOF_STATIC_CTRL_SWITCH , SOF_STATIC_CTRL_ENUM , SOF_STATIC_CTRL_BINARY } |
| Type of static kcontrol. More... | |
Functions | |
| int | sof_static_topology_init (const struct sof_static_topology *topo) |
| Initialize and instantiate the static topology graph. | |
| const struct sof_static_topology * | sof_static_topology_get (void) |
| Retrieve the currently active static topology descriptor. | |
| struct pipeline * | sof_static_pipeline_get (uint32_t pipeline_id) |
| Retrieve a pipeline instance by its pipeline ID. | |
| struct comp_dev * | sof_static_comp_get (uint32_t comp_id) |
| Retrieve a component device instance by its component ID. | |
| struct comp_buffer * | sof_static_buffer_get (uint32_t buffer_id) |
| Retrieve an intermediate buffer instance by its buffer ID. | |
| int | sof_static_register_module_ops (struct sof_static_module_ops *ops) |
| Register static module operations for an audio component. | |
| const struct sof_static_module_ops * | sof_static_find_module_ops (const struct sof_uuid *uuid) |
| Find registered static module operations by component UUID. | |
| void | sof_static_init_base_cfg (struct ipc4_base_module_cfg *base_cfg, const struct sof_static_comp *cdesc, uint32_t period_us) |
| Synthesize standard IPC4 base module configuration structure. | |
| struct comp_dev * | sof_static_module_create_default (const struct comp_driver *drv, struct comp_ipc_config *cfg, const struct sof_static_comp *cdesc, uint32_t period_us) |
| Default fallback creation for standard IPC4 module adapters. | |
| int | sof_static_kcontrol_set (uint32_t ctrl_id, int32_t val) |
| Set kcontrol value by control ID. | |
| int | sof_static_kcontrol_set_chan (uint32_t ctrl_id, uint32_t channel, int32_t val) |
| Set kcontrol value for a specific audio channel. | |
| int | sof_static_kcontrol_set_binary (uint32_t ctrl_id, const void *data, size_t size) |
| Set binary raw configuration blob on a static kcontrol by control ID. | |
| int | sof_static_kcontrol_get (uint32_t ctrl_id, int32_t *val) |
| Retrieve cached kcontrol value by control ID. | |
| int | sof_static_kcontrol_find_by_name (const char *name) |
| Find kcontrol ID by human-readable name. | |
| int | sof_static_kcontrol_set_by_uac2 (uint8_t entity_id, uint8_t channel, int32_t val, bool is_volume) |
| Dispatch UAC2 feature unit control to registered kcontrols. | |
| int | sof_static_kcontrol_get_by_uac2 (uint8_t entity_id, uint8_t channel, int32_t *val, bool is_volume) |
| Retrieve kcontrol value formatted for UAC2 feature unit response. | |
| int | sof_static_pipeline_trigger_by_uac2_term (uint8_t terminal_id, bool start) |
| Trigger pipeline start or stop associated with a UAC2 terminal ID. | |
| int | sof_static_pipeline_start (uint32_t pipeline_id) |
| Start a static pipeline by pipeline ID. | |
| int | sof_static_pipeline_stop (uint32_t pipeline_id) |
| Stop a static pipeline by pipeline ID. | |
| int | sof_static_pipeline_trigger (uint32_t pipeline_id, bool start) |
| Directly trigger a static pipeline start or stop by pipeline ID. | |
| int | sof_static_pipeline_set_sample_rate (uint32_t pipeline_id, uint32_t rate) |
| Re-negotiate the stream sample rate for a specific static pipeline. | |
| uint32_t | sof_static_pipeline_get_sample_rate (uint32_t pipeline_id) |
| Retrieve the current stream sample rate for a specific static pipeline. | |
| int | sof_static_set_sample_rate (uint32_t rate) |
| Set global sample rate across active static pipelines. | |
| uint32_t | sof_static_get_sample_rate (void) |
| Retrieve current primary sample rate. | |
The Static Audio Pipeline subsystem provides compile-time and runtime declarative topology construction for hostless, microcontroller, and standalone embedded platforms running Sound Open Firmware.
It allows platforms to construct complete SOF processing graphs (pipelines, modules, DAIs, intermediate buffers, routes, and kcontrols) directly at boot without requiring dynamic IPC topology commands from a host operating system.
| #define DECLARE_STATIC_MODULE_OPS | ( | name, | |
| ops | |||
| ) |
Macro to automatically register static module operations at system startup.
In Zephyr RTOS environments, registers using SYS_INIT at APPLICATION level. In non-Zephyr environments (e.g. POSIX tests), registers using constructor attribute.
| name | Unique identifier suffix for initialization routine. |
| ops | Pointer to struct sof_static_module_ops. |
| #define SOF_STATIC_BUFFER | ( | ... | ) | { .flags = SOF_MEM_FLAG_DMA | SOF_MEM_FLAG_USER, .fmt = SOF_IPC_FRAME_INVALID, __VA_ARGS__ } |
Helper macro to declare an intermediate audio buffer with standard flags.
Initializes memory allocation flags to standard DMA and user memory, and defaults the format to SOF_IPC_FRAME_INVALID to inherit the PCM format from the upstream producer.
| #define SOF_STATIC_CAPS | ( | _fmt, | |
| _rate, | |||
| _ch | |||
| ) |
Helper macro to initialize a static capability structure.
| _fmt | Frame format (e.g. SOF_IPC_FRAME_S16_LE or SOF_IPC_FRAME_FLOAT). |
| _rate | Default sample rate in Hz (e.g. 48000). |
| _ch | Number of audio channels (e.g. 2). |
| #define SOF_STATIC_COMP_DAI | ( | ... | ) | { .type = SOF_STATIC_COMP_DAI, .ep_type = SOF_STATIC_EP_DAI, __VA_ARGS__ } |
Declare a hardware DAI endpoint component.
| #define SOF_STATIC_COMP_HOST | ( | ... | ) | { .type = SOF_STATIC_COMP_HOST, .ep_type = SOF_STATIC_EP_USB_TERMINAL, __VA_ARGS__ } |
Declare a USB/Host streaming endpoint component.
| #define SOF_STATIC_COMP_MODULE | ( | ... | ) | { .type = SOF_STATIC_COMP_MODULE, __VA_ARGS__ } |
Declare a processing module component.
| #define SOF_STATIC_ENDPOINT_DAI | ( | _id, | |
| _ppl, | |||
| _name, | |||
| _dir, | |||
| _fmt, | |||
| _rate, | |||
| _ch, | |||
| _type, | |||
| _idx, | |||
| _clk_fmt | |||
| ) |
Generic constructor macro for a hardware Digital Audio Interface (DAI) endpoint.
| _id | Unique component ID. |
| _ppl | Owning pipeline ID. |
| _name | Human-readable component name. |
| _dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| _fmt | Default PCM frame format (enum sof_ipc_frame). |
| _rate | Stream sample rate in Hz. |
| _ch | Channel count. |
| _type | Hardware DAI type (e.g. SOF_DAI_INTEL_SSP, SOF_DAI_ESP32_I2S, etc.). |
| _idx | Hardware DAI controller instance index. |
| _clk_fmt | DAI clock format flags (e.g. SOF_DAI_FMT_I2S | SOF_DAI_FMT_CBC_CFC). |
| #define SOF_STATIC_ENDPOINT_DAI_CFG | ( | _id, | |
| _ppl, | |||
| _name, | |||
| _dir, | |||
| _fmt, | |||
| _rate, | |||
| _ch, | |||
| _type, | |||
| _idx, | |||
| _clk_fmt, | |||
| _cfg_fn | |||
| ) |
Constructor macro for a hardware DAI endpoint with custom platform configuration callback.
| _id | Unique component ID. |
| _ppl | Owning pipeline ID. |
| _name | Human-readable component name. |
| _dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| _fmt | Default PCM frame format (enum sof_ipc_frame). |
| _rate | Stream sample rate in Hz. |
| _ch | Channel count. |
| _type | Hardware DAI type (e.g. SOF_DAI_INTEL_SSP, SOF_DAI_ESP32_I2S, etc.). |
| _idx | Hardware DAI controller instance index. |
| _clk_fmt | DAI clock format flags (e.g. SOF_DAI_FMT_I2S | SOF_DAI_FMT_CBC_CFC). |
| _cfg_fn | Endpoint configuration callback function pointer. |
| #define SOF_STATIC_ENDPOINT_USB | ( | _id, | |
| _ppl, | |||
| _name, | |||
| _dir, | |||
| _fmt, | |||
| _rate, | |||
| _ch, | |||
| _term_id | |||
| ) |
Simple constructor macro for a USB / UAC2 streaming endpoint.
| _id | Unique component ID. |
| _ppl | Owning pipeline ID. |
| _name | Human-readable component name. |
| _dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| _fmt | Default PCM frame format (enum sof_ipc_frame). |
| _rate | Stream sample rate in Hz. |
| _ch | Channel count. |
| _term_id | USB Audio Class Terminal ID. |
| #define SOF_STATIC_FMT_A_LAW BIT(SOF_IPC_FRAME_A_LAW) |
| #define SOF_STATIC_FMT_FLOAT BIT(SOF_IPC_FRAME_FLOAT) |
| #define SOF_STATIC_FMT_MASK_ALL |
Mask covering all supported frame formats.
| #define SOF_STATIC_FMT_MU_LAW BIT(SOF_IPC_FRAME_MU_LAW) |
| #define SOF_STATIC_FMT_S16_4LE BIT(SOF_IPC_FRAME_S16_4LE) |
| #define SOF_STATIC_FMT_S16_LE BIT(SOF_IPC_FRAME_S16_LE) |
Supported PCM frame format bitmasks (matching enum sof_ipc_frame)
| #define SOF_STATIC_FMT_S24_3LE BIT(SOF_IPC_FRAME_S24_3LE) |
| #define SOF_STATIC_FMT_S24_4LE BIT(SOF_IPC_FRAME_S24_4LE) |
| #define SOF_STATIC_FMT_S24_4LE_MSB BIT(SOF_IPC_FRAME_S24_4LE_MSB) |
| #define SOF_STATIC_FMT_S32_LE BIT(SOF_IPC_FRAME_S32_LE) |
| #define SOF_STATIC_FMT_U8 BIT(SOF_IPC_FRAME_U8) |
| #define SOF_STATIC_KCONTROL_BINARY | ( | ... | ) | { .type = SOF_STATIC_CTRL_BINARY, __VA_ARGS__ } |
Helper macro to declare a binary configuration kcontrol.
| #define SOF_STATIC_KCONTROL_ENUM | ( | ... | ) | { .type = SOF_STATIC_CTRL_ENUM, __VA_ARGS__ } |
Helper macro to declare an enumeration selector kcontrol.
| #define SOF_STATIC_KCONTROL_SWITCH | ( | ... | ) | { .type = SOF_STATIC_CTRL_SWITCH, __VA_ARGS__ } |
Helper macro to declare a boolean switch/bypass kcontrol.
| #define SOF_STATIC_KCONTROL_VOLUME | ( | ... | ) | { .type = SOF_STATIC_CTRL_VOLUME, __VA_ARGS__ } |
Helper macro to declare a volume kcontrol.
| #define SOF_STATIC_MODULE | ( | _id, | |
| _ppl, | |||
| _name, | |||
| _dir, | |||
| _uuid, | |||
| _fmt, | |||
| _rate, | |||
| _ch, | |||
| _blob, | |||
| _blob_sz | |||
| ) |
Generic constructor macro for an audio processing module component.
| _id | Unique component ID. |
| _ppl | Owning pipeline ID. |
| _name | Human-readable component name string. |
| _dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| _uuid | Pointer to component driver UUID (e.g. &volume_uuid). |
| _fmt | Default PCM frame format (enum sof_ipc_frame). |
| _rate | Default stream sample rate in Hz. |
| _ch | Default channel count. |
| _blob | Optional pointer to initial configuration blob (or NULL). |
| _blob_sz | Size of initial configuration blob in bytes (or 0). |
| #define SOF_STATIC_MODULE_RATE_CONV | ( | _id, | |
| _ppl, | |||
| _name, | |||
| _dir, | |||
| _uuid, | |||
| _fmt, | |||
| _in_rate, | |||
| _out_rate, | |||
| _ch | |||
| ) |
Generic constructor macro for a sample rate converter component (SRC / ASRC).
| _id | Unique component ID. |
| _ppl | Owning pipeline ID. |
| _name | Human-readable component name string. |
| _dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| _uuid | Pointer to component driver UUID (e.g. &src_uuid, &asrc_uuid). |
| _fmt | Default PCM frame format (enum sof_ipc_frame). |
| _in_rate | Source/input sample rate in Hz. |
| _out_rate | Sink/output sample rate in Hz. |
| _ch | Channel count. |
| #define SOF_STATIC_PCM | ( | ... | ) | { __VA_ARGS__ } |
Helper macro to declare a static PCM stream.
| #define SOF_STATIC_RATE_11K SOF_RATE_11025 |
11025 Hz
| #define SOF_STATIC_RATE_12K SOF_RATE_12000 |
12000 Hz
| #define SOF_STATIC_RATE_16K SOF_RATE_16000 |
16000 Hz
| #define SOF_STATIC_RATE_176K4 SOF_RATE_176400 |
176400 Hz
| #define SOF_STATIC_RATE_192K SOF_RATE_192000 |
192000 Hz
| #define SOF_STATIC_RATE_22K SOF_RATE_22050 |
22050 Hz
| #define SOF_STATIC_RATE_24K SOF_RATE_24000 |
24000 Hz
| #define SOF_STATIC_RATE_32K SOF_RATE_32000 |
32000 Hz
| #define SOF_STATIC_RATE_384K (1 << 14) |
384000 Hz
| #define SOF_STATIC_RATE_44K1 SOF_RATE_44100 |
44100 Hz
| #define SOF_STATIC_RATE_48K SOF_RATE_48000 |
48000 Hz
| #define SOF_STATIC_RATE_64K SOF_RATE_64000 |
64000 Hz
| #define SOF_STATIC_RATE_88K2 SOF_RATE_88200 |
88200 Hz
| #define SOF_STATIC_RATE_8K SOF_RATE_8000 |
Supported sample rate bitmasks for static capability negotiation.
8000 Hz
| #define SOF_STATIC_RATE_96K SOF_RATE_96000 |
96000 Hz
| #define SOF_STATIC_RATE_MASK_ALL |
Mask covering all supported sample rates.
| #define SOF_STATIC_ROUTE | ( | ... | ) | { __VA_ARGS__ } |
Helper macro to declare a connection route.
| typedef int(* sof_static_kcontrol_handler_fn) (const struct sof_static_kcontrol *ctl, int32_t val, void *priv) |
Custom kcontrol callback handler type.
Allows platforms or applications to register custom kcontrol dispatch logic for non-module controls (e.g. clock modes, routes, injector switches).
| [in] | ctl | Pointer to the static kcontrol descriptor. |
| [in] | val | Value to write. |
| [in,out] | priv | Private user/platform context. |
| enum sof_static_comp_type |
| enum sof_static_ctrl_type |
| enum sof_static_ep_type |
| struct comp_buffer * sof_static_buffer_get | ( | uint32_t | buffer_id | ) |
Retrieve an intermediate buffer instance by its buffer ID.
| [in] | buffer_id | Unique buffer ID. |
| struct comp_dev * sof_static_comp_get | ( | uint32_t | comp_id | ) |
Retrieve a component device instance by its component ID.
| [in] | comp_id | Unique component ID. |
| const struct sof_static_module_ops * sof_static_find_module_ops | ( | const struct sof_uuid * | uuid | ) |
Find registered static module operations by component UUID.
| [in] | uuid | UUID of target component. |
| uint32_t sof_static_get_sample_rate | ( | void | ) |
Retrieve current primary sample rate.
| void sof_static_init_base_cfg | ( | struct ipc4_base_module_cfg * | base_cfg, |
| const struct sof_static_comp * | cdesc, | ||
| uint32_t | period_us | ||
| ) |
Synthesize standard IPC4 base module configuration structure.
| [out] | base_cfg | Target base configuration to populate. |
| [in] | cdesc | Static component descriptor with format and rate capabilities. |
| [in] | period_us | Pipeline scheduling period in microseconds. |
| int sof_static_kcontrol_find_by_name | ( | const char * | name | ) |
Find kcontrol ID by human-readable name.
| [in] | name | Control name string to search for. |
| int sof_static_kcontrol_get | ( | uint32_t | ctrl_id, |
| int32_t * | val | ||
| ) |
Retrieve cached kcontrol value by control ID.
| [in] | ctrl_id | Unique control ID. |
| [out] | val | Pointer to store retrieved control value. |
| int sof_static_kcontrol_get_by_uac2 | ( | uint8_t | entity_id, |
| uint8_t | channel, | ||
| int32_t * | val, | ||
| bool | is_volume | ||
| ) |
Retrieve kcontrol value formatted for UAC2 feature unit response.
| [in] | entity_id | UAC2 Feature Unit Entity ID. |
| [in] | channel | Audio channel index. |
| [out] | val | Pointer to store retrieved value. |
| [in] | is_volume | True for volume query, false for mute query. |
| int sof_static_kcontrol_set | ( | uint32_t | ctrl_id, |
| int32_t | val | ||
| ) |
Set kcontrol value by control ID.
Dispatches to the target module via its registered static operations (struct sof_static_module_ops), or invokes the topology's custom_control_handler.
| [in] | ctrl_id | Unique control ID. |
| [in] | val | Value to apply. |
| int sof_static_kcontrol_set_binary | ( | uint32_t | ctrl_id, |
| const void * | data, | ||
| size_t | size | ||
| ) |
Set binary raw configuration blob on a static kcontrol by control ID.
Dispatches the raw binary configuration blob to the target component associated with the designated kcontrol via apply_binary or module adapter large config.
| [in] | ctrl_id | Target kcontrol identifier. |
| [in] | data | Pointer to raw configuration blob. |
| [in] | size | Size of data blob in bytes. |
| int sof_static_kcontrol_set_by_uac2 | ( | uint8_t | entity_id, |
| uint8_t | channel, | ||
| int32_t | val, | ||
| bool | is_volume | ||
| ) |
Dispatch UAC2 feature unit control to registered kcontrols.
| [in] | entity_id | UAC2 Feature Unit Entity ID. |
| [in] | channel | Audio channel index (0 = master/all). |
| [in] | val | Value from USB request (e.g. 8.8 fixed-point dB volume or boolean mute). |
| [in] | is_volume | True for volume command, false for mute command. |
| int sof_static_kcontrol_set_chan | ( | uint32_t | ctrl_id, |
| uint32_t | channel, | ||
| int32_t | val | ||
| ) |
Set kcontrol value for a specific audio channel.
Dispatches control value to a specific audio channel of the target component via apply_volume_chan, apply_switch_chan, or apply_enum.
| [in] | ctrl_id | Unique control ID. |
| [in] | channel | Channel index (0-based). |
| [in] | val | Value to apply. |
| struct comp_dev * sof_static_module_create_default | ( | const struct comp_driver * | drv, |
| struct comp_ipc_config * | cfg, | ||
| const struct sof_static_comp * | cdesc, | ||
| uint32_t | period_us | ||
| ) |
Default fallback creation for standard IPC4 module adapters.
| [in] | drv | SOF component driver. |
| [in] | cfg | IPC component configuration. |
| [in] | cdesc | Static component descriptor. |
| [in] | period_us | Owning pipeline scheduling period in microseconds. |
| struct pipeline * sof_static_pipeline_get | ( | uint32_t | pipeline_id | ) |
Retrieve a pipeline instance by its pipeline ID.
| [in] | pipeline_id | Unique pipeline ID. |
| uint32_t sof_static_pipeline_get_sample_rate | ( | uint32_t | pipeline_id | ) |
Retrieve the current stream sample rate for a specific static pipeline.
| [in] | pipeline_id | Target pipeline identifier. |
| int sof_static_pipeline_set_sample_rate | ( | uint32_t | pipeline_id, |
| uint32_t | rate | ||
| ) |
Re-negotiate the stream sample rate for a specific static pipeline.
Re-negotiates the sample rate for the designated pipeline and its constituent components and buffers while the pipeline is in paused or stopped state. Validates that all constituent components support the requested rate according to their capability masks, reconfigures buffer period sizes, and propagates pipeline_params() and pipeline_prepare() through the pipeline graph.
| [in] | pipeline_id | Target pipeline identifier. |
| [in] | rate | Target sample rate in Hz (e.g. 16000, 44100, 48000, 96000). |
| int sof_static_pipeline_start | ( | uint32_t | pipeline_id | ) |
Start a static pipeline by pipeline ID.
Prepares the pipeline and constituent components if needed, propagates start triggers, transitions state to COMP_STATE_ACTIVE, and activates scheduling copy tasks.
| [in] | pipeline_id | Target pipeline ID. |
| int sof_static_pipeline_stop | ( | uint32_t | pipeline_id | ) |
Stop a static pipeline by pipeline ID.
Propagates stop triggers, cancels scheduling copy tasks, and transitions pipeline state to COMP_STATE_PAUSED.
| [in] | pipeline_id | Target pipeline ID. |
| int sof_static_pipeline_trigger | ( | uint32_t | pipeline_id, |
| bool | start | ||
| ) |
Directly trigger a static pipeline start or stop by pipeline ID.
Synchronously transitions the pipeline state machine, propagates triggers to all constituent components, and manages scheduling task execution. Dispatches directly to sof_static_pipeline_start() or sof_static_pipeline_stop().
| [in] | pipeline_id | Target pipeline ID. |
| [in] | start | True to start pipeline, false to stop. |
| int sof_static_pipeline_trigger_by_uac2_term | ( | uint8_t | terminal_id, |
| bool | start | ||
| ) |
Trigger pipeline start or stop associated with a UAC2 terminal ID.
| [in] | terminal_id | Bound UAC2 Terminal Entity ID. |
| [in] | start | True to start pipeline, false to pause/stop. |
| int sof_static_register_module_ops | ( | struct sof_static_module_ops * | ops | ) |
Register static module operations for an audio component.
Audio processing modules register static operations at boot or module load time to handle static component instantiation and kcontrol dispatch without hardcoded component logic in the generic pipeline engine.
| [in,out] | ops | Pointer to module operations structure. |
| int sof_static_set_sample_rate | ( | uint32_t | rate | ) |
Set global sample rate across active static pipelines.
In pipelines with sample rate converters (SRC / ASRC), individual pipeline sections maintain their distinct sample rates according to their component capabilities and buffer configurations.
| [in] | rate | Target primary sample rate in Hz (e.g. 48000). |
| const struct sof_static_topology * sof_static_topology_get | ( | void | ) |
Retrieve the currently active static topology descriptor.
| int sof_static_topology_init | ( | const struct sof_static_topology * | topo | ) |
Initialize and instantiate the static topology graph.
Allocates pipelines, instantiates components from the driver registry, initializes intermediate buffers, establishes graph connections, negotiates component stream parameters, and prepares all pipelines for streaming.
| [in] | topo | Pointer to the target static topology definition. |