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

  1. Hi,
    Full marks for clear commands to get sound working.
    Worked first time – Now quake 3 will be so much better :-)
    thanks Nigel

  2. 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!

    • David booth

      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.txt
        Then you can uncomment (ie remove the leading ‘#’) for the desired line, for example, changing:
        #hdmi_drive=2
        to
        hdmi_drive=2
        Then press CTRL + X to quit, then press Y then Enter to confirm the modifications when prompted.

  3. No luck for me with debian6-19-04-2012 and the tips here.
    I installed ‘beep’ and even that doesn’t work :-(

  4. 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’.

  5. Hi!

    Can you force the digital audio out the RCA output?

    Gadgety

  6. Sir Scarfalot

    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

Trackbacks/Pingbacks

  1. 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 …
  2. Raspberry Pi As An Audio AirPlay Server | (^.=.^) - [...] http://mitchtech.net/raspberry-pi-audio/ [...]

Leave a Reply