This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Audio driver problem??

Other Parts Discussed in Thread: OMAP-L137

Dear Sir,

We have bought OMAP-L137 EVM. We used the audio driver delivered with board BSP to capture and play signal. We used snd_pcm_readi to read and snd_pcm_writei to write the signal in a loop. We fed one of the channel with a sinusoid signal and fed the other with 0; In a loop, we read the signal and write the same signal. One wonderful event happened. The signals of left and right channels are  exchanged after a while. This event sometimes happened more than one time. We tried several times. What is the problem???? The setting seems to correct and the program is simpler than it was a programming fault. On the other hand, we do not modify the input signal. We play the same buffer read from input.

Best regards,

Jack,

  • Hi Jack,

    I think we first need to figure out if the issue is due to OMAP not being configured correctly or if the audio converter is not configured correcty. I recommend you to look with an oscilloscope at the WCLK and TX lines of the I2S bus that goes to the audio converter. Then compare that to the timing diagram shown in the datasheet and see if the 0s are being swapped between left and right channels.

    Regards,

    J-

  • Dear Sir,

    I used the following Linux instruction to record an play:

    arecord -d 20 -D 'hw:0,0' -r 96000 -f S32_LE -c 2 | aplay -D 'hw:0,0' -c 2

    The above command is a Linux command. The channels are sometimes exchanged. When the rate is 96000 or 88200 this event happens but when I set the rate to 48000, the channels are not exchanged. I did not make any change in setting. the Linux is booted and then I execute the above Command line.It seems that ARM clock or codec clock is too slow. The clock of ARM is set to 300 MHZ. and codec clock is fed by a 24.576 MHZ signal.This event is very wonderful for me. I would very thankful if you can help us.

    Jack,

  • Hi Jack,

    As I mentioned on the previous post, verify the integrity of the I2S signals out of OMAP to determine if issue originates from the AIC device or not.

    One of my colleagues that is more familiar with OMAP suggested to verify the DMA on the apps processor side.

    Thanks,

    J-

  • Dear Arbona,

    We checked the I2S and WCLK.They are ok. I seems that the ARM makes the problem. What should we do?

    best,

    Jack,

  • Hi Jack,

    I suggest you to verify the code related to the McBSP peripheral. Compare what is different between 96k and 48k sampling. Also, make sure the BCLK frequency is at least (# bits resolution)*(2 channels)*WCLK and it matches with the I2S bus on AIC32x4 datasheet.

    Regards,

    J-