Currently Being ModeratedNov 25, 2012 1:53 PM (in response to macbookems)
The cause is a little leaf switch that is pushed over by the jack when you insert it. Sometimes these stick.
Try inserting and removing a jack a few (dozen) times.
If that doesn't free it you may attempt to tease it with a slim non-conducting tool (like a toothpick). Ensure the Mac is not only shut down, but unplugged if you try this.
And be careful; the leaf is fragile and it's an expensive bit to get to and replace, in fact on some models it's directly on the logic board.
Not sure how true it is, but at least one correspondent claims to have fixed it by cleaning the red laser with a Q-tip, on the theory that dirt on the end may fool the system into thinking a jack is inserted. Not convinced myself, but no harm trying it if you can't sort it the other way.