Have you tried a PRAM reset?
If you look in the audio output port, is there a red light showing. If so, the internal switch is stuck.. Insert the headphones a few times, jiggle a toothpick inside or shot some compressed air to trip the switch. If no success, have the Apple store genius bar technician do it.
Hello, I have the same problem here on my Late 2011 17" MBP.
But resetting the PRAM didn't help it, nor wiggling headphones in the port.
Any ideas to get that fixed. I get perfect sound on headphones, and the speakers are obviously working perfectly, because the MACs startup boooong is comming loud and clear.
And right now, short after, trying to plug in a iphone microphone and control capable headphone into the jack helped it. But I get this problem every now an dthen.
What could be done about this?