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.

OMAP-L138: Addition of processing modules in MCASP Example and Ping Pong buffering

Part Number: OMAP-L138

Hi,

I am running real time audio loopback application in OMAP-L138 LCDK using mcasp example code avaliable in C6748 LCDK starter-ware. This is a code without using SYS BIOS. The path location is:

SDK_INSTALL_PATH\pdk_C6748_2_0_0_0\C6748_StarterWare_1_20_03_03\examples\lcdkC6748\mcasp

I want to add some processing module like audio filtering etc in this code, But could'nt understand where should I add such "functions for processing". 

Please guide me where I could add processing functions such as filtering to filter audio before transmission.

Likewise, If I need to modify this code for ping pong buffering, then could you provide me a sample code for it. As it is not in starter-ware. 

However, I had already read this link "e2e.ti.com/.../sample-code-for-lcdk-audio-loopback-using-edma3-ping-pong-buffer-and-no-os"

but could'nt get good help. Please provide me some good relevant help.

Will be grateful to you.

Thanks!

  • Hello,

    The example you mentioned does loopback operation, i.e. what is received is then transmitted without any modification. You can simply replace the copying operation with your processing module. If I was reading the same source code as you, then you can just replace the following with your processing module:

                /* Copy the buffer */
                memcpy((void *)txBufPtr[lastSentTxBuf],
                       (void *)rxBufPtr[lastFullRxBuf],
                       AUDIO_BUF_SIZE);
    

    I believe this example can be modified to be a ping-pong buffer operation, if you just change NUM_BUF from 3 to 2:

    #define NUM_BUF  (2u) // (3u)

    Regards,

    Jianzhong