I tried the examples on the eZdsp USB Stick installation DVD. The aic3204 example should produce a 1 kHz sine tone but this is not the case. What I can hear is a distorted tone with a frequency of about 740 Hz. In contrast to this, the built-in test program clearly produces sine tones with 1000 Hz and 2000 Hz.
I tried to understand the aic3204 program and found the code in aic3204_tone_headphone.c which is in a loop for the 48 sinewave samples:
I2S0_W0_MSW_W = (sinetable[sample]) ;
I2S0_W0_LSW_W = 0;
while((XmitR & I2S0_IR) != 0)
I2S0_W1_MSW_W = (sinetable[sample]) ;
I2S0_W1_LSW_W = 0;
In the first two lines, the sine value is written to the ports 0x2809 and 0x2808, i. e. the left output channel, in the last two lines it is the ports 0x280d and 0x280c, i. e. the right output channel. The third line seems to wait for a flag that transmission is ready. But there isn't a semicolon at the end of the line, so line 4 is part of the while loop, and the sample is continuously written to I2S0_W1_MSW_W.
I added a semicolon at the end of the while loop. The result is that the frequency is double (1480 Hz) and the tone is still distorted.
The second test, aic3204_loop_linein.c, runs perfectly although a similar while loop is in this routine. I can't figure out what is wrong with the tone generation function and would need some help.
Thank you,
Geza Anders