|
Sound Open Firmware
|
Component driver interface, operations vtable, hardware abstraction, IPC binding, and state machines. More...
Data Structures | |
| struct | bind_info |
| Component module binding metadata and endpoint references. More... | |
| struct | comp_ops |
| Audio component operations table. More... | |
| struct | comp_driver |
| Audio component base driver "class". More... | |
| struct | comp_driver_info |
| Holds constant pointer to component driver. More... | |
| struct | comp_ipc_config |
| Audio component base configuration from IPC at creation. More... | |
| struct | comp_perf_data |
| Component performance measurement tracking data. More... | |
| struct | comp_dev |
| Audio component base device "class" used by all other component types. More... | |
| struct | comp_copy_limits |
| Struct for use with comp_get_copy_limits() function. More... | |
| struct | comp_driver_list |
| Holds list of registered components' drivers. More... | |
| struct | get_attribute_remote_payload |
| Remote payload for component get_attribute IPC4 message. More... | |
Macros | |
| #define | SOF_DRV_UID_NAME(drv) (drv)->tctx->uuid_p |
| #define | comp_dev_for_each_producer(_dev, _producer) |
| Macro to iterate through component's list of producer buffers. | |
| #define | comp_dev_for_each_producer_safe(_dev, _producer, _next_producer) |
| Safe macro to iterate through component's producer buffers allowing buffer deletion. | |
| #define | comp_dev_for_each_consumer(_dev, _consumer) |
| Macro to iterate through component's list of consumer buffers. | |
| #define | comp_dev_for_each_consumer_safe(_dev, _consumer, _next_consumer) |
| Safe macro to iterate through component's consumer buffers allowing buffer deletion. | |
| #define | comp_set_drvdata(c, data) (c->priv_data = data) |
| Assigns private data to component device. | |
| #define | comp_get_drvdata(c) (c->priv_data) |
| Retrieves driver private data from component device. | |
| #define | DECLARE_MODULE(init) |
| #define | comp_buffer_list(comp, dir) |
| Retrieves the component device buffer list based on direction. | |
Enumerations | |
| enum | comp_endpoint_type { COMP_ENDPOINT_HOST , COMP_ENDPOINT_DAI , COMP_ENDPOINT_NODE } |
| Type of endpoint this component is connected to in a pipeline. More... | |
| enum | comp_copy_type { COMP_COPY_INVALID = -1 , COMP_COPY_NORMAL = 0 , COMP_COPY_BLOCKING , COMP_COPY_ONE_SHOT } |
| Type of next dma copy mode, changed on runtime. More... | |
| enum | bind_type { COMP_BIND_TYPE_SOURCE , COMP_BIND_TYPE_SINK } |
| Component module binding endpoint type. More... | |
Functions | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| static uint32_t | dev_comp_id (const struct comp_dev *dev) |
| Retrieves Component ID from device. | |
| static uint32_t | dev_comp_pipe_id (const struct comp_dev *dev) |
| Retrieves Component pipeline ID from device. | |
| static enum sof_comp_type | dev_comp_type (const struct comp_dev *dev) |
| Retrieves component type from device. | |
| static void | comp_init (const struct comp_driver *drv, struct comp_dev *dev, size_t bytes) |
| Initialize common part of a component device. | |
| static struct comp_dev * | comp_alloc (const struct comp_driver *drv, size_t bytes) |
| Allocates memory for the component device and initializes common part. | |
| static void | comp_free_device (struct comp_dev *dev) |
| Frees memory allocated for component device. | |
| static struct processing_module * | comp_mod (const struct comp_dev *dev) |
| Module adapter associated with a component. | |
| void | sys_comp_dai_init (void) |
| void | sys_comp_host_init (void) |
| void | sys_comp_kpb_init (void) |
| void | sys_comp_selector_init (void) |
| void | sys_comp_module_aria_interface_init (void) |
| void | sys_comp_module_asrc_interface_init (void) |
| void | sys_comp_module_copier_interface_init (void) |
| void | sys_comp_module_crossover_interface_init (void) |
| void | sys_comp_module_dcblock_interface_init (void) |
| void | sys_comp_module_demux_interface_init (void) |
| void | sys_comp_module_dolby_dax_audio_processing_interface_init (void) |
| void | sys_comp_module_drc_interface_init (void) |
| void | sys_comp_module_dts_interface_init (void) |
| void | sys_comp_module_eq_fir_interface_init (void) |
| void | sys_comp_module_eq_iir_interface_init (void) |
| void | sys_comp_module_gain_interface_init (void) |
| void | sys_comp_module_google_rtc_audio_processing_interface_init (void) |
| void | sys_comp_module_google_ctc_audio_processing_interface_init (void) |
| void | sys_comp_module_igo_nr_interface_init (void) |
| void | sys_comp_module_level_multiplier_interface_init (void) |
| void | sys_comp_module_mfcc_interface_init (void) |
| void | sys_comp_module_mixer_interface_init (void) |
| void | sys_comp_module_mixin_interface_init (void) |
| void | sys_comp_module_mixout_interface_init (void) |
| void | sys_comp_module_multiband_drc_interface_init (void) |
| void | sys_comp_module_mux_interface_init (void) |
| void | sys_comp_module_nxp_eap_interface_init (void) |
| void | sys_comp_module_phase_vocoder_interface_init (void) |
| void | sys_comp_module_rtnr_interface_init (void) |
| void | sys_comp_module_selector_interface_init (void) |
| void | sys_comp_module_sound_dose_interface_init (void) |
| void | sys_comp_module_src_interface_init (void) |
| void | sys_comp_module_src_lite_interface_init (void) |
| void | sys_comp_module_stft_process_interface_init (void) |
| void | sys_comp_module_tdfb_interface_init (void) |
| void | sys_comp_module_tone_interface_init (void) |
| void | sys_comp_module_template_interface_init (void) |
| void | sys_comp_module_tester_interface_init (void) |
| void | sys_comp_module_volume_interface_init (void) |
| int | comp_set_state (struct comp_dev *dev, int cmd) |
| Component state transition handling. | |
| static void | component_set_nearest_period_frames (struct comp_dev *current, uint32_t rate) |
| Set component period frames based on sample rate and period. | |
| 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 transferred. | |
| 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 requirement that can be transferred. | |
| static int | comp_get_state (const struct comp_dev *dev) |
| Get component state. | |
| 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. | |
| 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. | |
| int | comp_verify_params (struct comp_dev *dev, uint32_t flag, struct sof_ipc_stream_params *params) |
| Verify and set component audio parameters. | |
| void | comp_update_ibs_obs_cpc (struct comp_dev *dev) |
| Update IBS, OBS, CPC, LL chunk size for component. | |
| void | comp_init_performance_data (struct comp_dev *dev) |
| Initialize performance data fields if component has assigned slot in measurement window. | |
| bool | comp_update_performance_data (struct comp_dev *dev, uint32_t cycles_used) |
| Update performance data entry for component and check for budget violation. | |
| static int | user_get_buffer_memory_region (const struct comp_driver *drv) |
| Get memory region flag for component buffer allocations. | |
| struct comp_dev * | comp_new (struct sof_ipc_comp *comp) |
| Instantiate a new component device from IPC3 descriptor. | |
| static void | comp_free (struct comp_dev *dev) |
| Free component device via driver ops. | |
| static int | comp_params_remote (struct comp_dev *dev, struct sof_ipc_stream_params *params) |
| Parameter initialization for component on remote core. | |
| static int | comp_params (struct comp_dev *dev, struct sof_ipc_stream_params *params) |
| Configure audio stream parameters for component device. | |
| static int | comp_dai_get_hw_params (struct comp_dev *dev, struct sof_ipc_stream_params *params, int dir) |
| Retrieve DAI hardware parameters from component device. | |
| static int | comp_cmd (struct comp_dev *dev, int cmd, void *data, int max_data_size) |
| Dispatch IPC3 command to component device. | |
| static int | comp_trigger_remote (struct comp_dev *dev, int cmd) |
| Run trigger command on remote core for target component. | |
| static int | comp_trigger_local (struct comp_dev *dev, int cmd) |
| Run trigger command locally on current core for target component. | |
| static int | comp_trigger (struct comp_dev *dev, int cmd) |
| Dispatch trigger command to component (local or remote). | |
| static int | comp_prepare_remote (struct comp_dev *dev) |
| Run prepare command on remote core for target component. | |
| static int | comp_prepare (struct comp_dev *dev) |
| Prepare component device for streaming (local or remote). | |
| int | comp_copy (struct comp_dev *dev) |
| Process and copy audio data through component. | |
| static int | comp_ipc4_get_attribute_remote (struct comp_dev *dev, uint32_t type, void *value) |
| Retrieve component attribute from a remote core (IPC4). | |
| static int | comp_get_attribute (struct comp_dev *dev, uint32_t type, void *value) |
| Get component attribute. | |
| static int | comp_set_attribute (struct comp_dev *dev, uint32_t type, void *value) |
| Set component attribute. | |
| static int | comp_reset_remote (struct comp_dev *dev) |
| Run reset command on remote core for target component. | |
| static int | comp_reset (struct comp_dev *dev) |
| Reset component and free runtime resources (local or remote). | |
| static int | comp_dai_config (struct comp_dev *dev, struct ipc_config_dai *config, const void *spec_config) |
| Configure DAI component. | |
| static int | comp_position (struct comp_dev *dev, struct sof_ipc_stream_posn *posn) |
| Retrieve stream position from component. | |
| void | sys_comp_init (struct sof *sof) |
| Allocates and initializes audio component list. | |
| static int | comp_is_single_pipeline (struct comp_dev *current, struct comp_dev *previous) |
| Checks if two component devices belong to the same parent pipeline. | |
| static int | comp_is_active (struct comp_dev *current) |
| Checks if component device is active. | |
| static int | comp_get_requested_state (int cmd) |
| Returns component state based on requested command. | |
| static int | comp_get_endpoint_type (struct comp_dev *dev) |
| Returns endpoint type of given component. | |
| static bool | comp_is_scheduling_source (struct comp_dev *dev) |
| Called to check whether component schedules its pipeline. | |
| static void | comp_make_shared (struct comp_dev *dev) |
| Called to mark component as shared between cores. | |
| static struct comp_driver_list * | comp_drivers_get (void) |
| Get the global component driver list. | |
| static int | comp_ipc4_bind_remote (struct comp_dev *dev, const struct bind_info *bind_data) |
| Send bind message to component on remote core (IPC4). | |
| static int | comp_bind (struct comp_dev *dev, const struct bind_info *bind_data) |
| Bind component to downstream/upstream component or buffer. | |
| static int | comp_ipc4_unbind_remote (struct comp_dev *dev, const struct bind_info *unbind_data) |
| Send unbind message to component on remote core (IPC4). | |
| static int | comp_unbind (struct comp_dev *dev, const struct bind_info *unbind_data) |
| Unbind component from downstream/upstream component or buffer. | |
| static uint64_t | comp_get_total_data_processed (struct comp_dev *dev, uint32_t stream_no, bool input) |
| Retrieve total data processed by component. | |
| static bool | comp_same_dir (struct comp_dev *comp, enum sof_ipc_stream_direction dir) |
| Returns true if the component's pipeline matches the specified direction. | |
Standard Component Stream Commands | |
TODO: use IPC versions after 1.1 Most component stream commands match one-to-one IPC stream trigger commands. However we add two PRE_ and two POST_ commands to the set. They are issued internally without matching IPC commands. A single START IPC command is translated into a sequence of PRE_START and START component commands, etc. POST_* commands aren't used so far. | |
| enum | { COMP_TRIGGER_STOP , COMP_TRIGGER_START , COMP_TRIGGER_PAUSE , COMP_TRIGGER_RELEASE , COMP_TRIGGER_RESET , COMP_TRIGGER_PREPARE , COMP_TRIGGER_XRUN , COMP_TRIGGER_PRE_START , COMP_TRIGGER_PRE_RELEASE , COMP_TRIGGER_POST_STOP , COMP_TRIGGER_POST_PAUSE , COMP_TRIGGER_NO_ACTION } |
Component registration | |
| int | comp_register (struct comp_driver_info *drv) |
| Registers the component driver on the list of available components. | |
| void | comp_unregister (struct comp_driver_info *drv) |
| Unregisters the component driver from the list of available components. | |
| int | comp_set_adapter_ops (const struct comp_driver *drv, const struct module_interface *ops) |
| Set adapter ops for a dynamically created driver. | |
| 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. | |
XRUN handling. | |
| 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. | |
| static void | comp_overrun (struct comp_dev *dev, struct comp_buffer *sink, uint32_t copy_bytes) |
| Called by component device when overrun is detected. | |
Audio Component States | |
| #define | COMP_STATE_NOT_EXIST 0 |
| Component does not exist. | |
| #define | COMP_STATE_INIT 1 |
| Component being initialised. | |
| #define | COMP_STATE_READY 2 |
| Component inactive, but ready. | |
| #define | COMP_STATE_SUSPEND 3 |
| Component suspended. | |
| #define | COMP_STATE_PREPARE 4 |
| Component prepared. | |
| #define | COMP_STATE_PAUSED 5 |
| Component paused. | |
| #define | COMP_STATE_ACTIVE 6 |
| Component active. | |
| #define | COMP_STATE_PRE_ACTIVE 7 |
| Component after early initialisation. | |
Standard Component Control Commands | |
"Value" commands are standard ones, known to the driver while "Data" commands are opaque blobs transferred by the driver. TODO: see also: ref to ipc data structures for commands. | |
| #define | COMP_CMD_SET_VALUE 100 |
| Set value to component. | |
| #define | COMP_CMD_GET_VALUE 101 |
| Get value from component. | |
| #define | COMP_CMD_SET_DATA 102 |
| Set data to component. | |
| #define | COMP_CMD_GET_DATA 103 |
| Get data from component. | |
MMAP IPC status | |
| #define | COMP_CMD_IPC_MMAP_RPOS 200 |
| Host read position. | |
| #define | COMP_CMD_IPC_MMAP_PPOS 201 |
| DAI presentation position. | |
| #define | COMP_CMD_IPC_MMAP_VOL(chan) (216 + chan) |
| Volume. | |
Component status | |
| #define | COMP_STATUS_STATE_ALREADY_SET 1 |
| Comp set state status. | |
Component attribute types | |
| #define | COMP_ATTR_COPY_TYPE 0 |
| Comp copy type attribute. | |
| #define | COMP_ATTR_HOST_BUFFER 1 |
| Comp host buffer attribute. | |
| #define | COMP_ATTR_COPY_DIR 2 |
| Comp copy direction. | |
| #define | COMP_ATTR_VDMA_INDEX 3 |
| Comp index of the virtual DMA at the gateway. | |
| #define | COMP_ATTR_BASE_CONFIG 4 |
| Component base config. | |
| #define | COMP_ATTR_IPC4_CONFIG 5 |
| Component ipc4 set/get config. | |
Trace macros | |
| #define | trace_comp_drv_get_id(drv_p) (-1) |
| Retrieves id (-1 = undefined) from the component driver. | |
| #define | trace_comp_drv_get_subid(drv_p) (-1) |
| Retrieves subid (-1 = undefined) from the component driver. | |
| #define | trace_comp_get_id(comp_p) ((comp_p)->ipc_config.pipeline_id) |
| Retrieves id (pipe id) from the component device. | |
| #define | trace_comp_get_subid(comp_p) ((comp_p)->ipc_config.id) |
| Retrieves subid (comp id) from the component device. | |
| #define | trace_comp_drv_get_tr_ctx(drv_p) ((drv_p)->tctx) |
| Retrieves trace context from the component driver. | |
| #define | trace_comp_get_tr_ctx(comp_p) (&(comp_p)->tctx) |
| Retrieves trace context from the component device. | |
| #define | comp_cl_err(drv_p, __e, ...) |
| Trace error message from component driver (no comp instance) | |
| #define | comp_cl_warn(drv_p, __e, ...) |
| Trace warning message from component driver (no comp instance) | |
| #define | comp_cl_info(drv_p, __e, ...) |
| Trace info message from component driver (no comp instance) | |
| #define | comp_cl_dbg(drv_p, __e, ...) |
| Trace debug message from component driver (no comp instance) | |
| #define | comp_err(comp_p, __e, ...) |
| Trace error message from component device. | |
| #define | comp_warn(comp_p, __e, ...) |
| Trace warning message from component device. | |
| #define | comp_info(comp_p, __e, ...) |
| Trace info message from component device. | |
| #define | comp_dbg(comp_p, __e, ...) |
| Trace debug message from component device. | |
| #define | comp_perf_info(pcd, comp_p) |
| #define | comp_perf_avg_info(pcd, comp_p) |
Component processing domains | |
| #define | COMP_PROCESSING_DOMAIN_LL 0 |
| Low latency processing domain. | |
| #define | COMP_PROCESSING_DOMAIN_DP 1 |
| Data processing / worker thread domain. | |
Component driver interface, operations vtable, hardware abstraction, IPC binding, and state machines.
| #define COMP_ATTR_BASE_CONFIG 4 |
Component base config.
| #define COMP_ATTR_COPY_DIR 2 |
Comp copy direction.
| #define COMP_ATTR_COPY_TYPE 0 |
Comp copy type attribute.
| #define COMP_ATTR_HOST_BUFFER 1 |
Comp host buffer attribute.
| #define COMP_ATTR_IPC4_CONFIG 5 |
Component ipc4 set/get config.
| #define COMP_ATTR_VDMA_INDEX 3 |
Comp index of the virtual DMA at the gateway.
| #define comp_buffer_list | ( | comp, | |
| dir | |||
| ) |
Retrieves the component device buffer list based on direction.
| [in] | comp | Component device pointer. |
| [in] | dir | Direction (PPL_DIR_DOWNSTREAM or PPL_DIR_UPSTREAM). |
| #define comp_cl_dbg | ( | drv_p, | |
| __e, | |||
| ... | |||
| ) |
Trace debug message from component driver (no comp instance)
| #define comp_cl_err | ( | drv_p, | |
| __e, | |||
| ... | |||
| ) |
Trace error message from component driver (no comp instance)
| #define comp_cl_info | ( | drv_p, | |
| __e, | |||
| ... | |||
| ) |
Trace info message from component driver (no comp instance)
| #define comp_cl_warn | ( | drv_p, | |
| __e, | |||
| ... | |||
| ) |
Trace warning message from component driver (no comp instance)
| #define COMP_CMD_GET_DATA 103 |
Get data from component.
| #define COMP_CMD_GET_VALUE 101 |
Get value from component.
| #define COMP_CMD_IPC_MMAP_PPOS 201 |
DAI presentation position.
| #define COMP_CMD_IPC_MMAP_RPOS 200 |
Host read position.
| #define COMP_CMD_IPC_MMAP_VOL | ( | chan | ) | (216 + chan) |
Volume.
| #define COMP_CMD_SET_DATA 102 |
Set data to component.
| #define COMP_CMD_SET_VALUE 100 |
Set value to component.
| #define comp_dbg | ( | comp_p, | |
| __e, | |||
| ... | |||
| ) |
Trace debug message from component device.
| #define comp_dev_for_each_consumer | ( | _dev, | |
| _consumer | |||
| ) |
Macro to iterate through component's list of consumer buffers.
| [in] | _dev | Target component device. |
| [out] | _consumer | Buffer pointer iterator variable. |
| #define comp_dev_for_each_consumer_safe | ( | _dev, | |
| _consumer, | |||
| _next_consumer | |||
| ) |
Safe macro to iterate through component's consumer buffers allowing buffer deletion.
| [in] | _dev | Target component device. |
| [out] | _consumer | Buffer pointer iterator variable. |
| [out] | _next_consumer | Storage pointer for next buffer. |
| #define comp_dev_for_each_producer | ( | _dev, | |
| _producer | |||
| ) |
Macro to iterate through component's list of producer buffers.
| [in] | _dev | Target component device. |
| [out] | _producer | Buffer pointer iterator variable. |
| #define comp_dev_for_each_producer_safe | ( | _dev, | |
| _producer, | |||
| _next_producer | |||
| ) |
Safe macro to iterate through component's producer buffers allowing buffer deletion.
| [in] | _dev | Target component device. |
| [out] | _producer | Buffer pointer iterator variable. |
| [out] | _next_producer | Storage pointer for next buffer. |
| #define comp_err | ( | comp_p, | |
| __e, | |||
| ... | |||
| ) |
Trace error message from component device.
| #define comp_get_drvdata | ( | c | ) | (c->priv_data) |
Retrieves driver private data from component device.
| [in] | c | Component device. |
| #define comp_info | ( | comp_p, | |
| __e, | |||
| ... | |||
| ) |
Trace info message from component device.
| #define comp_perf_avg_info | ( | pcd, | |
| comp_p | |||
| ) |
| #define comp_perf_info | ( | pcd, | |
| comp_p | |||
| ) |
| #define COMP_PROCESSING_DOMAIN_DP 1 |
Data processing / worker thread domain.
| #define COMP_PROCESSING_DOMAIN_LL 0 |
Low latency processing domain.
Assigns private data to component device.
| [in,out] | c | Component device. |
| [in] | data | Private data pointer. |
| #define COMP_STATE_ACTIVE 6 |
Component active.
| #define COMP_STATE_INIT 1 |
Component being initialised.
| #define COMP_STATE_NOT_EXIST 0 |
Component does not exist.
| #define COMP_STATE_PAUSED 5 |
Component paused.
| #define COMP_STATE_PRE_ACTIVE 7 |
Component after early initialisation.
| #define COMP_STATE_PREPARE 4 |
Component prepared.
| #define COMP_STATE_READY 2 |
Component inactive, but ready.
| #define COMP_STATE_SUSPEND 3 |
Component suspended.
| #define COMP_STATUS_STATE_ALREADY_SET 1 |
Comp set state status.
| #define comp_warn | ( | comp_p, | |
| __e, | |||
| ... | |||
| ) |
Trace warning message from component device.
| #define DECLARE_MODULE | ( | init | ) |
| #define SOF_DRV_UID_NAME | ( | drv | ) | (drv)->tctx->uuid_p |
| #define trace_comp_drv_get_id | ( | drv_p | ) | (-1) |
Retrieves id (-1 = undefined) from the component driver.
| #define trace_comp_drv_get_subid | ( | drv_p | ) | (-1) |
Retrieves subid (-1 = undefined) from the component driver.
| #define trace_comp_drv_get_tr_ctx | ( | drv_p | ) | ((drv_p)->tctx) |
Retrieves trace context from the component driver.
| #define trace_comp_get_id | ( | comp_p | ) | ((comp_p)->ipc_config.pipeline_id) |
Retrieves id (pipe id) from the component device.
| #define trace_comp_get_subid | ( | comp_p | ) | ((comp_p)->ipc_config.id) |
Retrieves subid (comp id) from the component device.
| #define trace_comp_get_tr_ctx | ( | comp_p | ) | (&(comp_p)->tctx) |
Retrieves trace context from the component device.
| anonymous enum |
| enum bind_type |
| enum comp_copy_type |
Type of next dma copy mode, changed on runtime.
Supported by host as COMP_ATTR_COPY_TYPE parameter to comp_set_attribute().
| Enumerator | |
|---|---|
| COMP_COPY_INVALID | Invalid. |
| COMP_COPY_NORMAL | Normal. |
| COMP_COPY_BLOCKING | Blocking. |
| COMP_COPY_ONE_SHOT | One-shot. |
| enum comp_endpoint_type |
|
inlinestatic |
Allocates memory for the component device and initializes common part.
| [in] | drv | Parent component driver. |
| [in] | bytes | Size of the component device in bytes. |
Bind component to downstream/upstream component or buffer.
| [in,out] | dev | Component device. |
| [in] | bind_data | Binding information. |
|
inlinestatic |
Provide state of a component connected to a buffer as a data consumer.
| [in] | buffer | Interconnect buffer to be checked. |
| COMP_STATE_NOT_EXIST | If there's no connected component. |
|
inlinestatic |
Provide state of a component connected to a buffer as a data provider.
| [in] | buffer | Interconnect buffer to be checked. |
| COMP_STATE_NOT_EXIST | If there's no connected component. |
|
inlinestatic |
Dispatch IPC3 command to component device.
| [in,out] | dev | Component device. |
| [in] | cmd | Command code. |
| [in,out] | data | Command data buffer. |
| [in] | max_data_size | Maximum acceptable size of returned data. |
| int comp_copy | ( | struct comp_dev * | dev | ) |
Process and copy audio data through component.
| [in,out] | dev | Component device. |
|
inlinestatic |
Configure DAI component.
| [in,out] | dev | Component device. |
| [in] | config | IPC DAI configuration. |
| [in] | spec_config | Spec-specific configuration data. |
|
inlinestatic |
Retrieve DAI hardware parameters from component device.
| [in] | dev | Component device. |
| [out] | params | Stream parameters to populate. |
| [in] | dir | Stream direction (enum sof_ipc_stream_direction). |
|
inlinestatic |
Get a pointer to the first comp_buffer object receiving data from the component.
| [in] | component | Target component device. |
|
inlinestatic |
Get a pointer to the first comp_buffer object providing data to the component.
| [in] | component | Target component device. |
|
inlinestatic |
Get a pointer to the next comp_buffer object receiving data from the component.
| [in] | component | Target component device. |
| [in] | consumer | Current consumer buffer. |
|
inlinestatic |
Safely get a pointer to the next comp_buffer object receiving data from the component.
| [in] | component | Target component device. |
| [in] | consumer | Current consumer buffer, or NULL. |
|
inlinestatic |
Get a pointer to the next comp_buffer object providing data to the component.
| [in] | component | Target component device. |
| [in] | producer | Current producer buffer. |
|
inlinestatic |
Safely get a pointer to the next comp_buffer object providing data to the component.
| [in] | component | Target component device. |
| [in] | producer | Current producer buffer, or NULL. |
| 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.
Scans the global SOF component driver registry to match either a specific 128-bit UUID (for audio processing modules) or a generic driver type (for host or DAI endpoints).
| uuid | Component UUID to match, or NULL to match by type. |
| type | SOF component driver type (SOF_COMP_HOST, SOF_COMP_DAI, etc.). |
|
inlinestatic |
Get the global component driver list.
|
inlinestatic |
Free component device via driver ops.
| [in,out] | dev | Component device to free. |
|
inlinestatic |
Frees memory allocated for component device.
This is a counterpart to comp_alloc() and not to be confused with comp_free().
| [in,out] | dev | Pointer to the component device to free. |
|
inlinestatic |
Get component attribute.
| [in,out] | dev | Component device. |
| [in] | type | Attribute type (COMP_ATTR_*). |
| [out] | value | Pointer to buffer where attribute value is returned. |
| 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 transferred.
| [in] | source | Source buffer. |
| [in] | sink | Sink buffer. |
| [out] | cl | Current copy limits. |
| 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 requirement that can be transferred.
| [in] | source | Buffer of source. |
| [in] | sink | Buffer of sink. |
| [out] | cl | Current copy limits. |
|
inlinestatic |
Returns endpoint type of given component.
| [in] | dev | Component device. |
|
inlinestatic |
Returns component state based on requested command.
| [in] | cmd | Request command (COMP_TRIGGER_*). |
|
inlinestatic |
Get component state.
| [in] | dev | Component from which user wants to read status. |
| COMP_STATE_NOT_EXIST | If there's no connected component. |
|
inlinestatic |
Retrieve total data processed by component.
| [in] | dev | Component device. |
| [in] | stream_no | Stream index. |
| [in] | input | True for input data, false for output data. |
|
inlinestatic |
Initialize common part of a component device.
| [in] | drv | Parent component driver. |
| [in,out] | dev | Component device. |
| [in] | bytes | Size of the component device in bytes. |
| void comp_init_performance_data | ( | struct comp_dev * | dev | ) |
Initialize performance data fields if component has assigned slot in measurement window.
| [in,out] | dev | Component to init. |
|
inlinestatic |
Send bind message to component on remote core (IPC4).
| [in,out] | dev | Component device. |
| [in] | bind_data | Binding information. |
|
inlinestatic |
Retrieve component attribute from a remote core (IPC4).
| [in,out] | dev | Component device. |
| [in] | type | Attribute type (COMP_ATTR_*). |
| [out] | value | Pointer to buffer where attribute value is copied. |
|
inlinestatic |
Send unbind message to component on remote core (IPC4).
| [in,out] | dev | Component device. |
| [in] | unbind_data | Unbinding information. |
|
inlinestatic |
Checks if component device is active.
| [in] | current | Component device. |
|
inlinestatic |
Called to check whether component schedules its pipeline.
| [in] | dev | Component device. |
|
inlinestatic |
Checks if two component devices belong to the same parent pipeline.
| [in] | current | Component device. |
| [in] | previous | Another component device. |
|
inlinestatic |
Called to mark component as shared between cores.
| [in,out] | dev | Component device. |
|
inlinestatic |
Module adapter associated with a component.
| [in] | dev | Component device. |
| struct comp_dev * comp_new | ( | struct sof_ipc_comp * | comp | ) |
Instantiate a new component device from IPC3 descriptor.
| [in] | comp | IPC3 component descriptor. |
|
inlinestatic |
Called by component device when overrun is detected.
| [in,out] | dev | Component device. |
| [in] | sink | Sink buffer. |
| [in] | copy_bytes | Requested size of free space in bytes. |
|
inlinestatic |
Configure audio stream parameters for component device.
| [in,out] | dev | Component device. |
| [in,out] | params | Audio (PCM) stream parameters to configure. |
|
inlinestatic |
Parameter initialization for component on remote core.
| [in,out] | dev | Component device. |
| [in] | params | Stream parameters to be set. |
|
inlinestatic |
Retrieve stream position from component.
| [in,out] | dev | Component device. |
| [out] | posn | Stream position structure to populate. |
|
inlinestatic |
Prepare component device for streaming (local or remote).
| [in,out] | dev | Component device. |
|
inlinestatic |
Run prepare command on remote core for target component.
| [in,out] | dev | Component device. |
| int comp_register | ( | struct comp_driver_info * | drv | ) |
Registers the component driver on the list of available components.
| [in,out] | drv | Component driver to be registered. |
|
inlinestatic |
Reset component and free runtime resources (local or remote).
| [in,out] | dev | Component device. |
|
inlinestatic |
Run reset command on remote core for target component.
| [in,out] | dev | Component device. |
|
inlinestatic |
Returns true if the component's pipeline matches the specified direction.
| [in] | comp | Component device. |
| [in] | dir | Stream direction (SOF_IPC_STREAM_PLAYBACK or SOF_IPC_STREAM_CAPTURE). |
| int comp_set_adapter_ops | ( | const struct comp_driver * | drv, |
| const struct module_interface * | ops | ||
| ) |
Set adapter ops for a dynamically created driver.
| [in,out] | drv | Component driver to update. |
| [in] | ops | Module interface operations. |
|
inlinestatic |
Set component attribute.
| [in,out] | dev | Component device. |
| [in] | type | Attribute type (COMP_ATTR_*). |
| [in] | value | Pointer to attribute value to set. |
| int comp_set_state | ( | struct comp_dev * | dev, |
| int | cmd | ||
| ) |
Component state transition handling.
| [in,out] | dev | Component device. |
| [in] | cmd | Command, one of COMP_TRIGGER_... |
This function should be called by a component implementation at the beginning of its state transition to verify whether the trigger is valid in the current state and abort the transition otherwise.
Typically the COMP_STATE_READY as the initial state is set directly by the component's implementation of _new().
COMP_TRIGGER_PREPARE is called from the component's prepare().
COMP_TRIGGER_START/STOP is called from trigger().
COMP_TRIGGER_RESET is called from reset().
|
inlinestatic |
Dispatch trigger command to component (local or remote).
| [in,out] | dev | Component device. |
| [in] | cmd | Trigger command (COMP_TRIGGER_*). |
|
inlinestatic |
Run trigger command locally on current core for target component.
| [in,out] | dev | Component device. |
| [in] | cmd | Trigger command (COMP_TRIGGER_*). |
|
inlinestatic |
Run trigger command on remote core for target component.
| [in,out] | dev | Component device. |
| [in] | cmd | Trigger command (COMP_TRIGGER_*). |
Unbind component from downstream/upstream component or buffer.
| [in,out] | dev | Component device. |
| [in] | unbind_data | Unbinding information. |
|
inlinestatic |
Called by the component device when underrun is detected.
| [in,out] | dev | Component device. |
| [in] | source | Source buffer. |
| [in] | copy_bytes | Requested size of data in bytes. |
| void comp_unregister | ( | struct comp_driver_info * | drv | ) |
Unregisters the component driver from the list of available components.
| [in,out] | drv | Component driver to be unregistered. |
| void comp_update_ibs_obs_cpc | ( | struct comp_dev * | dev | ) |
Update IBS, OBS, CPC, LL chunk size for component.
| [in,out] | dev | Component to update. |
| bool comp_update_performance_data | ( | struct comp_dev * | dev, |
| uint32_t | cycles_used | ||
| ) |
Update performance data entry for component and check for budget violation.
| [in,out] | dev | Component to update. |
| [in] | cycles_used | Execution time. |
| int comp_verify_params | ( | struct comp_dev * | dev, |
| uint32_t | flag, | ||
| struct sof_ipc_stream_params * | params | ||
| ) |
Verify and set component audio parameters.
Called by component in params() function in order to set and update some of downstream (playback) or upstream (capture) buffer parameters with PCM parameters.
| [in,out] | dev | Component device. |
| [in] | flag | Specifies which parameter should not be updated. |
| [in,out] | params | PCM stream parameters. |
|
inlinestatic |
Set component period frames based on sample rate and period.
| [in,out] | current | Target component device. |
| [in] | rate | Sample rate in Hz. |
|
inlinestatic |
Retrieves Component ID from device.
| [in] | dev | Component device. |
|
inlinestatic |
Retrieves Component pipeline ID from device.
| [in] | dev | Component device. |
|
inlinestatic |
Retrieves component type from device.
| [in] | dev | Component device. |
| void sys_comp_dai_init | ( | void | ) |
| void sys_comp_host_init | ( | void | ) |
| void sys_comp_init | ( | struct sof * | sof | ) |
Allocates and initializes audio component list.
To be called once at boot time.
| [in,out] | sof | SOF global system context. |
| void sys_comp_kpb_init | ( | void | ) |
| void sys_comp_module_aria_interface_init | ( | void | ) |
| void sys_comp_module_asrc_interface_init | ( | void | ) |
| void sys_comp_module_copier_interface_init | ( | void | ) |
| void sys_comp_module_crossover_interface_init | ( | void | ) |
| void sys_comp_module_dcblock_interface_init | ( | void | ) |
| void sys_comp_module_demux_interface_init | ( | void | ) |
| void sys_comp_module_dolby_dax_audio_processing_interface_init | ( | void | ) |
| void sys_comp_module_drc_interface_init | ( | void | ) |
| void sys_comp_module_dts_interface_init | ( | void | ) |
| void sys_comp_module_eq_fir_interface_init | ( | void | ) |
| void sys_comp_module_eq_iir_interface_init | ( | void | ) |
| void sys_comp_module_gain_interface_init | ( | void | ) |
| void sys_comp_module_google_ctc_audio_processing_interface_init | ( | void | ) |
| void sys_comp_module_google_rtc_audio_processing_interface_init | ( | void | ) |
| void sys_comp_module_igo_nr_interface_init | ( | void | ) |
| void sys_comp_module_level_multiplier_interface_init | ( | void | ) |
| void sys_comp_module_mfcc_interface_init | ( | void | ) |
| void sys_comp_module_mixer_interface_init | ( | void | ) |
| void sys_comp_module_mixin_interface_init | ( | void | ) |
| void sys_comp_module_mixout_interface_init | ( | void | ) |
| void sys_comp_module_multiband_drc_interface_init | ( | void | ) |
| void sys_comp_module_mux_interface_init | ( | void | ) |
| void sys_comp_module_nxp_eap_interface_init | ( | void | ) |
| void sys_comp_module_phase_vocoder_interface_init | ( | void | ) |
| void sys_comp_module_rtnr_interface_init | ( | void | ) |
| void sys_comp_module_selector_interface_init | ( | void | ) |
| void sys_comp_module_sound_dose_interface_init | ( | void | ) |
| void sys_comp_module_src_interface_init | ( | void | ) |
| void sys_comp_module_src_lite_interface_init | ( | void | ) |
| void sys_comp_module_stft_process_interface_init | ( | void | ) |
| void sys_comp_module_tdfb_interface_init | ( | void | ) |
| void sys_comp_module_template_interface_init | ( | void | ) |
| void sys_comp_module_tester_interface_init | ( | void | ) |
| void sys_comp_module_tone_interface_init | ( | void | ) |
| void sys_comp_module_volume_interface_init | ( | void | ) |
| void sys_comp_selector_init | ( | void | ) |
|
inlinestatic |
Get memory region flag for component buffer allocations.
| [in] | drv | Component driver pointer. |