|Problem : Inserting the headphone to my HP DV8, the external speakers continue to play.
To get the speakers mute when the headphones are connected , I had to create alsa.conf
in the directory /etc/modprobe.d/ and added the following line :
options snd-hda-intel model=hp-dv5 enable_msi=1
This worked fine for me. My laptop has an an Intel HDA soundcard with the "codec IDT 92HD75B3X5".
You can check your codec with
grep Codec /proc/asound/card0/codec#0