[oe-commits] Ulf Samuelsson : Make atmel specific alsa configuration/missing files

git version control git at git.openembedded.org
Wed Aug 19 10:21:11 UTC 2009


Module: openembedded.git
Branch: ulf/linux-2.6.30.2
Commit: 0f8f1e5a3cd852b199561c525177de52bd5a2be7
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=0f8f1e5a3cd852b199561c525177de52bd5a2be7

Author: Ulf Samuelsson <ulf.samuelsson at atmel.com>
Date:   Tue Aug 18 11:33:48 2009 +0200

Make atmel specific alsa configuration/missing files

---

 recipes/alsa/alsa-state.inc      |   46 ++++++++++++++++++++++++++++++++++++++
 recipes/alsa/alsa-state_atmel.bb |   19 +++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)

diff --git a/recipes/alsa/alsa-state.inc b/recipes/alsa/alsa-state.inc
new file mode 100644
index 0000000..2b6fc11
--- /dev/null
+++ b/recipes/alsa/alsa-state.inc
@@ -0,0 +1,46 @@
+# Copyright Matthias Hentges <devel at hentges.net> (c) 2007
+# License: MIT (see http://www.opensource.org/licenses/mit-license.php
+#               for a copy of the license)
+#
+# Filename: alsa-state.inc
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "alsa-state"
+INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
+
+do_install() {
+    	install -d ${D}${sysconfdir}/init.d
+    	install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d
+
+	install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
+	install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir}
+}
+
+PACKAGES += "alsa-states"
+
+RRECOMMENDS_alsa-state = "alsa-states"
+RRECOMMENDS_${PN}_om-gta01 = "openmoko-alsa-scenarios"
+RRECOMMENDS_${PN}_om-gta02 = "openmoko-alsa-scenarios"
+
+FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
+CONFFILES_${PN} = "${sysconfdir}/asound.conf"
+
+FILES_alsa-states = "${sysconfdir}/*.state"
+
+PACKAGE_ARCH = "all"
+PACKAGE_ARCH_alsa-states = "${MACHINE_ARCH}"
+
+pkg_postinst_${PN}() {
+	if test -z "$D"
+	then
+		if test -x /usr/sbin/alsactl
+		then
+			/usr/sbin/alsactl -f ${sysconfdir}/asound.state restore
+		fi
+		# INITSCRIPT_PARAMS changed, so remove the old and
+		# install the new setting.
+		update-rc.d -f ${INITSCRIPT_NAME} remove
+		update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
+	fi
+}
diff --git a/recipes/alsa/alsa-state_atmel.bb b/recipes/alsa/alsa-state_atmel.bb
new file mode 100644
index 0000000..097f31d
--- /dev/null
+++ b/recipes/alsa/alsa-state_atmel.bb
@@ -0,0 +1,19 @@
+# Copyright Ulf Samuelsson <ulf.samuelsson at atmel.com> (c) 2007
+# License: MIT (see http://www.opensource.org/licenses/mit-license.php
+#               for a copy of the license)
+#
+# Filename: alsa-state_atmel.bb
+
+DESCRIPTION = "Alsa Scenario Files"
+LICENSE = "MIT"
+PV = "atmel"
+PR = "r0"
+
+SRC_URI = "\
+	file://asound.conf \
+	file://asound.state \
+	file://alsa-state \
+	"
+
+require alsa-state.inc
+





More information about the Openembedded-commits mailing list