My colleague spotted an interesting characteristic - using alsamixer to set the capture level to 100% left channel and 0% right channel or vice-versa made the mono recording work. Further investigation by using stereo recording of a pure sine wave (whistling into the microphone!) showed that the left channel was the complete reverse of the right channel. Then the penny dropped - the mono recording was essentially ALSA summing left and right channels, causing a near perfect zero recording since the left channel was the inverse of the right channel. Doh.
As it is, this very same issue has been discussed on LKML here with a suggested workaround described by Takashi Iwai here as follows:
Put the below to ~/.asoundrc
And record using:pcm.imix {
type plug
slave.pcm "hw"
ttable.0.0 0.5
ttable.0.1 -0.5
}
arecord -Dimix -c1 test.wav
Urgh. Well, at least there is some kind of ALSA workaround.
So the moral of the story is to twiddle with left and right channel levels and do some stereo recording and look at the results before hacking through the driver. I should have applied Occams' razor - I assumed the complex part (the driver) was the problem.
No comments:
Post a Comment