Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

Your Answer


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.