1 <?xml version=
"1.0" encoding=
"iso-8859-1"?> <!-- -*-html-helper-*- -->
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>polypaudio: Loadable Modules
</title>
6 <link rel=
"stylesheet" type=
"text/css" href=
"style.css" />
11 <h1>Loadable Modules
</h1>
13 <p>The following loadable modules are provided with the
<tt>polypaudio
</tt> distribution:
</p>
15 <h2>Device Drivers
</h2>
17 <p>All device driver modules support the following parameters:
</p>
19 <tr><td><tt>format=
</tt></td><td>The sample format (one of
<tt>u8
</tt>,
<tt>s16
</tt>,
<tt>s16le
</tt>,
<tt>s16le
</tt>,
<tt>float32
</tt>,
<tt>float32be
</tt>,
<tt>float32le
</tt>,
<tt>alaw
</tt>,
<tt>ulaw
</tt>) (defaults to
<tt>s16
</tt>)
</td></tr>
20 <tr><td><tt>rate=
</tt></td><td>The sample rate (defaults to
44100)
</td></tr>
21 <tr><td><tt>channels=
</tt></td><td>Audio channels (defaults to
2)
</td></tr>
22 <tr><td><tt>sink_name=
</tt>,
<tt>source_name=
</tt></td><td>Name for the sink (resp. source)
</td></tr>
25 <h3>module-pipe-sink
</h3>
27 <p>Provides a simple test sink that writes the audio data to a FIFO
28 special file in the file system. The sink name defaults to
<tt>pipe_output
</tt>.
</p>
30 <p>The following option is supported:
</p>
33 <tr><td><tt>file=
</tt></td><td>The name of the FIFO special file to use. (defaults to:
<tt>/tmp/music.output
</tt>)
</td></tr>
36 <h3>module-pipe-source
</h3>
38 <p>Provides a simple test source that reads the audio data from a FIFO
39 special file in the file system. The source name defaults to
<tt>pipe_input
</tt>.
</p>
41 <p>The following option is supported:
</p>
44 <tr><td><tt>file=
</tt></td><td>The name of the FIFO special file to use. (defaults to:
<tt>/tmp/music.input
</tt>)
</td></tr>
47 <a name=
"module-alsa-sink"/>
49 <h3>module-alsa-sink
</h3>
51 <p>Provides a playback sink for devices supported by the
<a href=
"http://www.alsa-project.org/">Advanced Linux
52 Sound Architecture
</a> (ALSA). The sink name defaults to
<tt>alsa_output
</tt>.
</p>
54 <p>In addition to the general device driver options described above this module supports:
</p>
57 <tr><td><tt>device=
</tt></td><td>The ALSA device to use. (defaults to
"plughw:0,0")
</td></tr>
58 <tr><td><tt>fragments=
</tt></td><td>The desired fragments when opening the device. (defaults to
12)
</td></tr>
59 <tr><td><tt>fragment_size=
</tt></td><td>The desired fragment size in bytes when opening the device (defaults to
1024)
</td></tr>
62 <h3>module-alsa-source
</h3>
64 <p>Provides a recording source for devices supported by the Advanced
65 Linux Sound Architecture (ALSA). The source name defaults to
<tt>alsa_input
</tt>.
</p>
67 <p>This module supports
<tt>device=
</tt>,
<tt>fragments=
</tt> and
<tt>fragment_size=
</tt> arguments the same way as
<a href=
"#module-alsa-sink"><tt>module-alsa-sink
</tt></a>.
</p>
69 <a name=
"module-oss"/>
73 <p>Provides both a sink and a source for playback, resp. recording on
74 <a href=
"http://www.opensound.com">Open Sound System
</a> (OSS) compatible devices.
</p>
76 <p>This module supports
<tt>device=
</tt> (which defaults to
<tt>/dev/dsp
</tt>),
<tt>fragments=
</tt> and
<tt>fragment_size=
</tt> arguments the same way as
<a href=
"#module-alsa-sink"><tt>module-alsa-sink
</tt></a>.
</p>
78 <p>In addition this module supports the following options:
</p>
81 <tr><td><tt>record=
</tt></td><td>Accepts a binary numerical value for enabling (resp. disabling) the recording on this device. (defaults: to
1)
</td></tr>
82 <tr><td><tt>playback=
</tt></td><td>Accepts a binary numerical value for enabling (resp. disabling) the playback on this device. (defaults: to
1)
</td></tr>
85 <p>The sink name (resp. source name) defaults to
<tt>oss_output
</tt> (resp.
<tt>oss_input
</tt>).
</p>
87 <h3>module-oss-mmap
</h3>
89 <p>Similar to
<tt>module-oss
</tt> but uses memory mapped
90 (
<tt>mmap()
</tt>) access to the input/output buffers of the audio
91 device. This provides better latency behaviour but is not as
92 compatible as
<tt>module-oss
</tt>.
</p>
94 <p>This module accepts exactly the same arguments as
<a href=
"#module-oss"><tt>module-oss
</tt></a>.
</p>
98 <a name=
"module-cli"/>
102 <p>Provides the user with a simple command line interface on the
103 controlling TTY of the daemon. This module may not be loaded more than
106 <p>For an explanation of the simple command line language used by this
107 module see
<a href=
"cli.html"><tt>cli.html
</tt></a>.
109 <p>This module doesn't accept any arguments.
</p>
111 <a name=
"module-cli-protocol-unix"/>
112 <a name=
"module-cli-protocol-tcp"/>
113 <a name=
"module-cli-protocol"/>
115 <h3>module-cli-protocol-{unix,tcp}
</h3>
117 <p>An implemenation of a simple command line based protocol for
118 controlling the
<tt>polypaudio
</tt> daemon. If loaded, the user may
119 connect with tools like
<tt>netcat
</tt>,
<tt>telnet
</tt> or
120 <a href=
"http://0pointer.de/lennart/projects/bidilink/"><tt>bidilink
</tt></a> to the listening sockets and execute commands the
121 same way as with
<tt>module-cli
</tt>.
</p>
123 <p><b>Beware!
</b> Users are not authenticated when connecting to this
126 <p>This module exists in two versions: with the suffix
<tt>-unix
</tt>
127 the service will listen on an UNIX domain socket in the local file
128 system. With the suffix
<tt>-tcp
</tt> it will listen on a network
129 transparent TCP/IP socket.
</p>
131 <p>This module supports the following options:
</p>
134 <tr><td><tt>port=
</tt></td><td>(only for
<tt>-tcp
</tt>) The port number to listen on (defaults to
4712)
</td></tr>
135 <tr><td><tt>loopback=
</tt></td><td>(only for
<tt>-tcp
</tt>) Accepts
136 a numerical binary value. If
1 the socket is bound to the loopback
137 device, i.e. not publicly accessible. (defaults to
1)
</td></tr>
138 <tr><td><tt>socket=
</tt></td><td>(only for
<tt>-unix
</tt>) The UNIX socket name (defaults to
<tt>/tmp/polypaudio/cli
</tt>)
</td></tr>
141 <h3>module-simple-protocol-{unix,tcp}
</h3>
143 <p>An implementation of a simple protocol which allows playback by using
144 simple tools like
<tt>netcat
</tt>. Just connect to the listening
145 socket of this module and write the audio data to it, or read it from
146 it for playback, resp. recording.
</p>
148 <p><b>Beware!
</b> Users are not authenticated when connecting to this
151 <p>See
<tt>module-cli-protocol-{unix,tcp}
</tt> for more information
152 about the two possible suffixes of this module.
</p>
154 <p>In addition to the options supported by
<a href=
"module-cli-protocol"><tt>module-cli-protocol-*
</tt></a>, this module supports:
</p>
157 <tr><td><tt>rate=
</tt>,
<tt>format=
</tt>,
<tt>channels=
</tt></td><td>Sample format for streams connecting to this service.
</td></tr>
158 <tr><td><tt>playback=
</tt>,
<tt>record=
</tt></td><td>Enable/disable playback/recording
</td></tr>
159 <tr><td><tt>sink=
</tt>,
<tt>source=
</tt></td><td>Specify the sink/source this service connects to
</td></tr>
162 <h3>module-esound-protocol-{unix,tcp}
</h3>
164 <p>An implemenation of a protocol compatible with the
<a
165 href=
"http://www.tux.org/~ricdude/EsounD.html">Enlightened Sound
166 Daemon
</a> (ESOUND,
<tt>esd
</tt>). When you load this module you may
167 access the
<tt>polypaudio
</tt> daemon with tools like
<tt>esdcat
</tt>,
168 <tt>esdrec
</tt> or even
<tt>esdctl
</tt>. Many applications, such as
169 XMMS, include support for this protocol.
</p>
171 <p>See
<tt>module-cli-protocol-{unix,tcp}
</tt> for more information
172 about the two possible suffixes of this module.
</p>
174 <p>In addition to the options supported by
<a href=
"module-cli-protocol"><tt>module-cli-protocol-*
</tt></a>, this module supports:
</p>
177 <tr><td><tt>sink=
</tt>,
<tt>source=
</tt></td><td>Specify the sink/source this service connects to
</td></tr>
178 <tr><td><tt>public=
</tt></td><td>If set to
0 not authentication is required to connect to the service
</td></tr>
179 <tr><td><tt>cookie=
</tt></td><td>Name of the cookie file for authentication purposes
</td></tr>
182 <p>This implementation misses some features the original ESOUND has: e.g. there is no sample cache yet. However: XMMS works fine.
</p>
184 <h3>module-native-protocol-{unix,tcp}
</h3>
186 <p>The native protocol of
<tt>polypaudio
</tt>.
</p>
188 <p>See
<tt>module-cli-protocol-{unix,tcp}
</tt> for more information
189 about the two possible suffixes of this module.
</p>
191 <p>In addition to the options supported by
<a href=
"module-cli-protocol"><tt>module-cli-protocol-*
</tt></a>, this module supports:
</p>
194 <tr><td><tt>public=
</tt></td><td>If set to
0 not authentication is required to connect to the service
</td></tr>
195 <tr><td><tt>cookie=
</tt></td><td>Name of the cookie file for authentication purposes
</td></tr>
198 <h3>module-native-protocol-fd
</h3>
200 <p>This is used internally when auto spawning a new daemon.
</p>
202 <h2>Miscellaneous
</h2>
204 <h3>module-x11-bell
</h3>
206 <p>Intercepts X11 bell events and plays a sample from the sample cache on each occurence.
</p>
209 <tr><td><tt>display=
</tt></td><td>X11 display to connect to. If ommited defaults to the value of
<tt>$DISPLAY
</tt></td></tr>
210 <tr><td><tt>sample=
</tt></td><td>The sample to play. If ommited defaults to
<tt>x11-bell
</tt>.
</td></tr>
211 <tr><td><tt>sink=
</tt></td><td>Name of the sink to play the sample on. If ommited defaults to the default sink.
</td></tr>
216 <p>Creates a sink input and generates a sine waveform stream.
</p>
219 <tr><td><tt>sink=
</tt></td><td>The sink to connect to. If ommited defaults to the default sink.
</td></tr>
220 <tr><td><tt>frequency=
</tt></td><td>The frequency to generate in Hertz. Defaults to
440.
</td></tr>
224 <address class=
"grey">Lennart Poettering
<@PACKAGE_BUGREPORT@
>, September
2004</address>
225 <div class=
"grey"><i>$Id$
</i></div>