FYI,
I have a Compaq NC6120 Laptop with OS Ubuntu 10.04 LTS. I wasn't able to mute laptop speakers and listen only headphones. The sound came from both devices.
You can find your audio controlled with command lspci as follows;
Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
I got the sound work following way;
Add line into /etc/modprobe.d/alsa-base.conf as follows
options snd-hda-intel model=hp-dv5
I am not actually sure if this option is needed in alsa-base.conf but any case I added it !.
Install gamix if not already installed
sudo apt-get install gamix
reboot yr laptop
Open alsa mixer
Applications ->Sound&Video->ALSA Mixer
You should see on top
INTEL IHC6 with AD1981B : Analog Devices AD1981B
There is a checkbox "Headphone Jack Sense". Check the box. Then the sound is coming only from headphones provided that they are connected.
And when you disconnect the headphones, the sound is coming from laptop speakers.
I browsed very very many pages and follewed numerous instructions but no help. By accident, I found some instructions in forum.ubuntu-fi.org and with previously read information combined with forum info, I got the sound work correct way.
I hope that this will help Finnish users as well as all other, who may have problems with Intel IHC6 soundcard.
Lamprey from Naxbycity