summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbrodkorb@conet.de>2015-03-30 14:15:37 +0200
committerWaldemar Brodkorb <wbrodkorb@conet.de>2015-03-30 14:15:37 +0200
commit986c6447ed4724ba36cdba6a235149f78b979bf6 (patch)
tree2b36e04c7490dfaf10b67aad645d6b5509dba350 /package
parent92da56c366ec278774544008000a0ead9ba874a1 (diff)
rework mixer settings, add system specific scripts
Diffstat (limited to 'package')
-rw-r--r--package/alsa-utils/Makefile5
-rw-r--r--package/alsa-utils/files/alsa-utils.postinst2
-rw-r--r--package/alsa-utils/files/amixer.init8
-rwxr-xr-xpackage/alsa-utils/files/raspberry-pi.sh15
4 files changed, 22 insertions, 8 deletions
diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile
index 6b76b9202..f0ca7d65e 100644
--- a/package/alsa-utils/Makefile
+++ b/package/alsa-utils/Makefile
@@ -36,6 +36,11 @@ endif
alsa-utils-install:
${INSTALL_DIR} ${IDIR_ALSA_UTILS}/usr/bin
${CP} ${WRKINST}/usr/bin/{aplay,amixer,arecord} ${IDIR_ALSA_UTILS}/usr/bin
+ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
+ $(INSTALL_DIR) $(IDIR_ALSA_UTILS)/etc/amixer.d
+ $(INSTALL_BIN) ./files/raspberry-pi.sh \
+ $(IDIR_ALSA_UTILS)/etc/amixer.d
+endif
ifeq (${ADK_PACKAGE_ALSA_UTILS_WITH_ALSAMIXER},y)
${INSTALL_BIN} ${WRKINST}/usr/bin/alsamixer \
${IDIR_ALSA_UTILS}/usr/bin
diff --git a/package/alsa-utils/files/alsa-utils.postinst b/package/alsa-utils/files/alsa-utils.postinst
index c58a2e02a..886cfb1d3 100644
--- a/package/alsa-utils/files/alsa-utils.postinst
+++ b/package/alsa-utils/files/alsa-utils.postinst
@@ -1,5 +1,3 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
add_rcconf amixer NO
-add_rcconf amixer_volume "80%"
-add_rcconf amixer_mixer "Master PCM"
diff --git a/package/alsa-utils/files/amixer.init b/package/alsa-utils/files/amixer.init
index 5d86d5875..884b2acf2 100644
--- a/package/alsa-utils/files/amixer.init
+++ b/package/alsa-utils/files/amixer.init
@@ -11,15 +11,11 @@ autostart)
exec sh $0 start
;;
start)
- for mixer in $amixer_mixer; do
- amixer set $mixer on
- amixer set $mixer $amixer_volume
+ for shell in $(ls /etc/amixer.d/*.sh); do
+ ./$shell >/dev/null
done
;;
stop)
- for mixer in $amixer_mixer; do
- amixer set $mixer off
- done
;;
restart)
sh $0 stop
diff --git a/package/alsa-utils/files/raspberry-pi.sh b/package/alsa-utils/files/raspberry-pi.sh
new file mode 100755
index 000000000..b0a2416ce
--- /dev/null
+++ b/package/alsa-utils/files/raspberry-pi.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+/usr/bin/amixer -c 1 sset "Mic Boost" 0
+/usr/bin/amixer -c 1 sset "Input Mux" "Line In"
+/usr/bin/amixer -c 1 sset "Mic" nocap
+/usr/bin/amixer -c 1 sset "Line" cap
+/usr/bin/amixer -c 1 sset "Sidetone" 0
+/usr/bin/amixer -c 1 sset "Output Mixer Line Bypass" off
+/usr/bin/amixer -c 1 sset "Output Mixer Mic Sidetone" on
+/usr/bin/amixer -c 1 sset "Store DC Offset" off
+/usr/bin/amixer -c 1 sset "Output Mixer HiFi" on
+/usr/bin/amixer -c 1 sset "ADC High Pass Filter" on
+/usr/bin/amixer -c 1 sset "Playback Deemphasis" on
+/usr/bin/amixer -c 1 sset "Master Playback ZC" off
+/usr/bin/amixer -c 1 sset Master 80%