DSPRelated.com
Forums

problem with reading values from line inputs of dsk6713

Started by joshy jose February 26, 2007
hai,
i have one critlical problem
i need to read data from the codec i wish to set 8khz sampling frequency,
dsp mode 16bit format
i need to read both left line and right line inputs
my configuration is like this

DSK6713_AIC23_Config config = {
0x0017, // 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume
0x0017, // 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume
0x017f, // 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume
0x017f, // 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume
0x0001, // 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
0x000D, // 8 DSK6713_AIC23_SAMPLERATE Sample rate control
0x0001 // 9 DSK6713_AIC23_DIGACT Digital interface activation
};

and also the reading operation is as follows, i need to take 1024 samples
each from the lines to calculate the fft

for (msec = 0; msec <1024; msec++)
{
while( !DSK6713_AIC23_read( hCodecrd ,&data ) );
// data1a>>16 ;
data1=(data & 0xffff0000);
data2=(data & 0xffff);
leftlinereceivedat[msec]a2;
rightlinereceivedat[msec]a1;
}
1) but i could find that the read value only contains 16 bit value (i
expected a 32 bit value combination of left and right channel)

otherwise each DSK6713_AIC23_read( hCodecrd ,&data ) takes only one line
data?

2) the 1024 data obtained from the above loop seems to be irregular and
errorful
( i had given a sine wave to input)
what could be the reason?

--
regards,
Joshy m. Jose
kerala , India
91-9447976001