diff options
Diffstat (limited to 'meta-openmoko/packages/openmoko2/openmoko-sound-system2')
-rwxr-xr-x | meta-openmoko/packages/openmoko2/openmoko-sound-system2/pulseaudio | 50 | ||||
-rw-r--r-- | meta-openmoko/packages/openmoko2/openmoko-sound-system2/session | 28 |
2 files changed, 78 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 | |||
12 | RETVAL=0 | ||
13 | prog="pulseaudio" | ||
14 | |||
15 | start() { | ||
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 | |||
27 | stop() { | ||
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. | ||
34 | case "$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 | ||
48 | esac | ||
49 | |||
50 | exit $RETVAL | ||
diff --git a/meta-openmoko/packages/openmoko2/openmoko-sound-system2/session b/meta-openmoko/packages/openmoko2/openmoko-sound-system2/session new file mode 100644 index 0000000000..7ba07e9784 --- /dev/null +++ b/meta-openmoko/packages/openmoko2/openmoko-sound-system2/session | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/usr/bin/pulseaudio -nF | ||
2 | |||
3 | # Create autoload entries for the device drivers | ||
4 | add-autoload-sink output module-alsa-sink sink_name=output | ||
5 | add-autoload-source input module-alsa-source source_name=input | ||
6 | |||
7 | # Load several protocols | ||
8 | load-module module-esound-protocol-unix | ||
9 | load-module module-simple-protocol-tcp | ||
10 | load-module module-native-protocol-unix | ||
11 | load-module module-cli-protocol-unix | ||
12 | |||
13 | # Make some devices default | ||
14 | set-default-sink output | ||
15 | set-default-source input | ||
16 | |||
17 | # Don't fail if the audio files referred to below don't exist | ||
18 | .nofail | ||
19 | |||
20 | # Load an audio to the sample cache for usage with module-x11-bell | ||
21 | load-sample-lazy x11-bell /usr/share/openmoko/sounds/notify_doorbell.wav | ||
22 | load-module module-x11-bell sample=x11-bell | ||
23 | |||
24 | # Load samples | ||
25 | load-sample startup /usr/share/openmoko/sounds/startup_unintrusive.wav | ||
26 | load-sample touchscreen /usr/share/openmoko/sounds/touchscreen_click.wav | ||
27 | load-sample ringtone /usr/share/openmoko/sounds/ringtone_classy.wav | ||
28 | |||