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