All HDMI is not created equal - different 'versions' of the specification - neither are all HDMI "cables" created equal.
From > Mac computers: Frequently asked questions about using HDMI - Apple Support
...
MacBook Pro with Retina display (Mid 2012) and later models
...
You don't give us your OS X version. Sooo...
https://support.apple.com/kb/PH19036
Apple Inc.
A list of your computer's audio devices appears. If HDMI Output or HDMI/DisplayPort output is listed, your computer's Mini DisplayPort can send audio.
https://support.apple.com/kb/ph13801
Apple Inc.
A list of your computer's audio devices appears. If HDMI Output or HDMI/DisplayPort output is listed, your computer's Mini DisplayPort can send audio.
If you could give us ALL the details of your Mac and OS X plus your TV make and model and your HDMI cable brand - everything in the 'chain' in other words - may be that we can be more specific.