A Raspberry Pi is heading up my hi-fi – and how to set up the RPi with Volumio

But first, a little history.

For more than a decade, I’ve been ripping my CDs and streaming music from a hard disk, USB drive or NAS (network attached storage) drive. From the first, the set-up sounded better than playing a CD – even through the same DAC.

First Windows, then OS X

My first experiments were with a Windows desktop, later followed by a MacBook and a couple of Mac minis and an iMac in various systems and configurations. Apple had established itself right through my home and business, with iTunes sitting at the centre of my musical life – later, I ripped DVDs and BluRays into a format that iTunes was happy with, so it handled all our music and video media.

…then Linux

I’d done a bit of messing with Linux, but found at the time of my experiments, there wasn’t much in the way of usable playback software with good SQ.

That all changed when MPD (music player daemon) was launched. It provided such good SQ that you can find it in many multi-thousand pound dedicated streamers.

Raspberry Pi hardware

I used the most powerful incarnation of the RPi available at the time, the Raspberry Pi 2 Model B 1GB, to give it its full title (the more powerful RPi 3 has just been launched). Hardware-wise the RPi 2 lines up like this:

  • Quad-core Arm Cortex A7 900MHz processor
  • 1GB RAM
  • Four USB 2.0 ports
  • HDMI
  • 10/100 Ethernet
  • i2s bus

The Raspberry Pi Foundation claims six times as which power as the original RPi, or roughly the same processing power as a low-end office PC (I’m tempted to see if I can run my business on it after doing a bit of Web browsing and doing my email in Gmail. But that’s another project entirely).

As far as we’re concerned, it’s the four USB ports, HDMI out and the Ethernet port that make the RPi a great starting point for a high-end audio system.

No RPi has a hard disk like your PC; it’s more like a tablet when it comes to storage. The software it needs to work is stored on a micro SD memory card like you may use with an Android phone or tablet. What space isn’t used for software can be used for music files, but media storage is best put on a USB or NAS (network attached storage) drive as you’ll soon fill even the biggest micro SD cards.

Three easy options for playback

Volumio, Rune Audio and Moode are very similar custom Linux builds designed for audiophile quality playback. They’re forks (developments by different teams) of an older one called Raspyfi. I chose to try Volumio because it is based on Debian, one of the most popular distros (short for distributions, or flavours) of Linux. I hoped to install the Linux driver for my M2Tech Young DAC, but the instructions I found online were beyond my understanding; I found no evidence that anyone else had, either.

I subsequently tried Rune Audio and found, while it looked newer than Volumio, it was effectively a year since an update. And as Moode looks suspiciously abandoned as a project, I never tested it at all – I’m told it still works very well on RPis up to the 2 (I don’t know about the new RPi 3), so maybe I’ll try it sometime.

I recommend you go straight to Volumio, though. I should say that at the time of writing, Version 2 of Volumio is being developed.

Volumio

At the heart of Volumio is MPD, the software I mentioned earlier. Functionally, MPD indexes your music files into a library and sends out the playback bitstream to a DAC. It doesn’t give you a pretty GUI (graphical user interface), though. So don’t expect iTunes or JRiver.

MPD was designed differently from most of the available playback software. The control is separate from the server – in more general IT terms, this is a client/server setup). The design decision is a good one, to my mind. The pretty user interface resides on your tablet or phone, not on the RPi, so it doesn’t add extra load and complexity to the business end of the hi-fi player.

I’m using MPad (paid-for) on my iPad and MPod (free) on my iPhone. There isn’t an MPD client for OS X, unfortunately. If you don’t use Apple gear, here’s a great list of MPD clients; or just get Googling.

Using Volumio, the RPi runs headless (without a monitor). You point a web browser at http://volumio.local and you get a simple web interface for set-up and basic control.

Volumio controls

What you need

  • Raspberry Pi
  • 8GB micro SD card and SD adapter (usually sold together)
  • Ethernet cable
  • wi-fi dongle (if you want to run the RPi wirelessly)
  • PC or Mac with an SD card socket (or USB/SD card adapter)

You may already have most of these things.

There are also various packages containing a Raspberry Pi, cables, memory card, keyboard etc. But I’d recommend you buy the components you need individually, so you don’t buy anything you don’t need – and you can be sure of getting the components that won’t give you problems in the future.

I’m stressing getting the right components because the brand of micro SD card that came with the bundle I chose was not the best for the RPi, and wasted me a considerable amount of time when setting it up.

More about that later.

I should make it clear that even if you’re planning to run your Raspberry Pi wirelessly, you’ll need to hook it up via Ethernet in order to set up the wi-fi – see Network Configuration, below. I just plugged the RPi into my router while I set up the wi-fi and the connection to the NAS – see Library, below. To complete the set-up, I connected the RPi to the DAC and ran it wirelessly.

Connecting to a DAC

