Enable microphone of Ubuntu(10.04) on HP compaq 8200 elite small form factor

After the installation of Ubuntu 10.04 LTS, the microphone is not available by default. Here’s the guide to enable it.

1) get model information of your sound card

cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC662 rev1
Codec: Intel CougarPoint HDMI

2) install kernel documentation of your current kernel version

sudo apt-get install linux-doc

3) search the model name which matches the model information and machine best in this file

gunzip -c /usr/share/doc/linux-doc/sound/alsa/HD-Audio-Models.txt.gz | less
  3stack-dig    3-stack (2-channel) with SPDIF
  3stack-6ch     3-stack (6-channel)
  3stack-6ch-dig 3-stack (6-channel) with SPDIF
  6stack-dig     6-stack with SPDIF
  lenovo-101e    Lenovo laptop
  eeepc-p701    ASUS Eeepc P701
  eeepc-ep20    ASUS Eeepc EP20
  ecs           ECS/Foxconn mobo
  m51va         ASUS M51VA
  g71v          ASUS G71V
  h13           ASUS H13
  g50v          ASUS G50V
  asus-mode1    ASUS
  asus-mode2    ASUS
  asus-mode3    ASUS
  asus-mode4    ASUS
  asus-mode5    ASUS
  asus-mode6    ASUS
  dell          Dell with ALC272
  dell-zm1      Dell ZM1 with ALC272
  samsung-nc10  Samsung NC10 mini notebook
  auto          auto-config reading BIOS (default)

For HP compaq 8200 elite small, I can not find any HP product for ALC662, so I just try “dell”.
If you are using some other PC or laptop, maybe you need to check ALSA-Configuration.txt.gz first.
4) edit /etc/modprobe.d/alsa-base.conf
Add “options snd-hda-intel model=dell” to the end of this file alsa-base.conf

5) reboot

6) check alsamixer configuration, enable mic and capture, that’s it! 🙂

PS: HP compaq 8200 elite small has a internal speaker which is noisy, it can be disabled in BIOS configuration.