Sound Open Firmware
Loading...
Searching...
No Matches
Component Mgmt API

Data Structures

struct  comp_driver_list
 Holds list of registered components' drivers. More...

Macros

#define comp_buffer_list(comp, dir)
 Retrieves the component device buffer list.

Functions

static void comp_free (struct comp_dev *dev)
 See comp_ops::new.
static int comp_params_remote (struct comp_dev *dev, struct sof_ipc_stream_params *params)
 Parameter init for component on other core.
static int comp_params (struct comp_dev *dev, struct sof_ipc_stream_params *params)
 See comp_ops::params.
static int comp_dai_get_hw_params (struct comp_dev *dev, struct sof_ipc_stream_params *params, int dir)
 See comp_ops::dai_get_hw_params.
static int comp_trigger_remote (struct comp_dev *dev, int cmd)
 Runs comp_ops::trigger on the core the target component is assigned to.
static int comp_trigger_local (struct comp_dev *dev, int cmd)
static int comp_trigger (struct comp_dev *dev, int cmd)
 See comp_ops::trigger.
static int comp_prepare_remote (struct comp_dev *dev)
 Runs comp_ops::prepare on the target component's core.
static int comp_prepare (struct comp_dev *dev)
 See comp_ops::prepare.
int comp_copy (struct comp_dev *dev)
static int comp_get_attribute (struct comp_dev *dev, uint32_t type, void *value)
 See comp_ops::get_attribute.
static int comp_set_attribute (struct comp_dev *dev, uint32_t type, void *value)
 See comp_ops::set_attribute.
static int comp_reset_remote (struct comp_dev *dev)
 Runs comp_ops::reset on the target component's core.
static int comp_reset (struct comp_dev *dev)
 Component reset and free runtime resources.
static 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.
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_bind (struct comp_dev *dev, const struct bind_info *bind_data)
static int comp_unbind (struct comp_dev *dev, const struct bind_info *unbind_data)
static uint64_t comp_get_total_data_processed (struct comp_dev *dev, uint32_t stream_no, bool input)
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.

Detailed Description

Macro Definition Documentation

◆ comp_buffer_list

#define comp_buffer_list ( comp,
dir )
Value:
((dir) == PPL_DIR_DOWNSTREAM ? &(comp)->bsink_list : \
&(comp)->bsource_list)
#define PPL_DIR_DOWNSTREAM
Definition pipeline.h:49

Retrieves the component device buffer list.

Function Documentation

◆ comp_bind()

int comp_bind ( struct comp_dev * dev,
const struct bind_info * bind_data )
inlinestatic

◆ comp_copy()

int comp_copy ( struct comp_dev * dev)

◆ comp_dai_get_hw_params()

int comp_dai_get_hw_params ( struct comp_dev * dev,
struct sof_ipc_stream_params * params,
int dir )
inlinestatic

◆ comp_drivers_get()

struct comp_driver_list * comp_drivers_get ( void )
inlinestatic

Get the global component driver list.

Returns
Pointer to the component driver list.

◆ comp_free()

void comp_free ( struct comp_dev * dev)
inlinestatic

See comp_ops::new.

See comp_ops::free

◆ comp_get_attribute()

int comp_get_attribute ( struct comp_dev * dev,
uint32_t type,
void * value )
inlinestatic

◆ comp_get_endpoint_type()

int comp_get_endpoint_type ( struct comp_dev * dev)
inlinestatic

Returns endpoint type of given component.

Parameters
devComponent device
Returns
Endpoint type, one of comp_endpoint_type.

◆ comp_get_requested_state()

int comp_get_requested_state ( int cmd)
inlinestatic

Returns component state based on requested command.

Parameters
cmdRequest command.
Returns
Component state.

◆ comp_get_total_data_processed()

uint64_t comp_get_total_data_processed ( struct comp_dev * dev,
uint32_t stream_no,
bool input )
inlinestatic

◆ comp_is_active()

int comp_is_active ( struct comp_dev * current)
inlinestatic

Checks if component device is active.

Parameters
currentComponent device.
Returns
1 if active, 0 otherwise.

◆ comp_is_scheduling_source()

bool comp_is_scheduling_source ( struct comp_dev * dev)
inlinestatic

Called to check whether component schedules its pipeline.

Parameters
devComponent device.
Returns
True if this is scheduling component, false otherwise.

◆ comp_is_single_pipeline()

int comp_is_single_pipeline ( struct comp_dev * current,
struct comp_dev * previous )
inlinestatic

Checks if two component devices belong to the same parent pipeline.

Parameters
currentComponent device.
previousAnother component device.
Returns
1 if children of the same pipeline, 0 otherwise.

◆ comp_make_shared()

void comp_make_shared ( struct comp_dev * dev)
inlinestatic

Called to mark component as shared between cores.

Parameters
devComponent device.

◆ comp_params()

int comp_params ( struct comp_dev * dev,
struct sof_ipc_stream_params * params )
inlinestatic

◆ comp_params_remote()

int comp_params_remote ( struct comp_dev * dev,
struct sof_ipc_stream_params * params )
inlinestatic

Parameter init for component on other core.

Parameters
devComponent device.
paramsParameters to be set.
Returns
0 if succeeded, error code otherwise.

◆ comp_position()

int comp_position ( struct comp_dev * dev,
struct sof_ipc_stream_posn * posn )
inlinestatic

◆ comp_prepare()

int comp_prepare ( struct comp_dev * dev)
inlinestatic

◆ comp_prepare_remote()

int comp_prepare_remote ( struct comp_dev * dev)
inlinestatic

Runs comp_ops::prepare on the target component's core.

◆ comp_reset()

int comp_reset ( struct comp_dev * dev)
inlinestatic

Component reset and free runtime resources.

Parameters
devComponent device.
Returns
0 if succeeded, error code otherwise.

◆ comp_reset_remote()

int comp_reset_remote ( struct comp_dev * dev)
inlinestatic

Runs comp_ops::reset on the target component's core.

◆ comp_same_dir()

bool comp_same_dir ( struct comp_dev * comp,
enum sof_ipc_stream_direction dir )
inlinestatic

Returns true if the component's pipeline matches the specified direction.

◆ comp_set_attribute()

int comp_set_attribute ( struct comp_dev * dev,
uint32_t type,
void * value )
inlinestatic

◆ comp_trigger()

int comp_trigger ( struct comp_dev * dev,
int cmd )
inlinestatic

◆ comp_trigger_local()

int comp_trigger_local ( struct comp_dev * dev,
int cmd )
inlinestatic

◆ comp_trigger_remote()

int comp_trigger_remote ( struct comp_dev * dev,
int cmd )
inlinestatic

Runs comp_ops::trigger on the core the target component is assigned to.

◆ comp_unbind()

int comp_unbind ( struct comp_dev * dev,
const struct bind_info * unbind_data )
inlinestatic

◆ sys_comp_init()

void sys_comp_init ( struct sof * sof)

Allocates and initializes audio component list.

To be called once at boot time.