AnsweredAssumed Answered

IMX6Q SDMA issue when porting Android 7.1.1

Question asked by Star Ying on Jul 3, 2017
Latest reply on Jul 4, 2017 by 超 付

Dear Programmers:

         IMX6Q SDMA does not work, with Kernel 4.1.15, in Android 7.1.1 system. SDMA firmware name is sdma-imx6q.bin, whose version is 3.3.

         Here I want to use SDMA for Audio Subsystem SSI.

        PCM Stream to platform DAI mapping relation:

pcmC0D0c ---> 2028000.ssi

pcmC0D0p  ---> 2028000.ssi
pcmC0D1c  ---> 202c000.ssi
pcmC0D1p ---> 202c000.ssi
pcmC0D2c ---> 2030000.ssi
pcmC0D2p ---> 2030000.ssi
pcmC0D3c ---> 2024000.esai
pcmC0D3p ---> 2024000.esai

 

      I tested pcmC0D0p  device node with "tinyplay" . Testing command line is "tinyplay source.wav -D 0 -d 0",and result is "Error playing sample".  Something is wrong.

     SDMA interrupt info:

     284:          4          0       GPC   2 Level     sdma

 

     SDMA DTS Configuration:

sdma: sdma@020ec000 {                                 
 compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";    
 reg = <0x020ec000 0x4000>;                          
 interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;             
 clocks = <&clks IMX6QDL_CLK_SDMA>,                  
   <&clks IMX6QDL_CLK_SDMA>;                        
 clock-names = "ipg", "ahb";                         
 #dma-cells = <3>;                                   
 fsl,sdma-ram-script-name = "imx/sdma/sdma-imx6q.bin";

status="okay";
};               

      

SSI DTS Configuration:

ssi1: ssi@02028000 {                     
 #sound-dai-cells = <0>;                
 compatible = "fsl,imx6q-ssi",          
   "fsl,imx51-ssi";                   
 reg = <0x02028000 0x4000>;             
 interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>;
 clocks = <&clks IMX6QDL_CLK_SSI1_IPG>, 
   <&clks IMX6QDL_CLK_SSI1>;           
 clock-names = "ipg", "baud";           
 dmas = <&sdma 37 22 0>,                
        <&sdma 38 22 0>;                
 dma-names = "rx", "tx";                
 fsl,fifo-depth = <15>;                 
 status = "okay";                   
};         

After a preliminary investigation, I found that during tinyplay testing, DMA call back function void imx_pcm_dma_complete(void *arg) does not occur at all, and SDMA interrupt does not increase.

 

If anyone knows what is going on, please tell me. Thanks a lot.

Best regards.                                                              

Outcomes