diff options
Diffstat (limited to 'recipes/openmoko-base/openmoko-sound-system')
-rwxr-xr-x | recipes/openmoko-base/openmoko-sound-system/pulseaudio | 46 | ||||
-rw-r--r-- | recipes/openmoko-base/openmoko-sound-system/session | 28 |
2 files changed, 74 insertions, 0 deletions
diff --git a/recipes/openmoko-base/openmoko-sound-system/pulseaudio b/recipes/openmoko-base/openmoko-sound-system/pulseaudio new file mode 100755 index 0000000000..76daacd3ae --- /dev/null +++ b/recipes/openmoko-base/openmoko-sound-system/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/recipes/openmoko-base/openmoko-sound-system/session b/recipes/openmoko-base/openmoko-sound-system/session new file mode 100644 index 0000000000..ed2346d55f --- /dev/null +++ b/recipes/openmoko-base/openmoko-sound-system/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_unintrusive.wav +load-sample touchscreen /usr/share/openmoko/sounds/touchscreen_click.wav +load-sample ringtone /usr/share/openmoko/sounds/ringtone_classy.wav + |