I suggest you read the very last line in this post before you read through the entirety of the post, because it might not be what you are looking for..
Issue: Earphone plugged in. Audio from both the headset and the system speaker on my HP Dv6 2171ee..
Simple solution: Change connector option from Sound Preferences window.
If this doesn’t work for you too here is,
Things i did:
Take Applications>Accessories>Terminal and paste this there.
wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh
This will give you a link. Open it, find your codec information. Just search with in the page “HDA-Intel Codec information !!”..this should help you if the codec is either “Realtek ALC888” or “IDT 92HD75B3X5”
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa; sudo apt-get update;sudo apt-get dist-upgrade; sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-`uname -r` linux-alsa-driver-modules-$(uname -r) libasound2; sudo apt-get -y –reinstall install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop linux-image-`uname -r` linux-alsa-driver-modules-$(uname -r) libasound2; killall pulseaudio; rm -r ~/.pulse*
This did it for most.. Obviously not enough for my lap..
Ill let you know what i did next though..
1. In terminal, type the following, to let you edit alsa-base.conf .
gksudo gedit /etc/modprobe.d/alsa-base.conf
2. Now, add this to the end of the file
options snd-hda-intel model=
4. Open the alsa-base.conf file again and add after the “options snd-hda intel model=” “3stack-hp” now if it is not HP, add from the list available on the forum..(If i was going to direct you to the forum anyway, why read through all this?? hmm… I’m thinking along those lines now..)
5. Now try and change the connector options from the sound preferences window.
This worked for me.. It does mute my system speakers. Only problem is, I’ve to change this every time i plug in the headset..