I have a mac mini (mid 2010) osx 10.7.4 with a HDMI output I am using to connect to a television. The other device I have connected to it (a PS3) has no problem using HDMI to output sound. When using system preferences>Sound>Output I can see the device (Name DM2350D,type HDMI), but it won't let me select. Specifically, it lets me select, then automatically switched back to headphones.
The problem resolved itself by unplugging the headphones. It seems the os is setup to always prefer the headphones when they are present.