Microphone doesn't work with Asus P5B

I try to use my microphone with Asus P5B motherboard, but it does not work. The sound output is perfect, but I cannot record with my known to work (tested) mic. I have tried to plug the mic into the on board and to the front panel jack. Same result.

A have tried to record with arecord, but it didn’t work.

tsalsa output

rpm -qa | grep alsa:

alsa-oss-1.0.15-48.1
alsa-utils-1.0.16-35.1
alsa-1.0.16-39.1
alsa-plugins-pulse-1.0.16-57.1
alsa-plugins-1.0.16-57.1
alsa-firmware-1.0.16-24.1
alsa-devel-1.0.16-39.1

rpm -qa | grep pulse:

libpulse-browse0-0.9.10-26.5
pulseaudio-module-zeroconf-0.9.10-26.5
pulseaudio-utils-0.9.10-26.5
alsa-plugins-pulse-1.0.16-57.1
pulseaudio-module-gconf-0.9.10-26.5
libpulse-mainloop-glib0-0.9.10-26.5
pulseaudio-module-x11-0.9.10-26.5
pulseaudio-module-lirc-0.9.10-26.5
pulseaudio-0.9.10-26.5
libpulsecore4-0.9.10-26.5
pulseaudio-esound-compat-0.9.10-26.5
libpulse0-0.9.10-26.5
vlc-beta-aout-pulse-1.0.0-2008121502.1

rpm -q libasound2:

libasound2-1.0.16-39.1

uname -a:

Linux Lorien 2.6.25.18-0.2-pae #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386 GNU/Linux

cat /etc/modprobe.d/sound:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

When I test my mic, I typically use a simple arecord command. ie something likearecord -d 10 myrecording.wavorarecord -d 10 -f cd secondrecording.wavwhere “-d 10” sets a 10 second recording. I then play back the recording with xine or mplayer or xmms (or any audio playback program).

When advising of the results of that, please make it clear as to whether you were trying your Internal mic or your external mic.

I note from the script that your PC has an AD1988.

You could try applying a model option to your /etc/modprobe.d/sound file to see if that works. The ALSA-Configuration.txt file for 1.0.16 of alsa has this list of model options:

  	AD1988
	  6stack	6-jack
	  6stack-dig	ditto with SPDIF
	  3stack	3-jack
	  3stack-dig	ditto with SPDIF
	  laptop	3-jack with hp-jack automute
	  laptop-dig	ditto with SPDIF
	  auto		auto-config reading BIOS (default)

Lets say one decides to apply the option “auto”. In your case, to apply it, change your /etc/modprobe.d/sound file (adding a line) such that it reads like this:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
options snd-hda-intel model=auto

and then restart your alsa sound driver with the following su -c ‘rcasasound restart’ and restart your mixer and test your mic.

If that fails, to test another option (say “6stack”) just replace “auto” with “6stack” in the /etc/modprobe.d/sound file, and restart alsa, restart mixer, and test again.

If you go through all of the model options, and none work, you could consider updating your alsa. I did a search on the ALSA web site for the AD1988 and I obtained this: Search results for AD1988 - AlsaProject as you can see, there have been various updates to the AD1988 since 1.0.16 of alsa (which is what is on your PC).

There is guidance for updating alsa here: Alsa-update - openSUSE In your PCs case, that means sending the following 6 commands from a gnome terminal or kde konsole, with root permissions, when connected to the internet. Send them one at a time in sequence:

zypper ar http://download.opensuse.org/repositories/multimedia:/audio/openSUSE_11.0/ multimedia 
zypper install alsa alsa-devel alsa-oss alsa-plugins alsa-plugins-pulse alsa-utils alsa-tools alsa-firmware libasound2
zypper rr multimedia
zypper ar http://download.opensuse.org/repositories/multimedia:/audio:/KMP/openSUSE_11.0_Update/ multimedia
zypper install alsa-driver-kmp-pae
zypper rr multimedia

then restart your PC and test your sound and microphone. Again, if that does not work, start applying different model options (one at a time) to the /etc/modprobe.d/sound file.

The ALSA-Configuration.txt file for 1.0.18a of alsa has the same options as 1.0.16 for the AD1988 (although the file is structured a bit different for that list):

AD1988/AD1988B/AD1989A/AD1989B
	  6stack	6-jack
	  6stack-dig	ditto with SPDIF
	  3stack	3-jack
	  3stack-dig	ditto with SPDIF
	  laptop	3-jack with hp-jack automute
	  laptop-dig	ditto with SPDIF
	  auto		auto-config reading BIOS (default)

