]> code.delx.au - pulseaudio/blob - doc/modules.html.in
documentation update
[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</td></tr>
34 </table>
35
36 <a name="module-alsa-sink"/>
37
38 <h3>module-alsa-sink</h3>
39
40 <p>Provides a playback sink for devices supported by the <a href="http://www.alsa-project.org/">Advanced Linux
41 Sound Architecture</a> (ALSA). The sink name defaults to <tt>alsa_output</tt>.</p>
42
43 <p>In addition to the general device driver options described above this module supports:</p>
44
45 <table>
46 <tr><td><tt>device=</tt></td><td>The ALSA device to use. (defaults to "plughw:0,0")</td></tr>
47 <tr><td><tt>fragments=</tt></td><td>The desired fragments when opening the device. (defaults to 12)</td></tr>
48 <tr><td><tt>fragment_size=</tt></td><td>The desired fragment size in bytes when opening the device (defaults to 1024)</td></tr>
49 </table>
50
51 <h3>module-alsa-source</h3>
52
53 <p>Provides a recording source for devices supported by the Advanced
54 Linux Sound Architecture (ALSA). The source name defaults to <tt>alsa_input</tt>.</p>
55
56 <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>
57
58 <a name="module-oss"/>
59
60 <h3>module-oss</h3>
61
62 <p>Provides both a sink and a source for playback, resp. recording on
63 <a href="http://www.opensound.com">Open Sound System</a> (OSS) compatible devices.</p>
64
65 <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>
66
67 <p>In addition this module supports the following options:</p>
68
69 <table>
70 <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>
71 <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>
72 </table>
73
74 <p>The sink name (resp. source name) defaults to <tt>oss_output</tt> (resp. <tt>oss_input</tt>).</p>
75
76 <h3>module-oss-mmap</h3>
77
78 <p>Similar to <tt>module-oss</tt> but uses memory mapped
79 (<tt>mmap()</tt>) access to the input/output buffers of the audio
80 device. This provides better latency behaviour but is not as
81 compatible as <tt>module-oss</tt>.</p>
82
83 <p>This module accepts exactly the same arguments as <a href="#module-oss"><tt>module-oss</tt></a>.</p>
84
85 <h2>Protocols</h2>
86
87 <a name="module-cli"/>
88
89 <h3>module-cli</h3>
90
91 <p>Provides the user with a simple command line interface on the
92 controlling TTY of the daemon. This module may not be loaded more than
93 once.</p>
94
95 <p>For an explanation of the simple command line language used by this
96 module see <a href="cli.html"><tt>cli.html</tt></a>.
97
98 <p>This module doesn't accept any arguments.</p>
99
100 <a name="module-cli-protocol-unix"/>
101 <a name="module-cli-protocol-tcp"/>
102 <a name="module-cli-protocol"/>
103
104 <h3>module-cli-protocol-{unix,tcp}</h3>
105
106 <p>An implemenation of a simple command line based protocol for
107 controlling the <tt>polypaudio</tt> daemon. If loaded, the user may
108 connect with tools like <tt>netcat</tt>, <tt>telnet</tt> or
109 <a href="http://0pointer.de/lennart/projects/bidilink/"><tt>bidilink</tt></a> to the listening sockets and execute commands the
110 same way as with <tt>module-cli</tt>.</p>
111
112 <p><b>Beware!</b> Users are not authenticated when connecting to this
113 service.</p>
114
115 <p>This module exists in two versions: with the suffix <tt>-unix</tt>
116 the service will listen on an UNIX domain socket in the local file
117 system. With the suffix <tt>-tcp</tt> it will listen on a network
118 transparent TCP/IP socket.</p>
119
120 <p>This module supports the following options:</p>
121
122 <table>
123 <tr><td><tt>port=</tt></td><td>(only for <tt>-tcp</tt>) The port number to listen on (defaults to 4712)</td></tr>
124 <tr><td><tt>loopback=</tt></td><td>(only for <tt>-tcp</tt>) Accepts
125 a numerical binary value. If 1 the socket is bound to the loopback
126 device, i.e. not publicly accessible. (defaults to 1)</td></tr>
127 <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>
128 </table>
129
130 <h3>module-simple-protocol-{unix,tcp}</h3>
131
132 <p>An implementation of a simple protocol which allows playback by using
133 simple tools like <tt>netcat</tt>. Just connect to the listening
134 socket of this module and write the audio data to it, or read it from
135 it for playback, resp. recording.</p>
136
137 <p><b>Beware!</b> Users are not authenticated when connecting to this
138 service.</p>
139
140 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
141 about the two possible suffixes of this module.</p>
142
143 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
144
145 <table>
146 <tr><td><tt>rate=</tt>, <tt>format=</tt>, <tt>channels=</tt></td><td>Sample format for streams connecting to this service.</td></tr>
147 <tr><td><tt>playback=</tt>, <tt>record=</tt></td><td>Enable/disable playback/recording</td></tr>
148 <tr><td><tt>sink=</tt>, <tt>source=</tt></td><td>Specify the sink/source this service connects to</td></tr>
149 </table>
150
151 <h3>module-esound-protocol-{unix,tcp}</h3>
152
153 <p>An implemenation of a protocol compatible with the <a
154 href="http://www.tux.org/~ricdude/EsounD.html">Enlightened Sound
155 Daemon</a> (ESOUND, <tt>esd</tt>). When you load this module you may
156 access the <tt>polypaudio</tt> daemon with tools like <tt>esdcat</tt>,
157 <tt>esdrec</tt> or even <tt>esdctl</tt>. Many applications, such as
158 XMMS, include support for this protocol.</p>
159
160 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
161 about the two possible suffixes of this module.</p>
162
163 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
164
165 <table>
166 <tr><td><tt>sink=</tt>, <tt>source=</tt></td><td>Specify the sink/source this service connects to</td></tr>
167 <tr><td><tt>public=</tt></td><td>If set to 0 not authentication is required to connect to the service</td></tr>
168 <tr><td><tt>cookie=</tt></td><td>Name of the cookie file for authentication purposes</td></tr>
169 </table>
170
171 <p>This implementation misses some features the original ESOUND has: e.g. there is no sample cache yet. However: XMMS works fine.</p>
172
173 <h3>module-native-protocol-{unix,tcp}</h3>
174
175 <p>The native protocol of <tt>polypaudio</tt>.</p>
176
177 <p>See <tt>module-cli-protocol-{unix,tcp}</tt> for more information
178 about the two possible suffixes of this module.</p>
179
180 <p>In addition to the options supported by <a href="module-cli-protocol"><tt>module-cli-protocol-*</tt></a>, this module supports:</p>
181
182 <table>
183 <tr><td><tt>public=</tt></td><td>If set to 0 not authentication is required to connect to the service</td></tr>
184 <tr><td><tt>cookie=</tt></td><td>Name of the cookie file for authentication purposes</td></tr>
185 </table>
186
187 <h3>module-x11-bell</h3>
188
189 <p>Intercepts X11 bell events and plays a sample from the sample cache on each occurence.</p>
190
191 <table>
192 <tr><td><tt>display=</tt></td><td>X11 display to connect to. If ommited defaults to the value of <tt>$DISPLAY</tt></td></tr>
193 <tr><td><tt>sample=</tt></td><td>The sample to play. If ommited defaults to <tt>x11-bell</tt>.</td></tr>
194 <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>
195 </table>
196
197 <hr/>
198 <address class="grey">Lennart Poettering &lt;@PACKAGE_BUGREPORT@&gt;, August 2004</address>
199 <div class="grey"><i>$Id$</i></div>
200 </body> </html>