I'm on a MacBook Pro (2013) running OS X El Capitan 10.11.6. The speakers work as usual, but when I plug in headphones, the audio stops working. When I remove the headphones, the speakers work again as before.
With headphones plugged in, the only output device available is "Digital Out - Optical digital-out port", and when I try to change the volume there is a disabled symbol (and no volume bar is displayed).
I have tried rebooting, using a different set of headphones, resetting the PRAM, and cleaning the port, all to no avail. I do not see a red light in the port as many other questions have mentioned.