I figured I’d mention this since it was something I recently ran into.
Running OS X Yosemite on my Macbook Pro (Late-2011), the sound icon on the top bar was greyed out and the sound controls on the keyboard were disabled for internal speakers. If I selected any other sound device other than internal speakers, it activated.
I found that if I plugged a set of earbud headphones into the port for a little, it reset the sound control somehow and when I unplugged it was active for the internal speaker.