Bug 216479 - cannot decrease volume via console
cannot decrease volume via console
Status: CLOSED DUPLICATE of bug 219736
Product: Fedora
Classification: Fedora
Component: aumix (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Gabriel Somlo
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-20 13:33 EST by Sander
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-29 08:36:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix command line volume lowering (372 bytes, patch)
2006-11-25 13:11 EST, Neil Bird
no flags Details | Diff

  None (edit)
Description Sander 2006-11-20 13:33:02 EST
Description of problem:
When I want to decrease the volume (PCM2) by console it will increase the
volume. (for example: aumix -W -10)

Version-Release number of selected component (if applicable):
aumix 2.8

Steps to Reproduce:
1. aumix -W -10

results:
aumix -q gives a higer figure for PCM2.
This will increase volume of PCM2 and not decrease it.

Additional info:
same problem for line1 and I think it will also occur with the other options.
Comment 1 Neil Bird 2006-11-25 13:09:38 EST
Well, this is an odd one.  Doesn't look to me as if aumix has changed in ages,
so I can only assume something in the optargs area has caused this.  The issue
is in common.c:SetShowNoninter() :

                change = (int) strtol(optarg, NULL, 10);
                if (errno)
                        change = 1;     /* For compatibility with versions 1.15
to 1.17, assume one if no number was given. */
                if (*optarg == '+') {   /* increase */
                        right += change;
                        left += change;
                        right = (right > MAXLEVEL) ? MAXLEVEL : right;
                        left = (left > MAXLEVEL) ? MAXLEVEL : left;
                } else {        /* decrease */
                        left -= change;
                        right -= change;
                        left = (left < 0) ? 0 : left;
                        right = (right < 0) ? 0 : right;
                }

If change is negative, which it appears to be with, say, "-v -5", the '-='
actually adds the delta.  I can only assume, as this worked up until fairly
recently (FC5, BTW) that something (optargs?) was stripping the '-' leaving a
+ve value which needed subtracting, but that's not the case now.

I've patched mine with the following attachment, and suggest that as the fix. 
I've put a copy of the RPM on my website (http://repos.fnxweb.com/).  Original
reporter will have to rebuild the SRPM for the FC6 as I'm not on that yet.
Comment 2 Neil Bird 2006-11-25 13:11:27 EST
Created attachment 142118 [details]
Patch to fix command line volume lowering
Comment 3 Sander 2006-11-28 11:02:44 EST
the RPM (FC5) is working on FC6. Thanks.

Who will put this new aumix package in the /updates directory of fedora?
How does this work? (I'm quite new to bugzilla)
Comment 4 Matěj Cepl 2006-12-29 05:36:48 EST
You need to select correct component for your bug report, then you are talking
with the right people. This is aumix issue IMHO and not Xorg one. I have changed
component to the hopefully correct one and so somebody relevant will see this
bug soon.
Comment 5 Gabriel Somlo 2006-12-29 08:36:01 EST
This should be fixed already in aumix-2.8-11.fc[5-7]

*** This bug has been marked as a duplicate of 219736 ***

Note You need to log in before you can comment on or make changes to this bug.