Saturday 25 February 2017

MEASUREMENTS: A look & listen to Roon Bridge - Raspberry Pi 3 Streaming (HiFiBerry DAC+ Pro & USB DAC)



Last time, I talked about Roon and discussed my experience with it using the NUC as the primary installation and playback. No doubt, you are aware that many people will use inexpensive devices like the Raspberry Pi 3 to handle playback distributed around one's home... And no doubt you've also come across much hyping about more expensive, low power devices when for around $100 and a little know-how, you can get it done quickly, easily and sounding great.

First, I just wanted to practically lay out a simple way to install Roon Bridge on the Pi 3 that worked for me and using which I will run a few tests to demonstrate the sonic output. Remember that the network protocol from the Roon "Core" (my Windows computer) to the Roon "Bridge" (Pi 3) is what's called RAAT (Roon Advanced Audio Transport). It's a protocol with a number of benefits as highlighted in the link.

Note that I certainly do not profess to being a Linux guru. Much of the information here is gleaned from various discussions and forums; this set-up worked well for me and I hope provides a good starting point to get things running if you're going to try something similar.

I. Installing Roon Bridge (remember - tested with Roon Core 1.2, Bridge version 1.0, build 40 stable) on a clean Raspberry Pi 3:

Converting my Raspberry Pi 3 + HiFiBerry DAC+ Pro as an efficient Roon Bridge device wasn't hard following a thread on installing DietPi here:

1. Go grab DietPi for your device - a small, "minimal" Debian core. I used the standard "DietPi_RPi-armv6 (Jessie).7z" file. I see there are versions for devices like the ODROID-C2 as well. Write the image with Win32DiskImager to a microSD card - almost anything will do, I had a 4GB lying around. Insert the microSD into the Raspberry Pi 3's SD slot and plug in the machine. I have my Pi 3 connected to the home network through the wired ethernet port.

2.  After giving the Pi about 5 minutes to automatically set up swap partitions and get on the network, log into the machine remotely (like using PuTTY in Windows). You might need to go into your router to find out what the local IP is. For example:
There it is!
   Username = root
   Pass = dietpi

Once you log in, you'll see that it's installing a bunch of packages from on-line sources. It then reboots and you log in again with PuTTY. You then can change some installation settings (I kept it at default for now). It reboots one last time.

3. Log into the Pi again, this time install ALSA Utils; we'll need this to manage the sound device:
   $ apt-get install alsa-utils

4. Follow the Roon Bridge install instructions here and do this:
   $ curl -O http://download.roonlabs.com/builds/roonbridge-installer-linuxarmv7hf.sh
   $ chmod +x roonbridge-installer-linuxarmv7hf.sh
   $ sudo ./roonbridge-installer-linuxarmv7hf.sh

The screen should look like this if successful:

5. Now finally, in order for the Bridge to work, an active audio device is needed. Install the audio card driver:
   $ dietpi-config



 Change "none" to my soundcard, the HiFiBerry DAC+ (Pro).

After selecting this and maybe changing "Language/Regional Options" to make sure the timezone is correct, exit the config program, it'll reboot. After the reboot, your Roon Core server "Settings" should see the Raspberry Pi 3 as Roon Bridge:

6. Go enjoy you new all-in-one Roon streaming device with good internal DAC... Knowing that this is as "light weight" an installation as you're ever going to find (for those who believe this makes a difference in sound quality!).

II. Installing Roon Bridge on Raspberry Pi 3  for external USB DAC

Now, suppose you don't have a DAC HAT board like the HiFiBerry DAC+ Pro, you might want to stream to an external "plug-n-play" USB DAC that should be recognized by Linux... Here's what we can do.

After step 4 above, instead of going into the DietPi Config screen, let's have a look at what DAC ALSA is able to find (make sure the DAC is on and plugged into the Pi's USB port of course):
   $ aplay -l


You see that I have the TEAC UD-501 connected and that this is "card 1" and "device 0" seen by ALSA. Let's now do a little manual system-wide configuration and change the default sound player to this "card".
   $ nano /etc/asound.conf

