This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA745: MCASP0 support transmitting multiple stream

Part Number: DRA745

Tool/software: Linux

Hi experts:

     we uses DRA745 + AK4616 in next project. From the TRM, we learned that MCASP0 has independent 16 slots.  We plan to transmit multiple stereo data at the same time on MCASP0 (eg, transt the first stereo channel data on slot0 and slot1 , second stereo channel data on slot2 and slot3.In theory, MCASP0 can support 8-channel data). How do you configure it?

  • In your McASP device-tree node, try setting the "tdm-slots" property to the desired number of slots.

    Also if McASP is master, make sure that the frequency of your McASP_AHCLKX clock is enough to generate a BCLK signal for the number of slots you want (i.e. McASP_AHCLKX >= slots * bits/sample * sampling rate).
  • Questioning

    1. Does your answer refer to transmit via a data pins AXRn (like this: Slot 0 Slot 1 Slot 2 Slot 3 **** Slot 0 Slot 1 Slot 2 Slot 3。 slot 0 and slot 1 represent the left and right channel data of the first stereo, slot2 and slot3 represent the left and right channel data of the second stereo)?


    2. The 16 slots in the question refer to 16 data pins (AXR0~15). It is possible to specify data pins to transmit fixed stereo channel data (eg, transt the first stereo on AXR0 and AXR1, second stereo on AXR2 And AXR3.)
  • Let's take the 8-channel example from your original question - the samples in your audio buffer are stored like this: ch1, ch2, ch3, ..., ch8.

    When a single McASP serializer (i.e. AXR0) is used, the audio samples are shifted out in the same order as in the audio buffer.
    (8 TDM slots are required)
    AXR0 => | ch1 | ch2 | ... | ch8 |

    When two serializers are used (i.e. AXR0 and AXR1), the audio samples are shifted out in the following way:
    (4 TDM slots are required)
    AXR0 => | ch1 | ch3 | ch5 | ch7 |
    AXR1 => | ch2 | ch4 | ch6 | ch8 |

    When four serializers are used (i.e. AXR0-3), the audio samples are shifted out in the following way:
    (2 TDM slots are required)
    AXR0 => | ch1 | ch5 |
    AXR1 => | ch2 | ch6 |
    AXR2 => | ch3 | ch7 |
    AXR3 => | ch4 | ch8 |

    So, regarding question 1 - yes, my previous response is true for the single serializer case.

    On question 2 - it's not possible to specify what channels get shifted out on a given serializer. The samples from the audio buffer get consumed by AXR0, AXR1, and so on, as described in the 2 and 4 serializers examples above.

    Also, keep in mind that the min number of TDM slots is 2. So if you have 16 serializers configured for TX, then 32 samples will be consumed per audio frame (i.e. 1 pulse of the FSYNC signal).
  • Thank you very much! Your reply has solved all the problems above.

  • hello, there’s a new problem:

           we plan to  transmits 4 stereos  in parallel on 2 data pins of McASP0。How to store these 4 stereo(8 channel, sampling depth is 16 bit) data in the audio buffer?I am referring to what order to store the 8 channels?

  • Hi,

    there is a new thread and the McASP experts has been notified to answer there:
    e2e.ti.com/.../701469

    I will close this one as the original issue is resolved.

    Regards,
    Yordan