Good luck.

Thank you very much, changing the model solved the problem. Thanks again.

Superb!

What model option did you end up using with your Asus P5B ?

I have set “6stack” instead of automatic. The board has 6 audio jacks, so this was the first thiing to try when I read you post. I was a bit suprised, that automatic couldn’t detect the correct model, since it is a quite old board.

One of the alsa developers wrote this about the difficulty in the auto probing of the hardware audio codec (from the HD-Audio.txt file that comes with 1.0.19 of alsa) :

HD-AUDIO CODEC

Model Option

The most common problem regarding the HD-audio driver is the unsupported codec features or the mismatched device configuration.  Most of codec-specific code has several preset models, either to override the BIOS setup or to provide more comprehensive features.

The driver checks PCI SSID and looks through the static configuration table until any matching entry is found.  If you have a new machine, you may see a message like below:
------------------------------------------------------------------------
    hda_codec: Unknown model for ALC880, trying auto-probe from BIOS...
------------------------------------------------------------------------
Even if you see such a message, DON'T PANIC.  Take a deep breath and keep your towel.  First of all, it's an informational message, no warning, no error.  This means that the PCI SSID of your device isn't listed in the known preset model (white-)list.  But, this doesn't mean that the driver is broken.  Many codec-drivers provide the automatic configuration mechanism based on the BIOS setup.

The HD-audio codec has usually "pin" widgets, and BIOS sets the default configuration of each pin, which indicates the location, the connection type, the jack color, etc.  The HD-audio driver can guess the right connection judging from these default configuration values.  However -- some codec-support codes, such as patch_analog.c, don't support the automatic probing (yet as of 2.6.28).  And, BIOS is often, yes, pretty often broken.  It sets up wrong values and screws up the driver.

The preset model is provided basically to overcome such a situation.  When the matching preset model is found in the white-list, the driver assumes the static configuration of that preset and builds the mixer elements and PCM streams based on the static information.  Thus, if you have a newer machine with a slightly different PCI SSID from the existing one, you may have a good chance to re-use the same model. You can pass the `model` option to specify the preset model instead of PCI SSID look-up.

What `model` option values are available depends on the codec chip.  Check your codec chip from the codec proc file (see "Codec Proc-File" section below).  It will show the vendor/product name of your codec chip.  Then, see Documentation/sound/alsa/HD-Audio-Modelstxt file, the section of HD-audio driver.  You can find a list of codecs and `model` options belonging to each codec.  For example, for Realtek ALC262 codec chip, pass `model=ultra` for devices that are compatible with Samsung Q1 Ultra.

Thus, the first thing you can do for any brand-new, unsupported and non-working HD-audio hardware is to check HD-audio codec and several different `model` option values.  If you have a luck, some of them might suit with your device well.

Some codecs such as ALC880 have a special model option `model=test`. This configures the driver to provide as many mixer controls as possible for every single pin feature except for the unsolicited events (and maybe some other specials).  Adjust each mixer element and try the I/O in the way of trial-and-error until figuring out the whole I/O pin mappings.

Note that `model=generic` has a special meaning.  It means to use the generic parser regardless of the codec.  Usually the codec-specific parser is much better than the generic parser (as now).  Thus this option is more about the debugging purpose.

There is more, but its very debugging specific.

My solution was much simpler.

I had originally selected the 1988DTS driver (the default) that is good for 2K and XP systems (I have XP with SP3). Sound came out the speakers, but no microphone worked. Windows reported that the drivers were working perfectly.

I uninstalled and re-installed, but this time chose the non-DTS driver specifically for XP only.

Your solution may differ, so be prepared to uninstall and re-install drivers.

Jeff

Hello oldcpu,

I have problem with my P5B microphone again. I haven’t used the mic for a long time, then I needed it again, and the result was disappointing. Using

arecord -d 5 myrecording.wav

the result is a noise similar to what you get with loose contacts. If I really speak to this recording, than small parts of my voice is recorded, but the noise is dominating. This is the result with two known to work mic with both the front and the back connector.

Unmuting the mic in Kmix results in a clear, noiseless amplification of my voice, so there are no physically loose contacts.

alsa-info.sh result

rpm -qa | grep alsa

