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?
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.