summaryrefslogtreecommitdiffstats
path: root/meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio')
-rwxr-xr-xmeta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio b/meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio
new file mode 100755
index 0000000000..964947376e
--- /dev/null
+++ b/meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio
@@ -0,0 +1,50 @@
1#!/bin/sh
2#
3# pulseaudio This shell script starts and stops pulseaudio.
4#
5# chkconfig: 345 90 40
6# description: Pulseaudio manages the sound input/output
7# processname: pulseaudio
8
9# Source function library.
10#. /etc/rc.d/init.d/functions
11
12RETVAL=0
13prog="pulseaudio"
14
15start() {
16 echo -n "Starting audio server: "
17 # FIXME once alsa/shm permissions have been fixed, supply --system
18 start-stop-daemon -S -x /usr/bin/pulseaudio -- --no-cpu-limit --resample-method=trivial -D -nF /etc/pulse/session
19
20 if [ $? = 0 ]; then
21 echo "$prog (warning ignores)." # FIXME remove comment on warning
22 else
23 echo "(failed.)"
24 fi
25}
26
27stop() {
28 echo -n "Stopping audio server: "
29 start-stop-daemon -K -x /usr/bin/pulseaudio
30 echo "pulseaudio."
31}
32
33# See how we were called.
34case "$1" in
35 start)
36 start
37 ;;
38 stop)
39 stop
40 ;;
41 restart|reload)
42 stop
43 start
44 ;;
45 *)
46 echo "Usage: $0 {start|stop|restart}"
47 exit 1
48esac
49
50exit $RETVAL