[media] v4l: Document V4L2 control endianness as machine endianness
[deliverable/linux.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) and
236 <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry>
237 </row>
238 <row>
239 <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
240 <entry>boolean</entry>
241 <entry>Enables automatic hue control by the device. The
242 effect of setting <constant>V4L2_CID_HUE</constant> while automatic
243 hue control is enabled is undefined, drivers should ignore such
244 request.</entry>
245 </row>
246 <row>
247 <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry>
248 <entry>integer</entry>
249 <entry>This control specifies the white balance settings
250 as a color temperature in Kelvin. A driver should have a minimum of
251 2800 (incandescent) to 6500 (daylight). For more information about
252 color temperature see <ulink
253 url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry>
254 </row>
255 <row>
256 <entry><constant>V4L2_CID_SHARPNESS</constant></entry>
257 <entry>integer</entry>
258 <entry>Adjusts the sharpness filters in a camera. The
259 minimum value disables the filters, higher values give a sharper
260 picture.</entry>
261 </row>
262 <row>
263 <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry>
264 <entry>integer</entry>
265 <entry>Adjusts the backlight compensation in a camera. The
266 minimum value disables backlight compensation.</entry>
267 </row>
268 <row>
269 <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
270 <entry>boolean</entry>
271 <entry>Chroma automatic gain control.</entry>
272 </row>
273 <row>
274 <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
275 <entry>integer</entry>
276 <entry>Adjusts the Chroma gain control (for use when chroma AGC
277 is disabled).</entry>
278 </row>
279 <row>
280 <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
281 <entry>boolean</entry>
282 <entry>Enable the color killer (&ie; force a black &amp; white image in case of a weak video signal).</entry>
283 </row>
284 <row id="v4l2-colorfx">
285 <entry><constant>V4L2_CID_COLORFX</constant></entry>
286 <entry>enum</entry>
287 <entry>Selects a color effect. Possible values for
288 <constant>enum v4l2_colorfx</constant> are:
289 <constant>V4L2_COLORFX_NONE</constant> (0),
290 <constant>V4L2_COLORFX_BW</constant> (1),
291 <constant>V4L2_COLORFX_SEPIA</constant> (2),
292 <constant>V4L2_COLORFX_NEGATIVE</constant> (3),
293 <constant>V4L2_COLORFX_EMBOSS</constant> (4),
294 <constant>V4L2_COLORFX_SKETCH</constant> (5),
295 <constant>V4L2_COLORFX_SKY_BLUE</constant> (6),
296 <constant>V4L2_COLORFX_GRASS_GREEN</constant> (7),
297 <constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and
298 <constant>V4L2_COLORFX_VIVID</constant> (9).</entry>
299 </row>
300 <row>
301 <entry><constant>V4L2_CID_ROTATE</constant></entry>
302 <entry>integer</entry>
303 <entry>Rotates the image by specified angle. Common angles are 90,
304 270 and 180. Rotating the image to 90 and 270 will reverse the height
305 and width of the display window. It is necessary to set the new height and
306 width of the picture using the &VIDIOC-S-FMT; ioctl according to
307 the rotation angle selected.</entry>
308 </row>
309 <row>
310 <entry><constant>V4L2_CID_BG_COLOR</constant></entry>
311 <entry>integer</entry>
312 <entry>Sets the background color on the current output device.
313 Background color needs to be specified in the RGB24 format. The
314 supplied 32 bit value is interpreted as bits 0-7 Red color information,
315 bits 8-15 Green color information, bits 16-23 Blue color
316 information and bits 24-31 must be zero.</entry>
317 </row>
318 <row>
319 <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
320 <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
321 <entry>boolean</entry>
322 <entry>Switch on or off the illuminator 1 or 2 of the device
323 (usually a microscope).</entry>
324 </row>
325 <row>
326 <entry><constant>V4L2_CID_LASTP1</constant></entry>
327 <entry></entry>
328 <entry>End of the predefined control IDs (currently
329 <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry>
330 </row>
331 <row>
332 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
333 <entry></entry>
334 <entry>ID of the first custom (driver specific) control.
335 Applications depending on particular custom controls should check the
336 driver name and version, see <xref linkend="querycap" />.</entry>
337 </row>
338 </tbody>
339 </tgroup>
340 </table>
341
342 <para>Applications can enumerate the available controls with the
343 &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a
344 control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls.
345 Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
346 <constant>VIDIOC_G_CTRL</constant> and
347 <constant>VIDIOC_S_CTRL</constant> when the device has one or more
348 controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
349 more menu type controls.</para>
350
351 <example>
352 <title>Enumerating all controls</title>
353
354 <programlisting>
355 &v4l2-queryctrl; queryctrl;
356 &v4l2-querymenu; querymenu;
357
358 static void
359 enumerate_menu (void)
360 {
361 printf (" Menu items:\n");
362
363 memset (&amp;querymenu, 0, sizeof (querymenu));
364 querymenu.id = queryctrl.id;
365
366 for (querymenu.index = queryctrl.minimum;
367 querymenu.index &lt;= queryctrl.maximum;
368 querymenu.index++) {
369 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
370 printf (" %s\n", querymenu.name);
371 }
372 }
373 }
374
375 memset (&amp;queryctrl, 0, sizeof (queryctrl));
376
377 for (queryctrl.id = V4L2_CID_BASE;
378 queryctrl.id &lt; V4L2_CID_LASTP1;
379 queryctrl.id++) {
380 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
381 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
382 continue;
383
384 printf ("Control %s\n", queryctrl.name);
385
386 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
387 enumerate_menu ();
388 } else {
389 if (errno == EINVAL)
390 continue;
391
392 perror ("VIDIOC_QUERYCTRL");
393 exit (EXIT_FAILURE);
394 }
395 }
396
397 for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
398 queryctrl.id++) {
399 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
400 if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
401 continue;
402
403 printf ("Control %s\n", queryctrl.name);
404
405 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
406 enumerate_menu ();
407 } else {
408 if (errno == EINVAL)
409 break;
410
411 perror ("VIDIOC_QUERYCTRL");
412 exit (EXIT_FAILURE);
413 }
414 }
415 </programlisting>
416 </example>
417
418 <example>
419 <title>Changing controls</title>
420
421 <programlisting>
422 &v4l2-queryctrl; queryctrl;
423 &v4l2-control; control;
424
425 memset (&amp;queryctrl, 0, sizeof (queryctrl));
426 queryctrl.id = V4L2_CID_BRIGHTNESS;
427
428 if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
429 if (errno != EINVAL) {
430 perror ("VIDIOC_QUERYCTRL");
431 exit (EXIT_FAILURE);
432 } else {
433 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
434 }
435 } else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) {
436 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
437 } else {
438 memset (&amp;control, 0, sizeof (control));
439 control.id = V4L2_CID_BRIGHTNESS;
440 control.value = queryctrl.default_value;
441
442 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)) {
443 perror ("VIDIOC_S_CTRL");
444 exit (EXIT_FAILURE);
445 }
446 }
447
448 memset (&amp;control, 0, sizeof (control));
449 control.id = V4L2_CID_CONTRAST;
450
451 if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &amp;control)) {
452 control.value += 1;
453
454 /* The driver may clamp the value or return ERANGE, ignored here */
455
456 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)
457 &amp;&amp; errno != ERANGE) {
458 perror ("VIDIOC_S_CTRL");
459 exit (EXIT_FAILURE);
460 }
461 /* Ignore if V4L2_CID_CONTRAST is unsupported */
462 } else if (errno != EINVAL) {
463 perror ("VIDIOC_G_CTRL");
464 exit (EXIT_FAILURE);
465 }
466
467 control.id = V4L2_CID_AUDIO_MUTE;
468 control.value = TRUE; /* silence */
469
470 /* Errors ignored */
471 ioctl (fd, VIDIOC_S_CTRL, &amp;control);
472 </programlisting>
473 </example>
474 </section>
475
476 <section id="extended-controls">
477 <title>Extended Controls</title>
478
479 <section>
480 <title>Introduction</title>
481
482 <para>The control mechanism as originally designed was meant
483 to be used for user settings (brightness, saturation, etc). However,
484 it turned out to be a very useful model for implementing more
485 complicated driver APIs where each driver implements only a subset of
486 a larger API.</para>
487
488 <para>The MPEG encoding API was the driving force behind
489 designing and implementing this extended control mechanism: the MPEG
490 standard is quite large and the currently supported hardware MPEG
491 encoders each only implement a subset of this standard. Further more,
492 many parameters relating to how the video is encoded into an MPEG
493 stream are specific to the MPEG encoding chip since the MPEG standard
494 only defines the format of the resulting MPEG stream, not how the
495 video is actually encoded into that format.</para>
496
497 <para>Unfortunately, the original control API lacked some
498 features needed for these new uses and so it was extended into the
499 (not terribly originally named) extended control API.</para>
500
501 <para>Even though the MPEG encoding API was the first effort
502 to use the Extended Control API, nowadays there are also other classes
503 of Extended Controls, such as Camera Controls and FM Transmitter Controls.
504 The Extended Controls API as well as all Extended Controls classes are
505 described in the following text.</para>
506 </section>
507
508 <section>
509 <title>The Extended Control API</title>
510
511 <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;,
512 &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on
513 arrays of controls (as opposed to the &VIDIOC-G-CTRL; and
514 &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed
515 since it is often required to atomically change several controls at
516 once.</para>
517
518 <para>Each of the new ioctls expects a pointer to a
519 &v4l2-ext-controls;. This structure contains a pointer to the control
520 array, a count of the number of controls in that array and a control
521 class. Control classes are used to group similar controls into a
522 single class. For example, control class
523 <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls
524 (&ie; all controls that can also be set using the old
525 <constant>VIDIOC_S_CTRL</constant> ioctl). Control class
526 <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls
527 relating to MPEG encoding, etc.</para>
528
529 <para>All controls in the control array must belong to the
530 specified control class. An error is returned if this is not the
531 case.</para>
532
533 <para>It is also possible to use an empty control array (count
534 == 0) to check whether the specified control class is
535 supported.</para>
536
537 <para>The control array is a &v4l2-ext-control; array. The
538 <structname>v4l2_ext_control</structname> structure is very similar to
539 &v4l2-control;, except for the fact that it also allows for 64-bit
540 values and pointers to be passed.</para>
541
542 <para>It is important to realize that due to the flexibility of
543 controls it is necessary to check whether the control you want to set
544 actually is supported in the driver and what the valid range of values
545 is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to
546 check this. Also note that it is possible that some of the menu
547 indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant>
548 may not be supported (<constant>VIDIOC_QUERYMENU</constant> will
549 return an error). A good example is the list of supported MPEG audio
550 bitrates. Some drivers only support one or two bitrates, others
551 support a wider range.</para>
552
553 <para>
554 All controls use machine endianness.
555 </para>
556 </section>
557
558 <section>
559 <title>Enumerating Extended Controls</title>
560
561 <para>The recommended way to enumerate over the extended
562 controls is by using &VIDIOC-QUERYCTRL; in combination with the
563 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para>
564
565 <informalexample>
566 <programlisting>
567 &v4l2-queryctrl; qctrl;
568
569 qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
570 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
571 /* ... */
572 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
573 }
574 </programlisting>
575 </informalexample>
576
577 <para>The initial control ID is set to 0 ORed with the
578 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The
579 <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first
580 control with a higher ID than the specified one. When no such controls
581 are found an error is returned.</para>
582
583 <para>If you want to get all controls within a specific control
584 class, then you can set the initial
585 <structfield>qctrl.id</structfield> value to the control class and add
586 an extra check to break out of the loop when a control of another
587 control class is found:</para>
588
589 <informalexample>
590 <programlisting>
591 qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
592 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
593 if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG)
594 break;
595 /* ... */
596 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
597 }
598 </programlisting>
599 </informalexample>
600
601 <para>The 32-bit <structfield>qctrl.id</structfield> value is
602 subdivided into three bit ranges: the top 4 bits are reserved for
603 flags (&eg; <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not
604 actually part of the ID. The remaining 28 bits form the control ID, of
605 which the most significant 12 bits define the control class and the
606 least significant 16 bits identify the control within the control
607 class. It is guaranteed that these last 16 bits are always non-zero
608 for controls. The range of 0x1000 and up are reserved for
609 driver-specific controls. The macro
610 <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class
611 ID based on a control ID.</para>
612
613 <para>If the driver does not support extended controls, then
614 <constant>VIDIOC_QUERYCTRL</constant> will fail when used in
615 combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
616 that case the old method of enumerating control should be used (see
617 1.8). But if it is supported, then it is guaranteed to enumerate over
618 all controls, including driver-private controls.</para>
619 </section>
620
621 <section>
622 <title>Creating Control Panels</title>
623
624 <para>It is possible to create control panels for a graphical
625 user interface where the user can select the various controls.
626 Basically you will have to iterate over all controls using the method
627 described above. Each control class starts with a control of type
628 <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>.
629 <constant>VIDIOC_QUERYCTRL</constant> will return the name of this
630 control class which can be used as the title of a tab page within a
631 control panel.</para>
632
633 <para>The flags field of &v4l2-queryctrl; also contains hints on
634 the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation
635 for more details.</para>
636 </section>
637
638 <section id="mpeg-controls">
639 <title>MPEG Control Reference</title>
640
641 <para>Below all controls within the MPEG control class are
642 described. First the generic controls, then controls specific for
643 certain hardware.</para>
644
645 <section>
646 <title>Generic MPEG Controls</title>
647
648 <table pgwide="1" frame="none" id="mpeg-control-id">
649 <title>MPEG Control IDs</title>
650 <tgroup cols="4">
651 <colspec colname="c1" colwidth="1*" />
652 <colspec colname="c2" colwidth="6*" />
653 <colspec colname="c3" colwidth="2*" />
654 <colspec colname="c4" colwidth="6*" />
655 <spanspec namest="c1" nameend="c2" spanname="id" />
656 <spanspec namest="c2" nameend="c4" spanname="descr" />
657 <thead>
658 <row>
659 <entry spanname="id" align="left">ID</entry>
660 <entry align="left">Type</entry>
661 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
662 </row>
663 </thead>
664 <tbody valign="top">
665 <row><entry></entry></row>
666 <row>
667 <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant>&nbsp;</entry>
668 <entry>class</entry>
669 </row><row><entry spanname="descr">The MPEG class
670 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
671 description of this control class. This description can be used as the
672 caption of a Tab page in a GUI, for example.</entry>
673 </row>
674 <row><entry></entry></row>
675 <row id="v4l2-mpeg-stream-type">
676 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant>&nbsp;</entry>
677 <entry>enum&nbsp;v4l2_mpeg_stream_type</entry>
678 </row><row><entry spanname="descr">The MPEG-1, -2 or -4
679 output stream type. One cannot assume anything here. Each hardware
680 MPEG encoder tends to support different subsets of the available MPEG
681 stream types. The currently defined stream types are:</entry>
682 </row>
683 <row>
684 <entrytbl spanname="descr" cols="2">
685 <tbody valign="top">
686 <row>
687 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant>&nbsp;</entry>
688 <entry>MPEG-2 program stream</entry>
689 </row>
690 <row>
691 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant>&nbsp;</entry>
692 <entry>MPEG-2 transport stream</entry>
693 </row>
694 <row>
695 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant>&nbsp;</entry>
696 <entry>MPEG-1 system stream</entry>
697 </row>
698 <row>
699 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant>&nbsp;</entry>
700 <entry>MPEG-2 DVD-compatible stream</entry>
701 </row>
702 <row>
703 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant>&nbsp;</entry>
704 <entry>MPEG-1 VCD-compatible stream</entry>
705 </row>
706 <row>
707 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant>&nbsp;</entry>
708 <entry>MPEG-2 SVCD-compatible stream</entry>
709 </row>
710 </tbody>
711 </entrytbl>
712 </row>
713 <row><entry></entry></row>
714 <row>
715 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant>&nbsp;</entry>
716 <entry>integer</entry>
717 </row><row><entry spanname="descr">Program Map Table
718 Packet ID for the MPEG transport stream (default 16)</entry>
719 </row>
720 <row><entry></entry></row>
721 <row>
722 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant>&nbsp;</entry>
723 <entry>integer</entry>
724 </row><row><entry spanname="descr">Audio Packet ID for
725 the MPEG transport stream (default 256)</entry>
726 </row>
727 <row><entry></entry></row>
728 <row>
729 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant>&nbsp;</entry>
730 <entry>integer</entry>
731 </row><row><entry spanname="descr">Video Packet ID for
732 the MPEG transport stream (default 260)</entry>
733 </row>
734 <row><entry></entry></row>
735 <row>
736 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant>&nbsp;</entry>
737 <entry>integer</entry>
738 </row><row><entry spanname="descr">Packet ID for the
739 MPEG transport stream carrying PCR fields (default 259)</entry>
740 </row>
741 <row><entry></entry></row>
742 <row>
743 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant>&nbsp;</entry>
744 <entry>integer</entry>
745 </row><row><entry spanname="descr">Audio ID for MPEG
746 PES</entry>
747 </row>
748 <row><entry></entry></row>
749 <row>
750 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant>&nbsp;</entry>
751 <entry>integer</entry>
752 </row><row><entry spanname="descr">Video ID for MPEG
753 PES</entry>
754 </row>
755 <row><entry></entry></row>
756 <row id="v4l2-mpeg-stream-vbi-fmt">
757 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant>&nbsp;</entry>
758 <entry>enum&nbsp;v4l2_mpeg_stream_vbi_fmt</entry>
759 </row><row><entry spanname="descr">Some cards can embed
760 VBI data (&eg; Closed Caption, Teletext) into the MPEG stream. This
761 control selects whether VBI data should be embedded, and if so, what
762 embedding method should be used. The list of possible VBI formats
763 depends on the driver. The currently defined VBI format types
764 are:</entry>
765 </row>
766 <row>
767 <entrytbl spanname="descr" cols="2">
768 <tbody valign="top">
769 <row>
770 <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant>&nbsp;</entry>
771 <entry>No VBI in the MPEG stream</entry>
772 </row>
773 <row>
774 <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant>&nbsp;</entry>
775 <entry>VBI in private packets, IVTV format (documented
776 in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry>
777 </row>
778 </tbody>
779 </entrytbl>
780 </row>
781 <row><entry></entry></row>
782 <row id="v4l2-mpeg-audio-sampling-freq">
783 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant>&nbsp;</entry>
784 <entry>enum&nbsp;v4l2_mpeg_audio_sampling_freq</entry>
785 </row><row><entry spanname="descr">MPEG Audio sampling
786 frequency. Possible values are:</entry>
787 </row>
788 <row>
789 <entrytbl spanname="descr" cols="2">
790 <tbody valign="top">
791 <row>
792 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant>&nbsp;</entry>
793 <entry>44.1 kHz</entry>
794 </row>
795 <row>
796 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant>&nbsp;</entry>
797 <entry>48 kHz</entry>
798 </row>
799 <row>
800 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant>&nbsp;</entry>
801 <entry>32 kHz</entry>
802 </row>
803 </tbody>
804 </entrytbl>
805 </row>
806 <row><entry></entry></row>
807 <row id="v4l2-mpeg-audio-encoding">
808 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant>&nbsp;</entry>
809 <entry>enum&nbsp;v4l2_mpeg_audio_encoding</entry>
810 </row><row><entry spanname="descr">MPEG Audio encoding.
811 Possible values are:</entry>
812 </row>
813 <row>
814 <entrytbl spanname="descr" cols="2">
815 <tbody valign="top">
816 <row>
817 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant>&nbsp;</entry>
818 <entry>MPEG-1/2 Layer I encoding</entry>
819 </row>
820 <row>
821 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant>&nbsp;</entry>
822 <entry>MPEG-1/2 Layer II encoding</entry>
823 </row>
824 <row>
825 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant>&nbsp;</entry>
826 <entry>MPEG-1/2 Layer III encoding</entry>
827 </row>
828 <row>
829 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant>&nbsp;</entry>
830 <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry>
831 </row>
832 <row>
833 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant>&nbsp;</entry>
834 <entry>AC-3 aka ATSC A/52 encoding</entry>
835 </row>
836 </tbody>
837 </entrytbl>
838 </row>
839 <row><entry></entry></row>
840 <row id="v4l2-mpeg-audio-l1-bitrate">
841 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant>&nbsp;</entry>
842 <entry>enum&nbsp;v4l2_mpeg_audio_l1_bitrate</entry>
843 </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate.
844 Possible values are:</entry>
845 </row>
846 <row>
847 <entrytbl spanname="descr" cols="2">
848 <tbody valign="top">
849 <row>
850 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant>&nbsp;</entry>
851 <entry>32 kbit/s</entry></row>
852 <row>
853 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant>&nbsp;</entry>
854 <entry>64 kbit/s</entry>
855 </row>
856 <row>
857 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant>&nbsp;</entry>
858 <entry>96 kbit/s</entry>
859 </row>
860 <row>
861 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant>&nbsp;</entry>
862 <entry>128 kbit/s</entry>
863 </row>
864 <row>
865 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant>&nbsp;</entry>
866 <entry>160 kbit/s</entry>
867 </row>
868 <row>
869 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant>&nbsp;</entry>
870 <entry>192 kbit/s</entry>
871 </row>
872 <row>
873 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant>&nbsp;</entry>
874 <entry>224 kbit/s</entry>
875 </row>
876 <row>
877 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant>&nbsp;</entry>
878 <entry>256 kbit/s</entry>
879 </row>
880 <row>
881 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant>&nbsp;</entry>
882 <entry>288 kbit/s</entry>
883 </row>
884 <row>
885 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant>&nbsp;</entry>
886 <entry>320 kbit/s</entry>
887 </row>
888 <row>
889 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant>&nbsp;</entry>
890 <entry>352 kbit/s</entry>
891 </row>
892 <row>
893 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant>&nbsp;</entry>
894 <entry>384 kbit/s</entry>
895 </row>
896 <row>
897 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant>&nbsp;</entry>
898 <entry>416 kbit/s</entry>
899 </row>
900 <row>
901 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant>&nbsp;</entry>
902 <entry>448 kbit/s</entry>
903 </row>
904 </tbody>
905 </entrytbl>
906 </row>
907 <row><entry></entry></row>
908 <row id="v4l2-mpeg-audio-l2-bitrate">
909 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant>&nbsp;</entry>
910 <entry>enum&nbsp;v4l2_mpeg_audio_l2_bitrate</entry>
911 </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate.
912 Possible values are:</entry>
913 </row>
914 <row>
915 <entrytbl spanname="descr" cols="2">
916 <tbody valign="top">
917 <row>
918 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant>&nbsp;</entry>
919 <entry>32 kbit/s</entry>
920 </row>
921 <row>
922 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant>&nbsp;</entry>
923 <entry>48 kbit/s</entry>
924 </row>
925 <row>
926 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant>&nbsp;</entry>
927 <entry>56 kbit/s</entry>
928 </row>
929 <row>
930 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant>&nbsp;</entry>
931 <entry>64 kbit/s</entry>
932 </row>
933 <row>
934 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant>&nbsp;</entry>
935 <entry>80 kbit/s</entry>
936 </row>
937 <row>
938 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant>&nbsp;</entry>
939 <entry>96 kbit/s</entry>
940 </row>
941 <row>
942 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant>&nbsp;</entry>
943 <entry>112 kbit/s</entry>
944 </row>
945 <row>
946 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant>&nbsp;</entry>
947 <entry>128 kbit/s</entry>
948 </row>
949 <row>
950 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant>&nbsp;</entry>
951 <entry>160 kbit/s</entry>
952 </row>
953 <row>
954 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant>&nbsp;</entry>
955 <entry>192 kbit/s</entry>
956 </row>
957 <row>
958 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant>&nbsp;</entry>
959 <entry>224 kbit/s</entry>
960 </row>
961 <row>
962 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant>&nbsp;</entry>
963 <entry>256 kbit/s</entry>
964 </row>
965 <row>
966 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant>&nbsp;</entry>
967 <entry>320 kbit/s</entry>
968 </row>
969 <row>
970 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant>&nbsp;</entry>
971 <entry>384 kbit/s</entry>
972 </row>
973 </tbody>
974 </entrytbl>
975 </row>
976 <row><entry></entry></row>
977 <row id="v4l2-mpeg-audio-l3-bitrate">
978 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant>&nbsp;</entry>
979 <entry>enum&nbsp;v4l2_mpeg_audio_l3_bitrate</entry>
980 </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate.
981 Possible values are:</entry>
982 </row>
983 <row>
984 <entrytbl spanname="descr" cols="2">
985 <tbody valign="top">
986 <row>
987 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant>&nbsp;</entry>
988 <entry>32 kbit/s</entry>
989 </row>
990 <row>
991 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant>&nbsp;</entry>
992 <entry>40 kbit/s</entry>
993 </row>
994 <row>
995 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant>&nbsp;</entry>
996 <entry>48 kbit/s</entry>
997 </row>
998 <row>
999 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant>&nbsp;</entry>
1000 <entry>56 kbit/s</entry>
1001 </row>
1002 <row>
1003 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant>&nbsp;</entry>
1004 <entry>64 kbit/s</entry>
1005 </row>
1006 <row>
1007 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant>&nbsp;</entry>
1008 <entry>80 kbit/s</entry>
1009 </row>
1010 <row>
1011 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant>&nbsp;</entry>
1012 <entry>96 kbit/s</entry>
1013 </row>
1014 <row>
1015 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant>&nbsp;</entry>
1016 <entry>112 kbit/s</entry>
1017 </row>
1018 <row>
1019 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant>&nbsp;</entry>
1020 <entry>128 kbit/s</entry>
1021 </row>
1022 <row>
1023 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant>&nbsp;</entry>
1024 <entry>160 kbit/s</entry>
1025 </row>
1026 <row>
1027 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant>&nbsp;</entry>
1028 <entry>192 kbit/s</entry>
1029 </row>
1030 <row>
1031 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant>&nbsp;</entry>
1032 <entry>224 kbit/s</entry>
1033 </row>
1034 <row>
1035 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant>&nbsp;</entry>
1036 <entry>256 kbit/s</entry>
1037 </row>
1038 <row>
1039 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant>&nbsp;</entry>
1040 <entry>320 kbit/s</entry>
1041 </row>
1042 </tbody>
1043 </entrytbl>
1044 </row>
1045 <row><entry></entry></row>
1046 <row>
1047 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant>&nbsp;</entry>
1048 <entry>integer</entry>
1049 </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry>
1050 </row>
1051 <row><entry></entry></row>
1052 <row id="v4l2-mpeg-audio-ac3-bitrate">
1053 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant>&nbsp;</entry>
1054 <entry>enum&nbsp;v4l2_mpeg_audio_ac3_bitrate</entry>
1055 </row><row><entry spanname="descr">AC-3 bitrate.
1056 Possible values are:</entry>
1057 </row>
1058 <row>
1059 <entrytbl spanname="descr" cols="2">
1060 <tbody valign="top">
1061 <row>
1062 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant>&nbsp;</entry>
1063 <entry>32 kbit/s</entry>
1064 </row>
1065 <row>
1066 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant>&nbsp;</entry>
1067 <entry>40 kbit/s</entry>
1068 </row>
1069 <row>
1070 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant>&nbsp;</entry>
1071 <entry>48 kbit/s</entry>
1072 </row>
1073 <row>
1074 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant>&nbsp;</entry>
1075 <entry>56 kbit/s</entry>
1076 </row>
1077 <row>
1078 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant>&nbsp;</entry>
1079 <entry>64 kbit/s</entry>
1080 </row>
1081 <row>
1082 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant>&nbsp;</entry>
1083 <entry>80 kbit/s</entry>
1084 </row>
1085 <row>
1086 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant>&nbsp;</entry>
1087 <entry>96 kbit/s</entry>
1088 </row>
1089 <row>
1090 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant>&nbsp;</entry>
1091 <entry>112 kbit/s</entry>
1092 </row>
1093 <row>
1094 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant>&nbsp;</entry>
1095 <entry>128 kbit/s</entry>
1096 </row>
1097 <row>
1098 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant>&nbsp;</entry>
1099 <entry>160 kbit/s</entry>
1100 </row>
1101 <row>
1102 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant>&nbsp;</entry>
1103 <entry>192 kbit/s</entry>
1104 </row>
1105 <row>
1106 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant>&nbsp;</entry>
1107 <entry>224 kbit/s</entry>
1108 </row>
1109 <row>
1110 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant>&nbsp;</entry>
1111 <entry>256 kbit/s</entry>
1112 </row>
1113 <row>
1114 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant>&nbsp;</entry>
1115 <entry>320 kbit/s</entry>
1116 </row>
1117 <row>
1118 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant>&nbsp;</entry>
1119 <entry>384 kbit/s</entry>
1120 </row>
1121 <row>
1122 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant>&nbsp;</entry>
1123 <entry>448 kbit/s</entry>
1124 </row>
1125 <row>
1126 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant>&nbsp;</entry>
1127 <entry>512 kbit/s</entry>
1128 </row>
1129 <row>
1130 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant>&nbsp;</entry>
1131 <entry>576 kbit/s</entry>
1132 </row>
1133 <row>
1134 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant>&nbsp;</entry>
1135 <entry>640 kbit/s</entry>
1136 </row>
1137 </tbody>
1138 </entrytbl>
1139 </row>
1140 <row><entry></entry></row>
1141 <row id="v4l2-mpeg-audio-mode">
1142 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant>&nbsp;</entry>
1143 <entry>enum&nbsp;v4l2_mpeg_audio_mode</entry>
1144 </row><row><entry spanname="descr">MPEG Audio mode.
1145 Possible values are:</entry>
1146 </row>
1147 <row>
1148 <entrytbl spanname="descr" cols="2">
1149 <tbody valign="top">
1150 <row>
1151 <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant>&nbsp;</entry>
1152 <entry>Stereo</entry>
1153 </row>
1154 <row>
1155 <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant>&nbsp;</entry>
1156 <entry>Joint Stereo</entry>
1157 </row>
1158 <row>
1159 <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant>&nbsp;</entry>
1160 <entry>Bilingual</entry>
1161 </row>
1162 <row>
1163 <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant>&nbsp;</entry>
1164 <entry>Mono</entry>
1165 </row>
1166 </tbody>
1167 </entrytbl>
1168 </row>
1169 <row><entry></entry></row>
1170 <row id="v4l2-mpeg-audio-mode-extension">
1171 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant>&nbsp;</entry>
1172 <entry>enum&nbsp;v4l2_mpeg_audio_mode_extension</entry>
1173 </row><row><entry spanname="descr">Joint Stereo
1174 audio mode extension. In Layer I and II they indicate which subbands
1175 are in intensity stereo. All other subbands are coded in stereo. Layer
1176 III is not (yet) supported. Possible values
1177 are:</entry>
1178 </row>
1179 <row>
1180 <entrytbl spanname="descr" cols="2">
1181 <tbody valign="top">
1182 <row>
1183 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant>&nbsp;</entry>
1184 <entry>Subbands 4-31 in intensity stereo</entry>
1185 </row>
1186 <row>
1187 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant>&nbsp;</entry>
1188 <entry>Subbands 8-31 in intensity stereo</entry>
1189 </row>
1190 <row>
1191 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant>&nbsp;</entry>
1192 <entry>Subbands 12-31 in intensity stereo</entry>
1193 </row>
1194 <row>
1195 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant>&nbsp;</entry>
1196 <entry>Subbands 16-31 in intensity stereo</entry>
1197 </row>
1198 </tbody>
1199 </entrytbl>
1200 </row>
1201 <row><entry></entry></row>
1202 <row id="v4l2-mpeg-audio-emphasis">
1203 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant>&nbsp;</entry>
1204 <entry>enum&nbsp;v4l2_mpeg_audio_emphasis</entry>
1205 </row><row><entry spanname="descr">Audio Emphasis.
1206 Possible values are:</entry>
1207 </row>
1208 <row>
1209 <entrytbl spanname="descr" cols="2">
1210 <tbody valign="top">
1211 <row>
1212 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant>&nbsp;</entry>
1213 <entry>None</entry>
1214 </row>
1215 <row>
1216 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant>&nbsp;</entry>
1217 <entry>50/15 microsecond emphasis</entry>
1218 </row>
1219 <row>
1220 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant>&nbsp;</entry>
1221 <entry>CCITT J.17</entry>
1222 </row>
1223 </tbody>
1224 </entrytbl>
1225 </row>
1226 <row><entry></entry></row>
1227 <row id="v4l2-mpeg-audio-crc">
1228 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant>&nbsp;</entry>
1229 <entry>enum&nbsp;v4l2_mpeg_audio_crc</entry>
1230 </row><row><entry spanname="descr">CRC method. Possible
1231 values are:</entry>
1232 </row>
1233 <row>
1234 <entrytbl spanname="descr" cols="2">
1235 <tbody valign="top">
1236 <row>
1237 <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant>&nbsp;</entry>
1238 <entry>None</entry>
1239 </row>
1240 <row>
1241 <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant>&nbsp;</entry>
1242 <entry>16 bit parity check</entry>
1243 </row>
1244 </tbody>
1245 </entrytbl>
1246 </row>
1247 <row><entry></entry></row>
1248 <row>
1249 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant>&nbsp;</entry>
1250 <entry>boolean</entry>
1251 </row><row><entry spanname="descr">Mutes the audio when
1252 capturing. This is not done by muting audio hardware, which can still
1253 produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1254 and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1255 </row>
1256 <row><entry></entry></row>
1257 <row id="v4l2-mpeg-video-encoding">
1258 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
1259 <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
1260 </row><row><entry spanname="descr">MPEG Video encoding
1261 method. Possible values are:</entry>
1262 </row>
1263 <row>
1264 <entrytbl spanname="descr" cols="2">
1265 <tbody valign="top">
1266 <row>
1267 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant>&nbsp;</entry>
1268 <entry>MPEG-1 Video encoding</entry>
1269 </row>
1270 <row>
1271 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant>&nbsp;</entry>
1272 <entry>MPEG-2 Video encoding</entry>
1273 </row>
1274 <row>
1275 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant>&nbsp;</entry>
1276 <entry>MPEG-4 AVC (H.264) Video encoding</entry>
1277 </row>
1278 </tbody>
1279 </entrytbl>
1280 </row>
1281 <row><entry></entry></row>
1282 <row id="v4l2-mpeg-video-aspect">
1283 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant>&nbsp;</entry>
1284 <entry>enum&nbsp;v4l2_mpeg_video_aspect</entry>
1285 </row><row><entry spanname="descr">Video aspect.
1286 Possible values are:</entry>
1287 </row>
1288 <row>
1289 <entrytbl spanname="descr" cols="2">
1290 <tbody valign="top">
1291 <row>
1292 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant>&nbsp;</entry>
1293 </row>
1294 <row>
1295 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant>&nbsp;</entry>
1296 </row>
1297 <row>
1298 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant>&nbsp;</entry>
1299 </row>
1300 <row>
1301 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant>&nbsp;</entry>
1302 </row>
1303 </tbody>
1304 </entrytbl>
1305 </row>
1306 <row><entry></entry></row>
1307 <row>
1308 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant>&nbsp;</entry>
1309 <entry>integer</entry>
1310 </row><row><entry spanname="descr">Number of B-Frames
1311 (default 2)</entry>
1312 </row>
1313 <row><entry></entry></row>
1314 <row>
1315 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant>&nbsp;</entry>
1316 <entry>integer</entry>
1317 </row><row><entry spanname="descr">GOP size (default
1318 12)</entry>
1319 </row>
1320 <row><entry></entry></row>
1321 <row>
1322 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant>&nbsp;</entry>
1323 <entry>boolean</entry>
1324 </row><row><entry spanname="descr">GOP closure (default
1325 1)</entry>
1326 </row>
1327 <row><entry></entry></row>
1328 <row>
1329 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant>&nbsp;</entry>
1330 <entry>boolean</entry>
1331 </row><row><entry spanname="descr">Enable 3:2 pulldown
1332 (default 0)</entry>
1333 </row>
1334 <row><entry></entry></row>
1335 <row id="v4l2-mpeg-video-bitrate-mode">
1336 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant>&nbsp;</entry>
1337 <entry>enum&nbsp;v4l2_mpeg_video_bitrate_mode</entry>
1338 </row><row><entry spanname="descr">Video bitrate mode.
1339 Possible values are:</entry>
1340 </row>
1341 <row>
1342 <entrytbl spanname="descr" cols="2">
1343 <tbody valign="top">
1344 <row>
1345 <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant>&nbsp;</entry>
1346 <entry>Variable bitrate</entry>
1347 </row>
1348 <row>
1349 <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant>&nbsp;</entry>
1350 <entry>Constant bitrate</entry>
1351 </row>
1352 </tbody>
1353 </entrytbl>
1354 </row>
1355 <row><entry></entry></row>
1356 <row>
1357 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant>&nbsp;</entry>
1358 <entry>integer</entry>
1359 </row><row><entry spanname="descr">Video bitrate in bits
1360 per second.</entry>
1361 </row>
1362 <row><entry></entry></row>
1363 <row>
1364 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant>&nbsp;</entry>
1365 <entry>integer</entry>
1366 </row><row><entry spanname="descr">Peak video bitrate in
1367 bits per second. Must be larger or equal to the average video bitrate.
1368 It is ignored if the video bitrate mode is set to constant
1369 bitrate.</entry>
1370 </row>
1371 <row><entry></entry></row>
1372 <row>
1373 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant>&nbsp;</entry>
1374 <entry>integer</entry>
1375 </row><row><entry spanname="descr">For every captured
1376 frame, skip this many subsequent frames (default 0).</entry>
1377 </row>
1378 <row><entry></entry></row>
1379 <row>
1380 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant>&nbsp;</entry>
1381 <entry>boolean</entry>
1382 </row>
1383 <row><entry spanname="descr">"Mutes" the video to a
1384 fixed color when capturing. This is useful for testing, to produce a
1385 fixed video bitstream. 0 = unmuted, 1 = muted.</entry>
1386 </row>
1387 <row><entry></entry></row>
1388 <row>
1389 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant>&nbsp;</entry>
1390 <entry>integer</entry>
1391 </row><row><entry spanname="descr">Sets the "mute" color
1392 of the video. The supplied 32-bit integer is interpreted as follows (bit
1393 0 = least significant bit):</entry>
1394 </row>
1395 <row>
1396 <entrytbl spanname="descr" cols="2">
1397 <tbody valign="top">
1398 <row>
1399 <entry>Bit 0:7</entry>
1400 <entry>V chrominance information</entry>
1401 </row>
1402 <row>
1403 <entry>Bit 8:15</entry>
1404 <entry>U chrominance information</entry>
1405 </row>
1406 <row>
1407 <entry>Bit 16:23</entry>
1408 <entry>Y luminance information</entry>
1409 </row>
1410 <row>
1411 <entry>Bit 24:31</entry>
1412 <entry>Must be zero.</entry>
1413 </row>
1414 </tbody>
1415 </entrytbl>
1416 </row>
1417 </tbody>
1418 </tgroup>
1419 </table>
1420 </section>
1421
1422 <section>
1423 <title>CX2341x MPEG Controls</title>
1424
1425 <para>The following MPEG class controls deal with MPEG
1426 encoding settings that are specific to the Conexant CX23415 and
1427 CX23416 MPEG encoding chips.</para>
1428
1429 <table pgwide="1" frame="none" id="cx2341x-control-id">
1430 <title>CX2341x Control IDs</title>
1431 <tgroup cols="4">
1432 <colspec colname="c1" colwidth="1*" />
1433 <colspec colname="c2" colwidth="6*" />
1434 <colspec colname="c3" colwidth="2*" />
1435 <colspec colname="c4" colwidth="6*" />
1436 <spanspec namest="c1" nameend="c2" spanname="id" />
1437 <spanspec namest="c2" nameend="c4" spanname="descr" />
1438 <thead>
1439 <row>
1440 <entry spanname="id" align="left">ID</entry>
1441 <entry align="left">Type</entry>
1442 </row><row><entry spanname="descr" align="left">Description</entry>
1443 </row>
1444 </thead>
1445 <tbody valign="top">
1446 <row><entry></entry></row>
1447 <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode">
1448 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant>&nbsp;</entry>
1449 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry>
1450 </row><row><entry spanname="descr">Sets the Spatial
1451 Filter mode (default <constant>MANUAL</constant>). Possible values
1452 are:</entry>
1453 </row>
1454 <row>
1455 <entrytbl spanname="descr" cols="2">
1456 <tbody valign="top">
1457 <row>
1458 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
1459 <entry>Choose the filter manually</entry>
1460 </row>
1461 <row>
1462 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
1463 <entry>Choose the filter automatically</entry>
1464 </row>
1465 </tbody>
1466 </entrytbl>
1467 </row>
1468 <row><entry></entry></row>
1469 <row>
1470 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant>&nbsp;</entry>
1471 <entry>integer&nbsp;(0-15)</entry>
1472 </row><row><entry spanname="descr">The setting for the
1473 Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry>
1474 </row>
1475 <row><entry></entry></row>
1476 <row id="luma-spatial-filter-type">
1477 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
1478 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry>
1479 </row><row><entry spanname="descr">Select the algorithm
1480 to use for the Luma Spatial Filter (default
1481 <constant>1D_HOR</constant>). Possible values:</entry>
1482 </row>
1483 <row>
1484 <entrytbl spanname="descr" cols="2">
1485 <tbody valign="top">
1486 <row>
1487 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
1488 <entry>No filter</entry>
1489 </row>
1490 <row>
1491 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
1492 <entry>One-dimensional horizontal</entry>
1493 </row>
1494 <row>
1495 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant>&nbsp;</entry>
1496 <entry>One-dimensional vertical</entry>
1497 </row>
1498 <row>
1499 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant>&nbsp;</entry>
1500 <entry>Two-dimensional separable</entry>
1501 </row>
1502 <row>
1503 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant>&nbsp;</entry>
1504 <entry>Two-dimensional symmetrical
1505 non-separable</entry>
1506 </row>
1507 </tbody>
1508 </entrytbl>
1509 </row>
1510 <row><entry></entry></row>
1511 <row id="chroma-spatial-filter-type">
1512 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
1513 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry>
1514 </row><row><entry spanname="descr">Select the algorithm
1515 for the Chroma Spatial Filter (default <constant>1D_HOR</constant>).
1516 Possible values are:</entry>
1517 </row>
1518 <row>
1519 <entrytbl spanname="descr" cols="2">
1520 <tbody valign="top">
1521 <row>
1522 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
1523 <entry>No filter</entry>
1524 </row>
1525 <row>
1526 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
1527 <entry>One-dimensional horizontal</entry>
1528 </row>
1529 </tbody>
1530 </entrytbl>
1531 </row>
1532 <row><entry></entry></row>
1533 <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode">
1534 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant>&nbsp;</entry>
1535 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry>
1536 </row><row><entry spanname="descr">Sets the Temporal
1537 Filter mode (default <constant>MANUAL</constant>). Possible values
1538 are:</entry>
1539 </row>
1540 <row>
1541 <entrytbl spanname="descr" cols="2">
1542 <tbody valign="top">
1543 <row>
1544 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
1545 <entry>Choose the filter manually</entry>
1546 </row>
1547 <row>
1548 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
1549 <entry>Choose the filter automatically</entry>
1550 </row>
1551 </tbody>
1552 </entrytbl>
1553 </row>
1554 <row><entry></entry></row>
1555 <row>
1556 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant>&nbsp;</entry>
1557 <entry>integer&nbsp;(0-31)</entry>
1558 </row><row><entry spanname="descr">The setting for the
1559 Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale
1560 capturing and 0 for scaled capturing.)</entry>
1561 </row>
1562 <row><entry></entry></row>
1563 <row id="v4l2-mpeg-cx2341x-video-median-filter-type">
1564 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant>&nbsp;</entry>
1565 <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_median_filter_type</entry>
1566 </row><row><entry spanname="descr">Median Filter Type
1567 (default <constant>OFF</constant>). Possible values are:</entry>
1568 </row>
1569 <row>
1570 <entrytbl spanname="descr" cols="2">
1571 <tbody valign="top">
1572 <row>
1573 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant>&nbsp;</entry>
1574 <entry>No filter</entry>
1575 </row>
1576 <row>
1577 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant>&nbsp;</entry>
1578 <entry>Horizontal filter</entry>
1579 </row>
1580 <row>
1581 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant>&nbsp;</entry>
1582 <entry>Vertical filter</entry>
1583 </row>
1584 <row>
1585 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant>&nbsp;</entry>
1586 <entry>Horizontal and vertical filter</entry>
1587 </row>
1588 <row>
1589 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant>&nbsp;</entry>
1590 <entry>Diagonal filter</entry>
1591 </row>
1592 </tbody>
1593 </entrytbl>
1594 </row>
1595 <row><entry></entry></row>
1596 <row>
1597 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
1598 <entry>integer&nbsp;(0-255)</entry>
1599 </row><row><entry spanname="descr">Threshold above which
1600 the luminance median filter is enabled (default 0)</entry>
1601 </row>
1602 <row><entry></entry></row>
1603 <row>
1604 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
1605 <entry>integer&nbsp;(0-255)</entry>
1606 </row><row><entry spanname="descr">Threshold below which
1607 the luminance median filter is enabled (default 255)</entry>
1608 </row>
1609 <row><entry></entry></row>
1610 <row>
1611 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
1612 <entry>integer&nbsp;(0-255)</entry>
1613 </row><row><entry spanname="descr">Threshold above which
1614 the chroma median filter is enabled (default 0)</entry>
1615 </row>
1616 <row><entry></entry></row>
1617 <row>
1618 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
1619 <entry>integer&nbsp;(0-255)</entry>
1620 </row><row><entry spanname="descr">Threshold below which
1621 the chroma median filter is enabled (default 255)</entry>
1622 </row>
1623 <row><entry></entry></row>
1624 <row>
1625 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant>&nbsp;</entry>
1626 <entry>boolean</entry>
1627 </row>
1628 <row><entry spanname="descr">The CX2341X MPEG encoder
1629 can insert one empty MPEG-2 PES packet into the stream between every
1630 four video frames. The packet size is 2048 bytes, including the
1631 packet_start_code_prefix and stream_id fields. The stream_id is 0xBF
1632 (private stream 2). The payload consists of 0x00 bytes, to be filled
1633 in by the application. 0 = do not insert, 1 = insert packets.</entry>
1634 </row>
1635 </tbody>
1636 </tgroup>
1637 </table>
1638 </section>
1639 </section>
1640
1641 <section id="camera-controls">
1642 <title>Camera Control Reference</title>
1643
1644 <para>The Camera class includes controls for mechanical (or
1645 equivalent digital) features of a device such as controllable lenses
1646 or sensors.</para>
1647
1648 <table pgwide="1" frame="none" id="camera-control-id">
1649 <title>Camera Control IDs</title>
1650 <tgroup cols="4">
1651 <colspec colname="c1" colwidth="1*" />
1652 <colspec colname="c2" colwidth="6*" />
1653 <colspec colname="c3" colwidth="2*" />
1654 <colspec colname="c4" colwidth="6*" />
1655 <spanspec namest="c1" nameend="c2" spanname="id" />
1656 <spanspec namest="c2" nameend="c4" spanname="descr" />
1657 <thead>
1658 <row>
1659 <entry spanname="id" align="left">ID</entry>
1660 <entry align="left">Type</entry>
1661 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
1662 </row>
1663 </thead>
1664 <tbody valign="top">
1665 <row><entry></entry></row>
1666 <row>
1667 <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant>&nbsp;</entry>
1668 <entry>class</entry>
1669 </row><row><entry spanname="descr">The Camera class
1670 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
1671 description of this control class.</entry>
1672 </row>
1673 <row><entry></entry></row>
1674
1675 <row id="v4l2-exposure-auto-type">
1676 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant>&nbsp;</entry>
1677 <entry>enum&nbsp;v4l2_exposure_auto_type</entry>
1678 </row><row><entry spanname="descr">Enables automatic
1679 adjustments of the exposure time and/or iris aperture. The effect of
1680 manual changes of the exposure time or iris aperture while these
1681 features are enabled is undefined, drivers should ignore such
1682 requests. Possible values are:</entry>
1683 </row>
1684 <row>
1685 <entrytbl spanname="descr" cols="2">
1686 <tbody valign="top">
1687 <row>
1688 <entry><constant>V4L2_EXPOSURE_AUTO</constant>&nbsp;</entry>
1689 <entry>Automatic exposure time, automatic iris
1690 aperture.</entry>
1691 </row>
1692 <row>
1693 <entry><constant>V4L2_EXPOSURE_MANUAL</constant>&nbsp;</entry>
1694 <entry>Manual exposure time, manual iris.</entry>
1695 </row>
1696 <row>
1697 <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant>&nbsp;</entry>
1698 <entry>Manual exposure time, auto iris.</entry>
1699 </row>
1700 <row>
1701 <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant>&nbsp;</entry>
1702 <entry>Auto exposure time, manual iris.</entry>
1703 </row>
1704 </tbody>
1705 </entrytbl>
1706 </row>
1707 <row><entry></entry></row>
1708
1709 <row>
1710 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant>&nbsp;</entry>
1711 <entry>integer</entry>
1712 </row><row><entry spanname="descr">Determines the exposure
1713 time of the camera sensor. The exposure time is limited by the frame
1714 interval. Drivers should interpret the values as 100 &micro;s units,
1715 where the value 1 stands for 1/10000th of a second, 10000 for 1 second
1716 and 100000 for 10 seconds.</entry>
1717 </row>
1718 <row><entry></entry></row>
1719
1720 <row>
1721 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant>&nbsp;</entry>
1722 <entry>boolean</entry>
1723 </row><row><entry spanname="descr">When
1724 <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to
1725 <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>,
1726 this control determines if the device may dynamically vary the frame
1727 rate. By default this feature is disabled (0) and the frame rate must
1728 remain constant.</entry>
1729 </row>
1730 <row><entry></entry></row>
1731
1732 <row>
1733 <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
1734 <entry>integer</entry>
1735 </row><row><entry spanname="descr">This control turns the
1736 camera horizontally by the specified amount. The unit is undefined. A
1737 positive value moves the camera to the right (clockwise when viewed
1738 from above), a negative value to the left. A value of zero does not
1739 cause motion. This is a write-only control.</entry>
1740 </row>
1741 <row><entry></entry></row>
1742
1743 <row>
1744 <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant>&nbsp;</entry>
1745 <entry>integer</entry>
1746 </row><row><entry spanname="descr">This control turns the
1747 camera vertically by the specified amount. The unit is undefined. A
1748 positive value moves the camera up, a negative value down. A value of
1749 zero does not cause motion. This is a write-only control.</entry>
1750 </row>
1751 <row><entry></entry></row>
1752
1753 <row>
1754 <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant>&nbsp;</entry>
1755 <entry>button</entry>
1756 </row><row><entry spanname="descr">When this control is set,
1757 the camera moves horizontally to the default position.</entry>
1758 </row>
1759 <row><entry></entry></row>
1760
1761 <row>
1762 <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant>&nbsp;</entry>
1763 <entry>button</entry>
1764 </row><row><entry spanname="descr">When this control is set,
1765 the camera moves vertically to the default position.</entry>
1766 </row>
1767 <row><entry></entry></row>
1768
1769 <row>
1770 <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant>&nbsp;</entry>
1771 <entry>integer</entry>
1772 </row><row><entry spanname="descr">This control
1773 turns the camera horizontally to the specified position. Positive
1774 values move the camera to the right (clockwise when viewed from above),
1775 negative values to the left. Drivers should interpret the values as arc
1776 seconds, with valid values between -180 * 3600 and +180 * 3600
1777 inclusive.</entry>
1778 </row>
1779 <row><entry></entry></row>
1780
1781 <row>
1782 <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant>&nbsp;</entry>
1783 <entry>integer</entry>
1784 </row><row><entry spanname="descr">This control
1785 turns the camera vertically to the specified position. Positive values
1786 move the camera up, negative values down. Drivers should interpret the
1787 values as arc seconds, with valid values between -180 * 3600 and +180
1788 * 3600 inclusive.</entry>
1789 </row>
1790 <row><entry></entry></row>
1791
1792 <row>
1793 <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant>&nbsp;</entry>
1794 <entry>integer</entry>
1795 </row><row><entry spanname="descr">This control sets the
1796 focal point of the camera to the specified position. The unit is
1797 undefined. Positive values set the focus closer to the camera,
1798 negative values towards infinity.</entry>
1799 </row>
1800 <row><entry></entry></row>
1801
1802 <row>
1803 <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant>&nbsp;</entry>
1804 <entry>integer</entry>
1805 </row><row><entry spanname="descr">This control moves the
1806 focal point of the camera by the specified amount. The unit is
1807 undefined. Positive values move the focus closer to the camera,
1808 negative values towards infinity. This is a write-only control.</entry>
1809 </row>
1810 <row><entry></entry></row>
1811
1812 <row>
1813 <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
1814 <entry>boolean</entry>
1815 </row><row><entry spanname="descr">Enables automatic focus
1816 adjustments. The effect of manual focus adjustments while this feature
1817 is enabled is undefined, drivers should ignore such requests.</entry>
1818 </row>
1819 <row><entry></entry></row>
1820
1821 <row>
1822 <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry>
1823 <entry>integer</entry>
1824 </row><row><entry spanname="descr">Specify the objective lens
1825 focal length as an absolute value. The zoom unit is driver-specific and its
1826 value should be a positive integer.</entry>
1827 </row>
1828 <row><entry></entry></row>
1829
1830 <row>
1831 <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant>&nbsp;</entry>
1832 <entry>integer</entry>
1833 </row><row><entry spanname="descr">Specify the objective lens
1834 focal length relatively to the current value. Positive values move the zoom
1835 lens group towards the telephoto direction, negative values towards the
1836 wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry>
1837 </row>
1838 <row><entry></entry></row>
1839
1840 <row>
1841 <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant>&nbsp;</entry>
1842 <entry>integer</entry>
1843 </row><row><entry spanname="descr">Move the objective lens group
1844 at the specified speed until it reaches physical device limits or until an
1845 explicit request to stop the movement. A positive value moves the zoom lens
1846 group towards the telephoto direction. A value of zero stops the zoom lens
1847 group movement. A negative value moves the zoom lens group towards the
1848 wide-angle direction. The zoom speed unit is driver-specific.</entry>
1849 </row>
1850 <row><entry></entry></row>
1851
1852 <row>
1853 <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant>&nbsp;</entry>
1854 <entry>integer</entry>
1855 </row><row><entry spanname="descr">This control sets the
1856 camera's aperture to the specified value. The unit is undefined.
1857 Larger values open the iris wider, smaller values close it.</entry>
1858 </row>
1859 <row><entry></entry></row>
1860
1861 <row>
1862 <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant>&nbsp;</entry>
1863 <entry>integer</entry>
1864 </row><row><entry spanname="descr">This control modifies the
1865 camera's aperture by the specified amount. The unit is undefined.
1866 Positive values open the iris one step further, negative values close
1867 it one step further. This is a write-only control.</entry>
1868 </row>
1869 <row><entry></entry></row>
1870
1871 <row>
1872 <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry>
1873 <entry>boolean</entry>
1874 </row><row><entry spanname="descr">Prevent video from being acquired
1875 by the camera. When this control is set to <constant>TRUE</constant> (1), no
1876 image can be captured by the camera. Common means to enforce privacy are
1877 mechanical obturation of the sensor and firmware image processing, but the
1878 device is not restricted to these methods. Devices that implement the privacy
1879 control must support read access and may support write access.</entry>
1880 </row>
1881
1882 <row>
1883 <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant>&nbsp;</entry>
1884 <entry>integer</entry>
1885 </row><row><entry spanname="descr">Switch the band-stop filter of a
1886 camera sensor on or off, or specify its strength. Such band-stop filters can
1887 be used, for example, to filter out the fluorescent light component.</entry>
1888 </row>
1889 <row><entry></entry></row>
1890 </tbody>
1891 </tgroup>
1892 </table>
1893 </section>
1894
1895 <section id="fm-tx-controls">
1896 <title>FM Transmitter Control Reference</title>
1897
1898 <para>The FM Transmitter (FM_TX) class includes controls for common features of
1899 FM transmissions capable devices. Currently this class includes parameters for audio
1900 compression, pilot tone generation, audio deviation limiter, RDS transmission and
1901 tuning power features.</para>
1902
1903 <table pgwide="1" frame="none" id="fm-tx-control-id">
1904 <title>FM_TX Control IDs</title>
1905
1906 <tgroup cols="4">
1907 <colspec colname="c1" colwidth="1*" />
1908 <colspec colname="c2" colwidth="6*" />
1909 <colspec colname="c3" colwidth="2*" />
1910 <colspec colname="c4" colwidth="6*" />
1911 <spanspec namest="c1" nameend="c2" spanname="id" />
1912 <spanspec namest="c2" nameend="c4" spanname="descr" />
1913 <thead>
1914 <row>
1915 <entry spanname="id" align="left">ID</entry>
1916 <entry align="left">Type</entry>
1917 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
1918 </row>
1919 </thead>
1920 <tbody valign="top">
1921 <row><entry></entry></row>
1922 <row>
1923 <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant>&nbsp;</entry>
1924 <entry>class</entry>
1925 </row><row><entry spanname="descr">The FM_TX class
1926 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
1927 description of this control class.</entry>
1928 </row>
1929 <row>
1930 <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant>&nbsp;</entry>
1931 <entry>integer</entry>
1932 </row>
1933 <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz.
1934 The range and step are driver-specific.</entry>
1935 </row>
1936 <row>
1937 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant>&nbsp;</entry>
1938 <entry>integer</entry>
1939 </row>
1940 <row><entry spanname="descr">Sets the RDS Programme Identification field
1941 for transmission.</entry>
1942 </row>
1943 <row>
1944 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant>&nbsp;</entry>
1945 <entry>integer</entry>
1946 </row>
1947 <row><entry spanname="descr">Sets the RDS Programme Type field for transmission.
1948 This encodes up to 31 pre-defined programme types.</entry>
1949 </row>
1950 <row>
1951 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant>&nbsp;</entry>
1952 <entry>string</entry>
1953 </row>
1954 <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission.
1955 It is intended for static display on a receiver. It is the primary aid to listeners in programme service
1956 identification and selection. In Annex E of <xref linkend="en50067" />, the RDS specification,
1957 there is a full description of the correct character encoding for Programme Service name strings.
1958 Also from RDS specification, PS is usually a single eight character text. However, it is also possible
1959 to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
1960 with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
1961 </row>
1962 <row>
1963 <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant>&nbsp;</entry>
1964 <entry>string</entry>
1965 </row>
1966 <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of
1967 what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
1968 programme-related information or any other text. In these cases, RadioText should be used in addition to
1969 <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
1970 in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being
1971 used to transmit it, either 32 (2A block) or 64 (2B block). However, it is also possible
1972 to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
1973 with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
1974 </row>
1975 <row>
1976 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry>
1977 <entry>boolean</entry>
1978 </row>
1979 <row><entry spanname="descr">Enables or disables the audio deviation limiter feature.
1980 The limiter is useful when trying to maximize the audio volume, minimize receiver-generated
1981 distortion and prevent overmodulation.
1982 </entry>
1983 </row>
1984 <row>
1985 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant>&nbsp;</entry>
1986 <entry>integer</entry>
1987 </row>
1988 <row><entry spanname="descr">Sets the audio deviation limiter feature release time.
1989 Unit is in useconds. Step and range are driver-specific.</entry>
1990 </row>
1991 <row>
1992 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant>&nbsp;</entry>
1993 <entry>integer</entry>
1994 </row>
1995 <row><entry spanname="descr">Configures audio frequency deviation level in Hz.
1996 The range and step are driver-specific.</entry>
1997 </row>
1998 <row>
1999 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant>&nbsp;</entry>
2000 <entry>boolean</entry>
2001 </row>
2002 <row><entry spanname="descr">Enables or disables the audio compression feature.
2003 This feature amplifies signals below the threshold by a fixed gain and compresses audio
2004 signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry>
2005 </row>
2006 <row>
2007 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant>&nbsp;</entry>
2008 <entry>integer</entry>
2009 </row>
2010 <row><entry spanname="descr">Sets the gain for audio compression feature. It is
2011 a dB value. The range and step are driver-specific.</entry>
2012 </row>
2013 <row>
2014 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant>&nbsp;</entry>
2015 <entry>integer</entry>
2016 </row>
2017 <row><entry spanname="descr">Sets the threshold level for audio compression freature.
2018 It is a dB value. The range and step are driver-specific.</entry>
2019 </row>
2020 <row>
2021 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant>&nbsp;</entry>
2022 <entry>integer</entry>
2023 </row>
2024 <row><entry spanname="descr">Sets the attack time for audio compression feature.
2025 It is a useconds value. The range and step are driver-specific.</entry>
2026 </row>
2027 <row>
2028 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant>&nbsp;</entry>
2029 <entry>integer</entry>
2030 </row>
2031 <row><entry spanname="descr">Sets the release time for audio compression feature.
2032 It is a useconds value. The range and step are driver-specific.</entry>
2033 </row>
2034 <row>
2035 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant>&nbsp;</entry>
2036 <entry>boolean</entry>
2037 </row>
2038 <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry>
2039 </row>
2040 <row>
2041 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant>&nbsp;</entry>
2042 <entry>integer</entry>
2043 </row>
2044 <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is
2045 in Hz. The range and step are driver-specific.</entry>
2046 </row>
2047 <row>
2048 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant>&nbsp;</entry>
2049 <entry>integer</entry>
2050 </row>
2051 <row><entry spanname="descr">Configures pilot tone frequency value. Unit is
2052 in Hz. The range and step are driver-specific.</entry>
2053 </row>
2054 <row>
2055 <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant>&nbsp;</entry>
2056 <entry>integer</entry>
2057 </row>
2058 <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting.
2059 A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies.
2060 Depending on the region, a time constant of either 50 or 75 useconds is used. The enum&nbsp;v4l2_preemphasis
2061 defines possible values for pre-emphasis. Here they are:</entry>
2062 </row><row>
2063 <entrytbl spanname="descr" cols="2">
2064 <tbody valign="top">
2065 <row>
2066 <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant>&nbsp;</entry>
2067 <entry>No pre-emphasis is applied.</entry>
2068 </row>
2069 <row>
2070 <entry><constant>V4L2_PREEMPHASIS_50_uS</constant>&nbsp;</entry>
2071 <entry>A pre-emphasis of 50 uS is used.</entry>
2072 </row>
2073 <row>
2074 <entry><constant>V4L2_PREEMPHASIS_75_uS</constant>&nbsp;</entry>
2075 <entry>A pre-emphasis of 75 uS is used.</entry>
2076 </row>
2077 </tbody>
2078 </entrytbl>
2079
2080 </row>
2081 <row>
2082 <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant>&nbsp;</entry>
2083 <entry>integer</entry>
2084 </row>
2085 <row><entry spanname="descr">Sets the output power level for signal transmission.
2086 Unit is in dBuV. Range and step are driver-specific.</entry>
2087 </row>
2088 <row>
2089 <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant>&nbsp;</entry>
2090 <entry>integer</entry>
2091 </row>
2092 <row><entry spanname="descr">This selects the value of antenna tuning capacitor
2093 manually or automatically if set to zero. Unit, range and step are driver-specific.</entry>
2094 </row>
2095 <row><entry></entry></row>
2096 </tbody>
2097 </tgroup>
2098 </table>
2099
2100 <para>For more details about RDS specification, refer to
2101 <xref linkend="en50067" /> document, from CENELEC.</para>
2102 </section>
2103
2104 <section id="flash-controls">
2105 <title>Flash Control Reference</title>
2106
2107 <note>
2108 <title>Experimental</title>
2109
2110 <para>This is an <link linkend="experimental">experimental</link>
2111 interface and may change in the future.</para>
2112 </note>
2113
2114 <para>
2115 The V4L2 flash controls are intended to provide generic access
2116 to flash controller devices. Flash controller devices are
2117 typically used in digital cameras.
2118 </para>
2119
2120 <para>
2121 The interface can support both LED and xenon flash devices. As
2122 of writing this, there is no xenon flash driver using this
2123 interface.
2124 </para>
2125
2126 <section id="flash-controls-use-cases">
2127 <title>Supported use cases</title>
2128
2129 <section>
2130 <title>Unsynchronised LED flash (software strobe)</title>
2131
2132 <para>
2133 Unsynchronised LED flash is controlled directly by the
2134 host as the sensor. The flash must be enabled by the host
2135 before the exposure of the image starts and disabled once
2136 it ends. The host is fully responsible for the timing of
2137 the flash.
2138 </para>
2139
2140 <para>Example of such device: Nokia N900.</para>
2141 </section>
2142
2143 <section>
2144 <title>Synchronised LED flash (hardware strobe)</title>
2145
2146 <para>
2147 The synchronised LED flash is pre-programmed by the host
2148 (power and timeout) but controlled by the sensor through a
2149 strobe signal from the sensor to the flash.
2150 </para>
2151
2152 <para>
2153 The sensor controls the flash duration and timing. This
2154 information typically must be made available to the
2155 sensor.
2156 </para>
2157
2158 </section>
2159
2160 <section>
2161 <title>LED flash as torch</title>
2162
2163 <para>
2164 LED flash may be used as torch in conjunction with another
2165 use case involving camera or individually.
2166 </para>
2167
2168 </section>
2169
2170 </section>
2171
2172 <table pgwide="1" frame="none" id="flash-control-id">
2173 <title>Flash Control IDs</title>
2174
2175 <tgroup cols="4">
2176 <colspec colname="c1" colwidth="1*" />
2177 <colspec colname="c2" colwidth="6*" />
2178 <colspec colname="c3" colwidth="2*" />
2179 <colspec colname="c4" colwidth="6*" />
2180 <spanspec namest="c1" nameend="c2" spanname="id" />
2181 <spanspec namest="c2" nameend="c4" spanname="descr" />
2182 <thead>
2183 <row>
2184 <entry spanname="id" align="left">ID</entry>
2185 <entry align="left">Type</entry>
2186 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
2187 </row>
2188 </thead>
2189 <tbody valign="top">
2190 <row><entry></entry></row>
2191 <row>
2192 <entry spanname="id"><constant>V4L2_CID_FLASH_CLASS</constant></entry>
2193 <entry>class</entry>
2194 </row>
2195 <row>
2196 <entry spanname="descr">The FLASH class descriptor.</entry>
2197 </row>
2198 <row>
2199 <entry spanname="id"><constant>V4L2_CID_FLASH_LED_MODE</constant></entry>
2200 <entry>menu</entry>
2201 </row>
2202 <row id="v4l2-flash-led-mode">
2203 <entry spanname="descr">Defines the mode of the flash LED,
2204 the high-power white LED attached to the flash controller.
2205 Setting this control may not be possible in presence of
2206 some faults. See V4L2_CID_FLASH_FAULT.</entry>
2207 </row>
2208 <row>
2209 <entrytbl spanname="descr" cols="2">
2210 <tbody valign="top">
2211 <row>
2212 <entry><constant>V4L2_FLASH_LED_MODE_NONE</constant></entry>
2213 <entry>Off.</entry>
2214 </row>
2215 <row>
2216 <entry><constant>V4L2_FLASH_LED_MODE_FLASH</constant></entry>
2217 <entry>Flash mode.</entry>
2218 </row>
2219 <row>
2220 <entry><constant>V4L2_FLASH_LED_MODE_TORCH</constant></entry>
2221 <entry>Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.</entry>
2222 </row>
2223 </tbody>
2224 </entrytbl>
2225 </row>
2226 <row>
2227 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_SOURCE</constant></entry>
2228 <entry>menu</entry>
2229 </row>
2230 <row id="v4l2-flash-strobe-source"><entry
2231 spanname="descr">Defines the source of the flash LED
2232 strobe.</entry>
2233 </row>
2234 <row>
2235 <entrytbl spanname="descr" cols="2">
2236 <tbody valign="top">
2237 <row>
2238 <entry><constant>V4L2_FLASH_STROBE_SOURCE_SOFTWARE</constant></entry>
2239 <entry>The flash strobe is triggered by using
2240 the V4L2_CID_FLASH_STROBE control.</entry>
2241 </row>
2242 <row>
2243 <entry><constant>V4L2_FLASH_STROBE_SOURCE_EXTERNAL</constant></entry>
2244 <entry>The flash strobe is triggered by an
2245 external source. Typically this is a sensor,
2246 which makes it possible to synchronises the
2247 flash strobe start to exposure start.</entry>
2248 </row>
2249 </tbody>
2250 </entrytbl>
2251 </row>
2252 <row>
2253 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE</constant></entry>
2254 <entry>button</entry>
2255 </row>
2256 <row>
2257 <entry spanname="descr">Strobe flash. Valid when
2258 V4L2_CID_FLASH_LED_MODE is set to
2259 V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
2260 is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
2261 control may not be possible in presence of some faults.
2262 See V4L2_CID_FLASH_FAULT.</entry>
2263 </row>
2264 <row>
2265 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STOP</constant></entry>
2266 <entry>button</entry>
2267 </row>
2268 <row><entry spanname="descr">Stop flash strobe immediately.</entry>
2269 </row>
2270 <row>
2271 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STATUS</constant></entry>
2272 <entry>boolean</entry>
2273 </row>
2274 <row>
2275 <entry spanname="descr">Strobe status: whether the flash
2276 is strobing at the moment or not. This is a read-only
2277 control.</entry>
2278 </row>
2279 <row>
2280 <entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
2281 <entry>integer</entry>
2282 </row>
2283 <row>
2284 <entry spanname="descr">Hardware timeout for flash. The
2285 flash strobe is stopped after this period of time has
2286 passed from the start of the strobe.</entry>
2287 </row>
2288 <row>
2289 <entry spanname="id"><constant>V4L2_CID_FLASH_INTENSITY</constant></entry>
2290 <entry>integer</entry>
2291 </row>
2292 <row>
2293 <entry spanname="descr">Intensity of the flash strobe when
2294 the flash LED is in flash mode
2295 (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps
2296 (mA) if possible.</entry>
2297 </row>
2298 <row>
2299 <entry spanname="id"><constant>V4L2_CID_FLASH_TORCH_INTENSITY</constant></entry>
2300 <entry>integer</entry>
2301 </row>
2302 <row>
2303 <entry spanname="descr">Intensity of the flash LED in
2304 torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be
2305 milliamps (mA) if possible. Setting this control may not
2306 be possible in presence of some faults. See
2307 V4L2_CID_FLASH_FAULT.</entry>
2308 </row>
2309 <row>
2310 <entry spanname="id"><constant>V4L2_CID_FLASH_INDICATOR_INTENSITY</constant></entry>
2311 <entry>integer</entry>
2312 </row>
2313 <row>
2314 <entry spanname="descr">Intensity of the indicator LED.
2315 The indicator LED may be fully independent of the flash
2316 LED. The unit should be microamps (uA) if possible.</entry>
2317 </row>
2318 <row>
2319 <entry spanname="id"><constant>V4L2_CID_FLASH_FAULT</constant></entry>
2320 <entry>bitmask</entry>
2321 </row>
2322 <row>
2323 <entry spanname="descr">Faults related to the flash. The
2324 faults tell about specific problems in the flash chip
2325 itself or the LEDs attached to it. Faults may prevent
2326 further use of some of the flash controls. In particular,
2327 V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
2328 if the fault affects the flash LED. Exactly which faults
2329 have such an effect is chip dependent. Reading the faults
2330 resets the control and returns the chip to a usable state
2331 if possible.</entry>
2332 </row>
2333 <row>
2334 <entrytbl spanname="descr" cols="2">
2335 <tbody valign="top">
2336 <row>
2337 <entry><constant>V4L2_FLASH_FAULT_OVER_VOLTAGE</constant></entry>
2338 <entry>Flash controller voltage to the flash LED
2339 has exceeded the limit specific to the flash
2340 controller.</entry>
2341 </row>
2342 <row>
2343 <entry><constant>V4L2_FLASH_FAULT_TIMEOUT</constant></entry>
2344 <entry>The flash strobe was still on when
2345 the timeout set by the user ---
2346 V4L2_CID_FLASH_TIMEOUT control --- has expired.
2347 Not all flash controllers may set this in all
2348 such conditions.</entry>
2349 </row>
2350 <row>
2351 <entry><constant>V4L2_FLASH_FAULT_OVER_TEMPERATURE</constant></entry>
2352 <entry>The flash controller has overheated.</entry>
2353 </row>
2354 <row>
2355 <entry><constant>V4L2_FLASH_FAULT_SHORT_CIRCUIT</constant></entry>
2356 <entry>The short circuit protection of the flash
2357 controller has been triggered.</entry>
2358 </row>
2359 </tbody>
2360 </entrytbl>
2361 </row>
2362 <row>
2363 <entry spanname="id"><constant>V4L2_CID_FLASH_CHARGE</constant></entry>
2364 <entry>boolean</entry>
2365 </row>
2366 <row><entry spanname="descr">Enable or disable charging of the xenon
2367 flash capacitor.</entry>
2368 </row>
2369 <row>
2370 <entry spanname="id"><constant>V4L2_CID_FLASH_READY</constant></entry>
2371 <entry>boolean</entry>
2372 </row>
2373 <row>
2374 <entry spanname="descr">Is the flash ready to strobe?
2375 Xenon flashes require their capacitors charged before
2376 strobing. LED flashes often require a cooldown period
2377 after strobe during which another strobe will not be
2378 possible. This is a read-only control.</entry>
2379 </row>
2380 <row><entry></entry></row>
2381 </tbody>
2382 </tgroup>
2383 </table>
2384
2385 </section>
2386 </section>
2387
2388 <!--
2389 Local Variables:
2390 mode: sgml
2391 sgml-parent-document: "common.sgml"
2392 indent-tabs-mode: nil
2393 End:
2394 -->
This page took 0.128164 seconds and 5 git commands to generate.