Component API Ext¶
Location: include/sof/audio/component_ext.h
- group component_api_helpers
Defines
-
comp_buffer_list(comp, dir)¶
Retrieves the component device buffer list.
Functions
-
static inline void comp_free(struct comp_dev *dev)¶
See comp_ops::new.
See comp_ops::free
-
static inline int comp_params_remote(struct comp_dev *dev, struct sof_ipc_stream_params *params)¶
Parameter init for component on other core.
- Parameters:
dev – Component device.
params – Parameters to be set.
- Returns:
0 if succeeded, error code otherwise.
-
static inline int comp_params(struct comp_dev *dev, struct sof_ipc_stream_params *params)¶
See comp_ops::params.
-
static inline int comp_dai_get_hw_params(struct comp_dev *dev, struct sof_ipc_stream_params *params, int dir)¶
-
static inline int comp_trigger_remote(struct comp_dev *dev, int cmd)¶
Runs comp_ops::trigger on the core the target component is assigned to.
-
static inline int comp_trigger(struct comp_dev *dev, int cmd)¶
See comp_ops::trigger.
-
static inline int comp_prepare_remote(struct comp_dev *dev)¶
Runs comp_ops::prepare on the target component’s core.
-
static inline int comp_prepare(struct comp_dev *dev)¶
See comp_ops::prepare.
-
static inline int comp_reset_remote(struct comp_dev *dev)¶
Runs comp_ops::reset on the target component’s core.
-
static inline int comp_reset(struct comp_dev *dev)¶
Component reset and free runtime resources.
- Parameters:
dev – Component device.
- Returns:
0 if succeeded, error code otherwise.
-
static inline int comp_position(struct comp_dev *dev, struct sof_ipc_stream_posn *posn)¶
See comp_ops::position.
-
void sys_comp_init(struct sof *sof)¶
Allocates and initializes audio component list.
To be called once at boot time.
-
static inline int comp_is_single_pipeline(struct comp_dev *current, struct comp_dev *previous)¶
Checks if two component devices belong to the same parent pipeline.
- Parameters:
current – Component device.
previous – Another component device.
- Returns:
1 if children of the same pipeline, 0 otherwise.
-
static inline int comp_is_active(struct comp_dev *current)¶
Checks if component device is active.
- Parameters:
current – Component device.
- Returns:
1 if active, 0 otherwise.
-
static inline int comp_get_requested_state(int cmd)¶
Returns component state based on requested command.
- Parameters:
cmd – Request command.
- Returns:
Component state.
-
static inline int comp_get_endpoint_type(struct comp_dev *dev)¶
Returns endpoint type of given component.
- Parameters:
dev – Component device
- Returns:
Endpoint type, one of comp_endpoint_type.
-
static inline bool comp_is_scheduling_source(struct comp_dev *dev)¶
Called to check whether component schedules its pipeline.
- Parameters:
dev – Component device.
- Returns:
True if this is scheduling component, false otherwise.
Called to mark component as shared between cores.
- Parameters:
dev – Component device.
-
static inline struct comp_driver_list *comp_drivers_get(void)¶
-
struct comp_driver_list¶
- #include <component_ext.h>
Holds list of registered components’ drivers.
-
comp_buffer_list(comp, dir)¶