From: Tanu Kaskinen Date: Thu, 17 Sep 2020 14:36:37 +0000 (+0300) Subject: sink: Increase JACK device priority X-Git-Tag: v14.99.1~248 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c0779b28b84640736807cd562553d9f517ea0a72;p=platform%2Fupstream%2Fpulseaudio.git sink: Increase JACK device priority The JACK sink and source priority was 0, but I believe the common case is that when a JACK sink or source is loaded, the user wants to make it the default device. Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/983 Part-of: --- diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 8bb67f6..e8aeb17 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -3577,6 +3577,14 @@ unsigned pa_device_init_priority(pa_proplist *p) { pa_assert(p); + /* JACK sinks and sources get very high priority so that we'll switch the + * default devices automatically when jackd starts and + * module-jackdbus-detect creates the jack sink and source. */ + if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_API))) { + if (pa_streq(s, "jack")) + priority += 10000; + } + if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_CLASS))) { if (pa_streq(s, "sound"))