aboutsummaryrefslogtreecommitdiff
path: root/sound/alsa-utils
diff options
context:
space:
mode:
authorAlberto Bursi <alberto.bursi@outlook.it>2016-10-23 14:53:34 +0200
committerAlberto Bursi <alberto.bursi@outlook.it>2016-10-23 14:53:34 +0200
commit188a11809acbef0dffb56cc3d57e2f5979e2a3eb (patch)
tree9ae17cb31dae9d0d42827536822d448e94521dab /sound/alsa-utils
parent6bea54e74e000ddc3daa0241d2f58b15204a7e23 (diff)
alsa-utils: moved to /sound and Sound category, fix minor bugs
Moved source folder in /sound folder, and changed all packages in the makefile to be shown in Sound category (not in Sound subcategory of Utilities). Removed a line calling a non-existent Package/alsa-utils/Default and site URL to the package alsa-utils-tests. Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
Diffstat (limited to 'sound/alsa-utils')
-rw-r--r--sound/alsa-utils/Makefile89
-rw-r--r--sound/alsa-utils/patches/100-uClibc-compat.patch23
2 files changed, 112 insertions, 0 deletions
diff --git a/sound/alsa-utils/Makefile b/sound/alsa-utils/Makefile
new file mode 100644
index 000000000..0c01a6e4f
--- /dev/null
+++ b/sound/alsa-utils/Makefile
@@ -0,0 +1,89 @@
+#
+# Copyright (C) 2006-2016 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=alsa-utils
+PKG_VERSION:=1.1.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=ftp://ftp.alsa-project.org/pub/utils/ \
+ http://alsa.cybermirror.org/utils/
+PKG_MD5SUM:=b9d6102fbbd0b68040bb77023ed30c0c
+PKG_INSTALL:=1
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/alsa-utils
+ SECTION:=sound
+ CATEGORY:=Sound
+ DEPENDS:=+alsa-lib +libncursesw +libpthread
+ TITLE:=ALSA (Advanced Linux Sound Architecture) utilities
+ URL:=http://www.alsa-project.org/
+endef
+
+define Package/alsa-utils-seq
+ SECTION:=sound
+ CATEGORY:=Sound
+ DEPENDS:=+alsa-lib +libpthread
+ TITLE:=ALSA sequencer utilities
+ URL:=http://www.alsa-project.org/
+endef
+
+define Package/alsa-utils-tests
+ SECTION:=sound
+ CATEGORY:=Sound
+ TITLE:=ALSA utilities test data (adds ~1.3M to image)
+ DEPENDS:=+alsa-lib +libpthread
+ URL:=http://www.alsa-project.org/
+endef
+
+CONFIGURE_ARGS+= \
+ --disable-rpath \
+ --disable-alsatest \
+ --disable-bat \
+ --disable-xmlto \
+ --with-curses=ncursesw
+
+define Package/alsa-utils/install
+ $(INSTALL_DIR) $(1)/usr/{s,}bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amixer $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/alsamixer $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplay $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecord $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/alsactl $(1)/usr/sbin/
+
+ $(INSTALL_DIR) $(1)/usr/share/alsa/init
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/share/alsa/init/* \
+ $(1)/usr/share/alsa/init/
+endef
+
+define Package/alsa-utils-seq/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aconnect $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/amidi $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aplaymidi $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arecordmidi $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqdump $(1)/usr/bin/
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aseqnet $(1)/usr/bin/
+endef
+
+define Package/alsa-utils-tests/install
+ $(INSTALL_DIR) $(1)/usr/{s,}bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/speaker-test $(1)/usr/bin/
+ $(INSTALL_DIR) $(1)/usr/share/sounds/alsa
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/share/sounds/alsa/* \
+ $(1)/usr/share/sounds/alsa/
+endef
+
+$(eval $(call BuildPackage,alsa-utils))
+$(eval $(call BuildPackage,alsa-utils-seq))
+$(eval $(call BuildPackage,alsa-utils-tests))
diff --git a/sound/alsa-utils/patches/100-uClibc-compat.patch b/sound/alsa-utils/patches/100-uClibc-compat.patch
new file mode 100644
index 000000000..987c9b8b7
--- /dev/null
+++ b/sound/alsa-utils/patches/100-uClibc-compat.patch
@@ -0,0 +1,23 @@
+--- 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;