Digital audio formats, compressed and lossless, are more and more widespread then ever. Digital music can be played any way you want. There are many on-demand services for every need: Spotify, Deezer, Tidal, SoundCloud, etc. And you can use any device you want: a smartphone, a PC or a Mac with a high end DAC, you can buy an expensive HiFi system, like in the old days, or you an setup a Raspberry Pi board with any DAC-HAT. You can listen through expensive headphones, or using Bluetooth or WiFi speakers. You can even use multi-room systems configurable via smartphone.
Basically, what you really need are a couple of good passive speakers, a good amplifier, a DAC and a source that feeds the DAC with digital audio. At this date you can use a Raspberry Pi a digital source. There are many accessories and expansion boards (either stand-alone or HAT) that have been developed in recent years around the RPI, including many DACs.
But suppose you have an external DAC or an integrated amp/DAC and you don't want give up the undeniable convenience of using an Raspberry Pi as a dedicated music source. The RPIs model 2 and 3 have an HDMI port and a 3.5mm audio jack, which also includes the composite video signal, but no digital output connectors exclusively for the audio.
What's so special about JustBoom Digi HAT
To meet the needs of those who wish to keep separate source from conversion (to analog) and amplification, JustBoom has produced a digital audio output add-on board for RPI called Digi HAT. The board comes equipped with a Wolfson WM8804GEDS Transceiver, capable to convert signal from I2S to S/PDIF and confer high-res to the digital output (24bit/192kHz). Also, thanks to the integrated phase-locked loop (PLL) and the galvanic isolation for RCA connector, the Digi HAT guarantees very low jitter (50ps RMS) and very low noise: 112dB SNR (signal to noise ratio) and -93dB THD (total harmonic distortion) are pretty good levels. That makes it an excellent S/PDIF interface for any source.
Placed in the same category of the HiFiBerry Digi + Pro, with which it shares the same Wolfson chip, the JustBoom Digi HAT connects to the Raspberry Pi via GPIO pins. It gets power from the Raspberry Pi and has two different connectors for digital output: optical (TOSLINK) and electrical coaxial (RCA). It is also equipped with a TSOP4838 Vishay IR receiver (soldering required).
In order to test the Digi HAT's qualities, I thought were better to use it in tandem with a cheap but very handy external DAC like the best-selling FiiO D03K "Taishan". I use it very often when it comes to making quick connections to my amps. Although very small, the Taishan is a very reliable piece of hardware. To be honest, its two S/PDIF connectors (optical and coaxial) are really too close to the power section (a micro-USB socket) to be sure that the electrical one won't generate any noise. In order to avoid that possibility, it's preferable to select the optical Toslink connection (the DAC has a little switch on the back for input selection, see here).
As many of you HiFi enthusiasts already know, it's hard to assess the sound quality of a card like Digi HAT in a multi-component audio system chain. Luckily enough for use, our main interest in these tests was only to check the bit-perfect output of the card playing some lossless audio files. So, I wired the Taishan to the Digi HAT (mounted on the top of a Raspberry Pi 2) through optical and coaxial cables. After that, I connected the 2 channels RCA connectors of Taishan to a Sure TA2024 amplifier (2x15W max at 4 ohm), connected in turn to two Scythe Kro Craft speakers. The GPIO block and the four spacer pillars included in the Digi HAT's package will allow for an easy plug and play installation. Also optical and coaxial wirings are so fast that the board is an excellent solution for those who don't want to interface the RPI to a USB DAC or a HDMI splitter (in order to convert the signal from HDMI to HDMI + Audio S/PDIF).
JustBoom Digi HAT with Max2Play's LMS/Squeezelite
Besides being so kind to send us a lot of their hardware products (including the Digi HAT), JustBoom also sent us a Premium Licence code for testing them with all Max2Play's plugins. Max2Play is a Squeezelite and Shairport player for single board computers like RPI and ODROID. JustBoom provides a special Max2Play image dedicated to their boards. So, if you have purchased a Digi HAT or other JustBoom device, you can download the customized image following the instructions from Max2Play's website. You must flash the image to a 4GB (or more) micro SDHC card, wire the RPI via an Ethernet cable to your internet router's LAN port, power it with a micro USB 5v power supply, and wait a few minutes until the boot is complete.
In order to configure your system from the Max2Play web interface, you have to point a browser to https://www.max2play. Alternatively, you can use a network scanner to look up your RPI's IP address, either from app or command line (Nmap is your friend). Once detected and opened the IP in your browser, you will be redirected to the Max2Play main page, where, in the upper right corner, you will find a red button for the activation of the Premium Licence (a code card provided by JustBoom is included in the purchase). Click on the drop-down menu "Your JustBoom Card installed", select "JustBoom Digi Hat", save and restart the system by clicking on the link: "just click here". After that, you can go to the LAN & WLAN tab to configure the WiFi options, although Ethernet connection is preferable (see Set Up Your JustBoom with Max2Play for more information).
Note that, in order to install LMS (Logitetech Media Server), you will need to click on "Show available Versions" in the "Squeezebox Server" configuration tab, and you need to be sure to select the Nightly 7.9 version (make sure that the url link in the page changes).
If the server is running, you can browse the RPI's IP at the port 9000 from a remote machine (9000 is the LMS's standard port): i.e. in my case: 192.168.1.186:9000. When the new window pops up, follow the instructions to create a mysqueezebox.com account, though it's not mandatory, (or log into it, if you already have one). If you want to plug a USB flash drive or a hard drive into the RPI, check if they has been properly mounted and which is their path in the "File System Mount" tab of the Max2Play's web interface. If the specified mount point is /media/usb0/ (as in my case), use that path for your playlist in the setup page and finish the Squeezebox configuration. You can change the path of your audio file storage subsequently, from the LMS's GUI: "max2play" > "Settings" > "Basic Settings" > "Media Folders".
Now, everything is ready for the sound test. I played some lossless files of different sample frequencies and formats. As expected, the sound of a TA2024 amplifier could only be soft and soothing in medium and high frequencies – maybe a little too shrill at the beginning of the listening session. The slight limitations in dynamics and lower range are more than compensated by the magnitude and depth of the scene. The detailed and accurate presentation – even in complex arrangements – is more than remarkable, considering the cost of components. All in all, the result is satisfying. However, since our actual task was to test the JustBoom Digi HAT in combination with a bit-perfect player, I played some .wav test files in order to capture their parameters during the stream.
First, in order to verify that the JustBoom Digi HAT card has been recognized by the system, running the command
aplay –l or
arecord –l. You should have the following result:
card 1: sndrpijustboomd [snd_rpi_justboom_digi], device 0: JustBoom Digi HiFi wm8804-spdif-0  Subdevices: 0/1 Subdevice #0: subdevice #0
card 1: sndrpijustboomd [snd_rpi_justboom_digi], device 0: JustBoom Digi HiFi wm8804-spdif-0  Subdevices: 1/1 Subdevice #0: subdevice #0
The output will show all the cards in your system. Here
card 1 shows the Digi HAT card number. You may get information about PCM stream by launching the command:
sudo cat /proc/asound/card*/pcm*p/sub*/hw_params
The result should vary according to the frequency of the file being played. However, when I played a 16bit/44.1K WAV file, I got the following output:
access: RW_INTERLEAVED format: S32_LE subformat: STD channels: 2 rate: 44100 (44100/1) period_size: 882 buffer_size: 3528
Why do we read format
S32_LE rather than
S16_LE? Probably, the line is not indicating a real conversion from 16bit to 32bit; it's only the "sample" was padded with eight zeros by ALSA layout in order to obtain 32-bit words. Of course, regardless of the frequency imposed on the Linux's audio software and drivers side, to the extent that SPDIF can handle audio data only up to a sampling frequency of 192kHz and 24-bit, it's irrelevant that the card or the DAC supports up to 384kHz and 32-bit. As it is, I'm well aware that my FiiO D03K (DAC Cirrus Logic 4344) supports only up to 24bit/192Khz, although I believe there are many cases where the up-sampling improves the sound quality of a reproduction, one cannot speak of 'bit-perfect' until the output is the exact copy of the input, regardless of whether the zeros added to the sample will be ignored by the hardware or not. In fact, as all we know, the bit-perfect is the process by which any change in the data stream coming from the player is prevented. In this respect, a 'perfect' bit-perfect excludes not only resampling and resolution changes, but also the channel mixing and volume leveling, which are default in most audio players (for an informative guide on the bit-perfect see http://lacocina.nl/bitperfect-audio). Take LMS/Squeezebox. As far as I know, in the 'Settings' page of LMS's GUI, under the Player > Audio tab, you can set "Volume Control" as "Output level is fixed at 100%", and "Default Adjustment for Remote Streams -> 0", but I doubt that that will be sufficient to ensure a true bit-perfect stream.
Apart from that, Digi HAT has enviable specs and performances for its cost. Using it with a Squeezelite player, especially the one implemented and customized by Max2Play, it is certainly a thing to try. Among the most widely tested alternatives, there are a handful of MPD-based distributions, like Volumio, RuneAudio or MoodeAudio, all strictly focused on audiophile requirements. For those who prefer to try to get bit-perfect from their JustBoom Digi HAT on a non audiophile-oriented distribution, using a generic player like GMusicBrowser, Quodlibet, or VLC on their RPI, I suggest to follow us on twitter because a dedicated post is in the works.