Replace the lines so they reflect "card 1", and "device 0":

Now issue a "reboot" and when the machine restarts, you should see this in Roon. As usual, it can be activated and streamed to:

IV. Measurements...

So, you must be wondering given that on the Internet, people say this and that about whether Roon sounds "better" than anything else, whether streaming off the Pi 3 changes anything.

Let's not belabor the point and just go for the 24/96 test signal.

A. Roon Bridge streaming to HiFiBerry DAC+ Pro HAT board:
First, let's have a look at streaming to an internal HiFiBerry DAC board. Here's the numerical summary:

Notice what I've done - it's a comparison of the Raspberry Pi 3 + HiFiBerry DAC+ Pro output using the 3 main ethernet audio protocols I have measured over the months - Roon Bridge here using RAAT, piCorePlayer for Logitech Media Server streaming using the venerable Squeezebox protocol, and Volumio for DLNA/UPnP streaming off JRiver. In the last column to the right, I also threw in the results when running off a simple 5V lithium ion battery and streaming with Volumio.

As you can see, there's nothing unusual going on at all between all these option - they're obviously all "bit-perfect". There is no significant difference in the noise floor; even with the lithium battery setup even though I know that my ADC system can measure below what I'm seeing here. Sure, there are slight differences as usual due to inter-test variation. Here are the composite graphs:

Pretty well a direct overlay of the results irrespective of which ethernet protocol was used to stream the digital data.

How about the time-domain and jitter? Here's what Roon Bridge looks like:

