[alsa-devel] While recording from mono codec twice as much data is received

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Jul 10 11:29:24 CEST 2009


On Thu, Jul 09, 2009 at 03:27:17PM -0600, Louis Lee wrote:

>   However, when recording using the exact same setup for the data
>   interface I am not getting favorable results.  For instance, if I
>   record for 5 seconds I get output in a file for 10 seconds of audio
>   (arecord or sox).  This results in my recording being stretched.  I
>   change the DAI to stereo capture and record two channels and the
>   recorded output comes back correctly (5 seconds recorded is 5
>   seconds).

This suggests that either the CODEC is configured to run at twice the
expected sample rate or that there are enough bit clocks being generated
for stereo data and the CPU DAI is trying to record data for each bit
clock cycle.  Is the CPU or the CODEC the clock master in your system?

>   I'm stuck now.  From my understanding the clocks are setup the same
>   way for both playback and capture.  Has anyone ran into this problem
>   before?  The WM8974 is a mono codec so I should not have to set the
>   DAI to stereo in order to capture data properly.

It should be possible to do what you want, yes.


More information about the Alsa-devel mailing list