[pulseaudio-commits] [Git][pulseaudio/pulseaudio][stable-14.x] 2 commits: switch-on-port-available: Pass correct port_pointers to switch_to_port()

Tanu Kaskinen gitlab at gitlab.freedesktop.org
Sat Jan 16 18:04:13 UTC 2021



Tanu Kaskinen pushed to branch stable-14.x at PulseAudio / pulseaudio


Commits:
a9bd7105 by Tanu Kaskinen at 2021-01-16T19:27:02+02:00
switch-on-port-available: Pass correct port_pointers to switch_to_port()

The pp variable contains information for the port that became
unavailable, but switch_to_port() needs the information for the port
that we're switching to.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1096
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/468>

- - - - -
6a487c52 by Tanu Kaskinen at 2021-01-16T19:31:30+02:00
Update NEWS

- - - - -


2 changed files:

- NEWS
- src/modules/module-switch-on-port-available.c


Changes:

=====================================
NEWS
=====================================
@@ -1,3 +1,14 @@
+PulseAudio 14.2
+
+A bug fix release.
+
+ * Fix port switching when unplugging headphones
+
+Contributors
+
+  Tanu Kaskinen
+
+
 PulseAudio 14.1
 
 A bug fix release.


=====================================
src/modules/module-switch-on-port-available.c
=====================================
@@ -278,8 +278,10 @@ static void switch_from_port(pa_device_port *port, struct port_pointers pp) {
      * profile is still available in the
      * PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED callback, as at this point
      * the profile availability hasn't been updated yet. */
-    if (best_port)
-        switch_to_port(best_port, pp);
+    if (best_port) {
+        struct port_pointers best_pp = find_port_pointers(best_port);
+        switch_to_port(best_port, best_pp);
+    }
 }
 
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/d6c8c9ce37f38ea95275453f75b112b393abc38b...6a487c5244563f49a025088de3510c80824fc99e

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/d6c8c9ce37f38ea95275453f75b112b393abc38b...6a487c5244563f49a025088de3510c80824fc99e
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/20210116/608c67df/attachment.htm>


More information about the pulseaudio-commits mailing list