11

I'm having problems getting audio over HDMI working correctly (running ArchARM). I have in my /boot/config.txt:

hdmi_drive=2

I compiled hello_audio.bin and ran it with 0 and 1 as args, both work (through the TV and the jack)

Sound over the analogue jack works fine with aplay when I switch with:

amixer cset numid=3 1

But I can't get aplay to play wav files over HDMI (I switched to hdmi with amixer cset numid=3 2)


Just to update: I can play mp3 files in mpg123/mplayer over HDMI but still no luck with wavs.

Adam Lear
  • 101
  • 4
Munkeh
  • 681
  • 4
  • 9
  • Yeah I've tried all the above as root and as a normal user (which I added to group audio) – Munkeh Jul 02 '12 at 15:04
  • Have you solved this @jake? – Alex Chamberlain Jul 06 '12 at 18:15
  • I have same symptoms as you: hello_audio.bin works to either analog or HDMI output (with 0 or 1 args respectively). aplay over analog jack works with amixer cset numid=3 1 aplay over HDMI does NOT work with amixer cset numid=3 2 I have also set hdmi_drive=2 (otherwise hello_audio.bin doesn't work over HDMI) I have the B version (256MB) of the raspberry pi, running 2012-10-28-wheezy-raspbian.zip. (Sorry I would have posted this as a comment instead of an answer but comments seem to be closed??) –  Nov 05 '12 at 00:35
  • I never managed to solve this by the way. Maybe it's something to do with the way ALSA decodes WAV over the HDMI driver, fsck knows! Not an issue any more, but still mystifying. – Munkeh Dec 17 '12 at 00:39

2 Answers2

3

this worked for me:

omxplayer -o hdmi audiofile.wav

it seems that aplay doesn't really do a good job sending audio through hdmi in other formats either, it turns everything to mono, 8bit, and 8000hz or something. Anyway, that worked for me!

Athan Clark
  • 150
  • 7
2

I'm pretty sure you have to specify the device with aplay like this:

aplay -D plug:hdmi music.wav
Jivings
  • 22,538
  • 11
  • 90
  • 139