[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] sink: Increase JACK device priority

PulseAudio Marge Bot gitlab at gitlab.freedesktop.org
Mon Dec 14 21:00:39 UTC 2020



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
c0779b28 by Tanu Kaskinen at 2020-12-14T20:55:10+00:00
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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/369>

- - - - -


1 changed file:

- src/pulsecore/sink.c


Changes:

=====================================
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"))



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c0779b28b84640736807cd562553d9f517ea0a72

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c0779b28b84640736807cd562553d9f517ea0a72
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201214/0e63a082/attachment.htm>


More information about the pulseaudio-commits mailing list