diff options
author | Christian Kellner <christian@kellner.me> | 2017-03-09 15:51:49 +0100 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2017-03-31 17:11:29 +0300 |
commit | b53dd1f0df269d7e1b55e059b0a0d3d530b124b5 (patch) | |
tree | dbc8341f39eb105a0914c5c5f8077acc8f2f0ec9 | |
parent | a3acc167aa2131b0d2ece735f56104edfe6981d2 (diff) |
sink: Invert priorities to prefer external devices
Currently internal > speaker > headphone and pci > usb > bluetooth.
Invert both of these sets, with the reasoning that a headphone and
speakers are something that a user has actively attached and should
therefore get a higher priority. The same reasoning is applied for
the bus type, i.e. bluetooth and usb should be higher than pci,
because they most likely have been actively attached be a user.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=99222
-rw-r--r-- | src/pulsecore/sink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 6011f45b..fb16d574 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -3511,21 +3511,21 @@ unsigned pa_device_init_priority(pa_proplist *p) { if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_FORM_FACTOR))) { - if (pa_streq(s, "internal")) + if (pa_streq(s, "headphone")) priority += 900; else if (pa_streq(s, "speaker")) priority += 500; - else if (pa_streq(s, "headphone")) + else if (pa_streq(s, "internal")) priority += 400; } if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_BUS))) { - if (pa_streq(s, "pci")) + if (pa_streq(s, "bluetooth")) priority += 50; else if (pa_streq(s, "usb")) priority += 40; - else if (pa_streq(s, "bluetooth")) + else if (pa_streq(s, "pci")) priority += 30; } |