Suppose you are listening to something on your PC, and you wish to record that sound. Here is a solution.
The sound is being played back on one of the output devices of your choice, an HDMI audio output in this case.
You can use, say, Audacity, for recording.
Use PulseAudio Volume Control (pavucontrol) to select the device you wish to capture from, which is the device you are playing the sound with.
http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_linux.html