summaryrefslogtreecommitdiff
path: root/kde-plasma/plasma-pa
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-27 13:35:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-27 13:35:02 +0100
commitef593d1ec529be89d755077eee3869006d8c18ae (patch)
treee17a9fcd71c371059f0168cbdfe109c563536c27 /kde-plasma/plasma-pa
parent61faa1ea0e8302df305bc281038fc00dc7eb1dd4 (diff)
gentoo auto-resync : 27:06:2023 - 13:35:02
Diffstat (limited to 'kde-plasma/plasma-pa')
-rw-r--r--kde-plasma/plasma-pa/Manifest3
-rw-r--r--kde-plasma/plasma-pa/files/plasma-pa-5.27.6-make-setGenericVolume-keep-balance.patch42
-rw-r--r--kde-plasma/plasma-pa/files/plasma-pa-5.27.6-move-volume-logic-to-VolumeSlider.patch93
-rw-r--r--kde-plasma/plasma-pa/plasma-pa-5.27.6-r1.ebuild41
4 files changed, 179 insertions, 0 deletions
diff --git a/kde-plasma/plasma-pa/Manifest b/kde-plasma/plasma-pa/Manifest
index ea6de9949d32..fed57f079754 100644
--- a/kde-plasma/plasma-pa/Manifest
+++ b/kde-plasma/plasma-pa/Manifest
@@ -1,5 +1,8 @@
+AUX plasma-pa-5.27.6-make-setGenericVolume-keep-balance.patch 1662 BLAKE2B c58e3dbdd726dae62de8fbe3d17ef90c3dd56c7bcd424de7c69c1e47580a599e0e215e7d39d51bed4093172227ae73d49bc35109bf5b554d91340ea80be6c158 SHA512 5addd5fec230a63e3fba4b57acd4ddf82136b652d69432679b94c503c0d9a78bc623619511fe72f1c223b0341f17df1bda6ac79ee505f7dede8e8be2f77e7b64
+AUX plasma-pa-5.27.6-move-volume-logic-to-VolumeSlider.patch 3585 BLAKE2B bd93b00833c4b2c0370a8f061a303c1e6db18b4c1d6f23f0e11558dea77f4ad5350cfa351adaac992ed1607754f7f25afe1aa0de4086f6aab47491eb948c2601 SHA512 0d3c8a88b9ad5cddc2c8cafe9985665c668bfd2ecf86b639bacb62b6d9d51c155c9905b9bfe728de579958e85e65981507c87dba30b416a2c33e01751a2a9986
DIST plasma-pa-5.27.5.tar.xz 163052 BLAKE2B 63a74251348665823c6f2a08326fd21d7be716f9d0f7780f5f4fdbe8a63b684862cd360c50d790372fd33d9526a1a74e1d980ce1ff689c274aa8971153fe9a8a SHA512 7524e4bd6b5c0db4f7157f50cb89a0cc4052f33c680ebef08d0cc2e393ecf5e53d9c96e472701300c74ef7386f90f74afffec79180a080724d19445a22dfcf7f
DIST plasma-pa-5.27.6.tar.xz 163288 BLAKE2B 22ffddaf60d617af18c75e77130dd353b783021c7efa766147985009235bd09a43dd9a79902cd3dde06167ef3ee917bb0530abc694a767cd40aa1c181334c39e SHA512 2d1633e96b105e7aecfd05dfe17b0dabd28e6d1f4103575fa7a006868e7d6083954ed3176bd9c5c2c0d7f0e102f91bb5296eaf8a7de5ab8baad63d8f6a23e84b
EBUILD plasma-pa-5.27.5.ebuild 911 BLAKE2B f6c454a2e9b75da56c535eb593c55c2e42691a3a57257e682d96addc4f4368de1a9929372b22b32b7c56eddf95ab001d386a38807249c6c3db3e72646dd37310 SHA512 5be403af74f8f2143d1bbdd9718764e6710fc567d92e0076653a8a2310ca90b9b687bdba53d89bc2f56768a33404227819e5b50e4f1f9db3060a0d57cdcb6631
+EBUILD plasma-pa-5.27.6-r1.ebuild 1078 BLAKE2B 8e482a90f98038766c65784d96952a4ced29b28390fee11a1f8ccabf298e215a4a67f6c2ffd45504c1cfe28883708c0a09fd8b1797bea6e60ca1c271e854f65d SHA512 6403f24207e1b5da08da224a82638dd68b9bd7b54cdaebbdb4d76271f3ddc7680309dac59c1e69c578371e80ed5881cd677ce3cdd5d47e34f3ae176c3bdf1529
EBUILD plasma-pa-5.27.6.ebuild 914 BLAKE2B 0662323e66a7aee80be5c31ffdf4363a0e847ac6c18cb989bea89778d9258f5bdeb8fa2ec1e8e55147b4f2a5d34a31757ebcc28bae24e0e02774a25ca1a64464 SHA512 cf62b57407ac6d5452db19ff1837eb7c813c7cea01033e5f7f2696e3d9148cf2a4bc8f1e072266b5ba0c303dd0f1229813ebeee287754af2781b5fe739e3925a
MISC metadata.xml 318 BLAKE2B 922a5e32e706b2976c5f359a14194d268d3f499398576c80ce5fad8c0fcea0fbf048de4480a80a6a1889c88b8b6c14147654a3ab4d5ffbcc258c2290da63f6d1 SHA512 614cb8dda7ad2088e5d6ef39b449bb4be0ac72cd0231c320188d76d1816dce6490c5114bb4798112c4b11d99d30a9e82ff8fcf08ffa8c049589682a5e38208f6
diff --git a/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-make-setGenericVolume-keep-balance.patch b/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-make-setGenericVolume-keep-balance.patch
new file mode 100644
index 000000000000..2067a4fd9742
--- /dev/null
+++ b/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-make-setGenericVolume-keep-balance.patch
@@ -0,0 +1,42 @@
+From ffe6a4f4b6f56296165cea8651f35563d168ac89 Mon Sep 17 00:00:00 2001
+From: Quinten Kock <quintenkock@gmail.com>
+Date: Wed, 21 Jun 2023 20:51:11 +0200
+Subject: [PATCH] Make setGenericVolume keep balance between channels
+
+Previously setGenericVolume would apply the same amount of difference
+on all channels, making e.g. 100%/50% -> 80%/30%.
+
+This commit changes it to keep the ratios equal instead, so that the
+resulting volume would be 80%/40%, keeping the balance the same.
+
+BUG: 435840
+FIXED-IN: 5.27.7
+
+
+(cherry picked from commit cfe4a360f2640d7bd4e2d936804b100a299b268a)
+---
+ src/context.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/context.h b/src/context.h
+index 3d1f7525..969fa13b 100644
+--- a/src/context.h
++++ b/src/context.h
+@@ -123,9 +123,12 @@ public:
+ newVolume = qBound<qint64>(0, newVolume, PA_VOLUME_MAX);
+ pa_cvolume newCVolume = cVolume;
+ if (channel == -1) { // -1 all channels
+- const qint64 diff = newVolume - pa_cvolume_max(&cVolume);
++ const qint64 orig = pa_cvolume_max(&cVolume);
++ const qint64 diff = newVolume - orig;
+ for (int i = 0; i < newCVolume.channels; ++i) {
+- newCVolume.values[i] = qBound<qint64>(0, newCVolume.values[i] + diff, PA_VOLUME_MAX);
++ const qint64 channel = newCVolume.values[i];
++ const qint64 channelDiff = orig == 0 ? diff : diff * channel / orig;
++ newCVolume.values[i] = qBound<qint64>(0, newCVolume.values[i] + channelDiff, PA_VOLUME_MAX);
+ }
+ } else {
+ Q_ASSERT(newCVolume.channels > channel);
+--
+GitLab
+
diff --git a/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-move-volume-logic-to-VolumeSlider.patch b/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-move-volume-logic-to-VolumeSlider.patch
new file mode 100644
index 000000000000..2a01651f8814
--- /dev/null
+++ b/kde-plasma/plasma-pa/files/plasma-pa-5.27.6-move-volume-logic-to-VolumeSlider.patch
@@ -0,0 +1,93 @@
+From 91dcf51a0cda029519c917c93f330a6ced531784 Mon Sep 17 00:00:00 2001
+From: Quinten Kock <quintenkock@gmail.com>
+Date: Wed, 21 Jun 2023 21:03:15 +0200
+Subject: [PATCH] Put volume change logic centrally in VolumeSlider
+
+This commit puts the volume change logic in one place, to prevent
+issues related to changing the volume twice.
+
+Without this commit there are issues such as dragging from 100%/100% to
+100%/50% and then the mixer changing the volume to 50%/25%.
+
+I'm not sure I'm entirely happy with this, but it seems to work.
+
+
+(cherry picked from commit fec28d12c086a13038f6c40f10d3c25bb7517660)
+---
+ src/kcm/package/contents/ui/DeviceListItem.qml | 18 ++----------------
+ src/kcm/package/contents/ui/VolumeSlider.qml | 16 +++++++++++++++-
+ 2 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/src/kcm/package/contents/ui/DeviceListItem.qml b/src/kcm/package/contents/ui/DeviceListItem.qml
+index 09feea71..ab0ce6f0 100644
+--- a/src/kcm/package/contents/ui/DeviceListItem.qml
++++ b/src/kcm/package/contents/ui/DeviceListItem.qml
+@@ -178,12 +178,6 @@ ColumnLayout {
+ Layout.columnSpan: 2
+ Layout.alignment: Qt.AlignVCenter
+ visible: !balanceButton.checked
+-
+- value: Volume
+- onMoved: {
+- Volume = value;
+- Muted = (value === 0);
+- }
+ }
+
+ Repeater {
+@@ -203,16 +197,8 @@ ColumnLayout {
+ Layout.fillWidth: true
+
+ value: ChannelVolumes[index]
+- onMoved: {
+- delegate.pulseObject.setChannelVolume(index, value);
+-
+- // volumes are updated async, so we'll just assume it worked here
+- let newChannelVolumes = ChannelVolumes;
+- newChannelVolumes[index] = value;
+- Muted = newChannelVolumes.every((volume) => {
+- return volume === 0;
+- });
+- }
++
++ channel: index
+ }
+ }
+ }
+diff --git a/src/kcm/package/contents/ui/VolumeSlider.qml b/src/kcm/package/contents/ui/VolumeSlider.qml
+index c2cf0a31..fc0c4a6c 100644
+--- a/src/kcm/package/contents/ui/VolumeSlider.qml
++++ b/src/kcm/package/contents/ui/VolumeSlider.qml
+@@ -19,6 +19,8 @@ RowLayout {
+
+ property alias value: slider.value
+
++ property int channel: -1
++
+ QQC2.Slider {
+ id: slider
+
+@@ -35,7 +37,19 @@ RowLayout {
+ onMoved: {
+ // Since it is not possible to use stepSize without tickmarks being displayed, force 1% steps
+ // Unfortunately without stepSize, it cannot snap visually whilst scrolling by changing value instead of Volume as it breaks the binding
+- Volume = Math.round(value * 100 / PulseAudio.NormalVolume) * PulseAudio.NormalVolume / 100
++ let volume = Math.round(value * 100 / PulseAudio.NormalVolume) * PulseAudio.NormalVolume / 100
++ if (channel == -1) {
++ Volume = volume
++ Muted = volume === 0;
++ } else {
++ delegate.pulseObject.setChannelVolume(channel, volume);
++
++ // volumes are updated async, so we'll just assume it worked here
++ let newChannelVolumes = ChannelVolumes;
++ newChannelVolumes[index] = value;
++ Muted = newChannelVolumes.every(volume => volume === 0);
++ }
++
+ sliderRow.moved()
+ }
+
+--
+GitLab
+
diff --git a/kde-plasma/plasma-pa/plasma-pa-5.27.6-r1.ebuild b/kde-plasma/plasma-pa/plasma-pa-5.27.6-r1.ebuild
new file mode 100644
index 000000000000..9128d7fa29b0
--- /dev/null
+++ b/kde-plasma/plasma-pa/plasma-pa-5.27.6-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="forceoptional"
+KFMIN=5.106.0
+QTMIN=5.15.9
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Plasma applet for audio volume management using PulseAudio"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+DEPEND="
+ dev-libs/glib:2
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ media-libs/libcanberra
+ media-libs/libpulse
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtquickcontrols2-${QTMIN}:5
+ >=kde-frameworks/kirigami-${KFMIN}:5
+ x11-themes/sound-theme-freedesktop
+"
+BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:5"
+
+PATCHES=( # in 5.27.7:
+ "${FILESDIR}/${P}-make-setGenericVolume-keep-balance.patch" # KDE-bug 435840
+ "${FILESDIR}/${P}-move-volume-logic-to-VolumeSlider.patch"
+)