DAI Drivers API¶
- group sof_dai_drivers
DAI Drivers API specification.
Defines
-
DAI_CREAT¶
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
-
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.
- Parameters:
group_id – [in] Group ID
flags – [in] Flags (CREATE)
-
void dai_group_put(struct dai_group *group)¶
API to release DAI group.
Decrements the DAI counter inside the group.
- Parameters:
group – [in] Group
-
static inline int dai_init(struct sof *sof)¶
API to initialize a platform DAI.
- Parameters:
sof – [in] Pointer to firmware main context.
-
struct dai *dai_get(uint32_t type, uint32_t index, uint32_t flags)¶
API to request a platform DAI.
- Parameters:
type – [in] Type of requested DAI.
index – [in] Index of requested DAI.
flags – [in] Flags (CREATE)
-
int dai_set_config(struct dai *dai, struct ipc_config_dai *config, const void *spec_config)¶
Digital Audio interface formatting.
-
int dai_get_handshake(struct dai *dai, int direction, int stream_id)¶
Get Digital Audio interface DMA Handshake.
-
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.
-
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.
-
const struct device *dai_get_device(uint32_t type, uint32_t index)¶
Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index.
-
struct dai¶
- #include <dai-zephyr.h>
-
union hdalink_cfg¶
- #include <dai-zephyr.h>
-
struct dai_group¶
- #include <dai-zephyr.h>
DAI group information.
-
struct llp_slot_info¶
- #include <dai-zephyr.h>
llp slot info for memory window
-
struct dai_data¶
- #include <dai-zephyr.h>
DAI runtime data.
Public Members
-
struct dma_chan_data *chan¶
-
uint32_t stream_id¶
-
struct dma_sg_config config¶
-
struct dma_config *z_config¶
-
struct comp_buffer *dma_buffer¶
-
struct comp_buffer *local_buffer¶
-
struct dai_ts_cfg ts_config¶
-
int xrun¶
-
pcm_converter_func process¶
-
uint32_t chmap¶
-
channel_copy_func channel_copy¶
-
uint32_t period_bytes¶
-
uint64_t total_data_processed¶
-
struct ipc_config_dai ipc_config¶
-
void *dai_spec_config¶
-
uint64_t wallclock¶
-
bool delayed_dma_stop¶
-
struct llp_slot_info slot_info¶
-
bool fast_mode¶
-
struct dma_chan_data *chan¶
-
DAI_CREAT¶