--- /dev/null
+#! /bin/sh
+#
+# fsoaudiod -- This shell script starts and stops the FSO2 audio subsystem daemon.
+#
+# chkconfig: 345 90 30
+# description: fsoaudiod is the freesmartphone.org FSO2 audio daemon
+# processname: fsoaudiod
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=fsoaudiod
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+ start)
+ echo -n "Starting fsoaudiod: "
+ start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/sbin/fsoaudiod
+ if [ $? = 0 ]; then
+ echo "(ok)"
+ else
+ echo "(failed)"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping fsoaudiod: "
+ start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo
+ rm -f /var/run/${NAME}.pid
+ echo "(done)"
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/fsoaudiod {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
require cornucopia.inc
inherit fso-plugin
+
+DEPENDS += "alsa-lib"
+
+# We need to uncomment the line below after the migration of all scenario files from
+# fsodeviced to fsoaudiod is done. Otherwise we will get build errors as both fsodeviced
+# and fsoaudiod are dependencies of the FSO framework.
+# PROVIDES_${PN} = "openmoko-alsa-scenarios virtual/alsa-scenarios"
+
SRCREV = "${FSO_CORNUCOPIA_SRCREV}"
-PV = "0.9.5+gitr${SRCPV}"
-PE = "1"
-PR = "${INC_PR}.0"
+PV = "0.1.0+gitr${SRCPV}"
+PE = "2"
+PR = "${INC_PR}.1"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "fsoaudiod"
+INITSCRIPT_PARAMS = "defaults 30"
+
+SRC_URI += "file://fsoaudiod"
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/freesmartphone/conf/palm_pre/fsoaudiod.conf \
+"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/fsoaudiod ${D}${sysconfdir}/init.d/
+}