Raspberry Pi2 as Music Server?
Apr 9, 2015 at 6:32 PM Thread Starter Post #1 of 101

auvgeek

100+ Head-Fier
Joined
Aug 8, 2014
Posts
264
Likes
53
   
+1 for this. I want people to educate people that you really don't need to spend hundreds when $70 bucks and a little know-how you can have bit-perfect playback to whatever DAC your ears prefer.  I use 2 Pi2s right now, one on the hifi setup(for both speakers and cans) and one next to the bed for some late night chill out while reading.
 
My Pi2 and my home server(ZFS) is literally the best home-media solution I've ever had.
 
The only thing that would really beat it would be a Sonos if it could do bit-perfect 24/192 output via the S/PDIF which it cant but it does have better usability for wife-acceptance factor.


This was getting pretty off topic in the "Thoughts on a bunch of DACs" thread, but I'm really curious about the Raspberry Pi2 as a "music server." I'm hoping some people who have the Pi2 will chime in here regarding its performance and maybe answer a few questions.
 
Will I see an improvement in sound quality over a laptop (or desktop) when connected to a DAC via USB? Does the answer change if I primarily use a HiFi streaming service (Spotify, Tidal, etc)? I'm relatively new to audio, so any additional information/links/thoughts are appreciated.
 
Apr 9, 2015 at 6:35 PM Post #2 of 101
If @maeveth is cool with it, I'll post the bosy of the PM he sent me when I asked him for more info.  It was very helpful and I plan on starting my own Pi music server when the bits arrive tomorrow.
 
Apr 9, 2015 at 6:59 PM Post #3 of 101
I should clarify - The RPi2 is not a Music Server it is a playback device that relies on other devices such as USB drives, NAS servers, or the like for the source.
 
The basic answer to your question is "no, you will not see an improvement".  Many of the tools you'll use on the RPi2 have Spotify Connect support but do not support TIDAL
 
Read below if you want a more in depth explanation of how the digital portion of your computer works.  
 
Without starting a religious war the Pi will not give you higher or lower sound quality than a desktop or laptop using S/PDIF output.
 
Computers are finite state machines, the quantized data will always give you the same digital output.  This means that given the same input data the output data will always, 100% of the time, without fail(unless you have a faulty APU in which case your computer has probably already crashed if it even boots), return the exact same data.  What will end up mattering a lot more is your DAC and all the analog stages between it and your cans/speakers.  Reclocking in the downstream DAC DOES matter however as no computer really cleanly clocks S/PDIF output as well as a dedicated DAC. No amount -- wait i need space for this
 
No amount of changing your computers power supply, BIOS tweaks, OS, CPU, RAM, or the like will change your computers general ability to play back music assuming you are setup to do bit-perfect output via S/PDIF.  Saying otherwise is equivalent to saying to saying "if I change my CPU my computer will give you a higher quality 4 to the equation 2+2"
 
Some of the most common issues with computers that will cause issues with your audio are...
-Electromagnetic interference acting against analog stages if near computer equipment.  This includes but is not limited to WiFi, Cordless Phones, Cell Phones, Microwaves.  Really though this one is SUPER NITPICKY unless your running something with an extremely high powered transmitter - which btw in most cases will also piss off the FCC.
 
-Overall load on the system - if your system is not able to decode your digital files in a timely fashion you can have jitter in in the S/PDIF signaling.  There is a maximum speed at which you will do this as S/PDIF as a digital signaling method is not flow-controlled - meaning it will transmit in "real-time".  In most cases the downstream high quality DACs will adjust and compensate for a jittery source clock by looking at the incoming data's sample rate and locking it to a certain rate when converting to an analog signal.
 
-Having the worlds crappiest S/PDIF cable - when I say world's crappiest I mean literally you went to your neighbors dumpster and took his old one.  As long as you have a reasonable one and your run is not insanely long you'll be fine.
 
Feel free to ask for any additional clarification :)
 
Also @Stillhart I have no problem with your posting it - if its received well I would be willing to write up an entire guide for it.
 
Apr 9, 2015 at 7:06 PM Post #4 of 101
Here is the meat of what @maeveth sent me:
 

Its very easy - no soldering required.
 
You just need to order a Raspberry Pi B+ or 2.  Then you need a I2S interface card that provides you with either S/PDIF out to a DAC or RCA to line level input on any device.  I use a HifiBerry Digi+ to provide S/PDIF. Links below
 
http://www.element14.com/community/community/raspberry-pi
https://www.hifiberry.com/
 
Once you get the hardware all setup you just need to install any package like RuneAudio or Volumio.  I prefer RuneAudio but Volumio at this point is a little easier for new users to get working.
 
https://volumio.org/
 
Once its all setup you'll just hook the RPi up to your network via ethernet or wifi if you want to add a small USB wifi dongle to the RPi.  Your device will retrieve an IP from your DHCP server at which point you'll just navigate to it with a web-browser or mobile device browser.
 
