From 2bdb4289211dd2973d15bd74affd798d2371ef26 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Thu, 8 Feb 2024 11:51:43 +0200 Subject: [PATCH] ipc3: dai: change channel decoding function for native SAI and ESAI The native SAI and ESAI drivers use a different handshake encoding. As such, when using native Zephyr drivers use a different function for decoding the channel from the handshake. Signed-off-by: Laurentiu Mihalcea --- src/ipc/ipc3/dai.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ipc/ipc3/dai.c b/src/ipc/ipc3/dai.c index 697b00c960ca..8586dc779cff 100644 --- a/src/ipc/ipc3/dai.c +++ b/src/ipc/ipc3/dai.c @@ -63,7 +63,12 @@ int dai_config_dma_channel(struct dai_data *dd, struct comp_dev *dev, const void case SOF_DAI_IMX_ESAI: handshake = dai_get_handshake(dd->dai, dai->direction, dd->stream_id); +/* TODO: remove this when transition to native drivers is complete on all NXP platforms */ +#ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS channel = EDMA_HS_GET_CHAN(handshake); +#else + channel = handshake & GENMASK(7, 0); +#endif /* CONFIG_ZEPHYR_NATIVE_DRIVERS */ break; case SOF_DAI_IMX_MICFIL: channel = dai_get_handshake(dd->dai, dai->direction,