]> code.delx.au - pulseaudio/blob - doc/modules.html.in
remove yet another item from the todo list! This means we are now read for 0.8!
[pulseaudio] / doc / modules.html.in
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">
4 <head>
5 <title>polypaudio: Loadable Modules</title>
6 <link rel="stylesheet" type="text/css" href="style.css" />
7 </head>
8
9 <body>
10
11 <h1>Loadable Modules</h1>
12
13 <p>The following loadable modules are provided with the <tt>polypaudio</tt> distribution:</p>
14
15 <h2>Device Drivers</h2>
16
17 <p>All device driver modules support the following parameters:</p>
18 <table>
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>
23 </table>
24
25 <h3>module-pipe-sink</h3>
26
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>
29
30 <p>The following option is supported:</p>
31
32 <table>
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>
34 </table>
35
36 <h3>module-pipe-source</h3>
37
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>
40
41 <p>The following option is supported:</p>
42
43 <table>
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>
45 </table>
46
47
48 <h3>module-null-sink</h3>
49
50 <p>Provides a simple null sink. All data written to this sink is silently dropped. This sink is clocked using the system time.</p>
51
52 <p>This module doesn't support any special parameters</p>
53
54 <a name="module-alsa-sink"/>
55
56 <h3>module-alsa-sink</h3>
57
58 <p>Provides a playback sink for devices supported by the <a href="http://www.alsa-project.org/">Advanced Linux
59 Sound Architecture</a> (ALSA). The sink name defaults to <tt>alsa_output</tt>.</p>
60
61 <p>In addition to the general device driver options described above this module supports:</p>
62
63 <table>
64 <tr><td><tt>device=</tt></td><td>The ALSA device to use. (defaults to "plughw:0,0")</td></tr>
65 <tr><td><tt>fragments=</tt></td><td>The desired fragments when opening the device. (defaults to 12)</td></tr>
66 <tr><td><tt>fragment_size=</tt></td><td>The desired fragment size in bytes when opening the device (defaults to 1024)</td></tr>
67 </table>
68
69 <h3>module-alsa-source</h3>
70
71 <p>Provides a recording source for devices supported by the Advanced
72 Linux Sound Architecture (ALSA). The source name defaults to <tt>alsa_input</tt>.</p>
73
74 <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>
75
76 <a name="module-oss"/>
77
78 <h3>module-oss</h3>
79
80 <p>Provides both a sink and a source for playback, resp. recording on
81 <a href="http://www.opensound.com">Open Sound System</a> (OSS) compatible devices.</p>
82
83 <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>
84
85 <p>In addition this module supports the following options:</p>
86
87 <table>
88 <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>
89 <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>
90 </table>
91
92 <p>The sink name (resp. source name) defaults to <tt>oss_output</tt> (resp. <tt>oss_input</tt>).</p>
93
94 <h3>module-oss-mmap</h3>
95
96 <p>Similar to <tt>module-oss</tt> but uses memory mapped
97 (<tt>mmap()</tt>) access to the input/output buffers of the audio
98 device. This provides better latency behaviour but is not as
99 compatible as <tt>module-oss</tt>.</p>
100
101 <p>This module accepts exactly the same arguments as <a href="#module-oss"><tt>module-oss</tt></a>.</p>
102
103 <h3>module-solaris</h3>
104
105 <P>Provides a sink and source for the Solaris audio device.</p>
106
107 <p>In addition to the general device driver options described above this module supports:</p>
108
109 <table>
110 <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>
111 <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>
112 <tr><td><tt>buffer_size=</tt></td><td>Record buffer size</td></tr>
113 </table>
114
115 <h3>module-waveout</h3>
116
117 <P>Provides a sink and source for the Win32 audio device.</p>
118
119 <p>This module supports all arguments thet <tt>module-oss</tt> supports except <tt>device=</tt>.</p>
120
121 <h3>module-combine</h3>
122
123 <p>This combines two or more sinks into one. A new virtual sink is
124 allocated. All data written to it is forwarded to all connected
125 sinks. In aequidistant intervals the sample rates of the output sinks
126 is recalculated: i.e. even when the sink's crystals deviate (which is
127 normally the case) output appears synchronously to the human ear. The
128 resampling required for this may be very CPU intensive.</p>
129
130 <table>
131 <tr><td><tt>sink_name=</tt></td><td>The name for the combined sink. (defaults to <tt>combined</tt>)</td></tr>
132 <tr><td><tt>master=</tt></td><td>The name of the first sink to link into the combined think. The sample rate/type is taken from this sink.</td></tr>
133 <tr><td><tt>slaves=</tt></td><td>Name of additional sinks to link into the combined think, seperated by commas.</td></tr>
134 <tr><td><tt>adjust_time=</tt></td><td>Time in seconds when to readjust the sample rate of all sinks. (defaults to 20)</td></tr>
135 <tr><td><tt>resample_method=</tt></td><td>Resampling algorithm to
136 use. See <tt>libsamplerate</tt>'s documentation for more
137 information. Use one of <tt>sinc-best-quality</tt>,
138 <tt>sinc-medium-quality</tt>, <tt>sinc-fastest</tt>,
139 <tt>zero-order-hold</tt>, <tt>linear</tt>. If the default happens to
140 be to slow on your machine try using <tt>zero-order-hold</tt>. This
141 will decrease output quality however. (defaults to
142 <tt>sinc-fastest</tt>)</td></tr> </table>
143
144 <h3>module-tunnel-{sink,source}</h3>
145
146 <p>Tunnel a remote sink/source to a local "ghost"
147 sink/source. Requires a running polypaudio daemon on the remote server
148 with <tt>module-native-protocol-tcp</tt> loaded. It's probably a
149 better idea to connect to the remote sink/source directly since some
150 buffer control is lost through this tunneling.</p>
151
152 <table>
153 <tr><td><tt>server=</tt></td><td>The server to connect to</td></tr>
154 <tr><td><tt>source=</tt></td><td>The source on the remote server. Only available for <tt>module-tunnel-source</tt>.</td></tr>
155 <tr><td><tt>sink=</tt></td><td>The sink on the remote server. Only available for <tt>module-tunnel-sink</tt>.</td></tr>
156 <tr><td><tt>cookie=</tt></td><td>The authentication cookie file to use.</td></tr>
157 </table>
158
159 <h3>module-esound-sink</h3>
160
161 <p>Create a playback sink using an ESOUND server as backend. Whenever you can, try to omit this
162 module since it has many disadvantages including bad latency
163 and even worse latency measurement. </p>
164
165 <table>
166 <tr><td><tt>server=</tt></td><td>The server to connect to</td></tr>
167 <tr><td><tt>cookie=</tt></td><td>The authentication cookie file to use.</td></tr>
168 </table>
169
170 <h2>Protocols</h2>
171
172 <a name="module-cli"/>
173
174 <h3>module-cli</h3>
175
176 <p>Provides the user with a simple command line interface on the
177 controlling TTY of the daemon. This module may not be loaded more than
178 once.</p>
179
180 <p>For an explanation of the simple command line language used by this
181 module see <a href="cli.html"><tt>cli.html</tt></a>.
182
183 <p>This module doesn't accept any arguments.</p>
184
185 <a name="module-cli-protocol-unix"/>
186 <a name="module-cli-protocol-tcp"/>
187 <a name="module-cli-protocol"/>
188
189 <h3>module-cli-protocol-{unix,tcp}</h3>
190
191 <p>An implemenation of a simple command line based protocol for
192 controlling the <tt>polypaudio</tt> daemon. If loaded, the user may
193 connect with tools like <tt>netcat</tt>, <tt>telnet</tt> or
194 <a href="http://0pointer.de/lennart/projects/bidilink/"><tt>bidilink</tt></a> to the listening sockets and execute commands the
195 same way as with <tt>module-cli</tt>.</p>
196
197 <p><b>Beware!</b> Users are not authenticated when connecting to this
198 service.</p>
199
200 <p>This module exists in two versions: with the suffix <tt>-unix</tt>
201 the service will listen on an UNIX domain socket in the local file
202 system. With the suffix <tt>-tcp</tt> it will listen on a network
203 transparent TCP/IP socket. (Both IPv6 and IPv4 - if available)</p>
204
205 <p>This module supports the following options:</p>
206
207 <table>
208 <tr><td><tt>port=</tt></td><td>(only for <tt>-tcp</tt>) The port number to listen on (defaults to 4712)</td></tr>
209 <tr><td><tt>loopback=</tt></td><td>(only for <tt>-tcp</tt>) Accepts
210 a numerical binary value. If 1 the socket is bound to the loopback
211 device, i.e. not publicly accessible. (defaults to 1)</td></tr>
212 <tr><td><tt>listen=</tt></td><td>(only for <tt>-tcp</tt>) The IP address to listen on. If specified, supersedes the value specified in <tt>loopback=</tt></td></tr>
213 <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>
214 </table>
215
216 <h3>module-simple-protocol-{unix,tcp}</h3>
217
218 <p>An implementation of a simple protocol which allows playback by using
219 simple tools like <tt>netcat</tt>. Just connect to the listening
220 socket of this module and write the audio data to it, or read it from
221 it for playback, resp. recording.</p>
222
223 <p><b>Beware!</b> Users are not authenticated when connecting to this
224 service.</p>
225
226 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
227 about the two possible suffixes of this module.</p>
228
229 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
230
231 <table>
232 <tr><td><tt>rate=</tt>, <tt>format=</tt>, <tt>channels=</tt></td><td>Sample format for streams connecting to this service.</td></tr>
233 <tr><td><tt>playback=</tt>, <tt>record=</tt></td><td>Enable/disable playback/recording</td></tr>
234 <tr><td><tt>sink=</tt>, <tt>source=</tt></td><td>Specify the sink/source this service connects to</td></tr>
235 </table>
236
237 <h3>module-esound-protocol-{unix,tcp}</h3>
238
239 <p>An implemenation of a protocol compatible with the <a
240 href="http://www.tux.org/~ricdude/EsounD.html">Enlightened Sound
241 Daemon</a> (ESOUND, <tt>esd</tt>). When you load this module you may
242 access the <tt>polypaudio</tt> daemon with tools like <tt>esdcat</tt>,
243 <tt>esdrec</tt> or even <tt>esdctl</tt>. Many applications, such as
244 XMMS, include support for this protocol.</p>
245
246 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
247 about the two possible suffixes of this module.</p>
248
249 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
250
251 <table>
252 <tr><td><tt>sink=</tt>, <tt>source=</tt></td><td>Specify the sink/source this service connects to</td></tr>
253 <tr><td><tt>auth-anonymous=</tt></td><td>If set to 1 no authentication is required to connect to the service</td></tr>
254 <tr><td><tt>cookie=</tt></td><td>Name of the cookie file for authentication purposes</td></tr>
255 </table>
256
257 <p>This implementation misses some features the original ESOUND has: e.g. there is no sample cache yet. However: XMMS works fine.</p>
258
259 <h3>module-native-protocol-{unix,tcp}</h3>
260
261 <p>The native protocol of <tt>polypaudio</tt>.</p>
262
263 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
264 about the two possible suffixes of this module.</p>
265
266 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
267
268 <table>
269 <tr><td><tt>auth-anonymous=</tt></td><td>If set to 1 no authentication is required to connect to the service</td></tr>
270 <tr><td><tt>auth-group=</tt></td><td>(only for <tt>-unix</tt>): members of the specified unix group may access the server without further auhentication.</td></tr>
271 <tr><td><tt>cookie=</tt></td><td>Name of the cookie file for authentication purposes</td></tr>
272 </table>
273
274 <h3>module-native-protocol-fd</h3>
275
276 <p>This is used internally when auto spawning a new daemon. Don't use it directly.</p>
277
278 <h2>Miscellaneous</h2>
279
280 <h3>module-x11-bell</h3>
281
282 <p>Intercepts X11 bell events and plays a sample from the sample cache on each occurence.</p>
283
284 <table>
285 <tr><td><tt>display=</tt></td><td>X11 display to connect to. If ommited defaults to the value of <tt>$DISPLAY</tt></td></tr>
286 <tr><td><tt>sample=</tt></td><td>The sample to play. If ommited defaults to <tt>x11-bell</tt>.</td></tr>
287 <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>
288 </table>
289
290 <h3>module-x11-publish</h3>
291
292 <p>Publishes the access credentials to the Polypaudio server in the
293 X11 root window. The following properties are used:
294 <tt>POLYP_SERVER</tt>, <tt>POYLP_SINK</tt>, <tt>POLYP_SOURCE</tt>,
295 <tt>POLYP_COOKIE</tt>. This is very useful when using SSH or any other
296 remote login tool for logging into other machines and getting audio
297 playback to your local speakers. The Polypaudio client libraries make
298 use of this data automatically. Instead of using this module you may
299 use the tool <tt>pax11publish</tt> which may be used to access, modify
300 and import credential data from/to the X11 display.</p>
301
302 <table>
303 <tr><td><tt>display=</tt></td><td>X11 display to connect to. If ommited defaults to the value of <tt>$DISPLAY</tt></td></tr>
304 <tr><td><tt>sink=</tt></td><td>Name of the default sink. If ommited this property isn't stored in the X11 display.</td></tr>
305 <tr><td><tt>source=</tt></td><td>Name of the default source. If ommited this property isn't stored in the X11 display.</td></tr>
306 <tr><td><tt>cookie=</tt></td><td>Name of the cookie file of the
307 cookie to store in the X11 display. If ommited the cookie of an
308 already loaded protocol module is used.</td></tr> </table>
309
310 <h3>module-sine</h3>
311
312 <p>Creates a sink input and generates a sine waveform stream.</p>
313
314 <table>
315 <tr><td><tt>sink=</tt></td><td>The sink to connect to. If ommited defaults to the default sink.</td></tr>
316 <tr><td><tt>frequency=</tt></td><td>The frequency to generate in Hertz. Defaults to 440.</td></tr>
317 </table>
318
319 <h3>module-esound-compat-spawnfd</h3>
320
321 <p>This is a compatibility module for <tt>libesd</tt> based autospawning of polypaudio. Don't use it directly.</p>
322
323 <h3>module-esound-compat-spawnpid</h3>
324
325 <p>This is a compatibility module for <tt>libesd</tt> based autospawning of polypaudio. Don't use it directly.</p>
326
327 <h3>module-match</h3>
328
329 <p>Adjust the volume of a playback stream automatically based on its name.</p>
330
331 <table>
332 <tr><td><tt>table=</tt></td><td>The regular expression matching table file to use</td></tr>
333 </table>
334
335 <p>The table file should contain a regexp and volume on each line, seperated by spaces. An example:</p>
336
337 <pre>
338 ^sample: 25
339 </pre>
340
341 <p>The volumes of all streams with titles starting with <tt>sample:</tt> are automatically set to 25. (FYI: All sample cache streams start with <tt>sample:</tt>)</p>
342
343 <h3>module-detect</h3>
344
345 <p>Automatically detect the available sound hardware and load modules for it. Supports OSS, ALSA, Solaris and Win32 output drivers.
346
347 <table>
348 <tr><td><tt>just-one=</tt></td><td>If set to <tt>1</tt> the module will only try to load a single sink/source and than stop.</td></tr>
349 </table>
350
351 <h3>module-zeroconf-publish</h3>
352
353 <p>Publish all local sinks/sources using mDNS Zeroconf.</p>
354
355 <h3>module-mmkbd-evdev</h3>
356
357 <p>Adjust the volume of a sink when the special multimedia buttons of modern keyboards are pressed.</p>
358
359 <table>
360 <tr><td><tt>device=</tt></td><td>Linux input device ("<tt>evdev</tt>", defaults to <tt>/dev/input/event0</tt>)</td></tr>
361 <tr><td><tt>sink=</tt></td><td>The sink to control</td></tr>
362 </table>
363
364 <h3>module-lirc</h3>
365
366 <p>Adjust the volume of a sink when the volume buttons of an infrared remote control are pressed (through LIRC).</p>
367
368 <table>
369 <tr><td><tt>config=</tt></td><td>The LIRC configuration file</td></tr>
370 <tr><td><tt>appname=</tt></td><td>The application name to pass to LIRC (defaults to <tt>polypaudio</tt>)</td></tr>
371 <tr><td><tt>sink=</tt></td><td>The sink to control</td></tr>
372 </table>
373
374 <hr/>
375 <address class="grey">Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;, April 2006</address>
376 <div class="grey"><i>$Id$</i></div>
377 </body> </html>