sink: Reduce chat sink priority
authorTanu Kaskinen <tanuk@iki.fi>
Sat, 14 Mar 2020 08:42:44 +0000 (10:42 +0200)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Thu, 10 Dec 2020 16:43:17 +0000 (16:43 +0000)
commit6b04e2a89e2a0a8b4f6aecb38fd00d82914f7050
tree79d205d0e2abf22daf8e41b8c76b78f507db2f63
parent3afb7f8c08ab6ce8e47075f7484f470c8c561a11
sink: Reduce chat sink priority

Some gaming sound cards have custom profiles with analog-game and
analog-chat mappings that exist simultaneously. The game sink should
have higher priority than the chat sink, but currently there's no way to
affect the sink priorities from the profile-set configuration (the
mapping priority is not propagated to the sink priority).

I first thought about adding the mapping priority to the sink priority,
but that could mess up the prioritization system in
pa_device_init_priority(). I ended up checking for the intended roles
property to reduce the chat sink priority. I also reduced the iec958
priority so that the chat and iec958 sinks don't end up with the same
priority.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/818
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/266>
src/pulsecore/sink.c