[alsa-devel] ALSA SoC driver playback twice as fast as desired
broonie at opensource.wolfsonmicro.com
Sat Jul 4 11:49:43 CEST 2009
On Thu, Jul 02, 2009 at 04:24:17PM -0600, Louis Lee wrote:
> I'm out of ideas as to where to look. The DAI interface is set as a I2S slave. The clock is mastered by the Codec (WM8974). I've set up min_channels and max_channels to be 1 whereever possible. On a scope the clocking seems to be at the right speed. Why is it sound is playing twice as fast? Any ideas? Any help is appreciated.
> WM8974 is a mono codec. The SSI bus on the i.MX27 is set to I2S slave mode with a 16 bit word length. The word length on the codec is set to 16 bits. The audio interface on the codec is set to I2S, sample rate coded to do only 48kHz.
If you're running in I2S mode try playing back a stereo file instead -
you'll need to adjust the capabilities of all the DAIs to say they
support stereo. I suspect that the CPU side is trying to play back
stereo data and so plays back two samples for every frame (one in the
left channel and one in the right channel) which would give double speed
For mono data it's easier to use one of the DSP modes.
More information about the Alsa-devel