As I encountered quite a few problems, I wrote a small tutorial on how to get HDMI audio working on the ODROID-C1.
Open up a root console and run "aplay -l" and "amixer". You should see this:
$this->bbcode_second_pass_code('', '# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMLM8AUDIO [AML-M8AUDIO], device 1: SPDIF PCM dit-hifi-1 []
Subdevices: 1/1
Subdevice #0: subdevice #0
# amixer
Simple mixer control 'Ext Spk',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'aml audio i2s mute',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'aml audio spdif mute',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
')
If you try to play something, you can actually hear some garbled sound coming out of my TVs speakers (but can't understand anything):
$this->bbcode_second_pass_code('', '# aplay -D hw:0,1 /usr/share/sounds/alsa/Front_Center.wav
Playback: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate: 48000 Hz, mono')
Then modify your /etc/asound.conf and /etc/pulse/default.pa as described here. In case this site is offline, I'll put the instructions here, too:
Put this into your /etc/asound.conf:
$this->bbcode_second_pass_code('', 'pcm.!default {
type plug
slave {
pcm "hw:0,1"
}
}
ctl.!default {
type hw
card 0
}')
Then open /etc/pulse/default.pa and find these lines:
$this->bbcode_second_pass_code('', '#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0')
Then change them to this
$this->bbcode_second_pass_code('', 'load-module module-alsa-sink
load-module module-alsa-source device=hw:0,1')
Please note: It's hw:0,1 and NOT hw:1,0!
Thanks to the change in /etc/asound.conf, you can now drop the "-D hw:0,1" part when using aplay, but the sound is still terribly distorted.
You can now use pulseaudio and the sound is fine. You just need to add your user to the audio group.
Note: I also ran this, but I do not know if it's neccessary to use HDMI audio as non-root user:
$this->bbcode_second_pass_code('', '# chmod 666 /dev/am*')