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