I have an Apple TV2 hooked up to a DVI monitor by HDMI, an arrangement which doesn't support audio.
As the Apple TV2 also has SPDIF optical out, I connected this into my 2011 iMac's optical input so I could hear the ATV sound from the Mac. Looking at the sound input in System Preferences, I could see the connection was working, but I heard nothing from the iMac speakers, even though they were chosen for output. Then it dawned on me that the iMac likely didn't support audio passthrough.
I recalled that QuickTime Player could record audio from an input. So in QT I chose New Audio Recording, chose 'Digital in' as the input, and then slid the volume slider so I could monitor the audio. Works like a treat. There's no need to actually record anything in QuickTime Player.
[crarko adds: A clever solution. I have my Apple TV2 hooked up using the standard HDMI setup, so I did not test this.]
Mac OS X Hints