Digital Serving/Streaming on the Cheap with a Raspberry Pi
(But is it any good?)
By Steve Graham
Part 1: Introduction and Shopping List
The first thing you must know is that I blinked and missed the microchip revolution – it was a very long blink. To those already immersed in the Raspberry Pi-for-audio ecosystem, this article might be irrelevant. This is for those like me: newbies to DIY file-based playback.
The second thing to know is that, as far as this project goes, looks will take a back a seat to performance and price. If you are looking for glitz and bling in an audio component, you won’t find it here. I don’t always look for the least expensive option, but lately I find that reviews of products with gargantuan chassis sporting thick shiny face plates, or speakers selling for a hundred grand or more just don’t grab my attention.
‘Everyone-fi’ may not get audiophile pulses racing, but good value is something that might just get the attention of those outside of our little community. Potentially, almost everyone is an audiophile, at least that’s my theory. They just need to be exposed to no-nonsense, good-sounding and inexpensive audio gear to get them started. For pre-existing audiophiles on a strict budget, decent, inexpensive fidelity is always welcome.
I have two streaming systems in my home. Both are neatly-packaged solutions for file-based audio playback. They aren’t inexpensive, but made for persons like myself, who haven’t (up to now) wanted to immerse themselves in computer minutiae during setup. As well, both provide a mostly glitch-free user experience/interface that enables all household members to easily play music.
Why take a step back and build a server/streaming system? Well, two reasons really. 1) I wanted a challenge that would take me outside of my comfort zone, and 2) I have friends who are budding but impoverished audiophiles that could benefit from an inexpensive, high-value, server/streamer. I’m sharing this because I believe in what a former boss of mine called “tribal knowledge.”
In the last year or so my friends have replaced their no-name speakers and ancient mid-fi receiver with a pair of small Wharfedale Diamonds and a NAD integrated amp. The days of their previous-millennium disc spinner are numbered. Might it be possible (for me and by extension, other computerphobes) to implement a cost-effective file-based system? Keep reading.
True confession time. Like a lot of people, I was inspired by experiences and encouragement from others. In this case it was one of the excellent videos by John Darko. Specifically his article and accompanying video. https://darko.audio/2020/07/a-short-film-about-the-raspberry-pi-as-music-streamer-and-server/
John’s video gives a general overview of the process required to turn a Raspberry Pi (RPi) into a server/streamer with audiophile-grade sound quality. My contribution is to take the pointers from John, make them make sense to me, then pass on any tips and gotchas to persons with a level of computer proficiency similar to mine. Which, for a digital dufus such as myself, means not very proficient. Please don’t take offense, I’m not purposely talking down to anyone. My only assumption is that there are others like me who need a bit of a hand up. There are forums that delve deep into all things RPi, but these can be intimidating for noobs such as myself.
Some might consider this approach, about $300 Canadian all in (~$200 US), too inexpensive to be considered serious audio. Just consider this: some commercial streamer products are based on the Raspberry Pi. As well, audio is all about adapting prosaic parts for a higher purpose. Many DIYers will, for instance, employ industrial oil-filled motor-run capacitors for better sound in tube amps and speaker crossovers.
What I’ve built is not the least expensive way to get music out of a Raspberry Pi. There’s an analogue out on a 1/8” headphone jack right on the Pi board. Alternatively, a DAC can be connected to one of the USB sockets. Both, especially the headphone jack, don’t yield optimum sound quality (SQ) according to the reading and YouTube research I’ve done. At Wall of Sound we’re all about the SQ. The recipe for better performance is to piggyback a HAT board (Hardware Attached on Top) on to the RPi board. HAT boards for better audio are available from a number of sources. Allo and HiFiBerry are but two examples. It’s possible to add a DAC HAT for anywhere between $20 to more than $300. Unless you are really cash-strapped, it makes sense to spend at least $50 or so for a DAC HAT.
The route I chose is a little bit (geddit?) different. I added a digital-out HAT board to the RPI for three reasons. 1) My friend’s NAD amp has a DAC built in so it might as well be pressed into service: isolating the DAC from the RPi could yield better sound. 2) The RPi + digital HAT will allow me to output data to my PS Audio DirectStream DAC. So, a shootout between the RPi and my NAD 50.2 player is definitely on. And 3) Unless some heroic (read: expensive) measures are taken, it’s likely best, from a SQ perspective, to not power a HAT DAC board from the RPi board.
The HiFiBerry Digi+ Pro Hat that I chose will output standard S/PDIF data through coaxial (on RCA) or optical (on Toslink) connectors. S/PDIF (Sony Philips Digital Interface) is perhaps the most common digital transmission format. CD players with digital outputs use this format. The Digi+ Pro also has dual oscillator crystals for 44.1 and 48 kHz sampling rates and their respective multiples, which should help optimize SQ for all sampling rates. A small transformer isolates the coaxial jack from the rest or the circuitry, to help prevent electrical noise from polluting the data sent to the DAC. Pretty impressive for 57 bucks Canadian ($40 US), in my estimation.
I chose BuyaPi.ca as they are a HiFiBerry dealer. I bought a Raspberry Pi starter kit and micro SD card from them as well, so I only paid shipping once. In the US, PiShop.us, sells RPis and products from many HAT makers. Currently, with delivery infrastructure stressed to the max and to minimize delivery time, it makes sense to avoid having parcels cross international borders. Once you’ve decided on the HAT you want, check the manufacturer’s website for a seller in your country. The seller will invariably sell RPis and accessories as well. Prices shown are Canadian dollars, unless otherwise noted.
HiFiBerry Digi+ Pro $56.95
Raspberry Pi 4B Budget Kit. Memory Size 2 GB. $69.95
SanDisk Edge 16GB MicroSD Card $8.95
For a total of about 136 bucks Canadian (~ $100 US,) not including tax and shipping, we are almost ready to go. A digital cable will be needed to connect to a DAC. A throw-away video cable (the sort with yellow RCA plugs) will do to get us started but a proper digital audio cable will sound better, more on this later.
As well, a hard drive or solid-state drive will be required to hold music data. A 1TB external hard drive (often referred to as portable or backup drives) can store several hundred CD rips. These can be had for between $70 and $90 from the usual outlets.
Updated as of October 12, 2020:
While setting up a RPi player for a friend, I’ve discovered that the PiCorePlayer software doesn’t play nice with Western Digital USB drives, causing it (the software) to stall during setup. I don’t know a way around this and I’m loathe to even attempt a dive into coding. Several Seagate drives and one Verbatim drive I tried worked without glitches. Apologies to anyone who has had a hiccup with a WD drive and is now cursing me. The programming attachment in Part 2 has been revised to reflect this frustrating “gotcha.” This is not to be construed as a slight against Western Digital drives. They have worked without issue when connected to my wife’s Lumin player and have performed faultlessly for other data backups. (Editor’s Note: I had some compatibility issues with my WD drive, which were solved by using FAT32 formatting)
An ethernet cable to connect the Pi to your network will be required. A laptop or desktop computer will be needed to load software onto the RPi’s Micro SD card and configure it. I’m assuming you already have or have access to a PC or MAC. Once set up, the Pi can be controlled by the PC or MAC but most people will likely prefer an app running on a smartphone or tablet. I’m also assuming that most people will already have one or the other device, if not both.
Except for smartphone or tablet apps ($10 to $14), all of the other software required is FREE!
If a digital-out HAT is used, a cable will be needed to connect it to a DAC. The aforementioned video cable will work but is nothing special. One step up might be a specific digital audio cable. An Amazon Basics cable can be had for about $12. Search: “75 ohm digital audio cable”. Of course, one can spend over $1,000 on a S/PDIF cable, but it’s hardly worthwhile in this instance. A decent inexpensive cable I like is available from HAVE Inc. A 3-foot cable with decent Canare plugs sells for about US $26. One of these from my motley collection of cables will be employed for the SQ evaluation. If you go with a DAC HAT, a digital cable won’t be needed, just a pair of analog interconnects.
All-up, including hard drive, shipping and taxes, expect to spend about $300 (~$200 US) for a complete server/streamer/storage setup, ready to play music.
If you’re not sure about your ability to program the RPi and set it up, see the second installment in this series before ordering any hardware. Otherwise, order your Pi and other bits. If you’d rather go with a DAC HAT to output an analogue signal to an amplifier, by all means order one instead of a digital-out HAT. A fairly decent looking one is available from HiFiBerry for the same price as the Digi+ Pro board I bought. ALLO and others offer DAC HATs too. The setup procedure for a DAC HAT will only deviate slightly from that used with a digital-out board.
Part 2 is coming soon. Sign up below for notification if you wish. We don’t collect any personal information.
Send a Donation
If you've enjoyed this content, consider supporting Wall Of Sound with a donation. It only takes a moment and will be greatly appreciated.