I have a need to deinterleave audio data using edma and McASP interface (OMAP-L138).
There are 2 transmit serializers on the McASP my data is in this forme.
chan1[8] = {L1, L2, L3, ..., L8}
chan2[8] = {R1, R2, R3, ..., R8}
chan3[8] = {L1, L2, L3, ..., L8}
chan4[8] = {R1, R2, R3, ..., R8}
The above needs to go to the serializers in this forme.
Chan1_2_3_4 xmt buffer[8*4] = {L1, L1,R1, R1,L2, L2, R2, R2,... }
From a previous thread
http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/153541.aspx?PageIndex=2
>
There's a lot of ways you could do this, but I think I like this method the best.
Solution: Use one EDMA channel per serializer
This solution ignores the fact that multiple channels exist. Here are the few modifications:
For channels 1 - "n-1":
* ITCCHEN=1
* TCCHEN=1
* TCC = "next channel"
* A-sync
* Early completion
For channel n:
* ITCCHEN=0
* TCCHEN=0
* TCC = interrupt bit in IPR that you will look for
* A-sync
* Normal completion
Let's use your case of 2 transmit serializers. So in this case the McASP DMA event would cause a channel to run as usual. That channel would transfer a single data element (e.g. A-sync transfer). Of course, we are required to transfer 2 elements since we have 2 serializers. To accomplish this, we chain to a second channel which also transfers a single element. In this way we have transferred our required number of samples but now we can do indexing the way we did in the single-serializer case.
>
and
>
Yes, there are a lot of ways to slice the issue:
1. Use one parameter set per serializer and chain them together.
2. Use one parameter set per sample in your buffer and link them together.
3. Deinterleave after the fact by chaining to a second parameter set that does the deinterleaving for you in one shot and then generates the interrupt.
>
I was wondering what the trade offs imply as I need the most flexable / expandable solution to be able to add x more serializers to the transmitter in the future.
Thanks
Brian