Merge tag 'v3.6-rc4' into next
[sfrench/cifs-2.6.git] / Documentation / DocBook / media / v4l / controls.xml
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 &eg; 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     <para>
55       All controls use machine endianness.
56     </para>
57
58     <table pgwide="1" frame="none" id="control-id">
59       <title>Control IDs</title>
60       <tgroup cols="3">
61         &cs-def;
62         <thead>
63           <row>
64             <entry>ID</entry>
65             <entry>Type</entry>
66             <entry>Description</entry>
67           </row>
68         </thead>
69         <tbody valign="top">
70           <row>
71             <entry><constant>V4L2_CID_BASE</constant></entry>
72             <entry></entry>
73             <entry>First predefined ID, equal to
74 <constant>V4L2_CID_BRIGHTNESS</constant>.</entry>
75           </row>
76           <row>
77             <entry><constant>V4L2_CID_USER_BASE</constant></entry>
78             <entry></entry>
79             <entry>Synonym of <constant>V4L2_CID_BASE</constant>.</entry>
80           </row>
81           <row>
82             <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry>
83             <entry>integer</entry>
84             <entry>Picture brightness, or more precisely, the black
85 level.</entry>
86           </row>
87           <row>
88             <entry><constant>V4L2_CID_CONTRAST</constant></entry>
89             <entry>integer</entry>
90             <entry>Picture contrast or luma gain.</entry>
91           </row>
92           <row>
93             <entry><constant>V4L2_CID_SATURATION</constant></entry>
94             <entry>integer</entry>
95             <entry>Picture color saturation or chroma gain.</entry>
96           </row>
97           <row>
98             <entry><constant>V4L2_CID_HUE</constant></entry>
99             <entry>integer</entry>
100             <entry>Hue or color balance.</entry>
101           </row>
102           <row>
103             <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry>
104             <entry>integer</entry>
105             <entry>Overall audio volume. Note some drivers also
106 provide an OSS or ALSA mixer interface.</entry>
107           </row>
108           <row>
109             <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry>
110             <entry>integer</entry>
111             <entry>Audio stereo balance. Minimum corresponds to all
112 the way left, maximum to right.</entry>
113           </row>
114           <row>
115             <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry>
116             <entry>integer</entry>
117             <entry>Audio bass adjustment.</entry>
118           </row>
119           <row>
120             <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry>
121             <entry>integer</entry>
122             <entry>Audio treble adjustment.</entry>
123           </row>
124           <row>
125             <entry><constant>V4L2_CID_AUDIO_MUTE</constant></entry>
126             <entry>boolean</entry>
127             <entry>Mute audio, &ie; set the volume to zero, however
128 without affecting <constant>V4L2_CID_AUDIO_VOLUME</constant>. Like
129 ALSA drivers, V4L2 drivers must mute at load time to avoid excessive
130 noise. Actually the entire device should be reset to a low power
131 consumption state.</entry>
132           </row>
133           <row>
134             <entry><constant>V4L2_CID_AUDIO_LOUDNESS</constant></entry>
135             <entry>boolean</entry>
136             <entry>Loudness mode (bass boost).</entry>
137           </row>
138           <row>
139             <entry><constant>V4L2_CID_BLACK_LEVEL</constant></entry>
140             <entry>integer</entry>
141             <entry>Another name for brightness (not a synonym of
142 <constant>V4L2_CID_BRIGHTNESS</constant>). This control is deprecated
143 and should not be used in new drivers and applications.</entry>
144           </row>
145           <row>
146             <entry><constant>V4L2_CID_AUTO_WHITE_BALANCE</constant></entry>
147             <entry>boolean</entry>
148             <entry>Automatic white balance (cameras).</entry>
149           </row>
150           <row>
151             <entry><constant>V4L2_CID_DO_WHITE_BALANCE</constant></entry>
152             <entry>button</entry>
153             <entry>This is an action control. When set (the value is
154 ignored), the device will do a white balance and then hold the current
155 setting. Contrast this with the boolean
156 <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant>, which, when
157 activated, keeps adjusting the white balance.</entry>
158           </row>
159           <row>
160             <entry><constant>V4L2_CID_RED_BALANCE</constant></entry>
161             <entry>integer</entry>
162             <entry>Red chroma balance.</entry>
163           </row>
164           <row>
165             <entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry>
166             <entry>integer</entry>
167             <entry>Blue chroma balance.</entry>
168           </row>
169           <row>
170             <entry><constant>V4L2_CID_GAMMA</constant></entry>
171             <entry>integer</entry>
172             <entry>Gamma adjust.</entry>
173           </row>
174           <row>
175             <entry><constant>V4L2_CID_WHITENESS</constant></entry>
176             <entry>integer</entry>
177             <entry>Whiteness for grey-scale devices. This is a synonym
178 for <constant>V4L2_CID_GAMMA</constant>. This control is deprecated
179 and should not be used in new drivers and applications.</entry>
180           </row>
181           <row>
182             <entry><constant>V4L2_CID_EXPOSURE</constant></entry>
183             <entry>integer</entry>
184             <entry>Exposure (cameras). [Unit?]</entry>
185           </row>
186           <row>
187             <entry><constant>V4L2_CID_AUTOGAIN</constant></entry>
188             <entry>boolean</entry>
189             <entry>Automatic gain/exposure control.</entry>
190           </row>
191           <row>
192             <entry><constant>V4L2_CID_GAIN</constant></entry>
193             <entry>integer</entry>
194             <entry>Gain control.</entry>
195           </row>
196           <row>
197             <entry><constant>V4L2_CID_HFLIP</constant></entry>
198             <entry>boolean</entry>
199             <entry>Mirror the picture horizontally.</entry>
200           </row>
201           <row>
202             <entry><constant>V4L2_CID_VFLIP</constant></entry>
203             <entry>boolean</entry>
204             <entry>Mirror the picture vertically.</entry>
205           </row>
206         <row>
207           <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
208             <entry>integer</entry>
209             <entry>Horizontal image centering. This control is
210 deprecated. New drivers and applications should use the <link
211 linkend="camera-controls">Camera class controls</link>
212 <constant>V4L2_CID_PAN_ABSOLUTE</constant>,
213 <constant>V4L2_CID_PAN_RELATIVE</constant> and
214 <constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
215           </row>
216           <row>
217             <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
218             (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
219             <entry>integer</entry>
220             <entry>Vertical image centering. Centering is intended to
221 <emphasis>physically</emphasis> adjust cameras. For image cropping see
222 <xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
223 control is deprecated. New drivers and applications should use the
224 <link linkend="camera-controls">Camera class controls</link>
225 <constant>V4L2_CID_TILT_ABSOLUTE</constant>,
226 <constant>V4L2_CID_TILT_RELATIVE</constant> and
227 <constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
228           </row>
229           <row id="v4l2-power-line-frequency">
230             <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
231             <entry>enum</entry>
232             <entry>Enables a power line frequency filter to avoid
233 flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are:
234 <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
235 <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1),
236 <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2) and
237 <constant>V4L2_CID_POWER_LINE_FREQUENCY_AUTO</constant> (3).</entry>
238           </row>
239           <row>
240             <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
241             <entry>boolean</entry>
242             <entry>Enables automatic hue control by the device. The
243 effect of setting <constant>V4L2_CID_HUE</constant> while automatic
244 hue control is enabled is undefined, drivers should ignore such
245 request.</entry>
246           </row>
247           <row>
248             <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry>
249             <entry>integer</entry>
250             <entry>This control specifies the white balance settings
251 as a color temperature in Kelvin. A driver should have a minimum of
252 2800 (incandescent) to 6500 (daylight). For more information about
253 color temperature see <ulink
254 url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry>
255           </row>
256           <row>
257             <entry><constant>V4L2_CID_SHARPNESS</constant></entry>
258             <entry>integer</entry>
259             <entry>Adjusts the sharpness filters in a camera. The
260 minimum value disables the filters, higher values give a sharper
261 picture.</entry>
262           </row>
263           <row>
264             <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry>
265             <entry>integer</entry>
266             <entry>Adjusts the backlight compensation in a camera. The
267 minimum value disables backlight compensation.</entry>
268           </row>
269           <row>
270             <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
271             <entry>boolean</entry>
272             <entry>Chroma automatic gain control.</entry>
273           </row>
274           <row>
275             <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
276             <entry>integer</entry>
277             <entry>Adjusts the Chroma gain control (for use when chroma AGC
278             is disabled).</entry>
279           </row>
280           <row>
281             <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
282             <entry>boolean</entry>
283             <entry>Enable the color killer (&ie; force a black &amp; white image in case of a weak video signal).</entry>
284           </row>
285           <row id="v4l2-colorfx">
286             <entry><constant>V4L2_CID_COLORFX</constant></entry>
287             <entry>enum</entry>
288             <entry>Selects a color effect. The following values are defined:
289             </entry>
290           </row><row>
291           <entry></entry>
292           <entry></entry>
293             <entrytbl spanname="descr" cols="2">
294               <tbody valign="top">
295                 <row>
296                   <entry><constant>V4L2_COLORFX_NONE</constant>&nbsp;</entry>
297                   <entry>Color effect is disabled.</entry>
298                 </row>
299                 <row>
300                   <entry><constant>V4L2_COLORFX_ANTIQUE</constant>&nbsp;</entry>
301                   <entry>An aging (old photo) effect.</entry>
302                 </row>
303                 <row>
304                   <entry><constant>V4L2_COLORFX_ART_FREEZE</constant>&nbsp;</entry>
305                   <entry>Frost color effect.</entry>
306                 </row>
307                 <row>
308                   <entry><constant>V4L2_COLORFX_AQUA</constant>&nbsp;</entry>
309                   <entry>Water color, cool tone.</entry>
310                 </row>
311                 <row>
312                   <entry><constant>V4L2_COLORFX_BW</constant>&nbsp;</entry>
313                   <entry>Black and white.</entry>
314                 </row>
315                 <row>
316                   <entry><constant>V4L2_COLORFX_EMBOSS</constant>&nbsp;</entry>
317                   <entry>Emboss, the highlights and shadows replace light/dark boundaries
318                   and low contrast areas are set to a gray background.</entry>
319                 </row>
320                 <row>
321                   <entry><constant>V4L2_COLORFX_GRASS_GREEN</constant>&nbsp;</entry>
322                   <entry>Grass green.</entry>
323                 </row>
324                 <row>
325                   <entry><constant>V4L2_COLORFX_NEGATIVE</constant>&nbsp;</entry>
326                   <entry>Negative.</entry>
327                 </row>
328                 <row>
329                   <entry><constant>V4L2_COLORFX_SEPIA</constant>&nbsp;</entry>
330                   <entry>Sepia tone.</entry>
331                 </row>
332                 <row>
333                   <entry><constant>V4L2_COLORFX_SKETCH</constant>&nbsp;</entry>
334                   <entry>Sketch.</entry>
335                 </row>
336                 <row>
337                   <entry><constant>V4L2_COLORFX_SKIN_WHITEN</constant>&nbsp;</entry>
338                   <entry>Skin whiten.</entry>
339                 </row>
340                 <row>
341                   <entry><constant>V4L2_COLORFX_SKY_BLUE</constant>&nbsp;</entry>
342                   <entry>Sky blue.</entry>
343                 </row>
344                 <row>
345                   <entry><constant>V4L2_COLORFX_SOLARIZATION</constant>&nbsp;</entry>
346                   <entry>Solarization, the image is partially reversed in tone,
347                   only color values above or below a certain threshold are inverted.
348                   </entry>
349                 </row>
350                 <row>
351                   <entry><constant>V4L2_COLORFX_SILHOUETTE</constant>&nbsp;</entry>
352                   <entry>Silhouette (outline).</entry>
353                 </row>
354                 <row>
355                   <entry><constant>V4L2_COLORFX_VIVID</constant>&nbsp;</entry>
356                   <entry>Vivid colors.</entry>
357                 </row>
358                 <row>
359                   <entry><constant>V4L2_COLORFX_SET_CBCR</constant>&nbsp;</entry>
360                   <entry>The Cb and Cr chroma components are replaced by fixed
361                   coefficients determined by <constant>V4L2_CID_COLORFX_CBCR</constant>
362                   control.</entry>
363                 </row>
364               </tbody>
365             </entrytbl>
366           </row>
367           <row>
368             <entry><constant>V4L2_CID_COLORFX_CBCR</constant></entry>
369             <entry>integer</entry>
370             <entry>Determines the Cb and Cr coefficients for <constant>V4L2_COLORFX_SET_CBCR</constant>
371             color effect. Bits [7:0] of the supplied 32 bit value are interpreted as
372             Cr component, bits [15:8] as Cb component and bits [31:16] must be zero.
373           </entry>
374           </row>
375           <row>
376             <entry><constant>V4L2_CID_AUTOBRIGHTNESS</constant></entry>
377             <entry>boolean</entry>
378             <entry>Enable Automatic Brightness.</entry>
379           </row>
380           <row>
381             <entry><constant>V4L2_CID_ROTATE</constant></entry>
382             <entry>integer</entry>
383             <entry>Rotates the image by specified angle. Common angles are 90,
384             270 and 180. Rotating the image to 90 and 270 will reverse the height
385             and width of the display window. It is necessary to set the new height and
386             width of the picture using the &VIDIOC-S-FMT; ioctl according to
387             the rotation angle selected.</entry>
388           </row>
389           <row>
390             <entry><constant>V4L2_CID_BG_COLOR</constant></entry>
391             <entry>integer</entry>
392             <entry>Sets the background color on the current output device.
393             Background color needs to be specified in the RGB24 format. The
394             supplied 32 bit value is interpreted as bits 0-7 Red color information,
395             bits 8-15 Green color information, bits 16-23 Blue color
396             information and bits 24-31 must be zero.</entry>
397           </row>
398           <row>
399             <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
400                 <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
401             <entry>boolean</entry>
402             <entry>Switch on or off the illuminator 1 or 2 of the device
403                 (usually a microscope).</entry>
404           </row>
405           <row>
406             <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_CAPTURE</constant></entry>
407             <entry>integer</entry>
408             <entry>This is a read-only control that can be read by the application
409 and used as a hint to determine the number of CAPTURE buffers to pass to REQBUFS.
410 The value is the minimum number of CAPTURE buffers that is necessary for hardware
411 to work.</entry>
412           </row>
413           <row>
414             <entry><constant>V4L2_CID_MIN_BUFFERS_FOR_OUTPUT</constant></entry>
415             <entry>integer</entry>
416             <entry>This is a read-only control that can be read by the application
417 and used as a hint to determine the number of OUTPUT buffers to pass to REQBUFS.
418 The value is the minimum number of OUTPUT buffers that is necessary for hardware
419 to work.</entry>
420           </row>
421           <row id="v4l2-alpha-component">
422             <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry>
423             <entry>integer</entry>
424             <entry> Sets the alpha color component on the capture device or on
425             the capture buffer queue of a mem-to-mem device. When a mem-to-mem
426             device produces frame format that includes an alpha component
427             (e.g. <link linkend="rgb-formats">packed RGB image formats</link>)
428             and the alpha value is not defined by the mem-to-mem input data
429             this control lets you select the alpha component value of all
430             pixels. It is applicable to any pixel format that contains an alpha
431             component.
432             </entry>
433           </row>
434           <row>
435             <entry><constant>V4L2_CID_LASTP1</constant></entry>
436             <entry></entry>
437             <entry>End of the predefined control IDs (currently
438               <constant>V4L2_CID_ALPHA_COMPONENT</constant> + 1).</entry>
439           </row>
440           <row>
441             <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
442             <entry></entry>
443             <entry>ID of the first custom (driver specific) control.
444 Applications depending on particular custom controls should check the
445 driver name and version, see <xref linkend="querycap" />.</entry>
446           </row>
447         </tbody>
448       </tgroup>
449     </table>
450
451     <para>Applications can enumerate the available controls with the
452 &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a
453 control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls.
454 Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
455 <constant>VIDIOC_G_CTRL</constant> and
456 <constant>VIDIOC_S_CTRL</constant> when the device has one or more
457 controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
458 more menu type controls.</para>
459
460     <example>
461       <title>Enumerating all controls</title>
462
463       <programlisting>
464 &v4l2-queryctrl; queryctrl;
465 &v4l2-querymenu; querymenu;
466
467 static void
468 enumerate_menu (void)
469 {
470         printf ("  Menu items:\n");
471
472         memset (&amp;querymenu, 0, sizeof (querymenu));
473         querymenu.id = queryctrl.id;
474
475         for (querymenu.index = queryctrl.minimum;
476              querymenu.index &lt;= queryctrl.maximum;
477               querymenu.index++) {
478                 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
479                         printf ("  %s\n", querymenu.name);
480                 }
481         }
482 }
483
484 memset (&amp;queryctrl, 0, sizeof (queryctrl));
485
486 for (queryctrl.id = V4L2_CID_BASE;
487      queryctrl.id &lt; V4L2_CID_LASTP1;
488      queryctrl.id++) {
489         if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
490                 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
491                         continue;
492
493                 printf ("Control %s\n", queryctrl.name);
494
495                 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
496                         enumerate_menu ();
497         } else {
498                 if (errno == EINVAL)
499                         continue;
500
501                 perror ("VIDIOC_QUERYCTRL");
502                 exit (EXIT_FAILURE);
503         }
504 }
505
506 for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
507      queryctrl.id++) {
508         if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
509                 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
510                         continue;
511
512                 printf ("Control %s\n", queryctrl.name);
513
514                 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
515                         enumerate_menu ();
516         } else {
517                 if (errno == EINVAL)
518                         break;
519
520                 perror ("VIDIOC_QUERYCTRL");
521                 exit (EXIT_FAILURE);
522         }
523 }
524 </programlisting>
525     </example>
526
527     <example>
528       <title>Changing controls</title>
529
530       <programlisting>
531 &v4l2-queryctrl; queryctrl;
532 &v4l2-control; control;
533
534 memset (&amp;queryctrl, 0, sizeof (queryctrl));
535 queryctrl.id = V4L2_CID_BRIGHTNESS;
536
537 if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
538         if (errno != EINVAL) {
539                 perror ("VIDIOC_QUERYCTRL");
540                 exit (EXIT_FAILURE);
541         } else {
542                 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
543         }
544 } else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) {
545         printf ("V4L2_CID_BRIGHTNESS is not supported\n");
546 } else {
547         memset (&amp;control, 0, sizeof (control));
548         control.id = V4L2_CID_BRIGHTNESS;
549         control.value = queryctrl.default_value;
550
551         if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)) {
552                 perror ("VIDIOC_S_CTRL");
553                 exit (EXIT_FAILURE);
554         }
555 }
556
557 memset (&amp;control, 0, sizeof (control));
558 control.id = V4L2_CID_CONTRAST;
559
560 if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &amp;control)) {
561         control.value += 1;
562
563         /* The driver may clamp the value or return ERANGE, ignored here */
564
565         if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)
566             &amp;&amp; errno != ERANGE) {
567                 perror ("VIDIOC_S_CTRL");
568                 exit (EXIT_FAILURE);
569         }
570 /* Ignore if V4L2_CID_CONTRAST is unsupported */
571 } else if (errno != EINVAL) {
572         perror ("VIDIOC_G_CTRL");
573         exit (EXIT_FAILURE);
574 }
575
576 control.id = V4L2_CID_AUDIO_MUTE;
577 control.value = TRUE; /* silence */
578
579 /* Errors ignored */
580 ioctl (fd, VIDIOC_S_CTRL, &amp;control);
581 </programlisting>
582     </example>
583   </section>
584
585   <section id="extended-controls">
586     <title>Extended Controls</title>
587
588     <section>
589       <title>Introduction</title>
590
591       <para>The control mechanism as originally designed was meant
592 to be used for user settings (brightness, saturation, etc). However,
593 it turned out to be a very useful model for implementing more
594 complicated driver APIs where each driver implements only a subset of
595 a larger API.</para>
596
597       <para>The MPEG encoding API was the driving force behind
598 designing and implementing this extended control mechanism: the MPEG
599 standard is quite large and the currently supported hardware MPEG
600 encoders each only implement a subset of this standard. Further more,
601 many parameters relating to how the video is encoded into an MPEG
602 stream are specific to the MPEG encoding chip since the MPEG standard
603 only defines the format of the resulting MPEG stream, not how the
604 video is actually encoded into that format.</para>
605
606       <para>Unfortunately, the original control API lacked some
607 features needed for these new uses and so it was extended into the
608 (not terribly originally named) extended control API.</para>
609
610       <para>Even though the MPEG encoding API was the first effort
611 to use the Extended Control API, nowadays there are also other classes
612 of Extended Controls, such as Camera Controls and FM Transmitter Controls.
613 The Extended Controls API as well as all Extended Controls classes are
614 described in the following text.</para>
615     </section>
616
617     <section>
618       <title>The Extended Control API</title>
619
620       <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;,
621 &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on
622 arrays of controls (as opposed to the &VIDIOC-G-CTRL; and
623 &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed
624 since it is often required to atomically change several controls at
625 once.</para>
626
627       <para>Each of the new ioctls expects a pointer to a
628 &v4l2-ext-controls;. This structure contains a pointer to the control
629 array, a count of the number of controls in that array and a control
630 class. Control classes are used to group similar controls into a
631 single class. For example, control class
632 <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls
633 (&ie; all controls that can also be set using the old
634 <constant>VIDIOC_S_CTRL</constant> ioctl). Control class
635 <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls
636 relating to MPEG encoding, etc.</para>
637
638       <para>All controls in the control array must belong to the
639 specified control class. An error is returned if this is not the
640 case.</para>
641
642       <para>It is also possible to use an empty control array (count
643 == 0) to check whether the specified control class is
644 supported.</para>
645
646       <para>The control array is a &v4l2-ext-control; array. The
647 <structname>v4l2_ext_control</structname> structure is very similar to
648 &v4l2-control;, except for the fact that it also allows for 64-bit
649 values and pointers to be passed.</para>
650
651       <para>It is important to realize that due to the flexibility of
652 controls it is necessary to check whether the control you want to set
653 actually is supported in the driver and what the valid range of values
654 is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to
655 check this. Also note that it is possible that some of the menu
656 indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant>
657 may not be supported (<constant>VIDIOC_QUERYMENU</constant> will
658 return an error). A good example is the list of supported MPEG audio
659 bitrates. Some drivers only support one or two bitrates, others
660 support a wider range.</para>
661
662       <para>
663         All controls use machine endianness.
664       </para>
665     </section>
666
667     <section>
668       <title>Enumerating Extended Controls</title>
669
670       <para>The recommended way to enumerate over the extended
671 controls is by using &VIDIOC-QUERYCTRL; in combination with the
672 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para>
673
674       <informalexample>
675         <programlisting>
676 &v4l2-queryctrl; qctrl;
677
678 qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
679 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
680         /* ... */
681         qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
682 }
683 </programlisting>
684       </informalexample>
685
686       <para>The initial control ID is set to 0 ORed with the
687 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The
688 <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first
689 control with a higher ID than the specified one. When no such controls
690 are found an error is returned.</para>
691
692       <para>If you want to get all controls within a specific control
693 class, then you can set the initial
694 <structfield>qctrl.id</structfield> value to the control class and add
695 an extra check to break out of the loop when a control of another
696 control class is found:</para>
697
698       <informalexample>
699         <programlisting>
700 qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
701 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
702         if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG)
703                 break;
704                 /* ... */
705                 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
706         }
707 </programlisting>
708       </informalexample>
709
710       <para>The 32-bit <structfield>qctrl.id</structfield> value is
711 subdivided into three bit ranges: the top 4 bits are reserved for
712 flags (&eg; <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not
713 actually part of the ID. The remaining 28 bits form the control ID, of
714 which the most significant 12 bits define the control class and the
715 least significant 16 bits identify the control within the control
716 class. It is guaranteed that these last 16 bits are always non-zero
717 for controls. The range of 0x1000 and up are reserved for
718 driver-specific controls. The macro
719 <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class
720 ID based on a control ID.</para>
721
722       <para>If the driver does not support extended controls, then
723 <constant>VIDIOC_QUERYCTRL</constant> will fail when used in
724 combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
725 that case the old method of enumerating control should be used (see
726 1.8). But if it is supported, then it is guaranteed to enumerate over
727 all controls, including driver-private controls.</para>
728     </section>
729
730     <section>
731       <title>Creating Control Panels</title>
732
733       <para>It is possible to create control panels for a graphical
734 user interface where the user can select the various controls.
735 Basically you will have to iterate over all controls using the method
736 described above. Each control class starts with a control of type
737 <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>.
738 <constant>VIDIOC_QUERYCTRL</constant> will return the name of this
739 control class which can be used as the title of a tab page within a
740 control panel.</para>
741
742       <para>The flags field of &v4l2-queryctrl; also contains hints on
743 the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation
744 for more details.</para>
745     </section>
746
747     <section id="mpeg-controls">
748       <title>MPEG Control Reference</title>
749
750       <para>Below all controls within the MPEG control class are
751 described. First the generic controls, then controls specific for
752 certain hardware.</para>
753
754       <section>
755         <title>Generic MPEG Controls</title>
756
757         <table pgwide="1" frame="none" id="mpeg-control-id">
758           <title>MPEG Control IDs</title>
759           <tgroup cols="4">
760             <colspec colname="c1" colwidth="1*" />
761             <colspec colname="c2" colwidth="6*" />
762             <colspec colname="c3" colwidth="2*" />
763             <colspec colname="c4" colwidth="6*" />
764             <spanspec namest="c1" nameend="c2" spanname="id" />
765             <spanspec namest="c2" nameend="c4" spanname="descr" />
766             <thead>
767               <row>
768                 <entry spanname="id" align="left">ID</entry>
769                 <entry align="left">Type</entry>
770               </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
771               </row>
772             </thead>
773             <tbody valign="top">
774               <row><entry></entry></row>
775               <row>
776                 <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant>&nbsp;</entry>
777                 <entry>class</entry>
778               </row><row><entry spanname="descr">The MPEG class
779 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
780 description of this control class. This description can be used as the
781 caption of a Tab page in a GUI, for example.</entry>
782               </row>
783               <row><entry></entry></row>
784               <row id="v4l2-mpeg-stream-type">
785                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant>&nbsp;</entry>
786                 <entry>enum&nbsp;v4l2_mpeg_stream_type</entry>
787               </row><row><entry spanname="descr">The MPEG-1, -2 or -4
788 output stream type. One cannot assume anything here. Each hardware
789 MPEG encoder tends to support different subsets of the available MPEG
790 stream types. This control is specific to multiplexed MPEG streams.
791 The currently defined stream types are:</entry>
792               </row>
793               <row>
794                 <entrytbl spanname="descr" cols="2">
795                   <tbody valign="top">
796                     <row>
797                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant>&nbsp;</entry>
798                       <entry>MPEG-2 program stream</entry>
799                     </row>
800                     <row>
801                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant>&nbsp;</entry>
802                       <entry>MPEG-2 transport stream</entry>
803                     </row>
804                     <row>
805                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant>&nbsp;</entry>
806                       <entry>MPEG-1 system stream</entry>
807                     </row>
808                     <row>
809                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant>&nbsp;</entry>
810                       <entry>MPEG-2 DVD-compatible stream</entry>
811                     </row>
812                     <row>
813                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant>&nbsp;</entry>
814                       <entry>MPEG-1 VCD-compatible stream</entry>
815                     </row>
816                     <row>
817                       <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant>&nbsp;</entry>
818                       <entry>MPEG-2 SVCD-compatible stream</entry>
819                     </row>
820                   </tbody>
821                 </entrytbl>
822               </row>
823               <row><entry></entry></row>
824               <row>
825                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant>&nbsp;</entry>
826                 <entry>integer</entry>
827               </row><row><entry spanname="descr">Program Map Table
828 Packet ID for the MPEG transport stream (default 16)</entry>
829               </row>
830               <row><entry></entry></row>
831               <row>
832                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant>&nbsp;</entry>
833                 <entry>integer</entry>
834               </row><row><entry spanname="descr">Audio Packet ID for
835 the MPEG transport stream (default 256)</entry>
836               </row>
837               <row><entry></entry></row>
838               <row>
839                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant>&nbsp;</entry>
840                 <entry>integer</entry>
841               </row><row><entry spanname="descr">Video Packet ID for
842 the MPEG transport stream (default 260)</entry>
843               </row>
844               <row><entry></entry></row>
845               <row>
846                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant>&nbsp;</entry>
847                 <entry>integer</entry>
848               </row><row><entry spanname="descr">Packet ID for the
849 MPEG transport stream carrying PCR fields (default 259)</entry>
850               </row>
851               <row><entry></entry></row>
852               <row>
853                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant>&nbsp;</entry>
854                 <entry>integer</entry>
855               </row><row><entry spanname="descr">Audio ID for MPEG
856 PES</entry>
857               </row>
858               <row><entry></entry></row>
859               <row>
860                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant>&nbsp;</entry>
861                 <entry>integer</entry>
862               </row><row><entry spanname="descr">Video ID for MPEG
863 PES</entry>
864               </row>
865               <row><entry></entry></row>
866               <row id="v4l2-mpeg-stream-vbi-fmt">
867                 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant>&nbsp;</entry>
868                 <entry>enum&nbsp;v4l2_mpeg_stream_vbi_fmt</entry>
869               </row><row><entry spanname="descr">Some cards can embed
870 VBI data (&eg; Closed Caption, Teletext) into the MPEG stream. This
871 control selects whether VBI data should be embedded, and if so, what
872 embedding method should be used. The list of possible VBI formats
873 depends on the driver. The currently defined VBI format types
874 are:</entry>
875               </row>
876               <row>
877                 <entrytbl spanname="descr" cols="2">
878                   <tbody valign="top">
879                     <row>
880                       <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant>&nbsp;</entry>
881                       <entry>No VBI in the MPEG stream</entry>
882                     </row>
883                     <row>
884                       <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant>&nbsp;</entry>
885                       <entry>VBI in private packets, IVTV format (documented
886 in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry>
887                     </row>
888                   </tbody>
889                 </entrytbl>
890               </row>
891               <row><entry></entry></row>
892               <row id="v4l2-mpeg-audio-sampling-freq">
893                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant>&nbsp;</entry>
894                 <entry>enum&nbsp;v4l2_mpeg_audio_sampling_freq</entry>
895               </row><row><entry spanname="descr">MPEG Audio sampling
896 frequency. Possible values are:</entry>
897               </row>
898               <row>
899                 <entrytbl spanname="descr" cols="2">
900                   <tbody valign="top">
901                     <row>
902                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant>&nbsp;</entry>
903                       <entry>44.1 kHz</entry>
904                     </row>
905                     <row>
906                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant>&nbsp;</entry>
907                       <entry>48 kHz</entry>
908                     </row>
909                     <row>
910                       <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant>&nbsp;</entry>
911                       <entry>32 kHz</entry>
912                     </row>
913                   </tbody>
914                 </entrytbl>
915               </row>
916               <row><entry></entry></row>
917               <row id="v4l2-mpeg-audio-encoding">
918                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant>&nbsp;</entry>
919                 <entry>enum&nbsp;v4l2_mpeg_audio_encoding</entry>
920               </row><row><entry spanname="descr">MPEG Audio encoding.
921 This control is specific to multiplexed MPEG streams.
922 Possible values are:</entry>
923               </row>
924               <row>
925                 <entrytbl spanname="descr" cols="2">
926                   <tbody valign="top">
927                     <row>
928                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant>&nbsp;</entry>
929                       <entry>MPEG-1/2 Layer I encoding</entry>
930                     </row>
931                     <row>
932                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant>&nbsp;</entry>
933                       <entry>MPEG-1/2 Layer II encoding</entry>
934                     </row>
935                     <row>
936                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant>&nbsp;</entry>
937                       <entry>MPEG-1/2 Layer III encoding</entry>
938                     </row>
939                     <row>
940                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant>&nbsp;</entry>
941                       <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry>
942                     </row>
943                     <row>
944                       <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant>&nbsp;</entry>
945                       <entry>AC-3 aka ATSC A/52 encoding</entry>
946                     </row>
947                   </tbody>
948                 </entrytbl>
949               </row>
950               <row><entry></entry></row>
951               <row id="v4l2-mpeg-audio-l1-bitrate">
952                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant>&nbsp;</entry>
953                 <entry>enum&nbsp;v4l2_mpeg_audio_l1_bitrate</entry>
954               </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate.
955 Possible values are:</entry>
956               </row>
957               <row>
958                 <entrytbl spanname="descr" cols="2">
959                   <tbody valign="top">
960                     <row>
961                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant>&nbsp;</entry>
962                       <entry>32 kbit/s</entry></row>
963                     <row>
964                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant>&nbsp;</entry>
965                       <entry>64 kbit/s</entry>
966                     </row>
967                     <row>
968                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant>&nbsp;</entry>
969                       <entry>96 kbit/s</entry>
970                     </row>
971                     <row>
972                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant>&nbsp;</entry>
973                       <entry>128 kbit/s</entry>
974                     </row>
975                     <row>
976                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant>&nbsp;</entry>
977                       <entry>160 kbit/s</entry>
978                     </row>
979                     <row>
980                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant>&nbsp;</entry>
981                       <entry>192 kbit/s</entry>
982                     </row>
983                     <row>
984                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant>&nbsp;</entry>
985                       <entry>224 kbit/s</entry>
986                     </row>
987                     <row>
988                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant>&nbsp;</entry>
989                       <entry>256 kbit/s</entry>
990                     </row>
991                     <row>
992                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant>&nbsp;</entry>
993                       <entry>288 kbit/s</entry>
994                     </row>
995                     <row>
996                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant>&nbsp;</entry>
997                       <entry>320 kbit/s</entry>
998                     </row>
999                     <row>
1000                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant>&nbsp;</entry>
1001                       <entry>352 kbit/s</entry>
1002                     </row>
1003                     <row>
1004                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant>&nbsp;</entry>
1005                       <entry>384 kbit/s</entry>
1006                     </row>
1007                     <row>
1008                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant>&nbsp;</entry>
1009                       <entry>416 kbit/s</entry>
1010                     </row>
1011                     <row>
1012                       <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant>&nbsp;</entry>
1013                       <entry>448 kbit/s</entry>
1014                     </row>
1015                   </tbody>
1016                 </entrytbl>
1017               </row>
1018               <row><entry></entry></row>
1019               <row id="v4l2-mpeg-audio-l2-bitrate">
1020                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant>&nbsp;</entry>
1021                 <entry>enum&nbsp;v4l2_mpeg_audio_l2_bitrate</entry>
1022               </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate.
1023 Possible values are:</entry>
1024               </row>
1025               <row>
1026                 <entrytbl spanname="descr" cols="2">
1027                   <tbody valign="top">
1028                     <row>
1029                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant>&nbsp;</entry>
1030                       <entry>32 kbit/s</entry>
1031                     </row>
1032                     <row>
1033                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant>&nbsp;</entry>
1034                       <entry>48 kbit/s</entry>
1035                     </row>
1036                     <row>
1037                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant>&nbsp;</entry>
1038                       <entry>56 kbit/s</entry>
1039                     </row>
1040                     <row>
1041                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant>&nbsp;</entry>
1042                       <entry>64 kbit/s</entry>
1043                     </row>
1044                     <row>
1045                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant>&nbsp;</entry>
1046                       <entry>80 kbit/s</entry>
1047                     </row>
1048                     <row>
1049                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant>&nbsp;</entry>
1050                       <entry>96 kbit/s</entry>
1051                     </row>
1052                     <row>
1053                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant>&nbsp;</entry>
1054                       <entry>112 kbit/s</entry>
1055                     </row>
1056                     <row>
1057                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant>&nbsp;</entry>
1058                       <entry>128 kbit/s</entry>
1059                     </row>
1060                     <row>
1061                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant>&nbsp;</entry>
1062                       <entry>160 kbit/s</entry>
1063                     </row>
1064                     <row>
1065                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant>&nbsp;</entry>
1066                       <entry>192 kbit/s</entry>
1067                     </row>
1068                     <row>
1069                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant>&nbsp;</entry>
1070                       <entry>224 kbit/s</entry>
1071                     </row>
1072                     <row>
1073                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant>&nbsp;</entry>
1074                       <entry>256 kbit/s</entry>
1075                     </row>
1076                     <row>
1077                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant>&nbsp;</entry>
1078                       <entry>320 kbit/s</entry>
1079                     </row>
1080                     <row>
1081                       <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant>&nbsp;</entry>
1082                       <entry>384 kbit/s</entry>
1083                     </row>
1084                   </tbody>
1085                 </entrytbl>
1086               </row>
1087               <row><entry></entry></row>
1088               <row id="v4l2-mpeg-audio-l3-bitrate">
1089                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant>&nbsp;</entry>
1090                 <entry>enum&nbsp;v4l2_mpeg_audio_l3_bitrate</entry>
1091               </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate.
1092 Possible values are:</entry>
1093               </row>
1094               <row>
1095                 <entrytbl spanname="descr" cols="2">
1096                   <tbody valign="top">
1097                     <row>
1098                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant>&nbsp;</entry>
1099                       <entry>32 kbit/s</entry>
1100                     </row>
1101                     <row>
1102                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant>&nbsp;</entry>
1103                       <entry>40 kbit/s</entry>
1104                     </row>
1105                     <row>
1106                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant>&nbsp;</entry>
1107                       <entry>48 kbit/s</entry>
1108                     </row>
1109                     <row>
1110                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant>&nbsp;</entry>
1111                       <entry>56 kbit/s</entry>
1112                     </row>
1113                     <row>
1114                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant>&nbsp;</entry>
1115                       <entry>64 kbit/s</entry>
1116                     </row>
1117                     <row>
1118                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant>&nbsp;</entry>
1119                       <entry>80 kbit/s</entry>
1120                     </row>
1121                     <row>
1122                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant>&nbsp;</entry>
1123                       <entry>96 kbit/s</entry>
1124                     </row>
1125                     <row>
1126                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant>&nbsp;</entry>
1127                       <entry>112 kbit/s</entry>
1128                     </row>
1129                     <row>
1130                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant>&nbsp;</entry>
1131                       <entry>128 kbit/s</entry>
1132                     </row>
1133                     <row>
1134                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant>&nbsp;</entry>
1135                       <entry>160 kbit/s</entry>
1136                     </row>
1137                     <row>
1138                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant>&nbsp;</entry>
1139                       <entry>192 kbit/s</entry>
1140                     </row>
1141                     <row>
1142                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant>&nbsp;</entry>
1143                       <entry>224 kbit/s</entry>
1144                     </row>
1145                     <row>
1146                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant>&nbsp;</entry>
1147                       <entry>256 kbit/s</entry>
1148                     </row>
1149                     <row>
1150                       <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant>&nbsp;</entry>
1151                       <entry>320 kbit/s</entry>
1152                     </row>
1153                   </tbody>
1154                 </entrytbl>
1155               </row>
1156               <row><entry></entry></row>
1157               <row>
1158                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant>&nbsp;</entry>
1159                 <entry>integer</entry>
1160               </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry>
1161               </row>
1162               <row><entry></entry></row>
1163               <row id="v4l2-mpeg-audio-ac3-bitrate">
1164                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant>&nbsp;</entry>
1165                 <entry>enum&nbsp;v4l2_mpeg_audio_ac3_bitrate</entry>
1166               </row><row><entry spanname="descr">AC-3 bitrate.
1167 Possible values are:</entry>
1168               </row>
1169               <row>
1170                 <entrytbl spanname="descr" cols="2">
1171                   <tbody valign="top">
1172                     <row>
1173                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant>&nbsp;</entry>
1174                       <entry>32 kbit/s</entry>
1175                     </row>
1176                     <row>
1177                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant>&nbsp;</entry>
1178                       <entry>40 kbit/s</entry>
1179                     </row>
1180                     <row>
1181                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant>&nbsp;</entry>
1182                       <entry>48 kbit/s</entry>
1183                     </row>
1184                     <row>
1185                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant>&nbsp;</entry>
1186                       <entry>56 kbit/s</entry>
1187                     </row>
1188                     <row>
1189                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant>&nbsp;</entry>
1190                       <entry>64 kbit/s</entry>
1191                     </row>
1192                     <row>
1193                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant>&nbsp;</entry>
1194                       <entry>80 kbit/s</entry>
1195                     </row>
1196                     <row>
1197                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant>&nbsp;</entry>
1198                       <entry>96 kbit/s</entry>
1199                     </row>
1200                     <row>
1201                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant>&nbsp;</entry>
1202                       <entry>112 kbit/s</entry>
1203                     </row>
1204                     <row>
1205                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant>&nbsp;</entry>
1206                       <entry>128 kbit/s</entry>
1207                     </row>
1208                     <row>
1209                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant>&nbsp;</entry>
1210                       <entry>160 kbit/s</entry>
1211                     </row>
1212                     <row>
1213                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant>&nbsp;</entry>
1214                       <entry>192 kbit/s</entry>
1215                     </row>
1216                     <row>
1217                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant>&nbsp;</entry>
1218                       <entry>224 kbit/s</entry>
1219                     </row>
1220                     <row>
1221                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant>&nbsp;</entry>
1222                       <entry>256 kbit/s</entry>
1223                     </row>
1224                     <row>
1225                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant>&nbsp;</entry>
1226                       <entry>320 kbit/s</entry>
1227                     </row>
1228                     <row>
1229                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant>&nbsp;</entry>
1230                       <entry>384 kbit/s</entry>
1231                     </row>
1232                     <row>
1233                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant>&nbsp;</entry>
1234                       <entry>448 kbit/s</entry>
1235                     </row>
1236                     <row>
1237                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant>&nbsp;</entry>
1238                       <entry>512 kbit/s</entry>
1239                     </row>
1240                     <row>
1241                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant>&nbsp;</entry>
1242                       <entry>576 kbit/s</entry>
1243                     </row>
1244                     <row>
1245                       <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant>&nbsp;</entry>
1246                       <entry>640 kbit/s</entry>
1247                     </row>
1248                   </tbody>
1249                 </entrytbl>
1250               </row>
1251               <row><entry></entry></row>
1252               <row id="v4l2-mpeg-audio-mode">
1253                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant>&nbsp;</entry>
1254                 <entry>enum&nbsp;v4l2_mpeg_audio_mode</entry>
1255               </row><row><entry spanname="descr">MPEG Audio mode.
1256 Possible values are:</entry>
1257               </row>
1258               <row>
1259                 <entrytbl spanname="descr" cols="2">
1260                   <tbody valign="top">
1261                     <row>
1262                       <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant>&nbsp;</entry>
1263                       <entry>Stereo</entry>
1264                     </row>
1265                     <row>
1266                       <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant>&nbsp;</entry>
1267                       <entry>Joint Stereo</entry>
1268                     </row>
1269                     <row>
1270                       <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant>&nbsp;</entry>
1271                       <entry>Bilingual</entry>
1272                     </row>
1273                     <row>
1274                       <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant>&nbsp;</entry>
1275                       <entry>Mono</entry>
1276                     </row>
1277                   </tbody>
1278                 </entrytbl>
1279               </row>
1280               <row><entry></entry></row>
1281               <row id="v4l2-mpeg-audio-mode-extension">
1282                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant>&nbsp;</entry>
1283                 <entry>enum&nbsp;v4l2_mpeg_audio_mode_extension</entry>
1284               </row><row><entry spanname="descr">Joint Stereo
1285 audio mode extension. In Layer I and II they indicate which subbands
1286 are in intensity stereo. All other subbands are coded in stereo. Layer
1287 III is not (yet) supported. Possible values
1288 are:</entry>
1289               </row>
1290               <row>
1291                 <entrytbl spanname="descr" cols="2">
1292                   <tbody valign="top">
1293                     <row>
1294                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant>&nbsp;</entry>
1295                       <entry>Subbands 4-31 in intensity stereo</entry>
1296                     </row>
1297                     <row>
1298                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant>&nbsp;</entry>
1299                       <entry>Subbands 8-31 in intensity stereo</entry>
1300                     </row>
1301                     <row>
1302                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant>&nbsp;</entry>
1303                       <entry>Subbands 12-31 in intensity stereo</entry>
1304                     </row>
1305                     <row>
1306                       <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant>&nbsp;</entry>
1307                       <entry>Subbands 16-31 in intensity stereo</entry>
1308                     </row>
1309                   </tbody>
1310                 </entrytbl>
1311               </row>
1312               <row><entry></entry></row>
1313               <row id="v4l2-mpeg-audio-emphasis">
1314                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant>&nbsp;</entry>
1315                 <entry>enum&nbsp;v4l2_mpeg_audio_emphasis</entry>
1316               </row><row><entry spanname="descr">Audio Emphasis.
1317 Possible values are:</entry>
1318               </row>
1319               <row>
1320                 <entrytbl spanname="descr" cols="2">
1321                   <tbody valign="top">
1322                     <row>
1323                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant>&nbsp;</entry>
1324                       <entry>None</entry>
1325                     </row>
1326                     <row>
1327                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant>&nbsp;</entry>
1328                       <entry>50/15 microsecond emphasis</entry>
1329                     </row>
1330                     <row>
1331                       <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant>&nbsp;</entry>
1332                       <entry>CCITT J.17</entry>
1333                     </row>
1334                   </tbody>
1335                 </entrytbl>
1336               </row>
1337               <row><entry></entry></row>
1338               <row id="v4l2-mpeg-audio-crc">
1339                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant>&nbsp;</entry>
1340                 <entry>enum&nbsp;v4l2_mpeg_audio_crc</entry>
1341               </row><row><entry spanname="descr">CRC method. Possible
1342 values are:</entry>
1343               </row>
1344               <row>
1345                 <entrytbl spanname="descr" cols="2">
1346                   <tbody valign="top">
1347                     <row>
1348                       <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant>&nbsp;</entry>
1349                       <entry>None</entry>
1350                     </row>
1351                     <row>
1352                       <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant>&nbsp;</entry>
1353                       <entry>16 bit parity check</entry>
1354                     </row>
1355                   </tbody>
1356                 </entrytbl>
1357               </row>
1358               <row><entry></entry></row>
1359               <row>
1360                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant>&nbsp;</entry>
1361                 <entry>boolean</entry>
1362               </row><row><entry spanname="descr">Mutes the audio when
1363 capturing. This is not done by muting audio hardware, which can still
1364 produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1365 and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1366               </row>
1367               <row><entry></entry></row>
1368               <row id="v4l2-mpeg-audio-dec-playback">
1369                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK</constant>&nbsp;</entry>
1370                 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1371               </row><row><entry spanname="descr">Determines how monolingual audio should be played back.
1372 Possible values are:</entry>
1373               </row>
1374               <row>
1375                 <entrytbl spanname="descr" cols="2">
1376                   <tbody valign="top">
1377                     <row>
1378                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO</constant>&nbsp;</entry>
1379                       <entry>Automatically determines the best playback mode.</entry>
1380                     </row>
1381                     <row>
1382                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO</constant>&nbsp;</entry>
1383                       <entry>Stereo playback.</entry>
1384                     </row>
1385                     <row>
1386                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT</constant>&nbsp;</entry>
1387                       <entry>Left channel playback.</entry>
1388                     </row>
1389                     <row>
1390                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT</constant>&nbsp;</entry>
1391                       <entry>Right channel playback.</entry>
1392                     </row>
1393                     <row>
1394                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO</constant>&nbsp;</entry>
1395                       <entry>Mono playback.</entry>
1396                     </row>
1397                     <row>
1398                       <entry><constant>V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO</constant>&nbsp;</entry>
1399                       <entry>Stereo playback with swapped left and right channels.</entry>
1400                     </row>
1401                   </tbody>
1402                 </entrytbl>
1403               </row>
1404               <row><entry></entry></row>
1405               <row id="v4l2-mpeg-audio-dec-multilingual-playback">
1406                 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK</constant>&nbsp;</entry>
1407                 <entry>enum&nbsp;v4l2_mpeg_audio_dec_playback</entry>
1408               </row><row><entry spanname="descr">Determines how multilingual audio should be played back.</entry>
1409               </row>
1410               <row><entry></entry></row>
1411               <row id="v4l2-mpeg-video-encoding">
1412                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
1413                 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
1414               </row><row><entry spanname="descr">MPEG Video encoding
1415 method. This control is specific to multiplexed MPEG streams.
1416 Possible values are:</entry>
1417               </row>
1418               <row>
1419                 <entrytbl spanname="descr" cols="2">
1420                   <tbody valign="top">
1421                     <row>
1422                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant>&nbsp;</entry>
1423                       <entry>MPEG-1 Video encoding</entry>
1424                     </row>
1425                     <row>
1426                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant>&nbsp;</entry>
1427                       <entry>MPEG-2 Video encoding</entry>
1428                     </row>
1429                     <row>
1430                       <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant>&nbsp;</entry>
1431                       <entry>MPEG-4 AVC (H.264) Video encoding</entry>
1432                     </row>
1433                   </tbody>
1434                 </entrytbl>
1435               </row>
1436               <row><entry></entry></row>
1437               <row id="v4l2-mpeg-video-aspect">
1438                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant>&nbsp;</entry>
1439                 <entry>enum&nbsp;v4l2_mpeg_video_aspect</entry>
1440               </row><row><entry spanname="descr">Video aspect.
1441 Possible values are:</entry>
1442               </row>
1443               <row>
1444                 <entrytbl spanname="descr" cols="2">
1445                   <tbody valign="top">
1446                     <row>
1447                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant>&nbsp;</entry>
1448                     </row>
1449                     <row>
1450                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant>&nbsp;</entry>
1451                     </row>
1452                     <row>
1453                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant>&nbsp;</entry>
1454                     </row>
1455                     <row>
1456                       <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant>&nbsp;</entry>
1457                     </row>
1458                   </tbody>
1459                 </entrytbl>
1460               </row>
1461               <row><entry></entry></row>
1462               <row>
1463                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant>&nbsp;</entry>
1464                 <entry>integer</entry>
1465               </row><row><entry spanname="descr">Number of B-Frames
1466 (default 2)</entry>
1467               </row>
1468               <row><entry></entry></row>
1469               <row>
1470                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant>&nbsp;</entry>
1471                 <entry>integer</entry>
1472               </row><row><entry spanname="descr">GOP size (default
1473 12)</entry>
1474               </row>
1475               <row><entry></entry></row>
1476               <row>
1477                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant>&nbsp;</entry>
1478                 <entry>boolean</entry>
1479               </row><row><entry spanname="descr">GOP closure (default
1480 1)</entry>
1481               </row>
1482               <row><entry></entry></row>
1483               <row>
1484                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant>&nbsp;</entry>
1485                 <entry>boolean</entry>
1486               </row><row><entry spanname="descr">Enable 3:2 pulldown
1487 (default 0)</entry>
1488               </row>
1489               <row><entry></entry></row>
1490               <row id="v4l2-mpeg-video-bitrate-mode">
1491                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant>&nbsp;</entry>
1492                 <entry>enum&nbsp;v4l2_mpeg_video_bitrate_mode</entry>
1493               </row><row><entry spanname="descr">Video bitrate mode.
1494 Possible values are:</entry>
1495               </row>
1496               <row>
1497                 <entrytbl spanname="descr" cols="2">
1498                   <tbody valign="top">
1499                     <row>
1500                       <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant>&nbsp;</entry>
1501                       <entry>Variable bitrate</entry>
1502                     </row>
1503                     <row>
1504                       <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant>&nbsp;</entry>
1505                       <entry>Constant bitrate</entry>
1506                     </row>
1507                   </tbody>
1508                 </entrytbl>
1509               </row>
1510               <row><entry></entry></row>
1511               <row>
1512                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant>&nbsp;</entry>
1513                 <entry>integer</entry>
1514               </row><row><entry spanname="descr">Video bitrate in bits
1515 per second.</entry>
1516               </row>
1517               <row><entry></entry></row>
1518               <row>
1519                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant>&nbsp;</entry>
1520                 <entry>integer</entry>
1521               </row><row><entry spanname="descr">Peak video bitrate in
1522 bits per second. Must be larger or equal to the average video bitrate.
1523 It is ignored if the video bitrate mode is set to constant
1524 bitrate.</entry>
1525               </row>
1526               <row><entry></entry></row>
1527               <row>
1528                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant>&nbsp;</entry>
1529                 <entry>integer</entry>
1530               </row><row><entry spanname="descr">For every captured
1531 frame, skip this many subsequent frames (default 0).</entry>
1532               </row>
1533               <row><entry></entry></row>
1534               <row>
1535                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant>&nbsp;</entry>
1536                 <entry>boolean</entry>
1537               </row>
1538               <row><entry spanname="descr">"Mutes" the video to a
1539 fixed color when capturing. This is useful for testing, to produce a
1540 fixed video bitstream. 0 = unmuted, 1 = muted.</entry>
1541               </row>
1542               <row><entry></entry></row>
1543               <row>
1544                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant>&nbsp;</entry>
1545                 <entry>integer</entry>
1546               </row><row><entry spanname="descr">Sets the "mute" color
1547 of the video. The supplied 32-bit integer is interpreted as follows (bit
1548 0 = least significant bit):</entry>
1549               </row>
1550               <row>
1551                 <entrytbl spanname="descr" cols="2">
1552                   <tbody valign="top">
1553                     <row>
1554                       <entry>Bit 0:7</entry>
1555                       <entry>V chrominance information</entry>
1556                     </row>
1557                     <row>
1558                       <entry>Bit 8:15</entry>
1559                       <entry>U chrominance information</entry>
1560                     </row>
1561                     <row>
1562                       <entry>Bit 16:23</entry>
1563                       <entry>Y luminance information</entry>
1564                     </row>
1565                     <row>
1566                       <entry>Bit 24:31</entry>
1567                       <entry>Must be zero.</entry>
1568                     </row>
1569                   </tbody>
1570                 </entrytbl>
1571               </row>
1572               <row><entry></entry></row>
1573               <row id="v4l2-mpeg-video-dec-pts">
1574                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant>&nbsp;</entry>
1575                 <entry>integer64</entry>
1576               </row><row><entry spanname="descr">This read-only control returns the
1577 33-bit video Presentation Time Stamp as defined in ITU T-REC-H.222.0 and ISO/IEC 13818-1 of
1578 the currently displayed frame. This is the same PTS as is used in &VIDIOC-DECODER-CMD;.</entry>
1579               </row>
1580               <row><entry></entry></row>
1581               <row id="v4l2-mpeg-video-dec-frame">
1582                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant>&nbsp;</entry>
1583                 <entry>integer64</entry>
1584               </row><row><entry spanname="descr">This read-only control returns the
1585 frame counter of the frame that is currently displayed (decoded). This value is reset to 0 whenever
1586 the decoder is started.</entry>
1587               </row>
1588
1589
1590               <row><entry></entry></row>
1591               <row>
1592                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE</constant>&nbsp;</entry>
1593                 <entry>boolean</entry>
1594               </row>
1595               <row><entry spanname="descr">If enabled the decoder expects to receive a single slice per buffer, otherwise
1596 the decoder expects a single frame in per buffer. Applicable to the decoder, all codecs.
1597 </entry>
1598               </row>
1599
1600               <row><entry></entry></row>
1601               <row>
1602                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE</constant>&nbsp;</entry>
1603                 <entry>boolean</entry>
1604               </row>
1605               <row><entry spanname="descr">Enable writing sample aspect ratio in the Video Usability Information.
1606 Applicable to the H264 encoder.</entry>
1607               </row>
1608
1609               <row><entry></entry></row>
1610               <row id="v4l2-mpeg-video-h264-vui-sar-idc">
1611                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant>&nbsp;</entry>
1612                 <entry>enum&nbsp;v4l2_mpeg_video_h264_vui_sar_idc</entry>
1613               </row>
1614               <row><entry spanname="descr">VUI sample aspect ratio indicator for H.264 encoding. The value
1615 is defined in the table E-1 in the standard. Applicable to the H264 encoder.</entry>
1616               </row>
1617               <row>
1618                 <entrytbl spanname="descr" cols="2">
1619                   <tbody valign="top">
1620
1621                         <row>
1622                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED</constant>&nbsp;</entry>
1623                           <entry>Unspecified</entry>
1624                         </row>
1625                         <row>
1626                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1</constant>&nbsp;</entry>
1627                           <entry>1x1</entry>
1628                         </row>
1629                         <row>
1630                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11</constant>&nbsp;</entry>
1631                           <entry>12x11</entry>
1632                         </row>
1633                         <row>
1634                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11</constant>&nbsp;</entry>
1635                           <entry>10x11</entry>
1636                         </row>
1637                         <row>
1638                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11</constant>&nbsp;</entry>
1639                           <entry>16x11</entry>
1640                         </row>
1641                         <row>
1642                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33</constant>&nbsp;</entry>
1643                           <entry>40x33</entry>
1644                         </row>
1645                         <row>
1646                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11</constant>&nbsp;</entry>
1647                           <entry>24x11</entry>
1648                         </row>
1649                         <row>
1650                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11</constant>&nbsp;</entry>
1651                           <entry>20x11</entry>
1652                         </row>
1653                         <row>
1654                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11</constant>&nbsp;</entry>
1655                           <entry>32x11</entry>
1656                         </row>
1657                         <row>
1658                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33</constant>&nbsp;</entry>
1659                           <entry>80x33</entry>
1660                         </row>
1661                         <row>
1662                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11</constant>&nbsp;</entry>
1663                           <entry>18x11</entry>
1664                         </row>
1665                         <row>
1666                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11</constant>&nbsp;</entry>
1667                           <entry>15x11</entry>
1668                         </row>
1669                         <row>
1670                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33</constant>&nbsp;</entry>
1671                           <entry>64x33</entry>
1672                         </row>
1673                         <row>
1674                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99</constant>&nbsp;</entry>
1675                           <entry>160x99</entry>
1676                         </row>
1677                         <row>
1678                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3</constant>&nbsp;</entry>
1679                           <entry>4x3</entry>
1680                         </row>
1681                         <row>
1682                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2</constant>&nbsp;</entry>
1683                           <entry>3x2</entry>
1684                         </row>
1685                         <row>
1686                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1</constant>&nbsp;</entry>
1687                           <entry>2x1</entry>
1688                         </row>
1689                         <row>
1690                           <entry><constant>V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED</constant>&nbsp;</entry>
1691                           <entry>Extended SAR</entry>
1692                         </row>
1693                   </tbody>
1694                 </entrytbl>
1695               </row>
1696
1697               <row><entry></entry></row>
1698               <row>
1699                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH</constant>&nbsp;</entry>
1700                 <entry>integer</entry>
1701               </row>
1702               <row><entry spanname="descr">Extended sample aspect ratio width for H.264 VUI encoding.
1703 Applicable to the H264 encoder.</entry>
1704               </row>
1705
1706               <row><entry></entry></row>
1707               <row>
1708                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT</constant>&nbsp;</entry>
1709                 <entry>integer</entry>
1710               </row>
1711               <row><entry spanname="descr">Extended sample aspect ratio height for H.264 VUI encoding.
1712 Applicable to the H264 encoder.</entry>
1713               </row>
1714
1715               <row><entry></entry></row>
1716               <row id="v4l2-mpeg-video-h264-level">
1717                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant>&nbsp;</entry>
1718                 <entry>enum&nbsp;v4l2_mpeg_video_h264_level</entry>
1719               </row>
1720               <row><entry spanname="descr">The level information for the H264 video elementary stream.
1721 Applicable to the H264 encoder.
1722 Possible values are:</entry>
1723               </row>
1724               <row>
1725                 <entrytbl spanname="descr" cols="2">
1726                   <tbody valign="top">
1727                     <row>
1728                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_0</constant>&nbsp;</entry>
1729                       <entry>Level 1.0</entry>
1730                     </row>
1731                     <row>
1732                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1B</constant>&nbsp;</entry>
1733                       <entry>Level 1B</entry>
1734                     </row>
1735                     <row>
1736                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_1</constant>&nbsp;</entry>
1737                       <entry>Level 1.1</entry>
1738                     </row>
1739                     <row>
1740                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_2</constant>&nbsp;</entry>
1741                       <entry>Level 1.2</entry>
1742                     </row>
1743                     <row>
1744                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_1_3</constant>&nbsp;</entry>
1745                       <entry>Level 1.3</entry>
1746                     </row>
1747                     <row>
1748                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_0</constant>&nbsp;</entry>
1749                       <entry>Level 2.0</entry>
1750                     </row>
1751                     <row>
1752                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_1</constant>&nbsp;</entry>
1753                       <entry>Level 2.1</entry>
1754                     </row>
1755                     <row>
1756                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_2_2</constant>&nbsp;</entry>
1757                       <entry>Level 2.2</entry>
1758                     </row>
1759                     <row>
1760                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_0</constant>&nbsp;</entry>
1761                       <entry>Level 3.0</entry>
1762                     </row>
1763                     <row>
1764                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_1</constant>&nbsp;</entry>
1765                       <entry>Level 3.1</entry>
1766                     </row>
1767                     <row>
1768                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_3_2</constant>&nbsp;</entry>
1769                       <entry>Level 3.2</entry>
1770                     </row>
1771                     <row>
1772                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_0</constant>&nbsp;</entry>
1773                       <entry>Level 4.0</entry>
1774                     </row>
1775                     <row>
1776                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_1</constant>&nbsp;</entry>
1777                       <entry>Level 4.1</entry>
1778                     </row>
1779                     <row>
1780                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_4_2</constant>&nbsp;</entry>
1781                       <entry>Level 4.2</entry>
1782                     </row>
1783                     <row>
1784                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_5_0</constant>&nbsp;</entry>
1785                       <entry>Level 5.0</entry>
1786                     </row>
1787                     <row>
1788                       <entry><constant>V4L2_MPEG_VIDEO_H264_LEVEL_5_1</constant>&nbsp;</entry>
1789                       <entry>Level 5.1</entry>
1790                     </row>
1791                   </tbody>
1792                 </entrytbl>
1793               </row>
1794
1795               <row><entry></entry></row>
1796               <row id="v4l2-mpeg-video-mpeg4-level">
1797                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant>&nbsp;</entry>
1798                 <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_level</entry>
1799               </row>
1800               <row><entry spanname="descr">The level information for the MPEG4 elementary stream.
1801 Applicable to the MPEG4 encoder.
1802 Possible values are:</entry>
1803               </row>
1804               <row>
1805                 <entrytbl spanname="descr" cols="2">
1806                   <tbody valign="top">
1807                     <row>
1808                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_0</constant>&nbsp;</entry>
1809                       <entry>Level 0</entry>
1810                     </row>
1811                     <row>
1812                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_0B</constant>&nbsp;</entry>
1813                       <entry>Level 0b</entry>
1814                     </row>
1815                     <row>
1816                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_1</constant>&nbsp;</entry>
1817                       <entry>Level 1</entry>
1818                     </row>
1819                     <row>
1820                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_2</constant>&nbsp;</entry>
1821                       <entry>Level 2</entry>
1822                     </row>
1823                     <row>
1824                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_3</constant>&nbsp;</entry>
1825                       <entry>Level 3</entry>
1826                     </row>
1827                     <row>
1828                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_3B</constant>&nbsp;</entry>
1829                       <entry>Level 3b</entry>
1830                     </row>
1831                     <row>
1832                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_4</constant>&nbsp;</entry>
1833                       <entry>Level 4</entry>
1834                     </row>
1835                     <row>
1836                       <entry><constant>V4L2_MPEG_VIDEO_LEVEL_5</constant>&nbsp;</entry>
1837                       <entry>Level 5</entry>
1838                     </row>
1839                   </tbody>
1840                 </entrytbl>
1841               </row>
1842
1843               <row><entry></entry></row>
1844               <row id="v4l2-mpeg-video-h264-profile">
1845                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant>&nbsp;</entry>
1846                 <entry>enum&nbsp;v4l2_mpeg_video_h264_profile</entry>
1847               </row>
1848               <row><entry spanname="descr">The profile information for H264.
1849 Applicable to the H264 encoder.
1850 Possible values are:</entry>
1851               </row>
1852               <row>
1853                 <entrytbl spanname="descr" cols="2">
1854                   <tbody valign="top">
1855                     <row>
1856                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE</constant>&nbsp;</entry>
1857                       <entry>Baseline profile</entry>
1858                     </row>
1859                     <row>
1860                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE</constant>&nbsp;</entry>
1861                       <entry>Constrained Baseline profile</entry>
1862                     </row>
1863                     <row>
1864                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_MAIN</constant>&nbsp;</entry>
1865                       <entry>Main profile</entry>
1866                     </row>
1867                     <row>
1868                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED</constant>&nbsp;</entry>
1869                       <entry>Extended profile</entry>
1870                     </row>
1871                     <row>
1872                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH</constant>&nbsp;</entry>
1873                       <entry>High profile</entry>
1874                     </row>
1875                     <row>
1876                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10</constant>&nbsp;</entry>
1877                       <entry>High 10 profile</entry>
1878                     </row>
1879                     <row>
1880                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422</constant>&nbsp;</entry>
1881                       <entry>High 422 profile</entry>
1882                     </row>
1883                     <row>
1884                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE</constant>&nbsp;</entry>
1885                       <entry>High 444 Predictive profile</entry>
1886                     </row>
1887                     <row>
1888                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA</constant>&nbsp;</entry>
1889                       <entry>High 10 Intra profile</entry>
1890                     </row>
1891                     <row>
1892                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA</constant>&nbsp;</entry>
1893                       <entry>High 422 Intra profile</entry>
1894                     </row>
1895                     <row>
1896                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA</constant>&nbsp;</entry>
1897                       <entry>High 444 Intra profile</entry>
1898                     </row>
1899                     <row>
1900                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA</constant>&nbsp;</entry>
1901                       <entry>CAVLC 444 Intra profile</entry>
1902                     </row>
1903                     <row>
1904                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE</constant>&nbsp;</entry>
1905                       <entry>Scalable Baseline profile</entry>
1906                     </row>
1907                     <row>
1908                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH</constant>&nbsp;</entry>
1909                       <entry>Scalable High profile</entry>
1910                     </row>
1911                     <row>
1912                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA</constant>&nbsp;</entry>
1913                       <entry>Scalable High Intra profile</entry>
1914                     </row>
1915                     <row>
1916                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH</constant>&nbsp;</entry>
1917                       <entry>Stereo High profile</entry>
1918                     </row>
1919                     <row>
1920                       <entry><constant>V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH</constant>&nbsp;</entry>
1921                       <entry>Multiview High profile</entry>
1922                     </row>
1923
1924                   </tbody>
1925                 </entrytbl>
1926               </row>
1927
1928               <row><entry></entry></row>
1929               <row id="v4l2-mpeg-video-mpeg4-profile">
1930                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant>&nbsp;</entry>
1931                 <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_profile</entry>
1932               </row>
1933               <row><entry spanname="descr">The profile information for MPEG4.
1934 Applicable to the MPEG4 encoder.
1935 Possible values are:</entry>
1936               </row>
1937               <row>
1938                 <entrytbl spanname="descr" cols="2">
1939                   <tbody valign="top">
1940                     <row>
1941                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_SIMPLE</constant>&nbsp;</entry>
1942                       <entry>Simple profile</entry>
1943                     </row>
1944                     <row>
1945                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_ADVANCED_SIMPLE</constant>&nbsp;</entry>
1946                       <entry>Advanced Simple profile</entry>
1947                     </row>
1948                     <row>
1949                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_CORE</constant>&nbsp;</entry>
1950                       <entry>Core profile</entry>
1951                     </row>
1952                     <row>
1953                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_SIMPLE_SCALABLE</constant>&nbsp;</entry>
1954                       <entry>Simple Scalable profile</entry>
1955                     </row>
1956                     <row>
1957                       <entry><constant>V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY</constant>&nbsp;</entry>
1958                       <entry></entry>
1959                     </row>
1960                   </tbody>
1961                 </entrytbl>
1962               </row>
1963
1964               <row><entry></entry></row>
1965               <row>
1966                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MAX_REF_PIC</constant>&nbsp;</entry>
1967                 <entry>integer</entry>
1968               </row>
1969               <row><entry spanname="descr">The maximum number of reference pictures used for encoding.
1970 Applicable to the encoder.
1971 </entry>
1972               </row>
1973
1974               <row><entry></entry></row>
1975               <row id="v4l2-mpeg-video-multi-slice-mode">
1976                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant>&nbsp;</entry>
1977                 <entry>enum&nbsp;v4l2_mpeg_video_multi_slice_mode</entry>
1978               </row>
1979               <row><entry spanname="descr">Determines how the encoder should handle division of frame into slices.
1980 Applicable to the encoder.
1981 Possible values are:</entry>
1982               </row>
1983               <row>
1984                 <entrytbl spanname="descr" cols="2">
1985                   <tbody valign="top">
1986                     <row>
1987                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE</constant>&nbsp;</entry>
1988                       <entry>Single slice per frame.</entry>
1989                     </row>
1990                     <row>
1991                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB</constant>&nbsp;</entry>
1992                       <entry>Multiple slices with set maximum number of macroblocks per slice.</entry>
1993                     </row>
1994                     <row>
1995                       <entry><constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES</constant>&nbsp;</entry>
1996                       <entry>Multiple slice with set maximum size in bytes per slice.</entry>
1997                     </row>
1998                   </tbody>
1999                 </entrytbl>
2000               </row>
2001
2002               <row><entry></entry></row>
2003               <row>
2004                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB</constant>&nbsp;</entry>
2005                 <entry>integer</entry>
2006               </row>
2007               <row><entry spanname="descr">The maximum number of macroblocks in a slice. Used when
2008 <constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant> is set to <constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB</constant>.
2009 Applicable to the encoder.</entry>
2010               </row>
2011
2012               <row><entry></entry></row>
2013               <row>
2014                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES</constant>&nbsp;</entry>
2015                 <entry>integer</entry>
2016               </row>
2017               <row><entry spanname="descr">The maximum size of a slice in bytes. Used when
2018 <constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant> is set to <constant>V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES</constant>.
2019 Applicable to the encoder.</entry>
2020               </row>
2021
2022               <row><entry></entry></row>
2023               <row id="v4l2-mpeg-video-h264-loop-filter-mode">
2024                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant>&nbsp;</entry>
2025                 <entry>enum&nbsp;v4l2_mpeg_video_h264_loop_filter_mode</entry>
2026               </row>
2027               <row><entry spanname="descr">Loop filter mode for H264 encoder.
2028 Possible values are:</entry>
2029               </row>
2030               <row>
2031                 <entrytbl spanname="descr" cols="2">
2032                   <tbody valign="top">
2033                     <row>
2034                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED</constant>&nbsp;</entry>
2035                       <entry>Loop filter is enabled.</entry>
2036                     </row>
2037                     <row>
2038                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED</constant>&nbsp;</entry>
2039                       <entry>Loop filter is disabled.</entry>
2040                     </row>
2041                     <row>
2042                       <entry><constant>V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY</constant>&nbsp;</entry>
2043                       <entry>Loop filter is disabled at the slice boundary.</entry>
2044                     </row>
2045                   </tbody>
2046                 </entrytbl>
2047               </row>
2048
2049               <row><entry></entry></row>
2050               <row>
2051                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA</constant>&nbsp;</entry>
2052                 <entry>integer</entry>
2053               </row>
2054               <row><entry spanname="descr">Loop filter alpha coefficient, defined in the H264 standard.
2055 Applicable to the H264 encoder.</entry>
2056               </row>
2057
2058               <row><entry></entry></row>
2059               <row>
2060                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA</constant>&nbsp;</entry>
2061                 <entry>integer</entry>
2062               </row>
2063               <row><entry spanname="descr">Loop filter beta coefficient, defined in the H264 standard.
2064 Applicable to the H264 encoder.</entry>
2065               </row>
2066
2067               <row><entry></entry></row>
2068               <row id="v4l2-mpeg-video-h264-entropy-mode">
2069                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant>&nbsp;</entry>
2070                 <entry>enum&nbsp;v4l2_mpeg_video_h264_entropy_mode</entry>
2071               </row>
2072               <row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC.
2073 Applicable to the H264 encoder.
2074 Possible values are:</entry>
2075               </row>
2076               <row>
2077                 <entrytbl spanname="descr" cols="2">
2078                   <tbody valign="top">
2079                     <row>
2080                       <entry><constant>V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC</constant>&nbsp;</entry>
2081                       <entry>Use CAVLC entropy coding.</entry>
2082                     </row>
2083                     <row>
2084                       <entry><constant>V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC</constant>&nbsp;</entry>
2085                       <entry>Use CABAC entropy coding.</entry>
2086                     </row>
2087                   </tbody>
2088                 </entrytbl>
2089               </row>
2090
2091               <row><entry></entry></row>
2092               <row>
2093                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM</constant>&nbsp;</entry>
2094                 <entry>boolean</entry>
2095               </row>
2096               <row><entry spanname="descr">Enable 8X8 transform for H264. Applicable to the H264 encoder.</entry>
2097               </row>
2098
2099               <row><entry></entry></row>
2100               <row>
2101                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB</constant>&nbsp;</entry>
2102                 <entry>integer</entry>
2103               </row>
2104               <row><entry spanname="descr">Cyclic intra macroblock refresh. This is the number of continuous macroblocks
2105 refreshed every frame. Each frame a successive set of macroblocks is refreshed until the cycle completes and starts from the
2106 top of the frame. Applicable to H264, H263 and MPEG4 encoder.</entry>
2107               </row>
2108
2109               <row><entry></entry></row>
2110               <row>
2111                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE</constant>&nbsp;</entry>
2112                 <entry>boolean</entry>
2113               </row>
2114               <row><entry spanname="descr">Frame level rate control enable.
2115 If this control is disabled then the quantization parameter for each frame type is constant and set with appropriate controls
2116 (e.g. <constant>V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP</constant>).
2117 If frame rate control is enabled then quantization parameter is adjusted to meet the chosen bitrate. Minimum and maximum value
2118 for the quantization parameter can be set with appropriate controls (e.g. <constant>V4L2_CID_MPEG_VIDEO_H263_MIN_QP</constant>).
2119 Applicable to encoders.</entry>
2120               </row>
2121
2122               <row><entry></entry></row>
2123               <row>
2124                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>&nbsp;</entry>
2125                 <entry>boolean</entry>
2126               </row>
2127               <row><entry spanname="descr">Macroblock level rate control enable.
2128 Applicable to the MPEG4 and H264 encoders.</entry>
2129               </row>
2130
2131               <row><entry></entry></row>
2132               <row>
2133                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_QPEL</constant>&nbsp;</entry>
2134                 <entry>boolean</entry>
2135               </row>
2136               <row><entry spanname="descr">Quarter pixel motion estimation for MPEG4. Applicable to the MPEG4 encoder.</entry>
2137               </row>
2138
2139               <row><entry></entry></row>
2140               <row>
2141                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP</constant>&nbsp;</entry>
2142                 <entry>integer</entry>
2143               </row>
2144               <row><entry spanname="descr">Quantization parameter for an I frame for H263. Valid range: from 1 to 31.</entry>
2145               </row>
2146
2147               <row><entry></entry></row>
2148               <row>
2149                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_MIN_QP</constant>&nbsp;</entry>
2150                 <entry>integer</entry>
2151               </row>
2152               <row><entry spanname="descr">Minimum quantization parameter for H263. Valid range: from 1 to 31.</entry>
2153               </row>
2154
2155               <row><entry></entry></row>
2156               <row>
2157                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_MAX_QP</constant>&nbsp;</entry>
2158                 <entry>integer</entry>
2159               </row>
2160               <row><entry spanname="descr">Maximum quantization parameter for H263. Valid range: from 1 to 31.</entry>
2161               </row>
2162
2163               <row><entry></entry></row>
2164               <row>
2165                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP</constant>&nbsp;</entry>
2166                 <entry>integer</entry>
2167               </row>
2168               <row><entry spanname="descr">Quantization parameter for an P frame for H263. Valid range: from 1 to 31.</entry>
2169               </row>
2170
2171               <row><entry></entry></row>
2172               <row>
2173                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP</constant>&nbsp;</entry>
2174                 <entry>integer</entry>
2175               </row>
2176               <row><entry spanname="descr">Quantization parameter for an B frame for H263. Valid range: from 1 to 31.</entry>
2177               </row>
2178
2179               <row><entry></entry></row>
2180               <row>
2181                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP</constant>&nbsp;</entry>
2182                 <entry>integer</entry>
2183               </row>
2184               <row><entry spanname="descr">Quantization parameter for an I frame for H264. Valid range: from 0 to 51.</entry>
2185               </row>
2186
2187               <row><entry></entry></row>
2188               <row>
2189                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_MIN_QP</constant>&nbsp;</entry>
2190                 <entry>integer</entry>
2191               </row>
2192               <row><entry spanname="descr">Minimum quantization parameter for H264. Valid range: from 0 to 51.</entry>
2193               </row>
2194
2195               <row><entry></entry></row>
2196               <row>
2197                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_MAX_QP</constant>&nbsp;</entry>
2198                 <entry>integer</entry>
2199               </row>
2200               <row><entry spanname="descr">Maximum quantization parameter for H264. Valid range: from 0 to 51.</entry>
2201               </row>
2202
2203               <row><entry></entry></row>
2204               <row>
2205                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP</constant>&nbsp;</entry>
2206                 <entry>integer</entry>
2207               </row>
2208               <row><entry spanname="descr">Quantization parameter for an P frame for H264. Valid range: from 0 to 51.</entry>
2209               </row>
2210
2211               <row><entry></entry></row>
2212               <row>
2213                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP</constant>&nbsp;</entry>
2214                 <entry>integer</entry>
2215               </row>
2216               <row><entry spanname="descr">Quantization parameter for an B frame for H264. Valid range: from 0 to 51.</entry>
2217               </row>
2218
2219               <row><entry></entry></row>
2220               <row>
2221                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP</constant>&nbsp;</entry>
2222                 <entry>integer</entry>
2223               </row>
2224               <row><entry spanname="descr">Quantization parameter for an I frame for MPEG4. Valid range: from 1 to 31.</entry>
2225               </row>
2226
2227               <row><entry></entry></row>
2228               <row>
2229                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP</constant>&nbsp;</entry>
2230                 <entry>integer</entry>
2231               </row>
2232               <row><entry spanname="descr">Minimum quantization parameter for MPEG4. Valid range: from 1 to 31.</entry>
2233               </row>
2234
2235               <row><entry></entry></row>
2236               <row>
2237                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP</constant>&nbsp;</entry>
2238                 <entry>integer</entry>
2239               </row>
2240               <row><entry spanname="descr">Maximum quantization parameter for MPEG4. Valid range: from 1 to 31.</entry>
2241               </row>
2242
2243               <row><entry></entry></row>
2244               <row>
2245                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP</constant>&nbsp;</entry>
2246                 <entry>integer</entry>
2247               </row>
2248               <row><entry spanname="descr">Quantization parameter for an P frame for MPEG4. Valid range: from 1 to 31.</entry>
2249               </row>
2250
2251               <row><entry></entry></row>
2252               <row>
2253                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP</constant>&nbsp;</entry>
2254                 <entry>integer</entry>
2255               </row>
2256               <row><entry spanname="descr">Quantization parameter for an B frame for MPEG4. Valid range: from 1 to 31.</entry>
2257               </row>
2258
2259               <row><entry></entry></row>
2260               <row>
2261                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VBV_SIZE</constant>&nbsp;</entry>
2262                 <entry>integer</entry>
2263               </row>
2264               <row><entry spanname="descr">The Video Buffer Verifier size in kilobytes, it is used as a limitation of frame skip.
2265 The VBV is defined in the standard as a mean to verify that the produced stream will be successfully decoded.
2266 The standard describes it as "Part of a hypothetical decoder that is conceptually connected to the
2267 output of the encoder. Its purpose is to provide a constraint on the variability of the data rate that an
2268 encoder or editing process may produce.".
2269 Applicable to the MPEG1, MPEG2, MPEG4 encoders.</entry>
2270               </row>
2271
2272               <row><entry></entry></row>
2273               <row>
2274                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant>&nbsp;</entry>
2275                 <entry>integer</entry>
2276               </row>
2277               <row><entry spanname="descr">The Coded Picture Buffer size in kilobytes, it is used as a limitation of frame skip.
2278 The CPB is defined in the H264 standard as a mean to verify that the produced stream will be successfully decoded.
2279 Applicable to the H264 encoder.</entry>
2280               </row>
2281
2282               <row><entry></entry></row>
2283               <row>
2284                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_I_PERIOD</constant>&nbsp;</entry>
2285                 <entry>integer</entry>
2286               </row>
2287               <row><entry spanname="descr">Period between I-frames in the open GOP for H264. In case of an open GOP
2288 this is the period between two I-frames. The period between IDR (Instantaneous Decoding Refresh) frames is taken from the GOP_SIZE control.
2289 An IDR frame, which stands for Instantaneous Decoding Refresh is an I-frame after which no prior frames are
2290 referenced. This means that a stream can be restarted from an IDR frame without the need to store or decode any
2291 previous frames. Applicable to the H264 encoder.</entry>
2292               </row>
2293
2294               <row><entry></entry></row>
2295               <row id="v4l2-mpeg-video-header-mode">
2296                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant>&nbsp;</entry>
2297                 <entry>enum&nbsp;v4l2_mpeg_video_header_mode</entry>
2298               </row>
2299               <row><entry spanname="descr">Determines whether the header is returned as the first buffer or is
2300 it returned together with the first frame. Applicable to encoders.
2301 Possible values are:</entry>
2302               </row>
2303               <row>
2304                 <entrytbl spanname="descr" cols="2">
2305                   <tbody valign="top">
2306                     <row>
2307                       <entry><constant>V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE</constant>&nbsp;</entry>
2308                       <entry>The stream header is returned separately in the first buffer.</entry>
2309                     </row>
2310                     <row>
2311                       <entry><constant>V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME</constant>&nbsp;</entry>
2312                       <entry>The stream header is returned together with the first encoded frame.</entry>
2313                     </row>
2314                   </tbody>
2315                 </entrytbl>
2316               </row>
2317               <row><entry></entry></row>
2318               <row>
2319                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER</constant>&nbsp;</entry>
2320                 <entry>boolean</entry>
2321               </row><row><entry spanname="descr">Enabled the deblocking post processing filter for MPEG4 decoder.
2322 Applicable to the MPEG4 decoder.</entry>
2323               </row>
2324               <row><entry></entry></row>
2325               <row>
2326                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_RES</constant>&nbsp;</entry>
2327                 <entry>integer</entry>
2328               </row><row><entry spanname="descr">vop_time_increment_resolution value for MPEG4. Applicable to the MPEG4 encoder.</entry>
2329               </row>
2330               <row><entry></entry></row>
2331               <row>
2332                 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_VOP_TIME_INC</constant>&nbsp;</entry>
2333                 <entry>integer</entry>
2334               </row><row><entry spanname="descr">vop_time_increment value for MPEG4. Applicable to the MPEG4 encoder.</entry>
2335               </row>
2336
2337             </tbody>
2338           </tgroup>
2339         </table>
2340       </section>
2341
2342       <section>
2343         <title>MFC 5.1 MPEG Controls</title>
2344
2345         <para>The following MPEG class controls deal with MPEG
2346 decoding and encoding settings that are specific to the Multi Format Codec 5.1 device present
2347 in the S5P family of SoCs by Samsung.
2348 </para>
2349
2350         <table pgwide="1" frame="none" id="mfc51-control-id">
2351           <title>MFC 5.1 Control IDs</title>
2352           <tgroup cols="4">
2353             <colspec colname="c1" colwidth="1*" />
2354             <colspec colname="c2" colwidth="6*" />
2355             <colspec colname="c3" colwidth="2*" />
2356             <colspec colname="c4" colwidth="6*" />
2357             <spanspec namest="c1" nameend="c2" spanname="id" />
2358             <spanspec namest="c2" nameend="c4" spanname="descr" />
2359             <thead>
2360               <row>
2361                 <entry spanname="id" align="left">ID</entry>
2362                 <entry align="left">Type</entry>
2363               </row><row><entry spanname="descr" align="left">Description</entry>
2364               </row>
2365             </thead>
2366             <tbody valign="top">
2367               <row><entry></entry></row>
2368               <row>
2369                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE</constant>&nbsp;</entry>
2370                 <entry>integer</entry>
2371               </row><row><entry spanname="descr">If the display delay is enabled then the decoder has to return a
2372 CAPTURE buffer after processing a certain number of OUTPUT buffers. If this number is low, then it may result in
2373 buffers not being dequeued in display order. In addition hardware may still use those buffers as reference, thus
2374 application should not write to those buffers. This feature can be used for example for generating thumbnails of videos.
2375 Applicable to the H264 decoder.
2376               </entry>
2377               </row>
2378               <row><entry></entry></row>
2379               <row>
2380                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY</constant>&nbsp;</entry>
2381                 <entry>integer</entry>
2382               </row><row><entry spanname="descr">Display delay value for H264 decoder.
2383 The decoder is forced to return a decoded frame after the set 'display delay' number of frames. If this number is
2384 low it may result in frames returned out of dispaly order, in addition the hardware may still be using the returned buffer
2385 as a reference picture for subsequent frames.
2386 </entry>
2387               </row>
2388               <row><entry></entry></row>
2389               <row>
2390                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P</constant>&nbsp;</entry>
2391                 <entry>integer</entry>
2392               </row><row><entry spanname="descr">The number of reference pictures used for encoding a P picture.
2393 Applicable to the H264 encoder.</entry>
2394               </row>
2395               <row><entry></entry></row>
2396               <row>
2397                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_PADDING</constant>&nbsp;</entry>
2398                 <entry>boolean</entry>
2399               </row><row><entry spanname="descr">Padding enable in the encoder - use a color instead of repeating border pixels.
2400 Applicable to encoders.</entry>
2401               </row>
2402               <row><entry></entry></row>
2403               <row>
2404                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV</constant>&nbsp;</entry>
2405                 <entry>integer</entry>
2406               </row><row><entry spanname="descr">Padding color in the encoder. Applicable to encoders. The supplied 32-bit integer is interpreted as follows (bit
2407 0 = least significant bit):</entry>
2408               </row>
2409               <row>
2410                 <entrytbl spanname="descr" cols="2">
2411                   <tbody valign="top">
2412                     <row>
2413                       <entry>Bit 0:7</entry>
2414                       <entry>V chrominance information</entry>
2415                     </row>
2416                     <row>
2417                       <entry>Bit 8:15</entry>
2418                       <entry>U chrominance information</entry>
2419                     </row>
2420                     <row>
2421                       <entry>Bit 16:23</entry>
2422                       <entry>Y luminance information</entry>
2423                     </row>
2424                     <row>
2425                       <entry>Bit 24:31</entry>
2426                       <entry>Must be zero.</entry>
2427                     </row>
2428                   </tbody>
2429                 </entrytbl>
2430               </row>
2431               <row><entry></entry></row>
2432               <row>
2433                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF</constant>&nbsp;</entry>
2434                 <entry>integer</entry>
2435               </row><row><entry spanname="descr">Reaction coefficient for MFC rate control. Applicable to encoders.
2436 <para>Note 1: Valid only when the frame level RC is enabled.</para>
2437 <para>Note 2: For tight CBR, this field must be small (ex. 2 ~ 10).
2438 For VBR, this field must be large (ex. 100 ~ 1000).</para>
2439 <para>Note 3: It is not recommended to use the greater number than FRAME_RATE * (10^9 / BIT_RATE).</para>
2440 </entry>
2441               </row>
2442               <row><entry></entry></row>
2443               <row>
2444                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK</constant>&nbsp;</entry>
2445                 <entry>boolean</entry>
2446               </row><row><entry spanname="descr">Adaptive rate control for dark region.
2447 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2448 Applicable to the H264 encoder.</entry>
2449               </row>
2450               <row><entry></entry></row>
2451               <row>
2452                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH</constant>&nbsp;</entry>
2453                 <entry>boolean</entry>
2454               </row><row><entry spanname="descr">Adaptive rate control for smooth region.
2455 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2456 Applicable to the H264 encoder.</entry>
2457               </row>
2458               <row><entry></entry></row>
2459               <row>
2460                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC</constant>&nbsp;</entry>
2461                 <entry>boolean</entry>
2462               </row><row><entry spanname="descr">Adaptive rate control for static region.
2463 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2464 Applicable to the H264 encoder.</entry>
2465               </row>
2466               <row><entry></entry></row>
2467               <row>
2468                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY</constant>&nbsp;</entry>
2469                 <entry>boolean</entry>
2470               </row><row><entry spanname="descr">Adaptive rate control for activity region.
2471 Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE</constant>).
2472 Applicable to the H264 encoder.</entry>
2473               </row>
2474               <row><entry></entry></row>
2475               <row id="v4l2-mpeg-mfc51-video-frame-skip-mode">
2476                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant>&nbsp;</entry>
2477                 <entry>enum&nbsp;v4l2_mpeg_mfc51_video_frame_skip_mode</entry>
2478               </row>
2479               <row><entry spanname="descr">
2480 Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then
2481 a chosen data limit then the frame will be skipped.
2482 Possible values are:</entry>
2483               </row>
2484               <row>
2485                 <entrytbl spanname="descr" cols="2">
2486                   <tbody valign="top">
2487                     <row>
2488                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED</constant>&nbsp;</entry>
2489                       <entry>Frame skip mode is disabled.</entry>
2490                     </row>
2491                     <row>
2492                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT</constant>&nbsp;</entry>
2493                       <entry>Frame skip mode enabled and buffer limit is set by the chosen level and is defined by the standard.</entry>
2494                     </row>
2495                     <row>
2496                       <entry><constant>V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT</constant>&nbsp;</entry>
2497                       <entry>Frame skip mode enabled and buffer limit is set by the VBV (MPEG1/2/4) or CPB (H264) buffer size control.</entry>
2498                     </row>
2499                   </tbody>
2500                 </entrytbl>
2501               </row>
2502               <row><entry></entry></row>
2503               <row>
2504                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT</constant>&nbsp;</entry>
2505                 <entry>integer</entry>
2506               </row><row><entry spanname="descr">Enable rate-control with fixed target bit.
2507 If this setting is enabled, then the rate control logic of the encoder will calculate the average bitrate
2508 for a GOP and keep it below or equal the set bitrate target. Otherwise the rate control logic calculates the
2509 overall average bitrate for the stream and keeps it below or equal to the set bitrate. In the first case
2510 the average bitrate for the whole stream will be smaller then the set bitrate. This is caused because the
2511 average is calculated for smaller number of frames, on the other hand enabling this setting will ensure that
2512 the stream will meet tight bandwidth contraints. Applicable to encoders.
2513 </entry>
2514               </row>
2515               <row><entry></entry></row>
2516               <row id="v4l2-mpeg-mfc51-video-force-frame-type">
2517                 <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant>&nbsp;</entry>
2518                 <entry>enum&nbsp;v4l2_mpeg_mfc51_video_force_frame_type</entry>
2519               </row>
2520               <row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders.
2521 Possible values are:</entry>
2522               </row>
2523               <row>
2524                 <entrytbl spanname="descr" cols="2">
2525                   <tbody valign="top">
2526                     <row>
2527                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED</constant>&nbsp;</entry>
2528                       <entry>Forcing a specific frame type disabled.</entry>
2529                     </row>
2530                     <row>
2531                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME</constant>&nbsp;</entry>
2532                       <entry>Force an I-frame.</entry>
2533                     </row>
2534                     <row>
2535                       <entry><constant>V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED</constant>&nbsp;</entry>
2536                       <entry>Force a non-coded frame.</entry>
2537                     </row>
2538                   </tbody>
2539                 </entrytbl>
2540               </row>
2541             </tbody>
2542           </tgroup>
2543         </table>
2544       </section>
2545
2546       <section>
2547         <title>CX2341x MPEG Controls</title>
2548
2549         <para>The following MPEG class controls deal with MPEG
2550 encoding settings that are specific to the Conexant CX23415 and
2551 CX23416 MPEG encoding chips.</para>
2552
2553         <table pgwide="1" frame="none" id="cx2341x-control-id">
2554           <title>CX2341x Control IDs</title>
2555           <tgroup cols="4">
2556             <colspec colname="c1" colwidth="1*" />
2557             <colspec colname="c2" colwidth="6*" />
2558             <colspec colname="c3" colwidth="2*" />
2559             <colspec colname="c4" colwidth="6*" />
2560             <spanspec namest="c1" nameend="c2" spanname="id" />
2561             <spanspec namest="c2" nameend="c4" spanname="descr" />
2562             <thead>
2563               <row>
2564                 <entry spanname="id" align="left">ID</entry>
2565                 <entry align="left">Type</entry>
2566               </row><row><entry spanname="descr" align="left">Description</entry>
2567               </row>
2568             </thead>
2569             <tbody valign="top">
2570               <row><entry></entry></row>
2571               <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode">
2572                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant>&nbsp;</entry>
2573                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry>
2574               </row><row><entry spanname="descr">Sets the Spatial
2575 Filter mode (default <constant>MANUAL</constant>). Possible values
2576 are:</entry>
2577               </row>
2578               <row>
2579                 <entrytbl spanname="descr" cols="2">
2580                   <tbody valign="top">
2581                     <row>
2582                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
2583                       <entry>Choose the filter manually</entry>
2584                     </row>
2585                     <row>
2586                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
2587                       <entry>Choose the filter automatically</entry>
2588                     </row>
2589                   </tbody>
2590                 </entrytbl>
2591               </row>
2592               <row><entry></entry></row>
2593               <row>
2594                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant>&nbsp;</entry>
2595                 <entry>integer&nbsp;(0-15)</entry>
2596               </row><row><entry spanname="descr">The setting for the
2597 Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry>
2598               </row>
2599               <row><entry></entry></row>
2600               <row id="luma-spatial-filter-type">
2601                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
2602                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry>
2603               </row><row><entry spanname="descr">Select the algorithm
2604 to use for the Luma Spatial Filter (default
2605 <constant>1D_HOR</constant>). Possible values:</entry>
2606               </row>
2607               <row>
2608                 <entrytbl spanname="descr" cols="2">
2609                   <tbody valign="top">
2610                     <row>
2611                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2612                       <entry>No filter</entry>
2613                     </row>
2614                     <row>
2615                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
2616                       <entry>One-dimensional horizontal</entry>
2617                     </row>
2618                     <row>
2619                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant>&nbsp;</entry>
2620                       <entry>One-dimensional vertical</entry>
2621                     </row>
2622                     <row>
2623                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant>&nbsp;</entry>
2624                       <entry>Two-dimensional separable</entry>
2625                     </row>
2626                     <row>
2627                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant>&nbsp;</entry>
2628                       <entry>Two-dimensional symmetrical
2629 non-separable</entry>
2630                     </row>
2631                   </tbody>
2632                 </entrytbl>
2633               </row>
2634               <row><entry></entry></row>
2635               <row id="chroma-spatial-filter-type">
2636                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
2637                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry>
2638               </row><row><entry spanname="descr">Select the algorithm
2639 for the Chroma Spatial Filter (default <constant>1D_HOR</constant>).
2640 Possible values are:</entry>
2641               </row>
2642               <row>
2643                 <entrytbl spanname="descr" cols="2">
2644                   <tbody valign="top">
2645                     <row>
2646                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2647                       <entry>No filter</entry>
2648                     </row>
2649                     <row>
2650                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
2651                       <entry>One-dimensional horizontal</entry>
2652                     </row>
2653                   </tbody>
2654                 </entrytbl>
2655               </row>
2656               <row><entry></entry></row>
2657               <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode">
2658                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant>&nbsp;</entry>
2659                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry>
2660               </row><row><entry spanname="descr">Sets the Temporal
2661 Filter mode (default <constant>MANUAL</constant>). Possible values
2662 are:</entry>
2663               </row>
2664               <row>
2665                 <entrytbl spanname="descr" cols="2">
2666                   <tbody valign="top">
2667                     <row>
2668                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
2669                       <entry>Choose the filter manually</entry>
2670                     </row>
2671                     <row>
2672                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
2673                       <entry>Choose the filter automatically</entry>
2674                     </row>
2675                   </tbody>
2676                 </entrytbl>
2677               </row>
2678               <row><entry></entry></row>
2679               <row>
2680                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant>&nbsp;</entry>
2681                 <entry>integer&nbsp;(0-31)</entry>
2682               </row><row><entry spanname="descr">The setting for the
2683 Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale
2684 capturing and 0 for scaled capturing.)</entry>
2685               </row>
2686               <row><entry></entry></row>
2687               <row id="v4l2-mpeg-cx2341x-video-median-filter-type">
2688                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant>&nbsp;</entry>
2689                 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_median_filter_type</entry>
2690               </row><row><entry spanname="descr">Median Filter Type
2691 (default <constant>OFF</constant>). Possible values are:</entry>
2692               </row>
2693               <row>
2694                 <entrytbl spanname="descr" cols="2">
2695                   <tbody valign="top">
2696                     <row>
2697                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant>&nbsp;</entry>
2698                       <entry>No filter</entry>
2699                     </row>
2700                     <row>
2701                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant>&nbsp;</entry>
2702                       <entry>Horizontal filter</entry>
2703                     </row>
2704                     <row>
2705                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant>&nbsp;</entry>
2706                       <entry>Vertical filter</entry>
2707                     </row>
2708                     <row>
2709                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant>&nbsp;</entry>
2710                       <entry>Horizontal and vertical filter</entry>
2711                     </row>
2712                     <row>
2713                       <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant>&nbsp;</entry>
2714                       <entry>Diagonal filter</entry>
2715                     </row>
2716                   </tbody>
2717                 </entrytbl>
2718               </row>
2719               <row><entry></entry></row>
2720               <row>
2721                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
2722                 <entry>integer&nbsp;(0-255)</entry>
2723               </row><row><entry spanname="descr">Threshold above which
2724 the luminance median filter is enabled (default 0)</entry>
2725               </row>
2726               <row><entry></entry></row>
2727               <row>
2728                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
2729                 <entry>integer&nbsp;(0-255)</entry>
2730               </row><row><entry spanname="descr">Threshold below which
2731 the luminance median filter is enabled (default 255)</entry>
2732               </row>
2733               <row><entry></entry></row>
2734               <row>
2735                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
2736                 <entry>integer&nbsp;(0-255)</entry>
2737               </row><row><entry spanname="descr">Threshold above which
2738 the chroma median filter is enabled (default 0)</entry>
2739               </row>
2740               <row><entry></entry></row>
2741               <row>
2742                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
2743                 <entry>integer&nbsp;(0-255)</entry>
2744               </row><row><entry spanname="descr">Threshold below which
2745 the chroma median filter is enabled (default 255)</entry>
2746               </row>
2747               <row><entry></entry></row>
2748               <row>
2749                 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant>&nbsp;</entry>
2750                 <entry>boolean</entry>
2751               </row>
2752               <row><entry spanname="descr">The CX2341X MPEG encoder
2753 can insert one empty MPEG-2 PES packet into the stream between every
2754 four video frames. The packet size is 2048 bytes, including the
2755 packet_start_code_prefix and stream_id fields. The stream_id is 0xBF
2756 (private stream 2). The payload consists of 0x00 bytes, to be filled
2757 in by the application. 0 = do not insert, 1 = insert packets.</entry>
2758               </row>
2759             </tbody>
2760           </tgroup>
2761         </table>
2762       </section>
2763     </section>
2764
2765     <section id="camera-controls">
2766       <title>Camera Control Reference</title>
2767
2768       <para>The Camera class includes controls for mechanical (or
2769 equivalent digital) features of a device such as controllable lenses
2770 or sensors.</para>
2771
2772     <table pgwide="1" frame="none" id="camera-control-id">
2773       <title>Camera Control IDs</title>
2774       <tgroup cols="4">
2775         <colspec colname="c1" colwidth="1*" />
2776         <colspec colname="c2" colwidth="6*" />
2777         <colspec colname="c3" colwidth="2*" />
2778         <colspec colname="c4" colwidth="6*" />
2779         <spanspec namest="c1" nameend="c2" spanname="id" />
2780         <spanspec namest="c2" nameend="c4" spanname="descr" />
2781         <thead>
2782           <row>
2783             <entry spanname="id" align="left">ID</entry>
2784             <entry align="left">Type</entry>
2785           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
2786           </row>
2787         </thead>
2788         <tbody valign="top">
2789           <row><entry></entry></row>
2790           <row>
2791             <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant>&nbsp;</entry>
2792             <entry>class</entry>
2793           </row><row><entry spanname="descr">The Camera class
2794 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
2795 description of this control class.</entry>
2796           </row>
2797           <row><entry></entry></row>
2798
2799           <row id="v4l2-exposure-auto-type">
2800             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant>&nbsp;</entry>
2801             <entry>enum&nbsp;v4l2_exposure_auto_type</entry>
2802           </row><row><entry spanname="descr">Enables automatic
2803 adjustments of the exposure time and/or iris aperture. The effect of
2804 manual changes of the exposure time or iris aperture while these
2805 features are enabled is undefined, drivers should ignore such
2806 requests. Possible values are:</entry>
2807           </row>
2808           <row>
2809             <entrytbl spanname="descr" cols="2">
2810               <tbody valign="top">
2811                 <row>
2812                   <entry><constant>V4L2_EXPOSURE_AUTO</constant>&nbsp;</entry>
2813                       <entry>Automatic exposure time, automatic iris
2814 aperture.</entry>
2815                 </row>
2816                 <row>
2817                   <entry><constant>V4L2_EXPOSURE_MANUAL</constant>&nbsp;</entry>
2818                   <entry>Manual exposure time, manual iris.</entry>
2819                 </row>
2820                 <row>
2821                   <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant>&nbsp;</entry>
2822                   <entry>Manual exposure time, auto iris.</entry>
2823                 </row>
2824                 <row>
2825                   <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant>&nbsp;</entry>
2826                   <entry>Auto exposure time, manual iris.</entry>
2827                 </row>
2828               </tbody>
2829             </entrytbl>
2830           </row>
2831           <row><entry></entry></row>
2832
2833           <row>
2834             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant>&nbsp;</entry>
2835             <entry>integer</entry>
2836           </row><row><entry spanname="descr">Determines the exposure
2837 time of the camera sensor. The exposure time is limited by the frame
2838 interval. Drivers should interpret the values as 100 &micro;s units,
2839 where the value 1 stands for 1/10000th of a second, 10000 for 1 second
2840 and 100000 for 10 seconds.</entry>
2841           </row>
2842           <row><entry></entry></row>
2843
2844           <row>
2845             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant>&nbsp;</entry>
2846             <entry>boolean</entry>
2847           </row><row><entry spanname="descr">When
2848 <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to
2849 <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>,
2850 this control determines if the device may dynamically vary the frame
2851 rate. By default this feature is disabled (0) and the frame rate must
2852 remain constant.</entry>
2853           </row>
2854           <row><entry></entry></row>
2855
2856           <row>
2857             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_BIAS</constant>&nbsp;</entry>
2858             <entry>integer menu</entry>
2859           </row><row><entry spanname="descr"> Determines the automatic
2860 exposure compensation, it is effective only when <constant>V4L2_CID_EXPOSURE_AUTO</constant>
2861 control is set to <constant>AUTO</constant>, <constant>SHUTTER_PRIORITY </constant>
2862 or <constant>APERTURE_PRIORITY</constant>.
2863 It is expressed in terms of EV, drivers should interpret the values as 0.001 EV
2864 units, where the value 1000 stands for +1 EV.
2865 <para>Increasing the exposure compensation value is equivalent to decreasing
2866 the exposure value (EV) and will increase the amount of light at the image
2867 sensor. The camera performs the exposure compensation by adjusting absolute
2868 exposure time and/or aperture.</para></entry>
2869           </row>
2870           <row><entry></entry></row>
2871
2872           <row id="v4l2-exposure-metering">
2873             <entry spanname="id"><constant>V4L2_CID_EXPOSURE_METERING</constant>&nbsp;</entry>
2874             <entry>enum&nbsp;v4l2_exposure_metering</entry>
2875           </row><row><entry spanname="descr">Determines how the camera measures
2876 the amount of light available for the frame exposure. Possible values are:</entry>
2877           </row>
2878           <row>
2879             <entrytbl spanname="descr" cols="2">
2880               <tbody valign="top">
2881                 <row>
2882                   <entry><constant>V4L2_EXPOSURE_METERING_AVERAGE</constant>&nbsp;</entry>
2883                   <entry>Use the light information coming from the entire frame
2884 and average giving no weighting to any particular portion of the metered area.
2885                   </entry>
2886                 </row>
2887                 <row>
2888                   <entry><constant>V4L2_EXPOSURE_METERING_CENTER_WEIGHTED</constant>&nbsp;</entry>
2889                   <entry>Average the light information coming from the entire frame
2890 giving priority to the center of the metered area.</entry>
2891                 </row>
2892                 <row>
2893                   <entry><constant>V4L2_EXPOSURE_METERING_SPOT</constant>&nbsp;</entry>
2894                   <entry>Measure only very small area at the center of the frame.</entry>
2895                 </row>
2896               </tbody>
2897             </entrytbl>
2898           </row>
2899           <row><entry></entry></row>
2900
2901           <row>
2902             <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
2903             <entry>integer</entry>
2904           </row><row><entry spanname="descr">This control turns the
2905 camera horizontally by the specified amount. The unit is undefined. A
2906 positive value moves the camera to the right (clockwise when viewed
2907 from above), a negative value to the left. A value of zero does not
2908 cause motion. This is a write-only control.</entry>
2909           </row>
2910           <row><entry></entry></row>
2911
2912           <row>
2913             <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant>&nbsp;</entry>
2914             <entry>integer</entry>
2915           </row><row><entry spanname="descr">This control turns the
2916 camera vertically by the specified amount. The unit is undefined. A
2917 positive value moves the camera up, a negative value down. A value of
2918 zero does not cause motion. This is a write-only control.</entry>
2919           </row>
2920           <row><entry></entry></row>
2921
2922           <row>
2923             <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant>&nbsp;</entry>
2924             <entry>button</entry>
2925           </row><row><entry spanname="descr">When this control is set,
2926 the camera moves horizontally to the default position.</entry>
2927           </row>
2928           <row><entry></entry></row>
2929
2930           <row>
2931             <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant>&nbsp;</entry>
2932             <entry>button</entry>
2933           </row><row><entry spanname="descr">When this control is set,
2934 the camera moves vertically to the default position.</entry>
2935           </row>
2936           <row><entry></entry></row>
2937
2938           <row>
2939             <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant>&nbsp;</entry>
2940             <entry>integer</entry>
2941           </row><row><entry spanname="descr">This control
2942 turns the camera horizontally to the specified position. Positive
2943 values move the camera to the right (clockwise when viewed from above),
2944 negative values to the left. Drivers should interpret the values as arc
2945 seconds, with valid values between -180 * 3600 and +180 * 3600
2946 inclusive.</entry>
2947           </row>
2948           <row><entry></entry></row>
2949
2950           <row>
2951             <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant>&nbsp;</entry>
2952             <entry>integer</entry>
2953           </row><row><entry spanname="descr">This control
2954 turns the camera vertically to the specified position. Positive values
2955 move the camera up, negative values down. Drivers should interpret the
2956 values as arc seconds, with valid values between -180 * 3600 and +180
2957 * 3600 inclusive.</entry>
2958           </row>
2959           <row><entry></entry></row>
2960
2961           <row>
2962             <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant>&nbsp;</entry>
2963             <entry>integer</entry>
2964           </row><row><entry spanname="descr">This control sets the
2965 focal point of the camera to the specified position. The unit is
2966 undefined. Positive values set the focus closer to the camera,
2967 negative values towards infinity.</entry>
2968           </row>
2969           <row><entry></entry></row>
2970
2971           <row>
2972             <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant>&nbsp;</entry>
2973             <entry>integer</entry>
2974           </row><row><entry spanname="descr">This control moves the
2975 focal point of the camera by the specified amount. The unit is
2976 undefined. Positive values move the focus closer to the camera,
2977 negative values towards infinity. This is a write-only control.</entry>
2978           </row>
2979           <row><entry></entry></row>
2980
2981           <row>
2982             <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
2983             <entry>boolean</entry>
2984           </row><row><entry spanname="descr">Enables continuous automatic
2985 focus adjustments. The effect of manual focus adjustments while this feature
2986 is enabled is undefined, drivers should ignore such requests.</entry>
2987           </row>
2988           <row><entry></entry></row>
2989
2990           <row>
2991             <entry spanname="id"><constant>V4L2_CID_AUTO_FOCUS_START</constant>&nbsp;</entry>
2992             <entry>button</entry>
2993           </row><row><entry spanname="descr">Starts single auto focus process.
2994 The effect of setting this control when <constant>V4L2_CID_FOCUS_AUTO</constant>
2995 is set to <constant>TRUE</constant> (1) is undefined, drivers should ignore
2996 such requests.</entry>
2997           </row>
2998           <row><entry></entry></row>
2999
3000           <row>
3001             <entry spanname="id"><constant>V4L2_CID_AUTO_FOCUS_STOP</constant>&nbsp;</entry>
3002             <entry>button</entry>
3003           </row><row><entry spanname="descr">Aborts automatic focusing
3004 started with <constant>V4L2_CID_AUTO_FOCUS_START</constant> control. It is
3005 effective only when the continuous autofocus is disabled, that is when
3006 <constant>V4L2_CID_FOCUS_AUTO</constant> control is set to <constant>FALSE
3007 </constant> (0).</entry>
3008           </row>
3009           <row><entry></entry></row>
3010
3011           <row id="v4l2-auto-focus-status">
3012             <entry spanname="id">
3013               <constant>V4L2_CID_AUTO_FOCUS_STATUS</constant>&nbsp;</entry>
3014             <entry>bitmask</entry>
3015           </row>
3016           <row><entry spanname="descr">The automatic focus status. This is a read-only
3017           control.</entry>
3018           </row>
3019           <row>
3020             <entrytbl spanname="descr" cols="2">
3021               <tbody valign="top">
3022                 <row>
3023                   <entry><constant>V4L2_AUTO_FOCUS_STATUS_IDLE</constant>&nbsp;</entry>
3024                   <entry>Automatic focus is not active.</entry>
3025                 </row>
3026                 <row>
3027                   <entry><constant>V4L2_AUTO_FOCUS_STATUS_BUSY</constant>&nbsp;</entry>
3028                   <entry>Automatic focusing is in progress.</entry>
3029                 </row>
3030                 <row>
3031                   <entry><constant>V4L2_AUTO_FOCUS_STATUS_REACHED</constant>&nbsp;</entry>
3032                   <entry>Focus has been reached.</entry>
3033                 </row>
3034                 <row>
3035                   <entry><constant>V4L2_AUTO_FOCUS_STATUS_FAILED</constant>&nbsp;</entry>
3036                   <entry>Automatic focus has failed, the driver will not
3037                   transition from this state until another action is
3038                   performed by an application.</entry>
3039                 </row>
3040               </tbody>
3041             </entrytbl>
3042           </row>
3043           <row><entry spanname="descr">
3044 Setting <constant>V4L2_LOCK_FOCUS</constant> lock bit of the <constant>V4L2_CID_3A_LOCK
3045 </constant> control may stop updates of the <constant>V4L2_CID_AUTO_FOCUS_STATUS</constant>
3046 control value.</entry>
3047           </row>
3048           <row><entry></entry></row>
3049
3050           <row id="v4l2-auto-focus-range">
3051             <entry spanname="id">
3052               <constant>V4L2_CID_AUTO_FOCUS_RANGE</constant>&nbsp;</entry>
3053             <entry>enum&nbsp;v4l2_auto_focus_range</entry>
3054           </row>
3055           <row><entry spanname="descr">Determines auto focus distance range
3056 for which lens may be adjusted. </entry>
3057           </row>
3058           <row>
3059             <entrytbl spanname="descr" cols="2">
3060               <tbody valign="top">
3061                 <row>
3062                   <entry><constant>V4L2_AUTO_FOCUS_RANGE_AUTO</constant>&nbsp;</entry>
3063                   <entry>The camera automatically selects the focus range.</entry>
3064                 </row>
3065                 <row>
3066                   <entry><constant>V4L2_AUTO_FOCUS_RANGE_NORMAL</constant>&nbsp;</entry>
3067                   <entry>Normal distance range, limited for best automatic focus
3068 performance.</entry>
3069                 </row>
3070                 <row>
3071                   <entry><constant>V4L2_AUTO_FOCUS_RANGE_MACRO</constant>&nbsp;</entry>
3072                   <entry>Macro (close-up) auto focus. The camera will
3073 use its minimum possible distance for auto focus.</entry>
3074                 </row>
3075                 <row>
3076                   <entry><constant>V4L2_AUTO_FOCUS_RANGE_INFINITY</constant>&nbsp;</entry>
3077                   <entry>The lens is set to focus on an object at infinite distance.</entry>
3078                 </row>
3079               </tbody>
3080             </entrytbl>
3081           </row>
3082           <row><entry></entry></row>
3083
3084           <row>
3085             <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry>
3086             <entry>integer</entry>
3087           </row><row><entry spanname="descr">Specify the objective lens
3088 focal length as an absolute value. The zoom unit is driver-specific and its
3089 value should be a positive integer.</entry>
3090           </row>
3091           <row><entry></entry></row>
3092
3093           <row>
3094             <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant>&nbsp;</entry>
3095             <entry>integer</entry>
3096           </row><row><entry spanname="descr">Specify the objective lens
3097 focal length relatively to the current value. Positive values move the zoom
3098 lens group towards the telephoto direction, negative values towards the
3099 wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry>
3100           </row>
3101           <row><entry></entry></row>
3102
3103           <row>
3104             <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant>&nbsp;</entry>
3105             <entry>integer</entry>
3106           </row><row><entry spanname="descr">Move the objective lens group
3107 at the specified speed until it reaches physical device limits or until an
3108 explicit request to stop the movement. A positive value moves the zoom lens
3109 group towards the telephoto direction. A value of zero stops the zoom lens
3110 group movement. A negative value moves the zoom lens group towards the
3111 wide-angle direction. The zoom speed unit is driver-specific.</entry>
3112           </row>
3113           <row><entry></entry></row>
3114
3115           <row>
3116             <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant>&nbsp;</entry>
3117             <entry>integer</entry>
3118           </row><row><entry spanname="descr">This control sets the
3119 camera's aperture to the specified value. The unit is undefined.
3120 Larger values open the iris wider, smaller values close it.</entry>
3121           </row>
3122           <row><entry></entry></row>
3123
3124           <row>
3125             <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant>&nbsp;</entry>
3126             <entry>integer</entry>
3127           </row><row><entry spanname="descr">This control modifies the
3128 camera's aperture by the specified amount. The unit is undefined.
3129 Positive values open the iris one step further, negative values close
3130 it one step further. This is a write-only control.</entry>
3131           </row>
3132           <row><entry></entry></row>
3133
3134           <row>
3135             <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry>
3136             <entry>boolean</entry>
3137           </row><row><entry spanname="descr">Prevent video from being acquired
3138 by the camera. When this control is set to <constant>TRUE</constant> (1), no
3139 image can be captured by the camera. Common means to enforce privacy are
3140 mechanical obturation of the sensor and firmware image processing, but the
3141 device is not restricted to these methods. Devices that implement the privacy
3142 control must support read access and may support write access.</entry>
3143           </row>
3144
3145           <row>
3146             <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant>&nbsp;</entry>
3147             <entry>integer</entry>
3148           </row><row><entry spanname="descr">Switch the band-stop filter of a
3149 camera sensor on or off, or specify its strength. Such band-stop filters can
3150 be used, for example, to filter out the fluorescent light component.</entry>
3151           </row>
3152           <row><entry></entry></row>
3153
3154           <row id="v4l2-auto-n-preset-white-balance">
3155             <entry spanname="id"><constant>V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE</constant>&nbsp;</entry>
3156             <entry>enum&nbsp;v4l2_auto_n_preset_white_balance</entry>
3157           </row><row><entry spanname="descr">Sets white balance to automatic,
3158 manual or a preset. The presets determine color temperature of the light as
3159 a hint to the camera for white balance adjustments resulting in most accurate
3160 color representation. The following white balance presets are listed in order
3161 of increasing color temperature.</entry>
3162           </row>
3163           <row>
3164             <entrytbl spanname="descr" cols="2">
3165               <tbody valign="top">
3166                 <row>
3167                   <entry><constant>V4L2_WHITE_BALANCE_MANUAL</constant>&nbsp;</entry>
3168                   <entry>Manual white balance.</entry>
3169                 </row>
3170                 <row>
3171                   <entry><constant>V4L2_WHITE_BALANCE_AUTO</constant>&nbsp;</entry>
3172                   <entry>Automatic white balance adjustments.</entry>
3173                 </row>
3174                 <row>
3175                   <entry><constant>V4L2_WHITE_BALANCE_INCANDESCENT</constant>&nbsp;</entry>
3176                   <entry>White balance setting for incandescent (tungsten) lighting.
3177 It generally cools down the colors and corresponds approximately to 2500...3500 K
3178 color temperature range.</entry>
3179                 </row>
3180                 <row>
3181                   <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT</constant>&nbsp;</entry>
3182                   <entry>White balance preset for fluorescent lighting.
3183 It corresponds approximately to 4000...5000 K color temperature.</entry>
3184                 </row>
3185                 <row>
3186                   <entry><constant>V4L2_WHITE_BALANCE_FLUORESCENT_H</constant>&nbsp;</entry>
3187                   <entry>With this setting the camera will compensate for
3188 fluorescent H lighting.</entry>
3189                 </row>
3190                 <row>
3191                   <entry><constant>V4L2_WHITE_BALANCE_HORIZON</constant>&nbsp;</entry>
3192                   <entry>White balance setting for horizon daylight.
3193 It corresponds approximately to 5000 K color temperature.</entry>
3194                 </row>
3195                 <row>
3196                   <entry><constant>V4L2_WHITE_BALANCE_DAYLIGHT</constant>&nbsp;</entry>
3197                   <entry>White balance preset for daylight (with clear sky).
3198 It corresponds approximately to 5000...6500 K color temperature.</entry>
3199                 </row>
3200                 <row>
3201                   <entry><constant>V4L2_WHITE_BALANCE_FLASH</constant>&nbsp;</entry>
3202                   <entry>With this setting the camera will compensate for the flash
3203 light. It slightly warms up the colors and corresponds roughly to 5000...5500 K
3204 color temperature.</entry>
3205                 </row>
3206                 <row>
3207                   <entry><constant>V4L2_WHITE_BALANCE_CLOUDY</constant>&nbsp;</entry>
3208                   <entry>White balance preset for moderately overcast sky.
3209 This option corresponds approximately to 6500...8000 K color temperature
3210 range.</entry>
3211                 </row>
3212                 <row>
3213                   <entry><constant>V4L2_WHITE_BALANCE_SHADE</constant>&nbsp;</entry>
3214                   <entry>White balance preset for shade or heavily overcast
3215 sky. It corresponds approximately to 9000...10000 K color temperature.
3216 </entry>
3217                 </row>
3218               </tbody>
3219             </entrytbl>
3220           </row>
3221           <row><entry></entry></row>
3222
3223           <row id="v4l2-wide-dynamic-range">
3224             <entry spanname="id"><constant>V4L2_CID_WIDE_DYNAMIC_RANGE</constant></entry>
3225             <entry>boolean</entry>
3226           </row>
3227           <row>
3228             <entry spanname="descr">Enables or disables the camera's wide dynamic
3229 range feature. This feature allows to obtain clear images in situations where
3230 intensity of the illumination varies significantly throughout the scene, i.e.
3231 there are simultaneously very dark and very bright areas. It is most commonly
3232 realized in cameras by combining two subsequent frames with different exposure
3233 times. <footnote id="ctypeconv"><para> This control may be changed to a menu
3234 control in the future, if more options are required.</para></footnote></entry>
3235           </row>
3236           <row><entry></entry></row>
3237
3238           <row id="v4l2-image-stabilization">
3239             <entry spanname="id"><constant>V4L2_CID_IMAGE_STABILIZATION</constant></entry>
3240             <entry>boolean</entry>
3241           </row>
3242           <row>
3243             <entry spanname="descr">Enables or disables image stabilization.
3244               <footnoteref linkend="ctypeconv"/></entry>
3245           </row>
3246           <row><entry></entry></row>
3247
3248           <row>
3249             <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY</constant>&nbsp;</entry>
3250             <entry>integer menu</entry>
3251           </row><row><entry spanname="descr">Determines ISO equivalent of an
3252 image sensor indicating the sensor's sensitivity to light. The numbers are
3253 expressed in arithmetic scale, as per <xref linkend="iso12232" /> standard,
3254 where doubling the sensor sensitivity is represented by doubling the numerical
3255 ISO value. Applications should interpret the values as standard ISO values
3256 multiplied by 1000, e.g. control value 800 stands for ISO 0.8. Drivers will
3257 usually support only a subset of standard ISO values. The effect of setting
3258 this control while the <constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>
3259 control is set to a value other than <constant>V4L2_CID_ISO_SENSITIVITY_MANUAL
3260 </constant> is undefined, drivers should ignore such requests.</entry>
3261           </row>
3262           <row><entry></entry></row>
3263
3264           <row id="v4l2-iso-sensitivity-auto-type">
3265             <entry spanname="id"><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3266             <entry>enum&nbsp;v4l2_iso_sensitivity_type</entry>
3267           </row><row><entry spanname="descr">Enables or disables automatic ISO
3268 sensitivity adjustments.</entry>
3269           </row>
3270           <row>
3271             <entrytbl spanname="descr" cols="2">
3272               <tbody valign="top">
3273                 <row>
3274                   <entry><constant>V4L2_CID_ISO_SENSITIVITY_MANUAL</constant>&nbsp;</entry>
3275                   <entry>Manual ISO sensitivity.</entry>
3276                 </row>
3277                 <row>
3278                   <entry><constant>V4L2_CID_ISO_SENSITIVITY_AUTO</constant>&nbsp;</entry>
3279                   <entry>Automatic ISO sensitivity adjustments.</entry>
3280                 </row>
3281               </tbody>
3282             </entrytbl>
3283           </row>
3284           <row><entry></entry></row>
3285
3286           <row id="v4l2-scene-mode">
3287             <entry spanname="id"><constant>V4L2_CID_SCENE_MODE</constant>&nbsp;</entry>
3288             <entry>enum&nbsp;v4l2_scene_mode</entry>
3289           </row><row><entry spanname="descr">This control allows to select
3290 scene programs as the camera automatic modes optimized for common shooting
3291 scenes. Within these modes the camera determines best exposure, aperture,
3292 focusing, light metering, white balance and equivalent sensitivity. The
3293 controls of those parameters are influenced by the scene mode control.
3294 An exact behavior in each mode is subject to the camera specification.
3295
3296 <para>When the scene mode feature is not used, this control should be set to
3297 <constant>V4L2_SCENE_MODE_NONE</constant> to make sure the other possibly
3298 related controls are accessible. The following scene programs are defined:
3299 </para>
3300 </entry>
3301           </row>
3302           <row>
3303             <entrytbl spanname="descr" cols="2">
3304               <tbody valign="top">
3305                 <row>
3306                   <entry><constant>V4L2_SCENE_MODE_NONE</constant>&nbsp;</entry>
3307                   <entry>The scene mode feature is disabled.</entry>
3308                 </row>
3309                 <row>
3310                   <entry><constant>V4L2_SCENE_MODE_BACKLIGHT</constant>&nbsp;</entry>
3311                   <entry>Backlight. Compensates for dark shadows when light is
3312                   coming from behind a subject, also by automatically turning
3313                   on the flash.</entry>
3314                 </row>
3315                 <row>
3316                   <entry><constant>V4L2_SCENE_MODE_BEACH_SNOW</constant>&nbsp;</entry>
3317                   <entry>Beach and snow. This mode compensates for all-white or
3318 bright scenes, which tend to look gray and low contrast, when camera's automatic
3319 exposure is based on an average scene brightness. To compensate, this mode
3320 automatically slightly overexposes the frames. The white balance may also be
3321 adjusted to compensate for the fact that reflected snow looks bluish rather
3322 than white.</entry>
3323                 </row>
3324                 <row>
3325                   <entry><constant>V4L2_SCENE_MODE_CANDLELIGHT</constant>&nbsp;</entry>
3326                   <entry>Candle light. The camera generally raises the ISO
3327 sensitivity and lowers the shutter speed. This mode compensates for relatively
3328 close subject in the scene. The flash is disabled in order to preserve the
3329 ambiance of the light.</entry>
3330                 </row>
3331                 <row>
3332                   <entry><constant>V4L2_SCENE_MODE_DAWN_DUSK</constant>&nbsp;</entry>
3333                   <entry>Dawn and dusk. Preserves the colors seen in low
3334 natural light before dusk and after down. The camera may turn off the flash,
3335 and automatically focus at infinity. It will usually boost saturation and
3336 lower the shutter speed.</entry>
3337                 </row>
3338                 <row>
3339                   <entry><constant>V4L2_SCENE_MODE_FALL_COLORS</constant>&nbsp;</entry>
3340                   <entry>Fall colors. Increases saturation and adjusts white
3341 balance for color enhancement. Pictures of autumn leaves get saturated reds
3342 and yellows.</entry>
3343                 </row>
3344                 <row>
3345                   <entry><constant>V4L2_SCENE_MODE_FIREWORKS</constant>&nbsp;</entry>
3346                   <entry>Fireworks. Long exposure times are used to capture
3347 the expanding burst of light from a firework. The camera may invoke image
3348 stabilization.</entry>
3349                 </row>
3350                 <row>
3351                   <entry><constant>V4L2_SCENE_MODE_LANDSCAPE</constant>&nbsp;</entry>
3352                   <entry>Landscape. The camera may choose a small aperture to
3353 provide deep depth of field and long exposure duration to help capture detail
3354 in dim light conditions. The focus is fixed at infinity. Suitable for distant
3355 and wide scenery.</entry>
3356                 </row>
3357                 <row>
3358                   <entry><constant>V4L2_SCENE_MODE_NIGHT</constant>&nbsp;</entry>
3359                   <entry>Night, also known as Night Landscape. Designed for low
3360 light conditions, it preserves detail in the dark areas without blowing out bright
3361 objects. The camera generally sets itself to a medium-to-high ISO sensitivity,
3362 with a relatively long exposure time, and turns flash off. As such, there will be
3363 increased image noise and the possibility of blurred image.</entry>
3364                 </row>
3365                 <row>
3366                   <entry><constant>V4L2_SCENE_MODE_PARTY_INDOOR</constant>&nbsp;</entry>
3367                   <entry>Party and indoor. Designed to capture indoor scenes
3368 that are lit by indoor background lighting as well as the flash. The camera
3369 usually increases ISO sensitivity, and adjusts exposure for the low light
3370 conditions.</entry>
3371                 </row>
3372                 <row>
3373                   <entry><constant>V4L2_SCENE_MODE_PORTRAIT</constant>&nbsp;</entry>
3374                   <entry>Portrait. The camera adjusts the aperture so that the
3375 depth of field is reduced, which helps to isolate the subject against a smooth
3376 background. Most cameras recognize the presence of faces in the scene and focus
3377 on them. The color hue is adjusted to enhance skin tones. The intensity of the
3378 flash is often reduced.</entry>
3379                 </row>
3380                 <row>
3381                   <entry><constant>V4L2_SCENE_MODE_SPORTS</constant>&nbsp;</entry>
3382                   <entry>Sports. Significantly increases ISO and uses a fast
3383 shutter speed to freeze motion of rapidly-moving subjects. Increased image
3384 noise may be seen in this mode.</entry>
3385                 </row>
3386                 <row>
3387                   <entry><constant>V4L2_SCENE_MODE_SUNSET</constant>&nbsp;</entry>
3388                   <entry>Sunset. Preserves deep hues seen in sunsets and
3389 sunrises. It bumps up the saturation.</entry>
3390                 </row>
3391                 <row>
3392                   <entry><constant>V4L2_SCENE_MODE_TEXT</constant>&nbsp;</entry>
3393                   <entry>Text. It applies extra contrast and sharpness, it is
3394 typically a black-and-white mode optimized for readability. Automatic focus
3395 may be switched to close-up mode and this setting may also involve some
3396 lens-distortion correction.</entry>
3397                 </row>
3398               </tbody>
3399             </entrytbl>
3400           </row>
3401           <row><entry></entry></row>
3402
3403           <row>
3404             <entry spanname="id"><constant>V4L2_CID_3A_LOCK</constant></entry>
3405             <entry>bitmask</entry>
3406           </row>
3407           <row>
3408             <entry spanname="descr">This control locks or unlocks the automatic
3409 focus, exposure and white balance. The automatic adjustments can be paused
3410 independently by setting the corresponding lock bit to 1. The camera then retains
3411 the settings until the lock bit is cleared. The following lock bits are defined:
3412 </entry>
3413           </row>
3414           <row>
3415             <entrytbl spanname="descr" cols="2">
3416               <tbody valign="top">
3417                 <row>
3418                   <entry><constant>V4L2_LOCK_EXPOSURE</constant></entry>
3419                   <entry>Automatic exposure adjustments lock.</entry>
3420                 </row>
3421                 <row>
3422                   <entry><constant>V4L2_LOCK_WHITE_BALANCE</constant></entry>
3423                   <entry>Automatic white balance adjustments lock.</entry>
3424                 </row>
3425                 <row>
3426                   <entry><constant>V4L2_LOCK_FOCUS</constant></entry>
3427                   <entry>Automatic focus lock.</entry>
3428                 </row>
3429               </tbody>
3430             </entrytbl>
3431           </row>
3432           <row><entry spanname="descr">
3433 When a given algorithm is not enabled, drivers should ignore requests
3434 to lock it and should return no error. An example might be an application
3435 setting bit <constant>V4L2_LOCK_WHITE_BALANCE</constant> when the
3436 <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant> control is set to
3437 <constant>FALSE</constant>. The value of this control may be changed
3438 by exposure, white balance or focus controls.</entry>
3439           </row>
3440           <row><entry></entry></row>
3441
3442         </tbody>
3443       </tgroup>
3444     </table>
3445   </section>
3446
3447     <section id="fm-tx-controls">
3448       <title>FM Transmitter Control Reference</title>
3449
3450       <para>The FM Transmitter (FM_TX) class includes controls for common features of
3451 FM transmissions capable devices. Currently this class includes parameters for audio
3452 compression, pilot tone generation, audio deviation limiter, RDS transmission and
3453 tuning power features.</para>
3454
3455       <table pgwide="1" frame="none" id="fm-tx-control-id">
3456       <title>FM_TX Control IDs</title>
3457
3458       <tgroup cols="4">
3459         <colspec colname="c1" colwidth="1*" />
3460         <colspec colname="c2" colwidth="6*" />
3461         <colspec colname="c3" colwidth="2*" />
3462         <colspec colname="c4" colwidth="6*" />
3463         <spanspec namest="c1" nameend="c2" spanname="id" />
3464         <spanspec namest="c2" nameend="c4" spanname="descr" />
3465         <thead>
3466           <row>
3467             <entry spanname="id" align="left">ID</entry>
3468             <entry align="left">Type</entry>
3469           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3470           </row>
3471         </thead>
3472         <tbody valign="top">
3473           <row><entry></entry></row>
3474           <row>
3475             <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant>&nbsp;</entry>
3476             <entry>class</entry>
3477           </row><row><entry spanname="descr">The FM_TX class
3478 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
3479 description of this control class.</entry>
3480           </row>
3481           <row>
3482             <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant>&nbsp;</entry>
3483             <entry>integer</entry>
3484           </row>
3485           <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz.
3486 The range and step are driver-specific.</entry>
3487           </row>
3488           <row>
3489             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant>&nbsp;</entry>
3490             <entry>integer</entry>
3491           </row>
3492           <row><entry spanname="descr">Sets the RDS Programme Identification field
3493 for transmission.</entry>
3494           </row>
3495           <row>
3496             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant>&nbsp;</entry>
3497             <entry>integer</entry>
3498           </row>
3499           <row><entry spanname="descr">Sets the RDS Programme Type field for transmission.
3500 This encodes up to 31 pre-defined programme types.</entry>
3501           </row>
3502           <row>
3503             <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant>&nbsp;</entry>
3504             <entry>string</entry>
3505           </row>
3506           <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission.
3507 It is intended for static display on a receiver. It is the primary aid to listeners in programme service
3508 identification and selection.  In Annex E of <xref linkend="en50067" />, the RDS specification,
3509 there is a full description of the correct character encoding for Programme Service name strings.
3510 Also from RDS specification, PS is usually a single eight character text. However, it is also possible
3511 to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
3512 with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
3513           </row>
3514           <row>
3515             <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant>&nbsp;</entry>
3516             <entry>string</entry>
3517           </row>
3518           <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of
3519 what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
3520 programme-related information or any other text. In these cases, RadioText should be used in addition to
3521 <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
3522 in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being
3523 used to transmit it, either 32 (2A block) or 64 (2B block).  However, it is also possible
3524 to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
3525 with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
3526           </row>
3527           <row>
3528             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry>
3529             <entry>boolean</entry>
3530           </row>
3531           <row><entry spanname="descr">Enables or disables the audio deviation limiter feature.
3532 The limiter is useful when trying to maximize the audio volume, minimize receiver-generated
3533 distortion and prevent overmodulation.
3534 </entry>
3535           </row>
3536           <row>
3537             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant>&nbsp;</entry>
3538             <entry>integer</entry>
3539           </row>
3540           <row><entry spanname="descr">Sets the audio deviation limiter feature release time.
3541 Unit is in useconds. Step and range are driver-specific.</entry>
3542           </row>
3543           <row>
3544             <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant>&nbsp;</entry>
3545             <entry>integer</entry>
3546           </row>
3547           <row><entry spanname="descr">Configures audio frequency deviation level in Hz.
3548 The range and step are driver-specific.</entry>
3549           </row>
3550           <row>
3551             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant>&nbsp;</entry>
3552             <entry>boolean</entry>
3553           </row>
3554           <row><entry spanname="descr">Enables or disables the audio compression feature.
3555 This feature amplifies signals below the threshold by a fixed gain and compresses audio
3556 signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry>
3557           </row>
3558           <row>
3559             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant>&nbsp;</entry>
3560             <entry>integer</entry>
3561           </row>
3562           <row><entry spanname="descr">Sets the gain for audio compression feature. It is
3563 a dB value. The range and step are driver-specific.</entry>
3564           </row>
3565           <row>
3566             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant>&nbsp;</entry>
3567             <entry>integer</entry>
3568           </row>
3569           <row><entry spanname="descr">Sets the threshold level for audio compression freature.
3570 It is a dB value. The range and step are driver-specific.</entry>
3571           </row>
3572           <row>
3573             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant>&nbsp;</entry>
3574             <entry>integer</entry>
3575           </row>
3576           <row><entry spanname="descr">Sets the attack time for audio compression feature.
3577 It is a useconds value. The range and step are driver-specific.</entry>
3578           </row>
3579           <row>
3580             <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant>&nbsp;</entry>
3581             <entry>integer</entry>
3582           </row>
3583           <row><entry spanname="descr">Sets the release time for audio compression feature.
3584 It is a useconds value. The range and step are driver-specific.</entry>
3585           </row>
3586           <row>
3587             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant>&nbsp;</entry>
3588             <entry>boolean</entry>
3589           </row>
3590           <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry>
3591           </row>
3592           <row>
3593             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant>&nbsp;</entry>
3594             <entry>integer</entry>
3595           </row>
3596           <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is
3597 in Hz. The range and step are driver-specific.</entry>
3598           </row>
3599           <row>
3600             <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant>&nbsp;</entry>
3601             <entry>integer</entry>
3602           </row>
3603           <row><entry spanname="descr">Configures pilot tone frequency value. Unit is
3604 in Hz. The range and step are driver-specific.</entry>
3605           </row>
3606           <row>
3607             <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant>&nbsp;</entry>
3608             <entry>integer</entry>
3609           </row>
3610           <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting.
3611 A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies.
3612 Depending on the region, a time constant of either 50 or 75 useconds is used. The enum&nbsp;v4l2_preemphasis
3613 defines possible values for pre-emphasis. Here they are:</entry>
3614         </row><row>
3615         <entrytbl spanname="descr" cols="2">
3616                   <tbody valign="top">
3617                     <row>
3618                       <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant>&nbsp;</entry>
3619                       <entry>No pre-emphasis is applied.</entry>
3620                     </row>
3621                     <row>
3622                       <entry><constant>V4L2_PREEMPHASIS_50_uS</constant>&nbsp;</entry>
3623                       <entry>A pre-emphasis of 50 uS is used.</entry>
3624                     </row>
3625                     <row>
3626                       <entry><constant>V4L2_PREEMPHASIS_75_uS</constant>&nbsp;</entry>
3627                       <entry>A pre-emphasis of 75 uS is used.</entry>
3628                     </row>
3629                   </tbody>
3630                 </entrytbl>
3631
3632           </row>
3633           <row>
3634             <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant>&nbsp;</entry>
3635             <entry>integer</entry>
3636           </row>
3637           <row><entry spanname="descr">Sets the output power level for signal transmission.
3638 Unit is in dBuV. Range and step are driver-specific.</entry>
3639           </row>
3640           <row>
3641             <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant>&nbsp;</entry>
3642             <entry>integer</entry>
3643           </row>
3644           <row><entry spanname="descr">This selects the value of antenna tuning capacitor
3645 manually or automatically if set to zero. Unit, range and step are driver-specific.</entry>
3646           </row>
3647           <row><entry></entry></row>
3648         </tbody>
3649       </tgroup>
3650       </table>
3651
3652 <para>For more details about RDS specification, refer to
3653 <xref linkend="en50067" /> document, from CENELEC.</para>
3654     </section>
3655
3656     <section id="flash-controls">
3657       <title>Flash Control Reference</title>
3658
3659       <note>
3660         <title>Experimental</title>
3661
3662         <para>This is an <link linkend="experimental">experimental</link>
3663 interface and may change in the future.</para>
3664       </note>
3665
3666       <para>
3667         The V4L2 flash controls are intended to provide generic access
3668         to flash controller devices. Flash controller devices are
3669         typically used in digital cameras.
3670       </para>
3671
3672       <para>
3673         The interface can support both LED and xenon flash devices. As
3674         of writing this, there is no xenon flash driver using this
3675         interface.
3676       </para>
3677
3678       <section id="flash-controls-use-cases">
3679         <title>Supported use cases</title>
3680
3681         <section>
3682           <title>Unsynchronised LED flash (software strobe)</title>
3683
3684           <para>
3685             Unsynchronised LED flash is controlled directly by the
3686             host as the sensor. The flash must be enabled by the host
3687             before the exposure of the image starts and disabled once
3688             it ends. The host is fully responsible for the timing of
3689             the flash.
3690           </para>
3691
3692           <para>Example of such device: Nokia N900.</para>
3693         </section>
3694
3695         <section>
3696           <title>Synchronised LED flash (hardware strobe)</title>
3697
3698           <para>
3699             The synchronised LED flash is pre-programmed by the host
3700             (power and timeout) but controlled by the sensor through a
3701             strobe signal from the sensor to the flash.
3702           </para>
3703
3704           <para>
3705             The sensor controls the flash duration and timing. This
3706             information typically must be made available to the
3707             sensor.
3708           </para>
3709
3710         </section>
3711
3712         <section>
3713           <title>LED flash as torch</title>
3714
3715           <para>
3716             LED flash may be used as torch in conjunction with another
3717             use case involving camera or individually.
3718           </para>
3719
3720         </section>
3721
3722       </section>
3723
3724       <table pgwide="1" frame="none" id="flash-control-id">
3725       <title>Flash Control IDs</title>
3726
3727       <tgroup cols="4">
3728         <colspec colname="c1" colwidth="1*" />
3729         <colspec colname="c2" colwidth="6*" />
3730         <colspec colname="c3" colwidth="2*" />
3731         <colspec colname="c4" colwidth="6*" />
3732         <spanspec namest="c1" nameend="c2" spanname="id" />
3733         <spanspec namest="c2" nameend="c4" spanname="descr" />
3734         <thead>
3735           <row>
3736             <entry spanname="id" align="left">ID</entry>
3737             <entry align="left">Type</entry>
3738           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3739           </row>
3740         </thead>
3741         <tbody valign="top">
3742           <row><entry></entry></row>
3743           <row>
3744             <entry spanname="id"><constant>V4L2_CID_FLASH_CLASS</constant></entry>
3745             <entry>class</entry>
3746           </row>
3747           <row>
3748             <entry spanname="descr">The FLASH class descriptor.</entry>
3749           </row>
3750           <row>
3751             <entry spanname="id"><constant>V4L2_CID_FLASH_LED_MODE</constant></entry>
3752             <entry>menu</entry>
3753           </row>
3754           <row id="v4l2-flash-led-mode">
3755             <entry spanname="descr">Defines the mode of the flash LED,
3756             the high-power white LED attached to the flash controller.
3757             Setting this control may not be possible in presence of
3758             some faults. See V4L2_CID_FLASH_FAULT.</entry>
3759           </row>
3760           <row>
3761             <entrytbl spanname="descr" cols="2">
3762               <tbody valign="top">
3763                 <row>
3764                   <entry><constant>V4L2_FLASH_LED_MODE_NONE</constant></entry>
3765                   <entry>Off.</entry>
3766                 </row>
3767                 <row>
3768                   <entry><constant>V4L2_FLASH_LED_MODE_FLASH</constant></entry>
3769                   <entry>Flash mode.</entry>
3770                 </row>
3771                 <row>
3772                   <entry><constant>V4L2_FLASH_LED_MODE_TORCH</constant></entry>
3773                   <entry>Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.</entry>
3774                 </row>
3775               </tbody>
3776             </entrytbl>
3777           </row>
3778           <row>
3779             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_SOURCE</constant></entry>
3780             <entry>menu</entry>
3781           </row>
3782           <row id="v4l2-flash-strobe-source"><entry
3783           spanname="descr">Defines the source of the flash LED
3784           strobe.</entry>
3785           </row>
3786           <row>
3787             <entrytbl spanname="descr" cols="2">
3788               <tbody valign="top">
3789                 <row>
3790                   <entry><constant>V4L2_FLASH_STROBE_SOURCE_SOFTWARE</constant></entry>
3791                   <entry>The flash strobe is triggered by using
3792                   the V4L2_CID_FLASH_STROBE control.</entry>
3793                 </row>
3794                 <row>
3795                   <entry><constant>V4L2_FLASH_STROBE_SOURCE_EXTERNAL</constant></entry>
3796                   <entry>The flash strobe is triggered by an
3797                   external source. Typically this is a sensor,
3798                   which makes it possible to synchronises the
3799                   flash strobe start to exposure start.</entry>
3800                 </row>
3801               </tbody>
3802             </entrytbl>
3803           </row>
3804           <row>
3805             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE</constant></entry>
3806             <entry>button</entry>
3807           </row>
3808           <row>
3809             <entry spanname="descr">Strobe flash. Valid when
3810             V4L2_CID_FLASH_LED_MODE is set to
3811             V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
3812             is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
3813             control may not be possible in presence of some faults.
3814             See V4L2_CID_FLASH_FAULT.</entry>
3815           </row>
3816           <row>
3817             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STOP</constant></entry>
3818             <entry>button</entry>
3819           </row>
3820           <row><entry spanname="descr">Stop flash strobe immediately.</entry>
3821           </row>
3822           <row>
3823             <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STATUS</constant></entry>
3824             <entry>boolean</entry>
3825           </row>
3826           <row>
3827             <entry spanname="descr">Strobe status: whether the flash
3828             is strobing at the moment or not. This is a read-only
3829             control.</entry>
3830           </row>
3831           <row>
3832             <entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
3833             <entry>integer</entry>
3834           </row>
3835           <row>
3836             <entry spanname="descr">Hardware timeout for flash. The
3837             flash strobe is stopped after this period of time has
3838             passed from the start of the strobe.</entry>
3839           </row>
3840           <row>
3841             <entry spanname="id"><constant>V4L2_CID_FLASH_INTENSITY</constant></entry>
3842             <entry>integer</entry>
3843           </row>
3844           <row>
3845             <entry spanname="descr">Intensity of the flash strobe when
3846             the flash LED is in flash mode
3847             (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps
3848             (mA) if possible.</entry>
3849           </row>
3850           <row>
3851             <entry spanname="id"><constant>V4L2_CID_FLASH_TORCH_INTENSITY</constant></entry>
3852             <entry>integer</entry>
3853           </row>
3854           <row>
3855             <entry spanname="descr">Intensity of the flash LED in
3856             torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be
3857             milliamps (mA) if possible. Setting this control may not
3858             be possible in presence of some faults. See
3859             V4L2_CID_FLASH_FAULT.</entry>
3860           </row>
3861           <row>
3862             <entry spanname="id"><constant>V4L2_CID_FLASH_INDICATOR_INTENSITY</constant></entry>
3863             <entry>integer</entry>
3864           </row>
3865           <row>
3866             <entry spanname="descr">Intensity of the indicator LED.
3867             The indicator LED may be fully independent of the flash
3868             LED. The unit should be microamps (uA) if possible.</entry>
3869           </row>
3870           <row>
3871             <entry spanname="id"><constant>V4L2_CID_FLASH_FAULT</constant></entry>
3872             <entry>bitmask</entry>
3873           </row>
3874           <row>
3875             <entry spanname="descr">Faults related to the flash. The
3876             faults tell about specific problems in the flash chip
3877             itself or the LEDs attached to it. Faults may prevent
3878             further use of some of the flash controls. In particular,
3879             V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
3880             if the fault affects the flash LED. Exactly which faults
3881             have such an effect is chip dependent. Reading the faults
3882             resets the control and returns the chip to a usable state
3883             if possible.</entry>
3884           </row>
3885           <row>
3886             <entrytbl spanname="descr" cols="2">
3887               <tbody valign="top">
3888                 <row>
3889                   <entry><constant>V4L2_FLASH_FAULT_OVER_VOLTAGE</constant></entry>
3890                   <entry>Flash controller voltage to the flash LED
3891                   has exceeded the limit specific to the flash
3892                   controller.</entry>
3893                 </row>
3894                 <row>
3895                   <entry><constant>V4L2_FLASH_FAULT_TIMEOUT</constant></entry>
3896                   <entry>The flash strobe was still on when
3897                   the timeout set by the user ---
3898                   V4L2_CID_FLASH_TIMEOUT control --- has expired.
3899                   Not all flash controllers may set this in all
3900                   such conditions.</entry>
3901                 </row>
3902                 <row>
3903                   <entry><constant>V4L2_FLASH_FAULT_OVER_TEMPERATURE</constant></entry>
3904                   <entry>The flash controller has overheated.</entry>
3905                 </row>
3906                 <row>
3907                   <entry><constant>V4L2_FLASH_FAULT_SHORT_CIRCUIT</constant></entry>
3908                   <entry>The short circuit protection of the flash
3909                   controller has been triggered.</entry>
3910                 </row>
3911                 <row>
3912                   <entry><constant>V4L2_FLASH_FAULT_OVER_CURRENT</constant></entry>
3913                   <entry>Current in the LED power supply has exceeded the limit
3914                   specific to the flash controller.</entry>
3915                 </row>
3916                 <row>
3917                   <entry><constant>V4L2_FLASH_FAULT_INDICATOR</constant></entry>
3918                   <entry>The flash controller has detected a short or open
3919                   circuit condition on the indicator LED.</entry>
3920                 </row>
3921               </tbody>
3922             </entrytbl>
3923           </row>
3924           <row>
3925             <entry spanname="id"><constant>V4L2_CID_FLASH_CHARGE</constant></entry>
3926             <entry>boolean</entry>
3927           </row>
3928           <row><entry spanname="descr">Enable or disable charging of the xenon
3929           flash capacitor.</entry>
3930           </row>
3931           <row>
3932             <entry spanname="id"><constant>V4L2_CID_FLASH_READY</constant></entry>
3933             <entry>boolean</entry>
3934           </row>
3935           <row>
3936             <entry spanname="descr">Is the flash ready to strobe?
3937             Xenon flashes require their capacitors charged before
3938             strobing. LED flashes often require a cooldown period
3939             after strobe during which another strobe will not be
3940             possible. This is a read-only control.</entry>
3941           </row>
3942           <row><entry></entry></row>
3943         </tbody>
3944       </tgroup>
3945       </table>
3946     </section>
3947
3948     <section id="jpeg-controls">
3949       <title>JPEG Control Reference</title>
3950       <para>The JPEG class includes controls for common features of JPEG
3951       encoders and decoders. Currently it includes features for codecs
3952       implementing progressive baseline DCT compression process with
3953       Huffman entrophy coding.</para>
3954       <table pgwide="1" frame="none" id="jpeg-control-id">
3955       <title>JPEG Control IDs</title>
3956
3957       <tgroup cols="4">
3958         <colspec colname="c1" colwidth="1*" />
3959         <colspec colname="c2" colwidth="6*" />
3960         <colspec colname="c3" colwidth="2*" />
3961         <colspec colname="c4" colwidth="6*" />
3962         <spanspec namest="c1" nameend="c2" spanname="id" />
3963         <spanspec namest="c2" nameend="c4" spanname="descr" />
3964         <thead>
3965           <row>
3966             <entry spanname="id" align="left">ID</entry>
3967             <entry align="left">Type</entry>
3968           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
3969           </row>
3970         </thead>
3971         <tbody valign="top">
3972           <row><entry></entry></row>
3973           <row>
3974             <entry spanname="id"><constant>V4L2_CID_JPEG_CLASS</constant>&nbsp;</entry>
3975             <entry>class</entry>
3976           </row><row><entry spanname="descr">The JPEG class descriptor. Calling
3977           &VIDIOC-QUERYCTRL; for this control will return a description of this
3978           control class.
3979
3980         </entry>
3981           </row>
3982           <row>
3983             <entry spanname="id"><constant>V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant></entry>
3984             <entry>menu</entry>
3985           </row>
3986           <row id="v4l2-jpeg-chroma-subsampling">
3987             <entry spanname="descr">The chroma subsampling factors describe how
3988             each component of an input image is sampled, in respect to maximum
3989             sample rate in each spatial dimension. See <xref linkend="itu-t81"/>,
3990             clause A.1.1. for more details. The <constant>
3991             V4L2_CID_JPEG_CHROMA_SUBSAMPLING</constant> control determines how
3992             Cb and Cr components are downsampled after coverting an input image
3993             from RGB to Y'CbCr color space.
3994             </entry>
3995           </row>
3996           <row>
3997             <entrytbl spanname="descr" cols="2">
3998               <tbody valign="top">
3999                 <row>
4000                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_444</constant>
4001                   </entry><entry>No chroma subsampling, each pixel has
4002                   Y, Cr and Cb values.</entry>
4003                 </row>
4004                 <row>
4005                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_422</constant>
4006                   </entry><entry>Horizontally subsample Cr, Cb components
4007                   by a factor of 2.</entry>
4008                 </row>
4009                 <row>
4010                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_420</constant>
4011                   </entry><entry>Subsample Cr, Cb components horizontally
4012                   and vertically by 2.</entry>
4013                 </row>
4014                 <row>
4015                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_411</constant>
4016                   </entry><entry>Horizontally subsample Cr, Cb components
4017                   by a factor of 4.</entry>
4018                 </row>
4019                 <row>
4020                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_410</constant>
4021                   </entry><entry>Subsample Cr, Cb components horizontally
4022                   by 4 and vertically by 2.</entry>
4023                 </row>
4024                 <row>
4025                   <entry><constant>V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY</constant>
4026                   </entry><entry>Use only luminance component.</entry>
4027                 </row>
4028               </tbody>
4029             </entrytbl>
4030           </row>
4031           <row>
4032             <entry spanname="id"><constant>V4L2_CID_JPEG_RESTART_INTERVAL</constant>
4033             </entry><entry>integer</entry>
4034           </row>
4035           <row><entry spanname="descr">
4036               The restart interval determines an interval of inserting RSTm
4037               markers (m = 0..7). The purpose of these markers is to additionally
4038               reinitialize the encoder process, in order to process blocks of
4039               an image independently.
4040               For the lossy compression processes the restart interval unit is
4041               MCU (Minimum Coded Unit) and its value is contained in DRI
4042               (Define Restart Interval) marker. If <constant>
4043               V4L2_CID_JPEG_RESTART_INTERVAL</constant> control is set to 0,
4044               DRI and RSTm markers will not be inserted.
4045             </entry>
4046           </row>
4047           <row id="jpeg-quality-control">
4048             <entry spanname="id"><constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant></entry>
4049             <entry>integer</entry>
4050           </row>
4051           <row>
4052             <entry spanname="descr">
4053               <constant>V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control
4054               determines trade-off between image quality and size.
4055               It provides simpler method for applications to control image quality,
4056               without a need for direct reconfiguration of luminance and chrominance
4057               quantization tables.
4058
4059               In cases where a driver uses quantization tables configured directly
4060               by an application, using interfaces defined elsewhere, <constant>
4061               V4L2_CID_JPEG_COMPRESSION_QUALITY</constant> control should be set
4062               by driver to 0.
4063
4064               <para>The value range of this control is driver-specific. Only
4065               positive, non-zero values are meaningful. The recommended range
4066               is 1 - 100, where larger values correspond to better image quality.
4067               </para>
4068             </entry>
4069             </row>
4070           <row id="jpeg-active-marker-control">
4071             <entry spanname="id"><constant>V4L2_CID_JPEG_ACTIVE_MARKER</constant></entry>
4072             <entry>bitmask</entry>
4073           </row>
4074           <row>
4075             <entry spanname="descr">Specify which JPEG markers are included
4076             in compressed stream. This control is valid only for encoders.
4077             </entry>
4078           </row>
4079           <row>
4080             <entrytbl spanname="descr" cols="2">
4081               <tbody valign="top">
4082                 <row>
4083                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP0</constant></entry>
4084                   <entry>Application data segment APP<subscript>0</subscript>.</entry>
4085                 </row><row>
4086                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_APP1</constant></entry>
4087                   <entry>Application data segment APP<subscript>1</subscript>.</entry>
4088                 </row><row>
4089                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_COM</constant></entry>
4090                   <entry>Comment segment.</entry>
4091                 </row><row>
4092                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DQT</constant></entry>
4093                   <entry>Quantization tables segment.</entry>
4094                 </row><row>
4095                   <entry><constant>V4L2_JPEG_ACTIVE_MARKER_DHT</constant></entry>
4096                   <entry>Huffman tables segment.</entry>
4097                 </row>
4098               </tbody>
4099             </entrytbl>
4100           </row>
4101           <row><entry></entry></row>
4102         </tbody>
4103       </tgroup>
4104       </table>
4105       <para>For more details about JPEG specification, refer
4106       to <xref linkend="itu-t81"/>, <xref linkend="jfif"/>,
4107       <xref linkend="w3c-jpeg-jfif"/>.</para>
4108     </section>
4109
4110     <section id="image-source-controls">
4111       <title>Image Source Control Reference</title>
4112
4113       <note>
4114         <title>Experimental</title>
4115
4116         <para>This is an <link
4117         linkend="experimental">experimental</link> interface and may
4118         change in the future.</para>
4119       </note>
4120
4121       <para>
4122         The Image Source control class is intended for low-level
4123         control of image source devices such as image sensors. The
4124         devices feature an analogue to digital converter and a bus
4125         transmitter to transmit the image data out of the device.
4126       </para>
4127
4128       <table pgwide="1" frame="none" id="image-source-control-id">
4129       <title>Image Source Control IDs</title>
4130
4131       <tgroup cols="4">
4132         <colspec colname="c1" colwidth="1*" />
4133         <colspec colname="c2" colwidth="6*" />
4134         <colspec colname="c3" colwidth="2*" />
4135         <colspec colname="c4" colwidth="6*" />
4136         <spanspec namest="c1" nameend="c2" spanname="id" />
4137         <spanspec namest="c2" nameend="c4" spanname="descr" />
4138         <thead>
4139           <row>
4140             <entry spanname="id" align="left">ID</entry>
4141             <entry align="left">Type</entry>
4142           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
4143           </row>
4144         </thead>
4145         <tbody valign="top">
4146           <row><entry></entry></row>
4147           <row>
4148             <entry spanname="id"><constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant></entry>
4149             <entry>class</entry>
4150           </row>
4151           <row>
4152             <entry spanname="descr">The IMAGE_SOURCE class descriptor.</entry>
4153           </row>
4154           <row>
4155             <entry spanname="id"><constant>V4L2_CID_VBLANK</constant></entry>
4156             <entry>integer</entry>
4157           </row>
4158           <row>
4159             <entry spanname="descr">Vertical blanking. The idle period
4160             after every frame during which no image data is produced.
4161             The unit of vertical blanking is a line. Every line has
4162             length of the image width plus horizontal blanking at the
4163             pixel rate defined by
4164             <constant>V4L2_CID_PIXEL_RATE</constant> control in the
4165             same sub-device.</entry>
4166           </row>
4167           <row>
4168             <entry spanname="id"><constant>V4L2_CID_HBLANK</constant></entry>
4169             <entry>integer</entry>
4170           </row>
4171           <row>
4172             <entry spanname="descr">Horizontal blanking. The idle
4173             period after every line of image data during which no
4174             image data is produced. The unit of horizontal blanking is
4175             pixels.</entry>
4176           </row>
4177           <row>
4178             <entry spanname="id"><constant>V4L2_CID_ANALOGUE_GAIN</constant></entry>
4179             <entry>integer</entry>
4180           </row>
4181           <row>
4182             <entry spanname="descr">Analogue gain is gain affecting
4183             all colour components in the pixel matrix. The gain
4184             operation is performed in the analogue domain before A/D
4185             conversion.
4186             </entry>
4187           </row>
4188           <row><entry></entry></row>
4189         </tbody>
4190       </tgroup>
4191       </table>
4192
4193     </section>
4194
4195     <section id="image-process-controls">
4196       <title>Image Process Control Reference</title>
4197
4198       <note>
4199         <title>Experimental</title>
4200
4201         <para>This is an <link
4202         linkend="experimental">experimental</link> interface and may
4203         change in the future.</para>
4204       </note>
4205
4206       <para>
4207         The Image Source control class is intended for low-level control of
4208         image processing functions. Unlike
4209         <constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant>, the controls in
4210         this class affect processing the image, and do not control capturing
4211         of it.
4212       </para>
4213
4214       <table pgwide="1" frame="none" id="image-process-control-id">
4215       <title>Image Source Control IDs</title>
4216
4217       <tgroup cols="4">
4218         <colspec colname="c1" colwidth="1*" />
4219         <colspec colname="c2" colwidth="6*" />
4220         <colspec colname="c3" colwidth="2*" />
4221         <colspec colname="c4" colwidth="6*" />
4222         <spanspec namest="c1" nameend="c2" spanname="id" />
4223         <spanspec namest="c2" nameend="c4" spanname="descr" />
4224         <thead>
4225           <row>
4226             <entry spanname="id" align="left">ID</entry>
4227             <entry align="left">Type</entry>
4228           </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
4229           </row>
4230         </thead>
4231         <tbody valign="top">
4232           <row><entry></entry></row>
4233           <row>
4234             <entry spanname="id"><constant>V4L2_CID_IMAGE_PROC_CLASS</constant></entry>
4235             <entry>class</entry>
4236           </row>
4237           <row>
4238             <entry spanname="descr">The IMAGE_PROC class descriptor.</entry>
4239           </row>
4240           <row>
4241             <entry spanname="id"><constant>V4L2_CID_LINK_FREQ</constant></entry>
4242             <entry>integer menu</entry>
4243           </row>
4244           <row>
4245             <entry spanname="descr">Data bus frequency. Together with the
4246             media bus pixel code, bus type (clock cycles per sample), the
4247             data bus frequency defines the pixel rate
4248             (<constant>V4L2_CID_PIXEL_RATE</constant>) in the
4249             pixel array (or possibly elsewhere, if the device is not an
4250             image sensor). The frame rate can be calculated from the pixel
4251             clock, image width and height and horizontal and vertical
4252             blanking. While the pixel rate control may be defined elsewhere
4253             than in the subdev containing the pixel array, the frame rate
4254             cannot be obtained from that information. This is because only
4255             on the pixel array it can be assumed that the vertical and
4256             horizontal blanking information is exact: no other blanking is
4257             allowed in the pixel array. The selection of frame rate is
4258             performed by selecting the desired horizontal and vertical
4259             blanking. The unit of this control is Hz. </entry>
4260           </row>
4261           <row>
4262             <entry spanname="id"><constant>V4L2_CID_PIXEL_RATE</constant></entry>
4263             <entry>64-bit integer</entry>
4264           </row>
4265           <row>
4266             <entry spanname="descr">Pixel rate in the source pads of
4267             the subdev. This control is read-only and its unit is
4268             pixels / second.
4269             </entry>
4270           </row>
4271           <row><entry></entry></row>
4272         </tbody>
4273       </tgroup>
4274       </table>
4275
4276     </section>
4277 </section>