diff --git a/src/include/sof/lib/dai-zephyr.h b/src/include/sof/lib/dai-zephyr.h index 98e174a43c8d..03056aa42553 100644 --- a/src/include/sof/lib/dai-zephyr.h +++ b/src/include/sof/lib/dai-zephyr.h @@ -282,6 +282,11 @@ void dai_dma_position_update(struct dai_data *dd, struct comp_dev *dev); * \brief release llp slot */ void dai_release_llp_slot(struct dai_data *dd); + +/** + * \brief Retrieve a pointer to the Zephyr device structure for a DAI of a given type and index. + */ +const struct device *dai_get_device(uint32_t type, uint32_t index); /** @}*/ #endif /* __SOF_LIB_DAI_ZEPHYR_H__ */ diff --git a/src/lib/dai.c b/src/lib/dai.c index 143047aebc4d..213ad8783423 100644 --- a/src/lib/dai.c +++ b/src/lib/dai.c @@ -253,6 +253,12 @@ void dai_put(struct dai *dai) rfree(dai); } + +const struct device *dai_get_device(uint32_t type, uint32_t index) +{ + return dai_get_zephyr_device(type, index); +} + #else static inline const struct dai_type_info *dai_find_type(uint32_t type) {