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.
This commit is contained in:
João Paulo Rechi Vita 2019-05-22 17:10:16 -07:00 committed by João Paulo Rechi Vita
parent dd81386f97
commit da243cf1c7

View file

@ -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))) {