You are not logged in.

#1 2012-01-12 11:26:02

goulo
Member
From: Poland
Registered: 2012-01-10
Posts: 6

[SOLVED] Asus 900 : ALSA plays sound, but microphone doesn't work

Hi,

This week I installed Arch Linux (kernel 3.1.8-1-ARCH) on my Asus 900 with HDA Intel Realtek ALC662 rev1 sound card. The wiki and google and existing forum posts have been good for most issues, but I'm stumped on ALSA configuration. So here's my first forum post for advice. smile

I configured sound OK following advice in the wiki and twiddling settings with alsamixer, through both the internal speaker and through the headphones, but I can't get internal or external microphone to work. I'm testing with:
arecord -d 3 junk.wav
then when I play back via:
aplay junk.wav
there is only soft static (with audible soft clicks at the start and end).
(Other files like /usr/share/sounds/alsa/Front_Center.wav play fine.)

alsamixer recognizes and reports my HDA Intel card, Realtek ALC662 rev1.

https://wiki.archlinux.org/index.php/Alsa has several suggestions of options for the snd-hda-intel module.
Different pages suggest different places, which was confusing until I discovered that they can go in any file in /etc/modprobe.d so I'm putting them in /etc/modprobe.d/snd-hda-intel.conf .

I added
options snd-hda-intel enable_msi=1
with no luck.

I have tried various model=XXX parameters (based on many suggestions found googling for Asus 900, alsa, ALC662, etc problems):
options snd-hda-intel model=auto
options snd-hda-intel model=asus
options snd-hda-intel model=asus-laptop
options snd-hda-intel model=laptop
options snd-hda-intel model=ref
options snd-hda-intel model=asus-mode1
options snd-hda-intel model=asus-mode2
...
options snd-hda-intel model=asus-mode8

and I do
rmomd snd-hda-intel && modprobe snd-hda-intel
after each modification, which makes a little click in the speakers as the module is restarted.

I don't know what the differences between asus-mode1, asus-mode2 etc are supposed to be - I've failed to find clear documentation about them, but AFAIK they seem to be the only valid model choices, unlike stuff like laptop, asus, etc.
I find asus-mod1 etc at https://github.com/torvalds/linux/blob/ … _realtek.c and various other webpages.
I found they vary the items presented by alsamixer but none of the 8 asus-modeN values helped me get the mic working. (The only obvious change was asus-mode8 made my headphone stop working, unlike asus-mod1 through asus-mod7.)

I looked at /var/log/kernel.log when doing the snd-hda-intel module reload for various values of model= and they all look similar to this:
snd_hda_intel 0000:00:1b.0: PCI INT A disabled
snd_hda_intel 0000:00:1b.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
snd_hda_intel 0000:00:1b.0: irq 43 for MSI/MSI-X
snd_hda_intel 0000:00:1b.0: setting latency timer to 64
hda_code: ALC662 rev1: BIOS auto-probing
input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/input/input24
input: HDA Intel Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input25
input: HDA Intel Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input26

(Note the emphasized line about BIOS auto-probing only comes up when not using model= or when trying various suggested model values that don't seem to be actually defined for ALC662, e.g. stuff like model=asus, etc.)

Here's a list of alsamixer settings I used for various models. (Note I also tried muting and raising various higher boost levels, and when there's an Internal Mic or F-Mic item I tried various combinations. The following are just what seem the most plausible settings to me.)

model=asus
model=asus-auto
model=auto

