sink-input: adjust log level of empty-pop operations
[platform/upstream/pulseaudio.git] / src / daemon / esdcompat.in
1 #!/bin/sh
2
3 # This file is part of PulseAudio.
4 #
5 # PulseAudio is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # PulseAudio is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
17
18 VERSION_STRING="@PACKAGE_NAME@ esd wrapper @PACKAGE_VERSION@"
19
20 fail() {
21     echo "ERROR: $1"
22     exit 1
23 }
24
25 ARGS=" --log-target=syslog"
26
27 while [ "$#" -gt "0" ]; do
28
29     case "$1" in
30         "")
31             ;;
32
33         -v|--version)
34             echo "$VERSION_STRING"
35             exit 0
36             ;;
37
38         -h|--help)
39             cat <<EOF
40 $VERSION_STRING
41
42 Usage: $0 [options]
43
44   -v --version  print version information
45   -h --help     show this help
46
47 Ignored directives:
48
49   -tcp          use tcp/ip sockets in addition to unix domain
50   -promiscuous  don't require authentication
51   -d DEVICE     force esd to use sound device DEVICE
52   -b            run server in 8 bit sound mode
53   -r RATE       run server at sample rate of RATE
54   -as SECS      free audio device after SECS of inactivity
55   -unix         use unix domain sockets instead of tcp/ip
56   -public       make tcp/ip access public (other than localhost)
57   -terminate    terminate esd daemone after last client exits
58   -nobeeps      disable startup beeps
59   -trust        start esd even if use of /tmp/.esd can be insecure
60   -port PORT    listen for connections at PORT (only for tcp/ip)
61   -bind ADDRESS binds to ADDRESS (only for tcp/ip)
62 EOF
63             exit 0
64             ;;
65
66         -spawnpid)
67             shift
68             ARGS="$ARGS '-Lmodule-esound-compat-spawnpid pid=$1'"
69             ;;
70
71         -spawnfd)
72             shift
73             ARGS="$ARGS '-Lmodule-esound-compat-spawnfd fd=$1'"
74             ;;
75         
76         -unix|-b|-public|-terminate|-nobeeps|-trust|-tcp|-promiscuous)  
77             # Ignore these commands
78             ;; 
79
80         -d|-r|-as|-port|-bind)
81             # Ignore these commands and their arguments
82             shift
83
84             ;;
85
86         *)
87             fail "Unknown command: $1"
88             ;;
89     esac
90
91     shift
92 done
93
94 eval "exec '@PA_BINARY@'$ARGS"