[kmix] pull a few upstream patches, in particular...
Rex Dieter
rdieter at fedoraproject.org
Mon Mar 18 17:31:49 UTC 2013
commit aead3f27c8af26871aa3271885b193e88c5c9a49
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Mon Mar 18 12:31:26 2013 -0500
pull a few upstream patches, in particular...
- kmix crahes moving streams between sinks (#922849)
0001-fix-build-for-pa-0.9.23.patch | 31 ++++++++++++
...t-the-use-of-capture-volumes-added-in-5c5.patch | 49 ++++++++++++++++++++
...x-crash-when-moving-stream-across-devices.patch | 36 ++++++++++++++
kmix.spec | 15 ++++++-
4 files changed, 130 insertions(+), 1 deletions(-)
---
diff --git a/0001-fix-build-for-pa-0.9.23.patch b/0001-fix-build-for-pa-0.9.23.patch
new file mode 100644
index 0000000..37d4308
--- /dev/null
+++ b/0001-fix-build-for-pa-0.9.23.patch
@@ -0,0 +1,31 @@
+From 8ab3b5030ac796aa8b028ae5123efb9cdc4a759d Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Fri, 1 Mar 2013 07:31:55 -0600
+Subject: [PATCH 1/4] fix build for pa < 0.9.23
+
+PA_VOLUME_UI_MAX landed in pulseaudio-0.9.23, so this can be removed
+when/if minimum requirement is ever bumped up (from 0.9.12 currently)
+---
+ backends/mixer_pulse.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/backends/mixer_pulse.cpp b/backends/mixer_pulse.cpp
+index ba5d680..295219b 100644
+--- a/backends/mixer_pulse.cpp
++++ b/backends/mixer_pulse.cpp
+@@ -37,6 +37,12 @@
+ # include <canberra.h>
+ #endif
+
++// PA_VOLUME_UI_MAX landed in pulseaudio-0.9.23, so this can be removed when/if
++// minimum requirement is ever bumped up (from 0.9.12 currently)
++#ifndef PA_VOLUME_UI_MAX
++#define PA_VOLUME_UI_MAX (pa_sw_volume_from_dB(+11.0))
++#endif
++
+ #define HAVE_SOURCE_OUTPUT_VOLUMES PA_CHECK_VERSION(1,0,0)
+
+ #define KMIXPA_PLAYBACK 0
+--
+1.8.1.4
+
diff --git a/0003-pulse-Revert-the-use-of-capture-volumes-added-in-5c5.patch b/0003-pulse-Revert-the-use-of-capture-volumes-added-in-5c5.patch
new file mode 100644
index 0000000..cbcf43e
--- /dev/null
+++ b/0003-pulse-Revert-the-use-of-capture-volumes-added-in-5c5.patch
@@ -0,0 +1,49 @@
+From 22f9ea6a1d6dbf530c8593af7b2331a83c990e37 Mon Sep 17 00:00:00 2001
+From: Colin Guthrie <colin at mageia.org>
+Date: Tue, 12 Mar 2013 12:17:57 +0000
+Subject: [PATCH 3/4] pulse: Revert the use of capture volumes added in
+ 5c57272a.
+
+Using capture controls does not give proper mute handling.
+This is why all streams in the PA backend are treated as 'playback'
+even if they are technically capture streams/devices.
+
+This fixes two problems:
+ 1. You cannot mute mics or recording streams
+ 2. Capture volume is set to crazy high values
+
+BUG: 315920
+(cherry picked from commit 64afb1660b808ea8f1ba3d8d54a5db1cfe5a2acd)
+---
+ backends/mixer_pulse.cpp | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/backends/mixer_pulse.cpp b/backends/mixer_pulse.cpp
+index 295219b..e08a881 100644
+--- a/backends/mixer_pulse.cpp
++++ b/backends/mixer_pulse.cpp
+@@ -834,7 +834,6 @@ void Mixer_PULSE::addDevice(devinfo& dev, bool isAppStream)
+ {
+ if (dev.chanMask != Volume::MNONE) {
+ MixSet *ms = 0;
+- bool isCapture = (m_devnum == KMIXPA_CAPTURE || m_devnum == KMIXPA_APP_CAPTURE);
+ if (m_devnum == KMIXPA_APP_PLAYBACK && s_mixers.contains(KMIXPA_PLAYBACK))
+ ms = s_mixers[KMIXPA_PLAYBACK]->getMixSet();
+ else if (m_devnum == KMIXPA_APP_CAPTURE && s_mixers.contains(KMIXPA_CAPTURE))
+@@ -848,11 +847,8 @@ void Mixer_PULSE::addDevice(devinfo& dev, bool isAppStream)
+ if (isAppStream)
+ md->setApplicationStream(true);
+
+- kDebug() << "Adding Pulse volume " << dev.name << ", isCapture= " << isCapture << ", isAppStream= " << isAppStream << "=" << md->isApplicationStream() << ", devnum=" << m_devnum;
+- if ( isCapture )
+- md->addCaptureVolume(v);
+- else
+- md->addPlaybackVolume(v);
++ kDebug() << "Adding Pulse volume " << dev.name << ", isCapture= " << (m_devnum == KMIXPA_CAPTURE || m_devnum == KMIXPA_APP_CAPTURE) << ", isAppStream= " << isAppStream << "=" << md->isApplicationStream() << ", devnum=" << m_devnum;
++ md->addPlaybackVolume(v);
+ md->setMuted(dev.mute);
+ m_mixDevices.append(md->addToPool());
+ }
+--
+1.8.1.4
+
diff --git a/0004-Fix-crash-when-moving-stream-across-devices.patch b/0004-Fix-crash-when-moving-stream-across-devices.patch
new file mode 100644
index 0000000..b8b6077
--- /dev/null
+++ b/0004-Fix-crash-when-moving-stream-across-devices.patch
@@ -0,0 +1,36 @@
+From 39f51ac87536459966c87050f66c3913fed654d8 Mon Sep 17 00:00:00 2001
+From: Eugene Shalygin <eugene.shalygin at gmail.com>
+Date: Mon, 18 Mar 2013 03:56:04 +1100
+Subject: [PATCH 4/4] Fix crash when moving stream across devices.
+
+REVIEW: 109293
+BUG: 311167
+---
+ gui/mdwslider.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gui/mdwslider.cpp b/gui/mdwslider.cpp
+index af6e725..b09909d 100644
+--- a/gui/mdwslider.cpp
++++ b/gui/mdwslider.cpp
+@@ -1217,7 +1217,7 @@ void MDWSlider::showMoveMenu()
+ KAction *a = new KAction(_mdwMoveActions);
+ a->setText( i18n("Automatic According to Category") );
+ _mdwMoveActions->addAction( QString("moveautomatic"), a);
+- connect(a, SIGNAL(triggered(bool)), SLOT(moveStreamAutomatic()));
++ connect(a, SIGNAL(triggered(bool)), SLOT(moveStreamAutomatic()), Qt::QueuedConnection);
+ m_moveMenu->addAction( a );
+
+ a = new KAction(_mdwMoveActions);
+@@ -1229,7 +1229,7 @@ void MDWSlider::showMoveMenu()
+ {
+ a = new MDWMoveAction(md, _mdwMoveActions);
+ _mdwMoveActions->addAction( QString("moveto") + md->id(), a);
+- connect(a, SIGNAL(moveRequest(QString)), SLOT(moveStream(QString)));
++ connect(a, SIGNAL(moveRequest(QString)), SLOT(moveStream(QString)), Qt::QueuedConnection);
+ m_moveMenu->addAction( a );
+ }
+ }
+--
+1.8.1.4
+
diff --git a/kmix.spec b/kmix.spec
index 47ce52b..fb38236 100644
--- a/kmix.spec
+++ b/kmix.spec
@@ -1,7 +1,7 @@
Name: kmix
Summary: KDE volume control
Version: 4.10.1
-Release: 1%{?dist}
+Release: 2%{?dist}
# code is LGPLv2+ except for gui/osdwidget.* which is GPLv2+
# docs GFDL
@@ -15,6 +15,11 @@ URL: https://projects.kde.org/projects/kde/kdemultimedia/%{name}
%endif
Source0: http://download.kde.org/%{stable}/%{version}/src/%{name}-%{version}.tar.xz
+## upstream patches
+Patch101: 0001-fix-build-for-pa-0.9.23.patch
+Patch103: 0003-pulse-Revert-the-use-of-capture-volumes-added-in-5c5.patch
+Patch104: 0004-Fix-crash-when-moving-stream-across-devices.patch
+
BuildRequires: desktop-file-utils
BuildRequires: kdelibs4-devel >= %{version}
BuildRequires: pkgconfig(alsa)
@@ -36,6 +41,10 @@ Provides: kdemultimedia-kmix = 6:%{version}-%{release}
%prep
%setup -q
+%patch101 -p1 -b .0001
+%patch103 -p1 -b .0003
+%patch104 -p1 -b .0004
+
%build
mkdir -p %{_target_platform}
@@ -90,6 +99,10 @@ fi
%changelog
+* Mon Mar 18 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.10.1-2
+- pull a few upstream patches, in particular...
+- kmix crahes moving streams between sinks (#922849)
+
* Sat Mar 02 2013 Rex Dieter <rdieter at fedoraproject.org> - 4.10.1-1
- 4.10.1
More information about the scm-commits
mailing list