iMX6 ESAI TDM with underrun and overrun support

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

iMX6 ESAI TDM with underrun and overrun support

1,570 Views
aurelienbouin
Contributor IV

Since I don't know why my question is marked as solved and actually it is not ...

I reopen it with this thread ...

if you have a better solution ...

The link of my first thread is here : iMX6 ESAI TDM with underrun and overrun support

Sorry for that

Labels (2)
10 Replies

954 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Aurelien,

Your question is being discussed internally. After reviewing the previous thread, the question is what is the current status?  The last post seems to describe a discrepancy in the clock and frame synchro.  How is the clock being set?

Best regards!

/Carlos.

0 Kudos

954 Views
aurelienbouin
Contributor IV

Hi Carlos,

The current state is unresolved, since there is no solution to use ESAI in slave mode with 2x32slots of 8 bits with a bandwidth of 8000Hz

So it means that we need to set ESAI bclk to 2048000Hz

The ESAI clock is set from PLL4, that I changed in /arch/arm/mach-imx/clk-imx6q.c :

-       imx_clk_set_rate(clk[pll4_audio_div], 541900800);

+       imx_clk_set_rate(clk[pll4_audio_div], 524288000);

Then I figured out a bug in sound/soc/fsl/fsl_esai.c :

-       /* Set the max fluctuation -- 0.1% of the max devisor */

-       savesub = (psr ? 1 : 8)  * 256 * maxfp / 1000;

+       if(psr){

+               /* Set the max fluctuation -- 1% of the max divisor*/

+               savesub = 1  * 256 * maxfp / 100;

+       }else{

+               /* Set the max fluctuation -- 0.1% of the max divisor */

+               savesub = 8  * 256 * maxfp / 1000;

+       }

else savesub = 0 ... and there is no possibility to get the divisor correct

But still ... there is swapping when cpu is loaded ...And there is no error that gave me any information about swapping ...

Seems like there is another ""%*/?§!$"" CHIP ERRATA

Best regards,

Aurelien BOUIN

0 Kudos

954 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Aurelin,

Could you please specify what version of the OS is being used?  Which BSP is being used?

Best regards!

/Carlos

0 Kudos

954 Views
aurelienbouin
Contributor IV

Hello Carlos,

I am compiling manually the kernel using a cross toolchain I have generated with yocto

I already tested different linux kernel like said in my differents previous messages

from freescale :

- imx_3.10.31_1.1.0_beta2

- imx_3.10.53_1.1.0_ga

from the mainline linux stable : 3.18

Regards,

Aurelien BOUIN

0 Kudos

954 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Aurelin,

There is one errata about ESAI for channel swap:

ERR008000 (ESAI: ESAI may encounter channel swap when overrun/underrun occurs):

http://cache.freescale.com/files/shared/doc/pcn/PCN16355.htm

The workaround is to reset ESAI after channel swap happens.

Hope this will be useful for you.
Best regards!
/Carlos

0 Kudos

954 Views
aurelienbouin
Contributor IV

Hello Carlos,

is there something new since you said that it was discussed internally ?

Another Silicium Bug to add in the Chip errata ?

Thank you,

Regards

0 Kudos

954 Views
CarlosCasillas
NXP Employee
NXP Employee

Hello Aurelin,

The question is still being discussed internally, I will post additional details as soon as getting something else.


Hope this will be useful for you.
Best regards!
/Carlos

0 Kudos

954 Views
aurelienbouin
Contributor IV

Hello Carlos,

Thank you very much for your help

Best regards

Aurélien BOUIN

0 Kudos

954 Views
CarlosCasillas
NXP Employee
NXP Employee

Hello Aurelin,

Below you can find additional information/requests:

     For channel swap, until now we found there are 3 cases which can cause channel swap in ESAI.

     1.  underrun/overrun:  Please enable xCR_xEIE and add log in esai_isr() to check if it is this case.

     2.  clock glitch in bitclock and frame clock.  please check the quality of signal .

     3.  channel swap is happened in the beginning of playback for multiple tx.

    

     3.10.53_ga has the fix for case 1 and case 3. Seems that you have tried the 3.10.53_ga branch, but still has issue.  Then only left the case 2. which is signal issue, please check the hardware connection.

     Could you please double confirm which kind of channel swap have you encountered.  Can it be reproduced in our board and our release?


Hope this will be useful for you.
Best regards!
/Carlos

0 Kudos

954 Views
aurelienbouin
Contributor IV

Hello Carlos,

Thank you for your suggestion but I figure out you didn't read the previous messages ... take a look a the previous thread iMX6 ESAI TDM with underrun and overrun support you will see that there is not interrupt rised ...

Previously you were saying that the question is discussed internally ? is it for real ?

But again thank you for you suggestion ... it could have helped

Regards,

Aurelien BOUIN

0 Kudos