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.

Multichannel input using EDMA3

Hello everyone.

I am beginner in DSP and currently I am learning how to use EDMA3 & McASP to process audio data.

If I have got it right, I should configure EDMA3_CC ParamSet #1 to setup EDMA transfer to McASP0 receiver. But in case of multiple inputs connected to McASP0 (2 microphones, for example) how EDMA should figure out which transfer to do? Should I configure multiple ParamSets with different SRC address (for example, 0x01D0 0284 and 0x01D0 0288)? If I do, how to bind it to receive events of McASP0 correctly? 

I am using CCS v5.1 and CSL.

Thank you.

  • Hi,

    Thanks for your post.

    I would recommend you first  to walkthrough the starterware audio application DMA buffer handling wiki below which is programmed in such a way to work for EDMA ping pong buffer operation.

    The RX paRAM set 0 is initialized to receive the first audio sample in the RX buffer-0 and the paRAM set 0 is linked to linked paRAM set 40.  The paRAM set 40 is linked to paRAM set 41, which is initialized to receive data in RX Buffer 1. The paRAM set 41 is linked back to paRAM set 40 and hence the reception paRAM set is initialized as 0-->40-->41-->40, thereby, the linking does not change as the application executes.

    The EDMA PaRAM set initialization and McASP Tx. and Rx. statemachines are well documented and for basic DMA buffer handling for ping pong operation, please ensure your code is compliant to the below wiki:

    http://processors.wiki.ti.com/index.php/StarterWare_Audio_Application

    To understand more on EDMA ping pong buffer, you could also check the below tutorial:

    http://processors.wiki.ti.com/images/b/b8/Eindhoven_JAN_12-10_IntroTo_Edma.pdf?keyMatch=EDMA

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.

    -------------------------------------------------------------------------------------------------------

  • Hi!
    Thank you very much for your answer.

    The thing is I already have seen all of these documents and I understand the conception of ping pong.
    Let me explain my question one more time.

    My board with 6747 dsp has multiple audio inputs, 3 to be precise, and 1 output. Such 4 audio channels are connected to McASP 1, 2, 3 and 5 serializers. <Mc> in McASP means <Multi-Channel> so I expect it can handle multiple channels well. But, if I understand it correct, there is only two EDMA events in McASP: for transmit and receive. Two events -> two programmed channels in EDMA, but I think I need 4 channels. So I do not understand what to do.

    Thank you.
  • Sergey,

    Please study the section in the McASP User Guide, Section 2.4.3.2 "Transfers through the DMA Port", to better understand how the EDMA3 will interact with the McASP ports.

    I suspect what you are missing is that when the McASP receive event occurs, this means that all four of your data channels are available AND that the DMA channel will need to do four reads from the RBUF DMA port location and write that new data to the appropriate locations for your four receive buffers. The DMA channel will always read from RBUF but will write to different RAM locations by using B- and C- indexing. ACNT will usually be set to 4 bytes for best efficiency (required on some devices but always more efficient than reading single bytes), BDSTIDX will be set to the distance between the first location of four different buffers, CDSTIDX will be set to ACNT to move to the next location in the first buffer.

    Regards,
    RandyP
  • Hello, RandyP
    Great! It is very useful answer. Thank you very much!