Tuesday, August 23, 2011

microphone doesn't do stereo on asus 1001p

The mic on my asus eee 1001p doesn't work correctly under Linux (apparently also on a number of models of the eee). In pulseaudio, it shows up as a stereo mic but the two channels cancel each other out so if you want it to work, you have to adjust one of the channels down to 0 (I use the pulseaudio volume control for this, pavucontrol). However, it's annoying that this doesn't just work. I've looked for solutions since I bought the device and I finally found one this week.

The correct solution is a kernel patch which appears to be on its way to kernel land. But while I'm waiting, I found a suitable workaround using the hda-verb utility. Here's the magic incantation below. Update the /dev/snd/* path to whatever is right for your system and then take the "value" output of the 2nd command and do a bit-wise or of 0x80 (in my case, 0x1800 became 0x1880) and use that as the last argument to the last command below.


# ./hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x07
nid = 0x20, verb = 0x500, param = 0x7
value = 0x0
# ./hda-verb /dev/snd/hwC0D0 0x20 GET_PROC_COEF 0
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x1800
# ./hda-verb /dev/snd/hwC0D0 0x20 SET_COEF_INDEX 0x07
nid = 0x20, verb = 0x500, param = 0x7
value = 0x0
# ./hda-verb /dev/snd/hwC0D0 0x20 SET_PROC_COEF 0x1880

No comments: