aboutsummaryrefslogtreecommitdiffstats
path: root/main/alsa-utils/uclibc-exp10.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/alsa-utils/uclibc-exp10.patch')
-rw-r--r--main/alsa-utils/uclibc-exp10.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/alsa-utils/uclibc-exp10.patch b/main/alsa-utils/uclibc-exp10.patch
new file mode 100644
index 0000000000..e021374a25
--- /dev/null
+++ b/main/alsa-utils/uclibc-exp10.patch
@@ -0,0 +1,25 @@
+diff --git a/alsamixer/volume_mapping.c b/alsamixer/volume_mapping.c
+index 9cacad8..f08f003 100644
+--- a/alsamixer/volume_mapping.c
++++ b/alsamixer/volume_mapping.c
+@@ -109,9 +109,9 @@ static double get_normalized_volume(snd_mixer_elem_t *elem,
+ if (use_linear_dB_scale(min, max))
+ return (value - min) / (double)(max - min);
+
+- normalized = exp10((value - max) / 6000.0);
++ normalized = exp(M_LN10 * (value - max) / 6000.0);
+ if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
+- min_norm = exp10((min - max) / 6000.0);
++ min_norm = exp(M_LN10 * (min - max) / 6000.0);
+ normalized = (normalized - min_norm) / (1 - min_norm);
+ }
+
+@@ -144,7 +144,7 @@ static int set_normalized_volume(snd_mixer_elem_t *elem,
+ }
+
+ if (min != SND_CTL_TLV_DB_GAIN_MUTE) {
+- min_norm = exp10((min - max) / 6000.0);
++ min_norm = exp(M_LN10 * (min - max) / 6000.0);
+ volume = volume * (1 - min_norm) + min_norm;
+ }
+ value = lrint_dir(6000.0 * log10(volume), dir) + max;