Bug 216479 - cannot decrease volume via console
Summary: cannot decrease volume via console
Keywords:
Status: CLOSED DUPLICATE of bug 219736
Alias: None
Product: Fedora
Classification: Fedora
Component: aumix
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Gabriel Somlo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-20 18:33 UTC by Sander
Modified: 2018-04-11 08:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-29 13:36:01 UTC
Type: ---
Embargoed:


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

Description Sander 2006-11-20 18:33:02 UTC
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 18:09:38 UTC
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 18:11:27 UTC
Created attachment 142118 [details]
Patch to fix command line volume lowering

Comment 3 Sander 2006-11-28 16:02:44 UTC
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 10:36:48 UTC
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 13:36:01 UTC
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.