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.

Problem regarding data read in simple Audio loop back program.

hi 

I have read in certain pdf's regarding TMS320C6713 DSk saying that 

"An audio sample is read from the codec using the function DSK6713_AIC23_read. Note that the
code waits inside the while loop until the codec is ready to read. The left and right channels are
both inside the unsigned 32 bit variable STEREO." (Uint32 Stereo).

// inside main After initialization 

for(;;)
{
// Read left and right channel samples
while (!DSK6713_AIC23_read(hCodec, &stereo));
// write left and right channel samples
while (!DSK6713_AIC23_write(hCodec, stereo));
}

//

while debugging the value in  Variable "Stereo" is between ( 0x00000000 and 0x0000FFFF). it never goes beyond why ...??? (though the author is mentioning its a stereo data) 

thanks 

Nageshwar

  • Hi,

    Thanks for your post.

    There is a simple audio loopback example available using C6713 BSL libarary and you could download the c6713_audio_minimal.zip project available from the below wiki which you could try:

    http://processors.wiki.ti.com/index.php/C6713DSK_in_CCSv5#Minimal_project

    As well, please find the DSP Integration Workshop materials from below link. (Refer Lab4 - audioapp)

    http://processors.wiki.ti.com/index.php/TMS320C6x1x_DSP_Integration_Workshop#Workshop_Materials

    You can also download BSL and example code from the DSKC6713 support home page as below:

    http://c6000.spectrumdigital.com/dsk6713/revc/

    For more details on DSK6713 kit includes, please refer below:

    http://www.spectrumdigital.com/product_info.php?&products_id=113

    You could also download the CSL for C6713 from the below link:

    Download CSL @ http://www.ti.com/tool/sprc090

    Thanks & regards,

    Sivaraj K

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

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

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

  • Nageshwar,

    Nageshwar Singh said:
    I have read in certain pdf's regarding TMS320C6713 DSk

    Which TI pdfs say what you have quoted in your initial post?

    In your other thread here you were able to access both channels using two calls to the DSK6713_AIC23_read and _write functions. What did you do differently here to expect different results?

    Regards,
    RandyP

  • Thanks for your reply

    You mentioned to go though DSP Integration Workshop materials in the link

    processors.wiki.ti.com/.../TMS320C6x1x_DSP_Integration_Workshop

    I read the data regarding McBSP and have found difficulty on page no 216 "Initializing the AIC23 Codec" ....

    void initCodec(MCBSP_Handle hMcbsp)
    {
    short codecConfig[10] = {
    0x0017, // 0 Left line input channel volume
    0x0017, // 1 Right line input channel volume
    0x01f9, // 2 Left channel headphone volume
    … };

    for (i = 0; i < 10; i++) {

    MCBSP_write(hMcbsp,(i << 9)|codecConfig[i]);}
    }


    i could not understand why "(i<<9)| codecConfig[i]" is used ......my question is why "i" is shifted left by 9 times and the written in hMcbsp.(it changes the codec properties )...

    thanks

    Nageshwar
  • Nageshwar,

    Does the initCodec routine function correctly for you?

    Nageshwar Singh said:
    i could not understand why "(i<<9)| codecConfig[i]" is used ......my question is why "i" is shifted left by 9 times and the written in hMcbsp.(it changes the codec properties )...

    Have you answered your question already, in parentheses? The data on McBSP is formatted to provide the appropriate values for the Codec, and we provide a structure with comments to help you work at a high level to make the properties correct for the codec. As you have said, this is to change the code properties.

    If you question is about the format of the commands at the McBSP bit level, that issue has been solved by this routine. You can learn about the format by reading the AIC23 datasheet. This routine is designed to communicate with the AIC23 as required by that datasheet.

    Regards,
    RandyP