The idea I started with, was, to make use of an already purchased Raspberry Pi Zero and the meanwhile ordered PhatDAC, and to build a network audio player. I wanted to check several aspects of the build, like the sound quality and possibility to use Pi Zero for the purpose.
At the very start I falled into a trap named Google. Of course, I wanted to ensure Raspberry Pi is suitable for the purpose. There were several links telling how to fiddle with Runeaudio to make it run on Raspberry Pi. During Googling I discovered that there are at least three softwares (seemingly of the same origin) fitting the purpose: RuneAudio, Volumio, MoOde. To these cursed Y and Z generations that consider everything TL;DR and have the attention span of 1 sec less than a goldfish, I still surrender the secret – do omit Volumio and especially Runeaudio and do start straight with Mo0de.
In theory, the task is extremely simple. You D/L an SD card image, unpack it, write onto the card and voilaa! In practice things are not so easy even for the case you are a sysadmin by your life as me am. Meanwhile some new Raspi models have appeared and also has Linux design undergone some very principal changes (package DB format, ssh prohibiting direct login by root user and more) that make user experience somewhat questionable. But as an Estonian proverb is saying – don’t look into the mouth of a horse you got as a gift (i.e., free software).
It is much easier to fiddle with Raspis having a Linux instrumental computer available – the command dd is so simple to use compared to installing extra softwares to deal with the SD cards. However, I have always preferred cmd line to M$ GUI.
I discovered, Ubuntu is not very SD-card friendly. After properly unmounting the card via GUI, the card becomes completely invisible, at least as /dev/sdX. Thus, I use some speedy monster command for the purpose:
umount /dev/sdd1/ && umount /dev/sdd5 && dd if=image_file of=/dev/sdd bs=1M
I very much recommend installing packages “mc” and “htop” from the very beginning (on both the instrumental computer and SD cards. These utilities help the administration work later. But yeah, not necessarily are my readers from Peter Norton generation 😉
There exist a useful utility called GNU Parted, and a GUI to it that will reliably address problems with constant shrinking and expanding of the Raspberry SD cards. That utility might be of a great alternative to “raspi-config –expand-rootfs“.
A DHCP server that will vizualise the leases will be an advantage otherwise one needs network hacking tools to find the fresh installation of the audio server (“ssh moode” could work in some environments while not in others).
I started my experiments from RuneAudio. Why? Because explicit descriptions were around about making Rune usable on newer Pi Zero. Did I succeed? Of course, not. These refucktoring instructions might were being valid in 2015 but certainly they do not lead to the result in 2016.
To make Runeaudio booting on the Pi Zero, one has to spend 4-5 hours:
- Use an intermediary Raspberry during the upgrade (e.g. Raspi B)
- Do full upgrade (pacman -Syy; pacman -S) – altogether 191 packages replaced !!!
- Repair some 10 config files from the upgrade (style: “mv /etc/gshadow.pacnew /etc/gshadow” etc)
- upgrade the GUI via the clever “git pull” trick in /var/www
- repairing upgrade errors in config.txt file (cmdline=cmdline.txt ; kernel=kernel.img) and in cmdline.txt file (“root=/dev/mmcblk0p5“) .
- A reboot only thereafter
- due to SSH “security” upgrade, the owner has to open the console orifice again (editing SSH config or a creating generic user)
The final result – Both Pi Zero and Pi B are able to boot from that SD card but the GUI is not anymore usable due some weird nginx error that I hadn’t time to debug out.
Verdict: Runeaudio is quite usable on Rpi B (until you attempt the upgrade). The database has a hard hard limit of 16384 songs. If you seek well, there are newer s/w versions available, even more suitable for Raspi 3.
I started Volumio image on Raspgerry Pi and indexed a subtree of my NAS. That took a rather long time, but I confirm, at least 57000 songs were indexed. However, considering the awful lag (tens of seconds) my Raspi B showed, I firmly understood why developers like to limit the song count at 2^12 level.
I liked that Internet radio was present through Volumio interface. I did not even try to carry that setup over to Raspi Zero. Might be a stronger horse Raspi 3B can do it?
MoOde boots the Raspi Zero from the very start (so the initial problem was a non-existant one) …. While still having the 16384 songs limit, MoOde has the best GUI (hierarchical, sort by performers, radio stations list is usable, even an alarm clock is present). But most important – MoOde has support to a huge number of DAC daughter cards. My PhatDac is supported started from release 2.5 (2016-02-27).
Yeah, and that was only half of the support list.
MoOde supports an interleaving use of Ethernet and WiFi. That means, one can prepare the setup using the Ethernet and then switch over to WiFi. Moode also supports mixing MP3s with WAVs and FLACs, not even to mention the radio stations.
It occurs, there are over 100 good internet radio stations available from around the world. First two weeks I limited myself mostly to the radio stations. My taste is Classics and there exist radio stations of enhanced quality (not so packed).
As a next experiment, I packed part of my FLAC collection onto a 32GB USB stick. I am listening at random, through an ancient Russian equalizer and some old noname western speakers. The LM3886 amplifier is of DIY.
According to Instructables, only five wires are necessary to connect Pi Zero with PhatDac:
I used the box from an old digiTV receiver. The PSU (3.3V, 5, 12V) was from another digiTV box. The bloody secret is that these old cheap UK receivers somehow land (without R/Cs) at second hand sales in my country and, because UK TV standard is/was Mpeg2 while our is Mpeg4, these boxes are completely useless here and the price is 1-2€ per box.
The design has a distinct steampunk influence. I have a supply of M2,5 bolts from old Soviet PBX relays that enable the steampunk. The face panel for the device has not been finished yet.
The internal layout was largely dictated by a cheap USB hub available. USB cable on the hub was later replaced for a longer piece.
The Ethernet is an USB3 Lenovo piece that works out of the box. Two sided sticky tape has been used to fix it. The Edimax WiFi piece was purchased as Raspi compatible and, it is indeed.
The sandwich looks like this:
Should I have time for another build, I’ll probably include a LCD and PowerOn/PowerOff knobs.
An extra question – is Pi Zero powerful enough for that gadget to ride? Here is the answer:
Or, in clear words, the sandwich-steampunk design will raise the temperature of Raspberry Zero at least 10 degrees against what it was on the open table.