Roon and AirPlay 2 simultaneously

Hi,

I often listen to music while having the TV in the background. Occasionally I want to quickly change the sound from Roon to the AppleTV. That is easy with Bluetooth, but I’d like to switch over to AirPlay because I have other BT headphones paired there and they sometimes interfere with the DAC.

I installed shairport-sync and after setting the device in /usr/local/etc/shairport-sync.conf it worked beautifully. To control the volume in the DAC only and level it to the Roon headroom, I set those two options and it works.

ignore_volume_control = “yes”
volume_max_db = -7.0

What does not work is connecting AirPlay, muting on the AppleTV to play Roon - the muting part works, but Roon is complaining that the device is in use.

The only potential convenient solution I see is buying a USB to optical converter (e.g. the SMSL PO100 Pro PO100 Pro) and switch in the DAC from optical (AirPlay) to USB (Roon). Would that work, or would there still be a conflict with shairport and Roon running simultaneously?

Thanks a ton and sorry for the long post.

That is since ALSA playback OOTB blocks devices, i.e. does not support mixing playback form multiple sources concurrently. So instead of muting, you’d really need to stop playback.

However, there is the dmix plugin for mixing:

cat << '_EOF_' > /etc/asound.conf
pcm.!default "dmix:0,0"
ctl.!default {
	type hw
	card 0
}
_EOF_

If you need the auto-conversion plugin as well:

cat << '_EOF_' > /etc/asound.conf
pcm.!default {
	type plug
	slave.pcm "dmix:0,0"
}
ctl.!default {
	type hw
	card 0
}
_EOF_

If your sound card is not card 0, adjust the 0 above accordingly. This is currently not supported by dietpi-config, so if you change the sound card with it, you’d need to reapply this change.

1 Like

Thanks @MichaIng . I think I configured it correctly, but I still can’t make Roon share the device. They write in their documentation that it only supports exclusive ALSA hw, so maybe that’s it? It kinda works in the other direction, when I pause Roon with active AppleTV AirPlay connection, the AppleTV sound starts after a few seconds. I’ll try for a few weeks, if it’s annoying, I might try the digital converter. Configuring the shairport-sync output to a different USB device than the Roon DAC should work, right?

Hmm, actually from Roon end there should be no difference, it just sends its audio stream to whichever ALSA PCM (abstraction) and there it is further handled. Only for the control device it makes sense, if it e.g. uses these directly for volume adjustments and such.

But I remember in Roon Android app you chose the ALSA sound card directly, not a PCM, i.e. the card names were shown. Not sure whether this can be changed somehow either in Roon apps or server/bridge, to selected a PCM or simply the system default PCM, which is what Shairport Sync does by default.

1 Like