Ever since the Raspberry Pi came out, I’ve been experimenting with its audio capabilities. The latest audio gizmo available for it is the Wolfson Pi Audio Card, which promises 24 bit, 192kHz recording and playback, with analog and digital I/O, for a very reasonable price. So of course I ordered one straight away. 🙂
After waiting a month I finally got my hands on it. The software installation is somewhat unclear so I will document what I did here. I didn’t want to use the Wolfson official image as it was a massive 8GB download. I started with a copy of the image that I developed for PiTunes, and applied this patch to it, which adds the Wolfson kernel and the support files for the audio card. I then changed mpd.conf to use audio output device hw0,0 (it was previously 1,0 for the USB audio device) and added a call to SPDIF_playback.sh in my .bash_login file, to set the card up for digital output.
I also removed the invocation of pikeyd from /etc/rc.local, as the keypad and encoder were not present. They can’t be used anyway, since the Wolfson audio card hogs all of the GPIO pins. It doesn’t really matter, as MPD can always be controlled remotely.
On firing this up, I was surprised to find that it worked first time! 🙂 I verified the output to be bit perfect at 24 bit, 96kHz. This is possibly the best value for money HD audio source you can get anywhere: you should be able to pick up a Raspberry Pi, a Wolfson Audio Card, a wifi dongle and a hard disk for under £100.
Lately I’ve been listening to Soma FM a lot. I especially like their Groove Salad channel. They play Boards of Canada all the time, but that’s not necessarily a bad thing.
Anyway, their 128k MP3 stream has pretty decent quality – I guess it’s technically the same as a DAB radio station – and it plays on just about anything. Winamp on my PC, with its Delta 1010 hooked up to the stereo, no problem. Linosaur, my Linux server, was a little trickier, but once I figured out the stream URL, I pasted it into phpMP and saved it as a playlist, and off it went. I have a LCD and keypad hooked up to linosaur using LCDproc and a modified version of lcd-stuff, and I can play stuff from that.
Perhaps the coolest thing is that it plays on my Pocket PC (an old Ipaq hx4700) using GSPlayer. When you visit Soma FM’s page, it downloads a Winamp playlist onto your machine to start playback. That contains several streams, I guess as backup if some of them are down. I just got this groovesalad.pls file and copied it onto my PDA’s memory card. (I prefer to keep stuff on a card, since my hx4700 crashes and wipes its RAM with monotonous regularity.) When I run GSPlayer (which I also keep on the card to save reinstalling every 2 weeks) the playlist can be opened and the fat beats begin.
So, if I do this, and dangle my DSL modem/router out of the window, I can listen in the back yard while washing my bike. I’m off to do that now 🙂
If you’ve messed around with Linux, you might well have used the “tail” command. All it does is print the last few lines of a file. For example,
tail -n 10 /var/log/apache2/access.log
will show you the last 10 pages that the webserver served. (Assuming you’re running the 2.x version of Apache.)
But for extra geeky thrills, the -f option will make tail watch the file and print out any new lines as they appear. So:
tail -f /var/log/apache2/access.log
will print out whatever Apache is putting into the log file as it is putting it in. Handy for keeping an eye on log files when you’re debugging stuff.
You can crank the geeky thrills up another level by pipelining it into something else, like our old friend from Unix school,
grep. For instance,
tail -f /var/log/apache2/access.log |grep sheep
will alert you whenever anyone tries to access a page with “sheep” in the filename. How useful!
PS: press Ctrl-C to exit.