alsamixer presents 14 items (boosts are paired) :
Master 100 (dB gain: 0.00)
Headphone 00
Speaker 100 (dB gain: 0.00, 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
Mic Boost 22 (dB gain: 10.00, 10.00)
Mic Boost 22 (dB gain: 10.00, 10.00)
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Auto-Mute Mode Enabled
Digital 25 (dB gain: 0.50, 0.50)
Internal Mic 56 (dB gain: 0.00, 0.00)
Internal Mic Boost 22 (dB gain: 10.00, 10.00)
Internal Mic Boost 22 (dB gain: 10.00, 10.00)

model=asus-mode1
alsamixer [All] presents 8 items:
Master 100 (dB gain: 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)

speaker & headphones work, neither mic works

model=asus-mode2
alsamixer [All] presents 11 items:
Master 100 (dB gain: 0.00)
Headphone 00
Speaker 100 (dB gain: 0.00, 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)
F-Mic 56 (dB gain: 0.00, 0.00)

model=asus-mode3
alsamixer [All] presents 9 items:
Master 100 (dB gain: 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)
F-Mic 56 (dB gain: 0.00, 0.00)

model=asus-mode4
alsamixer presents 9 items
Master 100 (dB gain: 0.00, 0.00)
Headphone 100 (dB gain: 0.00, 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)

model=asus-mode5
alsamixer presents same 9 items as asus-mode4

model=asus-mode6
alsamixer [All] presents 9 items same as asus-mode3

model=asus-mode7
alsamixer [All] presents 12 items:
Master 100 (dB gain: 0.00, 0.00)
Headphone1 00
Headphone2 00
Speaker 100 (dB gain: 0.00, 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)
IntMic 56 (dB gain: 0.50, 0.50)

model=asus-mode8
alsamixer [All] presents 11 items:
Master 100 (dB gain: 0.00, 0.00)
Headphone1 00
Headphone2 00
Speaker 100 (dB gain: 0.00, 0.00)
PCM 100 (dB gain: 0.00, 0.00)
Mic 56 (dB gain: 0.00, 0.00)
S/PDIF mute
S/PDIF Default PCM 00
Beep MM
Capture 14 (dB gain: 0.00, 0.00)
Digital 25 (dB gain: 0.50, 0.50)

No headphone output for asus-mode8!?

I'm not interested in doing anything fancy (e.g. mixing multiple sources or whatever), I just want basic mic functionality.

Finally here's some info requested from the archlinux.org/index.php/Alsa:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ lsmod|grep snd
snd_hda_intel          19325  0 
snd_hda_codec_realtek   211044  1 
snd_hda_codec          69829  2 snd_hda_intel,snd_hda_codec_realtek
snd_hwdep               4942  1 snd_hda_codec
snd_pcm                60207  2 snd_hda_intel,snd_hda_codec
snd_timer              15438  1 snd_pcm
snd                    43817  6 snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore               5018  1 snd
snd_page_alloc          5869  2 snd_hda_intel,snd_pcm

$ ls -l /dev/snd
total 0
drwxr-xr-x 2 root root       60 Jan 11 20:43 by-path
crw-rw---T 1 root audio 116,  5 Jan 11 20:43 controlC0
crw-rw---T 1 root audio 116,  4 Jan 11 20:43 hwC0D0
crw-rw---T 1 root audio 116,  3 Jan 11 21:01 pcmC0D0c
crw-rw---T 1 root audio 116,  2 Jan 11 21:01 pcmC0D0p
crw-rw---T 1 root audio 116,  1 Jan 11 15:23 seq
crw-rw---T 1 root audio 116, 33 Jan 11 15:23 timer

Has anyone got sound recording working on an Asus 900 with HDA Intel Realtek ALC662 rev1 ...?

Thanks for any help! (And for feedback whether this post gave too much info or not enough, or other suggestions for posting such requests. Sorry if this was too long, but it seemed better to err on the side of too much info...)

Last edited by goulo (2012-01-13 18:30:13)

Offline

#2 2012-01-12 16:26:25

matse
Member
Registered: 2011-04-27
Posts: 299

Re: [SOLVED] Asus 900 : ALSA plays sound, but microphone doesn't work

Hello,
I don't have your soundcard but maybe the following information is helpful, though:
Install the linux-docs package, then you have some information about your soundcard drivers in "/usr/src/linux-*/Documentation/sound/alsa/". Exspecially "HD-Audio.txt" and "HD-Audio-Models.txt" might be important. In the Models file it is stated that just the "asus-mode*" are legitimate model parameters for your soundcard and in the HD-Autio.txt file it is more or less said that trial and error the modules is the way to go to find the "correct module". Further there is a section

Capture Problems
~~~~~~~~~~~~~~~~
The capture problems are often because of missing setups of mixers.
Thus, before submitting a bug report, make sure that you set up the
mixer correctly.  For example, both "Capture Volume" and "Capture
Switch" have to be set properly in addition to the right "Capture
Source" or "Input Source" selection.  Some devices have "Mic Boost"
volume or switch.

When the PCM device is opened via "default" PCM (without pulse-audio
plugin), you'll likely have "Digital Capture Volume" control as well.
This is provided for the extra gain/attenuation of the signal in
software, especially for the inputs without the hardware volume
control such as digital microphones.  Unless really needed, this
should be set to exactly 50%, corresponding to 0dB -- neither extra
gain nor attenuation.  When you use "hw" PCM, i.e., a raw access PCM,
this control will have no influence, though.

It's known that some codecs / devices have fairly bad analog circuits,
and the recorded sound contains a certain DC-offset.  This is no bug
of the driver.

So check your mixer,  here and here are nice tutorials.
Greetings
matse

Last edited by matse (2012-01-12 16:30:09)

Offline

#3 2012-01-13 15:22:40

goulo
Member
From: Poland
Registered: 2012-01-10
Posts: 6

Re: [SOLVED] Asus 900 : ALSA plays sound, but microphone doesn't work

Thanks very much matse! That was helpful indeed, and I have sound input working now. Thanks for the good tutorial links.

(FWIW, the thing I had been missing was the need to space-bar toggle "Capture" to "CAPTURE" mode in alsamixer. Doing that, it works without even needing the model= option. Also for some reason toggling CAPTURE isn't even possible on the Mic for me, despite various docs mentioning the need to do it.)

Offline

Board footer

Powered by FluxBB