Hi, I'm starting to familiarize with OMAP L138 audio applications. I've compiled the audio example that goes with the SOM-M1_BSL_WS download from the logic's web site. While I can hear the "beep" in line out test, I can't hear anything in line in test (where the input signal is supposed to be played back). In order to clarify some points I would ask some questions:
-1) Why in the line out test (but in line in one too) are the samples sent twice for each loop? Comment lines seem misleading. And what the shift of 15 bits is for? (amplification?)
// wait for xmit ready and send a sample to the left channel.
while (!CHKBIT(MCASP->SRCTL11, XRDY)) {}
MCASP->XBUF11 = (sinetable[sample] << 15) | 0x00000000;
// wait for xmit ready and send a sample to the left channel.
while (!CHKBIT(MCASP->SRCTL11, XRDY)) {}
MCASP->XBUF11 = (sinetable[sample] << 15) | 0x00000000;
2) Why in the line in test is the bit XRDY checked for receive? From the reference manual spruh77a i thought the bit RRDY was supposed to be checked for inputs. Moreover, the same serializer is used for both input and output (play back) but in the manual said they have to be configured as input or output, so I'm confused.
// wait for recv ready and send a sample to the left channel.
while (!CHKBIT(MCASP->SRCTL11, XRDY)) {}
MCASP->XBUF11 = dat;
dat = MCASP->XBUF12;
// wait for recv ready and send a sample to the right channel.
while (!CHKBIT(MCASP->SRCTL11, XRDY)) {}
MCASP->XBUF11 = dat;
dat = MCASP->XBUF12;
-Finally, how can I tell what i send on the left channel and what i send in right one?
If some of you have some others useful example for audio I would be glad to see them.
Thank you in advance,
Francesco