I've been fooling around with a Raspberry Pi since the original Model A with just 256MiB RAM was first produced in February 2012, upgrading to the Model B (700 MHz ARM1176JZF-S single-core with ARMv6 CPU, 512MiB RAM) when it was produced.
I missed the B+ for some reason. Not through cost. These little marvels sell for under £30.00 here in the UK!
This week I got my hands on the new Raspberry Pi 2 Model B which has a Broadcom BCM2836 ARMv7 Quad Core Processor running at 900MHz with a 'whopping' 1 GiB RAM. Some difference...
Coincidently my media PC died a couple of weeks ago. This was a beast in a huge Antec Solo II SPCR 'SilentPCReview' case that ran MythTV, XBMC and an mpd server with all audio passing through an asynchronious USB DAC from HST, the Music Streamer II+. The PC's resemblance to the monolith in Space Odyssey was uncanny and drew the eye. Unassuming it was not, but austere, with presence. I like that.
The sound was output through a pair of AudioEngine 5+ powered speakers plus matching S8 powered sub-woofer. Enough bass to punch a hole in the floor and walls if needed (it is not needed).
Anyway, after about 6 years uptime (more or less, just rebooting for kernel updates and replacing drives and stuff) the insides started falling apart enough for a new motherboard, processor and RAM to be needed... and I don't have the income I had years ago when I originally set it up, so no replacement there.
So we bit the bullet and purchased a smart LED HD TV to replace the MythTV side of the equation (this TV can record programmes) and it is a pleasure to watch in HD compared to the cheap and cheerful ACER monitor we had previously been used to (no HD on that).
That solved the TV side of things. Recording the programmes, and being able to pause mid-programme are top priorities for us so we can miss the garbage adverts. One thing about MythTV I admired was the ability to rip out the advert breaks, but the smart TV does an OK job. Tis a shame it only has one tuner though, my MythTV box had four and I miss the ability to record programmes that clash their timing. The built-in catchup TV apps negate that to some extent.
But hold on, what about the music!!!
First of all, let me stress that I am NOT an audiophile. It is worth repeating - I am NOT an audiophile! I shudder at the thought. The audio setup I explain here is absolutely fine for me. My interconnects don't even need a small mortgage to pay for them lol, which surely must exclude me from that already exclusive group - I kid you not! The DAC is probably the most audiophilish thing I have in this setup and that is because even I can tell how much better the music sounds when played through it.
The TV is already playing through the sound system, no problem. The speakers are therefore physically static so a music source has to be located where it can be connected to them. At first I thought I'd use an old netbook to run mpd and connect the Music Streamer II+ DAC to that. It worked OK but with the obvious drawback of the netbook being tied up to a relatively trivial task and therefore out of action for all the other things a netbook is more appropriate for, like being mobile! Duh.
And then, fortuitously, the Raspberry Pi 2 arrived through the post the day following its launch announcement. What follows doesn't need the additional power of the Pi 2, but it is nice to have, and since its arrival was perfect timing I replaced the netbook with the Pi 2 and an hour or two later was serving music to the flat through it. With one small problem... which I will expand on shortly.
Installation & setup
The Pi 2 is running the latest Raspbian distro (command-line only, no X, based on Debian) so takes advantage of the new processor. It is running headless, although I initially connected it to a monitor via an HDMI cable to configure it and start the ssh daemon for remote access.
I downloaded Vim (because I can...), mpd, mpc, mpdscribble, the nfs client software (this was already in the distro so not needed) and lame (for streaming). I mounted my 4TiB NAS drive on the Pi 2 using nfs. The NAS has all of my music and media. I edited /etc/mpd.conf to reflect the location of the music, to allow access for other boxes on my network, and to use the USB DAC. I edited /etc/defaults/mpdscribble so it started in daemon mode and /etc/mpdscribble.conf so that it could access last.fm and scrobble my music (mpdscribble is a scrobbler). All that was needed now was to initiate an mpd database update which I did using ncmpcpp from another box (I had downloaded mpc onto the Pi 2 if I needed to do this locally). ncmpcpp is the dog's bollox of mpd clients as far as I'm concerned. It outclasses everything, especially the GUI clients because it is entirely flexible config wise. Some may find that a problem. We all have our likes and dislikes (my second favourite client is MPDroid from namelessDev on my Android phone. A top app and I can stream mpd output to the phone using MPDroid too. Which is totally cool).
Approximately 2 hours later, the update had completed (it is a large collection) and I was playing music on the Pi 2 through the USB Music Streamer II+ DAC and in sonic self-congratulatory heaven. For a while...
Doh! Snap crackle pop...
Most of my music is ripped as FLAC, at 44.100khz/16bit, but I do have some 96khz/24bit rips e.g. My Bloody Valentine's 'M B V' which they made available as a download. Playback of these 96khz/24bit files has been no problem through the DAC using the old PC or the netbook, but on the Pi 2 there are some occasional pops and clicks, barely audible but once heard, never not heard. As a result, these tracks are impossible for me to listen to with any pleasure. To circumvent this I've had to use /etc/mpd.conf to downsample/decimate these rips to 44.100khz/16bit. This is simple enough to do using the following edit to the ALSA audio output section:
But it sticks in my craw to have to do it.
So, unlike the previous incarnations, the DAC is no longer playing bit-perfect audio of a tiny subset of my music.
For the record, I use a powered USB hub with the DAC having exclusive access to its own bus, so lack of power can be ruled out and since this has been the same setup with the two previous incarnations of mpd it has to be something to do with ALSA in Raspbian or even the Pi 2 itself. I've stopped all unnecessary services as recommended on this page Raspberry Pi and realtime, low-latency audio although I'm not sure of the jackd stuff at the end of the page. jackd seems foo-barred in Raspbian and I thought it was for X anyway. Ho hum...
If anybody has any bright ideas I'd be grateful for a helpful comment. Pretty please... I'm working my way through web searches as I write.
And just to finish it off, much as like the barebones Pi 2, I pimped it with the outstanding FLIRC aluminium core case. Without overdoing the use of the expression 'the dogs bollox', it truly is the dogs bollox of Pi cases (IMNSHO). Really neat and s-o-p-h-i-s-t-i-c-a-t-e-d.
Now, just let's sort out the noise...
UPDATE Feb 12th 2015
Using OpenElec (5.03 latest as I write, Pi 2 build) has the same problem as Raspbian with 96khz/24bit FLACs - they also need to be decimated to 44.100khz/16bit on this distro (easily done in the setup section). I think it is something to do with the Pi 2 hardware but I haven't looked very hard at how OpenElec deals with audio, ie if it uses ALSA or not. I'll continue to investigate though.
UPDATE Feb 16th 2015
I have now tried Volumio which describes itself as:
A revolutionary audiophile music player.
A truly new listening experience.
Volumio is an entirely new music system. It is designed to play all your music, whether is an Hi-Res file or a Web Radio, with the highest quality. Control it with your favourite device, a smartphone, pc or tablet, and enjoy your music as you never did before.
Anyway, after a couple of hours updating the database, I got much the same result. Perhaps a 50% improvement, but still the odd crackle and pop.
Then I rebooted and Volumio had a kernel panic, duh... It seems to be slightly unstable on the new Pi 2 platform judging by the posts in the forum. It has only just been recompiled to take advantage of the Pi 2's new ARM7 processor.
On a more positive note, it is gorgeous to look at and simple to setup. It defaults to music being played back through a USB DAC so takes away some of the pain associated with that (if you consider that to be a pain...), and more importantly perhaps, with some additional clever tweaks for better audio quality. It is basically mpd with bells and whistles and although it has been around for a while now, I suspect I will return to it when more stable and have another go. It is a lovely project and worth keeping an eye on it.
Hopefully, next up is the Ubuntu 14.10 / Linaro 15.01 "developer" image that has just been made available to the community from wintrmute (latest torrent at the time of writing). If it is the wintrmute I think it is*, I know him well and used to work with him too, so kudos! Small world.
However, I don't really need X, and this has the lightweight LXDE included. I might try it with OpenElec plus mpd and get the best of both (or possibly the opposite). I don't like the way OpenElec/XBMC/Kodi and their clones manage music, and the web clients suck badly IMHO. I don't have the skills to write a web client and I prefer mpd to manage music anyway, so let's see how it goes.
*Indeed it is!
UPDATE Mar 20th 2015
I now have Squeezelite installed on the Pi 2 and controlling it from the open sourced Logitech Media Server. I have an original SlimDevices Squeezebox from before that company was bought out by Logitech (probably eight or nine years old and promptly renamed the 'classic' as a raft of slick new streaming devices followed the aquisition until they stopped production last year, duh).
It is (or was) a wonderful piece of kit but like many of its age has succumbed to a dry joint somewhere on its ancient and creaking motherboard and doesn't work reliably. I am not alone. There is a huge thread somewhere that I can't be bothered to find again.
However, getting Squeezelite up and running on the Pi was a doddle following a howto I found on the net - a big thankyou for that, or Een zeer grote danku as the guy is Dutch.
A big bonus is the controller and player apps that can be installed on my Android Nexus phone and tablet. Streaming across my network using MPDroid was a bit sluggish (aka shite) and much as I love MPDroid, it was frustrating. Using the phone & tablet as separate players is a less frustrating solution.