1 /* $OpenBSD: uvideo.h,v 1.60 2019/12/08 13:21:21 mglocker Exp $ */ 2 3 /* 4 * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> 5 * Copyright (c) 2008 Marcus Glocker <mglocker@openbsd.org> 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #include <sys/queue.h> 21 #include <sys/videoio.h> 22 23 /* 24 * USB Video Class 25 */ 26 /* Table A-7: Video Class-Specific Endpoint Descriptor Subtypes */ 27 #define EP_UNDEFINED 0x00 28 #define EP_GENERAL 0x01 29 #define EP_ENDPOINT 0x02 30 #define EP_INTERRUPT 0x03 31 32 /* Table A-5: Video Class-Specific VC Interface Descriptor Subtypes */ 33 #define UDESCSUB_VC_DESCRIPTOR_UNDEFINED 0x00 34 #define UDESCSUB_VC_HEADER 0x01 35 #define UDESCSUB_VC_INPUT_TERMINAL 0x02 36 #define UDESCSUB_VC_OUTPUT_TERMINAL 0x03 37 #define UDESCSUB_VC_SELECTOR_UNIT 0x04 38 #define UDESCSUB_VC_PROCESSING_UNIT 0x05 39 #define UDESCSUB_VC_EXTENSION_UNIT 0x06 40 41 /* Table A-6: Video Class-Specific VS Interface Descriptor Subtypes */ 42 #define UDESCSUB_VS_UNDEFINED 0x00 43 #define UDESCSUB_VS_INPUT_HEADER 0x01 44 #define UDESCSUB_VS_OUTPUT_HEADER 0x02 45 #define UDESCSUB_VS_STILL_IMAGE_FRAME 0x03 46 #define UDESCSUB_VS_FORMAT_UNCOMPRESSED 0x04 47 #define UDESCSUB_VS_FRAME_UNCOMPRESSED 0x05 48 #define UDESCSUB_VS_FORMAT_MJPEG 0x06 49 #define UDESCSUB_VS_FRAME_MJPEG 0x07 50 #define UDESCSUB_VS_FORMAT_MPEG2TS 0x0a 51 #define UDESCSUB_VS_FORMAT_DV 0x0c 52 #define UDESCSUB_VS_COLORFORMAT 0x0d 53 #define UDESCSUB_VS_FORMAT_FRAME_BASED 0x10 54 #define UDESCSUB_VS_FRAME_FRAME_BASED 0x11 55 #define UDESCSUB_VS_FORMAT_STREAM_BASED 0x12 56 57 /* Table A-8: Video Class-Specific Request Codes */ 58 #define RC_UNDEFINED 0x00 59 #define SET_CUR 0x01 60 #define GET_CUR 0x81 61 #define GET_MIN 0x82 62 #define GET_MAX 0x83 63 #define GET_RES 0x84 64 #define GET_LEN 0x85 65 #define GET_INFO 0x86 66 #define GET_DEF 0x87 67 68 /* Table A-9: Video Control Interface Control Selectors */ 69 #define VC_CONTROL_UNDEFINED 0x00 70 #define VC_VIDEO_POWER_MODE_CONTROL 0x01 71 #define VC_REQUEST_ERROR_CODE_CONTROL 0x02 72 73 /* Table A-11: Selector Unit Control Selectors */ 74 #define SU_CONTROL_UNDEFINED 0x00 75 #define SU_INPUT_SELECT_CONTROL 0x01 76 77 /* Table A-12: Camera Terminal Control Selectors */ 78 #define CT_CONTROL_UNDEFINED 0x00 79 #define CT_SCANNING_MODE_CONTROL 0x01 80 #define CT_AE_MODE_CONTROL 0x02 81 #define CT_AE_PRIORITY_CONTROL 0x03 82 #define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 83 #define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 84 #define CT_FOCUS_ABSOLUTE_CONTROL 0x06 85 #define CT_FOCUS_RELATIVE_CONTROL 0x07 86 #define CT_FOCUS_AUTO_CONTROL 0x08 87 #define CT_IRIS_ABSOLUTE_CONTROL 0x09 88 #define CT_IRIS_RELATIVE_CONTROL 0x0a 89 #define CT_ZOOM_ABSOLUTE_CONTROL 0x0b 90 #define CT_ZOOM_RELATIVE_CONTROL 0x0c 91 #define CT_PANTILT_ABSOLUTE_CONTROL 0x0d 92 #define CT_PANTILT_RELATIVE_CONTROL 0x0e 93 #define CT_ROLL_ABSOLUTE_CONTROL 0x0f 94 #define CT_ROLL_RELATIVE_CONTROL 0x10 95 #define CT_PRIVACY_CONTROL 0x11 96 97 /* Table A-13: Processing Unit Control Selectors */ 98 #define PU_CONTROL_UNDEFINED 0x00 99 #define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 100 #define PU_BRIGHTNESS_CONTROL 0x02 101 #define PU_CONTRAST_CONTROL 0x03 102 #define PU_GAIN_CONTROL 0x04 103 #define PU_POWER_LINE_FREQUENCY_CONTROL 0x05 104 #define PU_HUE_CONTROL 0x06 105 #define PU_SATURATION_CONTROL 0x07 106 #define PU_SHARPNESS_CONTROL 0x08 107 #define PU_GAMMA_CONTROL 0x09 108 #define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a 109 #define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b 110 #define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c 111 #define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d 112 #define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e 113 #define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f 114 #define PU_HUE_AUTO_CONTROL 0x10 115 #define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 116 #define PU_ANALOG_LOCK_STATUS_CONTROL 0x12 117 118 /* Table A-15: VideoStreaming Interface Control Selectors */ 119 #define VS_CONTROL_UNDEFINED 0x00 120 #define VS_PROBE_CONTROL 0x01 121 #define VS_COMMIT_CONTROL 0x02 122 #define VS_STILL_PROBE_CONTROL 0x03 123 #define VS_STILL_COMMIT_CONTROL 0x04 124 #define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 125 #define VS_STREAM_ERROR_CODE_CONTROL 0x06 126 #define VS_GENERATE_KEY_FRAME_CONTROL 0x07 127 #define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 128 #define VS_SYNC_DELAY_CONTROL 0x09 129 130 /* probe commit bmRequests */ 131 #define UVIDEO_SET_IF 0x21 132 #define UVIDEO_GET_IF 0xa1 133 #define UVIDEO_SET_EP 0x22 134 #define UVIDEO_GET_EP 0xa2 135 136 /* Table B-1: USB Terminal Types */ 137 #define TT_VENDOR_SPECIFIC 0x0100 138 #define TT_STREAMING 0x0101 139 140 /* Table B-2: Input Terminal Types */ 141 #define ITT_VENDOR_SPECIFIC 0x0200 142 #define ITT_CAMERA 0x0201 143 #define ITT_MEDIA_TRANSPORT_INPUT 0x0202 144 145 /* Table B-3: Output Terminal Types */ 146 #define OTT_VENDOR_SPECIFIC 0x0300 147 #define OTT_DISPLAY 0x0301 148 #define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 149 150 /* Table B-4: External Terminal Types */ 151 #define EXTERNAL_VENDOR_SPECIFIC 0x0400 152 #define COMPOSITE_CONNECTOR 0x0401 153 #define SVIDEO_CONNECTOR 0x0402 154 #define COMPONENT_CONNECTOR 0x0403 155 156 /* Table 3-3: VC Interface Header Descriptor */ 157 struct usb_video_header_desc { 158 uByte bLength; 159 uByte bDescriptorType; 160 uByte bDescriptorSubtype; 161 uWord bcdUVC; 162 uWord wTotalLength; 163 uDWord dwClockFrequency; 164 uByte bInCollection; 165 } __packed; 166 167 struct usb_video_header_desc_all { 168 struct usb_video_header_desc *fix; 169 uByte *baInterfaceNr; 170 }; 171 172 /* Table 3-4: Input Terminal Descriptor */ 173 struct usb_video_input_terminal_desc { 174 uByte bLength; 175 uByte bDescriptorType; 176 uByte bDescriptorSubtype; 177 uByte bTerminalID; 178 uWord wTerminalType; 179 uByte bAssocTerminal; 180 uByte iTerminal; 181 } __packed; 182 183 /* Table 3-5: Output Terminal Descriptor */ 184 struct usb_video_output_terminal_desc { 185 uByte bLength; 186 uByte bDescriptorType; 187 uByte bDescriptorSubtype; 188 uByte bTerminalID; 189 uWord wTerminalType; 190 uByte bAssocTerminal; 191 uByte bSourceID; 192 uByte iTerminal; 193 } __packed; 194 195 /* Table 3-6: Camera Terminal Descriptor */ 196 struct usb_video_camera_terminal_desc { 197 uByte bLength; 198 uByte bDescriptorType; 199 uByte bDescriptorSubtype; 200 uByte bTerminalID; 201 uWord wTerminalType; 202 uByte bAssocTerminal; 203 uByte iTerminal; 204 uWord wObjectiveFocalLengthMin; 205 uWord wObjectiveFocalLengthMax; 206 uWord wOcularFocalLength; 207 uByte bControlSize; 208 uByte *bmControls; 209 } __packed; 210 211 /* Table 3-8: VC Processing Unit Descriptor */ 212 struct usb_video_vc_processing_desc { 213 uByte bLength; 214 uByte bDescriptorType; 215 uByte bDescriptorSubtype; 216 uByte bUnitID; 217 uByte bSourceID; 218 uWord wMaxMultiplier; 219 uByte bControlSize; 220 uByte bmControls[255]; /* [bControlSize] */ 221 /* uByte iProcessing; */ 222 /* uByte bmVideoStandards; */ 223 } __packed; 224 225 /* Table 3-9: VC Extension Unit Descriptor */ 226 struct usb_video_vc_extension_desc { 227 uByte bLength; 228 uByte bDescriptorType; 229 uByte bDescriptorSubtype; 230 uByte bUnitID; 231 uByte guidExtensionCode[16]; 232 uByte bNumControls; 233 uByte bNrInPins; 234 } __packed; 235 236 /* Table 3-11: VC Endpoint Descriptor */ 237 struct usb_video_vc_endpoint_desc { 238 uByte bLength; 239 uByte bDescriptorType; 240 uByte bDescriptorSubtype; 241 uWord wMaxTransferSize; 242 } __packed; 243 244 /* Table 3-13: Interface Input Header Descriptor */ 245 struct usb_video_input_header_desc { 246 uByte bLength; 247 uByte bDescriptorType; 248 uByte bDescriptorSubtype; 249 uByte bNumFormats; 250 uWord wTotalLength; 251 uByte bEndpointAddress; 252 uByte bmInfo; 253 uByte bTerminalLink; 254 uByte bStillCaptureMethod; 255 uByte bTriggerSupport; 256 uByte bTriggerUsage; 257 uByte bControlSize; 258 } __packed; 259 260 struct usb_video_input_header_desc_all { 261 struct usb_video_input_header_desc *fix; 262 uByte *bmaControls; 263 }; 264 265 /* Table 3-18: Color Matching Descriptor */ 266 struct usb_video_color_matching_descr { 267 uByte bLength; 268 uByte bDescriptorType; 269 uByte bDescriptorSubtype; 270 uByte bColorPrimaries; 271 uByte bTransferCharacteristics; 272 uByte bMatrixCoefficients; 273 } __packed; 274 275 /* Table 4-47: Video Probe and Commit Controls */ 276 struct usb_video_probe_commit { 277 uWord bmHint; 278 uByte bFormatIndex; 279 uByte bFrameIndex; 280 uDWord dwFrameInterval; 281 uWord wKeyFrameRate; 282 uWord wPFrameRate; 283 uWord wCompQuality; 284 uWord wCompWindowSize; 285 uWord wDelay; 286 uDWord dwMaxVideoFrameSize; 287 uDWord dwMaxPayloadTransferSize; 288 uDWord dwClockFrequency; 289 uByte bmFramingInfo; 290 uByte bPreferedVersion; 291 uByte bMinVersion; 292 uByte bMaxVersion; 293 } __packed; 294 295 /* 296 * USB Video Payload Uncompressed 297 */ 298 /* Table 2-1: Compression Formats */ 299 #define UVIDEO_FORMAT_GUID_YUY2 { \ 300 0x59, 0x55, 0x59, 0x32, 0x00, 0x00, 0x10, 0x00, \ 301 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } 302 303 #define UVIDEO_FORMAT_GUID_NV12 { \ 304 0x4e, 0x56, 0x31, 0x32, 0x00, 0x00, 0x10, 0x00, \ 305 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } 306 307 #define UVIDEO_FORMAT_GUID_UYVY { \ 308 0x55, 0x59, 0x56, 0x59, 0x00, 0x00, 0x10, 0x00, \ 309 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } 310 311 #define UVIDEO_FORMAT_GUID_KSMEDIA_L8_IR { \ 312 0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \ 313 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } 314 315 /* 316 * USB Video Payload MJPEG 317 */ 318 /* Table 2-1: Stream Header Format for the Motion-JPEG */ 319 #define UVIDEO_SH_MAX_LEN 12 320 #define UVIDEO_SH_MIN_LEN 2 321 struct usb_video_stream_header { 322 uByte bLength; 323 uByte bFlags; 324 #define UVIDEO_SH_FLAG_FID (1 << 0) 325 #define UVIDEO_SH_FLAG_EOF (1 << 1) 326 #define UVIDEO_SH_FLAG_PTS (1 << 2) 327 #define UVIDEO_SH_FLAG_SCR (1 << 3) 328 #define UVIDEO_SH_FLAG_RES (1 << 4) 329 #define UVIDEO_SH_FLAG_STI (1 << 5) 330 #define UVIDEO_SH_FLAG_ERR (1 << 6) 331 #define UVIDEO_SH_FLAG_EOH (1 << 7) 332 /* TODO complete struct */ 333 } __packed; 334 335 /* Table 3-1: Motion-JPEG Video Format Descriptor */ 336 struct usb_video_format_mjpeg_desc { 337 uByte bLength; 338 uByte bDescriptorType; 339 uByte bDescriptorSubtype; 340 uByte bFormatIndex; 341 uByte bNumFrameDescriptors; 342 uByte bmFlags; 343 uByte bDefaultFrameIndex; 344 uByte bAspectRatioX; 345 uByte bAspectRatioY; 346 uByte bmInterlaceFlags; 347 uByte bCopyProtect; 348 } __packed; 349 350 /* Table 3-2: Video Frame Descriptor (same for mjpeg and uncompressed)*/ 351 struct usb_video_frame_desc { 352 uByte bLength; 353 uByte bDescriptorType; 354 uByte bDescriptorSubtype; 355 uByte bFrameIndex; 356 uByte bmCapabilities; 357 uWord wWidth; 358 uWord wHeight; 359 uDWord dwMinBitRate; 360 uDWord dwMaxBitRate; 361 uDWord dwMaxVideoFrameBufferSize; 362 uDWord dwDefaultFrameInterval; 363 uByte bFrameIntervalType; 364 /* uDWord ivals[]; frame intervals, length varies */ 365 } __packed; 366 367 /* 368 * USB Video Payload Uncompressed 369 */ 370 /* Table 3-1: Uncompressed Video Format Descriptor */ 371 struct usb_video_format_uncompressed_desc { 372 uByte bLength; 373 uByte bDescriptorType; 374 uByte bDescriptorSubtype; 375 uByte bFormatIndex; 376 uByte bNumFrameDescriptors; 377 uByte guidFormat[16]; 378 uByte bBitsPerPixel; 379 uByte bDefaultFrameIndex; 380 uByte bAspectRatioX; 381 uByte bAspectRatioY; 382 uByte bmInterlaceFlags; 383 uByte bCopyProtect; 384 } __packed; 385 386 /* 387 * Driver specific private definitions. 388 */ 389 struct uvideo_format_desc { 390 uByte bLength; 391 uByte bDescriptorType; 392 uByte bDescriptorSubtype; 393 uByte bFormatIndex; 394 uByte bNumFrameDescriptors; 395 union { 396 /* mjpeg */ 397 struct { 398 uByte bmFlags; 399 uByte bDefaultFrameIndex; 400 uByte bAspectRatioX; 401 uByte bAspectRatioY; 402 uByte bmInterlaceFlags; 403 uByte bCopyProtect; 404 } mjpeg; 405 406 /* uncompressed */ 407 struct { 408 uByte guidFormat[16]; 409 uByte bBitsPerPixel; 410 uByte bDefaultFrameIndex; 411 uByte bAspectRatioX; 412 uByte bAspectRatioY; 413 uByte bmInterlaceFlags; 414 uByte bCopyProtect; 415 } uc; 416 } u; 417 } __packed; 418 419 #define UVIDEO_NFRAMES_MAX 40 420 struct uvideo_isoc_xfer { 421 struct uvideo_softc *sc; 422 struct usbd_xfer *xfer; 423 void *buf; 424 uint16_t size[UVIDEO_NFRAMES_MAX]; 425 }; 426 427 struct uvideo_bulk_xfer { 428 struct uvideo_softc *sc; 429 struct usbd_xfer *xfer; 430 void *buf; 431 uint16_t size; 432 }; 433 434 #define UVIDEO_IXFERS 3 435 struct uvideo_vs_iface { 436 struct usbd_interface *ifaceh; 437 struct usbd_pipe *pipeh; 438 int iface; 439 int numalts; 440 int curalt; 441 int endpoint; 442 uint32_t psize; 443 int bulk_endpoint; 444 int bulk_running; 445 struct uvideo_isoc_xfer ixfer[UVIDEO_IXFERS]; 446 struct uvideo_bulk_xfer bxfer; 447 }; 448 449 struct uvideo_frame_buffer { 450 int sample; 451 uint8_t fid; 452 int offset; 453 int buf_size; 454 uint8_t *buf; 455 uint32_t fmt_flags; 456 }; 457 458 /* 459 * 1920x1080 uncompressed (e.g. YUYV422) requires ~4MB image data per frame. 460 * 4MB * 8 frame buffers = 32MB kernel memory required. 461 * With 8 frame buffers we are pretty safe not to run out of kernel memory. 462 */ 463 #define UVIDEO_MAX_BUFFERS 8 464 struct uvideo_mmap { 465 SIMPLEQ_ENTRY(uvideo_mmap) q_frames; 466 uint8_t *buf; 467 struct v4l2_buffer v4l2_buf; 468 }; 469 typedef SIMPLEQ_HEAD(, uvideo_mmap) q_mmap; 470 471 struct uvideo_format_group { 472 uint32_t pixelformat; 473 uint8_t format_dfidx; 474 struct uvideo_format_desc *format; 475 /* frame descriptors for mjpeg and uncompressed are identical */ 476 #define UVIDEO_MAX_FRAME 32 477 struct usb_video_frame_desc *frame_cur; 478 struct usb_video_frame_desc *frame[UVIDEO_MAX_FRAME]; 479 int frame_num; 480 }; 481 482 struct uvideo_res { 483 int width; 484 int height; 485 int fidx; 486 }; 487 488 struct uvideo_controls { 489 int cid; 490 int type; 491 char name[32]; 492 uint8_t ctrl_bit; 493 uint16_t ctrl_selector; 494 uint16_t ctrl_len; 495 int sig; 496 } uvideo_ctrls[] = { 497 /* 498 * Processing Unit Controls 499 */ 500 { 501 V4L2_CID_BRIGHTNESS, 502 V4L2_CTRL_TYPE_INTEGER, 503 "Brightness", 504 0, 505 PU_BRIGHTNESS_CONTROL, 506 2, 507 1 508 }, 509 { 510 V4L2_CID_CONTRAST, 511 V4L2_CTRL_TYPE_INTEGER, 512 "Contrast", 513 1, 514 PU_CONTRAST_CONTROL, 515 2, 516 0 517 }, 518 { 519 V4L2_CID_HUE, 520 V4L2_CTRL_TYPE_INTEGER, 521 "Hue", 522 2, 523 PU_HUE_CONTROL, 524 2, 525 1 526 }, 527 { 528 V4L2_CID_SATURATION, 529 V4L2_CTRL_TYPE_INTEGER, 530 "Saturation", 531 3, 532 PU_SATURATION_CONTROL, 533 2, 534 0 535 }, 536 { 537 V4L2_CID_SHARPNESS, 538 V4L2_CTRL_TYPE_INTEGER, 539 "Sharpness", 540 4, 541 PU_SHARPNESS_CONTROL, 542 2, 543 0 544 }, 545 { 546 V4L2_CID_GAMMA, 547 V4L2_CTRL_TYPE_INTEGER, 548 "Gamma", 549 5, 550 PU_GAMMA_CONTROL, 551 2, 552 0 553 }, 554 { 555 V4L2_CID_WHITE_BALANCE_TEMPERATURE, 556 V4L2_CTRL_TYPE_INTEGER, 557 "White Balance Temperature", 558 6, 559 PU_WHITE_BALANCE_TEMPERATURE_CONTROL, 560 2, 561 0 562 }, 563 #if 0 564 /* XXX Two V4L2 ids mapping one UVC control */ 565 { 566 V4L2_CID_RED_BALANCE, /* V4L2_CID_BLUE_BALANCE */ 567 V4L2_CTRL_TYPE_INTEGER, 568 "White Balance Red Component", /* Blue Component */ 569 7, 570 PU_WHITE_BALANCE_COMPONENT_CONTROL, 571 4, 572 0 573 }, 574 #endif 575 { 576 V4L2_CID_BACKLIGHT_COMPENSATION, 577 V4L2_CTRL_TYPE_INTEGER, 578 "Backlight Compensation", 579 8, 580 PU_BACKLIGHT_COMPENSATION_CONTROL, 581 2, 582 0 583 }, 584 { 585 V4L2_CID_GAIN, 586 V4L2_CTRL_TYPE_INTEGER, 587 "Gain", 588 9, 589 PU_GAIN_CONTROL, 590 2, 591 0 592 }, 593 { 594 V4L2_CID_POWER_LINE_FREQUENCY, 595 V4L2_CTRL_TYPE_MENU, 596 "Power Line Frequency", 597 10, 598 PU_POWER_LINE_FREQUENCY_CONTROL, 599 2, 600 0 601 }, 602 { 603 V4L2_CID_HUE_AUTO, 604 V4L2_CTRL_TYPE_BOOLEAN, 605 "Hue Auto", 606 11, 607 PU_HUE_AUTO_CONTROL, 608 1, 609 0 610 }, 611 { 612 V4L2_CID_AUTO_WHITE_BALANCE, 613 V4L2_CTRL_TYPE_BOOLEAN, 614 "White Balance Temperature Auto", 615 12, 616 PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL, 617 1, 618 0 619 }, 620 { 621 V4L2_CID_AUTO_WHITE_BALANCE, 622 V4L2_CTRL_TYPE_BOOLEAN, 623 "White Balance Component Auto", 624 13, 625 PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL, 626 1, 627 0 628 }, 629 #if 0 630 /* XXX No V4L2 CID for these controls? */ 631 { 632 V4L2_CID_XXX, 633 V4L2_CTRL_TYPE_INTEGER, 634 "Digital Multiplier", 635 14, 636 PU_DIGITAL_MULTIPLIER_CONTROL, 637 2, 638 0 639 }, 640 { 641 V4L2_CID_XXX, 642 V4L2_CTRL_TYPE_INTEGER, 643 "Digital Multiplier Limit", 644 15, 645 PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL, 646 2, 647 0 648 }, 649 { 650 V4L2_CID_XXX, 651 V4L2_CTRL_TYPE_INTEGER, 652 "Analog Video Standard", 653 16, 654 PU_ANALOG_VIDEO_STANDARD_CONTROL, 655 1, 656 0 657 }, 658 { 659 V4L2_CID_XXX, 660 V4L2_CTRL_TYPE_INTEGER, 661 "Analog Lock Status", 662 17, 663 PU_ANALOG_LOCK_STATUS_CONTROL, 664 1, 665 0 666 }, 667 #endif 668 { 0, 0, "", 0, 0, 0, 0 } 669 }; 670