Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

DSK C6713 Audio Codec

$
0
0

Hello. I have build the following code on DSP kit C6713. 1st time it work alright but now its not working. What problem it may be??? I have tested it on other kit but it didn't work...

#include<dsk6713.h>
#include<dsk6713_aic23.h>
#include<stdlib.h>
#include<math.h>

/* Configure Codec */

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 */
0x0081, /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */
0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */
};

void main(){
DSK6713_AIC23_CodecHandle hCodec;
Uint32 IN,OUT;

/* Initialize the board support library. It must be called first */
DSK6713_init();
/* Start the codec */
hCodec = DSK6713_AIC23_openCodec(0, &config);
/* Set codec frequency to 48KHz */
DSK6713_AIC23_setFreq(hCodec, DSK6713_AIC23_FREQ_48KHZ);

while (1) {

/* Read sample from the left channel */
while (!DSK6713_AIC23_read(hCodec, &IN_L));
/* Feeding the input directly to output */
OUT = 500*IN;
while (!DSK6713_AIC23_write(hCodec, OUT_R));
}
/* Close the codec */
DSK6713_AIC23_closeCodec(hCodec);
}


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>