As you can see, the J-Test result looks beautiful. Remember, the HiFiBerry DAC+ Pro has separate oscillators for 44kHz (16-bit test) and 48kHz (24-bit test), connected to the Pi 3 mainboard by I2S. A small set of sidebands near the base of the 16-bit test appears occasionally (I captured it at its worst in that image), but otherwise, this is further evidence that jitter is typically not a problem these days (more noticeable if you're still using the old S/PDIF coaxial and TosLink interfaces).

B. Roon Bridge streaming to USB TEAC UD-501 DAC
For many folks, we'll likely be streaming through the USB port to an external DAC. Again, let's just look at 24/96 playback... Here's the summary with the TEAC UD-501 DAC plugged into the USB port of the Pi 3:


And the composite graphs:

As expected from the numerical analysis, there's no evidence of any significant noise or distortion difference between the ethernet protocols - Squeezebox, DLNA, or RAAT. Graphs essentially overlay and provide an objective demonstration of the "signature" for the DAC.

16 & 24-bit J-Tests:

What can I say, it's the typical J-Test FFT I see with the TEAC UD-501 DAC. No evidence of any significant jitter issue at all with asynchronous USB.

V. Conclusions...

There you go folks. Setting up a "lean and mean" Raspberry Pi 3 Roon Bridge isn't too technically challenging plus can be done without much expense at all (around $50 with power supply and case, just add a good microSD card). It was completely stable for the week or so I left it on 24/7 with no issues whatsoever. From a functional perspective, Roon Bridge worked well. It's snappy, I've streamed 24/384 PCM with no issues (through the standard 100ms buffer size). Also no issues streaming DSD64 and DSD128 through the DoP protocol (DSD128 is the limit of the TEAC UD-501 DAC). However, as I mentioned last week, one significant disappointment for me is that Roon is not capable of handling DST-compressed DSD64. This is a limitation of the Roon Core 1.2 server used rather than an issue with the Bridge or RAAT.

From what I have seen during my evaluation, Roon Bridge doesn't need much computing power and an optimized DietPi install like this provides plenty of cycles left over with the Raspberry Pi 3. Here's what "htop" looks like while playing DSD128 audio to my TEAC UD-501 through USB in DoP format:

Only 16 threads active with the DietPi OS and Roon Bridge running, and only 13% CPU utilization (easily <10% CPU utilization with standard 16/44 to 24/96). If you're wondering, on a Windows PC, don't be surprised to see >1000 threads - not that this is going to make a difference so long as CPU cycles are adequate of course. Streaming PCM 24/384 increases the CPU utilization to ~17% for the Pi 3. No surprise then that even weaker CPU devices (like the microRendu) should be able to handle high samplerates. Note that compared to what I showed previously with piCorePlayer, the Roon Bridge appears to use a bit more CPU cycles (with piCorePlayer, a 24/384 stream only took about 5% at most).

As for the sound coming out of the Roon Bridge, it's good and I experienced no sonic difference worth writing about. Basically, the results show that the sound is exactly the same as when you're using the DLNA playback of Volumio, or piCorePlayer and streaming off Logitech Media Server. I trust that with all the evidence over the years, this presents as no surprise to anyone... Software differences and OS tweaks are essentially irrelevant for modern DAC playback with good buffering and asynchronous operation. The conversion between digital data to analogue signal will be as accurate as your DAC allows. Unless anyone can prove otherwise, it is what it is!

Having said that, if you want an even leaner DietPi / Roon Bridge as I installed above, by all means apply my CRAAP settings described previously in my "Raspberry Pi 3 as USB Audio Streamer" post a few weeks back by editing the config.txt file in the root directory of the DietPi/Roon Bridge microSD card after you've done all the set-up and know it works [Thanks Seng Yew Meng for the correction on over_voltage_sdram.]:

It'll run cooler, use less power; and of course sound "better" ostensibly due to lower jitter and noise :-).

-----------------------------

Let's see... Nope, nothing much seems to be announced in the audiophile world this month. I guess after the December forth quarter consumer expenses and January CES announcements, we're in a bit of a lull. On the music front, I've been getting into Weyes Blood's Front Row Seat To Earth (2016), and Panda Bear's Person Pitch (2007).

Since it's Oscar night this Sunday, I've been catching up on the "best picture" nominees like Arrival, Hacksaw Ridge, Hell Or High Water, La La Land, Moonlight and Manchester By The Sea. Missing Fences, Hidden Figures and Lion as they're not out on Blu-Ray yet. Some good stuff there for sure... But like appreciation of music, it's all rather subjective isn't it? My favourites were either Hell Or High Water or Hacksaw Ridge for serious drama (doubt either would win given the buzz out there, kick ass Hell Or High Water soundtrack BTW), and since I like more serious sci-fi, Arrival was enjoyable as well (again, unlikely a "best picture" winner). La La Land as romantic fare was also very good; feel good without too much syrupy sweetness - I like musicals and this looks like the big winner à la Golden Globes.

Moonlight was OK, although I thought the pacing around the protagonist's struggles could have been more even. I really am puzzled by the Manchester nomination for "best picture of the year" though. Sure, there's pathos and humanity in there, but I just wasn't impressed by the story as a whole and am left scratching my head as to what made this the "best" film. Casey Affleck did a good job playing his depressed, mopey, predominately lethargic and tragic character (tragically also self-inflicted), but it just doesn't seem like a memorable performance to me.

Like I said, subjective... In the subjective world, it's as much a dance between what is and what the perceiver (viewer/listener) expects that forms the opinion shaped by experience, beliefs, and values. And like the Oscars, opinions can be found a dime a dozen and the value of opinions of experts can be highly variable for any of us.

Until next time... Hope you're all enjoying the music & movies.

27 comments:

  1. Thanks as always for your "real-world" articles. It's all I can afford. I'm getting good results running a Raspberry Pi 2 with Volumio 2, Allo Kali Reclocker and Piano 2.1 DAC. To my ears it sounds better than streaming directly to my Cambridge Audio Minx Xi amp. Do you think your CRAAP settings would give any improvements to the Pi 2? Or is it already throttled-down compared to the Pi 3?

    ReplyDelete
  2. Meant to add that I'm streaming from a Jriver server running off another Pi 2!

    ReplyDelete
    Replies
    1. Hi Treve,
      Compared to the Pi 3, the Pi 2's are of course a little slower already so if you underclock, make sure to have a peek at the CPU use when streaming hi-res content to make sure plenty of cycles available. Should not be a problem since the speed difference should be minimal for audio applications.

      I don't have a Pi 2 to try this on, but I think those CRAAP values will work. The only parameter to change is gpu_freq which I would leave at 250 stock or see if 200 works to synchronize a little better with the 400/800 multiple :-). The settings won't be as much of an underclock compared to the Pi 3.

      Hopefully the undervolt with "-4" will not cause any problems. Just give it a try and let me know! At worst, it might hang and you can just edit the config file back to default... Or just a less aggressive setting like "-2". Won't harm the system.

      Delete
  3. Thanks. I'll give it a whirl some time and let you know!

    ReplyDelete
  4. Thanks for another great article. I wonder if you could comment about the sound quality differences between:

    1. HiFiBerry Dac+ Pro vs your Teac UD-501 (or other DACs you've heard)
    2. DSD DoP vs JRiver conversion to PCM (can you hear a difference?)

    I've been thinking about buying a DSD capable DAC (?Teac UD-503) but I've heard that the HiFiBerry Dac+ Pro sounds great. Unfortunately doesn't do DSD (native or DoP). The Dac+ Pro would be a lot cheaper than most stand-alone DACs. How do you feel it compares?

    Thanks

    ReplyDelete
    Replies
    1. Hi Doc,
      Honestly, if I'm just using the RCA output of my TEAC UD-501, I would say there's really not much difference compared to the much less expensive DAC+ Pro! I did this test a few months back and with 16/44 music, it's remarkably similar to the point where it would not change my enjoyment of the music one bit.

      Having said this, I usually run the TEAC with *balanced* cabling. This makes it difficult to A/B compare due to greater level changes. Although I know the noise floor is something like another 6dB lower through objective measurements, the difference is still very minimal.

      The bottom line IMO is to look at the rest of your system... If you have fantastic amps, great speakers, listening in a dedicated space with very low ambient noise, get a higher end DAC like the TEAC. If not, save up cash for those other devices and a nice sound room, enjoy the inexpensive DAC+ Pro, and revisit the DAC later when you're ready to run everything in balanced configuration.

      As for DSD vs. PCM, years ago when JRiver 19 came out, I made some comments about this:
      http://archimago.blogspot.ca/2013/09/measurements-pcm-to-dsd-upsampling.html

      Basically, I do believe I can hear the difference between the TEAC playing PCM vs. DSD64. The DSD sound is different using the default filter; a "smoother" quality when it comes to sudden transients (something like the nostalgic quality of a dark smoky jazz bar comes to mind :-). I do believe it is "euphonic" and quite likable even though not strictly "accurate" to the source material. I suspect this is a result of the noise introduced by the PCM --> DSD process. When it's converted to DSD128, the difference sounds less obvious to me; probably because the noise and distortions introduced are even more subtle.

      Obviously I encourage everyone to play with this and figure it out for themselves. I can say this however... Despite having the ability to do the upsampling for years now, I don't bother. If I want to do DSP processing, digital room & speaker correction adds much more than simply upsampling to PCM or DSD.

      However you do this, have fun Doc!

      Delete
    2. DSD to PCM

      With JRiver, depending on your setting within JRiver, the sound does change and for most, you will loose 6 dBr in level, when you do this on-the-fly.
      Roon does have a good sounding on-the-fly DSD to PCM conversion (including 6 dB gain, that is needed, in order DSD converted files have the same level as the PCM ones).
      Or you do convert your DSD files into PCM in offline with DSD Master app (also including 6 dB gain), with very good results and a good balance between bandwidth, impulse response and out of band noise suppression.

      Juergen

      Delete
    3. Thanks for the help guys. Looks like the easy answer is to get a good DSD capable DAC. Converting thousands of SACD.iso > dsf files > PCM + tagging doesn't sound like fun. I've got a decent system (Aerial Acoustics 7T speakers + Stello Ai500 integrated). Any advice on a decent DSD DAC under $2000?

      Another question for Archimago, now that you've had a chance to live with Roon for awhile do you feel that it's enhanced metadata is a benefit or does it distract from actual music listening?

      Delete
    4. Thanks Juergen.

      Doc: Wow, sounds like you're quite the SACD/DSD collector. For the list price of around $2000US, I would grab the Mytek Brooklyn. DSDS256 supported, fully hardware MQA, nice OLED screen.

      As for Roon, remember that I have not actually continued beyond the trial. Barring a few issues I had last week, I found it an excellent system to learn and very reliable as a "Core" server. I see the metadata as a benefit allowing me to explore the music collection.

      I guess it really depends on whether one is easily distracted by the pretty pictures, extra information, and suggestions that the software provides!

      Delete
    5. If you are not particularly interested in MQA; and depending on the connectivity you need, at $1,999 you could also check out the RME ADI-2 Pro (see http://www.rme-audio.de/download/adi2pro_e.pdf - '34. Technical Background' - for measurements).

      [I personally would like to see how measurements of audio-gd.com DACs compare to those devices. At least subjectively, I find nothing wrong with one of their DAC+Headamps I bought //a cheaper model// out of curiosity.^^]

      Depending on the hardware source you use for playback; especially portable devices/laptops seem to be prone to audio performance issues. Should you experience audible disruption, the following might help (albeit, I think for pure playback ASIO drivers are not necessary):

      https://support.native-instruments.com/hc/en-us/articles/209571729-Windows-Tuning-Tips-for-Audio-Processing [see on left column, for Mac OS X].


      @ Archimago: Regarding what we see on waveforms and on the foobar2000 'foo_dynamic_range' component. Would it not be more precise to refer to this as PLR - peak to loudness ratio - instead of DR? Furthermore, an easy tutorial on how to convert "Hi-Res" audio files to lossless 16bit/48kHz would be welcome. :)

      Cheers!

      Delete
    6. Hi Balduin,
      Thanks for the suggestions. An RME device would be very nice as would most pro-level DACs I'm sure! At most I might have come across an Audio-GD at an audio show... I'm sure well made devices would measure great these days.

      Yes, it would be more precise to call the DR measurements PLR or average "crest factor" measurements as per the comparison made by the JRiver folks:
      https://wiki.jriver.com/index.php/Dynamic_Range

      As a consumer, it's probably more useful to stay with the "DR" terminology since we're bound to some extent by the software we have freely available... And I think the most important thing is to use this common lingo to educate the listeners out there to develop an awareness. Besides, with the huge database:
      http://dr.loudness-war.info/

      It's easier to compare using this "DR" tool even if it's not precise terminology.

      Delete
  5. Thanks for the Mytek suggestion. I'll have to try to find one to audition. Re: SACDs, did I say thousands? Maybe a slight exaggeration.

    Another quick question if you don't mind. Tonight I was playing around with two Raspberry Pi 3s. Both with Volumio 2, streaming over DLNA from my HTPC/JRiver server. They were both connected to the built-in DAC of my Stello Ai500. One with S/Pdif coax from an attached HiFiBerry Digi+, the other directly from the RPi's USB.

    I was able to play the same music to both RPis simultaneously and quickly switch back and forth. They both sounded great and essentially identical. However, when selecting new songs, on the RPi + USB there was a noticeable delay of 3 or 4 seconds before the next song would start. Even if it was the next song on the same album. Gapless playback worked fine. Only manual song selection caused the delay. Switching songs on the RPi + coax was always instant.

    Have you ever had this issue with RPi + USB > external DAC before? I'm thinking it might take some time for the asynchronous USB to negotiate. What do you think?

    ReplyDelete
    Replies
    1. Interesting observation Doc. I don't have the S/PDIF daughterboard on my Pi to try. I can certainly appreciate the added complexity of the USB driver and asynchronous activity. Maybe the handshaking and filling of buffers could adding to the latency...

      So long as it doesn't affect gapless playback, it's all good.

      Delete
    2. I was wondering if you ever noticed a delay when changing songs on your RPi + USB player connected to your Teac UD-501? Thanks.

      Delete
  6. Hi Archimago. On an unrelated matter, do you use the TEAC HR music player with your TEAC Ud-501? I've always used Audirvana, but when I recently bought at TEAC UD-503 to replace my 501, I realized Audirvana doesn't do DSD 256. That suddenly mattered because the 503 is 256-capable. So I downloaded the FREE TEAC player, loaded up DSD albums as playlists, and was really shocked by how good it sounds. Simple player, no album covers, no direct mode or filters etc, but simple to use and completely compatible with the TEAC DAC (obviously). I was shocked by the sound quality. Do you have a view on this?

    ReplyDelete
    Replies
    1. Hi Don,
      I have listened to TEAC HR player and yes it does sound very good.

      Back in the day, I did use the early Mac OS X & Windows 1.0 versions to test bit-perfect output:
      http://archimago.blogspot.ca/2013/05/measurements-bit-perfect-audiophile.html
      http://archimago.blogspot.ca/2013/06/measurements-part-i-bit-perfect.html

      Admittedly I have not used the software for a few years... Glad to hear it works well and I'm sure it sounds great!

      Delete
    2. Thanks! Very interesting.
      Dom

      Delete
  7. Hi ArchiMaGO, in my config.txt I have :

    #-------Overclock-------
    temp_limit=65
    initial_turbo=20
    force_turbo=0

    #over_voltage=0
    #arm_freq=900
    #core_freq=400
    #sdram_freq=400

    #arm_freq_min=700
    #core_freq_min=250
    #sdram_freq_min=400

    Shall I replace all of it with yours ? or just change some values ?

    I speak about Dietpi for RbPi3
    Many regards,
    Xavier

    ReplyDelete
    Replies
    1. Hi Xavier.

      Yes, you can replace all the lines with the # in front with the settings I have and give it a try. At worst, it might not boot if the "over_voltage" settings drop the voltage too low for your board. In that case, you'll have to try something like -3 or -2 instead.

      Have fun!

      Delete
  8. I must be honest, SPDIF offers a sound experience without audible bleeps and clicks. But USB brings a lot of those. I can test it simultaneously via my RBP/Digi Pro +LPS, my dac is plugged with SPDIF and USB.
    I was wondering if RBP/ALLO REclock would improve the USB output of the RBP ?
    Or a simple Media converter/mini GBIC just before ?
    After that I stop ! ;)
    MR, Xavier

    ReplyDelete
  9. Halo Archimago, thanks for the excellent article
    Just one thing on your setting - I read in the Rune Audio forum that the syntax for sdram_over_voltage is actually - "over_voltage_sdram". Just pointint this out - they may have made a mistake

    ReplyDelete
    Replies
    1. You're right SYM!

      Thanks for the "bug fix" on this :-). I've updated the relevant posts!

      Delete
    2. No prob at all sir :)
      When you measure the pi - is it with the CRAAP tweak applied?
      The CRAAP tweak really sounds better with the pi - so I can imagine the jitter and composite graphs will be quite different with or without it.

      With the over voltage parameter down to -10, I perceived further improvement in sound.

      Delete
  10. your blog is very useful for me & i like so much..

    usb cables

    ReplyDelete


  11. Great post you shared, you have now become top of my list. You were unknown to me before but have found your content to be fantastic.

    So great work for informing us of the possibilities and following a certain path.

    I really appreciate your hard work an giving us some information and inspiring others to follow.

    Thanks so much.

    I hope for more post in the future.


    Industrial Panel Pc

    ReplyDelete
  12. Hello,

    Just reading this a couple of years too late! I dont fully understand the technical data, but am I to undertand there is negligable difference between connecting the NUC Core directly to my DAC over USB and using an RPi as a bridge?

    Roon Core NUC --USB-> DAC
    Roon Core NUC --Network-> RPi --USB-> DAC

    Jason

    ReplyDelete
  13. Thanks for sharing, nice post! Post really provice useful information!

    An Thái Sơn chia sẻ trẻ sơ sinh nằm nôi điện có tốt không hay võng điện có tốt không và giải đáp cục điện đưa võng giá bao nhiêu cũng như mua máy đưa võng ở tphcm địa chỉ ở đâu uy tín.

    ReplyDelete