Hello community, here is the log from the commit of package pulseaudio for openSUSE:Factory checked in at 2015-10-25 15:10:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pulseaudio (Old) and /work/SRC/openSUSE:Factory/.pulseaudio.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pulseaudio" Changes: -------- --- /work/SRC/openSUSE:Factory/pulseaudio/pulseaudio.changes 2015-10-19 22:48:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.pulseaudio.new/pulseaudio.changes 2015-10-25 15:10:52.000000000 +0100 @@ -1,0 +2,8 @@ +Tue Oct 20 14:44:13 CEST 2015 - [email protected] + +- Fix another alsa-mixer path for dock line out jack (boo#948979): + 0003-alsa-mixer-Add-Dock-Line-Out-jack-handling-to-analog.patch +- Fix the order of ports updates (boo#948979): + 0004-module-alsa-card-Report-available-ports-before-unava.patch + +------------------------------------------------------------------- New: ---- 0003-alsa-mixer-Add-Dock-Line-Out-jack-handling-to-analog.patch 0004-module-alsa-card-Report-available-ports-before-unava.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pulseaudio.spec ++++++ --- /var/tmp/diff_new_pack.5UfSrg/_old 2015-10-25 15:10:53.000000000 +0100 +++ /var/tmp/diff_new_pack.5UfSrg/_new 2015-10-25 15:10:53.000000000 +0100 @@ -50,6 +50,10 @@ Patch4: pstream-Fix-use-after-free-in-srb_callback.patch # PATCH-FIX-UPSTREAM 0002-alsa-mixer-Recognize-Dock-Line-Out-jack.patch boo#934850 Patch102: 0002-alsa-mixer-Recognize-Dock-Line-Out-jack.patch +# PATCH-FIX-UPSTREAM 0003-alsa-mixer-Add-Dock-Line-Out-jack-handling-to-analog.patch boo#948979 +Patch103: 0003-alsa-mixer-Add-Dock-Line-Out-jack-handling-to-analog.patch +# PATCH-FIX-UPSTREAM 0004-module-alsa-card-Report-available-ports-before-unava.patch boo#948979 +Patch104: 0004-module-alsa-card-Report-available-ports-before-unava.patch BuildRequires: alsa-devel >= 1.0.19 # require only minimal bluez, if we are on bluez 5 we will determine in build phase BuildRequires: bluez-devel >= 4.99 @@ -334,6 +338,8 @@ %endif %patch4 -p1 %patch102 -p1 +%patch103 -p1 +%patch104 -p1 %build echo 'HTML_TIMESTAMP=NO' >> doxygen/doxygen.conf.in ++++++ 0003-alsa-mixer-Add-Dock-Line-Out-jack-handling-to-analog.patch ++++++ >From e061f9afd2ee1a798d71b3d078725bfcea214202 Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen <[email protected]> Date: Fri, 18 Sep 2015 09:59:45 +0300 Subject: [PATCH] alsa-mixer: Add "Dock Line Out" jack handling to analog-output-speaker-always The jack is already in analog-output-speaker, so let's have the same handling in analog-output-speaker-always too. --- src/modules/alsa/mixer/paths/analog-output-speaker-always.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf index 599cfc85f0d2..71f356dce00b 100644 --- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf +++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf @@ -49,6 +49,10 @@ state.unplugged = unknown state.plugged = no state.unplugged = unknown +[Jack Dock Line Out] +state.plugged = no +state.unplugged = unknown + [Element Hardware Master] switch = mute volume = merge -- 2.6.1 ++++++ 0004-module-alsa-card-Report-available-ports-before-unava.patch ++++++ >From 91313e60a81e96ce976f24c522656c57b4ab94ca Mon Sep 17 00:00:00 2001 From: David Henningsson <[email protected]> Date: Tue, 5 May 2015 17:01:13 +0200 Subject: [PATCH] module-alsa-card: Report available ports before unavailable ones In case the same jack causes one port to become available and another one unavailable, the available should be reported first. This is to avoid unnecessary changes: e g, consider a 'Headphone Jack' making 'Headphone' available and 'Speaker' unavailable. In case the unavailable change triggers first, and there is also a currently available third port (e g 'Digital out'), the routing system might choose to route to this port because neither of the 'Speaker' and 'Headphone' ports are available. Signed-off-by: David Henningsson <[email protected]> --- src/modules/alsa/module-alsa-card.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -304,7 +304,7 @@ static void init_profile(struct userdata am->source = pa_alsa_source_new(u->module, u->modargs, __FILE__, u->card, am); } -static void report_port_state(pa_device_port *p, struct userdata *u) { +static pa_available_t calc_port_state(pa_device_port *p, struct userdata *u) { void *state; pa_alsa_jack *jack; pa_available_t pa = PA_AVAILABLE_UNKNOWN; @@ -348,10 +348,14 @@ static void report_port_state(pa_device_ pa = cpa; } } - - pa_device_port_set_available(p, pa); + return pa; } +struct temp_port_avail { + pa_device_port *port; + pa_available_t avail; +}; + static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) { struct userdata *u = snd_mixer_elem_get_callback_private(melem); snd_hctl_elem_t *elem = snd_mixer_elem_get_private(melem); @@ -359,7 +363,7 @@ static int report_jack_state(snd_mixer_e bool plugged_in; void *state; pa_alsa_jack *jack; - pa_device_port *port; + struct temp_port_avail *tp, *tports; pa_assert(u); @@ -376,6 +380,8 @@ static int report_jack_state(snd_mixer_e pa_log_debug("Jack '%s' is now %s", pa_strnull(snd_hctl_elem_get_name(elem)), plugged_in ? "plugged in" : "unplugged"); + tports = tp = pa_xnew0(struct temp_port_avail, pa_hashmap_size(u->jacks)+1); + PA_HASHMAP_FOREACH(jack, u->jacks, state) if (jack->melem == melem) { pa_alsa_jack_set_plugged_in(jack, plugged_in); @@ -388,9 +394,22 @@ static int report_jack_state(snd_mixer_e /* When not using UCM, we have to do the jack state -> port * availability mapping ourselves. */ - pa_assert_se(port = jack->path->port); - report_port_state(port, u); + pa_assert_se(tp->port = jack->path->port); + tp->avail = calc_port_state(tp->port, u); + tp++; } + + /* Report available ports before unavailable ones: in case port 1 becomes available when port 2 becomes unavailable, + this prevents an unnecessary switch port 1 -> port 3 -> port 2 */ + + for (tp = tports; tp->port; tp++) + if (tp->avail != PA_AVAILABLE_NO) + pa_device_port_set_available(tp->port, tp->avail); + for (tp = tports; tp->port; tp++) + if (tp->avail == PA_AVAILABLE_NO) + pa_device_port_set_available(tp->port, tp->avail); + + pa_xfree(tports); return 0; }
