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.