There are two ways of connecting the RPi to a DAC. Via one of the RPi’s four USB ports or the i2S bus (that double line of prongs along one side of the RPi), connected to a piggy-backed board:

  • There are a number of DACs that piggy-back. I didn’t go down that route, so I can’t give you any pointers
  • I bought a HiFi Berry Digi+ S/PDIF card with output transformer to connect to my Young DAC

The received wisdom is that the RPi’s USB ports are noisy, and i2s is the way to go. Again, I can’t say from personal experience, but it makes sense from a technical point of view.

Installation

You need an 8GB micro SD card – larger is OK, but nothing smaller. I strongly recommend you buy a SanDisk Ultra card. The RPi is picky about which card is used, and the Kingston cards I’ve tried have been unreliable.

You may want to experiment with different brands, but I’m sticking with SanDisk Ultra unless I get problems. There’s a comprehensive table showing which cards should and should not be compatible if you have the time and energy to wade through it.

Get yourself a PC or a Mac

You’ll need a PC running Windows or Linux, or a Mac running OS X and a way to connect the micro SD card – you may need a further adapter to connect via a USB port, if you don’t have a memory card slot on your computer – my iMac does, but my MacBook Air doesn’t.

Download Volumio

First grab the software. If you don’t know what Torrent is, head straight for the Download button – and make sure you download Volumio for Raspberry Pi.

Download Volumio

Flash the card

I’ve only done this on the Mac (OS X), so if you’re using Windows or Linux, you’ll need to follow the instructions in the FLASH IT section below the Downloads on the Get Started page on the Volumio website.

On OS X, you have two choices. Download software called PiWriter or use Terminal (cmd-SPACE Terminal) to type in the commands listed on the Volumio site. I found I couldn’t get PiWriter to work (this may have been because of the SD card corruption problems I had, or that the software didn’t like the latest version of OS X, El Capitan), so I used Terminal and the commands.

A tip here. If the commands look a bit hairy, you can cut and paste and edit them if necessary.

Whichever method or Operating System you use, you will need to wait quite some time – go and make yourself a cup of coffee – while Volumio is transferred to the memory card.

Settings

These may look very confusing to begin with, but only the NAS mount gave me any problems.

I’m going to show you the screens from my set-up. YMMV, but hopefully these will give you a better feel for how to get Volumio working.

Library

Library settings

The NAS mount is for my Synology NAS. If you’re using a different make NAS, you may be able to use this as a starting point.

You can also plug in a USB drive, if that’s where you store your music.

USB drives should be easy, but I suggest you run straight to your NAS manufacturer’s documentation to set up your NAS. I learnt the hard way that the advice on raspberry pi-, audio- or software-related sites is rubbish.

After hours of frustration, the penny finally dropped and after about five minutes on the Synology site, I had Volumio and my files on the NAS happily linked.

I’d also advise you to restart Volumio each time you have a problem linking to an external drive, as it seems to remember the previous settings from time-to-time, even when you’ve over-written them.

MPD Configuration

MPD configuration

Resampling settings

 

Choose the Audio Output setting for whatever board you’re using – or simply for USB.

If you’re unsure of Mixer type, try Software first. In my set-up Hardware doesn’t work.

I said yes to Gapless mp3 playback. If you have problems, just say no 😉

I don’t have any DSD files, so I said no to DSD over PCM.

If you say yes to Volume normalization, playback volume will be the same from file to file.

Here’s where I made some real changes. I found I was sometimes suffering from dropouts over my wi-fi connection, so I increased the Audio buffer size until I no longer suffered from dropouts. And while I was adjusting the buffer size, I also increased the Buffer before play to 20%.

Finally, I left Resampling at its default settings. You may need to reduce the Sample rate conversion rate.

Network Configuration

Network Configuration

Since my Raspberry Pi is connected via wi-fi, only the Wireless Configuration has been completed. If you use an Ethernet connection, then use Automatic IP Attribution if your network uses DHCP, or Static configuration if it does not.

Connecting to my DAC

As I couldn’t set up my DAC’s USB driver on the RPi, I opted for an SPDIF card that piggy-backs on the Pi. Here’s another reason to use Volumio. It’s easier to set it up with the card than Rune Audio – a little pull down menu does the trick, no messing around with Linux’s entrails.

Anyway. I bought a basic 75 ohm cable with RCA plugs at either end to connect the Digi+ board to the M2Tech Young’s RCA input. I haven’t yet tried the optical alternative, but previous experience with optical connections would suggest I wouldn’t get any better performance than the wired connection.

What does it sound like?

Fantastic! Much better than my old Mac mini running Audirvana+ which, in turn, is the best I’ve heard on OS X.

I should say that I’m using the Raspberry Pi to head up a moderately high-end system with Class A Power Amps and very high quality cabling. But that’s another story. In the meantime, why not head over to Audio Chews to find out more about the RPi and Colin Wonfor’s Class A amplifiers (some in easy-build kit form)?

 

Leave a Reply

Your email address will not be published. Required fields are marked *