…and I’m rather excited.
I’ve been a fan of the Volumio Project for rather a while now, since discovering it as a good platform for my Raspberry Pi audio player a year or more ago. Several self-built MPD-based setups have come and gone since the Raspberry Pi arrived, but Volumio has been the mainstay for reliable playback with control from numerous devices. The main draw for me has been the combination of its web interface, the fact the hard work has been done for me in terms of getting all the software components working together, and the fact that the whole package does seem to sound good.
On reflection I’m not sure that the various “audio optimizations” at the kernel or any other level really make an audible difference, but I do know that the whole package does seem to work more reliably on the limited resources of Raspberry Pi hardware than anything I’ve been able to cook up myself, at least without significant effort expended.
So why does an x86 port excite me so much? Two reasons:
- More processing power availability opens the platform up to interesting things like DSP and dual-use such as streaming to remote machines and the like without falling over. Presently I’d have multiple Raspberry Pi’s set up with dedicated tasks. That’s been educational, but arguably a lot of hassle to set up and maintain. A single machine would make some of this stuff easier.
- Opening up the platform to more common (and more powerful) hardware fvastly extends the range of audio and storage hardware that can usefully be used with it, and perhaps extends Volumio’s exposure on the wider marketplace.
The Raspberry Pi is an amazing platform for what it is – and audio systems based upon its limited bus bandwidth are capable of sounding incredible. But not everyone has a NAS to throw their music onto, which makes the Pi’s USB2 storage a pain to deal with when using it for networking, local storage AND the audio device all at the same time. And even those two do use it with a NAS are hampered by the 100MB Ethernet connection. Sure, streaming even “HD” audio files won’t tax it, but storing, backing up and indexing large audio collections will. And THIS is where even an old Netbook could best it.
At some point where time allows, I’m looking forward to putting my elderly ASUS Netbook through its paces with a 192KHz-capable USB2 audio device and either a USB drive or “Gigabit” Ethernet adaptor (its own onboard Ethernet, like the Pi’s, is limited to 100MB), to see how it stacks up against the Pi running on the same hardware. I know from running the RC download today that the distro works and plays audio even on the onboard audio, and the default setup to use the onboard display, keyboard and mouse to show the Web interface by default is a lovely touch.
Quick note after some experiments last night. Not completely scientific, but enough to show a trend. I set out to compare CPU usage of the Pi running Volumio, upsampling lossless 44.1KHz 16bit stereo with ‘fastest sinc’ to 192KHz 32-bit stereo.
Streaming to the USB uses between 70 and 90% CPU. Streaming to the HDMI output uses 95% and more! Audio gets choppy in the latter case even without other processes getting in the way, whereas the former only gets choppy when the Pi happens to try and update the MPD database at the same time.
Wonder if anyone knows why onboard streaming should use so much extra CPU time to do the same work, and whether I2C suffers the same fate? Not sure I want to spend on a custom DAC if the current EMU 0202USB is more efficient?
In the last couple of weeks, out of curiosity, I’ve bought a Raspberry Pi to play with at home. It’s really very impressive to see what can be done these days with a $35 computer – an “educational” model at that!
Our Pi is currently in place as our digital audio player, courtesy of the Volumio linux “audiophile” distribution, and an EMU 0202 USB audio interface.
Once the Pi was booting Volumio off the SD card, I found two things that needed doing:
- Set up the Pi to pull files off our NAS device. In theory this can be done from the Volumio web interface, but I had to go hacking around editing config files to make this work seamlessly.
- Set up the EMU for optimal digital playback. I take a somewhat different path on this to most “audiophiles”. I’m specifically aiming to implement a software volume control, provided I can run the digital audio chain at 88.2KHz/24bit, or higher. This means CD/MP3 content gets upsampled, while some recordings made natively at 88.2KHz/24bit get to be played that way.
The Volumio forums helped me out with point 1, but I’ve lost a lot of brainpower and free time to getting the EMU to work properly. I could get it to play out at 44.1KHz/24-bit, but any attempt to play native files at higher rates, or to have MPD upsample, resulted in obviously robotic-sounding distorted playback. It turns out the key was simple:
It seems the clock rate on the EMU 0202 and 0404 USB devices is assigned to a fader in ALSA, which in this case I accessed using alsamixer. There were two faders for my 0202: PCM and Clock rate Selector.
The latter has a range of stepped values, equating to the following sample rates:
- 0% 44.1KHz
- 20% 48.0KHz
- 40% 88.2KHz
- 60% 96.0KHz
- 80% 176.4KHz
- 100% 192.0KHz
What I’ve learned then is that to get the setup working, I needed to not only set Volumio (or the underlying MPD player) to resample to the target output rate of 88.2KHz/24-bit but ALSO to set the Clock rate Selector to 40% in alsamixer.
All works happily and I’m loving the more “analogue” sound of the EMU in that mode!
UPDATE, 23RD FEB 2014:
I’ve managed to get MPD to reliably resample to 176400Hz/24-bit (32-bit internal, 24-bit at the card.) by forcing the Pi’s turbo to “always on” and a slight overclock. It’s not *quite* perfect yet, so i might see if I can push it a little harder before documenting our full setup.