Whoa-k, it’s been a while…
So, I’ve got a Raspberry Pi Model B (256 MB RAM), on which I’m running Arch Linux ARM. I’ve come to really dig Arch even since installing it on an old ThinkPad X31.
I’m writing this because I fell in to some trouble with getting pianobar cleanly installed on my current setup and I figured I’d document it.
Firstly, I’d like to mention this SparkFun tutorial on getting Arch running on your Pi: DOOM on your Pi. It’s a very good tutorial!
So, to use the sound device, you need the device driver installed! Check if it’s installed by running the commands:
lsmod | grep snd_bcm2835
If you don’t see any output, you’ll need to install the driver:
sudo modprobe snd_bcm2835
To make sure it gets loaded on subsequent boots, let’s add a file to the
sudo nano /etc/modules-load.d/snd_bcm2835.conf
This file really only needs one line, but we’ll add a simple comment:
#Load 'snd_bcm2835' at boot snd_bcm2835
Here is some more info on loading kernel modules in Arch: Kernel Modules: Loading
With the sound driver installed, the next part was getting the sound out over the HDMI port. To do this you must edit the
sudo nano /boot/config.txt
Now, we want to tell the ALSA driver to explicitly send sound output over the HDMI port with the command:
sudo amixer cset numid=3 2
That last number, 2, is one of three options in this command. 0 is for auto-detect, 1 is the analog output, and 2 is for HDMI. More details here, under “Check if proper audio output is selected.”
NOTE: As of this writing, this command WILL NOT WORK AS EXPECTED on the latest Raspian image (2012-10-28-wheezy-raspbian) because the audio is set up differently in Raspian now. Raspian is using PulseAudio and cset=3 corresponds to ‘Master Playback Volume’, not ‘PCM Playback Route.’ This command will effectively turn your sound off because you’re setting the volume to 2.
Install git & libao, then download pianobar from the AUR into a new directory:
sudo pacman -S git libao mkdir ~/builds cd ~/builds wget http://bit.ly/Q8YXfm
Unpack the tarball:
tar xzvf cd ~/builds/pianobar-git
Modify the PKGBUILD file by changing the
arch=('i686' 'x86_64') line to
Install the package:
sudo pacman -U XXX.pkg.tar.xz
Finally, you’ll want to create an
Add these lines to the file: