alsa-utils: replacing exp10 with pow for uclibc
authorHenning Heinold <heinold@inf.fu-berlin.de>
Sun, 13 Mar 2011 16:19:52 +0000 (17:19 +0100)
committerHenning Heinold <heinold@inf.fu-berlin.de>
Sun, 13 Mar 2011 16:34:25 +0000 (17:34 +0100)
* bump PR

recipes/alsa/alsa-utils-1.0.24.2/exp10.patch [new file with mode: 0644]
recipes/alsa/alsa-utils_1.0.24.2.bb

diff --git a/recipes/alsa/alsa-utils-1.0.24.2/exp10.patch b/recipes/alsa/alsa-utils-1.0.24.2/exp10.patch
new file mode 100644 (file)
index 0000000..cb850e3
--- /dev/null
@@ -0,0 +1,25 @@
+Index: alsa-utils-1.0.24.2/alsamixer/volume_mapping.c
+===================================================================
+--- alsa-utils-1.0.24.2.orig/alsamixer/volume_mapping.c        2011-01-31 15:19:55.000000000 +0100
++++ alsa-utils-1.0.24.2/alsamixer/volume_mapping.c     2011-03-13 16:59:33.434767354 +0100
+@@ -109,9 +109,9 @@
+       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);
+       }
+@@ -144,7 +144,7 @@
+       }
+       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;
index a2a9253..f63f58a 100644 (file)
@@ -4,10 +4,15 @@ SECTION = "console/utils"
 LICENSE = "GPLv2"
 DEPENDS = "alsa-lib ncurses"
 
+PR = "r1"
+
 SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
            file://remove-xmlto.patch \
           "
 
+SRC_URI_append_libc-uclibc = "file://exp10.patch"
+
+
 SRC_URI[md5sum] = "8238cd57cb301d1c36bcf0ecb59ce6b2"
 SRC_URI[sha256sum] = "95127f740291086486c06c28118cabca0814bde48fd14dac041a9812a5ac1be2"