pandora-scripts/sudoers: add dsp start/stop script
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 19 Mar 2013 16:57:40 +0000 (18:57 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 19 Mar 2013 17:11:59 +0000 (19:11 +0200)
intended to be used by programs

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_dsp.sh [new file with mode: 0755]
recipes/pandora-system/pandora-sudoers.bb
recipes/pandora-system/pandora-sudoers/50_openpandora

index 8386d4e..1b90697 100644 (file)
@@ -3,10 +3,9 @@ LICENSE = "GPLV2"
 
 COMPATIBLE_MACHINE = "omap3-pandora"
 
-DEPENDS = "zenity dbus"
-RDEPENDS = "zenity dbus"
+RDEPENDS = "bash sed gawk grep zenity"
 
-PR = "r138"
+PR = "r139"
 
 SRC_URI = " \
           file://op_paths.sh \
@@ -94,6 +93,7 @@ SRC_URI = " \
          file://op_xfcemenu.sh \
          file://op_hugetlb.sh \
          file://op_gamma.sh \
+         file://op_dsp.sh \
 "
 
 do_install() {
@@ -140,7 +140,7 @@ do_install() {
          install -m 0644 ${WORKDIR}/nubmode.glade ${D}${prefix}/pandora/scripts/ 
          install -m 0644 ${WORKDIR}/tvout.glade ${D}${prefix}/pandora/scripts/ 
          install -m 0755 ${WORKDIR}/op_lidsettings.sh ${D}${prefix}/pandora/scripts/ 
-
+         install -m 0755 ${WORKDIR}/op_dsp.sh ${D}${prefix}/pandora/scripts/ 
 
 
           install -d ${D}${prefix}/pandora/apps/
diff --git a/recipes/pandora-system/pandora-scripts/op_dsp.sh b/recipes/pandora-system/pandora-scripts/op_dsp.sh
new file mode 100755 (executable)
index 0000000..287570a
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+case "$1" in
+       start)
+               modprobe mailbox_mach
+               modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
+               ;;
+       stop)
+               rmmod bridgedriver
+               rmmod mailbox_mach
+               rmmod mailbox
+               ;;
+       restart)
+               rmmod bridgedriver
+               rmmod mailbox_mach
+               rmmod mailbox
+               sleep 0.5
+               modprobe mailbox_mach
+               modprobe bridgedriver base_img=/lib/dsp/baseimage.dof
+               ;;
+esac
+
index b830dfd..8b302da 100644 (file)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 
 RDEPENDS = "sudo"
 
-PR = "r20"
+PR = "r21"
 
 SRC_URI = " \
           file://50_openpandora \
index 25c9e6a..ca1c283 100755 (executable)
@@ -33,3 +33,4 @@
 %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_touchinit.sh
 %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_hugetlb.sh
 %wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_gamma.sh
+%wheel ALL=(ALL) NOPASSWD: /usr/pandora/scripts/op_dsp.sh