From da243cf1c7d4fe66415acba6ea386be8e71cf55c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Rechi=20Vita?= Date: Wed, 22 May 2019 17:10:16 -0700 Subject: [PATCH] core: Reduce priority of "computer" form factor If a sink or a source have the device.form_factor property set to "computer" it is a computer connected over Bluetooth, which should have a lower priority than other sinks/sources. --- src/pulsecore/sink.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 905e1db7b..6571c87c6 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -3608,6 +3608,12 @@ unsigned pa_device_init_priority(pa_proplist *p) { priority += 500; else if (pa_streq(s, "portable")) priority += 450; + else if (pa_streq(s, "computer")) + /* computers get a lower-than-base priority */ + priority += 0; + else + /* default base priority */ + priority += 100; } if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_BUS))) {