My headphone jack and speakers sopped working
The solution is from here and it worked with me:

There seems to be a bug whereby if the headphones are plugged in when the MBP is put to sleep and are not present when it is rewakened, the headphones stop being recognized. The solution is to:

Unplug the headphones
Put the MBP back to sleep (close the lid; without an external display hooked up)
Plug the headphones back in
Wake the MBP by opening the lid.

This should fix the problem.