FIXES: alsamixer lowering volume control widget past 0 causes hostile volume spike to 100
A message that is not in the archive (sent off-list or not yet received): [email protected]
alsa-project/alsa-utils pull request #266 was opened from genbtc:
bug: lowering volume below 0 causes volume to overflow and spike to 100% volume hurting my ears.
to reproduce: when holding down z,x,c to lower the volume, the volume spikes to 100% and then down to 0% over and over
background:
when volume is already 0 and direction is -1 (lowering volume) - but lower than 0 is impossible
the function set_normalized_volume @ volume-mapping.c is eventually still called anywayvalue = lrint_dir(6000.0 * log10(volume), dir) + max;
and volume is 0, so
log10(0) resolves to negative infinity, so
value overflows past infinity. 9223372036854775802 
my fix:
this function change_volume_relative function will now skip execution of the set_normalized_playback_volume function when volume is 0 and the dir is -1
TLDR: (stop trying to set a lower volume than 0)
Request URL : https://github.com/alsa-project/alsa-utils/pull/266
Patch URL : https://github.com/alsa-project/alsa-utils/pull/266.patch
Repository URL: https://github.com/alsa-project/alsa-utils