1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>DVB Audio Device</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="legacy_dvb_apis.html" title="Chapter 13. DVB Deprecated APIs"><link rel="prev" href="legacy_dvb_apis.html" title="Chapter 13. DVB Deprecated APIs"><link rel="next" href="dvb_examples.html" title="Chapter 14. Examples"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">DVB Audio Device</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="legacy_dvb_apis.html">Prev</a> </td><th width="60%" align="center">Chapter 13. DVB Deprecated APIs</th><td width="20%" align="right"> <a accesskey="n" href="dvb_examples.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dvb_audio"></a>DVB Audio Device</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="dvb_audio.html#audio_data_types">Audio Data Types</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio_function_calls">Audio Function Calls</a></span></dt></dl></div><p>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It
2can be accessed through <code class="constant">/dev/dvb/adapter?/audio?</code>. Data types and and
3ioctl definitions can be accessed by including <code class="constant">linux/dvb/audio.h</code> in your
4application.
5</p><p>Please note that some DVB cards don’t have their own MPEG decoder, which results in
6the omission of the audio and video device.
7</p><p>
8These ioctls were also used by V4L2 to control MPEG decoders implemented in V4L2. The use
9of these ioctls for that purpose has been made obsolete and proper V4L2 ioctls or controls
10have been created to replace that functionality.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="audio_data_types"></a>Audio Data Types</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="dvb_audio.html#audio-stream-source-t">audio_stream_source_t</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-play-state-t">audio_play_state_t</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-channel-select-t">audio_channel_select_t</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-status">struct audio_status</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-mixer">struct audio_mixer</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio_encodings">audio encodings</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-karaoke">struct audio_karaoke</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio-attributes-t">audio attributes</a></span></dt></dl></div><p>This section describes the structures, data types and defines used when talking to the
11audio device.
12</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-stream-source-t"></a>audio_stream_source_t</h4></div></div></div><p>The audio stream source is set through the AUDIO_SELECT_SOURCE call and can take
13the following values, depending on whether we are replaying from an internal (demux) or
14external (user write) source.
15</p><pre class="programlisting">
16typedef enum {
17	AUDIO_SOURCE_DEMUX,
18	AUDIO_SOURCE_MEMORY
19} audio_stream_source_t;
20</pre><p>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
21DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY
22is selected the stream comes from the application through the <code class="constant">write()</code> system
23call.
24</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-play-state-t"></a>audio_play_state_t</h4></div></div></div><p>The following values can be returned by the AUDIO_GET_STATUS call representing the
25state of audio playback.
26</p><pre class="programlisting">
27typedef enum {
28	AUDIO_STOPPED,
29	AUDIO_PLAYING,
30	AUDIO_PAUSED
31} audio_play_state_t;
32</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-channel-select-t"></a>audio_channel_select_t</h4></div></div></div><p>The audio channel selected via AUDIO_CHANNEL_SELECT is determined by the
33following values.
34</p><pre class="programlisting">
35typedef enum {
36	AUDIO_STEREO,
37	AUDIO_MONO_LEFT,
38	AUDIO_MONO_RIGHT,
39	AUDIO_MONO,
40	AUDIO_STEREO_SWAPPED
41} audio_channel_select_t;
42</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-status"></a>struct audio_status</h4></div></div></div><p>The AUDIO_GET_STATUS call returns the following structure informing about various
43states of the playback operation.
44</p><pre class="programlisting">
45typedef struct audio_status {
46	boolean AV_sync_state;
47	boolean mute_state;
48	audio_play_state_t play_state;
49	audio_stream_source_t stream_source;
50	audio_channel_select_t channel_select;
51	boolean bypass_mode;
52	audio_mixer_t mixer_state;
53} audio_status_t;
54</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-mixer"></a>struct audio_mixer</h4></div></div></div><p>The following structure is used by the AUDIO_SET_MIXER call to set the audio
55volume.
56</p><pre class="programlisting">
57typedef struct audio_mixer {
58	unsigned int volume_left;
59	unsigned int volume_right;
60} audio_mixer_t;
61</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio_encodings"></a>audio encodings</h4></div></div></div><p>A call to AUDIO_GET_CAPABILITIES returns an unsigned integer with the following
62bits set according to the hardwares capabilities.
63</p><pre class="programlisting">
64 #define AUDIO_CAP_DTS    1
65 #define AUDIO_CAP_LPCM   2
66 #define AUDIO_CAP_MP1    4
67 #define AUDIO_CAP_MP2    8
68 #define AUDIO_CAP_MP3   16
69 #define AUDIO_CAP_AAC   32
70 #define AUDIO_CAP_OGG   64
71 #define AUDIO_CAP_SDDS 128
72 #define AUDIO_CAP_AC3  256
73</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-karaoke"></a>struct audio_karaoke</h4></div></div></div><p>The ioctl AUDIO_SET_KARAOKE uses the following format:
74</p><pre class="programlisting">
75typedef
76struct audio_karaoke {
77	int vocal1;
78	int vocal2;
79	int melody;
80} audio_karaoke_t;
81</pre><p>If Vocal1 or Vocal2 are non-zero, they get mixed into left and right t at 70% each. If both,
82Vocal1 and Vocal2 are non-zero, Vocal1 gets mixed into the left channel and Vocal2 into the
83right channel at 100% each. Ff Melody is non-zero, the melody channel gets mixed into left
84and right.
85</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio-attributes-t"></a>audio attributes</h4></div></div></div><p>The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES:
86</p><pre class="programlisting">
87 typedef uint16_t audio_attributes_t;
88 /⋆   bits: descr. ⋆/
89 /⋆   15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, ⋆/
90 /⋆   12    multichannel extension ⋆/
91 /⋆   11-10 audio type (0=not spec, 1=language included) ⋆/
92 /⋆    9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) ⋆/
93 /⋆    7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit,  ⋆/
94 /⋆    5- 4 Sample frequency fs (0=48kHz, 1=96kHz) ⋆/
95 /⋆    2- 0 number of audio channels (n+1 channels) ⋆/
96</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="audio_function_calls"></a>Audio Function Calls</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="dvb_audio.html#audio_fopen">open()</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio_fclose">close()</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio_fwrite">write()</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_STOP">AUDIO_STOP</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_PLAY">AUDIO_PLAY</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_PAUSE">AUDIO_PAUSE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_CONTINUE">AUDIO_CONTINUE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SELECT_SOURCE">AUDIO_SELECT_SOURCE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_MUTE">AUDIO_SET_MUTE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_AV_SYNC">AUDIO_SET_AV_SYNC</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_BYPASS_MODE">AUDIO_SET_BYPASS_MODE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_CHANNEL_SELECT">AUDIO_CHANNEL_SELECT</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_BILINGUAL_CHANNEL_SELECT">AUDIO_BILINGUAL_CHANNEL_SELECT</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_GET_PTS">AUDIO_GET_PTS</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_GET_STATUS">AUDIO_GET_STATUS</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_GET_CAPABILITIES">AUDIO_GET_CAPABILITIES</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_CLEAR_BUFFER">AUDIO_CLEAR_BUFFER</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_ID">AUDIO_SET_ID</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_MIXER">AUDIO_SET_MIXER</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_STREAMTYPE">AUDIO_SET_STREAMTYPE</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_EXT_ID">AUDIO_SET_EXT_ID</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_ATTRIBUTES">AUDIO_SET_ATTRIBUTES</a></span></dt><dt><span class="section"><a href="dvb_audio.html#AUDIO_SET_KARAOKE">AUDIO_SET_KARAOKE</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio_fopen"></a>open()</h4></div></div></div><p>DESCRIPTION
97</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
98<p>This system call opens a named audio device (e.g. /dev/dvb/adapter0/audio0)
99 for subsequent use. When an open() call has succeeded, the device will be ready
100 for use. The significance of blocking or non-blocking mode is described in the
101 documentation for functions where there is a difference. It does not affect the
102 semantics of the open() call itself. A device opened in blocking mode can later
103 be put into non-blocking mode (and vice versa) using the F_SETFL command
104 of the fcntl system call. This is a standard system call, documented in the Linux
105 manual page for fcntl. Only one user can open the Audio Device in O_RDWR
106 mode. All other attempts to open the device in this mode will fail, and an error
107 code will be returned. If the Audio Device is opened in O_RDONLY mode, the
108 only ioctl call that can be used is AUDIO_GET_STATUS. All other call will
109 return with an error code.</p>
110</td></tr></tbody></table></div><p>SYNOPSIS
111</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
112<p>int open(const char ⋆deviceName, int flags);</p>
113</td></tr></tbody></table></div><p>PARAMETERS
114</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
115<p>const char
116 *deviceName</p>
117</td><td align="char">
118<p>Name of specific audio device.</p>
119</td></tr><tr><td align="char">
120<p>int flags</p>
121</td><td align="char">
122<p>A bit-wise OR of the following flags:</p>
123</td></tr><tr><td align="char">
124</td><td align="char">
125<p>O_RDONLY read-only access</p>
126</td></tr><tr><td align="char">
127</td><td align="char">
128<p>O_RDWR read/write access</p>
129</td></tr><tr><td align="char">
130</td><td align="char">
131<p>O_NONBLOCK open in non-blocking mode</p>
132</td></tr><tr><td align="char">
133</td><td align="char">
134<p>(blocking mode is the default)</p>
135</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
136<p>ENODEV</p>
137</td><td align="char">
138<p>Device driver not loaded/available.</p>
139</td></tr><tr><td align="char">
140<p>EBUSY</p>
141</td><td align="char">
142<p>Device or resource busy.</p>
143</td></tr><tr><td align="char">
144<p>EINVAL</p>
145</td><td align="char">
146<p>Invalid argument.</p>
147</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio_fclose"></a>close()</h4></div></div></div><p>DESCRIPTION
148</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
149<p>This system call closes a previously opened audio device.</p>
150</td></tr></tbody></table></div><p>SYNOPSIS
151</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
152<p>int close(int fd);</p>
153</td></tr></tbody></table></div><p>PARAMETERS
154</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
155<p>int fd</p>
156</td><td align="char">
157<p>File descriptor returned by a previous call to open().</p>
158</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
159<p>EBADF</p>
160</td><td align="char">
161<p>fd is not a valid open file descriptor.</p>
162</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="audio_fwrite"></a>write()</h4></div></div></div><p>DESCRIPTION
163</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
164<p>This system call can only be used if AUDIO_SOURCE_MEMORY is selected
165 in the ioctl call AUDIO_SELECT_SOURCE. The data provided shall be in
166 PES format. If O_NONBLOCK is not specified the function will block until
167 buffer space is available. The amount of data to be transferred is implied by
168 count.</p>
169</td></tr></tbody></table></div><p>SYNOPSIS
170</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
171<p>size_t write(int fd, const void ⋆buf, size_t count);</p>
172</td></tr></tbody></table></div><p>PARAMETERS
173</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
174<p>int fd</p>
175</td><td align="char">
176<p>File descriptor returned by a previous call to open().</p>
177</td></tr><tr><td align="char">
178<p>void *buf</p>
179</td><td align="char">
180<p>Pointer to the buffer containing the PES data.</p>
181</td></tr><tr><td align="char">
182<p>size_t count</p>
183</td><td align="char">
184<p>Size of buf.</p>
185</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
186<p>EPERM</p>
187</td><td align="char">
188<p>Mode AUDIO_SOURCE_MEMORY not selected.</p>
189</td></tr><tr><td align="char">
190<p>ENOMEM</p>
191</td><td align="char">
192<p>Attempted to write more data than the internal buffer can
193 hold.</p>
194</td></tr><tr><td align="char">
195<p>EBADF</p>
196</td><td align="char">
197<p>fd is not a valid open file descriptor.</p>
198</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_STOP"></a>AUDIO_STOP</h4></div></div></div><p>DESCRIPTION
199</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
200<p>This ioctl call asks the Audio Device to stop playing the current stream.</p>
201</td></tr></tbody></table></div><p>SYNOPSIS
202</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
203<p>int ioctl(int fd, int request = AUDIO_STOP);</p>
204</td></tr></tbody></table></div><p>PARAMETERS
205</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
206<p>int fd</p>
207</td><td align="char">
208<p>File descriptor returned by a previous call to open().</p>
209</td></tr><tr><td align="char">
210<p>int request</p>
211</td><td align="char">
212<p>Equals AUDIO_STOP for this command.</p>
213</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_PLAY"></a>AUDIO_PLAY</h4></div></div></div><p>DESCRIPTION
214</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
215<p>This ioctl call asks the Audio Device to start playing an audio stream from the
216 selected source.</p>
217</td></tr></tbody></table></div><p>SYNOPSIS
218</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
219<p>int ioctl(int fd, int request = AUDIO_PLAY);</p>
220</td></tr></tbody></table></div><p>PARAMETERS
221</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
222<p>int fd</p>
223</td><td align="char">
224<p>File descriptor returned by a previous call to open().</p>
225</td></tr><tr><td align="char">
226<p>int request</p>
227</td><td align="char">
228<p>Equals AUDIO_PLAY for this command.</p>
229</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_PAUSE"></a>AUDIO_PAUSE</h4></div></div></div><p>DESCRIPTION
230</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
231<p>This ioctl call suspends the audio stream being played. Decoding and playing
232 are paused. It is then possible to restart again decoding and playing process of
233 the audio stream using AUDIO_CONTINUE command.</p>
234</td></tr><tr><td align="char">
235<p>If AUDIO_SOURCE_MEMORY is selected in the ioctl call
236 AUDIO_SELECT_SOURCE, the DVB-subsystem will not decode (consume)
237 any more data until the ioctl call AUDIO_CONTINUE or AUDIO_PLAY is
238 performed.</p>
239</td></tr></tbody></table></div><p>SYNOPSIS
240</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
241<p>int ioctl(int fd, int request = AUDIO_PAUSE);</p>
242</td></tr></tbody></table></div><p>PARAMETERS
243</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
244<p>int fd</p>
245</td><td align="char">
246<p>File descriptor returned by a previous call to open().</p>
247</td></tr><tr><td align="char">
248<p>int request</p>
249</td><td align="char">
250<p>Equals AUDIO_PAUSE for this command.</p>
251</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_CONTINUE"></a>AUDIO_CONTINUE</h4></div></div></div><p>DESCRIPTION
252</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
253<p>This ioctl restarts the decoding and playing process previously paused
254with AUDIO_PAUSE command.</p>
255</td></tr><tr><td align="char">
256<p>It only works if the stream were previously stopped with AUDIO_PAUSE</p>
257</td></tr></tbody></table></div><p>SYNOPSIS
258</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
259<p>int ioctl(int fd, int request = AUDIO_CONTINUE);</p>
260</td></tr></tbody></table></div><p>PARAMETERS
261</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
262<p>int fd</p>
263</td><td align="char">
264<p>File descriptor returned by a previous call to open().</p>
265</td></tr><tr><td align="char">
266<p>int request</p>
267</td><td align="char">
268<p>Equals AUDIO_CONTINUE for this command.</p>
269</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SELECT_SOURCE"></a>AUDIO_SELECT_SOURCE</h4></div></div></div><p>DESCRIPTION
270</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
271<p>This ioctl call informs the audio device which source shall be used
272 for the input data. The possible sources are demux or memory. If
273 AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device
274 through the write command.</p>
275</td></tr></tbody></table></div><p>SYNOPSIS
276</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
277<p>int ioctl(int fd, int request = AUDIO_SELECT_SOURCE,
278 audio_stream_source_t source);</p>
279</td></tr></tbody></table></div><p>PARAMETERS
280</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
281<p>int fd</p>
282</td><td align="char">
283<p>File descriptor returned by a previous call to open().</p>
284</td></tr><tr><td align="char">
285<p>int request</p>
286</td><td align="char">
287<p>Equals AUDIO_SELECT_SOURCE for this command.</p>
288</td></tr><tr><td align="char">
289<p>audio_stream_source_t
290 source</p>
291</td><td align="char">
292<p>Indicates the source that shall be used for the Audio
293 stream.</p>
294</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_MUTE"></a>AUDIO_SET_MUTE</h4></div></div></div><p>DESCRIPTION
295</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
296<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> with the <code class="constant">V4L2_DEC_CMD_START_MUTE_AUDIO</code> flag instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
297<p>This ioctl call asks the audio device to mute the stream that is currently being
298 played.</p>
299</td></tr></tbody></table></div><p>SYNOPSIS
300</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
301<p>int ioctl(int fd, int request = AUDIO_SET_MUTE,
302 boolean state);</p>
303</td></tr></tbody></table></div><p>PARAMETERS
304</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
305<p>int fd</p>
306</td><td align="char">
307<p>File descriptor returned by a previous call to open().</p>
308</td></tr><tr><td align="char">
309<p>int request</p>
310</td><td align="char">
311<p>Equals AUDIO_SET_MUTE for this command.</p>
312</td></tr><tr><td align="char">
313<p>boolean state</p>
314</td><td align="char">
315<p>Indicates if audio device shall mute or not.</p>
316</td></tr><tr><td align="char">
317</td><td align="char">
318<p>TRUE Audio Mute</p>
319</td></tr><tr><td align="char">
320</td><td align="char">
321<p>FALSE Audio Un-mute</p>
322</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_AV_SYNC"></a>AUDIO_SET_AV_SYNC</h4></div></div></div><p>DESCRIPTION
323</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
324<p>This ioctl call asks the Audio Device to turn ON or OFF A/V synchronization.</p>
325</td></tr></tbody></table></div><p>SYNOPSIS
326</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
327<p>int ioctl(int fd, int request = AUDIO_SET_AV_SYNC,
328 boolean state);</p>
329</td></tr></tbody></table></div><p>PARAMETERS
330</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
331<p>int fd</p>
332</td><td align="char">
333<p>File descriptor returned by a previous call to open().</p>
334</td></tr><tr><td align="char">
335<p>int request</p>
336</td><td align="char">
337<p>Equals AUDIO_AV_SYNC for this command.</p>
338</td></tr><tr><td align="char">
339<p>boolean state</p>
340</td><td align="char">
341<p>Tells the DVB subsystem if A/V synchronization shall be
342 ON or OFF.</p>
343</td></tr><tr><td align="char">
344</td><td align="char">
345<p>TRUE AV-sync ON</p>
346</td></tr><tr><td align="char">
347</td><td align="char">
348<p>FALSE AV-sync OFF</p>
349</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_BYPASS_MODE"></a>AUDIO_SET_BYPASS_MODE</h4></div></div></div><p>DESCRIPTION
350</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
351<p>This ioctl call asks the Audio Device to bypass the Audio decoder and forward
352 the stream without decoding. This mode shall be used if streams that can’t be
353 handled by the DVB system shall be decoded. Dolby DigitalTM streams are
354 automatically forwarded by the DVB subsystem if the hardware can handle it.</p>
355</td></tr></tbody></table></div><p>SYNOPSIS
356</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
357<p>int ioctl(int fd, int request =
358 AUDIO_SET_BYPASS_MODE, boolean mode);</p>
359</td></tr></tbody></table></div><p>PARAMETERS
360</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
361<p>int fd</p>
362</td><td align="char">
363<p>File descriptor returned by a previous call to open().</p>
364</td></tr><tr><td align="char">
365<p>int request</p>
366</td><td align="char">
367<p>Equals AUDIO_SET_BYPASS_MODE for this
368 command.</p>
369</td></tr><tr><td align="char">
370<p>boolean mode</p>
371</td><td align="char">
372<p>Enables or disables the decoding of the current Audio
373 stream in the DVB subsystem.</p>
374</td></tr><tr><td align="char">
375</td><td align="char">
376<p>TRUE Bypass is disabled</p>
377</td></tr><tr><td align="char">
378</td><td align="char">
379<p>FALSE Bypass is enabled</p>
380</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_CHANNEL_SELECT"></a>AUDIO_CHANNEL_SELECT</h4></div></div></div><p>DESCRIPTION
381</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
382<code class="constant">V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</code> control instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
383<p>This ioctl call asks the Audio Device to select the requested channel if possible.</p>
384</td></tr></tbody></table></div><p>SYNOPSIS
385</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
386<p>int ioctl(int fd, int request =
387 AUDIO_CHANNEL_SELECT, audio_channel_select_t);</p>
388</td></tr></tbody></table></div><p>PARAMETERS
389</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
390<p>int fd</p>
391</td><td align="char">
392<p>File descriptor returned by a previous call to open().</p>
393</td></tr><tr><td align="char">
394<p>int request</p>
395</td><td align="char">
396<p>Equals AUDIO_CHANNEL_SELECT for this
397 command.</p>
398</td></tr><tr><td align="char">
399<p>audio_channel_select_t
400 ch</p>
401</td><td align="char">
402<p>Select the output format of the audio (mono left/right,
403 stereo).</p>
404</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_BILINGUAL_CHANNEL_SELECT"></a>AUDIO_BILINGUAL_CHANNEL_SELECT</h4></div></div></div><p>DESCRIPTION
405</p><p>This ioctl is obsolete. Do not use in new drivers. It has been replaced by
406the V4L2 <code class="constant">V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</code> control
407for MPEG decoders controlled through V4L2.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
408<p>This ioctl call asks the Audio Device to select the requested channel for bilingual streams if possible.</p>
409</td></tr></tbody></table></div><p>SYNOPSIS
410</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
411<p>int ioctl(int fd, int request =
412 AUDIO_BILINGUAL_CHANNEL_SELECT, audio_channel_select_t);</p>
413</td></tr></tbody></table></div><p>PARAMETERS
414</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
415<p>int fd</p>
416</td><td align="char">
417<p>File descriptor returned by a previous call to open().</p>
418</td></tr><tr><td align="char">
419<p>int request</p>
420</td><td align="char">
421<p>Equals AUDIO_BILINGUAL_CHANNEL_SELECT for this
422 command.</p>
423</td></tr><tr><td align="char">
424<p>audio_channel_select_t
425ch</p>
426</td><td align="char">
427<p>Select the output format of the audio (mono left/right,
428 stereo).</p>
429</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_GET_PTS"></a>AUDIO_GET_PTS</h4></div></div></div><p>DESCRIPTION
430</p><p>This ioctl is obsolete. Do not use in new drivers. If you need this functionality,
431then please contact the linux-media mailing list (<a class="ulink" href="http://www.linuxtv.org/lists.php" target="_top">http://www.linuxtv.org/lists.php</a>).</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
432<p>This ioctl call asks the Audio Device to return the current PTS timestamp.</p>
433</td></tr></tbody></table></div><p>SYNOPSIS
434</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
435<p>int ioctl(int fd, int request =
436 AUDIO_GET_PTS, __u64 *pts);</p>
437</td></tr></tbody></table></div><p>PARAMETERS
438</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
439<p>int fd</p>
440</td><td align="char">
441<p>File descriptor returned by a previous call to open().</p>
442</td></tr><tr><td align="char">
443<p>int request</p>
444</td><td align="char">
445<p>Equals AUDIO_GET_PTS for this
446 command.</p>
447</td></tr><tr><td align="char">
448<p>__u64 *pts
449</p>
450</td><td align="char">
451<p>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
452</p>
453<p>
454The PTS should belong to the currently played
455frame if possible, but may also be a value close to it
456like the PTS of the last decoded frame or the last PTS
457extracted by the PES parser.</p>
458</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_GET_STATUS"></a>AUDIO_GET_STATUS</h4></div></div></div><p>DESCRIPTION
459</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
460<p>This ioctl call asks the Audio Device to return the current state of the Audio
461 Device.</p>
462</td></tr></tbody></table></div><p>SYNOPSIS
463</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
464<p>int ioctl(int fd, int request = AUDIO_GET_STATUS,
465 struct audio_status ⋆status);</p>
466</td></tr></tbody></table></div><p>PARAMETERS
467</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
468<p>int fd</p>
469</td><td align="char">
470<p>File descriptor returned by a previous call to open().</p>
471</td></tr><tr><td align="char">
472<p>int request</p>
473</td><td align="char">
474<p>Equals AUDIO_GET_STATUS for this command.</p>
475</td></tr><tr><td align="char">
476<p>struct audio_status
477 *status</p>
478</td><td align="char">
479<p>Returns the current state of Audio Device.</p>
480</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_GET_CAPABILITIES"></a>AUDIO_GET_CAPABILITIES</h4></div></div></div><p>DESCRIPTION
481</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
482<p>This ioctl call asks the Audio Device to tell us about the decoding capabilities
483 of the audio hardware.</p>
484</td></tr></tbody></table></div><p>SYNOPSIS
485</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
486<p>int ioctl(int fd, int request =
487 AUDIO_GET_CAPABILITIES, unsigned int ⋆cap);</p>
488</td></tr></tbody></table></div><p>PARAMETERS
489</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
490<p>int fd</p>
491</td><td align="char">
492<p>File descriptor returned by a previous call to open().</p>
493</td></tr><tr><td align="char">
494<p>int request</p>
495</td><td align="char">
496<p>Equals AUDIO_GET_CAPABILITIES for this
497 command.</p>
498</td></tr><tr><td align="char">
499<p>unsigned int *cap</p>
500</td><td align="char">
501<p>Returns a bit array of supported sound formats.</p>
502</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_CLEAR_BUFFER"></a>AUDIO_CLEAR_BUFFER</h4></div></div></div><p>DESCRIPTION
503</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
504<p>This ioctl call asks the Audio Device to clear all software and hardware buffers
505 of the audio decoder device.</p>
506</td></tr></tbody></table></div><p>SYNOPSIS
507</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
508<p>int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER);</p>
509</td></tr></tbody></table></div><p>PARAMETERS
510</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
511<p>int fd</p>
512</td><td align="char">
513<p>File descriptor returned by a previous call to open().</p>
514</td></tr><tr><td align="char">
515<p>int request</p>
516</td><td align="char">
517<p>Equals AUDIO_CLEAR_BUFFER for this command.</p>
518</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_ID"></a>AUDIO_SET_ID</h4></div></div></div><p>DESCRIPTION
519</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
520<p>This ioctl selects which sub-stream is to be decoded if a program or system
521 stream is sent to the video device. If no audio stream type is set the id has to be
522 in [0xC0,0xDF] for MPEG sound, in [0x80,0x87] for AC3 and in [0xA0,0xA7]
523 for LPCM. More specifications may follow for other stream types. If the stream
524 type is set the id just specifies the substream id of the audio stream and only
525 the first 5 bits are recognized.</p>
526</td></tr></tbody></table></div><p>SYNOPSIS
527</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
528<p>int ioctl(int fd, int request = AUDIO_SET_ID, int
529 id);</p>
530</td></tr></tbody></table></div><p>PARAMETERS
531</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
532<p>int fd</p>
533</td><td align="char">
534<p>File descriptor returned by a previous call to open().</p>
535</td></tr><tr><td align="char">
536<p>int request</p>
537</td><td align="char">
538<p>Equals AUDIO_SET_ID for this command.</p>
539</td></tr><tr><td align="char">
540<p>int id</p>
541</td><td align="char">
542<p>audio sub-stream id</p>
543</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_MIXER"></a>AUDIO_SET_MIXER</h4></div></div></div><p>DESCRIPTION
544</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
545<p>This ioctl lets you adjust the mixer settings of the audio decoder.</p>
546</td></tr></tbody></table></div><p>SYNOPSIS
547</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
548<p>int ioctl(int fd, int request = AUDIO_SET_MIXER,
549 audio_mixer_t ⋆mix);</p>
550</td></tr></tbody></table></div><p>PARAMETERS
551</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
552<p>int fd</p>
553</td><td align="char">
554<p>File descriptor returned by a previous call to open().</p>
555</td></tr><tr><td align="char">
556<p>int request</p>
557</td><td align="char">
558<p>Equals AUDIO_SET_ID for this command.</p>
559</td></tr><tr><td align="char">
560<p>audio_mixer_t *mix</p>
561</td><td align="char">
562<p>mixer settings.</p>
563</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_STREAMTYPE"></a>AUDIO_SET_STREAMTYPE</h4></div></div></div><p>DESCRIPTION
564</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
565<p>This ioctl tells the driver which kind of audio stream to expect. This is useful
566 if the stream offers several audio sub-streams like LPCM and AC3.</p>
567</td></tr></tbody></table></div><p>SYNOPSIS
568</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
569<p>int ioctl(fd, int request = AUDIO_SET_STREAMTYPE,
570 int type);</p>
571</td></tr></tbody></table></div><p>PARAMETERS
572</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
573<p>int fd</p>
574</td><td align="char">
575<p>File descriptor returned by a previous call to open().</p>
576</td></tr><tr><td align="char">
577<p>int request</p>
578</td><td align="char">
579<p>Equals AUDIO_SET_STREAMTYPE for this
580 command.</p>
581</td></tr><tr><td align="char">
582<p>int type</p>
583</td><td align="char">
584<p>stream type</p>
585</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
586<p>EINVAL</p>
587</td><td align="char">
588<p>type is not a valid or supported stream type.</p>
589</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_EXT_ID"></a>AUDIO_SET_EXT_ID</h4></div></div></div><p>DESCRIPTION
590</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
591<p>This ioctl can be used to set the extension id for MPEG streams in DVD
592 playback. Only the first 3 bits are recognized.</p>
593</td></tr></tbody></table></div><p>SYNOPSIS
594</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
595<p>int ioctl(fd, int request = AUDIO_SET_EXT_ID, int
596 id);</p>
597</td></tr></tbody></table></div><p>PARAMETERS
598</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
599<p>int fd</p>
600</td><td align="char">
601<p>File descriptor returned by a previous call to open().</p>
602</td></tr><tr><td align="char">
603<p>int request</p>
604</td><td align="char">
605<p>Equals AUDIO_SET_EXT_ID for this command.</p>
606</td></tr><tr><td align="char">
607<p>int id</p>
608</td><td align="char">
609<p>audio sub_stream_id</p>
610</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
611<p>EINVAL</p>
612</td><td align="char">
613<p>id is not a valid id.</p>
614</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_ATTRIBUTES"></a>AUDIO_SET_ATTRIBUTES</h4></div></div></div><p>DESCRIPTION
615</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
616<p>This ioctl is intended for DVD playback and allows you to set certain
617 information about the audio stream.</p>
618</td></tr></tbody></table></div><p>SYNOPSIS
619</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
620<p>int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES,
621 audio_attributes_t attr );</p>
622</td></tr></tbody></table></div><p>PARAMETERS
623</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
624<p>int fd</p>
625</td><td align="char">
626<p>File descriptor returned by a previous call to open().</p>
627</td></tr><tr><td align="char">
628<p>int request</p>
629</td><td align="char">
630<p>Equals AUDIO_SET_ATTRIBUTES for this command.</p>
631</td></tr><tr><td align="char">
632<p>audio_attributes_t
633 attr</p>
634</td><td align="char">
635<p>audio attributes according to section ??</p>
636</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
637<p>EINVAL</p>
638</td><td align="char">
639<p>attr is not a valid or supported attribute setting.</p>
640</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="AUDIO_SET_KARAOKE"></a>AUDIO_SET_KARAOKE</h4></div></div></div><p>DESCRIPTION
641</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
642<p>This ioctl allows one to set the mixer settings for a karaoke DVD.</p>
643</td></tr></tbody></table></div><p>SYNOPSIS
644</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
645<p>int ioctl(fd, int request = AUDIO_SET_KARAOKE,
646 audio_karaoke_t ⋆karaoke);</p>
647</td></tr></tbody></table></div><p>PARAMETERS
648</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
649<p>int fd</p>
650</td><td align="char">
651<p>File descriptor returned by a previous call to open().</p>
652</td></tr><tr><td align="char">
653<p>int request</p>
654</td><td align="char">
655<p>Equals AUDIO_SET_KARAOKE for this
656 command.</p>
657</td></tr><tr><td align="char">
658<p>audio_karaoke_t
659 *karaoke</p>
660</td><td align="char">
661<p>karaoke settings according to section ??.</p>
662</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
663<p>EINVAL</p>
664</td><td align="char">
665<p>karaoke is not a valid or supported karaoke setting.</p>
666</td></tr></tbody></table></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="legacy_dvb_apis.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="legacy_dvb_apis.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dvb_examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 13. DVB Deprecated APIs </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 14. Examples</td></tr></table></div></body></html>
667