Bug 140707 - kmilo "generic" volume module has annoying rounding problems
Summary: kmilo "generic" volume module has annoying rounding problems
Alias: None
Product: kmilo
Classification: Miscellaneous
Component: Generic MM module (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Willi Richert
Depends on:
Reported: 2007-01-27 09:45 UTC by Stefan Seyfried
Modified: 2007-01-29 13:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:

fix the generic_monitor to use steps that match the hardware (2.77 KB, patch)
2007-01-27 09:47 UTC, Stefan Seyfried

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Seyfried 2007-01-27 09:45:09 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
OS:                Linux

If you use kmilo with a standard keyboard with volume keys (many "multimedia
desktops" and many notebook models) in conjunction with a soundcard that has
less than 100 steps for the mixer (my intel_8x0 has 32), then you get hit by
rounding problems:
- pressing "volume up" tries to increase the volume by 10%, but the next
matching value (rounded down) is stored in the mixer hardware
- pressing "volume down" then does subtract 10% from the current value and
stores it, again it is rounded down.

This leads to e.g. 12 steps "up" from 0 to 100% but only 7 steps down.

If you press ctrl-volume up/down, then it should increase or decrease by 1%,
but in fact it never increases because 1% is not enough to step up the hardware
(which only has 32 steps =~ 3% steps).
There is even a FIXME comment in the code for this.

This is easily fixed with the attached patch.
Comment 1 Stefan Seyfried 2007-01-27 09:47:08 UTC
Created attachment 19436 [details]
fix the generic_monitor to use steps that match the hardware

This patch applies to the openSUSE 3.5.5 package (and still seems to apply
against 3.5.6) and fixes the problem for me.
Comment 2 Dirk Mueller 2007-01-29 13:29:49 UTC
it is already committed and should be in 3.5.6