Once in the GUI you can add network sources or plug in a USB drive to your RPi to provide media.
 
Feel free to ask if you need any additional details.  

 
I don't plan on using a hifiberry I2S interface because I'll be using my Gustard U12 as a transport.  I'm 99% sure it'll work with no drivers, but I should know for sure tomorrow.  I picked up a small wifi interface and I'll have it stream audio off my main rig.  Looking forward to this little project, should be fun!
 
Apr 11, 2015 at 1:00 AM Post #5 of 101
Okay, well I got my stuff in today and it really took no time at all to get Volumio up and running.  The Gustard U12 was recognized with no issue.  Literally the only problem I had was getting the wi-fi dongle to work.  I think all I had to do was be patient and wait... it's not very good so it's got a weak connection.  
 
Anyhow, here's the setup for right now:  Raspberry Pi 2 running Volumio, music is in a shared folder over Wi-Fi from my main computer, RPi is connected to Gustard U12 transport via USB (which is connected to my DAC via coax, etc).  That's it.  I can log on from my web browser or an app on my phone and access all my music and presumably stream it bit perfect to the Gustard.
 
It's dead simple, it was like... I dunno $60-80 for the RPi, case, power cord, wifi dongle.
 
Now the real question:  does it sound any different?
 
Nope.  I'm not sure what all the talk is about with people's computers making a difference.  Maybe mine is just perfect and I got lucky.  But there's not much point to streaming my music off this instead of right from my computer.
 
That said, it doesn't sound any WORSE either.  I might get a I2S card, hook it up to my AVR, and stick it in my media rack somewhere and forget about it.  It'll be a nice streaming source with an easy interface for my wife.
 
Or I'll just replace Volumio with something else and just have fun with it.  
 
Apr 13, 2015 at 8:20 AM Post #6 of 101
"You just need to order a Raspberry Pi B+ or 2. Then you need a I2S interface card that provides you with either S/PDIF out to a DAC or RCA to line level input on any device. I use a HifiBerry Digi+ to provide S/PDIF. "

Can anyone tell me whether it is possible to continue to use Kodi/XBMC once you've installed one of these interfaces? I currently use both Tidal and Qobuz addons with Kodi (Raspbian install) on my Pi, connected to a receiver with HDMI. I would like to continue to do this if I add an improved S/PDIF connection. Thanks.
 
Apr 13, 2015 at 10:35 AM Post #7 of 101
You can install Kodi on a RPi2 http://kodi.wiki/view/Raspberry_Pi that being said I have no experience doing so.  I use RuneAudio for music as previously mentioned and for videos I use a combination of Plex Media Server and a Chromecast.
 
Apr 13, 2015 at 7:19 PM Post #8 of 101
If you're already using HDMI out for audio, SPDIF isn't going to make any difference - unless you'd be using a different/better DAC.
 
I'm currently running piCorePlayer (sqeezelite) on a very first generation RasPi 1 (so old it doesn't even have those headers needed for I2S DACs), playing FLAC CD rips. It's flawless and the CPU usage is somewhere around 5% or less. I did have problems with Volumio and Mopidy, especially the latter. The issue is that RasPi USB isn't that great, and the Ethernet interface also goes over USB internally. Forget about listening while re-indexing if you're using a USB DAC.
 
squeezelite doesn't keep a local index like mpd and mopidy, so it's much lighter on I/O. I'm running Logitech Media Server on VM on my server box. I may move that to another ARM board with HDD so I can turn off the server once in a while.
 
So if you're using USB for local storage or Wifi AND have USB DAC, you might get audible errors. Audio out via HDMI or Digi, or one of the I2S DACs should work just fine.
 
I'm not using Kodi on this until I get around to upgrading to Pi2 or Odroid. But check out the Hifiberry forums about Kodi - it seems to work for people although you might have to use a beta/dev version.
 
May 8, 2015 at 6:22 PM Post #11 of 101
I'll be bookmarking this thread as using he RPi2 as a player is my goal. I'll be using it both for my stereo playback and headphones. Here's a little copy/paste from another forum I posted on about my situation.

I am starting to downsize my living space and as a result will be downsizing my midfi audio gear. I would like to utilize the new Pi2 for the task to start with. I know virtually nothing about PC based music servers or their implementation, so I am looking for guidance on how to approach what I'd like to do.

This will be a dedicated two channel rig, no streaming to other parts of the house or anything like that. I would like to keep the footprint of the Pi setup to one chassis if possible.

On that note my goal is to have the Pi be its own hotspot so I can control it via my phone or tablet using Volumio or Runeaudio along with an internal drive or small external placed inside the chassis.

I've tried to make a list of everything I might need, but like I said I'm pretty clueless to this stuff. This will be fed into a tube preamp or buffer, then onto the power amps.

Would this be all I would need?

