[PATCH] fastboot: alsa-state: Run init script earlier and in the background.
Chia-I Wu
olv at openmoko.com
Tue Oct 28 09:48:24 CET 2008
---
packages/alsa/alsa-state.bb | 3 +-
packages/alsa/alsa-state/openmoko/alsa-state | 29 ++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
create mode 100755 packages/alsa/alsa-state/openmoko/alsa-state
diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb
index b77f675..80ec689 100644
--- a/packages/alsa/alsa-state.bb
+++ b/packages/alsa/alsa-state.bb
@@ -7,7 +7,7 @@
DESCRIPTION = "Default ALSA configuration"
LICENSE = "GPL"
PV = "0.1.0"
-PR = "r19"
+PR = "r19.1"
SRC_URI = "\
file://asound.conf \
@@ -19,6 +19,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
--
1.5.6.5
--zYM0uCDKw75PZbzx
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: inline; filename="0008-fastboot-wireless-tools-Make-zzz-wireless.if-pre-u.patch"
More information about the devel
mailing list