[alsa-devel] fsl_ssi.c: Getting channel slips with fsl_ssi.c in TDM (network) mode.

Caleb Crome caleb at crome.org
Fri Oct 30 23:35:17 CET 2015


On Fri, Oct 30, 2015 at 3:04 PM, Caleb Crome <caleb at crome.org> wrote:
> On Thu, Oct 29, 2015 at 6:29 PM, Nicolin Chen <nicoleotsuka at gmail.com> wrote:
>> On Thu, Oct 29, 2015 at 04:33:26PM -0700, Caleb Crome wrote:
>>
>> Waiting for TFCNT0 sounds reasonable to me as long as the code is
>> well commented.
>
> Okay, so I tried out your patch and it has 2 separate issues:  the
> first related to missing samples (even when I enabled the SSIEN), and
> the second relating to the dual fifo.
> So, first the missing samples.
>
>
> **********************
> ** Problem 2 *******
> **********************
> When the dual fifo mode is enabled, the data comes in the following order:
> 0000,1000,2000,3000,4000,5000,6000,7000,8000,9000,a000,b000,c000,d000,e000,f000
> 0001,1001,2001,3001,4001,5001,6001,7001,8001,9001,a001,b001,c001,d001,e001,1002
> 0002,3002,2002,5002,4002,7002,6002,9002,8002,b002,a002,d002,c002,f002,e002,1003
> 0003,3003,2003,5003,4003,7003,6003,9003,8003,b003,a003,d003,c003,f003,e003,1004
>
> Strange, right?  Frame 0 is perfect, however after the first frame,
> the data gets scrambled and from then on is wrong.
> The pattern stays consistent after frame 2.
>
>
> Looks like I need to stick with single fifo for now.
>
> So, bottom line is:  single fifo seems to work perfectly with my
> proposed fix above.  Dual fifo doesn't seem to work.
>

I realized the problem with the dual fifo mode:  it's that you had set
the maxburst to 16 in your patch.  I guess this must be the maxburst
to a single fifo maybe?  When I set the fual fifo maxburst back to 8,
I get perfection again!

So, now bottom line is:  both single and dual ffio modes work :-)

So, with this patch (I'll send separately as a proper patch), Tx will
work perfectly.

Next thing to tackle is:  doing starts/stops on Tx/Rx in different orders:

So far, I've only verified:
TxStart - TxEnd

Next is:
RxStart - RxEnd

And the combinations:
TxStart - RxStart - TxEnd - RxEnd
TxStart - RxStart - RxEnd - TxEnd
RxStart - TxStart - RxEnd - TxEnd
RxStart - TxStart - TxEnd - RxEnd

Maybe the rest won't be as difficult :-/


> -caleb


More information about the Alsa-devel mailing list