How to select HiFi Berry for shairport

I installed a HiFi Berry DAC on my Raspberry Pi, and added the required lines to /etc/modules. It was easy to get mpd to work by choosing ‘sndrpihifiberry’ in Volumio’s playback menu. But how do I get shairport to use the HiFi Berry too? Currently it’s playing through the Pi built-in output.

Also — is it even possible for two separate processes to share one audio output device using ALSA? From my understanding, that’s a benefit reserved for PulseAudio, which is not included in the Volumio installation to increase performance. But I could be totally wrong.

I figured out I can change the shairport init script like this to play through the HiFi Berry.

/usr/local/bin/shairport -d -a "volumio" -o alsa -- -d hw:1,0 But as I suspected, it conflicts with mpd. I get an error like this:

[code]FATAL: Alsa initialization failed: unable to open pcm device: Device or resource busy

Shutting down…
Got SIGTERM, quitting.[/code]I have to manually quit mpd to make shairport work. Since Volumio was designed to run both mpd and shairport, I assume there’s something I’m not understanding here.

Hi Mate,

This maybe of help.

That’s a shairport bug I’m figthing against also. It happens when you specify the device you wish…
So instead of changing shairport’s output, just comment the bcm section in /etc/modules, that way hifiberry will be always 0:0 and you can use default shairport init.d script…