I don't know if you already posted a solution for this issue, but after done some searching i couldn't find anything. When i plug my headphones into the combo jack (i don't know if it's the actual name, but this is how i call it cause it's one hole for mic/headphones), the sound secuentially changes between headphones and the laptop speakers. It is very annoying and it caused me some trouble, because i work in a university science lab in bioinformatics with many other people, and i cant listen to my music.

This is not a problem that happens everytime i plug my headphones, it just randomly appears. When it occurs, after checking the mic/speakes levels were you can choose the line out under "connector" i saw that ubuntu automatically switch between headphones and speakers and the light of F11(mute speakers) button blinks.

I'm under Ubuntu 12.04 LTS 64bits and my laptop it's an HP Pavilion dm1 3260. Sorry for my english and i'm hoping you can help me.