]>
Commit | Line | Data |
---|---|---|
8e080c2e MCC |
1 | <section id="control"> |
2 | <title>User Controls</title> | |
3 | ||
4 | <para>Devices typically have a number of user-settable controls | |
5 | such as brightness, saturation and so on, which would be presented to | |
6 | the user on a graphical user interface. But, different devices | |
7 | will have different controls available, and furthermore, the range of | |
8 | possible values, and the default value will vary from device to | |
9 | device. The control ioctls provide the information and a mechanism to | |
10 | create a nice user interface for these controls that will work | |
11 | correctly with any device.</para> | |
12 | ||
13 | <para>All controls are accessed using an ID value. V4L2 defines | |
14 | several IDs for specific purposes. Drivers can also implement their | |
15 | own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant> | |
16 | and higher values. The pre-defined control IDs have the prefix | |
17 | <constant>V4L2_CID_</constant>, and are listed in <xref | |
18 | linkend="control-id" />. The ID is used when querying the attributes of | |
19 | a control, and when getting or setting the current value.</para> | |
20 | ||
21 | <para>Generally applications should present controls to the user | |
22 | without assumptions about their purpose. Each control comes with a | |
23 | name string the user is supposed to understand. When the purpose is | |
24 | non-intuitive the driver writer should provide a user manual, a user | |
25 | interface plug-in or a driver specific panel application. Predefined | |
26 | IDs were introduced to change a few controls programmatically, for | |
27 | example to mute a device during a channel switch.</para> | |
28 | ||
29 | <para>Drivers may enumerate different controls after switching | |
30 | the current video input or output, tuner or modulator, or audio input | |
31 | or output. Different in the sense of other bounds, another default and | |
32 | current value, step size or other menu items. A control with a certain | |
33 | <emphasis>custom</emphasis> ID can also change name and | |
34 | type.<footnote> | |
35 | <para>It will be more convenient for applications if drivers | |
36 | make use of the <constant>V4L2_CTRL_FLAG_DISABLED</constant> flag, but | |
37 | that was never required.</para> | |
38 | </footnote> Control values are stored globally, they do not | |
39 | change when switching except to stay within the reported bounds. They | |
40 | also do not change ⪚ when the device is opened or closed, when the | |
41 | tuner radio frequency is changed or generally never without | |
42 | application request. Since V4L2 specifies no event mechanism, panel | |
43 | applications intended to cooperate with other panel applications (be | |
44 | they built into a larger application, as a TV viewer) may need to | |
45 | regularly poll control values to update their user | |
46 | interface.<footnote> | |
47 | <para>Applications could call an ioctl to request events. | |
48 | After another process called &VIDIOC-S-CTRL; or another ioctl changing | |
49 | shared properties the &func-select; function would indicate | |
50 | readability until any ioctl (querying the properties) is | |
51 | called.</para> | |
52 | </footnote></para> | |
53 | ||
54 | <table pgwide="1" frame="none" id="control-id"> | |
55 | <title>Control IDs</title> | |
56 | <tgroup cols="3"> | |
57 | &cs-def; | |
58 | <thead> | |
59 | <row> | |
60 | <entry>ID</entry> | |
61 | <entry>Type</entry> | |
62 | <entry>Description</entry> | |
63 | </row> | |
64 | </thead> | |
65 | <tbody valign="top"> | |
66 | <row> | |
67 | <entry><constant>V4L2_CID_BASE</constant></entry> | |
68 | <entry></entry> | |
69 | <entry>First predefined ID, equal to | |
70 | <constant>V4L2_CID_BRIGHTNESS</constant>.</entry> | |
71 | </row> | |
72 | <row> | |
73 | <entry><constant>V4L2_CID_USER_BASE</constant></entry> | |
74 | <entry></entry> | |
75 | <entry>Synonym of <constant>V4L2_CID_BASE</constant>.</entry> | |
76 | </row> | |
77 | <row> | |
78 | <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry> | |
79 | <entry>integer</entry> | |
80 | <entry>Picture brightness, or more precisely, the black | |
81 | level.</entry> | |
82 | </row> | |
83 | <row> | |
84 | <entry><constant>V4L2_CID_CONTRAST</constant></entry> | |
85 | <entry>integer</entry> | |
86 | <entry>Picture contrast or luma gain.</entry> | |
87 | </row> | |
88 | <row> | |
89 | <entry><constant>V4L2_CID_SATURATION</constant></entry> | |
90 | <entry>integer</entry> | |
91 | <entry>Picture color saturation or chroma gain.</entry> | |
92 | </row> | |
93 | <row> | |
94 | <entry><constant>V4L2_CID_HUE</constant></entry> | |
95 | <entry>integer</entry> | |
96 | <entry>Hue or color balance.</entry> | |
97 | </row> | |
98 | <row> | |
99 | <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry> | |
100 | <entry>integer</entry> | |
101 | <entry>Overall audio volume. Note some drivers also | |
102 | provide an OSS or ALSA mixer interface.</entry> | |
103 | </row> | |
104 | <row> | |
105 | <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry> | |
106 | <entry>integer</entry> | |
107 | <entry>Audio stereo balance. Minimum corresponds to all | |
108 | the way left, maximum to right.</entry> | |
109 | </row> | |
110 | <row> | |
111 | <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry> | |
112 | <entry>integer</entry> | |
113 | <entry>Audio bass adjustment.</entry> | |
114 | </row> | |
115 | <row> | |
116 | <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry> | |
117 | <entry>integer</entry> | |
118 | <entry>Audio treble adjustment.</entry> | |
119 | </row> | |
120 | <row> | |
121 | <entry><constant>V4L2_CID_AUDIO_MUTE</constant></entry> | |
122 | <entry>boolean</entry> | |
123 | <entry>Mute audio, &ie; set the volume to zero, however | |
124 | without affecting <constant>V4L2_CID_AUDIO_VOLUME</constant>. Like | |
125 | ALSA drivers, V4L2 drivers must mute at load time to avoid excessive | |
126 | noise. Actually the entire device should be reset to a low power | |
127 | consumption state.</entry> | |
128 | </row> | |
129 | <row> | |
130 | <entry><constant>V4L2_CID_AUDIO_LOUDNESS</constant></entry> | |
131 | <entry>boolean</entry> | |
132 | <entry>Loudness mode (bass boost).</entry> | |
133 | </row> | |
134 | <row> | |
135 | <entry><constant>V4L2_CID_BLACK_LEVEL</constant></entry> | |
136 | <entry>integer</entry> | |
137 | <entry>Another name for brightness (not a synonym of | |
138 | <constant>V4L2_CID_BRIGHTNESS</constant>). This control is deprecated | |
139 | and should not be used in new drivers and applications.</entry> | |
140 | </row> | |
141 | <row> | |
142 | <entry><constant>V4L2_CID_AUTO_WHITE_BALANCE</constant></entry> | |
143 | <entry>boolean</entry> | |
144 | <entry>Automatic white balance (cameras).</entry> | |
145 | </row> | |
146 | <row> | |
147 | <entry><constant>V4L2_CID_DO_WHITE_BALANCE</constant></entry> | |
148 | <entry>button</entry> | |
149 | <entry>This is an action control. When set (the value is | |
150 | ignored), the device will do a white balance and then hold the current | |
151 | setting. Contrast this with the boolean | |
152 | <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant>, which, when | |
153 | activated, keeps adjusting the white balance.</entry> | |
154 | </row> | |
155 | <row> | |
156 | <entry><constant>V4L2_CID_RED_BALANCE</constant></entry> | |
157 | <entry>integer</entry> | |
158 | <entry>Red chroma balance.</entry> | |
159 | </row> | |
160 | <row> | |
161 | <entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry> | |
162 | <entry>integer</entry> | |
163 | <entry>Blue chroma balance.</entry> | |
164 | </row> | |
165 | <row> | |
166 | <entry><constant>V4L2_CID_GAMMA</constant></entry> | |
167 | <entry>integer</entry> | |
168 | <entry>Gamma adjust.</entry> | |
169 | </row> | |
170 | <row> | |
171 | <entry><constant>V4L2_CID_WHITENESS</constant></entry> | |
172 | <entry>integer</entry> | |
173 | <entry>Whiteness for grey-scale devices. This is a synonym | |
174 | for <constant>V4L2_CID_GAMMA</constant>. This control is deprecated | |
175 | and should not be used in new drivers and applications.</entry> | |
176 | </row> | |
177 | <row> | |
178 | <entry><constant>V4L2_CID_EXPOSURE</constant></entry> | |
179 | <entry>integer</entry> | |
180 | <entry>Exposure (cameras). [Unit?]</entry> | |
181 | </row> | |
182 | <row> | |
183 | <entry><constant>V4L2_CID_AUTOGAIN</constant></entry> | |
184 | <entry>boolean</entry> | |
185 | <entry>Automatic gain/exposure control.</entry> | |
186 | </row> | |
187 | <row> | |
188 | <entry><constant>V4L2_CID_GAIN</constant></entry> | |
189 | <entry>integer</entry> | |
190 | <entry>Gain control.</entry> | |
191 | </row> | |
192 | <row> | |
193 | <entry><constant>V4L2_CID_HFLIP</constant></entry> | |
194 | <entry>boolean</entry> | |
195 | <entry>Mirror the picture horizontally.</entry> | |
196 | </row> | |
197 | <row> | |
198 | <entry><constant>V4L2_CID_VFLIP</constant></entry> | |
199 | <entry>boolean</entry> | |
200 | <entry>Mirror the picture vertically.</entry> | |
201 | </row> | |
202 | <row> | |
203 | <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry> | |
204 | <entry>integer</entry> | |
205 | <entry>Horizontal image centering. This control is | |
206 | deprecated. New drivers and applications should use the <link | |
207 | linkend="camera-controls">Camera class controls</link> | |
208 | <constant>V4L2_CID_PAN_ABSOLUTE</constant>, | |
209 | <constant>V4L2_CID_PAN_RELATIVE</constant> and | |
210 | <constant>V4L2_CID_PAN_RESET</constant> instead.</entry> | |
211 | </row> | |
212 | <row> | |
213 | <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant> | |
214 | (formerly <constant>V4L2_CID_VCENTER</constant>)</entry> | |
215 | <entry>integer</entry> | |
216 | <entry>Vertical image centering. Centering is intended to | |
217 | <emphasis>physically</emphasis> adjust cameras. For image cropping see | |
218 | <xref linkend="crop" />, for clipping <xref linkend="overlay" />. This | |
219 | control is deprecated. New drivers and applications should use the | |
220 | <link linkend="camera-controls">Camera class controls</link> | |
221 | <constant>V4L2_CID_TILT_ABSOLUTE</constant>, | |
222 | <constant>V4L2_CID_TILT_RELATIVE</constant> and | |
223 | <constant>V4L2_CID_TILT_RESET</constant> instead.</entry> | |
224 | </row> | |
225 | <row id="v4l2-power-line-frequency"> | |
226 | <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry> | |
227 | <entry>enum</entry> | |
228 | <entry>Enables a power line frequency filter to avoid | |
229 | flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are: | |
230 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0), | |
231 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and | |
232 | <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry> | |
233 | </row> | |
234 | <row> | |
235 | <entry><constant>V4L2_CID_HUE_AUTO</constant></entry> | |
236 | <entry>boolean</entry> | |
237 | <entry>Enables automatic hue control by the device. The | |
238 | effect of setting <constant>V4L2_CID_HUE</constant> while automatic | |
239 | hue control is enabled is undefined, drivers should ignore such | |
240 | request.</entry> | |
241 | </row> | |
242 | <row> | |
243 | <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry> | |
244 | <entry>integer</entry> | |
245 | <entry>This control specifies the white balance settings | |
246 | as a color temperature in Kelvin. A driver should have a minimum of | |
247 | 2800 (incandescent) to 6500 (daylight). For more information about | |
248 | color temperature see <ulink | |
249 | url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry> | |
250 | </row> | |
251 | <row> | |
252 | <entry><constant>V4L2_CID_SHARPNESS</constant></entry> | |
253 | <entry>integer</entry> | |
254 | <entry>Adjusts the sharpness filters in a camera. The | |
255 | minimum value disables the filters, higher values give a sharper | |
256 | picture.</entry> | |
257 | </row> | |
258 | <row> | |
259 | <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry> | |
260 | <entry>integer</entry> | |
261 | <entry>Adjusts the backlight compensation in a camera. The | |
262 | minimum value disables backlight compensation.</entry> | |
263 | </row> | |
264 | <row> | |
265 | <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry> | |
266 | <entry>boolean</entry> | |
267 | <entry>Chroma automatic gain control.</entry> | |
268 | </row> | |
7a01f6db DH |
269 | <row> |
270 | <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry> | |
271 | <entry>integer</entry> | |
272 | <entry>Adjusts the Chroma gain control (for use when chroma AGC | |
273 | is disabled).</entry> | |
274 | </row> | |
8e080c2e MCC |
275 | <row> |
276 | <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry> | |
277 | <entry>boolean</entry> | |
278 | <entry>Enable the color killer (&ie; force a black & white image in case of a weak video signal).</entry> | |
279 | </row> | |
280 | <row id="v4l2-colorfx"> | |
281 | <entry><constant>V4L2_CID_COLORFX</constant></entry> | |
282 | <entry>enum</entry> | |
283 | <entry>Selects a color effect. Possible values for | |
284 | <constant>enum v4l2_colorfx</constant> are: | |
285 | <constant>V4L2_COLORFX_NONE</constant> (0), | |
286 | <constant>V4L2_COLORFX_BW</constant> (1) and | |
287 | <constant>V4L2_COLORFX_SEPIA</constant> (2).</entry> | |
288 | </row> | |
bd977801 VH |
289 | <row> |
290 | <entry><constant>V4L2_CID_ROTATE</constant></entry> | |
291 | <entry>integer</entry> | |
292 | <entry>Rotates the image by specified angle. Common angles are 90, | |
293 | 270 and 180. Rotating the image to 90 and 270 will reverse the height | |
294 | and width of the display window. It is necessary to set the new height and | |
295 | width of the picture using the &VIDIOC-S-FMT; ioctl according to | |
296 | the rotation angle selected.</entry> | |
297 | </row> | |
298 | <row> | |
299 | <entry><constant>V4L2_CID_BG_COLOR</constant></entry> | |
300 | <entry>integer</entry> | |
301 | <entry>Sets the background color on the current output device. | |
302 | Background color needs to be specified in the RGB24 format. The | |
303 | supplied 32 bit value is interpreted as bits 0-7 Red color information, | |
304 | bits 8-15 Green color information, bits 16-23 Blue color | |
305 | information and bits 24-31 must be zero.</entry> | |
306 | </row> | |
8e080c2e MCC |
307 | <row> |
308 | <entry><constant>V4L2_CID_LASTP1</constant></entry> | |
309 | <entry></entry> | |
310 | <entry>End of the predefined control IDs (currently | |
bd977801 | 311 | <constant>V4L2_CID_BG_COLOR</constant> + 1).</entry> |
8e080c2e MCC |
312 | </row> |
313 | <row> | |
314 | <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry> | |
315 | <entry></entry> | |
316 | <entry>ID of the first custom (driver specific) control. | |
317 | Applications depending on particular custom controls should check the | |
318 | driver name and version, see <xref linkend="querycap" />.</entry> | |
319 | </row> | |
320 | </tbody> | |
321 | </tgroup> | |
322 | </table> | |
323 | ||
324 | <para>Applications can enumerate the available controls with the | |
325 | &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a | |
326 | control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls. | |
327 | Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>, | |
328 | <constant>VIDIOC_G_CTRL</constant> and | |
329 | <constant>VIDIOC_S_CTRL</constant> when the device has one or more | |
330 | controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or | |
331 | more menu type controls.</para> | |
332 | ||
333 | <example> | |
334 | <title>Enumerating all controls</title> | |
335 | ||
336 | <programlisting> | |
337 | &v4l2-queryctrl; queryctrl; | |
338 | &v4l2-querymenu; querymenu; | |
339 | ||
340 | static void | |
341 | enumerate_menu (void) | |
342 | { | |
343 | printf (" Menu items:\n"); | |
344 | ||
345 | memset (&querymenu, 0, sizeof (querymenu)); | |
346 | querymenu.id = queryctrl.id; | |
347 | ||
348 | for (querymenu.index = queryctrl.minimum; | |
349 | querymenu.index <= queryctrl.maximum; | |
350 | querymenu.index++) { | |
351 | if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &querymenu)) { | |
352 | printf (" %s\n", querymenu.name); | |
353 | } else { | |
354 | perror ("VIDIOC_QUERYMENU"); | |
355 | exit (EXIT_FAILURE); | |
356 | } | |
357 | } | |
358 | } | |
359 | ||
360 | memset (&queryctrl, 0, sizeof (queryctrl)); | |
361 | ||
362 | for (queryctrl.id = V4L2_CID_BASE; | |
363 | queryctrl.id < V4L2_CID_LASTP1; | |
364 | queryctrl.id++) { | |
365 | if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) { | |
366 | if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) | |
367 | continue; | |
368 | ||
369 | printf ("Control %s\n", queryctrl.name); | |
370 | ||
371 | if (queryctrl.type == V4L2_CTRL_TYPE_MENU) | |
372 | enumerate_menu (); | |
373 | } else { | |
374 | if (errno == EINVAL) | |
375 | continue; | |
376 | ||
377 | perror ("VIDIOC_QUERYCTRL"); | |
378 | exit (EXIT_FAILURE); | |
379 | } | |
380 | } | |
381 | ||
382 | for (queryctrl.id = V4L2_CID_PRIVATE_BASE;; | |
383 | queryctrl.id++) { | |
384 | if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) { | |
385 | if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) | |
386 | continue; | |
387 | ||
388 | printf ("Control %s\n", queryctrl.name); | |
389 | ||
390 | if (queryctrl.type == V4L2_CTRL_TYPE_MENU) | |
391 | enumerate_menu (); | |
392 | } else { | |
393 | if (errno == EINVAL) | |
394 | break; | |
395 | ||
396 | perror ("VIDIOC_QUERYCTRL"); | |
397 | exit (EXIT_FAILURE); | |
398 | } | |
399 | } | |
400 | </programlisting> | |
401 | </example> | |
402 | ||
403 | <example> | |
404 | <title>Changing controls</title> | |
405 | ||
406 | <programlisting> | |
407 | &v4l2-queryctrl; queryctrl; | |
408 | &v4l2-control; control; | |
409 | ||
410 | memset (&queryctrl, 0, sizeof (queryctrl)); | |
411 | queryctrl.id = V4L2_CID_BRIGHTNESS; | |
412 | ||
413 | if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) { | |
414 | if (errno != EINVAL) { | |
415 | perror ("VIDIOC_QUERYCTRL"); | |
416 | exit (EXIT_FAILURE); | |
417 | } else { | |
418 | printf ("V4L2_CID_BRIGHTNESS is not supported\n"); | |
419 | } | |
420 | } else if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) { | |
421 | printf ("V4L2_CID_BRIGHTNESS is not supported\n"); | |
422 | } else { | |
423 | memset (&control, 0, sizeof (control)); | |
424 | control.id = V4L2_CID_BRIGHTNESS; | |
425 | control.value = queryctrl.default_value; | |
426 | ||
427 | if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &control)) { | |
428 | perror ("VIDIOC_S_CTRL"); | |
429 | exit (EXIT_FAILURE); | |
430 | } | |
431 | } | |
432 | ||
433 | memset (&control, 0, sizeof (control)); | |
434 | control.id = V4L2_CID_CONTRAST; | |
435 | ||
436 | if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &control)) { | |
437 | control.value += 1; | |
438 | ||
439 | /* The driver may clamp the value or return ERANGE, ignored here */ | |
440 | ||
441 | if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &control) | |
442 | && errno != ERANGE) { | |
443 | perror ("VIDIOC_S_CTRL"); | |
444 | exit (EXIT_FAILURE); | |
445 | } | |
446 | /* Ignore if V4L2_CID_CONTRAST is unsupported */ | |
447 | } else if (errno != EINVAL) { | |
448 | perror ("VIDIOC_G_CTRL"); | |
449 | exit (EXIT_FAILURE); | |
450 | } | |
451 | ||
452 | control.id = V4L2_CID_AUDIO_MUTE; | |
453 | control.value = TRUE; /* silence */ | |
454 | ||
455 | /* Errors ignored */ | |
456 | ioctl (fd, VIDIOC_S_CTRL, &control); | |
457 | </programlisting> | |
458 | </example> | |
459 | </section> | |
460 | ||
461 | <section id="extended-controls"> | |
462 | <title>Extended Controls</title> | |
463 | ||
464 | <section> | |
465 | <title>Introduction</title> | |
466 | ||
467 | <para>The control mechanism as originally designed was meant | |
468 | to be used for user settings (brightness, saturation, etc). However, | |
469 | it turned out to be a very useful model for implementing more | |
470 | complicated driver APIs where each driver implements only a subset of | |
471 | a larger API.</para> | |
472 | ||
473 | <para>The MPEG encoding API was the driving force behind | |
474 | designing and implementing this extended control mechanism: the MPEG | |
475 | standard is quite large and the currently supported hardware MPEG | |
476 | encoders each only implement a subset of this standard. Further more, | |
477 | many parameters relating to how the video is encoded into an MPEG | |
478 | stream are specific to the MPEG encoding chip since the MPEG standard | |
479 | only defines the format of the resulting MPEG stream, not how the | |
480 | video is actually encoded into that format.</para> | |
481 | ||
482 | <para>Unfortunately, the original control API lacked some | |
483 | features needed for these new uses and so it was extended into the | |
484 | (not terribly originally named) extended control API.</para> | |
485 | ||
486 | <para>Even though the MPEG encoding API was the first effort | |
487 | to use the Extended Control API, nowadays there are also other classes | |
488 | of Extended Controls, such as Camera Controls and FM Transmitter Controls. | |
489 | The Extended Controls API as well as all Extended Controls classes are | |
490 | described in the following text.</para> | |
491 | </section> | |
492 | ||
493 | <section> | |
494 | <title>The Extended Control API</title> | |
495 | ||
496 | <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;, | |
497 | &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on | |
498 | arrays of controls (as opposed to the &VIDIOC-G-CTRL; and | |
499 | &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed | |
500 | since it is often required to atomically change several controls at | |
501 | once.</para> | |
502 | ||
503 | <para>Each of the new ioctls expects a pointer to a | |
504 | &v4l2-ext-controls;. This structure contains a pointer to the control | |
505 | array, a count of the number of controls in that array and a control | |
506 | class. Control classes are used to group similar controls into a | |
507 | single class. For example, control class | |
508 | <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls | |
509 | (&ie; all controls that can also be set using the old | |
510 | <constant>VIDIOC_S_CTRL</constant> ioctl). Control class | |
511 | <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls | |
512 | relating to MPEG encoding, etc.</para> | |
513 | ||
514 | <para>All controls in the control array must belong to the | |
515 | specified control class. An error is returned if this is not the | |
516 | case.</para> | |
517 | ||
518 | <para>It is also possible to use an empty control array (count | |
519 | == 0) to check whether the specified control class is | |
520 | supported.</para> | |
521 | ||
522 | <para>The control array is a &v4l2-ext-control; array. The | |
523 | <structname>v4l2_ext_control</structname> structure is very similar to | |
524 | &v4l2-control;, except for the fact that it also allows for 64-bit | |
525 | values and pointers to be passed.</para> | |
526 | ||
527 | <para>It is important to realize that due to the flexibility of | |
528 | controls it is necessary to check whether the control you want to set | |
529 | actually is supported in the driver and what the valid range of values | |
530 | is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to | |
531 | check this. Also note that it is possible that some of the menu | |
532 | indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant> | |
533 | may not be supported (<constant>VIDIOC_QUERYMENU</constant> will | |
534 | return an error). A good example is the list of supported MPEG audio | |
535 | bitrates. Some drivers only support one or two bitrates, others | |
536 | support a wider range.</para> | |
537 | </section> | |
538 | ||
539 | <section> | |
540 | <title>Enumerating Extended Controls</title> | |
541 | ||
542 | <para>The recommended way to enumerate over the extended | |
543 | controls is by using &VIDIOC-QUERYCTRL; in combination with the | |
544 | <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para> | |
545 | ||
546 | <informalexample> | |
547 | <programlisting> | |
548 | &v4l2-queryctrl; qctrl; | |
549 | ||
550 | qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; | |
551 | while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &qctrl)) { | |
552 | /* ... */ | |
553 | qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL; | |
554 | } | |
555 | </programlisting> | |
556 | </informalexample> | |
557 | ||
558 | <para>The initial control ID is set to 0 ORed with the | |
559 | <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The | |
560 | <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first | |
561 | control with a higher ID than the specified one. When no such controls | |
562 | are found an error is returned.</para> | |
563 | ||
564 | <para>If you want to get all controls within a specific control | |
565 | class, then you can set the initial | |
566 | <structfield>qctrl.id</structfield> value to the control class and add | |
567 | an extra check to break out of the loop when a control of another | |
568 | control class is found:</para> | |
569 | ||
570 | <informalexample> | |
571 | <programlisting> | |
572 | qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL; | |
573 | while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &qctrl)) { | |
574 | if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG) | |
575 | break; | |
576 | /* ... */ | |
577 | qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL; | |
578 | } | |
579 | </programlisting> | |
580 | </informalexample> | |
581 | ||
582 | <para>The 32-bit <structfield>qctrl.id</structfield> value is | |
583 | subdivided into three bit ranges: the top 4 bits are reserved for | |
584 | flags (⪚ <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not | |
585 | actually part of the ID. The remaining 28 bits form the control ID, of | |
586 | which the most significant 12 bits define the control class and the | |
587 | least significant 16 bits identify the control within the control | |
588 | class. It is guaranteed that these last 16 bits are always non-zero | |
589 | for controls. The range of 0x1000 and up are reserved for | |
590 | driver-specific controls. The macro | |
591 | <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class | |
592 | ID based on a control ID.</para> | |
593 | ||
594 | <para>If the driver does not support extended controls, then | |
595 | <constant>VIDIOC_QUERYCTRL</constant> will fail when used in | |
596 | combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In | |
597 | that case the old method of enumerating control should be used (see | |
598 | 1.8). But if it is supported, then it is guaranteed to enumerate over | |
599 | all controls, including driver-private controls.</para> | |
600 | </section> | |
601 | ||
602 | <section> | |
603 | <title>Creating Control Panels</title> | |
604 | ||
605 | <para>It is possible to create control panels for a graphical | |
606 | user interface where the user can select the various controls. | |
607 | Basically you will have to iterate over all controls using the method | |
608 | described above. Each control class starts with a control of type | |
609 | <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>. | |
610 | <constant>VIDIOC_QUERYCTRL</constant> will return the name of this | |
611 | control class which can be used as the title of a tab page within a | |
612 | control panel.</para> | |
613 | ||
614 | <para>The flags field of &v4l2-queryctrl; also contains hints on | |
615 | the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation | |
616 | for more details.</para> | |
617 | </section> | |
618 | ||
619 | <section id="mpeg-controls"> | |
620 | <title>MPEG Control Reference</title> | |
621 | ||
622 | <para>Below all controls within the MPEG control class are | |
623 | described. First the generic controls, then controls specific for | |
624 | certain hardware.</para> | |
625 | ||
626 | <section> | |
627 | <title>Generic MPEG Controls</title> | |
628 | ||
629 | <table pgwide="1" frame="none" id="mpeg-control-id"> | |
630 | <title>MPEG Control IDs</title> | |
631 | <tgroup cols="4"> | |
632 | <colspec colname="c1" colwidth="1*" /> | |
633 | <colspec colname="c2" colwidth="6*" /> | |
634 | <colspec colname="c3" colwidth="2*" /> | |
635 | <colspec colname="c4" colwidth="6*" /> | |
636 | <spanspec namest="c1" nameend="c2" spanname="id" /> | |
637 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | |
638 | <thead> | |
639 | <row> | |
640 | <entry spanname="id" align="left">ID</entry> | |
641 | <entry align="left">Type</entry> | |
642 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | |
643 | </row> | |
644 | </thead> | |
645 | <tbody valign="top"> | |
646 | <row><entry></entry></row> | |
647 | <row> | |
648 | <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant> </entry> | |
649 | <entry>class</entry> | |
650 | </row><row><entry spanname="descr">The MPEG class | |
651 | descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a | |
652 | description of this control class. This description can be used as the | |
653 | caption of a Tab page in a GUI, for example.</entry> | |
654 | </row> | |
655 | <row><entry></entry></row> | |
656 | <row id="v4l2-mpeg-stream-type"> | |
657 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant> </entry> | |
658 | <entry>enum v4l2_mpeg_stream_type</entry> | |
659 | </row><row><entry spanname="descr">The MPEG-1, -2 or -4 | |
660 | output stream type. One cannot assume anything here. Each hardware | |
661 | MPEG encoder tends to support different subsets of the available MPEG | |
662 | stream types. The currently defined stream types are:</entry> | |
663 | </row> | |
664 | <row> | |
665 | <entrytbl spanname="descr" cols="2"> | |
666 | <tbody valign="top"> | |
667 | <row> | |
668 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant> </entry> | |
669 | <entry>MPEG-2 program stream</entry> | |
670 | </row> | |
671 | <row> | |
672 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant> </entry> | |
673 | <entry>MPEG-2 transport stream</entry> | |
674 | </row> | |
675 | <row> | |
676 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant> </entry> | |
677 | <entry>MPEG-1 system stream</entry> | |
678 | </row> | |
679 | <row> | |
680 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant> </entry> | |
681 | <entry>MPEG-2 DVD-compatible stream</entry> | |
682 | </row> | |
683 | <row> | |
684 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant> </entry> | |
685 | <entry>MPEG-1 VCD-compatible stream</entry> | |
686 | </row> | |
687 | <row> | |
688 | <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant> </entry> | |
689 | <entry>MPEG-2 SVCD-compatible stream</entry> | |
690 | </row> | |
691 | </tbody> | |
692 | </entrytbl> | |
693 | </row> | |
694 | <row><entry></entry></row> | |
695 | <row> | |
696 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant> </entry> | |
697 | <entry>integer</entry> | |
698 | </row><row><entry spanname="descr">Program Map Table | |
699 | Packet ID for the MPEG transport stream (default 16)</entry> | |
700 | </row> | |
701 | <row><entry></entry></row> | |
702 | <row> | |
703 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant> </entry> | |
704 | <entry>integer</entry> | |
705 | </row><row><entry spanname="descr">Audio Packet ID for | |
706 | the MPEG transport stream (default 256)</entry> | |
707 | </row> | |
708 | <row><entry></entry></row> | |
709 | <row> | |
710 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant> </entry> | |
711 | <entry>integer</entry> | |
712 | </row><row><entry spanname="descr">Video Packet ID for | |
713 | the MPEG transport stream (default 260)</entry> | |
714 | </row> | |
715 | <row><entry></entry></row> | |
716 | <row> | |
717 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant> </entry> | |
718 | <entry>integer</entry> | |
719 | </row><row><entry spanname="descr">Packet ID for the | |
720 | MPEG transport stream carrying PCR fields (default 259)</entry> | |
721 | </row> | |
722 | <row><entry></entry></row> | |
723 | <row> | |
724 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant> </entry> | |
725 | <entry>integer</entry> | |
726 | </row><row><entry spanname="descr">Audio ID for MPEG | |
727 | PES</entry> | |
728 | </row> | |
729 | <row><entry></entry></row> | |
730 | <row> | |
731 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant> </entry> | |
732 | <entry>integer</entry> | |
733 | </row><row><entry spanname="descr">Video ID for MPEG | |
734 | PES</entry> | |
735 | </row> | |
736 | <row><entry></entry></row> | |
737 | <row id="v4l2-mpeg-stream-vbi-fmt"> | |
738 | <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant> </entry> | |
739 | <entry>enum v4l2_mpeg_stream_vbi_fmt</entry> | |
740 | </row><row><entry spanname="descr">Some cards can embed | |
741 | VBI data (⪚ Closed Caption, Teletext) into the MPEG stream. This | |
742 | control selects whether VBI data should be embedded, and if so, what | |
743 | embedding method should be used. The list of possible VBI formats | |
744 | depends on the driver. The currently defined VBI format types | |
745 | are:</entry> | |
746 | </row> | |
747 | <row> | |
748 | <entrytbl spanname="descr" cols="2"> | |
749 | <tbody valign="top"> | |
750 | <row> | |
751 | <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant> </entry> | |
752 | <entry>No VBI in the MPEG stream</entry> | |
753 | </row> | |
754 | <row> | |
755 | <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant> </entry> | |
756 | <entry>VBI in private packets, IVTV format (documented | |
757 | in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry> | |
758 | </row> | |
759 | </tbody> | |
760 | </entrytbl> | |
761 | </row> | |
762 | <row><entry></entry></row> | |
763 | <row id="v4l2-mpeg-audio-sampling-freq"> | |
764 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant> </entry> | |
765 | <entry>enum v4l2_mpeg_audio_sampling_freq</entry> | |
766 | </row><row><entry spanname="descr">MPEG Audio sampling | |
767 | frequency. Possible values are:</entry> | |
768 | </row> | |
769 | <row> | |
770 | <entrytbl spanname="descr" cols="2"> | |
771 | <tbody valign="top"> | |
772 | <row> | |
773 | <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant> </entry> | |
774 | <entry>44.1 kHz</entry> | |
775 | </row> | |
776 | <row> | |
777 | <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant> </entry> | |
778 | <entry>48 kHz</entry> | |
779 | </row> | |
780 | <row> | |
781 | <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant> </entry> | |
782 | <entry>32 kHz</entry> | |
783 | </row> | |
784 | </tbody> | |
785 | </entrytbl> | |
786 | </row> | |
787 | <row><entry></entry></row> | |
788 | <row id="v4l2-mpeg-audio-encoding"> | |
789 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant> </entry> | |
790 | <entry>enum v4l2_mpeg_audio_encoding</entry> | |
791 | </row><row><entry spanname="descr">MPEG Audio encoding. | |
792 | Possible values are:</entry> | |
793 | </row> | |
794 | <row> | |
795 | <entrytbl spanname="descr" cols="2"> | |
796 | <tbody valign="top"> | |
797 | <row> | |
798 | <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant> </entry> | |
799 | <entry>MPEG-1/2 Layer I encoding</entry> | |
800 | </row> | |
801 | <row> | |
802 | <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant> </entry> | |
803 | <entry>MPEG-1/2 Layer II encoding</entry> | |
804 | </row> | |
805 | <row> | |
806 | <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant> </entry> | |
807 | <entry>MPEG-1/2 Layer III encoding</entry> | |
808 | </row> | |
809 | <row> | |
810 | <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant> </entry> | |
811 | <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry> | |
812 | </row> | |
813 | <row> | |
814 | <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant> </entry> | |
815 | <entry>AC-3 aka ATSC A/52 encoding</entry> | |
816 | </row> | |
817 | </tbody> | |
818 | </entrytbl> | |
819 | </row> | |
820 | <row><entry></entry></row> | |
821 | <row id="v4l2-mpeg-audio-l1-bitrate"> | |
822 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant> </entry> | |
823 | <entry>enum v4l2_mpeg_audio_l1_bitrate</entry> | |
824 | </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate. | |
825 | Possible values are:</entry> | |
826 | </row> | |
827 | <row> | |
828 | <entrytbl spanname="descr" cols="2"> | |
829 | <tbody valign="top"> | |
830 | <row> | |
831 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant> </entry> | |
832 | <entry>32 kbit/s</entry></row> | |
833 | <row> | |
834 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant> </entry> | |
835 | <entry>64 kbit/s</entry> | |
836 | </row> | |
837 | <row> | |
838 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant> </entry> | |
839 | <entry>96 kbit/s</entry> | |
840 | </row> | |
841 | <row> | |
842 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant> </entry> | |
843 | <entry>128 kbit/s</entry> | |
844 | </row> | |
845 | <row> | |
846 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant> </entry> | |
847 | <entry>160 kbit/s</entry> | |
848 | </row> | |
849 | <row> | |
850 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant> </entry> | |
851 | <entry>192 kbit/s</entry> | |
852 | </row> | |
853 | <row> | |
854 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant> </entry> | |
855 | <entry>224 kbit/s</entry> | |
856 | </row> | |
857 | <row> | |
858 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant> </entry> | |
859 | <entry>256 kbit/s</entry> | |
860 | </row> | |
861 | <row> | |
862 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant> </entry> | |
863 | <entry>288 kbit/s</entry> | |
864 | </row> | |
865 | <row> | |
866 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant> </entry> | |
867 | <entry>320 kbit/s</entry> | |
868 | </row> | |
869 | <row> | |
870 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant> </entry> | |
871 | <entry>352 kbit/s</entry> | |
872 | </row> | |
873 | <row> | |
874 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant> </entry> | |
875 | <entry>384 kbit/s</entry> | |
876 | </row> | |
877 | <row> | |
878 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant> </entry> | |
879 | <entry>416 kbit/s</entry> | |
880 | </row> | |
881 | <row> | |
882 | <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant> </entry> | |
883 | <entry>448 kbit/s</entry> | |
884 | </row> | |
885 | </tbody> | |
886 | </entrytbl> | |
887 | </row> | |
888 | <row><entry></entry></row> | |
889 | <row id="v4l2-mpeg-audio-l2-bitrate"> | |
890 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant> </entry> | |
891 | <entry>enum v4l2_mpeg_audio_l2_bitrate</entry> | |
892 | </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate. | |
893 | Possible values are:</entry> | |
894 | </row> | |
895 | <row> | |
896 | <entrytbl spanname="descr" cols="2"> | |
897 | <tbody valign="top"> | |
898 | <row> | |
899 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant> </entry> | |
900 | <entry>32 kbit/s</entry> | |
901 | </row> | |
902 | <row> | |
903 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant> </entry> | |
904 | <entry>48 kbit/s</entry> | |
905 | </row> | |
906 | <row> | |
907 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant> </entry> | |
908 | <entry>56 kbit/s</entry> | |
909 | </row> | |
910 | <row> | |
911 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant> </entry> | |
912 | <entry>64 kbit/s</entry> | |
913 | </row> | |
914 | <row> | |
915 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant> </entry> | |
916 | <entry>80 kbit/s</entry> | |
917 | </row> | |
918 | <row> | |
919 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant> </entry> | |
920 | <entry>96 kbit/s</entry> | |
921 | </row> | |
922 | <row> | |
923 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant> </entry> | |
924 | <entry>112 kbit/s</entry> | |
925 | </row> | |
926 | <row> | |
927 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant> </entry> | |
928 | <entry>128 kbit/s</entry> | |
929 | </row> | |
930 | <row> | |
931 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant> </entry> | |
932 | <entry>160 kbit/s</entry> | |
933 | </row> | |
934 | <row> | |
935 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant> </entry> | |
936 | <entry>192 kbit/s</entry> | |
937 | </row> | |
938 | <row> | |
939 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant> </entry> | |
940 | <entry>224 kbit/s</entry> | |
941 | </row> | |
942 | <row> | |
943 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant> </entry> | |
944 | <entry>256 kbit/s</entry> | |
945 | </row> | |
946 | <row> | |
947 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant> </entry> | |
948 | <entry>320 kbit/s</entry> | |
949 | </row> | |
950 | <row> | |
951 | <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant> </entry> | |
952 | <entry>384 kbit/s</entry> | |
953 | </row> | |
954 | </tbody> | |
955 | </entrytbl> | |
956 | </row> | |
957 | <row><entry></entry></row> | |
958 | <row id="v4l2-mpeg-audio-l3-bitrate"> | |
959 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant> </entry> | |
960 | <entry>enum v4l2_mpeg_audio_l3_bitrate</entry> | |
961 | </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate. | |
962 | Possible values are:</entry> | |
963 | </row> | |
964 | <row> | |
965 | <entrytbl spanname="descr" cols="2"> | |
966 | <tbody valign="top"> | |
967 | <row> | |
968 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant> </entry> | |
969 | <entry>32 kbit/s</entry> | |
970 | </row> | |
971 | <row> | |
972 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant> </entry> | |
973 | <entry>40 kbit/s</entry> | |
974 | </row> | |
975 | <row> | |
976 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant> </entry> | |
977 | <entry>48 kbit/s</entry> | |
978 | </row> | |
979 | <row> | |
980 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant> </entry> | |
981 | <entry>56 kbit/s</entry> | |
982 | </row> | |
983 | <row> | |
984 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant> </entry> | |
985 | <entry>64 kbit/s</entry> | |
986 | </row> | |
987 | <row> | |
988 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant> </entry> | |
989 | <entry>80 kbit/s</entry> | |
990 | </row> | |
991 | <row> | |
992 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant> </entry> | |
993 | <entry>96 kbit/s</entry> | |
994 | </row> | |
995 | <row> | |
996 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant> </entry> | |
997 | <entry>112 kbit/s</entry> | |
998 | </row> | |
999 | <row> | |
1000 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant> </entry> | |
1001 | <entry>128 kbit/s</entry> | |
1002 | </row> | |
1003 | <row> | |
1004 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant> </entry> | |
1005 | <entry>160 kbit/s</entry> | |
1006 | </row> | |
1007 | <row> | |
1008 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant> </entry> | |
1009 | <entry>192 kbit/s</entry> | |
1010 | </row> | |
1011 | <row> | |
1012 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant> </entry> | |
1013 | <entry>224 kbit/s</entry> | |
1014 | </row> | |
1015 | <row> | |
1016 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant> </entry> | |
1017 | <entry>256 kbit/s</entry> | |
1018 | </row> | |
1019 | <row> | |
1020 | <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant> </entry> | |
1021 | <entry>320 kbit/s</entry> | |
1022 | </row> | |
1023 | </tbody> | |
1024 | </entrytbl> | |
1025 | </row> | |
1026 | <row><entry></entry></row> | |
1027 | <row> | |
1028 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant> </entry> | |
1029 | <entry>integer</entry> | |
1030 | </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry> | |
1031 | </row> | |
1032 | <row><entry></entry></row> | |
1033 | <row id="v4l2-mpeg-audio-ac3-bitrate"> | |
1034 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant> </entry> | |
1035 | <entry>enum v4l2_mpeg_audio_ac3_bitrate</entry> | |
1036 | </row><row><entry spanname="descr">AC-3 bitrate. | |
1037 | Possible values are:</entry> | |
1038 | </row> | |
1039 | <row> | |
1040 | <entrytbl spanname="descr" cols="2"> | |
1041 | <tbody valign="top"> | |
1042 | <row> | |
1043 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant> </entry> | |
1044 | <entry>32 kbit/s</entry> | |
1045 | </row> | |
1046 | <row> | |
1047 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant> </entry> | |
1048 | <entry>40 kbit/s</entry> | |
1049 | </row> | |
1050 | <row> | |
1051 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant> </entry> | |
1052 | <entry>48 kbit/s</entry> | |
1053 | </row> | |
1054 | <row> | |
1055 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant> </entry> | |
1056 | <entry>56 kbit/s</entry> | |
1057 | </row> | |
1058 | <row> | |
1059 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant> </entry> | |
1060 | <entry>64 kbit/s</entry> | |
1061 | </row> | |
1062 | <row> | |
1063 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant> </entry> | |
1064 | <entry>80 kbit/s</entry> | |
1065 | </row> | |
1066 | <row> | |
1067 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant> </entry> | |
1068 | <entry>96 kbit/s</entry> | |
1069 | </row> | |
1070 | <row> | |
1071 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant> </entry> | |
1072 | <entry>112 kbit/s</entry> | |
1073 | </row> | |
1074 | <row> | |
1075 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant> </entry> | |
1076 | <entry>128 kbit/s</entry> | |
1077 | </row> | |
1078 | <row> | |
1079 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant> </entry> | |
1080 | <entry>160 kbit/s</entry> | |
1081 | </row> | |
1082 | <row> | |
1083 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant> </entry> | |
1084 | <entry>192 kbit/s</entry> | |
1085 | </row> | |
1086 | <row> | |
1087 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant> </entry> | |
1088 | <entry>224 kbit/s</entry> | |
1089 | </row> | |
1090 | <row> | |
1091 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant> </entry> | |
1092 | <entry>256 kbit/s</entry> | |
1093 | </row> | |
1094 | <row> | |
1095 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant> </entry> | |
1096 | <entry>320 kbit/s</entry> | |
1097 | </row> | |
1098 | <row> | |
1099 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant> </entry> | |
1100 | <entry>384 kbit/s</entry> | |
1101 | </row> | |
1102 | <row> | |
1103 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant> </entry> | |
1104 | <entry>448 kbit/s</entry> | |
1105 | </row> | |
1106 | <row> | |
1107 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant> </entry> | |
1108 | <entry>512 kbit/s</entry> | |
1109 | </row> | |
1110 | <row> | |
1111 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant> </entry> | |
1112 | <entry>576 kbit/s</entry> | |
1113 | </row> | |
1114 | <row> | |
1115 | <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant> </entry> | |
1116 | <entry>640 kbit/s</entry> | |
1117 | </row> | |
1118 | </tbody> | |
1119 | </entrytbl> | |
1120 | </row> | |
1121 | <row><entry></entry></row> | |
1122 | <row id="v4l2-mpeg-audio-mode"> | |
1123 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant> </entry> | |
1124 | <entry>enum v4l2_mpeg_audio_mode</entry> | |
1125 | </row><row><entry spanname="descr">MPEG Audio mode. | |
1126 | Possible values are:</entry> | |
1127 | </row> | |
1128 | <row> | |
1129 | <entrytbl spanname="descr" cols="2"> | |
1130 | <tbody valign="top"> | |
1131 | <row> | |
1132 | <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant> </entry> | |
1133 | <entry>Stereo</entry> | |
1134 | </row> | |
1135 | <row> | |
1136 | <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant> </entry> | |
1137 | <entry>Joint Stereo</entry> | |
1138 | </row> | |
1139 | <row> | |
1140 | <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant> </entry> | |
1141 | <entry>Bilingual</entry> | |
1142 | </row> | |
1143 | <row> | |
1144 | <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant> </entry> | |
1145 | <entry>Mono</entry> | |
1146 | </row> | |
1147 | </tbody> | |
1148 | </entrytbl> | |
1149 | </row> | |
1150 | <row><entry></entry></row> | |
1151 | <row id="v4l2-mpeg-audio-mode-extension"> | |
1152 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant> </entry> | |
1153 | <entry>enum v4l2_mpeg_audio_mode_extension</entry> | |
1154 | </row><row><entry spanname="descr">Joint Stereo | |
1155 | audio mode extension. In Layer I and II they indicate which subbands | |
1156 | are in intensity stereo. All other subbands are coded in stereo. Layer | |
1157 | III is not (yet) supported. Possible values | |
1158 | are:</entry> | |
1159 | </row> | |
1160 | <row> | |
1161 | <entrytbl spanname="descr" cols="2"> | |
1162 | <tbody valign="top"> | |
1163 | <row> | |
1164 | <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant> </entry> | |
1165 | <entry>Subbands 4-31 in intensity stereo</entry> | |
1166 | </row> | |
1167 | <row> | |
1168 | <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant> </entry> | |
1169 | <entry>Subbands 8-31 in intensity stereo</entry> | |
1170 | </row> | |
1171 | <row> | |
1172 | <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant> </entry> | |
1173 | <entry>Subbands 12-31 in intensity stereo</entry> | |
1174 | </row> | |
1175 | <row> | |
1176 | <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant> </entry> | |
1177 | <entry>Subbands 16-31 in intensity stereo</entry> | |
1178 | </row> | |
1179 | </tbody> | |
1180 | </entrytbl> | |
1181 | </row> | |
1182 | <row><entry></entry></row> | |
1183 | <row id="v4l2-mpeg-audio-emphasis"> | |
1184 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant> </entry> | |
1185 | <entry>enum v4l2_mpeg_audio_emphasis</entry> | |
1186 | </row><row><entry spanname="descr">Audio Emphasis. | |
1187 | Possible values are:</entry> | |
1188 | </row> | |
1189 | <row> | |
1190 | <entrytbl spanname="descr" cols="2"> | |
1191 | <tbody valign="top"> | |
1192 | <row> | |
1193 | <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant> </entry> | |
1194 | <entry>None</entry> | |
1195 | </row> | |
1196 | <row> | |
1197 | <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant> </entry> | |
1198 | <entry>50/15 microsecond emphasis</entry> | |
1199 | </row> | |
1200 | <row> | |
1201 | <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant> </entry> | |
1202 | <entry>CCITT J.17</entry> | |
1203 | </row> | |
1204 | </tbody> | |
1205 | </entrytbl> | |
1206 | </row> | |
1207 | <row><entry></entry></row> | |
1208 | <row id="v4l2-mpeg-audio-crc"> | |
1209 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant> </entry> | |
1210 | <entry>enum v4l2_mpeg_audio_crc</entry> | |
1211 | </row><row><entry spanname="descr">CRC method. Possible | |
1212 | values are:</entry> | |
1213 | </row> | |
1214 | <row> | |
1215 | <entrytbl spanname="descr" cols="2"> | |
1216 | <tbody valign="top"> | |
1217 | <row> | |
1218 | <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant> </entry> | |
1219 | <entry>None</entry> | |
1220 | </row> | |
1221 | <row> | |
1222 | <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant> </entry> | |
1223 | <entry>16 bit parity check</entry> | |
1224 | </row> | |
1225 | </tbody> | |
1226 | </entrytbl> | |
1227 | </row> | |
1228 | <row><entry></entry></row> | |
1229 | <row> | |
1230 | <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant> </entry> | |
1231 | <entry>boolean</entry> | |
1232 | </row><row><entry spanname="descr">Mutes the audio when | |
1233 | capturing. This is not done by muting audio hardware, which can still | |
1234 | produce a slight hiss, but in the encoder itself, guaranteeing a fixed | |
1235 | and reproducable audio bitstream. 0 = unmuted, 1 = muted.</entry> | |
1236 | </row> | |
1237 | <row><entry></entry></row> | |
1238 | <row id="v4l2-mpeg-video-encoding"> | |
1239 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry> | |
1240 | <entry>enum v4l2_mpeg_video_encoding</entry> | |
1241 | </row><row><entry spanname="descr">MPEG Video encoding | |
1242 | method. Possible values are:</entry> | |
1243 | </row> | |
1244 | <row> | |
1245 | <entrytbl spanname="descr" cols="2"> | |
1246 | <tbody valign="top"> | |
1247 | <row> | |
1248 | <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant> </entry> | |
1249 | <entry>MPEG-1 Video encoding</entry> | |
1250 | </row> | |
1251 | <row> | |
1252 | <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant> </entry> | |
1253 | <entry>MPEG-2 Video encoding</entry> | |
1254 | </row> | |
1255 | <row> | |
1256 | <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant> </entry> | |
1257 | <entry>MPEG-4 AVC (H.264) Video encoding</entry> | |
1258 | </row> | |
1259 | </tbody> | |
1260 | </entrytbl> | |
1261 | </row> | |
1262 | <row><entry></entry></row> | |
1263 | <row id="v4l2-mpeg-video-aspect"> | |
1264 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant> </entry> | |
1265 | <entry>enum v4l2_mpeg_video_aspect</entry> | |
1266 | </row><row><entry spanname="descr">Video aspect. | |
1267 | Possible values are:</entry> | |
1268 | </row> | |
1269 | <row> | |
1270 | <entrytbl spanname="descr" cols="2"> | |
1271 | <tbody valign="top"> | |
1272 | <row> | |
1273 | <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant> </entry> | |
1274 | </row> | |
1275 | <row> | |
1276 | <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant> </entry> | |
1277 | </row> | |
1278 | <row> | |
1279 | <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant> </entry> | |
1280 | </row> | |
1281 | <row> | |
1282 | <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant> </entry> | |
1283 | </row> | |
1284 | </tbody> | |
1285 | </entrytbl> | |
1286 | </row> | |
1287 | <row><entry></entry></row> | |
1288 | <row> | |
1289 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant> </entry> | |
1290 | <entry>integer</entry> | |
1291 | </row><row><entry spanname="descr">Number of B-Frames | |
1292 | (default 2)</entry> | |
1293 | </row> | |
1294 | <row><entry></entry></row> | |
1295 | <row> | |
1296 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant> </entry> | |
1297 | <entry>integer</entry> | |
1298 | </row><row><entry spanname="descr">GOP size (default | |
1299 | 12)</entry> | |
1300 | </row> | |
1301 | <row><entry></entry></row> | |
1302 | <row> | |
1303 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant> </entry> | |
1304 | <entry>boolean</entry> | |
1305 | </row><row><entry spanname="descr">GOP closure (default | |
1306 | 1)</entry> | |
1307 | </row> | |
1308 | <row><entry></entry></row> | |
1309 | <row> | |
1310 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant> </entry> | |
1311 | <entry>boolean</entry> | |
1312 | </row><row><entry spanname="descr">Enable 3:2 pulldown | |
1313 | (default 0)</entry> | |
1314 | </row> | |
1315 | <row><entry></entry></row> | |
1316 | <row id="v4l2-mpeg-video-bitrate-mode"> | |
1317 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant> </entry> | |
1318 | <entry>enum v4l2_mpeg_video_bitrate_mode</entry> | |
1319 | </row><row><entry spanname="descr">Video bitrate mode. | |
1320 | Possible values are:</entry> | |
1321 | </row> | |
1322 | <row> | |
1323 | <entrytbl spanname="descr" cols="2"> | |
1324 | <tbody valign="top"> | |
1325 | <row> | |
1326 | <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant> </entry> | |
1327 | <entry>Variable bitrate</entry> | |
1328 | </row> | |
1329 | <row> | |
1330 | <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant> </entry> | |
1331 | <entry>Constant bitrate</entry> | |
1332 | </row> | |
1333 | </tbody> | |
1334 | </entrytbl> | |
1335 | </row> | |
1336 | <row><entry></entry></row> | |
1337 | <row> | |
1338 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant> </entry> | |
1339 | <entry>integer</entry> | |
1340 | </row><row><entry spanname="descr">Video bitrate in bits | |
1341 | per second.</entry> | |
1342 | </row> | |
1343 | <row><entry></entry></row> | |
1344 | <row> | |
1345 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant> </entry> | |
1346 | <entry>integer</entry> | |
1347 | </row><row><entry spanname="descr">Peak video bitrate in | |
1348 | bits per second. Must be larger or equal to the average video bitrate. | |
1349 | It is ignored if the video bitrate mode is set to constant | |
1350 | bitrate.</entry> | |
1351 | </row> | |
1352 | <row><entry></entry></row> | |
1353 | <row> | |
1354 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant> </entry> | |
1355 | <entry>integer</entry> | |
1356 | </row><row><entry spanname="descr">For every captured | |
1357 | frame, skip this many subsequent frames (default 0).</entry> | |
1358 | </row> | |
1359 | <row><entry></entry></row> | |
1360 | <row> | |
1361 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant> </entry> | |
1362 | <entry>boolean</entry> | |
1363 | </row> | |
1364 | <row><entry spanname="descr">"Mutes" the video to a | |
1365 | fixed color when capturing. This is useful for testing, to produce a | |
1366 | fixed video bitstream. 0 = unmuted, 1 = muted.</entry> | |
1367 | </row> | |
1368 | <row><entry></entry></row> | |
1369 | <row> | |
1370 | <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant> </entry> | |
1371 | <entry>integer</entry> | |
1372 | </row><row><entry spanname="descr">Sets the "mute" color | |
1373 | of the video. The supplied 32-bit integer is interpreted as follows (bit | |
1374 | 0 = least significant bit):</entry> | |
1375 | </row> | |
1376 | <row> | |
1377 | <entrytbl spanname="descr" cols="2"> | |
1378 | <tbody valign="top"> | |
1379 | <row> | |
1380 | <entry>Bit 0:7</entry> | |
1381 | <entry>V chrominance information</entry> | |
1382 | </row> | |
1383 | <row> | |
1384 | <entry>Bit 8:15</entry> | |
1385 | <entry>U chrominance information</entry> | |
1386 | </row> | |
1387 | <row> | |
1388 | <entry>Bit 16:23</entry> | |
1389 | <entry>Y luminance information</entry> | |
1390 | </row> | |
1391 | <row> | |
1392 | <entry>Bit 24:31</entry> | |
1393 | <entry>Must be zero.</entry> | |
1394 | </row> | |
1395 | </tbody> | |
1396 | </entrytbl> | |
1397 | </row> | |
1398 | </tbody> | |
1399 | </tgroup> | |
1400 | </table> | |
1401 | </section> | |
1402 | ||
1403 | <section> | |
1404 | <title>CX2341x MPEG Controls</title> | |
1405 | ||
1406 | <para>The following MPEG class controls deal with MPEG | |
1407 | encoding settings that are specific to the Conexant CX23415 and | |
1408 | CX23416 MPEG encoding chips.</para> | |
1409 | ||
1410 | <table pgwide="1" frame="none" id="cx2341x-control-id"> | |
1411 | <title>CX2341x Control IDs</title> | |
1412 | <tgroup cols="4"> | |
1413 | <colspec colname="c1" colwidth="1*" /> | |
1414 | <colspec colname="c2" colwidth="6*" /> | |
1415 | <colspec colname="c3" colwidth="2*" /> | |
1416 | <colspec colname="c4" colwidth="6*" /> | |
1417 | <spanspec namest="c1" nameend="c2" spanname="id" /> | |
1418 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | |
1419 | <thead> | |
1420 | <row> | |
1421 | <entry spanname="id" align="left">ID</entry> | |
1422 | <entry align="left">Type</entry> | |
1423 | </row><row><entry spanname="descr" align="left">Description</entry> | |
1424 | </row> | |
1425 | </thead> | |
1426 | <tbody valign="top"> | |
1427 | <row><entry></entry></row> | |
1428 | <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode"> | |
1429 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant> </entry> | |
1430 | <entry>enum v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry> | |
1431 | </row><row><entry spanname="descr">Sets the Spatial | |
1432 | Filter mode (default <constant>MANUAL</constant>). Possible values | |
1433 | are:</entry> | |
1434 | </row> | |
1435 | <row> | |
1436 | <entrytbl spanname="descr" cols="2"> | |
1437 | <tbody valign="top"> | |
1438 | <row> | |
1439 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant> </entry> | |
1440 | <entry>Choose the filter manually</entry> | |
1441 | </row> | |
1442 | <row> | |
1443 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant> </entry> | |
1444 | <entry>Choose the filter automatically</entry> | |
1445 | </row> | |
1446 | </tbody> | |
1447 | </entrytbl> | |
1448 | </row> | |
1449 | <row><entry></entry></row> | |
1450 | <row> | |
1451 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant> </entry> | |
1452 | <entry>integer (0-15)</entry> | |
1453 | </row><row><entry spanname="descr">The setting for the | |
1454 | Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry> | |
1455 | </row> | |
1456 | <row><entry></entry></row> | |
1457 | <row id="luma-spatial-filter-type"> | |
1458 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant> </entry> | |
1459 | <entry>enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry> | |
1460 | </row><row><entry spanname="descr">Select the algorithm | |
1461 | to use for the Luma Spatial Filter (default | |
1462 | <constant>1D_HOR</constant>). Possible values:</entry> | |
1463 | </row> | |
1464 | <row> | |
1465 | <entrytbl spanname="descr" cols="2"> | |
1466 | <tbody valign="top"> | |
1467 | <row> | |
1468 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant> </entry> | |
1469 | <entry>No filter</entry> | |
1470 | </row> | |
1471 | <row> | |
1472 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant> </entry> | |
1473 | <entry>One-dimensional horizontal</entry> | |
1474 | </row> | |
1475 | <row> | |
1476 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant> </entry> | |
1477 | <entry>One-dimensional vertical</entry> | |
1478 | </row> | |
1479 | <row> | |
1480 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant> </entry> | |
1481 | <entry>Two-dimensional separable</entry> | |
1482 | </row> | |
1483 | <row> | |
1484 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant> </entry> | |
1485 | <entry>Two-dimensional symmetrical | |
1486 | non-separable</entry> | |
1487 | </row> | |
1488 | </tbody> | |
1489 | </entrytbl> | |
1490 | </row> | |
1491 | <row><entry></entry></row> | |
1492 | <row id="chroma-spatial-filter-type"> | |
1493 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant> </entry> | |
1494 | <entry>enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry> | |
1495 | </row><row><entry spanname="descr">Select the algorithm | |
1496 | for the Chroma Spatial Filter (default <constant>1D_HOR</constant>). | |
1497 | Possible values are:</entry> | |
1498 | </row> | |
1499 | <row> | |
1500 | <entrytbl spanname="descr" cols="2"> | |
1501 | <tbody valign="top"> | |
1502 | <row> | |
1503 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant> </entry> | |
1504 | <entry>No filter</entry> | |
1505 | </row> | |
1506 | <row> | |
1507 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant> </entry> | |
1508 | <entry>One-dimensional horizontal</entry> | |
1509 | </row> | |
1510 | </tbody> | |
1511 | </entrytbl> | |
1512 | </row> | |
1513 | <row><entry></entry></row> | |
1514 | <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode"> | |
1515 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant> </entry> | |
1516 | <entry>enum v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry> | |
1517 | </row><row><entry spanname="descr">Sets the Temporal | |
1518 | Filter mode (default <constant>MANUAL</constant>). Possible values | |
1519 | are:</entry> | |
1520 | </row> | |
1521 | <row> | |
1522 | <entrytbl spanname="descr" cols="2"> | |
1523 | <tbody valign="top"> | |
1524 | <row> | |
1525 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant> </entry> | |
1526 | <entry>Choose the filter manually</entry> | |
1527 | </row> | |
1528 | <row> | |
1529 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant> </entry> | |
1530 | <entry>Choose the filter automatically</entry> | |
1531 | </row> | |
1532 | </tbody> | |
1533 | </entrytbl> | |
1534 | </row> | |
1535 | <row><entry></entry></row> | |
1536 | <row> | |
1537 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant> </entry> | |
1538 | <entry>integer (0-31)</entry> | |
1539 | </row><row><entry spanname="descr">The setting for the | |
1540 | Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale | |
1541 | capturing and 0 for scaled capturing.)</entry> | |
1542 | </row> | |
1543 | <row><entry></entry></row> | |
1544 | <row id="v4l2-mpeg-cx2341x-video-median-filter-type"> | |
1545 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant> </entry> | |
1546 | <entry>enum v4l2_mpeg_cx2341x_video_median_filter_type</entry> | |
1547 | </row><row><entry spanname="descr">Median Filter Type | |
1548 | (default <constant>OFF</constant>). Possible values are:</entry> | |
1549 | </row> | |
1550 | <row> | |
1551 | <entrytbl spanname="descr" cols="2"> | |
1552 | <tbody valign="top"> | |
1553 | <row> | |
1554 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant> </entry> | |
1555 | <entry>No filter</entry> | |
1556 | </row> | |
1557 | <row> | |
1558 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant> </entry> | |
1559 | <entry>Horizontal filter</entry> | |
1560 | </row> | |
1561 | <row> | |
1562 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant> </entry> | |
1563 | <entry>Vertical filter</entry> | |
1564 | </row> | |
1565 | <row> | |
1566 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant> </entry> | |
1567 | <entry>Horizontal and vertical filter</entry> | |
1568 | </row> | |
1569 | <row> | |
1570 | <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant> </entry> | |
1571 | <entry>Diagonal filter</entry> | |
1572 | </row> | |
1573 | </tbody> | |
1574 | </entrytbl> | |
1575 | </row> | |
1576 | <row><entry></entry></row> | |
1577 | <row> | |
1578 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant> </entry> | |
1579 | <entry>integer (0-255)</entry> | |
1580 | </row><row><entry spanname="descr">Threshold above which | |
1581 | the luminance median filter is enabled (default 0)</entry> | |
1582 | </row> | |
1583 | <row><entry></entry></row> | |
1584 | <row> | |
1585 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant> </entry> | |
1586 | <entry>integer (0-255)</entry> | |
1587 | </row><row><entry spanname="descr">Threshold below which | |
1588 | the luminance median filter is enabled (default 255)</entry> | |
1589 | </row> | |
1590 | <row><entry></entry></row> | |
1591 | <row> | |
1592 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant> </entry> | |
1593 | <entry>integer (0-255)</entry> | |
1594 | </row><row><entry spanname="descr">Threshold above which | |
1595 | the chroma median filter is enabled (default 0)</entry> | |
1596 | </row> | |
1597 | <row><entry></entry></row> | |
1598 | <row> | |
1599 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant> </entry> | |
1600 | <entry>integer (0-255)</entry> | |
1601 | </row><row><entry spanname="descr">Threshold below which | |
1602 | the chroma median filter is enabled (default 255)</entry> | |
1603 | </row> | |
1604 | <row><entry></entry></row> | |
1605 | <row> | |
1606 | <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant> </entry> | |
1607 | <entry>boolean</entry> | |
1608 | </row> | |
1609 | <row><entry spanname="descr">The CX2341X MPEG encoder | |
1610 | can insert one empty MPEG-2 PES packet into the stream between every | |
1611 | four video frames. The packet size is 2048 bytes, including the | |
1612 | packet_start_code_prefix and stream_id fields. The stream_id is 0xBF | |
1613 | (private stream 2). The payload consists of 0x00 bytes, to be filled | |
1614 | in by the application. 0 = do not insert, 1 = insert packets.</entry> | |
1615 | </row> | |
1616 | </tbody> | |
1617 | </tgroup> | |
1618 | </table> | |
1619 | </section> | |
1620 | </section> | |
1621 | ||
1622 | <section id="camera-controls"> | |
1623 | <title>Camera Control Reference</title> | |
1624 | ||
1625 | <para>The Camera class includes controls for mechanical (or | |
1626 | equivalent digital) features of a device such as controllable lenses | |
1627 | or sensors.</para> | |
1628 | ||
1629 | <table pgwide="1" frame="none" id="camera-control-id"> | |
1630 | <title>Camera Control IDs</title> | |
1631 | <tgroup cols="4"> | |
1632 | <colspec colname="c1" colwidth="1*" /> | |
1633 | <colspec colname="c2" colwidth="6*" /> | |
1634 | <colspec colname="c3" colwidth="2*" /> | |
1635 | <colspec colname="c4" colwidth="6*" /> | |
1636 | <spanspec namest="c1" nameend="c2" spanname="id" /> | |
1637 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | |
1638 | <thead> | |
1639 | <row> | |
1640 | <entry spanname="id" align="left">ID</entry> | |
1641 | <entry align="left">Type</entry> | |
1642 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | |
1643 | </row> | |
1644 | </thead> | |
1645 | <tbody valign="top"> | |
1646 | <row><entry></entry></row> | |
1647 | <row> | |
1648 | <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant> </entry> | |
1649 | <entry>class</entry> | |
1650 | </row><row><entry spanname="descr">The Camera class | |
1651 | descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a | |
1652 | description of this control class.</entry> | |
1653 | </row> | |
1654 | <row><entry></entry></row> | |
1655 | ||
1656 | <row id="v4l2-exposure-auto-type"> | |
1657 | <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant> </entry> | |
1658 | <entry>enum v4l2_exposure_auto_type</entry> | |
1659 | </row><row><entry spanname="descr">Enables automatic | |
1660 | adjustments of the exposure time and/or iris aperture. The effect of | |
1661 | manual changes of the exposure time or iris aperture while these | |
1662 | features are enabled is undefined, drivers should ignore such | |
1663 | requests. Possible values are:</entry> | |
1664 | </row> | |
1665 | <row> | |
1666 | <entrytbl spanname="descr" cols="2"> | |
1667 | <tbody valign="top"> | |
1668 | <row> | |
1669 | <entry><constant>V4L2_EXPOSURE_AUTO</constant> </entry> | |
1670 | <entry>Automatic exposure time, automatic iris | |
1671 | aperture.</entry> | |
1672 | </row> | |
1673 | <row> | |
1674 | <entry><constant>V4L2_EXPOSURE_MANUAL</constant> </entry> | |
1675 | <entry>Manual exposure time, manual iris.</entry> | |
1676 | </row> | |
1677 | <row> | |
1678 | <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant> </entry> | |
1679 | <entry>Manual exposure time, auto iris.</entry> | |
1680 | </row> | |
1681 | <row> | |
1682 | <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant> </entry> | |
1683 | <entry>Auto exposure time, manual iris.</entry> | |
1684 | </row> | |
1685 | </tbody> | |
1686 | </entrytbl> | |
1687 | </row> | |
1688 | <row><entry></entry></row> | |
1689 | ||
1690 | <row> | |
1691 | <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant> </entry> | |
1692 | <entry>integer</entry> | |
1693 | </row><row><entry spanname="descr">Determines the exposure | |
1694 | time of the camera sensor. The exposure time is limited by the frame | |
1695 | interval. Drivers should interpret the values as 100 µs units, | |
1696 | where the value 1 stands for 1/10000th of a second, 10000 for 1 second | |
1697 | and 100000 for 10 seconds.</entry> | |
1698 | </row> | |
1699 | <row><entry></entry></row> | |
1700 | ||
1701 | <row> | |
1702 | <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant> </entry> | |
1703 | <entry>boolean</entry> | |
1704 | </row><row><entry spanname="descr">When | |
1705 | <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to | |
1706 | <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>, | |
1707 | this control determines if the device may dynamically vary the frame | |
1708 | rate. By default this feature is disabled (0) and the frame rate must | |
1709 | remain constant.</entry> | |
1710 | </row> | |
1711 | <row><entry></entry></row> | |
1712 | ||
1713 | <row> | |
1714 | <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant> </entry> | |
1715 | <entry>integer</entry> | |
1716 | </row><row><entry spanname="descr">This control turns the | |
1717 | camera horizontally by the specified amount. The unit is undefined. A | |
1718 | positive value moves the camera to the right (clockwise when viewed | |
1719 | from above), a negative value to the left. A value of zero does not | |
1720 | cause motion. This is a write-only control.</entry> | |
1721 | </row> | |
1722 | <row><entry></entry></row> | |
1723 | ||
1724 | <row> | |
1725 | <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant> </entry> | |
1726 | <entry>integer</entry> | |
1727 | </row><row><entry spanname="descr">This control turns the | |
1728 | camera vertically by the specified amount. The unit is undefined. A | |
1729 | positive value moves the camera up, a negative value down. A value of | |
1730 | zero does not cause motion. This is a write-only control.</entry> | |
1731 | </row> | |
1732 | <row><entry></entry></row> | |
1733 | ||
1734 | <row> | |
1735 | <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant> </entry> | |
1736 | <entry>button</entry> | |
1737 | </row><row><entry spanname="descr">When this control is set, | |
1738 | the camera moves horizontally to the default position.</entry> | |
1739 | </row> | |
1740 | <row><entry></entry></row> | |
1741 | ||
1742 | <row> | |
1743 | <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant> </entry> | |
1744 | <entry>button</entry> | |
1745 | </row><row><entry spanname="descr">When this control is set, | |
1746 | the camera moves vertically to the default position.</entry> | |
1747 | </row> | |
1748 | <row><entry></entry></row> | |
1749 | ||
1750 | <row> | |
1751 | <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant> </entry> | |
1752 | <entry>integer</entry> | |
1753 | </row><row><entry spanname="descr">This control | |
1754 | turns the camera horizontally to the specified position. Positive | |
1755 | values move the camera to the right (clockwise when viewed from above), | |
1756 | negative values to the left. Drivers should interpret the values as arc | |
1757 | seconds, with valid values between -180 * 3600 and +180 * 3600 | |
1758 | inclusive.</entry> | |
1759 | </row> | |
1760 | <row><entry></entry></row> | |
1761 | ||
1762 | <row> | |
1763 | <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant> </entry> | |
1764 | <entry>integer</entry> | |
1765 | </row><row><entry spanname="descr">This control | |
1766 | turns the camera vertically to the specified position. Positive values | |
1767 | move the camera up, negative values down. Drivers should interpret the | |
1768 | values as arc seconds, with valid values between -180 * 3600 and +180 | |
1769 | * 3600 inclusive.</entry> | |
1770 | </row> | |
1771 | <row><entry></entry></row> | |
1772 | ||
1773 | <row> | |
1774 | <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant> </entry> | |
1775 | <entry>integer</entry> | |
1776 | </row><row><entry spanname="descr">This control sets the | |
1777 | focal point of the camera to the specified position. The unit is | |
1778 | undefined. Positive values set the focus closer to the camera, | |
1779 | negative values towards infinity.</entry> | |
1780 | </row> | |
1781 | <row><entry></entry></row> | |
1782 | ||
1783 | <row> | |
1784 | <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant> </entry> | |
1785 | <entry>integer</entry> | |
1786 | </row><row><entry spanname="descr">This control moves the | |
1787 | focal point of the camera by the specified amount. The unit is | |
1788 | undefined. Positive values move the focus closer to the camera, | |
1789 | negative values towards infinity. This is a write-only control.</entry> | |
1790 | </row> | |
1791 | <row><entry></entry></row> | |
1792 | ||
1793 | <row> | |
1794 | <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant> </entry> | |
1795 | <entry>boolean</entry> | |
1796 | </row><row><entry spanname="descr">Enables automatic focus | |
1797 | adjustments. The effect of manual focus adjustments while this feature | |
1798 | is enabled is undefined, drivers should ignore such requests.</entry> | |
1799 | </row> | |
1800 | <row><entry></entry></row> | |
1801 | ||
1802 | <row> | |
1803 | <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant> </entry> | |
1804 | <entry>integer</entry> | |
1805 | </row><row><entry spanname="descr">Specify the objective lens | |
1806 | focal length as an absolute value. The zoom unit is driver-specific and its | |
1807 | value should be a positive integer.</entry> | |
1808 | </row> | |
1809 | <row><entry></entry></row> | |
1810 | ||
1811 | <row> | |
1812 | <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant> </entry> | |
1813 | <entry>integer</entry> | |
1814 | </row><row><entry spanname="descr">Specify the objective lens | |
1815 | focal length relatively to the current value. Positive values move the zoom | |
1816 | lens group towards the telephoto direction, negative values towards the | |
1817 | wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry> | |
1818 | </row> | |
1819 | <row><entry></entry></row> | |
1820 | ||
1821 | <row> | |
1822 | <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant> </entry> | |
1823 | <entry>integer</entry> | |
1824 | </row><row><entry spanname="descr">Move the objective lens group | |
1825 | at the specified speed until it reaches physical device limits or until an | |
1826 | explicit request to stop the movement. A positive value moves the zoom lens | |
1827 | group towards the telephoto direction. A value of zero stops the zoom lens | |
1828 | group movement. A negative value moves the zoom lens group towards the | |
1829 | wide-angle direction. The zoom speed unit is driver-specific.</entry> | |
1830 | </row> | |
1831 | <row><entry></entry></row> | |
1832 | ||
48213fe3 LP |
1833 | <row> |
1834 | <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant> </entry> | |
1835 | <entry>integer</entry> | |
1836 | </row><row><entry spanname="descr">This control sets the | |
1837 | camera's aperture to the specified value. The unit is undefined. | |
1838 | Larger values open the iris wider, smaller values close it.</entry> | |
1839 | </row> | |
1840 | <row><entry></entry></row> | |
1841 | ||
1842 | <row> | |
1843 | <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant> </entry> | |
1844 | <entry>integer</entry> | |
1845 | </row><row><entry spanname="descr">This control modifies the | |
1846 | camera's aperture by the specified amount. The unit is undefined. | |
1847 | Positive values open the iris one step further, negative values close | |
1848 | it one step further. This is a write-only control.</entry> | |
1849 | </row> | |
1850 | <row><entry></entry></row> | |
1851 | ||
8e080c2e MCC |
1852 | <row> |
1853 | <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant> </entry> | |
1854 | <entry>boolean</entry> | |
1855 | </row><row><entry spanname="descr">Prevent video from being acquired | |
1856 | by the camera. When this control is set to <constant>TRUE</constant> (1), no | |
1857 | image can be captured by the camera. Common means to enforce privacy are | |
1858 | mechanical obturation of the sensor and firmware image processing, but the | |
1859 | device is not restricted to these methods. Devices that implement the privacy | |
1860 | control must support read access and may support write access.</entry> | |
1861 | </row> | |
1862 | ||
1863 | <row> | |
1864 | <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant> </entry> | |
1865 | <entry>integer</entry> | |
1866 | </row><row><entry spanname="descr">Switch the band-stop filter of a | |
1867 | camera sensor on or off, or specify its strength. Such band-stop filters can | |
1868 | be used, for example, to filter out the fluorescent light component.</entry> | |
1869 | </row> | |
1870 | <row><entry></entry></row> | |
1871 | </tbody> | |
1872 | </tgroup> | |
1873 | </table> | |
1874 | </section> | |
1875 | ||
1876 | <section id="fm-tx-controls"> | |
1877 | <title>FM Transmitter Control Reference</title> | |
1878 | ||
1879 | <para>The FM Transmitter (FM_TX) class includes controls for common features of | |
1880 | FM transmissions capable devices. Currently this class includes parameters for audio | |
1881 | compression, pilot tone generation, audio deviation limiter, RDS transmission and | |
1882 | tuning power features.</para> | |
1883 | ||
1884 | <table pgwide="1" frame="none" id="fm-tx-control-id"> | |
1885 | <title>FM_TX Control IDs</title> | |
1886 | ||
1887 | <tgroup cols="4"> | |
1888 | <colspec colname="c1" colwidth="1*" /> | |
1889 | <colspec colname="c2" colwidth="6*" /> | |
1890 | <colspec colname="c3" colwidth="2*" /> | |
1891 | <colspec colname="c4" colwidth="6*" /> | |
1892 | <spanspec namest="c1" nameend="c2" spanname="id" /> | |
1893 | <spanspec namest="c2" nameend="c4" spanname="descr" /> | |
1894 | <thead> | |
1895 | <row> | |
1896 | <entry spanname="id" align="left">ID</entry> | |
1897 | <entry align="left">Type</entry> | |
1898 | </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry> | |
1899 | </row> | |
1900 | </thead> | |
1901 | <tbody valign="top"> | |
1902 | <row><entry></entry></row> | |
1903 | <row> | |
1904 | <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant> </entry> | |
1905 | <entry>class</entry> | |
1906 | </row><row><entry spanname="descr">The FM_TX class | |
1907 | descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a | |
1908 | description of this control class.</entry> | |
1909 | </row> | |
1910 | <row> | |
1911 | <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant> </entry> | |
1912 | <entry>integer</entry> | |
1913 | </row> | |
1914 | <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz. | |
1915 | The range and step are driver-specific.</entry> | |
1916 | </row> | |
1917 | <row> | |
1918 | <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant> </entry> | |
1919 | <entry>integer</entry> | |
1920 | </row> | |
1921 | <row><entry spanname="descr">Sets the RDS Programme Identification field | |
1922 | for transmission.</entry> | |
1923 | </row> | |
1924 | <row> | |
1925 | <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant> </entry> | |
1926 | <entry>integer</entry> | |
1927 | </row> | |
1928 | <row><entry spanname="descr">Sets the RDS Programme Type field for transmission. | |
1929 | This encodes up to 31 pre-defined programme types.</entry> | |
1930 | </row> | |
1931 | <row> | |
1932 | <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant> </entry> | |
1933 | <entry>string</entry> | |
1934 | </row> | |
1935 | <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission. | |
1936 | It is intended for static display on a receiver. It is the primary aid to listeners in programme service | |
1937 | identification and selection. In Annex E of <xref linkend="en50067" />, the RDS specification, | |
1938 | there is a full description of the correct character encoding for Programme Service name strings. | |
1939 | Also from RDS specification, PS is usually a single eight character text. However, it is also possible | |
1940 | to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured | |
1941 | with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry> | |
1942 | </row> | |
1943 | <row> | |
1944 | <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant> </entry> | |
1945 | <entry>string</entry> | |
1946 | </row> | |
1947 | <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of | |
1948 | what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names, | |
1949 | programme-related information or any other text. In these cases, RadioText should be used in addition to | |
1950 | <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described | |
1951 | in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being | |
1952 | used to transmit it, either 32 (2A block) or 64 (2B block). However, it is also possible | |
1953 | to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured | |
1954 | with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry> | |
1955 | </row> | |
1956 | <row> | |
1957 | <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant> </entry> | |
1958 | <entry>boolean</entry> | |
1959 | </row> | |
1960 | <row><entry spanname="descr">Enables or disables the audio deviation limiter feature. | |
1961 | The limiter is useful when trying to maximize the audio volume, minimize receiver-generated | |
1962 | distortion and prevent overmodulation. | |
1963 | </entry> | |
1964 | </row> | |
1965 | <row> | |
1966 | <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant> </entry> | |
1967 | <entry>integer</entry> | |
1968 | </row> | |
1969 | <row><entry spanname="descr">Sets the audio deviation limiter feature release time. | |
1970 | Unit is in useconds. Step and range are driver-specific.</entry> | |
1971 | </row> | |
1972 | <row> | |
1973 | <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant> </entry> | |
1974 | <entry>integer</entry> | |
1975 | </row> | |
1976 | <row><entry spanname="descr">Configures audio frequency deviation level in Hz. | |
1977 | The range and step are driver-specific.</entry> | |
1978 | </row> | |
1979 | <row> | |
1980 | <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant> </entry> | |
1981 | <entry>boolean</entry> | |
1982 | </row> | |
1983 | <row><entry spanname="descr">Enables or disables the audio compression feature. | |
1984 | This feature amplifies signals below the threshold by a fixed gain and compresses audio | |
1985 | signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry> | |
1986 | </row> | |
1987 | <row> | |
1988 | <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant> </entry> | |
1989 | <entry>integer</entry> | |
1990 | </row> | |
1991 | <row><entry spanname="descr">Sets the gain for audio compression feature. It is | |
1992 | a dB value. The range and step are driver-specific.</entry> | |
1993 | </row> | |
1994 | <row> | |
1995 | <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant> </entry> | |
1996 | <entry>integer</entry> | |
1997 | </row> | |
1998 | <row><entry spanname="descr">Sets the threshold level for audio compression freature. | |
1999 | It is a dB value. The range and step are driver-specific.</entry> | |
2000 | </row> | |
2001 | <row> | |
2002 | <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant> </entry> | |
2003 | <entry>integer</entry> | |
2004 | </row> | |
2005 | <row><entry spanname="descr">Sets the attack time for audio compression feature. | |
2006 | It is a useconds value. The range and step are driver-specific.</entry> | |
2007 | </row> | |
2008 | <row> | |
2009 | <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant> </entry> | |
2010 | <entry>integer</entry> | |
2011 | </row> | |
2012 | <row><entry spanname="descr">Sets the release time for audio compression feature. | |
2013 | It is a useconds value. The range and step are driver-specific.</entry> | |
2014 | </row> | |
2015 | <row> | |
2016 | <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant> </entry> | |
2017 | <entry>boolean</entry> | |
2018 | </row> | |
2019 | <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry> | |
2020 | </row> | |
2021 | <row> | |
2022 | <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant> </entry> | |
2023 | <entry>integer</entry> | |
2024 | </row> | |
2025 | <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is | |
2026 | in Hz. The range and step are driver-specific.</entry> | |
2027 | </row> | |
2028 | <row> | |
2029 | <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant> </entry> | |
2030 | <entry>integer</entry> | |
2031 | </row> | |
2032 | <row><entry spanname="descr">Configures pilot tone frequency value. Unit is | |
2033 | in Hz. The range and step are driver-specific.</entry> | |
2034 | </row> | |
2035 | <row> | |
2036 | <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant> </entry> | |
2037 | <entry>integer</entry> | |
2038 | </row> | |
2039 | <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting. | |
2040 | A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies. | |
2041 | Depending on the region, a time constant of either 50 or 75 useconds is used. The enum v4l2_preemphasis | |
2042 | defines possible values for pre-emphasis. Here they are:</entry> | |
2043 | </row><row> | |
2044 | <entrytbl spanname="descr" cols="2"> | |
2045 | <tbody valign="top"> | |
2046 | <row> | |
2047 | <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant> </entry> | |
2048 | <entry>No pre-emphasis is applied.</entry> | |
2049 | </row> | |
2050 | <row> | |
2051 | <entry><constant>V4L2_PREEMPHASIS_50_uS</constant> </entry> | |
2052 | <entry>A pre-emphasis of 50 uS is used.</entry> | |
2053 | </row> | |
2054 | <row> | |
2055 | <entry><constant>V4L2_PREEMPHASIS_75_uS</constant> </entry> | |
2056 | <entry>A pre-emphasis of 75 uS is used.</entry> | |
2057 | </row> | |
2058 | </tbody> | |
2059 | </entrytbl> | |
2060 | ||
2061 | </row> | |
2062 | <row> | |
2063 | <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant> </entry> | |
2064 | <entry>integer</entry> | |
2065 | </row> | |
2066 | <row><entry spanname="descr">Sets the output power level for signal transmission. | |
2067 | Unit is in dBuV. Range and step are driver-specific.</entry> | |
2068 | </row> | |
2069 | <row> | |
2070 | <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant> </entry> | |
2071 | <entry>integer</entry> | |
2072 | </row> | |
2073 | <row><entry spanname="descr">This selects the value of antenna tuning capacitor | |
2074 | manually or automatically if set to zero. Unit, range and step are driver-specific.</entry> | |
2075 | </row> | |
2076 | <row><entry></entry></row> | |
2077 | </tbody> | |
2078 | </tgroup> | |
2079 | </table> | |
2080 | ||
2081 | <para>For more details about RDS specification, refer to | |
2082 | <xref linkend="en50067" /> document, from CENELEC.</para> | |
2083 | </section> | |
2084 | </section> | |
2085 | ||
2086 | <!-- | |
2087 | Local Variables: | |
2088 | mode: sgml | |
2089 | sgml-parent-document: "common.sgml" | |
2090 | indent-tabs-mode: nil | |
2091 | End: | |
2092 | --> |