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've just installed Raspberry Pi and everything works great, except I can't get the default system sound to use HDMI. If I run something like omxplayer -o hdmi <filename> then the sound works, but I can't seem to get every application to just use HDMI audio by default. I have the line hdmi_drive=2 in my /boot/config.txt file. Is there anything else I need to do?

share|improve this question
add comment

1 Answer

Adding hdmi_drive=2 should work. Have you tried the following. Note that the answer says that the Alsa sound driver is not installed by default, it is as of June last year.

A small summary. By default output will be automatic (hdmi if hdmi supports audio, otherwise analogue). You can force it with:

sudo amixer cset numid=3 <n>

where n is 0=auto, 1=headphones, 2=hdmi. If you are running Debian, try

cd /opt/vc/src/hello_pi/hello_audio
make
./hello_audio.bin

to test analogue output. And to test HDMI.

./hello_audio.bin 1

Also note that you may have to add your user to the 'audio' group to get permission to access the sound card.

share|improve this answer
add 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.