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.

playing audio on mcasp0 at 32kHz

I'm trying to play audio on a DM8168 processor out the mcasp0 device at 32kHz.  I'm using arecord from mcasp1 and aplay to mcasp0.  I can see using an oscilloscope that the audio data is coming in at 32kHz (mca1-aclkr is 2.048MHz), but the audio data coming out of mcasp0 is at 48kHz (mca0-aclkx is 3.072MHz).  I cannot change the rate coming out of the mcasp0 to anything other than 48kHz.  At first I thought it was a problem with the codec driver, but all PCM rates from 8KHz to 96KHz are enabled.  Does anyone have any idea way I'm enountering this problem?

Carl

  • From investigating the drivers associated with the audio clocks it looks like sysclk20 is being set to 196608000.  This translates to 48 kHz FS (196608000 / (512 * 8) - mclk ratio is 512).  The mcasp sound driver in sound/soc/davinci/davinici-mcasp.c does not change this clock frequency and it look like I need to change it to 131072000 (to achieve 32 kHz sound frequency).  Unfortunately adding clk_set_rate() code to the mcasp driver results in a kernel error saying that sysclk20 is in use and cannot be changed (use_count=3).  How can I change this clock to get the correct rate so my output sound rate is 32 kHz.

    Carl