Hi, I'm am working on C5535 ezDSP KIT, and i want to record voice by Stereo in and test it through Stereo out on KIT, I used the sample of TI. But i can't listen anything. Please someone heps me how to fix it. I'm very glad to get your advices. Here is my source. Thank you!
#include "stdio.h"
#include "usbstk5505.h"
#include "aic3204.h"
#include "PLL.h"
#include "stereo.h"
#include "LEDflasher.h"
Int16 left_input;
Int16 right_input;
Int16 left_output;
Int16 right_output;
Int16 mono_input;
#define SAMPLES_PER_SECOND 48000
/* New. Gain as a #define */
/* Use 30 for microphone. Use 0 for line */
#define GAIN_IN_dB 30
unsigned long int i = 0;
/* New. Variable for step */
unsigned int Step = 0;
/* ------------------------------------------------------------------------ *
* *
* main( ) *
* *
* ------------------------------------------------------------------------ */
void main( void )
{
/* Initialize BSL */
USBSTK5505_init( );
/* Initialize PLL */
pll_frequency_setup(100);
/* Initialise hardware interface and I2C for code */
aic3204_hardware_init();
/* Initialise the AIC3204 codec */
aic3204_init();
/* New. Default to XF LED off */
asm(" bclr XF");
for ( i = 0 ; i < SAMPLES_PER_SECOND * 600L ;i++ )
{
aic3204_codec_read(&left_input, &right_input); // Configured for one interrupt per two channels.
mono_input = stereo_to_mono(left_input, right_input);
left_output = left_input; // Straight trough. No processing.
right_output = right_input;
aic3204_codec_write(left_output, right_output);
}
/* Disable I2S and put codec into reset */
aic3204_disable();
printf( "\n***Program has Terminated***\n" );
SW_BREAKPOINT;
}