16#ifndef __SOF_AUDIO_COMPONENT_H__
17#define __SOF_AUDIO_COMPONENT_H__
51#define COMP_STATE_NOT_EXIST 0
52#define COMP_STATE_INIT 1
53#define COMP_STATE_READY 2
54#define COMP_STATE_SUSPEND 3
55#define COMP_STATE_PREPARE 4
56#define COMP_STATE_PAUSED 5
57#define COMP_STATE_ACTIVE 6
58#define COMP_STATE_PRE_ACTIVE 7
95#define COMP_CMD_SET_VALUE 100
96#define COMP_CMD_GET_VALUE 101
97#define COMP_CMD_SET_DATA 102
98#define COMP_CMD_GET_DATA 103
104#define COMP_CMD_IPC_MMAP_RPOS 200
105#define COMP_CMD_IPC_MMAP_PPOS 201
107#define COMP_CMD_IPC_MMAP_VOL(chan) (216 + chan)
113#define COMP_STATUS_STATE_ALREADY_SET 1
119#define COMP_ATTR_COPY_TYPE 0
120#define COMP_ATTR_HOST_BUFFER 1
121#define COMP_ATTR_COPY_DIR 2
122#define COMP_ATTR_VDMA_INDEX 3
123#define COMP_ATTR_BASE_CONFIG 4
124#define COMP_ATTR_IPC4_CONFIG 5
132#define trace_comp_drv_get_id(drv_p) (-1)
135#define trace_comp_drv_get_subid(drv_p) (-1)
138#define trace_comp_get_id(comp_p) ((comp_p)->ipc_config.pipeline_id)
141#define trace_comp_get_subid(comp_p) ((comp_p)->ipc_config.id)
143#if defined(__ZEPHYR__) && defined(CONFIG_ZEPHYR_LOG)
145#define comp_cl_err(drv_p, __e, ...) LOG_ERR(__e, ##__VA_ARGS__)
147#define comp_cl_warn(drv_p, __e, ...) LOG_WRN(__e, ##__VA_ARGS__)
149#define comp_cl_info(drv_p, __e, ...) LOG_INF(__e, ##__VA_ARGS__)
151#define comp_cl_dbg(drv_p, __e, ...) LOG_DBG(__e, ##__VA_ARGS__)
155#if CONFIG_IPC_MAJOR_4
156#define __COMP_FMT "comp:%u %#x "
158#define __COMP_FMT "comp:%u.%u "
161#define comp_err(comp_p, __e, ...) LOG_ERR(__COMP_FMT __e, trace_comp_get_id(comp_p), \
162 trace_comp_get_subid(comp_p), ##__VA_ARGS__)
164#define comp_warn(comp_p, __e, ...) LOG_WRN(__COMP_FMT __e, trace_comp_get_id(comp_p), \
165 trace_comp_get_subid(comp_p), ##__VA_ARGS__)
167#define comp_info(comp_p, __e, ...) LOG_INF(__COMP_FMT __e, trace_comp_get_id(comp_p), \
168 trace_comp_get_subid(comp_p), ##__VA_ARGS__)
170#define comp_dbg(comp_p, __e, ...) LOG_DBG(__COMP_FMT __e, trace_comp_get_id(comp_p), \
171 trace_comp_get_subid(comp_p), ##__VA_ARGS__)
175#define trace_comp_drv_get_tr_ctx(drv_p) ((drv_p)->tctx)
178#define trace_comp_get_tr_ctx(comp_p) (&(comp_p)->tctx)
183#define comp_cl_err(drv_p, __e, ...) \
184 trace_dev_err(trace_comp_drv_get_tr_ctx, \
185 trace_comp_drv_get_id, \
186 trace_comp_drv_get_subid, \
191#define comp_cl_warn(drv_p, __e, ...) \
192 trace_dev_warn(trace_comp_drv_get_tr_ctx, \
193 trace_comp_drv_get_id, \
194 trace_comp_drv_get_subid, \
199#define comp_cl_info(drv_p, __e, ...) \
200 trace_dev_info(trace_comp_drv_get_tr_ctx, \
201 trace_comp_drv_get_id, \
202 trace_comp_drv_get_subid, \
207#define comp_cl_dbg(drv_p, __e, ...) \
208 trace_dev_dbg(trace_comp_drv_get_tr_ctx, \
209 trace_comp_drv_get_id, \
210 trace_comp_drv_get_subid, \
217#define comp_err(comp_p, __e, ...) \
218 trace_dev_err(trace_comp_get_tr_ctx, trace_comp_get_id, \
219 trace_comp_get_subid, comp_p, __e, ##__VA_ARGS__)
222#define comp_warn(comp_p, __e, ...) \
223 trace_dev_warn(trace_comp_get_tr_ctx, trace_comp_get_id, \
224 trace_comp_get_subid, comp_p, __e, ##__VA_ARGS__)
227#define comp_info(comp_p, __e, ...) \
228 trace_dev_info(trace_comp_get_tr_ctx, trace_comp_get_id, \
229 trace_comp_get_subid, comp_p, __e, ##__VA_ARGS__)
232#define comp_dbg(comp_p, __e, ...) \
233 trace_dev_dbg(trace_comp_get_tr_ctx, trace_comp_get_id, \
234 trace_comp_get_subid, comp_p, __e, ##__VA_ARGS__)
238#define comp_perf_info(pcd, comp_p) \
239 comp_info(comp_p, "perf comp_copy peak plat %u cpu %u", \
240 (uint32_t)((pcd)->plat_delta_peak), \
241 (uint32_t)((pcd)->cpu_delta_peak))
243#define comp_perf_avg_info(pcd, comp_p) \
244 comp_info(comp_p, "perf comp_copy samples %u period %u cpu avg %u peak %u %u",\
245 (uint32_t)((comp_p)->frames), \
246 (uint32_t)((comp_p)->period), \
247 (uint32_t)((pcd)->cpu_delta_sum), \
248 (uint32_t)((pcd)->cpu_delta_peak), \
249 (uint32_t)((pcd)->peak_mcps_period_cnt))
275union ipc_config_specific;
355#if CONFIG_IPC_MAJOR_3 || CONFIG_LIBRARY
453#if CONFIG_ZEPHYR_NATIVE_DRIVERS
457 struct timestamp_data *tsd);
489 uint32_t *data_offset,
505 uint32_t data_offset,
519#define SOF_DRV_UID_NAME(drv) (drv)->uid
521#define SOF_DRV_UID_NAME(drv) (drv)->tctx->uuid_p
531#if !CONFIG_ZEPHYR_LOG
553#define COMP_PROCESSING_DOMAIN_LL 0
554#define COMP_PROCESSING_DOMAIN_DP 1
570#if CONFIG_IPC_MAJOR_4
600#if !CONFIG_ZEPHYR_LOG
626#if CONFIG_PERFORMANCE_COUNTERS_COMPONENT
630#if CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL
631 int32_t kcps_inc[CONFIG_CORE_COUNT];
712#define comp_dev_for_each_producer(_dev, _producer) \
713 for (_producer = comp_dev_get_first_data_producer(_dev); \
715 _producer = comp_dev_get_next_data_producer(_dev, _producer))
723#define comp_dev_for_each_producer_safe(_dev, _producer, _next_producer) \
724 for (_producer = comp_dev_get_first_data_producer(_dev), \
725 _next_producer = comp_dev_get_next_data_producer_safe(_dev, _producer); \
727 _producer = _next_producer, \
728 _next_producer = comp_dev_get_next_data_producer_safe(_dev, _producer))
735#define comp_dev_for_each_consumer(_dev, _consumer) \
736 for (_consumer = comp_dev_get_first_data_consumer(_dev); \
738 _consumer = comp_dev_get_next_data_consumer(_dev, _consumer)) \
746#define comp_dev_for_each_consumer_safe(_dev, _consumer, _next_consumer) \
747 for (_consumer = comp_dev_get_first_data_consumer(_dev), \
748 _next_consumer = comp_dev_get_next_data_consumer_safe(_dev, _consumer); \
750 _consumer = _next_consumer, \
751 _next_consumer = comp_dev_get_next_data_consumer_safe(_dev, _consumer))
810#if !CONFIG_ZEPHYR_LOG
835 memset(dev, 0,
sizeof(*dev));
868#define comp_set_drvdata(c, data) \
869 (c->priv_data = data)
876#define comp_get_drvdata(c) \
879#if defined UNIT_TEST || defined __ZEPHYR__ || CONFIG_LIBRARY
880#define DECLARE_MODULE(init)
928#define DECLARE_MODULE(init) __attribute__((constructor)) \
929 static void _module_##init(void) { init(); }
934#define DECLARE_MODULE(init) __attribute__((__used__)) \
935 __section(".initcall") static void(*f##init)(void) = init
1033 assert(frames <= UINT_MAX);
1034 current->
frames = (uint32_t)frames;
1049 uint32_t copy_bytes)
1051 LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL);
1056 comp_err(dev,
"comp_underrun(): dev->comp.id = %u, source->avail = %u, copy_bytes = %u",
1071 uint32_t copy_bytes)
1073 LOG_MODULE_DECLARE(component, CONFIG_SOF_LOG_LEVEL);
1075 int32_t bytes = (int32_t)copy_bytes -
1078 comp_err(dev,
"comp_overrun(): sink->free = %u, copy_bytes = %u",
1187#if CONFIG_SOF_USERSPACE_USE_DRIVER_HEAP
Component interconnect buffer allocation and stream handling.
#define SOF_DIV_ROUND_UP(val, div)
Definition common.h:105
static struct comp_dev * comp_buffer_get_source_component(const struct comp_buffer *buffer)
Get component providing data to the buffer.
Definition buffer.h:190
static struct comp_dev * comp_buffer_get_sink_component(const struct comp_buffer *buffer)
Get component consuming data from the buffer.
Definition buffer.h:200
static uint32_t audio_stream_get_free_bytes(const struct audio_stream *stream)
Calculates free space in bytes, handling overrun_permitted behaviour.
Definition audio_stream.h:479
static uint32_t audio_stream_get_avail_bytes(const struct audio_stream *stream)
Calculates available data in bytes, handling underrun_permitted behaviour.
Definition audio_stream.h:435
void pipeline_xrun(struct pipeline *p, struct comp_dev *dev, int32_t bytes)
Notifies host and pipeline that an XRUN condition occurred.
int comp_register(struct comp_driver_info *drv)
Registers the component driver on the list of available components.
void sys_comp_module_asrc_interface_init(void)
void sys_comp_module_aria_interface_init(void)
void sys_comp_module_stft_process_interface_init(void)
static enum sof_comp_type dev_comp_type(const struct comp_dev *dev)
Retrieves component type from device.
Definition component.h:791
void sys_comp_module_gain_interface_init(void)
void sys_comp_module_tester_interface_init(void)
#define comp_err(comp_p, __e,...)
Trace error message from component device.
Definition component.h:217
static struct processing_module * comp_mod(const struct comp_dev *dev)
Module adapter associated with a component.
Definition component.h:858
void sys_comp_module_google_ctc_audio_processing_interface_init(void)
#define COMP_STATE_NOT_EXIST
Component does not exist.
Definition component.h:51
void sys_comp_module_mfcc_interface_init(void)
void sys_comp_module_eq_fir_interface_init(void)
static void comp_init(const struct comp_driver *drv, struct comp_dev *dev, size_t bytes)
Initialize common part of a component device.
Definition component.h:802
const struct comp_driver * comp_driver_find(const struct sof_uuid *uuid, uint32_t type)
Look up a registered SOF component driver by UUID or driver type.
void comp_unregister(struct comp_driver_info *drv)
Unregisters the component driver from the list of available components.
static struct comp_buffer * comp_dev_get_next_data_producer_safe(struct comp_dev *component, struct comp_buffer *producer)
Safely get a pointer to the next comp_buffer object providing data to the component.
Definition component.h:665
void sys_comp_selector_init(void)
void sys_comp_module_multiband_drc_interface_init(void)
void comp_update_ibs_obs_cpc(struct comp_dev *dev)
Update IBS, OBS, CPC, LL chunk size for component.
void sys_comp_dai_init(void)
static void comp_free_device(struct comp_dev *dev)
Frees memory allocated for component device.
Definition component.h:848
bind_type
Component module binding endpoint type.
Definition component.h:279
static struct comp_buffer * comp_dev_get_next_data_consumer(struct comp_dev *component, struct comp_buffer *consumer)
Get a pointer to the next comp_buffer object receiving data from the component.
Definition component.h:688
void sys_comp_module_mixout_interface_init(void)
void sys_comp_module_mixin_interface_init(void)
void sys_comp_module_selector_interface_init(void)
int comp_verify_params(struct comp_dev *dev, uint32_t flag, struct sof_ipc_stream_params *params)
Verify and set component audio parameters.
static uint32_t dev_comp_pipe_id(const struct comp_dev *dev)
Retrieves Component pipeline ID from device.
Definition component.h:781
void sys_comp_module_mixer_interface_init(void)
void sys_comp_module_phase_vocoder_interface_init(void)
#define trace_comp_drv_get_tr_ctx(drv_p)
Retrieves trace context from the component driver.
Definition component.h:175
void sys_comp_kpb_init(void)
static struct comp_buffer * comp_dev_get_next_data_consumer_safe(struct comp_dev *component, struct comp_buffer *consumer)
Safely get a pointer to the next comp_buffer object receiving data from the component.
Definition component.h:701
comp_copy_type
Type of next dma copy mode, changed on runtime.
Definition component.h:266
static uint32_t dev_comp_id(const struct comp_dev *dev)
Retrieves Component ID from device.
Definition component.h:771
void sys_comp_module_dcblock_interface_init(void)
void sys_comp_module_google_rtc_audio_processing_interface_init(void)
comp_endpoint_type
Type of endpoint this component is connected to in a pipeline.
Definition component.h:254
void sys_comp_module_src_lite_interface_init(void)
void sys_comp_host_init(void)
void sys_comp_module_copier_interface_init(void)
static struct comp_dev * comp_alloc(const struct comp_driver *drv, size_t bytes)
Allocates memory for the component device and initializes common part.
Definition component.h:822
void comp_get_copy_limits_frame_aligned(const struct comp_buffer *source, const struct comp_buffer *sink, struct comp_copy_limits *cl)
Computes source to sink copy operation boundaries including maximum number of frames aligned with req...
void sys_comp_module_mux_interface_init(void)
static void comp_overrun(struct comp_dev *dev, struct comp_buffer *sink, uint32_t copy_bytes)
Called by component device when overrun is detected.
Definition component.h:1070
void sys_comp_module_tone_interface_init(void)
void sys_comp_module_crossover_interface_init(void)
int comp_set_state(struct comp_dev *dev, int cmd)
Component state transition handling.
static struct comp_buffer * comp_dev_get_first_data_consumer(struct comp_dev *component)
Get a pointer to the first comp_buffer object receiving data from the component.
Definition component.h:676
static void comp_underrun(struct comp_dev *dev, struct comp_buffer *source, uint32_t copy_bytes)
Called by the component device when underrun is detected.
Definition component.h:1047
static int comp_buffer_get_sink_state(const struct comp_buffer *buffer)
Provide state of a component connected to a buffer as a data consumer.
Definition component.h:1140
void comp_init_performance_data(struct comp_dev *dev)
Initialize performance data fields if component has assigned slot in measurement window.
static struct comp_buffer * comp_dev_get_first_data_producer(struct comp_dev *component)
Get a pointer to the first comp_buffer object providing data to the component.
Definition component.h:640
void sys_comp_module_level_multiplier_interface_init(void)
void sys_comp_module_dts_interface_init(void)
void sys_comp_module_rtnr_interface_init(void)
void sys_comp_module_volume_interface_init(void)
#define COMP_STATE_INIT
Component being initialised.
Definition component.h:52
static void component_set_nearest_period_frames(struct comp_dev *current, uint32_t rate)
Set component period frames based on sample rate and period.
Definition component.h:1004
static struct comp_buffer * comp_dev_get_next_data_producer(struct comp_dev *component, struct comp_buffer *producer)
Get a pointer to the next comp_buffer object providing data to the component.
Definition component.h:652
void sys_comp_module_template_interface_init(void)
static int user_get_buffer_memory_region(const struct comp_driver *drv)
Get memory region flag for component buffer allocations.
Definition component.h:1185
int comp_set_adapter_ops(const struct comp_driver *drv, const struct module_interface *ops)
Set adapter ops for a dynamically created driver.
void sys_comp_module_drc_interface_init(void)
void sys_comp_module_tdfb_interface_init(void)
static int comp_get_state(const struct comp_dev *dev)
Get component state.
Definition component.h:1116
bool comp_update_performance_data(struct comp_dev *dev, uint32_t cycles_used)
Update performance data entry for component and check for budget violation.
void sys_comp_module_dolby_dax_audio_processing_interface_init(void)
void sys_comp_module_demux_interface_init(void)
void comp_get_copy_limits(struct comp_buffer *source, struct comp_buffer *sink, struct comp_copy_limits *cl)
Computes source to sink copy operation boundaries including maximum number of frames that can be tran...
void sys_comp_module_nxp_eap_interface_init(void)
static int comp_buffer_get_source_state(const struct comp_buffer *buffer)
Provide state of a component connected to a buffer as a data provider.
Definition component.h:1129
void sys_comp_module_src_interface_init(void)
void sys_comp_module_sound_dose_interface_init(void)
void sys_comp_module_eq_iir_interface_init(void)
void sys_comp_module_igo_nr_interface_init(void)
@ COMP_TRIGGER_STOP
Stop component stream.
Definition component.h:73
@ COMP_TRIGGER_XRUN
XRUN component.
Definition component.h:79
@ COMP_TRIGGER_PAUSE
Pause the component stream.
Definition component.h:75
@ COMP_TRIGGER_RESET
Reset component.
Definition component.h:77
@ COMP_TRIGGER_PREPARE
Prepare component.
Definition component.h:78
@ COMP_TRIGGER_START
Start component stream.
Definition component.h:74
@ COMP_TRIGGER_PRE_START
Prepare to start component stream.
Definition component.h:80
@ COMP_TRIGGER_POST_STOP
Finalize stop component stream.
Definition component.h:82
@ COMP_TRIGGER_POST_PAUSE
Finalize pause component stream.
Definition component.h:83
@ COMP_TRIGGER_NO_ACTION
No action required.
Definition component.h:84
@ COMP_TRIGGER_RELEASE
Release paused component stream.
Definition component.h:76
@ COMP_TRIGGER_PRE_RELEASE
Prepare to release paused component stream.
Definition component.h:81
@ COMP_BIND_TYPE_SINK
Bind to a data sink.
Definition component.h:281
@ COMP_BIND_TYPE_SOURCE
Bind to a data source.
Definition component.h:280
@ COMP_COPY_BLOCKING
Blocking.
Definition component.h:269
@ COMP_COPY_NORMAL
Normal.
Definition component.h:268
@ COMP_COPY_ONE_SHOT
One-shot.
Definition component.h:270
@ COMP_COPY_INVALID
Invalid.
Definition component.h:267
@ COMP_ENDPOINT_HOST
Connected to host dma.
Definition component.h:255
@ COMP_ENDPOINT_DAI
Connected to dai dma.
Definition component.h:256
@ COMP_ENDPOINT_NODE
No dma connection.
Definition component.h:257
#define SOF_MEM_FLAG_USER_SHARED_BUFFER
Allocate from shared user memory heap (shared_buffer_heap) accessible across user/kernel domains.
Definition alloc.h:71
void * sof_heap_alloc(struct k_heap *heap, uint32_t flags, size_t bytes, size_t alignment)
Allocate memory from a specified Zephyr heap or default system heap.
#define SOF_MEM_FLAG_USER
Base allocation flag denoting memory allocated for user-space threads and module execution.
Definition alloc.h:69
#define SOF_MEM_FLAG_COHERENT
Allocate uncached / coherent memory address.
Definition alloc.h:53
void sof_heap_free(struct k_heap *heap, void *addr)
Free memory allocated via sof_heap_alloc().
sof_comp_type
Definition topology.h:27
#define list_is_empty(item)
Definition list.h:73
static void list_init(struct list_item *list)
Definition list.h:25
#define list_item(item, type, member)
Definition list.h:80
#define list_first_item(list, type, member)
Definition list.h:84
RTOS mutex primitives and synchronization wrappers.
#define assert(x)
Definition panic.h:19
Audio pipeline management, graph scheduling, and execution control.
static int memcpy_s(void *dest, size_t dest_size, const void *src, size_t count)
Definition string.h:38
Component module binding metadata and endpoint references.
Definition component.h:287
const struct ipc4_module_bind_unbind * ipc4_data
Pointer to IPC4 bind/unbind data.
Definition component.h:288
enum bind_type bind_type
Type of binding (source or sink)
Definition component.h:289
struct sof_source * source
Source interface pointer when bind_type == COMP_BIND_TYPE_SOURCE.
Definition component.h:295
Audio component interconnect buffer connecting two pipeline components.
Definition buffer.h:150
struct list_item source_list
List node in source component's buffer list.
Definition buffer.h:169
struct list_item sink_list
List node in sink component's buffer list.
Definition buffer.h:170
struct audio_stream stream
Legacy audio stream representation.
Definition buffer.h:154
Struct for use with comp_get_copy_limits() function.
Definition component.h:758
int frames
Number of frames that can be copied.
Definition component.h:759
int sink_frame_bytes
Frame size in bytes in sink.
Definition component.h:763
int source_frame_bytes
Frame size in bytes in source.
Definition component.h:762
int sink_bytes
Free bytes in sink.
Definition component.h:761
int source_bytes
Available bytes in source.
Definition component.h:760
Audio component base device "class" used by all other component types.
Definition component.h:587
uint32_t priority
Component processing priority.
Definition component.h:597
struct comp_ipc_config ipc_config
Component IPC configuration.
Definition component.h:599
size_t cpc
Max DSP cycles per chunk.
Definition component.h:620
struct comp_perf_data perf_data
Performance data.
Definition component.h:617
struct list_item bsink_list
List of sink buffers.
Definition component.h:614
bool is_shared
True if component is shared across cores.
Definition component.h:598
size_t ll_chunk_size
Size of 1ms input format chunk in bytes.
Definition component.h:621
uint16_t state
Component state (COMP_STATE_*)
Definition component.h:589
size_t obs
Output Buffer Size for pin 0.
Definition component.h:619
uint32_t size
Component allocated size in bytes.
Definition component.h:595
void * priv_data
Driver private data.
Definition component.h:624
uint32_t direction
Stream direction (enum sof_ipc_stream_direction)
Definition component.h:605
bool expect_eos
End of stream expected flag.
Definition component.h:591
struct task * task
Component processing task (cross-core or DP)
Definition component.h:594
const struct comp_driver * drv
Component driver.
Definition component.h:608
struct processing_module * mod
Module adapter reference.
Definition component.h:610
bool direction_set
Flag indicating that direction has been set.
Definition component.h:606
struct list_item bsource_list
List of source buffers.
Definition component.h:613
struct pipeline * pipeline
Parent pipeline reference.
Definition component.h:592
struct tr_ctx tctx
Trace settings.
Definition component.h:601
size_t ibs
Input Buffer Size for pin 0.
Definition component.h:618
uint32_t frames
Number of frames copied to sink.
Definition component.h:590
uint32_t period
Component processing period in microseconds.
Definition component.h:596
Holds constant pointer to component driver.
Definition component.h:544
struct list_item list
list of component drivers
Definition component.h:547
const struct module_interface ** adapter_ops
pointer for updating ops
Definition component.h:546
const struct comp_driver * drv
pointer to component driver
Definition component.h:545
Audio component base driver "class".
Definition component.h:528
const struct module_interface * adapter_ops
module specific operations.
Definition component.h:535
struct comp_ops ops
component operations
Definition component.h:534
struct tr_ctx * tctx
Pointer to trace context.
Definition component.h:532
const struct sof_uuid * uid
Address to UUID value.
Definition component.h:530
uint32_t type
SOF_COMP_ for driver.
Definition component.h:529
struct k_heap * user_heap
Userspace heap.
Definition component.h:539
struct sof_uuid uid_cp
UUID copy for LLEXT modules.
Definition component.h:540
Audio component base configuration from IPC at creation.
Definition component.h:560
uint32_t frame_fmt
Frame format (SOF_IPC_FRAME_*)
Definition component.h:568
uint32_t ipc_config_size
Size of config received by IPC.
Definition component.h:572
uint32_t proc_domain
Processing domain (COMP_PROCESSING_DOMAIN_*)
Definition component.h:564
uint32_t id
Component ID.
Definition component.h:562
uint32_t periods_source
Source periods (0 means variable)
Definition component.h:567
uint32_t periods_sink
Sink periods (0 means variable)
Definition component.h:566
uint32_t xrun_action
Action to take on XRUN.
Definition component.h:569
bool ipc_extended_init
True if extended init is included in IPC payload.
Definition component.h:571
enum sof_comp_type type
Component type (SOF_COMP_*)
Definition component.h:565
uint32_t core
Core we run on.
Definition component.h:561
uint32_t pipeline_id
Component pipeline ID.
Definition component.h:563
Audio component operations table.
Definition component.h:307
int(* set_attribute)(struct comp_dev *dev, uint32_t type, void *value)
Sets attribute in component.
Definition component.h:423
int(* get_attribute)(struct comp_dev *dev, uint32_t type, void *value)
Gets attribute in component.
Definition component.h:413
int(* prepare)(struct comp_dev *dev)
Prepares component after params are set.
Definition component.h:381
int(* reset)(struct comp_dev *dev)
Resets component.
Definition component.h:388
int(* dai_ts_get)(struct comp_dev *dev, struct timestamp_data *tsd)
Gets timestamp.
Definition component.h:456
int(* params)(struct comp_dev *dev, struct sof_ipc_stream_params *params)
Sets component audio stream parameters.
Definition component.h:331
int(* bind)(struct comp_dev *dev, const struct bind_info *bind_data)
Bind, atomic - used to notify component of bind event.
Definition component.h:466
int(* dai_ts_stop)(struct comp_dev *dev)
Stops timestamping.
Definition component.h:445
int(* dai_get_hw_params)(struct comp_dev *dev, struct sof_ipc_stream_params *params, int dir)
Fetches hardware stream parameters.
Definition component.h:341
int(* position)(struct comp_dev *dev, struct sof_ipc_stream_posn *posn)
Retrieves component rendering position.
Definition component.h:403
uint64_t(* get_total_data_processed)(struct comp_dev *dev, uint32_t stream_no, bool input)
Returns total data processed in number of bytes.
Definition component.h:515
int(* copy)(struct comp_dev *dev)
Copy and process stream data from source to sink buffers.
Definition component.h:395
int(* dai_ts_start)(struct comp_dev *dev)
Starts timestamping.
Definition component.h:438
int(* cmd)(struct comp_dev *dev, int cmd, void *data, int max_data_size)
Used to pass standard and bespoke commands (with optional data).
Definition component.h:364
int(* set_large_config)(struct comp_dev *dev, uint32_t param_id, bool first_block, bool last_block, uint32_t data_offset, const char *data)
Set large config in component.
Definition component.h:502
int(* dai_ts_config)(struct comp_dev *dev)
Configures timestamping in attached DAI.
Definition component.h:431
int(* dai_config)(struct dai_data *dd, struct comp_dev *dev, struct ipc_config_dai *dai_config, const void *dai_spec_config)
Configures attached DAI.
Definition component.h:352
int(* trigger)(struct comp_dev *dev, int cmd)
Trigger, atomic - used to start/stop/pause stream operations.
Definition component.h:374
int(* get_large_config)(struct comp_dev *dev, uint32_t param_id, bool first_block, bool last_block, uint32_t *data_offset, char *data)
Gets large config in component.
Definition component.h:486
int(* unbind)(struct comp_dev *dev, const struct bind_info *unbind_data)
Unbind, atomic - used to notify component of unbind event.
Definition component.h:474
void(* free)(struct comp_dev *dev)
Called to delete the specified component device.
Definition component.h:323
Component performance measurement tracking data.
Definition component.h:579
struct perf_data_item_comp * perf_data_item
Pointer to performance data item.
Definition component.h:581
size_t peak_of_measured_cpc
Maximum measured CPC at runtime.
Definition component.h:580
DAI runtime data.
Definition dai-zephyr.h:119
Module pin binding and unbinding command structure (SOF_IPC4_MOD_BIND / UNBIND).
Definition module.h:206
Definition ipc-config.h:65
struct list_item * next
Definition list.h:17
3rd party processing module interface
Definition interface.h:102
Definition perf_cnt_data.h:21
Component performance data with wall clock cycle metrics.
Definition base_fw.h:754
Audio pipeline structure representing a stream graph and execution context.
Definition pipeline.h:72
internals of sink API.
Definition sink_api.h:141
internals of source API.
Definition source_api.h:137
UUID (Universally Unique IDentifier) structure.
Definition uuid.h:60
Core task structure managed by SOF schedulers.
Definition task.h:81
Hardware telemetry metrics, CPU cycle accounting, and Memory Window telemetry slots.
Placement of data that user-space threads must be able to access.