alsa-plugins-1.0.21-14.2
alsa-driver-kmp-pae-1.0.21.20090909_2.6.27.29_0.1-1.1
alsa-oss-1.0.17-25.9
alsa-1.0.21-40.1
alsa-plugins-pulse-1.0.21-14.2
alsa-devel-1.0.21-40.1
java-1_6_0-sun-alsa-1.6.0.u15-0.1.1
alsa-firmware-1.0.20-5.1
alsa-utils-1.0.21-13.1

rpm -qa | grep pulse

pulseaudio-module-zeroconf-0.9.15-21.1
pulseaudio-module-lirc-0.9.15-21.1
pulseaudio-module-jack-0.9.15-21.1
pulseaudio-0.9.15-21.1
pulseaudio-module-gconf-0.9.15-21.1
libpulse0-0.9.15-21.1
libpulse-mainloop-glib0-0.9.15-21.1
pulseaudio-esound-compat-0.9.15-21.1
libpulse-browse0-0.9.15-21.1
alsa-plugins-pulse-1.0.21-14.2
pulseaudio-utils-0.9.15-21.1
pulseaudio-lang-0.9.15-21.1
pulseaudio-module-x11-0.9.15-21.1
libxine1-pulse-1.1.16.3-2.pm.5.3

rpm -q libasound2

libasound2-1.0.21-40.1

uname -a

Linux Lorien 2.6.27.29-0.1-pae #1 SMP 2009-08-15 17:53:59 +0200 i686 i686 i386 GNU/Linux

cat /etc/modprobe.d/sound

options snd-hda-intel model=6stack
options snd slots=snd-hda-intel
# u1Nb.kURRCMIOEo3:P5B
alias snd-card-0 snd-hda-intel

Thanks in advance.

You have the latest alsa release installed. My assessment, is your mixer is setup incorrectly.

Note it is a bit difficult for me to guess what you are trying to do when you run the diagnostic script. Use front mic? back mic? Line in ? Hence my comments may be tainted by that uncertainty (as to your intentions).

I note this from the diagnostic script

!!Amixer output
!!-------------

!!-------Mixer controls for card 0 [Intel]

Card hw:0 ‘Intel’/‘HDA Intel at 0xffaf8000 irq 22’
Mixer name : ‘Analog Devices AD1988’
Simple mixer control ‘Front Mic’,0
Front Left: Playback 20 [65%] -4.50dB] [off]
Front Right: Playback 20 [65%] -4.50dB] [off]
Simple mixer control ‘Front Mic Boost’,0
Front Left: 2 [67%]
Front Right: 2 [67%]
Simple mixer control ‘Mic’,0
Front Left: Playback 18 [58%] -7.50dB]** [off]**
Front Right: Playback 18 [58%] -7.50dB] [off]
Simple mixer control ‘Mic Boost’,0
Front Left: 2 [67%]
Front Right: 2 [67%]
Simple mixer control ‘Capture’,0
Front Left: Capture 32 [59%] -10.50dB] [off]
Front Right: Capture 32 [59%] -10.50dB] [off]
Simple mixer control ‘Capture’,1
Front Left: Capture 39 [72%] [0.00dB] [off]
Front Right: Capture 39 [72%] [0.00dB] [off]
Simple mixer control ‘Capture’,2
Front Left: Capture 39 [72%] [0.00dB] [off]
Front Right: Capture 39 [72%] [0.00dB]** [off]**
Simple mixer control ‘Digital’,0
Front Left: Capture 60 [50%] [0.00dB]
Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control ‘Input Source’,0
Capabilities: cenum
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: ‘Mic’
Simple mixer control ‘Input Source’,1
Capabilities: cenum
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: ‘Mic’
Simple mixer control ‘Input Source’,2
Capabilities: cenum
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: ‘Line’

You have

  • Input Source 0 is set to Mic. But when I look at the mixer control for Capture 0, it is OFF. ie the Mic is muted and can not possibly record.
  • Input Source 1 is set to Mic. But when I look at the mixer control for Capture 1, it is OFF. ie the Mic is muted and can not possibly record.
  • Input Source 2 is set to Line. Do you have an external device plugged in there? And when I look at the mixer control for Capture 2, it is off. ie you can not possibly capture anything from there.

ie those settings suggest your mixer is set up to stop any and all recordings.

Did you run that script at an appropriate time, to illustrate me what you were trying to do with the mixer? It appears your mics are muted, and I can not deduce any more.

What you need to do is setup your mixer EXACTLY how you believe it should be setup, then run the script with that setting in place, provide me the URL, and also describe to me what mic you are trying to use. …

