Linking media.role to intended_roles makes Gnome default music client very difficult to use with RAOP / Airplay devices
I think this commit (stream-interaction: Support for triggering ducking/cork by source-output) : 0f4f109a has made some music clients (especially rhythmbox) very difficult to use, if you have different output devices on the same network (local soundcard + something with property device.intended_roles = "music" like an Airplay device)
Explanation : As far as I understand, this commit makes this "rule" true : Any "Sink Input" or “Client” with Properties media.role = “music” gets arbitrarily attached to 1st Sink found with device.intended_roles = "music" (I guess it is true for whatever role)
So, by default :
- rhythmbox client (and others) has media.role = “music"
- airplay devices discovered on the network by "pulseaudio-module-raop" have device.intended_roles = "music"
- local soundcard does not have device.intended_roles = "music"
My use case : When I want to listen music with rhythmbox on my PC (output device : local soundcard)
What happens : each time rhythmbox creates a new stream (1st song started, press "Next track", choose another a song etc), the sound output is redirected to 1st airplay device found on my network instead of local soundcard. Any correction made with pavucontrol does not stick.
Workaround that did not work (client-side) : I tried to use PULSE_PROP='media.role=anythingbutmusic' at runtime, but it does not override media.role value.
Partial workaround (server-side) :
- use "pactl list" to recover Modules definitions when "Name:" is "module-raop-sink". You will need what follows "Argument:"
- prevent airplay devices from being autodetected (for example use paprefs and uncheck "Make discoverable Apple AirTunes sound devices available locally")
- use you favorite pulseaudio config file (for example /etc/pulse/default.pa ) and for each device add one line beginning with : "load-module module-raop-sink" and followed with what was after "Argument:" at step 1. You will need to edit the sink_properties='...' part to insert device.intended_roles=""
- Restart pulseaudio (pulseaudio -k )