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.

Can't get audio loopback working.

I'm trying to get the audio loop-back project from http://processors.wiki.ti.com/index.php/C6713DSK_in_CCSv5 (listed as minimal project on the wiki) working. I've follow all the steps and the program builds and debugs without errors and the project seems to run properly but  the DSP doesn't perform the audio loop-back. I've tried all the different combinations of plugging in the input and output lines on the DSP just to see if the ports I was using were wrong but I still get nothing and I've tested the lines I am plugging in and both are working. Thank you for your time and any help is appreciated.

Here's the source code for the project.

/*
* main.c
*/

#include "DSK6713.h"
#include "dsk6713_aic23.h"
#include "stdlib.h"
#include "math.h"

// Codec configuration settings
DSK6713_AIC23_Config config = { \
0x0017, /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ \
0x0017, /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */\
0x01f9, /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ \
0x01f9, /* 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume */ \
0x0011, /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ \
0x0000, /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ \
0x0000, /* 6 DSK6713_AIC23_POWERDOWN Power down control */ \
0x0043, /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ \
0x0001, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ \
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ \
};

void main()
{
DSK6713_AIC23_CodecHandle hCodec;
Int16 OUT_L, OUT_R;
Uint32 IN_L;

// Initialize BSL
DSK6713_init();

//Start codec
hCodec = DSK6713_AIC23_openCodec(0, &config);

// Set frequency to 48KHz
DSK6713_AIC23_setFreq(hCodec, DSK6713_AIC23_FREQ_48KHZ);

for(;;)
{
// Read sample from the left channel
while (!DSK6713_AIC23_read(hCodec, &IN_L));

// Feeding the input directly to output you can add effects here
OUT_L = IN_L;
OUT_R = IN_L;

// Send sample, first left next right channel
while (!DSK6713_AIC23_write(hCodec, OUT_L));
while (!DSK6713_AIC23_write(hCodec, OUT_R));
}

//DSK6713_AIC23_closeCodec(hCodec); // Codec close is unreachable
}

  • Hi Cody,

    Thanks for your post.

    I think, your BSL & CSL libraries should be changed as per your DSK6713 installation path and you should link the libraries (csl6713.lib & dsk6713bsl.lib) path appropriately in the project properties under C6000 Linker-> File Search Path. Kindly ensure, you have linked the bsl & csl library paths to the right installation path & please try running audio loopback example after changing the bsl & csl library paths.

    By default in the audio loopback minimal experimentation code, the input select for the ADC would be the line input and line output. So, please connect to the Line in & Line out ports by default. If you need to configure the AIC23 codec registers for Microphone input and headphones out, please refer the below E2E post:

    http://e2e.ti.com/support/dsp/tms320c6000_high_performance_dsps/f/115/t/333080.aspx

    For further manipulations on the AIC23 codec registers, please refer the AIC23 codec datamanual as below:

    http://www.ti.com/lit/ds/symlink/tlv320aic23b.pdf (Section 3.1.3 Register map, page no 21)

    As per your requirement, please validate the codec registers & kindly ensure, you are plugging in the right input & output ports. ( by default, Line IN & Line OUT ports need to be used).

    Thanks & regards,

    Sivaraj K

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

     

  • Thank you for your help I found what it was and you were right about it being a BSL problem. When following the guide and installing the DSK and extracting the folder to C:\ I had to dig into C:\DSK6416\c6000\dsk6416\lib directory and extract the contents of the zip file that it leaves zipped (or at least it did for me). Thank you for your time and help once again.