2 <title>User Controls</title>
4 <para>Devices typically have a number of user-settable controls
5 such as brightness, saturation and so on, which would be presented to
6 the user on a graphical user interface. But, different devices
7 will have different controls available, and furthermore, the range of
8 possible values, and the default value will vary from device to
9 device. The control ioctls provide the information and a mechanism to
10 create a nice user interface for these controls that will work
11 correctly with any device.</para>
13 <para>All controls are accessed using an ID value. V4L2 defines
14 several IDs for specific purposes. Drivers can also implement their
15 own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant>
16 and higher values. The pre-defined control IDs have the prefix
17 <constant>V4L2_CID_</constant>, and are listed in <xref
18 linkend="control-id" />. The ID is used when querying the attributes of
19 a control, and when getting or setting the current value.</para>
21 <para>Generally applications should present controls to the user
22 without assumptions about their purpose. Each control comes with a
23 name string the user is supposed to understand. When the purpose is
24 non-intuitive the driver writer should provide a user manual, a user
25 interface plug-in or a driver specific panel application. Predefined
26 IDs were introduced to change a few controls programmatically, for
27 example to mute a device during a channel switch.</para>
29 <para>Drivers may enumerate different controls after switching
30 the current video input or output, tuner or modulator, or audio input
31 or output. Different in the sense of other bounds, another default and
32 current value, step size or other menu items. A control with a certain
33 <emphasis>custom</emphasis> ID can also change name and
35 <para>It will be more convenient for applications if drivers
36 make use of the <constant>V4L2_CTRL_FLAG_DISABLED</constant> flag, but
37 that was never required.</para>
38 </footnote> Control values are stored globally, they do not
39 change when switching except to stay within the reported bounds. They
40 also do not change ⪚ when the device is opened or closed, when the
41 tuner radio frequency is changed or generally never without
42 application request. Since V4L2 specifies no event mechanism, panel
43 applications intended to cooperate with other panel applications (be
44 they built into a larger application, as a TV viewer) may need to
45 regularly poll control values to update their user
47 <para>Applications could call an ioctl to request events.
48 After another process called &VIDIOC-S-CTRL; or another ioctl changing
49 shared properties the &func-select; function would indicate
50 readability until any ioctl (querying the properties) is
55 All controls use machine endianness.
58 <table pgwide="1" frame="none" id="control-id">
59 <title>Control IDs</title>
66 <entry>Description</entry>
71 <entry><constant>V4L2_CID_BASE</constant></entry>
73 <entry>First predefined ID, equal to
74 <constant>V4L2_CID_BRIGHTNESS</constant>.</entry>
77 <entry><constant>V4L2_CID_USER_BASE</constant></entry>
79 <entry>Synonym of <constant>V4L2_CID_BASE</constant>.</entry>
82 <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry>
83 <entry>integer</entry>
84 <entry>Picture brightness, or more precisely, the black
88 <entry><constant>V4L2_CID_CONTRAST</constant></entry>
89 <entry>integer</entry>
90 <entry>Picture contrast or luma gain.</entry>
93 <entry><constant>V4L2_CID_SATURATION</constant></entry>
94 <entry>integer</entry>
95 <entry>Picture color saturation or chroma gain.</entry>
98 <entry><constant>V4L2_CID_HUE</constant></entry>
99 <entry>integer</entry>
100 <entry>Hue or color balance.</entry>
103 <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry>
104 <entry>integer</entry>
105 <entry>Overall audio volume. Note some drivers also
106 provide an OSS or ALSA mixer interface.</entry>
109 <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry>
110 <entry>integer</entry>
111 <entry>Audio stereo balance. Minimum corresponds to all
112 the way left, maximum to right.</entry>
115 <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry>
116 <entry>integer</entry>
117 <entry>Audio bass adjustment.</entry>
120 <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry>
121 <entry>integer</entry>
122 <entry>Audio treble adjustment.</entry>
125 <entry><constant>V4L2_CID_AUDIO_MUTE</constant></entry>
126 <entry>boolean</entry>
127 <entry>Mute audio, &ie; set the volume to zero, however
128 without affecting <constant>V4L2_CID_AUDIO_VOLUME</constant>. Like
129 ALSA drivers, V4L2 drivers must mute at load time to avoid excessive
130 noise. Actually the entire device should be reset to a low power
131 consumption state.</entry>
134 <entry><constant>V4L2_CID_AUDIO_LOUDNESS</constant></entry>
135 <entry>boolean</entry>
136 <entry>Loudness mode (bass boost).</entry>
139 <entry><constant>V4L2_CID_BLACK_LEVEL</constant></entry>
140 <entry>integer</entry>
141 <entry>Another name for brightness (not a synonym of
142 <constant>V4L2_CID_BRIGHTNESS</constant>). This control is deprecated
143 and should not be used in new drivers and applications.</entry>
146 <entry><constant>V4L2_CID_AUTO_WHITE_BALANCE</constant></entry>
147 <entry>boolean</entry>
148 <entry>Automatic white balance (cameras).</entry>
151 <entry><constant>V4L2_CID_DO_WHITE_BALANCE</constant></entry>
152 <entry>button</entry>
153 <entry>This is an action control. When set (the value is
154 ignored), the device will do a white balance and then hold the current
155 setting. Contrast this with the boolean
156 <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant>, which, when
157 activated, keeps adjusting the white balance.</entry>
160 <entry><constant>V4L2_CID_RED_BALANCE</constant></entry>
161 <entry>integer</entry>
162 <entry>Red chroma balance.</entry>
165 <entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry>
166 <entry>integer</entry>
167 <entry>Blue chroma balance.</entry>
170 <entry><constant>V4L2_CID_GAMMA</constant></entry>
171 <entry>integer</entry>
172 <entry>Gamma adjust.</entry>
175 <entry><constant>V4L2_CID_WHITENESS</constant></entry>
176 <entry>integer</entry>
177 <entry>Whiteness for grey-scale devices. This is a synonym
178 for <constant>V4L2_CID_GAMMA</constant>. This control is deprecated
179 and should not be used in new drivers and applications.</entry>
182 <entry><constant>V4L2_CID_EXPOSURE</constant></entry>
183 <entry>integer</entry>
184 <entry>Exposure (cameras). [Unit?]</entry>
187 <entry><constant>V4L2_CID_AUTOGAIN</constant></entry>
188 <entry>boolean</entry>
189 <entry>Automatic gain/exposure control.</entry>
192 <entry><constant>V4L2_CID_GAIN</constant></entry>
193 <entry>integer</entry>
194 <entry>Gain control.</entry>
197 <entry><constant>V4L2_CID_HFLIP</constant></entry>
198 <entry>boolean</entry>
199 <entry>Mirror the picture horizontally.</entry>
202 <entry><constant>V4L2_CID_VFLIP</constant></entry>
203 <entry>boolean</entry>
204 <entry>Mirror the picture vertically.</entry>
207 <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
208 <entry>integer</entry>
209 <entry>Horizontal image centering. This control is
210 deprecated. New drivers and applications should use the <link
211 linkend="camera-controls">Camera class controls</link>
212 <constant>V4L2_CID_PAN_ABSOLUTE</constant>,
213 <constant>V4L2_CID_PAN_RELATIVE</constant> and
214 <constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
217 <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
218 (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
219 <entry>integer</entry>
220 <entry>Vertical image centering. Centering is intended to
221 <emphasis>physically</emphasis> adjust cameras. For image cropping see
222 <xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
223 control is deprecated. New drivers and applications should use the
224 <link linkend="camera-controls">Camera class controls</link>
225 <constant>V4L2_CID_TILT_ABSOLUTE</constant>,
226 <constant>V4L2_CID_TILT_RELATIVE</constant> and
227 <constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
229 <row id="v4l2-power-line-frequency">
230 <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
232 <entry>Enables a power line frequency filter to avoid
233 flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are:
234 <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
235 <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and
236 <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry>
239 <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
240 <entry>boolean</entry>
241 <entry>Enables automatic hue control by the device. The
242 effect of setting <constant>V4L2_CID_HUE</constant> while automatic
243 hue control is enabled is undefined, drivers should ignore such
247 <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry>
248 <entry>integer</entry>
249 <entry>This control specifies the white balance settings
250 as a color temperature in Kelvin. A driver should have a minimum of
251 2800 (incandescent) to 6500 (daylight). For more information about
252 color temperature see <ulink
253 url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry>
256 <entry><constant>V4L2_CID_SHARPNESS</constant></entry>
257 <entry>integer</entry>
258 <entry>Adjusts the sharpness filters in a camera. The
259 minimum value disables the filters, higher values give a sharper
263 <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry>
264 <entry>integer</entry>
265 <entry>Adjusts the backlight compensation in a camera. The
266 minimum value disables backlight compensation.</entry>
269 <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
270 <entry>boolean</entry>
271 <entry>Chroma automatic gain control.</entry>
274 <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
275 <entry>integer</entry>
276 <entry>Adjusts the Chroma gain control (for use when chroma AGC
277 is disabled).</entry>
280 <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
281 <entry>boolean</entry>
282 <entry>Enable the color killer (&ie; force a black & white image in case of a weak video signal).</entry>
284 <row id="v4l2-colorfx">
285 <entry><constant>V4L2_CID_COLORFX</constant></entry>
287 <entry>Selects a color effect. Possible values for
288 <constant>enum v4l2_colorfx</constant> are:
289 <constant>V4L2_COLORFX_NONE</constant> (0),
290 <constant>V4L2_COLORFX_BW</constant> (1),
291 <constant>V4L2_COLORFX_SEPIA</constant> (2),
292 <constant>V4L2_COLORFX_NEGATIVE</constant> (3),
293 <constant>V4L2_COLORFX_EMBOSS</constant> (4),
294 <constant>V4L2_COLORFX_SKETCH</constant> (5),
295 <constant>V4L2_COLORFX_SKY_BLUE</constant> (6),
296 <constant>V4L2_COLORFX_GRASS_GREEN</constant> (7),
297 <constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and
298 <constant>V4L2_COLORFX_VIVID</constant> (9).</entry>
301 <entry><constant>V4L2_CID_ROTATE</constant></entry>
302 <entry>integer</entry>
303 <entry>Rotates the image by specified angle. Common angles are 90,
304 270 and 180. Rotating the image to 90 and 270 will reverse the height
305 and width of the display window. It is necessary to set the new height and
306 width of the picture using the &VIDIOC-S-FMT; ioctl according to
307 the rotation angle selected.</entry>
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>
319 <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
320 <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
321 <entry>boolean</entry>
322 <entry>Switch on or off the illuminator 1 or 2 of the device
323 (usually a microscope).</entry>
326 <entry><constant>V4L2_CID_LASTP1</constant></entry>
328 <entry>End of the predefined control IDs (currently
329 <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry>
332 <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
334 <entry>ID of the first custom (driver specific) control.
335 Applications depending on particular custom controls should check the
336 driver name and version, see <xref linkend="querycap" />.</entry>
342 <para>Applications can enumerate the available controls with the
343 &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a
344 control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls.
345 Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
346 <constant>VIDIOC_G_CTRL</constant> and
347 <constant>VIDIOC_S_CTRL</constant> when the device has one or more
348 controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
349 more menu type controls.</para>
352 <title>Enumerating all controls</title>
355 &v4l2-queryctrl; queryctrl;
356 &v4l2-querymenu; querymenu;
359 enumerate_menu (void)
361 printf (" Menu items:\n");
363 memset (&querymenu, 0, sizeof (querymenu));
364 querymenu.id = queryctrl.id;
366 for (querymenu.index = queryctrl.minimum;
367 querymenu.index <= queryctrl.maximum;
369 if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &querymenu)) {
370 printf (" %s\n", querymenu.name);
375 memset (&queryctrl, 0, sizeof (queryctrl));
377 for (queryctrl.id = V4L2_CID_BASE;
378 queryctrl.id < V4L2_CID_LASTP1;
380 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) {
381 if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
384 printf ("Control %s\n", queryctrl.name);
386 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
392 perror ("VIDIOC_QUERYCTRL");
397 for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
399 if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) {
400 if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
403 printf ("Control %s\n", queryctrl.name);
405 if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
411 perror ("VIDIOC_QUERYCTRL");
419 <title>Changing controls</title>
422 &v4l2-queryctrl; queryctrl;
423 &v4l2-control; control;
425 memset (&queryctrl, 0, sizeof (queryctrl));
426 queryctrl.id = V4L2_CID_BRIGHTNESS;
428 if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &queryctrl)) {
429 if (errno != EINVAL) {
430 perror ("VIDIOC_QUERYCTRL");
433 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
435 } else if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
436 printf ("V4L2_CID_BRIGHTNESS is not supported\n");
438 memset (&control, 0, sizeof (control));
439 control.id = V4L2_CID_BRIGHTNESS;
440 control.value = queryctrl.default_value;
442 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &control)) {
443 perror ("VIDIOC_S_CTRL");
448 memset (&control, 0, sizeof (control));
449 control.id = V4L2_CID_CONTRAST;
451 if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &control)) {
454 /* The driver may clamp the value or return ERANGE, ignored here */
456 if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &control)
457 && errno != ERANGE) {
458 perror ("VIDIOC_S_CTRL");
461 /* Ignore if V4L2_CID_CONTRAST is unsupported */
462 } else if (errno != EINVAL) {
463 perror ("VIDIOC_G_CTRL");
467 control.id = V4L2_CID_AUDIO_MUTE;
468 control.value = TRUE; /* silence */
471 ioctl (fd, VIDIOC_S_CTRL, &control);
476 <section id="extended-controls">
477 <title>Extended Controls</title>
480 <title>Introduction</title>
482 <para>The control mechanism as originally designed was meant
483 to be used for user settings (brightness, saturation, etc). However,
484 it turned out to be a very useful model for implementing more
485 complicated driver APIs where each driver implements only a subset of
488 <para>The MPEG encoding API was the driving force behind
489 designing and implementing this extended control mechanism: the MPEG
490 standard is quite large and the currently supported hardware MPEG
491 encoders each only implement a subset of this standard. Further more,
492 many parameters relating to how the video is encoded into an MPEG
493 stream are specific to the MPEG encoding chip since the MPEG standard
494 only defines the format of the resulting MPEG stream, not how the
495 video is actually encoded into that format.</para>
497 <para>Unfortunately, the original control API lacked some
498 features needed for these new uses and so it was extended into the
499 (not terribly originally named) extended control API.</para>
501 <para>Even though the MPEG encoding API was the first effort
502 to use the Extended Control API, nowadays there are also other classes
503 of Extended Controls, such as Camera Controls and FM Transmitter Controls.
504 The Extended Controls API as well as all Extended Controls classes are
505 described in the following text.</para>
509 <title>The Extended Control API</title>
511 <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;,
512 &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on
513 arrays of controls (as opposed to the &VIDIOC-G-CTRL; and
514 &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed
515 since it is often required to atomically change several controls at
518 <para>Each of the new ioctls expects a pointer to a
519 &v4l2-ext-controls;. This structure contains a pointer to the control
520 array, a count of the number of controls in that array and a control
521 class. Control classes are used to group similar controls into a
522 single class. For example, control class
523 <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls
524 (&ie; all controls that can also be set using the old
525 <constant>VIDIOC_S_CTRL</constant> ioctl). Control class
526 <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls
527 relating to MPEG encoding, etc.</para>
529 <para>All controls in the control array must belong to the
530 specified control class. An error is returned if this is not the
533 <para>It is also possible to use an empty control array (count
534 == 0) to check whether the specified control class is
537 <para>The control array is a &v4l2-ext-control; array. The
538 <structname>v4l2_ext_control</structname> structure is very similar to
539 &v4l2-control;, except for the fact that it also allows for 64-bit
540 values and pointers to be passed.</para>
542 <para>It is important to realize that due to the flexibility of
543 controls it is necessary to check whether the control you want to set
544 actually is supported in the driver and what the valid range of values
545 is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to
546 check this. Also note that it is possible that some of the menu
547 indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant>
548 may not be supported (<constant>VIDIOC_QUERYMENU</constant> will
549 return an error). A good example is the list of supported MPEG audio
550 bitrates. Some drivers only support one or two bitrates, others
551 support a wider range.</para>
554 All controls use machine endianness.
559 <title>Enumerating Extended Controls</title>
561 <para>The recommended way to enumerate over the extended
562 controls is by using &VIDIOC-QUERYCTRL; in combination with the
563 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para>
567 &v4l2-queryctrl; qctrl;
569 qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
570 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &qctrl)) {
572 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
577 <para>The initial control ID is set to 0 ORed with the
578 <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The
579 <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first
580 control with a higher ID than the specified one. When no such controls
581 are found an error is returned.</para>
583 <para>If you want to get all controls within a specific control
584 class, then you can set the initial
585 <structfield>qctrl.id</structfield> value to the control class and add
586 an extra check to break out of the loop when a control of another
587 control class is found:</para>
591 qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
592 while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &qctrl)) {
593 if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG)
596 qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
601 <para>The 32-bit <structfield>qctrl.id</structfield> value is
602 subdivided into three bit ranges: the top 4 bits are reserved for
603 flags (⪚ <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not
604 actually part of the ID. The remaining 28 bits form the control ID, of
605 which the most significant 12 bits define the control class and the
606 least significant 16 bits identify the control within the control
607 class. It is guaranteed that these last 16 bits are always non-zero
608 for controls. The range of 0x1000 and up are reserved for
609 driver-specific controls. The macro
610 <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class
611 ID based on a control ID.</para>
613 <para>If the driver does not support extended controls, then
614 <constant>VIDIOC_QUERYCTRL</constant> will fail when used in
615 combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
616 that case the old method of enumerating control should be used (see
617 1.8). But if it is supported, then it is guaranteed to enumerate over
618 all controls, including driver-private controls.</para>
622 <title>Creating Control Panels</title>
624 <para>It is possible to create control panels for a graphical
625 user interface where the user can select the various controls.
626 Basically you will have to iterate over all controls using the method
627 described above. Each control class starts with a control of type
628 <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>.
629 <constant>VIDIOC_QUERYCTRL</constant> will return the name of this
630 control class which can be used as the title of a tab page within a
631 control panel.</para>
633 <para>The flags field of &v4l2-queryctrl; also contains hints on
634 the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation
635 for more details.</para>
638 <section id="mpeg-controls">
639 <title>MPEG Control Reference</title>
641 <para>Below all controls within the MPEG control class are
642 described. First the generic controls, then controls specific for
643 certain hardware.</para>
646 <title>Generic MPEG Controls</title>
648 <table pgwide="1" frame="none" id="mpeg-control-id">
649 <title>MPEG Control IDs</title>
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" />
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>
665 <row><entry></entry></row>
667 <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant> </entry>
669 </row><row><entry spanname="descr">The MPEG class
670 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
671 description of this control class. This description can be used as the
672 caption of a Tab page in a GUI, for example.</entry>
674 <row><entry></entry></row>
675 <row id="v4l2-mpeg-stream-type">
676 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant> </entry>
677 <entry>enum v4l2_mpeg_stream_type</entry>
678 </row><row><entry spanname="descr">The MPEG-1, -2 or -4
679 output stream type. One cannot assume anything here. Each hardware
680 MPEG encoder tends to support different subsets of the available MPEG
681 stream types. The currently defined stream types are:</entry>
684 <entrytbl spanname="descr" cols="2">
687 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant> </entry>
688 <entry>MPEG-2 program stream</entry>
691 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant> </entry>
692 <entry>MPEG-2 transport stream</entry>
695 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant> </entry>
696 <entry>MPEG-1 system stream</entry>
699 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant> </entry>
700 <entry>MPEG-2 DVD-compatible stream</entry>
703 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant> </entry>
704 <entry>MPEG-1 VCD-compatible stream</entry>
707 <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant> </entry>
708 <entry>MPEG-2 SVCD-compatible stream</entry>
713 <row><entry></entry></row>
715 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant> </entry>
716 <entry>integer</entry>
717 </row><row><entry spanname="descr">Program Map Table
718 Packet ID for the MPEG transport stream (default 16)</entry>
720 <row><entry></entry></row>
722 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant> </entry>
723 <entry>integer</entry>
724 </row><row><entry spanname="descr">Audio Packet ID for
725 the MPEG transport stream (default 256)</entry>
727 <row><entry></entry></row>
729 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant> </entry>
730 <entry>integer</entry>
731 </row><row><entry spanname="descr">Video Packet ID for
732 the MPEG transport stream (default 260)</entry>
734 <row><entry></entry></row>
736 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant> </entry>
737 <entry>integer</entry>
738 </row><row><entry spanname="descr">Packet ID for the
739 MPEG transport stream carrying PCR fields (default 259)</entry>
741 <row><entry></entry></row>
743 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant> </entry>
744 <entry>integer</entry>
745 </row><row><entry spanname="descr">Audio ID for MPEG
748 <row><entry></entry></row>
750 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant> </entry>
751 <entry>integer</entry>
752 </row><row><entry spanname="descr">Video ID for MPEG
755 <row><entry></entry></row>
756 <row id="v4l2-mpeg-stream-vbi-fmt">
757 <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant> </entry>
758 <entry>enum v4l2_mpeg_stream_vbi_fmt</entry>
759 </row><row><entry spanname="descr">Some cards can embed
760 VBI data (⪚ Closed Caption, Teletext) into the MPEG stream. This
761 control selects whether VBI data should be embedded, and if so, what
762 embedding method should be used. The list of possible VBI formats
763 depends on the driver. The currently defined VBI format types
767 <entrytbl spanname="descr" cols="2">
770 <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant> </entry>
771 <entry>No VBI in the MPEG stream</entry>
774 <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant> </entry>
775 <entry>VBI in private packets, IVTV format (documented
776 in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry>
781 <row><entry></entry></row>
782 <row id="v4l2-mpeg-audio-sampling-freq">
783 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant> </entry>
784 <entry>enum v4l2_mpeg_audio_sampling_freq</entry>
785 </row><row><entry spanname="descr">MPEG Audio sampling
786 frequency. Possible values are:</entry>
789 <entrytbl spanname="descr" cols="2">
792 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant> </entry>
793 <entry>44.1 kHz</entry>
796 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant> </entry>
797 <entry>48 kHz</entry>
800 <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant> </entry>
801 <entry>32 kHz</entry>
806 <row><entry></entry></row>
807 <row id="v4l2-mpeg-audio-encoding">
808 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant> </entry>
809 <entry>enum v4l2_mpeg_audio_encoding</entry>
810 </row><row><entry spanname="descr">MPEG Audio encoding.
811 Possible values are:</entry>
814 <entrytbl spanname="descr" cols="2">
817 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant> </entry>
818 <entry>MPEG-1/2 Layer I encoding</entry>
821 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant> </entry>
822 <entry>MPEG-1/2 Layer II encoding</entry>
825 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant> </entry>
826 <entry>MPEG-1/2 Layer III encoding</entry>
829 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant> </entry>
830 <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry>
833 <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant> </entry>
834 <entry>AC-3 aka ATSC A/52 encoding</entry>
839 <row><entry></entry></row>
840 <row id="v4l2-mpeg-audio-l1-bitrate">
841 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant> </entry>
842 <entry>enum v4l2_mpeg_audio_l1_bitrate</entry>
843 </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate.
844 Possible values are:</entry>
847 <entrytbl spanname="descr" cols="2">
850 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant> </entry>
851 <entry>32 kbit/s</entry></row>
853 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant> </entry>
854 <entry>64 kbit/s</entry>
857 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant> </entry>
858 <entry>96 kbit/s</entry>
861 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant> </entry>
862 <entry>128 kbit/s</entry>
865 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant> </entry>
866 <entry>160 kbit/s</entry>
869 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant> </entry>
870 <entry>192 kbit/s</entry>
873 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant> </entry>
874 <entry>224 kbit/s</entry>
877 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant> </entry>
878 <entry>256 kbit/s</entry>
881 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant> </entry>
882 <entry>288 kbit/s</entry>
885 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant> </entry>
886 <entry>320 kbit/s</entry>
889 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant> </entry>
890 <entry>352 kbit/s</entry>
893 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant> </entry>
894 <entry>384 kbit/s</entry>
897 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant> </entry>
898 <entry>416 kbit/s</entry>
901 <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant> </entry>
902 <entry>448 kbit/s</entry>
907 <row><entry></entry></row>
908 <row id="v4l2-mpeg-audio-l2-bitrate">
909 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant> </entry>
910 <entry>enum v4l2_mpeg_audio_l2_bitrate</entry>
911 </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate.
912 Possible values are:</entry>
915 <entrytbl spanname="descr" cols="2">
918 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant> </entry>
919 <entry>32 kbit/s</entry>
922 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant> </entry>
923 <entry>48 kbit/s</entry>
926 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant> </entry>
927 <entry>56 kbit/s</entry>
930 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant> </entry>
931 <entry>64 kbit/s</entry>
934 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant> </entry>
935 <entry>80 kbit/s</entry>
938 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant> </entry>
939 <entry>96 kbit/s</entry>
942 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant> </entry>
943 <entry>112 kbit/s</entry>
946 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant> </entry>
947 <entry>128 kbit/s</entry>
950 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant> </entry>
951 <entry>160 kbit/s</entry>
954 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant> </entry>
955 <entry>192 kbit/s</entry>
958 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant> </entry>
959 <entry>224 kbit/s</entry>
962 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant> </entry>
963 <entry>256 kbit/s</entry>
966 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant> </entry>
967 <entry>320 kbit/s</entry>
970 <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant> </entry>
971 <entry>384 kbit/s</entry>
976 <row><entry></entry></row>
977 <row id="v4l2-mpeg-audio-l3-bitrate">
978 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant> </entry>
979 <entry>enum v4l2_mpeg_audio_l3_bitrate</entry>
980 </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate.
981 Possible values are:</entry>
984 <entrytbl spanname="descr" cols="2">
987 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant> </entry>
988 <entry>32 kbit/s</entry>
991 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant> </entry>
992 <entry>40 kbit/s</entry>
995 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant> </entry>
996 <entry>48 kbit/s</entry>
999 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant> </entry>
1000 <entry>56 kbit/s</entry>
1003 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant> </entry>
1004 <entry>64 kbit/s</entry>
1007 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant> </entry>
1008 <entry>80 kbit/s</entry>
1011 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant> </entry>
1012 <entry>96 kbit/s</entry>
1015 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant> </entry>
1016 <entry>112 kbit/s</entry>
1019 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant> </entry>
1020 <entry>128 kbit/s</entry>
1023 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant> </entry>
1024 <entry>160 kbit/s</entry>
1027 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant> </entry>
1028 <entry>192 kbit/s</entry>
1031 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant> </entry>
1032 <entry>224 kbit/s</entry>
1035 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant> </entry>
1036 <entry>256 kbit/s</entry>
1039 <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant> </entry>
1040 <entry>320 kbit/s</entry>
1045 <row><entry></entry></row>
1047 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant> </entry>
1048 <entry>integer</entry>
1049 </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry>
1051 <row><entry></entry></row>
1052 <row id="v4l2-mpeg-audio-ac3-bitrate">
1053 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant> </entry>
1054 <entry>enum v4l2_mpeg_audio_ac3_bitrate</entry>
1055 </row><row><entry spanname="descr">AC-3 bitrate.
1056 Possible values are:</entry>
1059 <entrytbl spanname="descr" cols="2">
1060 <tbody valign="top">
1062 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant> </entry>
1063 <entry>32 kbit/s</entry>
1066 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant> </entry>
1067 <entry>40 kbit/s</entry>
1070 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant> </entry>
1071 <entry>48 kbit/s</entry>
1074 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant> </entry>
1075 <entry>56 kbit/s</entry>
1078 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant> </entry>
1079 <entry>64 kbit/s</entry>
1082 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant> </entry>
1083 <entry>80 kbit/s</entry>
1086 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant> </entry>
1087 <entry>96 kbit/s</entry>
1090 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant> </entry>
1091 <entry>112 kbit/s</entry>
1094 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant> </entry>
1095 <entry>128 kbit/s</entry>
1098 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant> </entry>
1099 <entry>160 kbit/s</entry>
1102 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant> </entry>
1103 <entry>192 kbit/s</entry>
1106 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant> </entry>
1107 <entry>224 kbit/s</entry>
1110 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant> </entry>
1111 <entry>256 kbit/s</entry>
1114 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant> </entry>
1115 <entry>320 kbit/s</entry>
1118 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant> </entry>
1119 <entry>384 kbit/s</entry>
1122 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant> </entry>
1123 <entry>448 kbit/s</entry>
1126 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant> </entry>
1127 <entry>512 kbit/s</entry>
1130 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant> </entry>
1131 <entry>576 kbit/s</entry>
1134 <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant> </entry>
1135 <entry>640 kbit/s</entry>
1140 <row><entry></entry></row>
1141 <row id="v4l2-mpeg-audio-mode">
1142 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant> </entry>
1143 <entry>enum v4l2_mpeg_audio_mode</entry>
1144 </row><row><entry spanname="descr">MPEG Audio mode.
1145 Possible values are:</entry>
1148 <entrytbl spanname="descr" cols="2">
1149 <tbody valign="top">
1151 <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant> </entry>
1152 <entry>Stereo</entry>
1155 <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant> </entry>
1156 <entry>Joint Stereo</entry>
1159 <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant> </entry>
1160 <entry>Bilingual</entry>
1163 <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant> </entry>
1169 <row><entry></entry></row>
1170 <row id="v4l2-mpeg-audio-mode-extension">
1171 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant> </entry>
1172 <entry>enum v4l2_mpeg_audio_mode_extension</entry>
1173 </row><row><entry spanname="descr">Joint Stereo
1174 audio mode extension. In Layer I and II they indicate which subbands
1175 are in intensity stereo. All other subbands are coded in stereo. Layer
1176 III is not (yet) supported. Possible values
1180 <entrytbl spanname="descr" cols="2">
1181 <tbody valign="top">
1183 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant> </entry>
1184 <entry>Subbands 4-31 in intensity stereo</entry>
1187 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant> </entry>
1188 <entry>Subbands 8-31 in intensity stereo</entry>
1191 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant> </entry>
1192 <entry>Subbands 12-31 in intensity stereo</entry>
1195 <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant> </entry>
1196 <entry>Subbands 16-31 in intensity stereo</entry>
1201 <row><entry></entry></row>
1202 <row id="v4l2-mpeg-audio-emphasis">
1203 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant> </entry>
1204 <entry>enum v4l2_mpeg_audio_emphasis</entry>
1205 </row><row><entry spanname="descr">Audio Emphasis.
1206 Possible values are:</entry>
1209 <entrytbl spanname="descr" cols="2">
1210 <tbody valign="top">
1212 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant> </entry>
1216 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant> </entry>
1217 <entry>50/15 microsecond emphasis</entry>
1220 <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant> </entry>
1221 <entry>CCITT J.17</entry>
1226 <row><entry></entry></row>
1227 <row id="v4l2-mpeg-audio-crc">
1228 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant> </entry>
1229 <entry>enum v4l2_mpeg_audio_crc</entry>
1230 </row><row><entry spanname="descr">CRC method. Possible
1234 <entrytbl spanname="descr" cols="2">
1235 <tbody valign="top">
1237 <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant> </entry>
1241 <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant> </entry>
1242 <entry>16 bit parity check</entry>
1247 <row><entry></entry></row>
1249 <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant> </entry>
1250 <entry>boolean</entry>
1251 </row><row><entry spanname="descr">Mutes the audio when
1252 capturing. This is not done by muting audio hardware, which can still
1253 produce a slight hiss, but in the encoder itself, guaranteeing a fixed
1254 and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
1256 <row><entry></entry></row>
1257 <row id="v4l2-mpeg-video-encoding">
1258 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant> </entry>
1259 <entry>enum v4l2_mpeg_video_encoding</entry>
1260 </row><row><entry spanname="descr">MPEG Video encoding
1261 method. Possible values are:</entry>
1264 <entrytbl spanname="descr" cols="2">
1265 <tbody valign="top">
1267 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant> </entry>
1268 <entry>MPEG-1 Video encoding</entry>
1271 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant> </entry>
1272 <entry>MPEG-2 Video encoding</entry>
1275 <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant> </entry>
1276 <entry>MPEG-4 AVC (H.264) Video encoding</entry>
1281 <row><entry></entry></row>
1282 <row id="v4l2-mpeg-video-aspect">
1283 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant> </entry>
1284 <entry>enum v4l2_mpeg_video_aspect</entry>
1285 </row><row><entry spanname="descr">Video aspect.
1286 Possible values are:</entry>
1289 <entrytbl spanname="descr" cols="2">
1290 <tbody valign="top">
1292 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant> </entry>
1295 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant> </entry>
1298 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant> </entry>
1301 <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant> </entry>
1306 <row><entry></entry></row>
1308 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant> </entry>
1309 <entry>integer</entry>
1310 </row><row><entry spanname="descr">Number of B-Frames
1313 <row><entry></entry></row>
1315 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant> </entry>
1316 <entry>integer</entry>
1317 </row><row><entry spanname="descr">GOP size (default
1320 <row><entry></entry></row>
1322 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant> </entry>
1323 <entry>boolean</entry>
1324 </row><row><entry spanname="descr">GOP closure (default
1327 <row><entry></entry></row>
1329 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant> </entry>
1330 <entry>boolean</entry>
1331 </row><row><entry spanname="descr">Enable 3:2 pulldown
1334 <row><entry></entry></row>
1335 <row id="v4l2-mpeg-video-bitrate-mode">
1336 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant> </entry>
1337 <entry>enum v4l2_mpeg_video_bitrate_mode</entry>
1338 </row><row><entry spanname="descr">Video bitrate mode.
1339 Possible values are:</entry>
1342 <entrytbl spanname="descr" cols="2">
1343 <tbody valign="top">
1345 <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant> </entry>
1346 <entry>Variable bitrate</entry>
1349 <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant> </entry>
1350 <entry>Constant bitrate</entry>
1355 <row><entry></entry></row>
1357 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant> </entry>
1358 <entry>integer</entry>
1359 </row><row><entry spanname="descr">Video bitrate in bits
1362 <row><entry></entry></row>
1364 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant> </entry>
1365 <entry>integer</entry>
1366 </row><row><entry spanname="descr">Peak video bitrate in
1367 bits per second. Must be larger or equal to the average video bitrate.
1368 It is ignored if the video bitrate mode is set to constant
1371 <row><entry></entry></row>
1373 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant> </entry>
1374 <entry>integer</entry>
1375 </row><row><entry spanname="descr">For every captured
1376 frame, skip this many subsequent frames (default 0).</entry>
1378 <row><entry></entry></row>
1380 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant> </entry>
1381 <entry>boolean</entry>
1383 <row><entry spanname="descr">"Mutes" the video to a
1384 fixed color when capturing. This is useful for testing, to produce a
1385 fixed video bitstream. 0 = unmuted, 1 = muted.</entry>
1387 <row><entry></entry></row>
1389 <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant> </entry>
1390 <entry>integer</entry>
1391 </row><row><entry spanname="descr">Sets the "mute" color
1392 of the video. The supplied 32-bit integer is interpreted as follows (bit
1393 0 = least significant bit):</entry>
1396 <entrytbl spanname="descr" cols="2">
1397 <tbody valign="top">
1399 <entry>Bit 0:7</entry>
1400 <entry>V chrominance information</entry>
1403 <entry>Bit 8:15</entry>
1404 <entry>U chrominance information</entry>
1407 <entry>Bit 16:23</entry>
1408 <entry>Y luminance information</entry>
1411 <entry>Bit 24:31</entry>
1412 <entry>Must be zero.</entry>
1423 <title>CX2341x MPEG Controls</title>
1425 <para>The following MPEG class controls deal with MPEG
1426 encoding settings that are specific to the Conexant CX23415 and
1427 CX23416 MPEG encoding chips.</para>
1429 <table pgwide="1" frame="none" id="cx2341x-control-id">
1430 <title>CX2341x Control IDs</title>
1432 <colspec colname="c1" colwidth="1*" />
1433 <colspec colname="c2" colwidth="6*" />
1434 <colspec colname="c3" colwidth="2*" />
1435 <colspec colname="c4" colwidth="6*" />
1436 <spanspec namest="c1" nameend="c2" spanname="id" />
1437 <spanspec namest="c2" nameend="c4" spanname="descr" />
1440 <entry spanname="id" align="left">ID</entry>
1441 <entry align="left">Type</entry>
1442 </row><row><entry spanname="descr" align="left">Description</entry>
1445 <tbody valign="top">
1446 <row><entry></entry></row>
1447 <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode">
1448 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant> </entry>
1449 <entry>enum v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry>
1450 </row><row><entry spanname="descr">Sets the Spatial
1451 Filter mode (default <constant>MANUAL</constant>). Possible values
1455 <entrytbl spanname="descr" cols="2">
1456 <tbody valign="top">
1458 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant> </entry>
1459 <entry>Choose the filter manually</entry>
1462 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant> </entry>
1463 <entry>Choose the filter automatically</entry>
1468 <row><entry></entry></row>
1470 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant> </entry>
1471 <entry>integer (0-15)</entry>
1472 </row><row><entry spanname="descr">The setting for the
1473 Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry>
1475 <row><entry></entry></row>
1476 <row id="luma-spatial-filter-type">
1477 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant> </entry>
1478 <entry>enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry>
1479 </row><row><entry spanname="descr">Select the algorithm
1480 to use for the Luma Spatial Filter (default
1481 <constant>1D_HOR</constant>). Possible values:</entry>
1484 <entrytbl spanname="descr" cols="2">
1485 <tbody valign="top">
1487 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant> </entry>
1488 <entry>No filter</entry>
1491 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant> </entry>
1492 <entry>One-dimensional horizontal</entry>
1495 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant> </entry>
1496 <entry>One-dimensional vertical</entry>
1499 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant> </entry>
1500 <entry>Two-dimensional separable</entry>
1503 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant> </entry>
1504 <entry>Two-dimensional symmetrical
1505 non-separable</entry>
1510 <row><entry></entry></row>
1511 <row id="chroma-spatial-filter-type">
1512 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant> </entry>
1513 <entry>enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry>
1514 </row><row><entry spanname="descr">Select the algorithm
1515 for the Chroma Spatial Filter (default <constant>1D_HOR</constant>).
1516 Possible values are:</entry>
1519 <entrytbl spanname="descr" cols="2">
1520 <tbody valign="top">
1522 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant> </entry>
1523 <entry>No filter</entry>
1526 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant> </entry>
1527 <entry>One-dimensional horizontal</entry>
1532 <row><entry></entry></row>
1533 <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode">
1534 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant> </entry>
1535 <entry>enum v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry>
1536 </row><row><entry spanname="descr">Sets the Temporal
1537 Filter mode (default <constant>MANUAL</constant>). Possible values
1541 <entrytbl spanname="descr" cols="2">
1542 <tbody valign="top">
1544 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant> </entry>
1545 <entry>Choose the filter manually</entry>
1548 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant> </entry>
1549 <entry>Choose the filter automatically</entry>
1554 <row><entry></entry></row>
1556 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant> </entry>
1557 <entry>integer (0-31)</entry>
1558 </row><row><entry spanname="descr">The setting for the
1559 Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale
1560 capturing and 0 for scaled capturing.)</entry>
1562 <row><entry></entry></row>
1563 <row id="v4l2-mpeg-cx2341x-video-median-filter-type">
1564 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant> </entry>
1565 <entry>enum v4l2_mpeg_cx2341x_video_median_filter_type</entry>
1566 </row><row><entry spanname="descr">Median Filter Type
1567 (default <constant>OFF</constant>). Possible values are:</entry>
1570 <entrytbl spanname="descr" cols="2">
1571 <tbody valign="top">
1573 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant> </entry>
1574 <entry>No filter</entry>
1577 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant> </entry>
1578 <entry>Horizontal filter</entry>
1581 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant> </entry>
1582 <entry>Vertical filter</entry>
1585 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant> </entry>
1586 <entry>Horizontal and vertical filter</entry>
1589 <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant> </entry>
1590 <entry>Diagonal filter</entry>
1595 <row><entry></entry></row>
1597 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant> </entry>
1598 <entry>integer (0-255)</entry>
1599 </row><row><entry spanname="descr">Threshold above which
1600 the luminance median filter is enabled (default 0)</entry>
1602 <row><entry></entry></row>
1604 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant> </entry>
1605 <entry>integer (0-255)</entry>
1606 </row><row><entry spanname="descr">Threshold below which
1607 the luminance median filter is enabled (default 255)</entry>
1609 <row><entry></entry></row>
1611 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant> </entry>
1612 <entry>integer (0-255)</entry>
1613 </row><row><entry spanname="descr">Threshold above which
1614 the chroma median filter is enabled (default 0)</entry>
1616 <row><entry></entry></row>
1618 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant> </entry>
1619 <entry>integer (0-255)</entry>
1620 </row><row><entry spanname="descr">Threshold below which
1621 the chroma median filter is enabled (default 255)</entry>
1623 <row><entry></entry></row>
1625 <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant> </entry>
1626 <entry>boolean</entry>
1628 <row><entry spanname="descr">The CX2341X MPEG encoder
1629 can insert one empty MPEG-2 PES packet into the stream between every
1630 four video frames. The packet size is 2048 bytes, including the
1631 packet_start_code_prefix and stream_id fields. The stream_id is 0xBF
1632 (private stream 2). The payload consists of 0x00 bytes, to be filled
1633 in by the application. 0 = do not insert, 1 = insert packets.</entry>
1641 <section id="camera-controls">
1642 <title>Camera Control Reference</title>
1644 <para>The Camera class includes controls for mechanical (or
1645 equivalent digital) features of a device such as controllable lenses
1648 <table pgwide="1" frame="none" id="camera-control-id">
1649 <title>Camera Control IDs</title>
1651 <colspec colname="c1" colwidth="1*" />
1652 <colspec colname="c2" colwidth="6*" />
1653 <colspec colname="c3" colwidth="2*" />
1654 <colspec colname="c4" colwidth="6*" />
1655 <spanspec namest="c1" nameend="c2" spanname="id" />
1656 <spanspec namest="c2" nameend="c4" spanname="descr" />
1659 <entry spanname="id" align="left">ID</entry>
1660 <entry align="left">Type</entry>
1661 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
1664 <tbody valign="top">
1665 <row><entry></entry></row>
1667 <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant> </entry>
1668 <entry>class</entry>
1669 </row><row><entry spanname="descr">The Camera class
1670 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
1671 description of this control class.</entry>
1673 <row><entry></entry></row>
1675 <row id="v4l2-exposure-auto-type">
1676 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant> </entry>
1677 <entry>enum v4l2_exposure_auto_type</entry>
1678 </row><row><entry spanname="descr">Enables automatic
1679 adjustments of the exposure time and/or iris aperture. The effect of
1680 manual changes of the exposure time or iris aperture while these
1681 features are enabled is undefined, drivers should ignore such
1682 requests. Possible values are:</entry>
1685 <entrytbl spanname="descr" cols="2">
1686 <tbody valign="top">
1688 <entry><constant>V4L2_EXPOSURE_AUTO</constant> </entry>
1689 <entry>Automatic exposure time, automatic iris
1693 <entry><constant>V4L2_EXPOSURE_MANUAL</constant> </entry>
1694 <entry>Manual exposure time, manual iris.</entry>
1697 <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant> </entry>
1698 <entry>Manual exposure time, auto iris.</entry>
1701 <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant> </entry>
1702 <entry>Auto exposure time, manual iris.</entry>
1707 <row><entry></entry></row>
1710 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant> </entry>
1711 <entry>integer</entry>
1712 </row><row><entry spanname="descr">Determines the exposure
1713 time of the camera sensor. The exposure time is limited by the frame
1714 interval. Drivers should interpret the values as 100 µs units,
1715 where the value 1 stands for 1/10000th of a second, 10000 for 1 second
1716 and 100000 for 10 seconds.</entry>
1718 <row><entry></entry></row>
1721 <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant> </entry>
1722 <entry>boolean</entry>
1723 </row><row><entry spanname="descr">When
1724 <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to
1725 <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>,
1726 this control determines if the device may dynamically vary the frame
1727 rate. By default this feature is disabled (0) and the frame rate must
1728 remain constant.</entry>
1730 <row><entry></entry></row>
1733 <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant> </entry>
1734 <entry>integer</entry>
1735 </row><row><entry spanname="descr">This control turns the
1736 camera horizontally by the specified amount. The unit is undefined. A
1737 positive value moves the camera to the right (clockwise when viewed
1738 from above), a negative value to the left. A value of zero does not
1739 cause motion. This is a write-only control.</entry>
1741 <row><entry></entry></row>
1744 <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant> </entry>
1745 <entry>integer</entry>
1746 </row><row><entry spanname="descr">This control turns the
1747 camera vertically by the specified amount. The unit is undefined. A
1748 positive value moves the camera up, a negative value down. A value of
1749 zero does not cause motion. This is a write-only control.</entry>
1751 <row><entry></entry></row>
1754 <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant> </entry>
1755 <entry>button</entry>
1756 </row><row><entry spanname="descr">When this control is set,
1757 the camera moves horizontally to the default position.</entry>
1759 <row><entry></entry></row>
1762 <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant> </entry>
1763 <entry>button</entry>
1764 </row><row><entry spanname="descr">When this control is set,
1765 the camera moves vertically to the default position.</entry>
1767 <row><entry></entry></row>
1770 <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant> </entry>
1771 <entry>integer</entry>
1772 </row><row><entry spanname="descr">This control
1773 turns the camera horizontally to the specified position. Positive
1774 values move the camera to the right (clockwise when viewed from above),
1775 negative values to the left. Drivers should interpret the values as arc
1776 seconds, with valid values between -180 * 3600 and +180 * 3600
1779 <row><entry></entry></row>
1782 <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant> </entry>
1783 <entry>integer</entry>
1784 </row><row><entry spanname="descr">This control
1785 turns the camera vertically to the specified position. Positive values
1786 move the camera up, negative values down. Drivers should interpret the
1787 values as arc seconds, with valid values between -180 * 3600 and +180
1788 * 3600 inclusive.</entry>
1790 <row><entry></entry></row>
1793 <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant> </entry>
1794 <entry>integer</entry>
1795 </row><row><entry spanname="descr">This control sets the
1796 focal point of the camera to the specified position. The unit is
1797 undefined. Positive values set the focus closer to the camera,
1798 negative values towards infinity.</entry>
1800 <row><entry></entry></row>
1803 <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant> </entry>
1804 <entry>integer</entry>
1805 </row><row><entry spanname="descr">This control moves the
1806 focal point of the camera by the specified amount. The unit is
1807 undefined. Positive values move the focus closer to the camera,
1808 negative values towards infinity. This is a write-only control.</entry>
1810 <row><entry></entry></row>
1813 <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant> </entry>
1814 <entry>boolean</entry>
1815 </row><row><entry spanname="descr">Enables automatic focus
1816 adjustments. The effect of manual focus adjustments while this feature
1817 is enabled is undefined, drivers should ignore such requests.</entry>
1819 <row><entry></entry></row>
1822 <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant> </entry>
1823 <entry>integer</entry>
1824 </row><row><entry spanname="descr">Specify the objective lens
1825 focal length as an absolute value. The zoom unit is driver-specific and its
1826 value should be a positive integer.</entry>
1828 <row><entry></entry></row>
1831 <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant> </entry>
1832 <entry>integer</entry>
1833 </row><row><entry spanname="descr">Specify the objective lens
1834 focal length relatively to the current value. Positive values move the zoom
1835 lens group towards the telephoto direction, negative values towards the
1836 wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry>
1838 <row><entry></entry></row>
1841 <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant> </entry>
1842 <entry>integer</entry>
1843 </row><row><entry spanname="descr">Move the objective lens group
1844 at the specified speed until it reaches physical device limits or until an
1845 explicit request to stop the movement. A positive value moves the zoom lens
1846 group towards the telephoto direction. A value of zero stops the zoom lens
1847 group movement. A negative value moves the zoom lens group towards the
1848 wide-angle direction. The zoom speed unit is driver-specific.</entry>
1850 <row><entry></entry></row>
1853 <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant> </entry>
1854 <entry>integer</entry>
1855 </row><row><entry spanname="descr">This control sets the
1856 camera's aperture to the specified value. The unit is undefined.
1857 Larger values open the iris wider, smaller values close it.</entry>
1859 <row><entry></entry></row>
1862 <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant> </entry>
1863 <entry>integer</entry>
1864 </row><row><entry spanname="descr">This control modifies the
1865 camera's aperture by the specified amount. The unit is undefined.
1866 Positive values open the iris one step further, negative values close
1867 it one step further. This is a write-only control.</entry>
1869 <row><entry></entry></row>
1872 <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant> </entry>
1873 <entry>boolean</entry>
1874 </row><row><entry spanname="descr">Prevent video from being acquired
1875 by the camera. When this control is set to <constant>TRUE</constant> (1), no
1876 image can be captured by the camera. Common means to enforce privacy are
1877 mechanical obturation of the sensor and firmware image processing, but the
1878 device is not restricted to these methods. Devices that implement the privacy
1879 control must support read access and may support write access.</entry>
1883 <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant> </entry>
1884 <entry>integer</entry>
1885 </row><row><entry spanname="descr">Switch the band-stop filter of a
1886 camera sensor on or off, or specify its strength. Such band-stop filters can
1887 be used, for example, to filter out the fluorescent light component.</entry>
1889 <row><entry></entry></row>
1895 <section id="fm-tx-controls">
1896 <title>FM Transmitter Control Reference</title>
1898 <para>The FM Transmitter (FM_TX) class includes controls for common features of
1899 FM transmissions capable devices. Currently this class includes parameters for audio
1900 compression, pilot tone generation, audio deviation limiter, RDS transmission and
1901 tuning power features.</para>
1903 <table pgwide="1" frame="none" id="fm-tx-control-id">
1904 <title>FM_TX Control IDs</title>
1907 <colspec colname="c1" colwidth="1*" />
1908 <colspec colname="c2" colwidth="6*" />
1909 <colspec colname="c3" colwidth="2*" />
1910 <colspec colname="c4" colwidth="6*" />
1911 <spanspec namest="c1" nameend="c2" spanname="id" />
1912 <spanspec namest="c2" nameend="c4" spanname="descr" />
1915 <entry spanname="id" align="left">ID</entry>
1916 <entry align="left">Type</entry>
1917 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
1920 <tbody valign="top">
1921 <row><entry></entry></row>
1923 <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant> </entry>
1924 <entry>class</entry>
1925 </row><row><entry spanname="descr">The FM_TX class
1926 descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
1927 description of this control class.</entry>
1930 <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant> </entry>
1931 <entry>integer</entry>
1933 <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz.
1934 The range and step are driver-specific.</entry>
1937 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant> </entry>
1938 <entry>integer</entry>
1940 <row><entry spanname="descr">Sets the RDS Programme Identification field
1941 for transmission.</entry>
1944 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant> </entry>
1945 <entry>integer</entry>
1947 <row><entry spanname="descr">Sets the RDS Programme Type field for transmission.
1948 This encodes up to 31 pre-defined programme types.</entry>
1951 <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant> </entry>
1952 <entry>string</entry>
1954 <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission.
1955 It is intended for static display on a receiver. It is the primary aid to listeners in programme service
1956 identification and selection. In Annex E of <xref linkend="en50067" />, the RDS specification,
1957 there is a full description of the correct character encoding for Programme Service name strings.
1958 Also from RDS specification, PS is usually a single eight character text. However, it is also possible
1959 to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
1960 with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
1963 <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant> </entry>
1964 <entry>string</entry>
1966 <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of
1967 what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
1968 programme-related information or any other text. In these cases, RadioText should be used in addition to
1969 <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
1970 in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being
1971 used to transmit it, either 32 (2A block) or 64 (2B block). However, it is also possible
1972 to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
1973 with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
1976 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant> </entry>
1977 <entry>boolean</entry>
1979 <row><entry spanname="descr">Enables or disables the audio deviation limiter feature.
1980 The limiter is useful when trying to maximize the audio volume, minimize receiver-generated
1981 distortion and prevent overmodulation.
1985 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant> </entry>
1986 <entry>integer</entry>
1988 <row><entry spanname="descr">Sets the audio deviation limiter feature release time.
1989 Unit is in useconds. Step and range are driver-specific.</entry>
1992 <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant> </entry>
1993 <entry>integer</entry>
1995 <row><entry spanname="descr">Configures audio frequency deviation level in Hz.
1996 The range and step are driver-specific.</entry>
1999 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant> </entry>
2000 <entry>boolean</entry>
2002 <row><entry spanname="descr">Enables or disables the audio compression feature.
2003 This feature amplifies signals below the threshold by a fixed gain and compresses audio
2004 signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry>
2007 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant> </entry>
2008 <entry>integer</entry>
2010 <row><entry spanname="descr">Sets the gain for audio compression feature. It is
2011 a dB value. The range and step are driver-specific.</entry>
2014 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant> </entry>
2015 <entry>integer</entry>
2017 <row><entry spanname="descr">Sets the threshold level for audio compression freature.
2018 It is a dB value. The range and step are driver-specific.</entry>
2021 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant> </entry>
2022 <entry>integer</entry>
2024 <row><entry spanname="descr">Sets the attack time for audio compression feature.
2025 It is a useconds value. The range and step are driver-specific.</entry>
2028 <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant> </entry>
2029 <entry>integer</entry>
2031 <row><entry spanname="descr">Sets the release time for audio compression feature.
2032 It is a useconds value. The range and step are driver-specific.</entry>
2035 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant> </entry>
2036 <entry>boolean</entry>
2038 <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry>
2041 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant> </entry>
2042 <entry>integer</entry>
2044 <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is
2045 in Hz. The range and step are driver-specific.</entry>
2048 <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant> </entry>
2049 <entry>integer</entry>
2051 <row><entry spanname="descr">Configures pilot tone frequency value. Unit is
2052 in Hz. The range and step are driver-specific.</entry>
2055 <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant> </entry>
2056 <entry>integer</entry>
2058 <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting.
2059 A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies.
2060 Depending on the region, a time constant of either 50 or 75 useconds is used. The enum v4l2_preemphasis
2061 defines possible values for pre-emphasis. Here they are:</entry>
2063 <entrytbl spanname="descr" cols="2">
2064 <tbody valign="top">
2066 <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant> </entry>
2067 <entry>No pre-emphasis is applied.</entry>
2070 <entry><constant>V4L2_PREEMPHASIS_50_uS</constant> </entry>
2071 <entry>A pre-emphasis of 50 uS is used.</entry>
2074 <entry><constant>V4L2_PREEMPHASIS_75_uS</constant> </entry>
2075 <entry>A pre-emphasis of 75 uS is used.</entry>
2082 <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant> </entry>
2083 <entry>integer</entry>
2085 <row><entry spanname="descr">Sets the output power level for signal transmission.
2086 Unit is in dBuV. Range and step are driver-specific.</entry>
2089 <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant> </entry>
2090 <entry>integer</entry>
2092 <row><entry spanname="descr">This selects the value of antenna tuning capacitor
2093 manually or automatically if set to zero. Unit, range and step are driver-specific.</entry>
2095 <row><entry></entry></row>
2100 <para>For more details about RDS specification, refer to
2101 <xref linkend="en50067" /> document, from CENELEC.</para>
2104 <section id="flash-controls">
2105 <title>Flash Control Reference</title>
2108 <title>Experimental</title>
2110 <para>This is an <link linkend="experimental">experimental</link>
2111 interface and may change in the future.</para>
2115 The V4L2 flash controls are intended to provide generic access
2116 to flash controller devices. Flash controller devices are
2117 typically used in digital cameras.
2121 The interface can support both LED and xenon flash devices. As
2122 of writing this, there is no xenon flash driver using this
2126 <section id="flash-controls-use-cases">
2127 <title>Supported use cases</title>
2130 <title>Unsynchronised LED flash (software strobe)</title>
2133 Unsynchronised LED flash is controlled directly by the
2134 host as the sensor. The flash must be enabled by the host
2135 before the exposure of the image starts and disabled once
2136 it ends. The host is fully responsible for the timing of
2140 <para>Example of such device: Nokia N900.</para>
2144 <title>Synchronised LED flash (hardware strobe)</title>
2147 The synchronised LED flash is pre-programmed by the host
2148 (power and timeout) but controlled by the sensor through a
2149 strobe signal from the sensor to the flash.
2153 The sensor controls the flash duration and timing. This
2154 information typically must be made available to the
2161 <title>LED flash as torch</title>
2164 LED flash may be used as torch in conjunction with another
2165 use case involving camera or individually.
2172 <table pgwide="1" frame="none" id="flash-control-id">
2173 <title>Flash Control IDs</title>
2176 <colspec colname="c1" colwidth="1*" />
2177 <colspec colname="c2" colwidth="6*" />
2178 <colspec colname="c3" colwidth="2*" />
2179 <colspec colname="c4" colwidth="6*" />
2180 <spanspec namest="c1" nameend="c2" spanname="id" />
2181 <spanspec namest="c2" nameend="c4" spanname="descr" />
2184 <entry spanname="id" align="left">ID</entry>
2185 <entry align="left">Type</entry>
2186 </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
2189 <tbody valign="top">
2190 <row><entry></entry></row>
2192 <entry spanname="id"><constant>V4L2_CID_FLASH_CLASS</constant></entry>
2193 <entry>class</entry>
2196 <entry spanname="descr">The FLASH class descriptor.</entry>
2199 <entry spanname="id"><constant>V4L2_CID_FLASH_LED_MODE</constant></entry>
2202 <row id="v4l2-flash-led-mode">
2203 <entry spanname="descr">Defines the mode of the flash LED,
2204 the high-power white LED attached to the flash controller.
2205 Setting this control may not be possible in presence of
2206 some faults. See V4L2_CID_FLASH_FAULT.</entry>
2209 <entrytbl spanname="descr" cols="2">
2210 <tbody valign="top">
2212 <entry><constant>V4L2_FLASH_LED_MODE_NONE</constant></entry>
2216 <entry><constant>V4L2_FLASH_LED_MODE_FLASH</constant></entry>
2217 <entry>Flash mode.</entry>
2220 <entry><constant>V4L2_FLASH_LED_MODE_TORCH</constant></entry>
2221 <entry>Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.</entry>
2227 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_SOURCE</constant></entry>
2230 <row id="v4l2-flash-strobe-source"><entry
2231 spanname="descr">Defines the source of the flash LED
2235 <entrytbl spanname="descr" cols="2">
2236 <tbody valign="top">
2238 <entry><constant>V4L2_FLASH_STROBE_SOURCE_SOFTWARE</constant></entry>
2239 <entry>The flash strobe is triggered by using
2240 the V4L2_CID_FLASH_STROBE control.</entry>
2243 <entry><constant>V4L2_FLASH_STROBE_SOURCE_EXTERNAL</constant></entry>
2244 <entry>The flash strobe is triggered by an
2245 external source. Typically this is a sensor,
2246 which makes it possible to synchronises the
2247 flash strobe start to exposure start.</entry>
2253 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE</constant></entry>
2254 <entry>button</entry>
2257 <entry spanname="descr">Strobe flash. Valid when
2258 V4L2_CID_FLASH_LED_MODE is set to
2259 V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
2260 is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
2261 control may not be possible in presence of some faults.
2262 See V4L2_CID_FLASH_FAULT.</entry>
2265 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STOP</constant></entry>
2266 <entry>button</entry>
2268 <row><entry spanname="descr">Stop flash strobe immediately.</entry>
2271 <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STATUS</constant></entry>
2272 <entry>boolean</entry>
2275 <entry spanname="descr">Strobe status: whether the flash
2276 is strobing at the moment or not. This is a read-only
2280 <entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
2281 <entry>integer</entry>
2284 <entry spanname="descr">Hardware timeout for flash. The
2285 flash strobe is stopped after this period of time has
2286 passed from the start of the strobe.</entry>
2289 <entry spanname="id"><constant>V4L2_CID_FLASH_INTENSITY</constant></entry>
2290 <entry>integer</entry>
2293 <entry spanname="descr">Intensity of the flash strobe when
2294 the flash LED is in flash mode
2295 (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps
2296 (mA) if possible.</entry>
2299 <entry spanname="id"><constant>V4L2_CID_FLASH_TORCH_INTENSITY</constant></entry>
2300 <entry>integer</entry>
2303 <entry spanname="descr">Intensity of the flash LED in
2304 torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be
2305 milliamps (mA) if possible. Setting this control may not
2306 be possible in presence of some faults. See
2307 V4L2_CID_FLASH_FAULT.</entry>
2310 <entry spanname="id"><constant>V4L2_CID_FLASH_INDICATOR_INTENSITY</constant></entry>
2311 <entry>integer</entry>
2314 <entry spanname="descr">Intensity of the indicator LED.
2315 The indicator LED may be fully independent of the flash
2316 LED. The unit should be microamps (uA) if possible.</entry>
2319 <entry spanname="id"><constant>V4L2_CID_FLASH_FAULT</constant></entry>
2320 <entry>bitmask</entry>
2323 <entry spanname="descr">Faults related to the flash. The
2324 faults tell about specific problems in the flash chip
2325 itself or the LEDs attached to it. Faults may prevent
2326 further use of some of the flash controls. In particular,
2327 V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
2328 if the fault affects the flash LED. Exactly which faults
2329 have such an effect is chip dependent. Reading the faults
2330 resets the control and returns the chip to a usable state
2331 if possible.</entry>
2334 <entrytbl spanname="descr" cols="2">
2335 <tbody valign="top">
2337 <entry><constant>V4L2_FLASH_FAULT_OVER_VOLTAGE</constant></entry>
2338 <entry>Flash controller voltage to the flash LED
2339 has exceeded the limit specific to the flash
2343 <entry><constant>V4L2_FLASH_FAULT_TIMEOUT</constant></entry>
2344 <entry>The flash strobe was still on when
2345 the timeout set by the user ---
2346 V4L2_CID_FLASH_TIMEOUT control --- has expired.
2347 Not all flash controllers may set this in all
2348 such conditions.</entry>
2351 <entry><constant>V4L2_FLASH_FAULT_OVER_TEMPERATURE</constant></entry>
2352 <entry>The flash controller has overheated.</entry>
2355 <entry><constant>V4L2_FLASH_FAULT_SHORT_CIRCUIT</constant></entry>
2356 <entry>The short circuit protection of the flash
2357 controller has been triggered.</entry>
2363 <entry spanname="id"><constant>V4L2_CID_FLASH_CHARGE</constant></entry>
2364 <entry>boolean</entry>
2366 <row><entry spanname="descr">Enable or disable charging of the xenon
2367 flash capacitor.</entry>
2370 <entry spanname="id"><constant>V4L2_CID_FLASH_READY</constant></entry>
2371 <entry>boolean</entry>
2374 <entry spanname="descr">Is the flash ready to strobe?
2375 Xenon flashes require their capacitors charged before
2376 strobing. LED flashes often require a cooldown period
2377 after strobe during which another strobe will not be
2378 possible. This is a read-only control.</entry>
2380 <row><entry></entry></row>
2391 sgml-parent-document: "common.sgml"
2392 indent-tabs-mode: nil