Sound Open Firmware
Loading...
Searching...
No Matches
static_pipeline.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright (c) 2026 Sound Open Firmware (SOF) Project
4 */
5
23#ifndef __SOF_AUDIO_PIPELINE_STATIC_PIPELINE_H__
24#define __SOF_AUDIO_PIPELINE_STATIC_PIPELINE_H__
25
26#include <sof/audio/pipeline.h>
27#include <sof/audio/component.h>
28#include <sof/audio/buffer.h>
29#include <sof/audio/format.h>
30#include <ipc/topology.h>
31#include <ipc/control.h>
32#include <ipc/stream.h>
33#include <ipc/dai.h>
34#include <stdbool.h>
35#include <stdint.h>
36#include <stddef.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/* =========================================================================
43 * Audio Format & Pipeline Capabilities
44 * ========================================================================= */
45
47#define SOF_STATIC_RATE_8K SOF_RATE_8000
48#define SOF_STATIC_RATE_11K SOF_RATE_11025
49#define SOF_STATIC_RATE_12K SOF_RATE_12000
50#define SOF_STATIC_RATE_16K SOF_RATE_16000
51#define SOF_STATIC_RATE_22K SOF_RATE_22050
52#define SOF_STATIC_RATE_24K SOF_RATE_24000
53#define SOF_STATIC_RATE_32K SOF_RATE_32000
54#define SOF_STATIC_RATE_44K1 SOF_RATE_44100
55#define SOF_STATIC_RATE_48K SOF_RATE_48000
56#define SOF_STATIC_RATE_64K SOF_RATE_64000
57#define SOF_STATIC_RATE_88K2 SOF_RATE_88200
58#define SOF_STATIC_RATE_96K SOF_RATE_96000
59#define SOF_STATIC_RATE_176K4 SOF_RATE_176400
60#define SOF_STATIC_RATE_192K SOF_RATE_192000
61#define SOF_STATIC_RATE_384K (1 << 14)
64#define SOF_STATIC_FMT_S16_LE BIT(SOF_IPC_FRAME_S16_LE)
65#define SOF_STATIC_FMT_S24_4LE BIT(SOF_IPC_FRAME_S24_4LE)
66#define SOF_STATIC_FMT_S32_LE BIT(SOF_IPC_FRAME_S32_LE)
67#define SOF_STATIC_FMT_FLOAT BIT(SOF_IPC_FRAME_FLOAT)
68#define SOF_STATIC_FMT_S24_3LE BIT(SOF_IPC_FRAME_S24_3LE)
69#define SOF_STATIC_FMT_S24_4LE_MSB BIT(SOF_IPC_FRAME_S24_4LE_MSB)
70#define SOF_STATIC_FMT_U8 BIT(SOF_IPC_FRAME_U8)
71#define SOF_STATIC_FMT_S16_4LE BIT(SOF_IPC_FRAME_S16_4LE)
72#define SOF_STATIC_FMT_A_LAW BIT(SOF_IPC_FRAME_A_LAW)
73#define SOF_STATIC_FMT_MU_LAW BIT(SOF_IPC_FRAME_MU_LAW)
74
76#define SOF_STATIC_RATE_MASK_ALL \
77 (SOF_STATIC_RATE_8K | SOF_STATIC_RATE_11K | SOF_STATIC_RATE_12K | \
78 SOF_STATIC_RATE_16K | SOF_STATIC_RATE_22K | SOF_STATIC_RATE_24K | \
79 SOF_STATIC_RATE_32K | SOF_STATIC_RATE_44K1 | SOF_STATIC_RATE_48K | \
80 SOF_STATIC_RATE_64K | SOF_STATIC_RATE_88K2 | SOF_STATIC_RATE_96K | \
81 SOF_STATIC_RATE_176K4 | SOF_STATIC_RATE_192K | SOF_STATIC_RATE_384K)
82
84#define SOF_STATIC_FMT_MASK_ALL \
85 (SOF_STATIC_FMT_S16_LE | SOF_STATIC_FMT_S24_4LE | SOF_STATIC_FMT_S32_LE | \
86 SOF_STATIC_FMT_FLOAT | SOF_STATIC_FMT_S24_3LE | SOF_STATIC_FMT_S24_4LE_MSB | \
87 SOF_STATIC_FMT_U8 | SOF_STATIC_FMT_S16_4LE | SOF_STATIC_FMT_A_LAW | \
88 SOF_STATIC_FMT_MU_LAW)
89
94 uint32_t formats;
95 uint32_t rates;
96 uint16_t min_channels;
97 uint16_t max_channels;
98 uint32_t default_rate;
99 uint32_t sink_rate;
101};
102
109#define SOF_STATIC_CAPS(_fmt, _rate, _ch) \
110 { \
111 .formats = BIT(_fmt), \
112 .rates = (_rate == 8000) ? SOF_STATIC_RATE_8K : \
113 (_rate == 11025) ? SOF_STATIC_RATE_11K : \
114 (_rate == 12000) ? SOF_STATIC_RATE_12K : \
115 (_rate == 16000) ? SOF_STATIC_RATE_16K : \
116 (_rate == 22050) ? SOF_STATIC_RATE_22K : \
117 (_rate == 24000) ? SOF_STATIC_RATE_24K : \
118 (_rate == 32000) ? SOF_STATIC_RATE_32K : \
119 (_rate == 44100) ? SOF_STATIC_RATE_44K1 : \
120 (_rate == 48000) ? SOF_STATIC_RATE_48K : \
121 (_rate == 64000) ? SOF_STATIC_RATE_64K : \
122 (_rate == 88200) ? SOF_STATIC_RATE_88K2 : \
123 (_rate == 96000) ? SOF_STATIC_RATE_96K : \
124 (_rate == 176400) ? SOF_STATIC_RATE_176K4 : \
125 (_rate == 192000) ? SOF_STATIC_RATE_192K : \
126 (_rate == 384000) ? SOF_STATIC_RATE_384K : SOF_STATIC_RATE_48K, \
127 .min_channels = (_ch), \
128 .max_channels = (_ch), \
129 .default_rate = (_rate), \
130 .default_fmt = (_fmt), \
131 }
132
133/* =========================================================================
134 * Components / Processing Modules
135 * ========================================================================= */
136
145
154
159 uint32_t id;
160 uint32_t pipeline_id;
161 const char *name;
163 const struct sof_uuid *uuid;
164 uint32_t direction;
168 union {
169 struct {
170 uint32_t terminal_id;
171 } usb;
172 struct {
173 uint32_t dai_type;
174 uint32_t dai_index;
175 uint32_t format;
176 int (*configure)(struct comp_dev *dev,
177 struct ipc_config_dai *dai_cfg,
178 void *spec_cfg);
180 } ep;
181
182 const void *init_blob;
184};
185
189#define SOF_STATIC_COMP_MODULE(...) \
190 { .type = SOF_STATIC_COMP_MODULE, __VA_ARGS__ }
191
195#define SOF_STATIC_COMP_HOST(...) \
196 { .type = SOF_STATIC_COMP_HOST, .ep_type = SOF_STATIC_EP_USB_TERMINAL, __VA_ARGS__ }
197
201#define SOF_STATIC_COMP_DAI(...) \
202 { .type = SOF_STATIC_COMP_DAI, .ep_type = SOF_STATIC_EP_DAI, __VA_ARGS__ }
203
204/* =========================================================================
205 * Module Constructor Macros
206 * ========================================================================= */
207
222#define SOF_STATIC_MODULE(_id, _ppl, _name, _dir, _uuid, _fmt, _rate, _ch, _blob, _blob_sz) \
223 { \
224 .id = (_id), \
225 .pipeline_id = (_ppl), \
226 .name = (_name), \
227 .type = SOF_STATIC_COMP_MODULE, \
228 .uuid = (_uuid), \
229 .direction = (_dir), \
230 .caps = SOF_STATIC_CAPS((_fmt), (_rate), (_ch)), \
231 .init_blob = (_blob), \
232 .init_blob_size = (_blob_sz), \
233 }
234
248#define SOF_STATIC_MODULE_RATE_CONV(_id, _ppl, _name, _dir, _uuid, _fmt, _in_rate, _out_rate, _ch) \
249 { \
250 .id = (_id), \
251 .pipeline_id = (_ppl), \
252 .name = (_name), \
253 .type = SOF_STATIC_COMP_MODULE, \
254 .uuid = (_uuid), \
255 .direction = (_dir), \
256 .caps = { \
257 .formats = BIT(_fmt), \
258 .rates = SOF_STATIC_RATE_MASK_ALL, \
259 .min_channels = (_ch), \
260 .max_channels = (_ch), \
261 .default_rate = (_in_rate), \
262 .sink_rate = (_out_rate), \
263 .default_fmt = (_fmt), \
264 }, \
265 }
266
267/* =========================================================================
268 * Endpoint Constructor Macros
269 * ========================================================================= */
270
283#define SOF_STATIC_ENDPOINT_USB(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _term_id) \
284 { \
285 .id = (_id), \
286 .pipeline_id = (_ppl), \
287 .name = (_name), \
288 .type = SOF_STATIC_COMP_HOST, \
289 .direction = (_dir), \
290 .caps = SOF_STATIC_CAPS((_fmt), (_rate), (_ch)), \
291 .ep_type = SOF_STATIC_EP_USB_TERMINAL, \
292 .ep.usb.terminal_id = (_term_id), \
293 }
294
309#define SOF_STATIC_ENDPOINT_DAI(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _type, _idx, _clk_fmt) \
310 { \
311 .id = (_id), \
312 .pipeline_id = (_ppl), \
313 .name = (_name), \
314 .type = SOF_STATIC_COMP_DAI, \
315 .direction = (_dir), \
316 .caps = SOF_STATIC_CAPS((_fmt), (_rate), (_ch)), \
317 .ep_type = SOF_STATIC_EP_DAI, \
318 .ep.dai.dai_type = (_type), \
319 .ep.dai.dai_index = (_idx), \
320 .ep.dai.format = (_clk_fmt), \
321 }
322
338#define SOF_STATIC_ENDPOINT_DAI_CFG(_id, _ppl, _name, _dir, _fmt, _rate, _ch, _type, _idx, _clk_fmt, _cfg_fn) \
339 { \
340 .id = (_id), \
341 .pipeline_id = (_ppl), \
342 .name = (_name), \
343 .type = SOF_STATIC_COMP_DAI, \
344 .direction = (_dir), \
345 .caps = SOF_STATIC_CAPS((_fmt), (_rate), (_ch)), \
346 .ep_type = SOF_STATIC_EP_DAI, \
347 .ep.dai.dai_type = (_type), \
348 .ep.dai.dai_index = (_idx), \
349 .ep.dai.format = (_clk_fmt), \
350 .ep.dai.configure = (_cfg_fn), \
351 }
352
353/* =========================================================================
354 * Static Module Operations
355 * ========================================================================= */
356
367 const struct sof_uuid *uuid;
368
377 struct comp_dev *(*create)(const struct comp_driver *drv,
378 struct comp_ipc_config *cfg,
379 const struct sof_static_comp *cdesc,
380 uint32_t period_us);
381
389 int (*apply_volume)(struct comp_dev *dev, uint32_t channels, int32_t val);
390
398 int (*apply_volume_chan)(struct comp_dev *dev, uint32_t channel, int32_t val);
399
407 int (*apply_switch)(struct comp_dev *dev, uint32_t channels, int32_t val);
408
416 int (*apply_switch_chan)(struct comp_dev *dev, uint32_t channel, int32_t val);
417
425 int (*apply_enum)(struct comp_dev *dev, uint32_t channel, int32_t val);
426
434 int (*apply_binary)(struct comp_dev *dev, const void *data, size_t size);
435
438};
439
449#if defined(__ZEPHYR__)
450#include <zephyr/init.h>
451#define DECLARE_STATIC_MODULE_OPS(name, ops) \
452 static int _static_ops_init_##name(void) \
453 { \
454 return sof_static_register_module_ops(ops); \
455 } \
456 SYS_INIT(_static_ops_init_##name, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY)
457#else
458#define DECLARE_STATIC_MODULE_OPS(name, ops) \
459 static __attribute__((constructor)) void _static_ops_init_##name(void) \
460 { \
461 sof_static_register_module_ops(ops); \
462 }
463#endif
464
465/* =========================================================================
466 * Intermediate Audio Buffers & Pipeline Routing
467 * ========================================================================= */
468
473 uint32_t id;
474 size_t size;
476 uint32_t rate;
477 uint16_t channels;
478 uint32_t flags;
479};
480
487#define SOF_STATIC_BUFFER(...) \
488 { .flags = SOF_MEM_FLAG_DMA | SOF_MEM_FLAG_USER, .fmt = SOF_IPC_FRAME_INVALID, __VA_ARGS__ }
489
494 uint32_t src_comp_id;
495 uint32_t buffer_id;
496 uint32_t sink_comp_id;
497};
498
502#define SOF_STATIC_ROUTE(...) \
503 { __VA_ARGS__ }
504
505/* =========================================================================
506 * PCMs (Pulse Code Modulated Endpoints)
507 * ========================================================================= */
508
513 uint32_t pcm_id;
514 const char *name;
515 uint32_t direction;
516 uint32_t pipeline_id;
517 uint32_t host_comp_id;
519};
520
524#define SOF_STATIC_PCM(...) \
525 { __VA_ARGS__ }
526
527/* =========================================================================
528 * Kcontrols (Volume, Mute, Bypass, Presets, Coefficients)
529 * ========================================================================= */
530
540
545 uint32_t id;
546 const char *name;
548 uint32_t target_comp_id;
549 uint32_t param_id;
551 int32_t min;
552 int32_t max;
553 int32_t def;
554 uint32_t channels;
557};
558
560#define SOF_STATIC_KCONTROL_VOLUME(...) \
561 { .type = SOF_STATIC_CTRL_VOLUME, __VA_ARGS__ }
562
564#define SOF_STATIC_KCONTROL_SWITCH(...) \
565 { .type = SOF_STATIC_CTRL_SWITCH, __VA_ARGS__ }
566
568#define SOF_STATIC_KCONTROL_ENUM(...) \
569 { .type = SOF_STATIC_CTRL_ENUM, __VA_ARGS__ }
570
572#define SOF_STATIC_KCONTROL_BINARY(...) \
573 { .type = SOF_STATIC_CTRL_BINARY, __VA_ARGS__ }
574
575/* =========================================================================
576 * Pipeline Descriptors & Top-Level Topology
577 * ========================================================================= */
578
583 uint32_t pipeline_id;
584 const char *name;
585 uint32_t direction;
586 uint32_t priority;
587 uint32_t core;
588 uint32_t period;
590 uint32_t time_domain;
591 uint32_t default_rate;
593 uint32_t sched_comp_id;
594 uint32_t source_comp_id;
595 uint32_t sink_comp_id;
596};
597
610 int32_t val, void *priv);
611
633
634/* =========================================================================
635 * Generic Engine Public APIs
636 * ========================================================================= */
637
649
655
662
668struct comp_dev *sof_static_comp_get(uint32_t comp_id);
669
675struct comp_buffer *sof_static_buffer_get(uint32_t buffer_id);
676
688
695
697
705 const struct sof_static_comp *cdesc,
706 uint32_t period_us);
707
717 struct comp_ipc_config *cfg,
718 const struct sof_static_comp *cdesc,
719 uint32_t period_us);
720
731int sof_static_kcontrol_set(uint32_t ctrl_id, int32_t val);
732
744int sof_static_kcontrol_set_chan(uint32_t ctrl_id, uint32_t channel, int32_t val);
745
757int sof_static_kcontrol_set_binary(uint32_t ctrl_id, const void *data, size_t size);
758
765int sof_static_kcontrol_get(uint32_t ctrl_id, int32_t *val);
766
773
782int sof_static_kcontrol_set_by_uac2(uint8_t entity_id, uint8_t channel, int32_t val, bool is_volume);
783
792int sof_static_kcontrol_get_by_uac2(uint8_t entity_id, uint8_t channel, int32_t *val, bool is_volume);
793
800int sof_static_pipeline_trigger_by_uac2_term(uint8_t terminal_id, bool start);
801
813
824
836int sof_static_pipeline_trigger(uint32_t pipeline_id, bool start);
837
854
862
873int sof_static_set_sample_rate(uint32_t rate);
874
880
881#ifdef __cplusplus
882}
883#endif
884
885#endif /* __SOF_AUDIO_PIPELINE_STATIC_PIPELINE_H__ */
886
Component interconnect buffer allocation and stream handling.
Component API definition.
IPC control commands.
static uint32_t pipeline_id(struct pipeline *p)
Retrieves pipeline ID from pipeline structure.
Definition pipeline.h:291
int sof_static_topology_init(const struct sof_static_topology *topo)
Initialize and instantiate the static topology graph.
sof_static_ep_type
Hardware endpoint binding type.
Definition static_pipeline.h:149
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.
int sof_static_kcontrol_set(uint32_t ctrl_id, int32_t val)
Set kcontrol value by control ID.
int sof_static_register_module_ops(struct sof_static_module_ops *ops)
Register static module operations for an audio component.
sof_static_ctrl_type
Type of static kcontrol.
Definition static_pipeline.h:534
struct comp_buffer * sof_static_buffer_get(uint32_t buffer_id)
Retrieve an intermediate buffer instance by its buffer ID.
int sof_static_kcontrol_find_by_name(const char *name)
Find kcontrol ID by human-readable name.
uint32_t sof_static_get_sample_rate(void)
Retrieve current primary sample rate.
int sof_static_kcontrol_set_chan(uint32_t ctrl_id, uint32_t channel, int32_t val)
Set kcontrol value for a specific audio channel.
#define SOF_STATIC_COMP_HOST(...)
Declare a USB/Host streaming endpoint component.
Definition static_pipeline.h:195
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.
int sof_static_pipeline_start(uint32_t pipeline_id)
Start a static pipeline by pipeline ID.
#define SOF_STATIC_COMP_DAI(...)
Declare a hardware DAI endpoint component.
Definition static_pipeline.h:201
struct pipeline * sof_static_pipeline_get(uint32_t pipeline_id)
Retrieve a pipeline instance by its pipeline ID.
sof_static_comp_type
Category of a static pipeline component.
Definition static_pipeline.h:140
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.
#define SOF_STATIC_COMP_MODULE(...)
Declare a processing module component.
Definition static_pipeline.h:189
const struct sof_static_topology * sof_static_topology_get(void)
Retrieve the currently active static topology descriptor.
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_kcontrol_handler_fn)(const struct sof_static_kcontrol *ctl, int32_t val, void *priv)
Custom kcontrol callback handler type.
Definition static_pipeline.h:609
int sof_static_pipeline_stop(uint32_t pipeline_id)
Stop a static pipeline by pipeline 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.
int sof_static_set_sample_rate(uint32_t rate)
Set global sample rate across active static pipelines.
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_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_set_binary(uint32_t ctrl_id, const void *data, size_t size)
Set binary raw configuration blob on a static kcontrol by control ID.
struct comp_dev * sof_static_comp_get(uint32_t comp_id)
Retrieve a component device instance by its component ID.
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_get(uint32_t ctrl_id, int32_t *val)
Retrieve cached kcontrol value by control ID.
uint32_t sof_static_pipeline_get_sample_rate(uint32_t pipeline_id)
Retrieve the current stream sample rate for a specific static pipeline.
@ SOF_STATIC_EP_USB_TERMINAL
USB Audio Class 2 (UAC2) streaming terminal.
Definition static_pipeline.h:151
@ SOF_STATIC_EP_DAI
Physical hardware DAI controller.
Definition static_pipeline.h:152
@ SOF_STATIC_EP_NONE
Standard internal processing module.
Definition static_pipeline.h:150
@ SOF_STATIC_CTRL_VOLUME
Linear or dB volume fader.
Definition static_pipeline.h:535
@ SOF_STATIC_CTRL_ENUM
Multi-value enumeration selector.
Definition static_pipeline.h:537
@ SOF_STATIC_CTRL_BINARY
Raw binary parameter or coefficient blob.
Definition static_pipeline.h:538
@ SOF_STATIC_CTRL_SWITCH
Boolean mute or module bypass switch.
Definition static_pipeline.h:536
uint32_t channel
Logical audio channel ID (0 = Left, 1 = Right, etc.).
Definition header.h:0
uint8_t data[0]
Binary byte payload for raw controls.
Definition header.h:5
sof_ipc_frame
Definition stream.h:16
Audio pipeline management, graph scheduling, and execution control.
IPC DAI definitions.
Audio component interconnect buffer connecting two pipeline components.
Definition buffer.h:150
Audio component base device "class" used by all other component types.
Definition component.h:587
uint32_t size
Component allocated size in bytes.
Definition component.h:595
const struct comp_driver * drv
Component driver.
Definition component.h:608
Audio component base driver "class".
Definition component.h:528
Audio component base configuration from IPC at creation.
Definition component.h:560
Definition dai-zephyr.h:49
Base module configuration parameters provided upon module instantiation.
Definition base-config.h:160
Definition ipc-config.h:65
Definition list.h:16
Audio pipeline structure representing a stream graph and execution context.
Definition pipeline.h:72
Declarative intermediate audio buffer descriptor.
Definition static_pipeline.h:472
uint16_t channels
Channel count (0 = inherit from producer component)
Definition static_pipeline.h:477
enum sof_ipc_frame fmt
Buffer audio frame format (SOF_IPC_FRAME_INVALID = inherit from producer)
Definition static_pipeline.h:475
uint32_t flags
Memory allocation flags (e.g.
Definition static_pipeline.h:478
uint32_t id
Unique buffer identifier.
Definition static_pipeline.h:473
size_t size
Total buffer allocation size in bytes.
Definition static_pipeline.h:474
uint32_t rate
Sample rate in Hz (0 = inherit from producer component)
Definition static_pipeline.h:476
Audio stream format and sample rate capability descriptor.
Definition static_pipeline.h:93
uint16_t min_channels
Minimum channel count.
Definition static_pipeline.h:96
uint32_t sink_rate
Target sink sample rate for converters (SRC/ASRC, 0 = same as default_rate)
Definition static_pipeline.h:99
enum sof_ipc_frame default_fmt
Default frame format.
Definition static_pipeline.h:100
uint32_t formats
Bitmask of supported frame formats (SOF_STATIC_FMT_*)
Definition static_pipeline.h:94
uint32_t default_rate
Default sample rate in Hz (e.g.
Definition static_pipeline.h:98
uint16_t max_channels
Maximum channel count.
Definition static_pipeline.h:97
uint32_t rates
Bitmask of supported sample rates (SOF_STATIC_RATE_*)
Definition static_pipeline.h:95
Declarative component descriptor.
Definition static_pipeline.h:158
uint32_t direction
Audio stream direction: SOF_IPC_STREAM_PLAYBACK or CAPTURE.
Definition static_pipeline.h:164
const char * name
Human-readable diagnostic name (e.g.
Definition static_pipeline.h:161
enum sof_static_ep_type ep_type
Endpoint binding type.
Definition static_pipeline.h:167
uint32_t pipeline_id
Owning pipeline identifier.
Definition static_pipeline.h:160
const struct sof_uuid * uuid
Registered driver UUID (NULL for standard Host or DAI)
Definition static_pipeline.h:163
uint32_t dai_index
DAI hardware instance index.
Definition static_pipeline.h:174
enum sof_static_comp_type type
Component category: Module, Host, or DAI.
Definition static_pipeline.h:162
struct sof_static_caps caps
Format and sample rate capabilities.
Definition static_pipeline.h:165
union sof_static_comp::@136 ep
uint32_t terminal_id
Bound UAC2 USB Terminal Entity ID.
Definition static_pipeline.h:170
const void * init_blob
Optional initial ABI configuration blob.
Definition static_pipeline.h:182
uint32_t format
Protocol/clock format mask (SOF_DAI_FMT_*)
Definition static_pipeline.h:175
uint32_t id
Unique component identifier.
Definition static_pipeline.h:159
uint32_t dai_type
DAI type (e.g.
Definition static_pipeline.h:173
size_t init_blob_size
Size of initial configuration blob in bytes.
Definition static_pipeline.h:183
Declarative static kcontrol descriptor.
Definition static_pipeline.h:544
int32_t def
Default initial value applied at boot.
Definition static_pipeline.h:553
const char * name
Human-readable control name (e.g.
Definition static_pipeline.h:546
uint32_t channels
Number of channels affected by this control.
Definition static_pipeline.h:554
int32_t max
Maximum valid value.
Definition static_pipeline.h:552
enum sof_static_ctrl_type type
Control type.
Definition static_pipeline.h:547
uint32_t id
Unique control identifier.
Definition static_pipeline.h:545
uint32_t target_comp_id
Target component ID affected by this control (0 for custom)
Definition static_pipeline.h:548
uint32_t param_id
Optional parameter or command index.
Definition static_pipeline.h:549
uint8_t uac2_entity_id
Bound external entity ID (e.g.
Definition static_pipeline.h:556
int32_t min
Minimum valid value.
Definition static_pipeline.h:551
Static pipeline module driver operations.
Definition static_pipeline.h:365
int(* apply_enum)(struct comp_dev *dev, uint32_t channel, int32_t val)
Apply enumerated route/value to component.
Definition static_pipeline.h:425
struct list_item list
List node for registered ops.
Definition static_pipeline.h:437
int(* apply_volume_chan)(struct comp_dev *dev, uint32_t channel, int32_t val)
Apply linear volume gain to a specific channel.
Definition static_pipeline.h:398
int(* apply_binary)(struct comp_dev *dev, const void *data, size_t size)
Apply raw binary configuration or coefficient blob to component.
Definition static_pipeline.h:434
const struct sof_uuid * uuid
UUID of target audio component.
Definition static_pipeline.h:367
int(* apply_volume)(struct comp_dev *dev, uint32_t channels, int32_t val)
Apply linear volume gain to component.
Definition static_pipeline.h:389
int(* apply_switch_chan)(struct comp_dev *dev, uint32_t channel, int32_t val)
Apply binary switch/mute state to a specific channel.
Definition static_pipeline.h:416
int(* apply_switch)(struct comp_dev *dev, uint32_t channels, int32_t val)
Apply binary switch/mute state to component.
Definition static_pipeline.h:407
Declarative PCM endpoint descriptor.
Definition static_pipeline.h:512
uint32_t pcm_id
Logical PCM stream index.
Definition static_pipeline.h:513
const char * name
Human-readable PCM name (e.g.
Definition static_pipeline.h:514
struct sof_static_caps caps
Supported PCM capabilities.
Definition static_pipeline.h:518
uint32_t pipeline_id
Associated pipeline ID.
Definition static_pipeline.h:516
uint32_t host_comp_id
Host/USB endpoint component ID.
Definition static_pipeline.h:517
uint32_t direction
Audio direction: SOF_IPC_STREAM_PLAYBACK or CAPTURE.
Definition static_pipeline.h:515
Declarative audio pipeline descriptor.
Definition static_pipeline.h:582
uint32_t period
Scheduling period in microseconds (e.g.
Definition static_pipeline.h:588
uint32_t core
Core affinity index (0, 1, ...)
Definition static_pipeline.h:587
uint16_t default_channels
Default channel count (e.g.
Definition static_pipeline.h:592
uint32_t time_domain
Scheduling time domain (SOF_TIME_DOMAIN_TIMER or DMA)
Definition static_pipeline.h:590
uint32_t sink_comp_id
Primary sink endpoint component ID.
Definition static_pipeline.h:595
uint32_t priority
Scheduling priority (0 = normal)
Definition static_pipeline.h:586
uint32_t sched_comp_id
Component driving pipeline scheduling.
Definition static_pipeline.h:593
uint32_t default_rate
Default stream rate in Hz (e.g.
Definition static_pipeline.h:591
uint32_t direction
Audio direction: SOF_IPC_STREAM_PLAYBACK or CAPTURE.
Definition static_pipeline.h:585
const char * name
Human-readable pipeline name.
Definition static_pipeline.h:584
uint32_t pipeline_id
Unique pipeline identifier.
Definition static_pipeline.h:583
uint32_t source_comp_id
Primary source endpoint component ID.
Definition static_pipeline.h:594
uint32_t frames_per_sched
Number of frames processed per schedule tick.
Definition static_pipeline.h:589
Declarative graph route connecting an upstream component to a downstream component.
Definition static_pipeline.h:493
uint32_t buffer_id
Intermediate buffer ID linking the components.
Definition static_pipeline.h:495
uint32_t src_comp_id
Upstream producer component ID.
Definition static_pipeline.h:494
uint32_t sink_comp_id
Downstream consumer component ID.
Definition static_pipeline.h:496
Top-level static audio topology descriptor.
Definition static_pipeline.h:615
const struct sof_static_route * routes
Array of connection routes.
Definition static_pipeline.h:624
const struct sof_static_pipeline_desc * pipelines
Array of pipeline descriptors.
Definition static_pipeline.h:618
const char * name
Human-readable topology name.
Definition static_pipeline.h:616
size_t num_comps
Number of components.
Definition static_pipeline.h:619
void * custom_control_data
Platform context passed to hook.
Definition static_pipeline.h:631
const struct sof_static_comp * comps
Array of component descriptors.
Definition static_pipeline.h:620
size_t num_pcms
Number of logical PCMs.
Definition static_pipeline.h:625
size_t num_pipelines
Number of pipelines in this topology.
Definition static_pipeline.h:617
const struct sof_static_pcm * pcms
Array of PCM descriptors.
Definition static_pipeline.h:626
size_t num_routes
Number of graph connection routes.
Definition static_pipeline.h:623
const struct sof_static_buffer * buffers
Array of buffer descriptors.
Definition static_pipeline.h:622
size_t num_controls
Number of kcontrols.
Definition static_pipeline.h:627
sof_static_kcontrol_handler_fn custom_control_handler
Optional platform control hook.
Definition static_pipeline.h:630
size_t num_buffers
Number of intermediate buffers.
Definition static_pipeline.h:621
const struct sof_static_kcontrol * controls
Array of kcontrol descriptors.
Definition static_pipeline.h:628
UUID (Universally Unique IDentifier) structure.
Definition uuid.h:60