IMX8MN SPDIF to ASRC SDMA transfers support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MN SPDIF to ASRC SDMA transfers support

51 Views
emontmasson
Contributor I

Hello,

I am trying to use an S/PDIF device with an ASRC on an IMX8MN evaluation board, but I encountered some difficulties regarding sample transfers between both devices.

I am using a mainline linux RT v6.1.26-rt8, for which I have adapted the audio machine driver "fsl-asoc-card.c" to accept the S/PDIF CPU DAI driver. The corresponding patch series can be found here : https://marc.info/?l=linux-sound&m=171578151324302&w=2

My problem is when I start an audio playback on the S/PDIF device which uses the ASRC as backend, I observe with an S/PDIF -> I2S converter that all my samples were put only on the right S/PDIF channel. When not using the ASRC backend, both channels correctly receive their samples.

As the S/PDIF has 2 FIFOs, one for each channel, I checked if the SDMA driver supported this case, and so I have a few questions about it.

For what I see, there is already support for the S/PDIF double FIFO in `imx-sdma.c`.
Is the support for S/PDIF <-> ASRC SDMA transfers completely supported on IMX8MN?

I observed that in the function `sdma_get_pc()` of `imx-sdma.c` there is no `per_2_per` (which I understand as peripheral to peripheral) script for `IMX_DMATYPE_SPDIF`. Does this means that there is no SDMA script for data transfer between S/PDIF or ASRC?

Also, I see in `imx-sdma.c` that the p_2_p watermark level has a specific bit for S/PDIF, 'SDMA_WATERMARK_LEVEL_SPDIF', which is never used is the driver. Should it be set for the S/PDIF <-> ASRC transfer to correctly work?

Are there specific parameters to be set on sdma channels via DT or in drivers when doing S/PDIF <-> ASRC SDMA data transfers?

Regards.

Labels (1)
0 Kudos
0 Replies