Skip to content

Commit

Permalink
ipc3: dai: change channel decoding function for native SAI and ESAI
Browse files Browse the repository at this point in the history
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 <laurentiu.mihalcea@nxp.com>
  • Loading branch information
LaurentiuM1234 committed Mar 6, 2024
1 parent 4812a9c commit 2bdb428
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ipc/ipc3/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2bdb428

Please sign in to comment.