|
Sound Open Firmware
|
Data Structures | |
| struct | comp_copy_limits |
| Struct for use with comp_get_copy_limits() function. More... | |
Macros | |
| #define | comp_set_drvdata(c, data) |
| Assigns private data to component device. | |
| #define | comp_get_drvdata(c) |
| Retrieves driver private data from component device. | |
| #define | DECLARE_MODULE(init) |
| Usage at the end of an independent module file: DECLARE_MODULE(sys_*_init);. | |
Functions | |
| 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. | |
| int | comp_set_state (struct comp_dev *dev, int cmd) |
| Component state set. | |
| static void | component_set_nearest_period_frames (struct comp_dev *current, uint32_t rate) |
| 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 (data available in source vs. | |
| 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 (data available in source vs. | |
| 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) |
| helper, 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) |
| helper, 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) |
| Warning: duplicate declaration in topology.h. | |
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. | |
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. | |
| #define comp_get_drvdata | ( | c | ) |
Retrieves driver private data from component device.
| c | Component device. |
| #define comp_set_drvdata | ( | c, | |
| data ) |
| #define DECLARE_MODULE | ( | init | ) |
Usage at the end of an independent module file: DECLARE_MODULE(sys_*_init);.
|
inlinestatic |
Allocates memory for the component device and initializes common part.
| drv | Parent component driver. |
| bytes | Size of the component device in bytes. |
|
inlinestatic |
helper, provide state of a component connected to a buffer as a data consumer
| buffer | a buffer to be checked |
| COMP_STATE_NOT_EXIST | if there's no connected component |
|
inlinestatic |
helper, provide state of a component connected to a buffer as a data provider
| buffer | a buffer to be checked |
| COMP_STATE_NOT_EXIST | if there's no connected component |
|
inlinestatic |
Frees memory allocated for component device.
This is a counterpart to comp_alloc() and not to be confused with comp_free().
| dev | Pointer to the component device. |
| 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 (data available in source vs.
free space available in sink).
| [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 (data available in source vs.
free space available in sink).
| [in] | source | Buffer of source. |
| [in] | sink | Buffer of sink. |
| [out] | cl | Current copy limits. |
|
inlinestatic |
Get component state.
| dev | Component from which user wants to read status. |
| COMP_STATE_NOT_EXIST | if there's no connected component |
|
inlinestatic |
Initialize common part of a component device.
| drv | Parent component driver. |
| dev | Device. |
| bytes | Size of the component device in bytes. |
|
inlinestatic |
Module adapter associated with a component.
| dev | Component device |
|
inlinestatic |
Called by component device when overrun is detected.
| dev | Component device. |
| sink | Sink buffer. |
| copy_bytes | Requested size of free space to be available. |
| int comp_register | ( | struct comp_driver_info * | drv | ) |
Registers the component driver on the list of available components.
| drv | Component driver to be registered. |
| int comp_set_adapter_ops | ( | const struct comp_driver * | drv, |
| const struct module_interface * | ops ) |
Set adapter ops for a dynamically created driver.
| drv | Component driver to update. |
| ops | Module interface operations. |
| int comp_set_state | ( | struct comp_dev * | dev, |
| int | cmd ) |
Component state set.
| dev | Component device. |
| 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 |
Called by the component device when underrun is detected.
| dev | Component device. |
| source | Source buffer. |
| copy_bytes | Requested size of data to be available. |
| void comp_unregister | ( | struct comp_driver_info * | drv | ) |
Unregisters the component driver from the list of available components.
| drv | Component driver to be unregistered. |
| int comp_verify_params | ( | struct comp_dev * | dev, |
| uint32_t | flag, | ||
| struct sof_ipc_stream_params * | params ) |
Warning: duplicate declaration in topology.h.
Called by component in params() function in order to set and update some of downstream (playback) or upstream (capture) buffer parameters with pcm parameters. There is a possibility to specify which of parameters won't be overwritten (e.g. SRC component should not overwrite rate parameter, because it is able to change it).
| dev | Component device |
| flag | Specifies which parameter should not be updated |
| params | pcm params |
|
inlinestatic |
|
inlinestatic |
Retrieves Component id from device.
| dev | Device. |
|
inlinestatic |
Retrieves Component pipeline id from device.
| dev | Device. |
|
inlinestatic |
Retrieves component type from device.
| dev | Device. |