Good luck. Hopefully this is just a simple mixer setting that you have overlooked.

OK, I have modified the mixer settings, hope that they seem correct now. Unfortunately nothing has changed.

The new info is: alsa-info

I tried to record both with back and front mic port, even without mic pluged in, with the same result. The mic is clearly audible in the speakers, only recording doesn’t work.
Is there a way to upload a short 5sec recording to show the problem?

The mic is a simple Genius one, integrated with headphones

That looks better. I note:
!!Amixer output
!!-------------
!!-------Mixer controls for card 0 [Intel]
Card hw:0 ‘Intel’/‘HDA Intel at 0xffaf8000 irq 22’
Mixer name : ‘Analog Devices AD1988’
Simple mixer control ‘Front Mic’,0
Front Left: Playback 20 [65%] -4.50dB] [on]
Front Right: Playback 20 [65%] -4.50dB] [on]
Simple mixer control ‘Front Mic Boost’,0
Front Left: 2 [67%]
Front Right: 2 [67%]
Simple mixer control ‘Line’,0
Front Left: Playback 0 [0%] -34.50dB] [on]
Front Right: Playback 0 [0%] -34.50dB] [on]
Simple mixer control ‘Mic’,0
Front Left: Playback 20 [65%] -4.50dB] [on]
Front Right: Playback 20 [65%] -4.50dB] [on]
Simple mixer control ‘Mic Boost’,0
Front Left: 3 [100%]
Front Right: 3 [100%]
Simple mixer control ‘Capture’,0
Front Left: Capture 39 [72%] [0.00dB] [on]
Front Right: Capture 39 [72%] [0.00dB] [on]
Simple mixer control ‘Capture’,1
Front Left: Capture 39 [72%] [0.00dB] [on]
Front Right: Capture 39 [72%] [0.00dB] [on]
Simple mixer control ‘Capture’,2
Front Left: Capture 39 [72%] [0.00dB] [on]
Front Right: Capture 39 [72%] [0.00dB] [on]
Simple mixer control ‘Digital’,0
Front Left: Capture 60 [50%] [0.00dB]
Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control ‘Input Source’,0
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: ‘Mic
Simple mixer control ‘Input Source’,1
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: ‘Front Mic
Simple mixer control ‘Input Source’,2
Items: ‘Front Mic’ ‘Line’ ‘Mic’ ‘CD’ ‘Mix’
Item0: 'Mic’I note a mix of Mic and Front Mic selected. Why not try just one setting at a time. Also, put the boost and capture up to really high (100%) and then back off those levels to reduce the distortion that you will get.

I can not see your PC, so I can not tell where these are physically located. For example on my laptop, one has to actually see the laptop to understand what the settings mean.

Also try instead this record command, as it gives better feed back:

arecord -vv -fdat foo.wav

where “foo.wav” is the file you will be creating. Reference: http://en.opensuse.org/Microphone

Try recording both as a regular user, and also with root permissions (ie type “su” first in a konsole/terminal when testing with root permissions)

I modified as you suggested and tried the more sophisticated arecord command and it works both with arecord and both with skype. However it seems that by default arecord recorded to 8 bit file, and somehow play didn’t realize it! This was the reason for distortion. I wouldn’t imagine that…

So thank you very much, now the mic works.

But I have one other problem, maybe I can make a new topic if you suggest.
Theoretically it is possible to use the front panel and back panel speaker jacks independently, so e.g. skype ring would go desktop speaker (back panel), while talking would go to headphones (front panel). Or music could be directed only to headphones. Under Windows I had success, but under OpenSuse I cannot achieve this. The front and back panel speaker jacks always play the same. In skype audio setup I see 5 devices:

HDA Intel (hw:Intel,0)
HDA Intel (plughw:Intel,0)
HDA Intel (hw:Intel,1)
HDA Intel (plughw:Intel,1)
hdmi

What are these? Everything works fine if I select HDA Intel (plughw:Intel,0). If I select HDA Intel (hw:Intel,0), than
only the left speaker works. The others don’t give any output on the speaker jacks.
In KMix it is possible to mute Headphone and desktop speaker (called Front) independently, but how can I order skype, or amarok, or VLC to playback only on the specified jack.

One short note. In skype for recording device only HDA Intel (hw:Intel,0) works. I’m simply lost in these device names…

I recommend you start a new thread with an appropriate title.

I think this Microphone thread is SOVLED.