Changing volume to 0% breaks channel ballance
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNOME media utilities |
Invalid
|
Undecided
|
Unassigned | ||
pulseaudio (Ubuntu) |
Invalid
|
Low
|
Unassigned |
Bug Description
Binary package hint: gnome-media
I setup non-equal channel balance for my output device. When I changing volume up to 100% and back, the balance config didn't breaks, it same as I set.
But when I setting volume to 0% (and when I goes back to non-0% volume), my ballance setup was broken, channels setted to same volume!
And in my work I need to do my balance setup again very often, every time when I try to do the low volume.
The issue is actual on surround 5.1, 4.1, 7.1 setup too, because by default subwoofer have the same volume and users very often do the subwoofer lower than other, and very often they tune each channel for get comfort volume from each speaker in place near computer, and when changing volume very often they losts all config.
For solve this problem, as I think, when changing volume down, we can analyse new per-channel volumes and if some of channel will have 0% volume, do the mute instead of decrease volume for each channel and breaking current balance.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnome-media 2.31.6-0ubuntu2
ProcVersionSign
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Mon Nov 8 07:00:32 2010
LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: gnome-media
Changed in gnome-media: | |
status: | Unknown → New |
affects: | gnome-media (Ubuntu) → pulseaudio (Ubuntu) |
Changed in pulseaudio (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Triaged |
Using 4 controls : Volume , Balance, Fade and Bass to control six or eight channels is not easy especially when gnome-media cannot save/restore the settings of this four controls
This bug is in pa_cvolume_ set_balance( ) since left and right will be zero when you set the volume to 0%
655 get_avg_lr(map, v, &left, &right); map->map[ c])) { VOLUME( ((uint64_ t) v->values[c] * (uint64_t) nleft) / (uint64_t) left); map->map[ c])) { VOLUME( ((uint64_ t) v->values[c] * (uint64_t) nright) / (uint64_t) right);
656
657 m = PA_MAX(left, right);
658
659 if (new_balance <= 0) {
660 nright = (new_balance + 1.0f) * m;
661 nleft = m;
662 } else {
663 nleft = (1.0f - new_balance) * m;
664 nright = m;
665 }
666
667 for (c = 0; c < map->channels; c++) {
668 if (on_left(
669 if (left == 0)
670 v->values[c] = nleft;
671 else
672 v->values[c] = (pa_volume_t) PA_CLAMP_
673 } else if (on_right(
674 if (right == 0)
675 v->values[c] = nright;
676 else
677 v->values[c] = (pa_volume_t) PA_CLAMP_
678 }
679 }
680
pa_cvolume_ get_balance( ) return 0 when
623 if (left == right)
624 return 0.0f;