Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pipewire for openSUSE:Factory 
checked in at 2022-11-03 19:13:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pipewire (Old)
 and      /work/SRC/openSUSE:Factory/.pipewire.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pipewire"

Thu Nov  3 19:13:36 2022 rev:66 rq:1032886 version:0.3.59

Changes:
--------
--- /work/SRC/openSUSE:Factory/pipewire/pipewire.changes        2022-10-11 
18:04:15.961960289 +0200
+++ /work/SRC/openSUSE:Factory/.pipewire.new.2275/pipewire.changes      
2022-11-03 19:13:45.075854663 +0100
@@ -1,0 +2,6 @@
+Wed Nov  2 12:48:20 UTC 2022 - Takashi Iwai <ti...@suse.com>
+
+- Fix regression with Dell WD15 Dock and others (bsc#1204719):
+  0002-spa-support-the-speakers-output-only-case-in-report_.patch
+
+-------------------------------------------------------------------

New:
----
  0002-spa-support-the-speakers-output-only-case-in-report_.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pipewire.spec ++++++
--- /var/tmp/diff_new_pack.XfsAX6/_old  2022-11-03 19:13:45.675858191 +0100
+++ /var/tmp/diff_new_pack.XfsAX6/_new  2022-11-03 19:13:45.691858286 +0100
@@ -66,6 +66,8 @@
 Patch0:         reduce-meson-dependency.patch
 # PATCH-FIX-UPSTREAM 0001-filter-chain-iterate-the-port-correctly.patch
 Patch1:         0001-filter-chain-iterate-the-port-correctly.patch
+# PATCH-FIX-UPSTREAM 
0002-spa-support-the-speakers-output-only-case-in-report_.patch
+Patch2:         0002-spa-support-the-speakers-output-only-case-in-report_.patch
 BuildRequires:  docutils
 BuildRequires:  doxygen
 BuildRequires:  fdupes
@@ -338,6 +340,7 @@
 %patch0 -p1
 %endif
 %patch1 -p1
+%patch2 -p1
 
 %build
 %if %{pkg_vcmp gcc < 8}

++++++ 0002-spa-support-the-speakers-output-only-case-in-report_.patch ++++++
>From a2278a5f70fcc03ee72173c44896928d4c6b88d5 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <pe...@perex.cz>
Date: Sat, 29 Oct 2022 20:22:06 +0200
Subject: [PATCH] spa: support the speakers (output) only case in
 report_jack_state()

The Realtek ALC4080 USB audio device (integrated in the
motherboards) can detect the presence on all I/O jacks.

If user connects only speakers, it's a valid case.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2744
---
 spa/plugins/alsa/acp/acp.c | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/spa/plugins/alsa/acp/acp.c b/spa/plugins/alsa/acp/acp.c
index f23232ed3ab9..c49c9e088e88 100644
--- a/spa/plugins/alsa/acp/acp.c
+++ b/spa/plugins/alsa/acp/acp.c
@@ -624,7 +624,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, 
unsigned int mask)
        pa_card *impl = snd_mixer_elem_get_callback_private(melem);
        snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem);
        snd_ctl_elem_value_t *elem_value;
-       bool plugged_in;
+       bool plugged_in, any_input_port_available;
        void *state;
        pa_alsa_jack *jack;
        struct temp_port_avail *tp, *tports;
@@ -735,6 +735,31 @@ static int report_jack_state(snd_mixer_elem_t *melem, 
unsigned int mask)
        if (impl->card.active_profile_index != ACP_INVALID_INDEX)
                active_available = 
impl->card.profiles[impl->card.active_profile_index]->available;
 
+       /* First round - detect, if we have any input port available.
+          If the hardware can report the state for all I/O jacks, only speakers
+          may be plugged in. */
+       any_input_port_available = false;
+       PA_HASHMAP_FOREACH(profile, impl->profiles, state) {
+               pa_device_port *port;
+               void *state2;
+
+               if (profile->profile.flags & ACP_PROFILE_OFF)
+                       continue;
+
+               PA_HASHMAP_FOREACH(port, impl->ports, state2) {
+                       if (!pa_hashmap_get(port->profiles, 
profile->profile.name))
+                               continue;
+
+                       if (port->port.direction == ACP_DIRECTION_CAPTURE &&
+                           port->port.available != ACP_AVAILABLE_NO) {
+                               any_input_port_available = true;
+                               goto input_port_found;
+                       }
+               }
+       }
+input_port_found:
+
+       /* Second round */
        PA_HASHMAP_FOREACH(profile, impl->profiles, state) {
                pa_device_port *port;
                void *state2;
@@ -768,7 +793,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, 
unsigned int mask)
 
                if (has_input_port && !has_output_port && 
found_available_input_port)
                        available = ACP_AVAILABLE_YES;
-               if (has_output_port && !has_input_port && 
found_available_output_port)
+               if (has_output_port && (!has_input_port || 
!any_input_port_available) && found_available_output_port)
                        available = ACP_AVAILABLE_YES;
                if (has_output_port && has_input_port && 
found_available_output_port && found_available_input_port)
                        available = ACP_AVAILABLE_YES;
-- 
2.35.3

Reply via email to