Go to your "Audio MIDI Setup" in your utilities, then pick 48,000 HZ, 16 bit, and see if that works. If not, try 44,100 Hz, 16 bit.
Whichever one works, try the 20 bit version, and the 24 bit version, and see which one out of the three, 16, 20, and 24, plays without audio clipping and crappy sound, you'll know it when you hear it. Also make sure your media player (I use VLC) is set to HDMI auio output, but not encoded. Your volume control in the menu bar should be grayed out letting you know the audio is being outputted externally.
That is the only way I've been able to get my audio to work properly through HDMI since upgrading to Lion. I fought the same thing about 3 weeks ago and it took quite awhile for me to figure it out.