Pi2 with IQAudio DAC
1 internal hdd (two if there's a way to set it up to mirror itself)
Regulated ps or a usb hub mounted internally
Wifi adapter that can be hacked to create hotspot
Various usb cables (sata to usb, use to micro, etc...)
Momentary power switch with a setup to power down correctly

Thanks for any advice!
 
May 8, 2015 at 6:51 PM Post #12 of 101
That's way beyond my experience with it.  Let us know how it goes!
 
May 8, 2015 at 6:53 PM Post #13 of 101
Would this be all I would need?

Pi2 with IQAudio DAC
1 internal hdd (two if there's a way to set it up to mirror itself)
Regulated ps or a usb hub mounted internally
Wifi adapter that can be hacked to create hotspot
Various usb cables (sata to usb, use to micro, etc...)
Momentary power switch with a setup to power down correctly

Thanks for any advice!

 
Let me adress these one a time, then follow with some advice
 
Pi2 with IQAudio DAC
Yes this is a good place to start if you want to use this DAC.  I use HifiBerry but if your going to use the DAC its fine either way.  Please note that the Pi2 is not fully supported by Rune Audio yet though i find Rune Audio a lot better than Volumio
 
1 internal hdd
Nope, you can't do this.  The RPi2 has no way of connecting traditional SATA drives other than USB which your best off avoiding anyways.  As an academic exercise you could use mdadm to RAID1 2 USB drives but thats not a great idea honestly.  The RPi2 natively will boot of a single micro SD Card.
 
Regulated ps or a usb hub mounted internally
Not needed, the RPI is powered by a micro USB cable.  A 2A microUSB cable will provide plenty of power for a USB WiFi dongle.
 
Wifi Adapter and hacked as Hotspot
To what end?  Just connect it to your home wireless if you want it to be wireless
 
USB Cables
other than power not needed
 
Power Switch
A momentary switch won't work as the RPi has no power switch on it.  If it has power its on, if it doesn't have power... well you get the idea.  You could install an inline switch into your USB power supply but honestly thats a lot more trouble than its worth.  To turn it off just unplug it.  That being said it draws almost no power so why even bother?
 
The suggestions...
Well here is where you'll want to go really
 
You obviously have some thought to protect your media as you want to mirror your drives.  Very good idea.  However do this separate from the RPi.  Don't think of the RPi as a stand alone server think of it purely as a playback device - its really not powerful enough to be a primary file server.  As you don't have a ton of experience with computers my suggestion to you would be the following
 
Synology 2-Bay NAS hardwired into your home network 
RPi2 w/ Rune Audio or Volumio
HifiBerry or IQAudio I2S DAC (w/ associated case)
2A Micro USB Charger(these are really just phone chargers)
Connect the RPi2 via hardline or wifi if you want to buy a USB Wifi Dongle
 
Really your system should look very much like what @zeissiez posted
 
I also want to clarify the statement "Poor mans Aries".  An RPi2 that is correctly configured is every bit as good as an Aries SQ wise - No I don't mean nearly as good for the price - I mean exactly the same for the price if not better.  
 
 
  That's way beyond my experience with it.  Let us know how it goes!


Got ya covered bro! :)
 
May 8, 2015 at 7:47 PM Post #14 of 101
Thanks Maeveth.

I'd like to stick to a hdd with the Pi. If I'm going to go to the trouble and expense to set up a NAS I'll just by a used media server. I won't have any reason to listen anywhere else than 8 feet from my rig so I'm not sure wireless other than for control of the Pi is necessary. I know you can modify a nano dongle into a hotspot for the Pi so you can just control the Pi with an iPad and not have to go through your router.

Here's kind of what I'm talking about.
http://www.whathifi.com/forum/hi-fi/my-raspberry-pi-hifiberry-music-server
https://volumio.org/amazing-diy-raspberry-pi-audio-player-volumio/

I've read that just yanking the power on a Pi is a good way to corrupt the sd card. Why not use this with the nice momentary switch they offer to go with it?
https://lowpowerlab.com/shop/index.php?_route_=ATXRaspi/ATXRaspi-R2
https://lowpowerlab.com/shop/index.php?_route_=LEDSwitch

Regulated power because my house voltage can swing between 116VAC - 126VAC during one day. I just figured a regulated, filtered supply is a lot less noisy. Always has been with my other builds.

I'm really just looking to reduce my footprint as we are planning to downsize our living area by about 60%, so the music room will be gone.
 
May 8, 2015 at 9:50 PM Post #15 of 101
Alright more info helps. 
 
You can do what your talking about.  As I said you'll want to use mdadm to setup the raid array for mirroring.  It's built in to the runeaudio image i just checked.
 
Wireless wise you don't really have to modify anything - you just have to configure it in the OS.  If your going to go with RuneAudio you'll want to find a guide on how to configure ArchLinux to be an Access Point.  If you go with Volumio you'll want to find a guide for Raspian.  Note that the Volumio and Rune images both are stripped down and may be missing packages.
 
For power wise, a momentary switch that would work better if your going to power on/off the drives as well.  As far as your irregular power in your house then yes go for a regulator or a UPS - either works.
 

Users who are viewing this thread

Back
Top