SDMA support for SAI in iMX6 SoloX

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

SDMA support for SAI in iMX6 SoloX

1,825 Views
mahad_saleem
Contributor II

Hi, I have been trying to add support for SDMA in the SAI driver for iMX6SX. I am using the SAI1 interface for TX of audio data. The SAI driver is functional with interrupts mechanism of transfers and i can successfully play the sound through the CODEC attached on SAI1. 

I have verified the SDMA driver memory to peripheral transfers for UART2 using the mcu_2_app SDMA script and it is working flawlessly. 

BUT, whenever i try to send data through SAI1 by SDMA, i get no output. I have verified my configuration and everything seems to be fine. As mentioned in the Reference Manual, SAI1 TX DMA event number is 32 is Controlled by IOMUXC register GPR0[16] . I have configured it too. Moreover, the FRDE bit in I2S1_TCSR is set in order to generate FIFO request DMA events and the FRIE bit in I2S1_TCSR is reset in order to disable FIFO request interrupts. 

Is there any additional configuration in order to make SDMA work with SAI that i am missing? Any help regarding this is appreciated. Thanks!

Labels (2)
Tags (3)
4 Replies

1,718 Views
igorpadykov
NXP Employee
NXP Employee

Hi Mahad

sai has sdma support in nxp linux releases from

source.codeaurora.org/external/imx/linux-imx  repository

imx6sx.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Linux 5.4.3_1.0.0 Documentation

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,718 Views
mahad_saleem
Contributor II

Thanks igorpadykov‌ ! I went through the NXP linux releases you mentioned above but i cannot find the implementation for SAI. The DTS files do have an entry for SAI but i cannot find the implementation. Can you refer me to the driver in the source tree? 

Moreover, Linux sources do have implementation for SAI here :linux/fsl_sai.c at master · torvalds/linux · GitHub  but it uses EDMA instead of SDMA. 

0 Kudos

1,719 Views
igorpadykov
NXP Employee
NXP Employee

mainline linux is not supported by nxp, please refer to sai driver from

source.codeaurora.org/external/imx/linux-imx  repository

fsl_sai.c\fsl\soc\sound - linux-imx - i.MX Linux kernel 

pastedImage_2.jpg

Best regards
igor

1,719 Views
mahad_saleem
Contributor II

Thanks igorpadykov‌! linux-imx repo along with IMX6SUL SDK from here helped me solve my problem.

0 Kudos