Bug 435840 - Volume adjustments when using unbalanced L+R channels do not correctly scale both outputs
Summary: Volume adjustments when using unbalanced L+R channels do not correctly scale ...
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-17 11:00 UTC by jezekdavid
Modified: 2024-02-19 09:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.7
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jezekdavid 2021-04-17 11:00:21 UTC
SUMMARY

If i set left-right channel balance by L+R volume in sound output to (for example) 60% left + 100% right, then after lowering the global volume (step is set do default 5%) by mouse wheel over icon in systray, the difference between them is always fixed, for example: 5/45%. This creates disbalance between stereo channels based on changes in global volume (and L/R levels in the moment of L/R volume correction). It should be corrected proportionally: let say for originally 60/100%, it should be changed to 27/45% (45/100*60=27), not to 5/45%, etc.

STEPS TO REPRODUCE
1. set volume to 50% L + 100% R
2. lower globally from 100 to 50%
3. left will be 0%
4. lowering even more will, step by step, correct the difference to 0% (which is i believe also not optimal behavior)

SOFTWARE/OS VERSIONS
Actual KDE neon
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Comment 1 Ismael Asensio 2023-06-25 13:28:48 UTC
Git commit cfe4a360f2640d7bd4e2d936804b100a299b268a by Ismael Asensio, on behalf of Quinten Kock.
Committed on 25/06/2023 at 13:27.
Pushed by iasensio into branch 'master'.

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.
FIXED-IN: 5.27.7

M  +5    -2    src/context.h

https://invent.kde.org/plasma/plasma-pa/-/commit/cfe4a360f2640d7bd4e2d936804b100a299b268a
Comment 2 Ismael Asensio 2023-06-25 13:33:45 UTC
Git commit ffe6a4f4b6f56296165cea8651f35563d168ac89 by Ismael Asensio, on behalf of Quinten Kock.
Committed on 25/06/2023 at 13:31.
Pushed by iasensio into branch 'Plasma/5.27'.

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.
FIXED-IN: 5.27.7


(cherry picked from commit cfe4a360f2640d7bd4e2d936804b100a299b268a)

M  +5    -2    src/context.h

https://invent.kde.org/plasma/plasma-pa/-/commit/ffe6a4f4b6f56296165cea8651f35563d168ac89
Comment 3 Harald Sitter 2024-02-19 09:15:46 UTC
Git commit d4b6437b2027587e312a79ee4d563449ecccc5cb by Harald Sitter, on behalf of Quinten Kock.
Committed on 17/02/2024 at 13:45.
Pushed by sitter into branch 'master'.

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.
FIXED-IN: 5.27.7
(cherry picked from commit cfe4a360f2640d7bd4e2d936804b100a299b268a)

M  +5    -2    src/context.cpp

https://invent.kde.org/libraries/pulseaudio-qt/-/commit/d4b6437b2027587e312a79ee4d563449ecccc5cb