[oe-commits] Chia-I Wu : fastboot: alsa-state: Run init script earlier and in the background.

GIT User account git at amethyst.openembedded.net
Wed Dec 17 12:56:44 UTC 2008


Module: openembedded.git
Branch: john_lee/openmoko-merges
Commit: c0041ba98c41b320a36cbc5a66d0c8762e52ac62
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c0041ba98c41b320a36cbc5a66d0c8762e52ac62

Author: Chia-I Wu <olv at openmoko.com>
Date:   Tue Oct 28 16:48:24 2008 +0800

fastboot: alsa-state: Run init script earlier and in the background.

---

 packages/alsa/alsa-state.bb                  |    1 +
 packages/alsa/alsa-state/openmoko/alsa-state |   29 ++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb
index ba030e4..d245ec6 100644
--- a/packages/alsa/alsa-state.bb
+++ b/packages/alsa/alsa-state.bb
@@ -20,6 +20,7 @@ inherit update-rc.d
 
 INITSCRIPT_NAME = "alsa-state"
 INITSCRIPT_PARAMS = "defaults 10"
+INITSCRIPT_PARAMS_openmoko = "start 39 S ."
 
 do_install() {
     install -d ${D}${sysconfdir}/init.d
diff --git a/packages/alsa/alsa-state/openmoko/alsa-state b/packages/alsa/alsa-state/openmoko/alsa-state
new file mode 100755
index 0000000..84cdf03
--- /dev/null
+++ b/packages/alsa/alsa-state/openmoko/alsa-state
@@ -0,0 +1,29 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel at hentges.net> (c) 2007
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: alsa-state
+# Date: 20070308 (YMD)
+
+
+asound_restore(){
+	echo "ALSA: Restoring mixer settings..."
+	if test -x /usr/sbin/alsactl -a -e /etc/asound.state
+	then
+		/usr/sbin/alsactl -f /etc/asound.state restore &
+	fi
+}
+
+asound_store(){
+	echo "ALSA: Storing mixer settings..."
+	if test -x /usr/sbin/alsactl
+	then
+		/usr/sbin/alsactl -f /etc/asound.state store
+	fi
+}
+
+case "$1" in
+start)		asound_restore ;;
+stop)		asound_store ;;
+esac





More information about the Openembedded-commits mailing list