I've got an HP Pavilion dv6 with beats audio, and I had the exact same problem. Alsamixer muted the 'Speaker' volume when I plugged my headphones in, and apparently, that is the volume the headphones use. I found the following workaround:
sudo gedit /usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones.conf
You'll find the line:
[Element Speaker]
switch = off
volume = off
Change it to:
[Element Speaker]
switch = on
volume = merge
Now, do the same with usr/share/pulseaudio/alsa-mixer/paths/analog-output-headphones-2.conf
and reboot. Now your headphones should work. However, when you unplug them the sound from your internal speakers will be at the same volume your headphones were at. So while this does not make the audio work as well as before, at least it doesn't mute your headphones all the time.
EDIT: Only one of the headphone jacks (the one at the front) is working for me, even though I changed headphones-2 as well. No idea why.
alsamixer
)