

Also ensure that you use a player appropriate for the audio format. To test the sound output on your Pi, I found it best to the sample audio files that come with the Raspbian OS. Also, some of the MP3 files I used may not have been created with a compatible codec. Primarily, I tried to play an MP3 file with aplay, which only seems to support WAVs. I'm using Raspbian 3.6.11 (-wheezy-raspbian). But it was a problem with my approach, not the Pi itself. I ran into a problem where sound did not work or static played instead of my recording. To ensure the module is initialised on boot, add snd_bcm2835 to /etc/modules ( source). Sudo apt-get install alsa-utils is permanent, but sudo modprobe snd_bcm2835 only initialises the driver for the current session. And to test HDMI./hello_audio.bin 1Īlso note that you may have to add your user to the audio group to get permission to access the sound card. If you are running Debian, try cd /opt/vc/src/hello_pi Where n is one of: 0 = auto, 1 = headphones, 2 = hdmi. You can force it with: sudo amixer -c 0 cset numid=3 Sudo aplay /usr/share/sounds/alsa/Front_Center.wavīy default output will be automatic ( hdmi if hdmi supports audio, otherwise analogue). To try out sound, from the command prompt before "startx", type sudo apt-get install alsa-utils Sound is disabled by default because the ALSA sound driver is still "alpha" (not fully tested) on the R-Pi.


Sound does not work at all, or in some applications This fix may be necessary even if other HDMI devices work perfectly on the same monitor (or TV)!Įdit the /boot/config.txt file ( see Raspberry-Pi Configuration File) and add the following line to the configuration file: hdmi_drive=2 This is caused by some computer monitors which select DVI mode even if an HDMI cable is connected.
