summaryrefslogtreecommitdiff
path: root/packages/openmoko2
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2007-09-16 11:38:08 +0000
committerMichael Lauer <mickey@vanille-media.de>2007-09-16 11:38:08 +0000
commitfb6e3edbda09c9057ca184c55077a46e20f75cd0 (patch)
tree5e5ca90769ced1d5f514ee009d4812c0f691e9fd /packages/openmoko2
parentebbb3467b70bb21b005d1ae67ba0ed0e00a04b28 (diff)
add openmoko-sound-system2
Diffstat (limited to 'packages/openmoko2')
-rw-r--r--packages/openmoko2/openmoko-sound-system2/.mtn2git_empty0
-rwxr-xr-xpackages/openmoko2/openmoko-sound-system2/pulseaudio46
-rw-r--r--packages/openmoko2/openmoko-sound-system2/session28
-rw-r--r--packages/openmoko2/openmoko-sound-system2_0.1.0.bb31
4 files changed, 105 insertions, 0 deletions
diff --git a/packages/openmoko2/openmoko-sound-system2/.mtn2git_empty b/packages/openmoko2/openmoko-sound-system2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/openmoko2/openmoko-sound-system2/.mtn2git_empty
diff --git a/packages/openmoko2/openmoko-sound-system2/pulseaudio b/packages/openmoko2/openmoko-sound-system2/pulseaudio
new file mode 100755
index 0000000000..76daacd3ae
--- /dev/null
+++ b/packages/openmoko2/openmoko-sound-system2/pulseaudio
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# pulseaudio This shell script starts and stops pulseaudio.
+#
+# chkconfig: 345 90 40
+# description: Pulseaudio manages the sound input/output
+# processname: pulseaudio
+
+# Source function library.
+#. /etc/rc.d/init.d/functions
+
+RETVAL=0
+prog="pulseaudio"
+
+start() {
+ echo -n "Starting the audio server..."
+ # FIXME once alsa/shm permissions have been fixed, supply --system
+ pulseaudio --resample-method=trivial -D -nF /etc/pulse/session
+ echo $prog
+}
+
+stop() {
+ # Stop daemons.
+ echo -n "Shutting down $prog: "
+ killall pulseaudio
+ echo "done"
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ stop
+ start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/packages/openmoko2/openmoko-sound-system2/session b/packages/openmoko2/openmoko-sound-system2/session
new file mode 100644
index 0000000000..dfef83d934
--- /dev/null
+++ b/packages/openmoko2/openmoko-sound-system2/session
@@ -0,0 +1,28 @@
+#!/usr/bin/pulseaudio -nF
+
+# Create autoload entries for the device drivers
+add-autoload-sink output module-alsa-sink fragment_size=2048 sink_name=output
+add-autoload-source input module-alsa-source source_name=input
+
+# Load several protocols
+load-module module-esound-protocol-unix
+load-module module-simple-protocol-tcp
+load-module module-native-protocol-unix
+load-module module-cli-protocol-unix
+
+# Make some devices default
+set-default-sink output
+set-default-source input
+
+# Don't fail if the audio files referred to below don't exist
+.nofail
+
+# Load an audio to the sample cache for usage with module-x11-bell
+load-sample-lazy x11-bell /usr/share/openmoko/sounds/notify_doorbell.wav
+load-module module-x11-bell sample=x11-bell
+
+# Load samples
+load-sample startup /usr/share/openmoko/sounds/startup_openmoko.wav
+load-sample touchscreen /usr/share/openmoko/sounds/touchscreen_click.wav
+load-sample ringtone /usr/share/openmoko/sounds/ringtone_classy.wav
+
diff --git a/packages/openmoko2/openmoko-sound-system2_0.1.0.bb b/packages/openmoko2/openmoko-sound-system2_0.1.0.bb
new file mode 100644
index 0000000000..46397afa9b
--- /dev/null
+++ b/packages/openmoko2/openmoko-sound-system2_0.1.0.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "OpenMoko Sound System"
+SECTION = "openmoko/base"
+RDEPENDS = "\
+ pulseaudio-server \
+ pulseaudio-module-alsa-sink \
+ pulseaudio-module-alsa-source \
+ pulseaudio-module-cli \
+ pulseaudio-module-esound-protocol-unix \
+ pulseaudio-module-simple-protocol-tcp \
+ pulseaudio-module-native-protocol-unix \
+ pulseaudio-module-cli-protocol-unix \
+"
+PR = "r0"
+
+inherit openmoko-base update-rc.d
+
+INITSCRIPT_NAME = "pulseaudio"
+INITSCRIPT_PARAMS = "defaults 35"
+
+SRC_URI = "file://pulseaudio \
+ file://session"
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/pulseaudio ${D}/${sysconfdir}/init.d/
+ install -d ${D}/${sysconfdir}/pulse
+ install -m 0755 ${WORKDIR}/session ${D}/${sysconfdir}/pulse/session
+}
+
+PACKAGE_ARCH = "all"