packages/utils/alsa-utils/patches/100-uClibc-compat.patch
jogo 30ac8c0caa packages: update alsa-utils to 1.0.27.2
Signed-off-by: Peter Wagner <tripolar@gmx.at>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@37690 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-08-04 16:41:37 +00:00

24 lines
804 B
Diff

--- a/alsamixer/volume_mapping.c
+++ b/alsamixer/volume_mapping.c
@@ -114,9 +114,9 @@ static double get_normalized_volume(snd_
if (use_linear_dB_scale(min, max))
return (value - min) / (double)(max - min);
- normalized = exp10((value - max) / 6000.0);
+ normalized = pow(10, (value - max) / 6000.0);
if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
- min_norm = exp10((min - max) / 6000.0);
+ min_norm = pow(10, (min - max) / 6000.0);
normalized = (normalized - min_norm) / (1 - min_norm);
}
@@ -149,7 +149,7 @@ static int set_normalized_volume(snd_mix
}
if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
- min_norm = exp10((min - max) / 6000.0);
+ min_norm = pow(10, (min - max) / 6000.0);
volume = volume * (1 - min_norm) + min_norm;
}
value = lrint_dir(6000.0 * log10(volume), dir) + max;