summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb8
-rwxr-xr-xmeta/recipes-bsp/alsa-state/alsa-state/alsa-state6
2 files changed, 8 insertions, 6 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb
index ecfa97530f..bc17b25b3e 100644
--- a/meta/recipes-bsp/alsa-state/alsa-state.bb
+++ b/meta/recipes-bsp/alsa-state/alsa-state.bb
@@ -26,11 +26,13 @@ INITSCRIPT_NAME = "alsa-state"
26INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." 26INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ."
27 27
28do_install() { 28do_install() {
29 sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state
29 install -d ${D}${sysconfdir}/init.d 30 install -d ${D}${sysconfdir}/init.d
30 install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d 31 install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d
31 32
33 install -d ${D}/${localstatedir}/lib/alsa
32 install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} 34 install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir}
33 install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir} 35 install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa
34} 36}
35 37
36PACKAGES += "alsa-states" 38PACKAGES += "alsa-states"
@@ -40,14 +42,14 @@ RRECOMMENDS_alsa-state = "alsa-states"
40FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" 42FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
41CONFFILES_${PN} = "${sysconfdir}/asound.conf" 43CONFFILES_${PN} = "${sysconfdir}/asound.conf"
42 44
43FILES_alsa-states = "${sysconfdir}/*.state" 45FILES_alsa-states = "${localstatedir}/lib/alsa/*.state"
44 46
45pkg_postinst_${PN}() { 47pkg_postinst_${PN}() {
46 if test -z "$D" 48 if test -z "$D"
47 then 49 then
48 if test -x /usr/sbin/alsactl 50 if test -x /usr/sbin/alsactl
49 then 51 then
50 /usr/sbin/alsactl -f ${sysconfdir}/asound.state restore 52 /usr/sbin/alsactl -f ${localstatedir}/lib/alsa/asound.state restore
51 fi 53 fi
52 # INITSCRIPT_PARAMS changed, so remove the old and 54 # INITSCRIPT_PARAMS changed, so remove the old and
53 # install the new setting. 55 # install the new setting.
diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state
index 84cdf03750..9850791497 100755
--- a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state
+++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state
@@ -9,9 +9,9 @@
9 9
10asound_restore(){ 10asound_restore(){
11 echo "ALSA: Restoring mixer settings..." 11 echo "ALSA: Restoring mixer settings..."
12 if test -x /usr/sbin/alsactl -a -e /etc/asound.state 12 if test -x /usr/sbin/alsactl -a -e #STATEDIR#/asound.state
13 then 13 then
14 /usr/sbin/alsactl -f /etc/asound.state restore & 14 /usr/sbin/alsactl -f #STATEDIR#/asound.state restore &
15 fi 15 fi
16} 16}
17 17
@@ -19,7 +19,7 @@ asound_store(){
19 echo "ALSA: Storing mixer settings..." 19 echo "ALSA: Storing mixer settings..."
20 if test -x /usr/sbin/alsactl 20 if test -x /usr/sbin/alsactl
21 then 21 then
22 /usr/sbin/alsactl -f /etc/asound.state store 22 /usr/sbin/alsactl -f #STATEDIR#/asound.state store
23 fi 23 fi
24} 24}
25 25