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.

Using the AIC3106 CODEC with the C6748 EVM

Other Parts Discussed in Thread: TLV320AIC3106

Hi,

I'm trying to generate and play a simple sinusodial wave of some frequency Fc, by using the Logic PD Zoom Development board with the C6748 SOM. My configuration is as follow:

- C6748 DSP

- TLV320AIC3106 Audio CODEC

- CCS 5.1.1 with DSP/BIOS v5.41.11.38,  Code generation tools v7.3.2

- EDMA3 LLD v1.11.03.01

- PSP drivers v1.30.01 for the C6748

My program is basically a modification of the Audio example that came with the PSP drivers: instead of simply replaying the signal on line-in to line-out, I  want to generate a sinusodial wave (tone) and rather play this. I generate a sine wave as follow:

- Allocate a buffer to hold generated sine wave samples:

temp_buf = (Short *)MEM_calloc(DDR_HEAP, BUF_LEN * sizeof(Short) , BUF_ALIGN); 

temp_buf is of type Short and is allocated in the same way as the SIO buffers for the Audio interface driver.

- I generate the sine wave samples:

    rad = 2*PI*(fc/48000.0);
    for(j = 0; j < BUF_LEN; j++) {
        temp_buf[j] = (Short)(sinf(rad * j)*32767) ;
    }

The configured sample rate of the CODEC is 48kHz and the samples are scaled to fit into a Short.

- I attempt to continuously play the samples through the CODEC using this code:

        // Reclaim empty buffer from the output stream to be reused
        SIO_reclaim(audio_out_stream, (Ptr *)&xmt, NULL);

        memcpy(xmt, (Ptr)&temp_buf[0], BUF_LEN * sizeof(Short) );

        // Issue full buffer to the output stream
        SIO_issue(audio_out_stream, xmt, BUF_LEN * sizeof(Short) * TX_NUM_SERIALIZER, NULL);

Upon measuring the resulting output signal on an oscilloscope I found that the signal was heavily distorted, not nearly the clean sine wave I was expecting. The configurations of the AIC3106, I2C, McASP and EDMA are the same as in the Audio example of the PSP drivers. I suspect the problem is probably misconfiguration, but exactly wat is incorrectly configured, I cannot seem to figure out.

Is it perhaps necessary to configure the EDMA in a more specific manner? Can someone please provide me with some insight into the problem? Please take into account that I'm inexperienced with the operation of CODECs.

Thanks in advance!


Reinier

  • Hi Reinier,

    The oscope is not the best way to look at the output of a CODEC. The oscope waveform will be dominated by out of band noise. There is a good app note on the subject that can be found here:

    http://www.ti.com/lit/an/slaa313/slaa313.pdf

    Of course it is hard to tell if the problem is just out of band noise or an actual problem with the setup without looking at the waveform. If it is a problem with the DSP software, you will need to post on the C6xxx forum as they write and support the drivers for these boards.