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.

audio pass-through using C6748-LCDK



Hi,

I'v just bought a C6748 LCDK kit and an XDS100v2 emulator. I could execute sample programs (Hello world, fingerprint) but I am looking for  code (and tutorials) for realizing an audio pass-through (to copy an input audio signal in the output) .

Thank you in advance for your response,

Igig

  • Hi lgig,

    The LCDK starterware contains the McASP example which demonstrates the loop-back of audio input into audio output.

    If you install the starterware, you will find the source code of MCASP playback at the following path:

    "..\Texas Instruments\pdk_C6748_2_0_0_0\C6748_StarterWare_1_20_03_03\examples\lcdkC6748\mcasp".

    Please refer to these links:

    http://processors.wiki.ti.com/index.php/StarterWare_01.20.01.01_User_Guide#Example_Application_8

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

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

     

    Regards,

    Shankari.

     

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

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

     

     

     

  • Hi Shankari,

    Thank you for your response. I tested it on my LCDK board and it works.

    I am wondering how I can modify this code to process input audio (an FIR filtering for example).

    My problem is not to write an FIR filter (I know it is e.g. available in the libraries) but I do not know how manage the different input and output buffers to realize my filter.

    Do you know if there are available examples?

    Thank you in advance,

    Igig

  • Hi Igig,

    have you made any progress on this?  I'm also trying to figure it out.  The main() method in mcaspPlayBk.c has an infinite loop, take a look at the memcpy() call.

    Jose

    //mcaspPlayBk.c

        /*
        ** Looop forever. if a new buffer is received, the lastFullRxBuf will be
        ** updated in the rx completion ISR. if it is not the lastSentTxBuf,
        ** buffer is to be sent. This has to be mapped to proper paRAM set.
        */
        while(1)
        {
            if(lastFullRxBuf != lastSentTxBuf)
            {  
                /*
                ** Start the transmission from the link paramset. The param set
                ** 1 will be linked to param set at PAR_TX_START. So do not
                ** update paRAM set1.
                */
                parToSend =  PAR_TX_START + (parOffTxToSend % NUM_PAR);
                parOffTxToSend = (parOffTxToSend + 1) % NUM_PAR;
                parToLink  = PAR_TX_START + parOffTxToSend;
     
                lastSentTxBuf = (lastSentTxBuf + 1) % NUM_BUF;

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

                /*
                ** Send the buffer by setting the DMA params accordingly.
                ** Here the buffer to send and number of samples are passed as
                ** parameters. This is important, if only transmit section
                ** is to be used.
                */
                BufferTxDMAActivate(lastSentTxBuf, NUM_SAMPLES_PER_AUDIO_BUF,
                                    (unsigned short)parToSend,
                                    (unsigned short)parToLink);
            }

  • hi Igig

    Did you made to implement your application? I'm working in something similar right now

    Thanks!
  • Hi,
    Did you manage to implement a FIR Filter on the McASP audio application?
    I'm kinda struggling...
    Thanks!