|
Sound Open Firmware
|
DAI Drivers API specification. More...
Data Structures | |
| struct | dai |
| union | hdalink_cfg |
| struct | dai_group |
| DAI group information. More... | |
| struct | llp_slot_info |
| llp slot info for memory window More... | |
| struct | dai_data |
| DAI runtime data. More... | |
Macros | |
| #define | DAI_CREAT BIT(0) |
| If the device does not exist it will be created. | |
Typedefs | |
| typedef int(* | channel_copy_func) (const struct audio_stream *src, unsigned int src_channel, struct audio_stream *dst, unsigned int dst_channel, unsigned int frames) |
Functions | |
| static void | dai_write (struct dai *dai, uint32_t reg, uint32_t value) |
| static uint32_t | dai_read (struct dai *dai, uint32_t reg) |
| static void | dai_update_bits (struct dai *dai, uint32_t reg, uint32_t mask, uint32_t value) |
| struct dai_group * | dai_group_get (uint32_t group_id, uint32_t flags) |
| API to request DAI group. | |
| void | dai_group_put (struct dai_group *group) |
| API to release DAI group. | |
| static int | dai_init (struct sof *sof) |
| API to initialize a platform DAI. | |
| struct dai * | dai_get (uint32_t type, uint32_t index, uint32_t flags) |
| API to request a platform DAI. | |
| void | dai_put (struct dai *dai) |
| API to release a platform DAI. | |
| int | dai_set_config (struct dai *dai, struct ipc_config_dai *config, const void *spec_config, size_t size) |
| Digital Audio interface formatting. | |
| int | dai_get_handshake (struct dai *dai, int direction, int stream_id) |
| Get Digital Audio interface DMA Handshake. | |
| int | dai_get_fifo_depth (struct dai *dai, int direction) |
| Get Digital Audio interface fifo depth. | |
| uint32_t | dai_get_init_delay_ms (struct dai *dai) |
| Get DAI initial delay in milliseconds. | |
| int | dai_get_stream_id (struct dai *dai, int direction) |
| Get DAI stream id. | |
| int | dai_config_dma_channel (struct dai_data *dd, struct comp_dev *dev, const void *config) |
| Configure DMA channel for DAI. | |
| void | dai_set_link_hda_config (uint16_t *link_config, struct ipc_config_dai *common_config, const void *spec_config) |
| Configure HD Audio DMA params for DAI. | |
| void | dai_dma_release (struct dai_data *dd, struct comp_dev *dev) |
| Reset DAI DMA config. | |
| int | dai_config (struct dai_data *dd, struct comp_dev *dev, struct ipc_config_dai *common_cfg, const void *spec_cfg) |
| Configure DAI physical interface. | |
| int | dai_assign_group (struct dai_data *dd, struct comp_dev *dev, uint32_t group_id) |
| Assign DAI to a group for simultaneous triggering. | |
| int | dai_position (struct comp_dev *dev, struct sof_ipc_stream_posn *posn) |
| dai position for host driver. | |
| void | dai_dma_position_update (struct dai_data *dd, struct comp_dev *dev) |
| update dai dma position for host driver. | |
| void | dai_release_llp_slot (struct dai_data *dd) |
| release llp slot | |
| __syscall const struct device * | dai_get_device (enum sof_ipc_dai_type type, uint32_t index) |
| Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index. | |
| const struct device ** | dai_get_device_list (size_t *count) |
| Retrieve the list of all DAI devices. | |
DAI Drivers API specification.
| #define DAI_CREAT BIT(0) |
If the device does not exist it will be created.
| typedef int(* channel_copy_func) (const struct audio_stream *src, unsigned int src_channel, struct audio_stream *dst, unsigned int dst_channel, unsigned int frames) |
Assign DAI to a group for simultaneous triggering.
| int dai_config | ( | struct dai_data * | dd, |
| struct comp_dev * | dev, | ||
| struct ipc_config_dai * | common_cfg, | ||
| const void * | spec_cfg ) |
Configure DAI physical interface.
Configure DMA channel for DAI.
update dai dma position for host driver.
| struct dai * dai_get | ( | uint32_t | type, |
| uint32_t | index, | ||
| uint32_t | flags ) |
API to request a platform DAI.
| [in] | type | Type of requested DAI. |
| [in] | index | Index of requested DAI. |
| [in] | flags | Flags (CREATE) |
| __syscall const struct device * dai_get_device | ( | enum sof_ipc_dai_type | type, |
| uint32_t | index ) |
Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index.
| const struct device ** dai_get_device_list | ( | size_t * | count | ) |
Retrieve the list of all DAI devices.
| count | Pointer to store the number of devices in the list. |
| int dai_get_fifo_depth | ( | struct dai * | dai, |
| int | direction ) |
Get Digital Audio interface fifo depth.
| int dai_get_handshake | ( | struct dai * | dai, |
| int | direction, | ||
| int | stream_id ) |
Get Digital Audio interface DMA Handshake.
| uint32_t dai_get_init_delay_ms | ( | struct dai * | dai | ) |
Get DAI initial delay in milliseconds.
| int dai_get_stream_id | ( | struct dai * | dai, |
| int | direction ) |
Get DAI stream id.
| struct dai_group * dai_group_get | ( | uint32_t | group_id, |
| uint32_t | flags ) |
API to request DAI group.
Returns a DAI group for the given ID and increments the counter of DAIs in the group.
If a group for the given ID doesn't exist, it will either return NULL or allocate a new group structure if the CREATE flag is supplied.
| [in] | group_id | Group ID |
| [in] | flags | Flags (CREATE) |
| void dai_group_put | ( | struct dai_group * | group | ) |
API to release DAI group.
Decrements the DAI counter inside the group.
| [in] | group | Group |
|
inlinestatic |
API to initialize a platform DAI.
| [in] | sof | Pointer to firmware main context. |
| int dai_position | ( | struct comp_dev * | dev, |
| struct sof_ipc_stream_posn * | posn ) |
dai position for host driver.
| void dai_put | ( | struct dai * | dai | ) |
API to release a platform DAI.
| [in] | dai | DAI to relese. |
|
inlinestatic |
| void dai_release_llp_slot | ( | struct dai_data * | dd | ) |
release llp slot
| int dai_set_config | ( | struct dai * | dai, |
| struct ipc_config_dai * | config, | ||
| const void * | spec_config, | ||
| size_t | size ) |
Digital Audio interface formatting.
| void dai_set_link_hda_config | ( | uint16_t * | link_config, |
| struct ipc_config_dai * | common_config, | ||
| const void * | spec_config ) |
Configure HD Audio DMA params for DAI.
|
inlinestatic |
|
inlinestatic |