Hi,
I have a question regarding the tone application of DSK 6455
Code snippet from tone.c example:
/* Generate a 1KHz sine wave for 5 seconds */
for (msec = 0; msec < 5000; msec++)
{
for (sample = 0; sample < SINE_TABLE_SIZE; sample++)
{
/* Send a sample to the left channel */
while (!DSK6455_AIC23_write32(hCodec, sinetable[sample]));
/* Send a sample to the right channel */
while (!DSK6455_AIC23_write32(hCodec, sinetable[sample]));
}
}
Compare to this of EVM 6418:
for ( msec = 0 ; msec < 5000 ; msec++ )
{
for ( sample = 0 ; sample < SINE_TABLE_SIZE ; sample++ )
{
/* Send a pair of stereo samples left high & right low */
while ( ! EVM6418_AIC23_write( hCodec,
(sinetable[sample]<<16) | sinetable[sample]));
}
}
While 6455 example writes "sinetable[sample]" twice, 6418 writes "sinetable[sample]<<16) | sinetable[sample]" once.
What I was confused here is 6455 writes a same 16-bits value twice. So how do I know which one is for the left and which one for the right channel???
EVM 6418 example makes more sense to me since it write only one 32-bit value although the high 16-bit and low 16-bit values have the same value.
Thanks in advance,
Pete.