Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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.

share|improve this question
    
Are you root? –  Alex Chamberlain Jul 2 '12 at 15:00
    
Yeah I've tried all the above as root and as a normal user (which I added to group audio) –  Munkeh Jul 2 '12 at 15:04
    
Have you solved this @jake? –  Alex Chamberlain Jul 6 '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??) –  user3165 Nov 5 '12 at 0: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 0:39
add comment

2 Answers

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!

share|improve this answer
add comment

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

aplay -D plug:hdmi music.wav
share|improve this answer
    
If this is true, then this answer is wrong. –  Alex Chamberlain Jul 2 '12 at 15:52
    
If this isn't true then that answer is right. –  Jivings Jul 2 '12 at 15:54
    
No, silly CS students... –  Alex Chamberlain Jul 2 '12 at 15:55
1  
That yields an error about an unknown PCM. There's no mention of plug:hdmi in aplay -L. Only default:ALSA –  Munkeh Jul 2 '12 at 15:59
    
@Jake Have you tried using omxplayer? I'm sure that will dispel all of your problems. –  Jivings Jul 2 '12 at 20:07
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.