Changing volume to 0% breaks channel ballance

Bug #672420 reported by Murz
6
This bug affects 1 person
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
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
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

Revision history for this message
Murz (murznn) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

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);
 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(map->map[c])) {
 669 if (left == 0)
 670 v->values[c] = nleft;
 671 else
 672 v->values[c] = (pa_volume_t) PA_CLAMP_VOLUME(((uint64_t) v->values[c] * (uint64_t) nleft) / (uint64_t) left);
 673 } else if (on_right(map->map[c])) {
 674 if (right == 0)
 675 v->values[c] = nright;
 676 else
 677 v->values[c] = (pa_volume_t) PA_CLAMP_VOLUME(((uint64_t) v->values[c] * (uint64_t) nright) / (uint64_t) right);
 678 }
 679 }
 680

pa_cvolume_get_balance() return 0 when

623 if (left == right)
624 return 0.0f;

Revision history for this message
Murz (murznn) wrote :

Can we fix this bug with ballance? Or it must be fixed in pulseaudio?
And what can we do for add support surround4.1, 5.1, 7.1 and other configurations?
Because configuring different volumes per channel in surround systems needs more often than in only stereo system.
I think better is to store each volume per-channel, instead of ballance.
I have create the bug in pulseaudio about this: http://pulseaudio.org/ticket/874

Changed in gnome-media:
status: Unknown → New
Revision history for this message
Raymond (superquad-vortex2) wrote :

The point is gnome-media seem does not keep the setting of volume

e.g. when you increase the volume to over 100% , log out and login , you will find the volume change to 100%

affects: gnome-media (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
dino99 (9d9) wrote :

EOL reached on that serie https://wiki.ubuntu.com/Releases

Changed in pulseaudio (Ubuntu):
status: Triaged → Invalid
Changed in gnome-media:
importance: Unknown → Undecided
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.