Raspberry Pi Audio
Currently, the audio drivers for the Raspberry Pi are still in beta, and as such come disabled in the standard release (debian6-19-04-2012.zip). Here’s a quick way to get it up and running for both the HDMI as well as the analog output. Open up a terminal and install the alsa (Advanced Linux Sound Architecture) utility package:
sudo apt-get install alsa-utils
Now load the sound driver using modprobe:
sudo modprobe snd_bcm2835
By default output will be automatic (HDMI if supported, else analog). You can force it to use a specific interface with:
sudo amixer cset numid=3
Substituting <n> for the desired mode: 0=auto, 1=headphones, 2=hdmi. For example, to force the Raspberry Pi to use the analog output:
sudo amixer cset numid=3 1
12 Comments
Trackbacks/Pingbacks
- Malina je doma, co dál? | RASPI.cz - [...] nejsou úplně ťip ťop. Máte dvě možnosti – buď si zvuk zprovoznit např. pomocí tohoto návodu (mě pomohl), nebo ...
- Raspberry Pi As An Audio AirPlay Server | (^.=.^) - [...] http://mitchtech.net/raspberry-pi-audio/ [...]









Hi,
Full marks for clear commands to get sound working.
Worked first time – Now quake 3 will be so much better
thanks Nigel
Hi,
Thx it works
If you want to use the audio over HDMI (wasn’t working for me) you might want to enable or add hdmi_drive=2 in the /boot/config.txt file (using Debian beta 2012-06-18 wheezy)
This forces HDMI mode (audio) instead of DVI mode (no audio)
Thanks for the tip flos!
Hi
I have 2012-07-15 wheezy but get no sound through the hdmi or audio jack. So I would like to do what Flos says but I haven’t a clue how to ” add hdmi_drive in the …. etc etc”. Please could you be more specific for a beginner like me.
Thanks. Dave
Hi Dave,
The file, /boot/config.txt is just a plain text file that be edited to change some default settings for the Raspberry Pi. You can use a text editor such as nano to edit it as root (sudo). In a terminal, run:
sudo nano /boot/config.txtThen you can uncomment (ie remove the leading ‘#’) for the desired line, for example, changing:
#hdmi_drive=2to
hdmi_drive=2Then press
CTRL + Xto quit, then press Y then Enter to confirm the modifications when prompted.No luck for me with debian6-19-04-2012 and the tips here.
I installed ‘beep’ and even that doesn’t work
Hi Rich, it looks like this is no longer necessary in the newer images. Give it a try with 2012-06-18-wheezy-beta.zip or more recent image.
If you don’t want to have to load the driver each time you log in, add ‘snd_bcm2835′ on a new line to ‘/etc/modules’.
Thanks for the tip Chris!
Hi!
Can you force the digital audio out the RCA output?
Gadgety
Hi!
So, I just got a raspberry pi, and the audio worked straight out of the box. However, in a noobish attempt to configure the audio settings to headphones only, I opened the application “python games”, thinking it was a config tool. It opened with a dialogue to force headphones, so I clicked that, but it now completely fails to give sound from any source. I tried changing the configurations and using the tips provided here, rebooted, full powerdown, etc but sound just won’t happen anymore! Halp?
Sir Scarfalot