Lines Matching +full:no +full:- +full:1 +full:- +full:8 +full:- +full:v

1 /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
5 * Copyright (C) 1999-2012 the contributors
23 * 1. Redistributions of source code must retain the above copyright
36 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * All kernel-specific stuff were moved to media/v4l2-dev.h, so
48 * no #if __KERNEL tests are allowed here
66 #include <linux/v4l2-common.h>
67 #include <linux/v4l2-controls.h>
74 #define VIDEO_MAX_PLANES 8
80 /* Four-character-code (FOURCC) */
82 ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
83 #define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31))
93 V4L2_FIELD_NONE = 1, /* this device has no fields ... */
98 buffer, top-bottom order */
99 V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
102 V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
142 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
149 V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
177 V4L2_TUNER_RADIO = 1,
188 V4L2_MEMORY_MMAP = 1,
203 V4L2_COLORSPACE_SMPTE170M = 1,
205 /* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */
212 * Deprecated, do not use. No driver will ever return this. This was
230 * and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG.
235 V4L2_COLORSPACE_SRGB = 8,
246 /* DCI-P3 colorspace, used by cinema projectors */
287 V4L2_XFER_FUNC_709 = 1,
332 /* ITU-R 601 -- SDTV */
333 V4L2_YCBCR_ENC_601 = 1,
335 /* Rec. 709 -- HDTV */
338 /* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */
341 /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
353 /* BT.2020 Non-constant Luminance Y'CbCr */
359 /* SMPTE 240M -- Obsolete HDTV */
360 V4L2_YCBCR_ENC_SMPTE240M = 8,
376 /* Hue mapped to 0 - 179 */
379 /* Hue mapped to 0-255 */
401 V4L2_QUANTIZATION_FULL_RANGE = 1,
416 * Deprecated names for opRGB colorspace (IEC 61966-2-5)
428 V4L2_PRIORITY_BACKGROUND = 1,
452 * struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
489 /* Is a video mem-to-mem device that supports multiplanar formats */
491 /* Is a video mem-to-mem device */
505 #define V4L2_CAP_EDID 0x02000000 /* Is an EDID-only device */
516 * V I D E O I M A G E F O R M A T
540 /* RGB formats (1 or 2 bytes per pixel) */
541 #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
543 #define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */
544 #define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */
545 #define V4L2_PIX_FMT_RGBA444 v4l2_fourcc('R', 'A', '1', '2') /* 16 rrrrgggg bbbbaaaa */
546 #define V4L2_PIX_FMT_RGBX444 v4l2_fourcc('R', 'X', '1', '2') /* 16 rrrrgggg bbbbxxxx */
547 #define V4L2_PIX_FMT_ABGR444 v4l2_fourcc('A', 'B', '1', '2') /* 16 aaaabbbb ggggrrrr */
548 #define V4L2_PIX_FMT_XBGR444 v4l2_fourcc('X', 'B', '1', '2') /* 16 xxxxbbbb ggggrrrr */
549 #define V4L2_PIX_FMT_BGRA444 v4l2_fourcc('G', 'A', '1', '2') /* 16 bbbbgggg rrrraaaa */
550 #define V4L2_PIX_FMT_BGRX444 v4l2_fourcc('B', 'X', '1', '2') /* 16 bbbbgggg rrrrxxxx */
551 #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
552 #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */
553 #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */
554 #define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */
555 #define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */
556 #define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */
557 #define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */
558 #define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */
559 #define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */
560 #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
561 #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
562 #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */
563 #define V4L2_PIX_FMT_XRGB555X v4l2_fourcc_be('X', 'R', '1', '5') /* 16 XRGB-5-5-5 BE */
564 #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
567 #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
568 #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
569 #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
570 #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
571 #define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */
572 #define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */
573 #define V4L2_PIX_FMT_BGRA32 v4l2_fourcc('R', 'A', '2', '4') /* 32 ABGR-8-8-8-8 */
574 #define V4L2_PIX_FMT_BGRX32 v4l2_fourcc('R', 'X', '2', '4') /* 32 XBGR-8-8-8-8 */
575 #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
576 #define V4L2_PIX_FMT_RGBA32 v4l2_fourcc('A', 'B', '2', '4') /* 32 RGBA-8-8-8-8 */
577 #define V4L2_PIX_FMT_RGBX32 v4l2_fourcc('X', 'B', '2', '4') /* 32 RGBX-8-8-8-8 */
578 #define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */
579 #define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
580 #define V4L2_PIX_FMT_RGBX1010102 v4l2_fourcc('R', 'X', '3', '0') /* 32 RGBX-10-10-10-2 */
581 #define V4L2_PIX_FMT_RGBA1010102 v4l2_fourcc('R', 'A', '3', '0') /* 32 RGBA-10-10-10-2 */
582 #define V4L2_PIX_FMT_ARGB2101010 v4l2_fourcc('A', 'R', '3', '0') /* 32 ARGB-2-10-10-10 */
584 /* RGB formats (6 or 8 bytes per pixel) */
585 #define V4L2_PIX_FMT_BGR48_12 v4l2_fourcc('B', '3', '1', '2') /* 48 BGR 12-bit per component */
586 #define V4L2_PIX_FMT_BGR48 v4l2_fourcc('B', 'G', 'R', '6') /* 48 BGR 16-bit per component */
587 #define V4L2_PIX_FMT_RGB48 v4l2_fourcc('R', 'G', 'B', '6') /* 48 RGB 16-bit per component */
588 #define V4L2_PIX_FMT_ABGR64_12 v4l2_fourcc('B', '4', '1', '2') /* 64 BGRA 12-bit per component */
591 #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
594 #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
595 #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */
596 #define V4L2_PIX_FMT_Y012 v4l2_fourcc('Y', '0', '1', '2') /* 12 Greyscale */
597 #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */
598 #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
599 #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */
601 /* Grey bit-packed formats */
602 #define V4L2_PIX_FMT_Y10BPACK v4l2_fourcc('Y', '1', '0', 'B') /* 10 Greyscale bit-packed */
603 #define V4L2_PIX_FMT_Y10P v4l2_fourcc('Y', '1', '0', 'P') /* 10 Greyscale, MIPI RAW10 packed */
604 #define V4L2_PIX_FMT_IPU3_Y10 v4l2_fourcc('i', 'p', '3', 'y') /* IPU3 packed 10-bit greyscale */
605 #define V4L2_PIX_FMT_Y12P v4l2_fourcc('Y', '1', '2', 'P') /* 12 Greyscale, MIPI RAW12 packed */
606 #define V4L2_PIX_FMT_Y14P v4l2_fourcc('Y', '1', '4', 'P') /* 14 Greyscale, MIPI RAW14 packed */
609 #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
612 #define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ') /* 8 UV 4:4 */
615 #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
616 #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
617 #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
618 #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
619 #define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
620 #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */
622 #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
623 #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
624 #define V4L2_PIX_FMT_YUV24 v4l2_fourcc('Y', 'U', 'V', '3') /* 24 YUV-8-8-8 */
625 #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
626 #define V4L2_PIX_FMT_AYUV32 v4l2_fourcc('A', 'Y', 'U', 'V') /* 32 AYUV-8-8-8-8 */
627 #define V4L2_PIX_FMT_XYUV32 v4l2_fourcc('X', 'Y', 'U', 'V') /* 32 XYUV-8-8-8-8 */
628 #define V4L2_PIX_FMT_VUYA32 v4l2_fourcc('V', 'U', 'Y', 'A') /* 32 VUYA-8-8-8-8 */
629 #define V4L2_PIX_FMT_VUYX32 v4l2_fourcc('V', 'U', 'Y', 'X') /* 32 VUYX-8-8-8-8 */
630 #define V4L2_PIX_FMT_YUVA32 v4l2_fourcc('Y', 'U', 'V', 'A') /* 32 YUVA-8-8-8-8 */
631 #define V4L2_PIX_FMT_YUVX32 v4l2_fourcc('Y', 'U', 'V', 'X') /* 32 YUVX-8-8-8-8 */
632 #define V4L2_PIX_FMT_M420 v4l2_fourcc('M', '4', '2', '0') /* 12 YUV 4:2:0 2 lines y, 1 line uv …
633 #define V4L2_PIX_FMT_YUV48_12 v4l2_fourcc('Y', '3', '1', '2') /* 48 YUV 4:4:4 12-bit per compon…
637 * of the 16 bit components, and 16-xx bits of zero padding occupy the LSBs.
639 #define V4L2_PIX_FMT_Y210 v4l2_fourcc('Y', '2', '1', '0') /* 32 YUYV 4:2:2 */
640 #define V4L2_PIX_FMT_Y212 v4l2_fourcc('Y', '2', '1', '2') /* 32 YUYV 4:2:2 */
641 #define V4L2_PIX_FMT_Y216 v4l2_fourcc('Y', '2', '1', '6') /* 32 YUYV 4:2:2 */
643 /* two planes -- one Y, one Cr + Cb interleaved */
644 #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
645 #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */
646 #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
647 #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
648 #define V4L2_PIX_FMT_NV24 v4l2_fourcc('N', 'V', '2', '4') /* 24 Y/CbCr 4:4:4 */
649 #define V4L2_PIX_FMT_NV42 v4l2_fourcc('N', 'V', '4', '2') /* 24 Y/CrCb 4:4:4 */
650 #define V4L2_PIX_FMT_P010 v4l2_fourcc('P', '0', '1', '0') /* 24 Y/CbCr 4:2:0 10-bit per compone…
651 #define V4L2_PIX_FMT_P012 v4l2_fourcc('P', '0', '1', '2') /* 24 Y/CbCr 4:2:0 12-bit per compone…
653 /* two non contiguous planes - one Y, one Cr + Cb interleaved */
654 #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
655 #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */
656 #define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */
657 #define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */
658 #define V4L2_PIX_FMT_P012M v4l2_fourcc('P', 'M', '1', '2') /* 24 Y/CbCr 4:2:0 12-bit per compone…
660 /* three planes - Y Cb, Cr */
661 #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
662 #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */
663 #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 12 YVU411 planar */
664 #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
665 #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
668 /* three non contiguous planes - Y, Cb, Cr */
669 #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
670 #define V4L2_PIX_FMT_YVU420M v4l2_fourcc('Y', 'M', '2', '1') /* 12 YVU420 planar */
671 #define V4L2_PIX_FMT_YUV422M v4l2_fourcc('Y', 'M', '1', '6') /* 16 YUV422 planar */
672 #define V4L2_PIX_FMT_YVU422M v4l2_fourcc('Y', 'M', '6', '1') /* 16 YVU422 planar */
677 #define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */
678 #define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */
679 #define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */
680 #define V4L2_PIX_FMT_NV15_4L4 v4l2_fourcc('V', 'T', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit 4x4 tiles */
681 #define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macrob…
682 #define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */
683 #define V4L2_PIX_FMT_NV12_10BE_8L128 v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x1…
686 #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */
687 #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */
688 #define V4L2_PIX_FMT_NV12M_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */
689 #define V4L2_PIX_FMT_NV12M_10BE_8L128 v4l2_fourcc_be('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x1…
691 /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
692 #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
693 #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
694 #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
695 #define V4L2_PIX_FMT_SRGGB8 v4l2_fourcc('R', 'G', 'G', 'B') /* 8 RGRG.. GBGB.. */
696 #define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10 BGBG.. GRGR.. */
697 #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */
698 #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */
699 #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */
705 /* 10bit raw bayer a-law compressed to 8 bits */
706 #define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8')
707 #define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8')
708 #define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8')
709 #define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8')
710 /* 10bit raw bayer DPCM compressed to 8 bits */
711 #define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
712 #define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
713 #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
714 #define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
715 #define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */
716 #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
717 #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
718 #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
724 #define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */
725 #define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */
726 #define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4') /* 14 GRGR.. BGBG.. */
727 #define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */
734 #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */
735 #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */
736 #define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */
739 #define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
740 #define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4')
743 #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */
745 #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */
746 #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
748 #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
751 #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
752 #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
753 #define V4L2_PIX_FMT_MPEG2_SLICE v4l2_fourcc('M', 'G', '2', 'S') /* MPEG-2 parsed slice data */
754 #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4') /* MPEG-4 part 2 ES */
755 #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
756 #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant st…
757 #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant st…
758 #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
759 #define V4L2_PIX_FMT_VP8_FRAME v4l2_fourcc('V', 'P', '8', 'F') /* VP8 parsed frame */
760 #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */
761 #define V4L2_PIX_FMT_VP9_FRAME v4l2_fourcc('V', 'P', '9', 'F') /* VP9 parsed frame */
762 #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */
767 #define V4L2_PIX_FMT_AV1_FRAME v4l2_fourcc('A', 'V', '1', 'F') /* AV1 parsed frame */
769 #define V4L2_PIX_FMT_RV30 v4l2_fourcc('R', 'V', '3', '0') /* RealVideo 8 */
770 #define V4L2_PIX_FMT_RV40 v4l2_fourcc('R', 'V', '4', '0') /* RealVideo 9 & 10 */
772 /* Vendor-specific formats */
774 #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */
775 #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */
777 #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */
780 #define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */
782 #define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */
783 #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */
785 #define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
790 #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
791 #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
792 #define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
794 #define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYU…
796 #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
797 #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
799 #define V4L2_PIX_FMT_Y8I v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
800 #define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
801 #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
802 #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
803 …fine V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-c…
804 #define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */
805 #define V4L2_PIX_FMT_MT2110R v4l2_fourcc('M', 'T', '2', 'R') /* Mediatek 10-bit block raster mode …
806 …X_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
807 #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidenc…
808 #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */
809 #define V4L2_PIX_FMT_QC08C v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */
810 #define V4L2_PIX_FMT_QC10C v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */
815 #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer …
816 #define V4L2_PIX_FMT_IPU3_SGBRG10 v4l2_fourcc('i', 'p', '3', 'g') /* IPU3 packed 10-bit GBRG bayer …
817 #define V4L2_PIX_FMT_IPU3_SGRBG10 v4l2_fourcc('i', 'p', '3', 'G') /* IPU3 packed 10-bit GRBG bayer …
818 #define V4L2_PIX_FMT_IPU3_SRGGB10 v4l2_fourcc('i', 'p', '3', 'r') /* IPU3 packed 10-bit RGGB bayer …
821 #define V4L2_PIX_FMT_PISP_COMP1_RGGB v4l2_fourcc('P', 'C', '1', 'R') /* PiSP 8-bit mode 1 compresse…
822 #define V4L2_PIX_FMT_PISP_COMP1_GRBG v4l2_fourcc('P', 'C', '1', 'G') /* PiSP 8-bit mode 1 compresse…
823 #define V4L2_PIX_FMT_PISP_COMP1_GBRG v4l2_fourcc('P', 'C', '1', 'g') /* PiSP 8-bit mode 1 compresse…
824 #define V4L2_PIX_FMT_PISP_COMP1_BGGR v4l2_fourcc('P', 'C', '1', 'B') /* PiSP 8-bit mode 1 compresse…
825 #define V4L2_PIX_FMT_PISP_COMP1_MONO v4l2_fourcc('P', 'C', '1', 'M') /* PiSP 8-bit mode 1 compresse…
826 #define V4L2_PIX_FMT_PISP_COMP2_RGGB v4l2_fourcc('P', 'C', '2', 'R') /* PiSP 8-bit mode 2 compresse…
827 #define V4L2_PIX_FMT_PISP_COMP2_GRBG v4l2_fourcc('P', 'C', '2', 'G') /* PiSP 8-bit mode 2 compresse…
828 #define V4L2_PIX_FMT_PISP_COMP2_GBRG v4l2_fourcc('P', 'C', '2', 'g') /* PiSP 8-bit mode 2 compresse…
829 #define V4L2_PIX_FMT_PISP_COMP2_BGGR v4l2_fourcc('P', 'C', '2', 'B') /* PiSP 8-bit mode 2 compresse…
830 #define V4L2_PIX_FMT_PISP_COMP2_MONO v4l2_fourcc('P', 'C', '2', 'M') /* PiSP 8-bit mode 2 compresse…
832 /* SDR formats - used only for Software Defined Radio devices */
833 #define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
834 #define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */
835 #define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */
836 #define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */
837 #define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */
838 #define V4L2_SDR_FMT_PCU16BE v4l2_fourcc('P', 'C', '1', '6') /* planar complex u16be */
839 #define V4L2_SDR_FMT_PCU18BE v4l2_fourcc('P', 'C', '1', '8') /* planar complex u18be */
842 /* Touch formats - used for Touch devices */
843 #define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */
844 #define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */
845 #define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */
846 #define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */
848 /* Meta-data formats */
849 #define V4L2_META_FMT_VSP1_HGO v4l2_fourcc('V', 'S', 'P', 'H') /* R-Car VSP1 1-D Histogram */
850 #define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
851 #define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
853 #define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
855 /* Vendor specific - used for RK_ISP1 camera sub-system */
856 #define V4L2_META_FMT_RK_ISP1_PARAMS v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 3A Parameters…
857 #define V4L2_META_FMT_RK_ISP1_STAT_3A v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A Statistic…
858 #define V4L2_META_FMT_RK_ISP1_EXT_PARAMS v4l2_fourcc('R', 'K', '1', 'E') /* Rockchip ISP1 3a Extens…
860 /* Vendor specific - used for RaspberryPi PiSP */
865 * Line-based metadata formats. Remember to update v4l_fill_fmtdesc() when
868 #define V4L2_META_FMT_GENERIC_8 v4l2_fourcc('M', 'E', 'T', '8') /* Generic 8-bit metadata */
869 #define V4L2_META_FMT_GENERIC_CSI2_10 v4l2_fourcc('M', 'C', '1', 'A') /* 10-bit CSI-2 packed 8-bit …
870 #define V4L2_META_FMT_GENERIC_CSI2_12 v4l2_fourcc('M', 'C', '1', 'C') /* 12-bit CSI-2 packed 8-bit …
871 #define V4L2_META_FMT_GENERIC_CSI2_14 v4l2_fourcc('M', 'C', '1', 'E') /* 14-bit CSI-2 packed 8-bit …
872 #define V4L2_META_FMT_GENERIC_CSI2_16 v4l2_fourcc('M', 'C', '1', 'G') /* 16-bit CSI-2 packed 8-bit …
873 #define V4L2_META_FMT_GENERIC_CSI2_20 v4l2_fourcc('M', 'C', '1', 'K') /* 20-bit CSI-2 packed 8-bit …
874 #define V4L2_META_FMT_GENERIC_CSI2_24 v4l2_fourcc('M', 'C', '1', 'O') /* 24-bit CSI-2 packed 8-bit …
914 V4L2_FRMSIZE_TYPE_DISCRETE = 1,
950 V4L2_FRMIVAL_TYPE_DISCRETE = 1,
990 #define V4L2_TC_TYPE_24FPS 1
997 #define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */
1025 #define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
1026 #define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
1027 #define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
1028 #define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */
1029 #define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
1034 * M E M O R Y - M A P P I N G B U F F E R S
1040 * for 64-bit time_t. sparc64 is different from everyone
1042 * second 64-bit word.
1064 #define V4L2_MEMORY_FLAG_NON_COHERENT (1 << 0)
1067 #define V4L2_BUF_CAP_SUPPORTS_MMAP (1 << 0)
1068 #define V4L2_BUF_CAP_SUPPORTS_USERPTR (1 << 1)
1069 #define V4L2_BUF_CAP_SUPPORTS_DMABUF (1 << 2)
1070 #define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3)
1071 #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4)
1072 #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
1073 #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)
1074 #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7)
1075 #define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS (1 << 8)
1078 * struct v4l2_plane - plane info for multi-planar buffers
1094 * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer
1112 * struct v4l2_buffer - video buffer info
1125 * @m.offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP;
1128 * @m.userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR;
1130 * @m.fd: for non-multiplanar buffers with memory == V4L2_MEMORY_DMABUF;
1135 * @length: size in bytes of the buffer (NOT its payload) for single-plane
1137 * planes array for multi-plane buffers
1178 * v4l2_timeval_to_ns - Convert timeval to nanoseconds
1186 return (__u64)tv->tv_sec * 1000000000ULL + tv->tv_usec * 1000; in v4l2_timeval_to_ns()
1197 /* Image is a keyframe (I-frame) */
1199 /* Image is a P-frame */
1201 /* Image is a B-frame */
1231 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor
1259 * O V E R L A Y P R E V I E W
1320 __u32 extendedmode; /* Driver-specific extensions */
1333 __u32 extendedmode; /* Driver-specific extensions */
1354 * struct v4l2_selection - selection info
1357 * defined in v4l2-common.h; V4L2_SEL_TGT_* .
1358 * @flags: constraints flags, defined in v4l2-common.h; V4L2_SEL_FLAG_*.
1376 * A N A L O G V I D E O S T A N D A R D
1383 * include/dt-bindings/display/sdtv-standards.h SDTV_STD_* bit definitions.
1401 #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) /* EIA-J */
1420 makes switch(__u64) to break. So, there's a hack on v4l2-common.c rounding
1424 v4l2-common.c should be fixed.
1433 * "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is
1458 * "Common" PAL - This macro is there to be compatible with the old
1521 * D V B T T I M I N G S
1524 /** struct v4l2_bt_timings - BT.656/BT.1120 timing data
1529 * @pixelclock: Pixel clock in HZ. Ex. 74.25MHz->74250000
1545 * @cea861_vic: VIC code as per the CEA-861 standard.
1584 #define V4L2_DV_INTERLACED 1
1591 #define V4L2_DV_BT_STD_CEA861 (1 << 0) /* CEA-861 Digital TV Profile */
1592 #define V4L2_DV_BT_STD_DMT (1 << 1) /* VESA Discrete Monitor Timings */
1593 #define V4L2_DV_BT_STD_CVT (1 << 2) /* VESA Coordinated Video Timings */
1594 #define V4L2_DV_BT_STD_GTF (1 << 3) /* VESA Generalized Timings Formula */
1595 #define V4L2_DV_BT_STD_SDI (1 << 4) /* SDI Timings */
1603 * bandwidth. This is a read-only flag.
1605 #define V4L2_DV_FL_REDUCED_BLANKING (1 << 0)
1607 * CEA-861 specific: set for CEA-861 formats with a framerate of a multiple
1608 * of six. These formats can be optionally played at 1 / 1.001 speed.
1609 * This is a read-only flag.
1611 #define V4L2_DV_FL_CAN_REDUCE_FPS (1 << 1)
1613 * CEA-861 specific: only valid for video transmitters, the flag is cleared
1617 * with 60 Hz based standards such as NTSC and PAL-M that use a framerate of
1621 #define V4L2_DV_FL_REDUCED_FPS (1 << 2)
1623 * Specific to interlaced formats: if set, then field 1 is really one half-line
1624 * longer and field 2 is really one half-line shorter, so each field has
1625 * exactly the same number of half-lines. Whether half-lines can be detected
1628 #define V4L2_DV_FL_HALF_LINE (1 << 3)
1633 * use the range 16-235) as opposed to 0-255. All formats defined in CEA-861
1636 #define V4L2_DV_FL_IS_CE_VIDEO (1 << 4)
1637 /* Some formats like SMPTE-125M have an interlaced signal with a odd
1641 #define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5)
1647 #define V4L2_DV_FL_HAS_PICTURE_ASPECT (1 << 6)
1650 * Identification Code as per the CEA-861 standard.
1652 #define V4L2_DV_FL_HAS_CEA861_VIC (1 << 7)
1658 #define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8)
1660 * CEA-861 specific: only valid for video receivers.
1665 #define V4L2_DV_FL_CAN_DETECT_REDUCED_FPS (1 << 9)
1669 ((bt)->hfrontporch + (bt)->hsync + (bt)->hbackporch)
1671 ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
1673 ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \
1674 ((bt)->interlaced ? \
1675 ((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0))
1677 ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
1679 /** struct v4l2_dv_timings - DV timings
1695 /** struct v4l2_enum_dv_timings - DV timings enumeration
1698 * v4l-subdev nodes only)
1709 /** struct v4l2_bt_timings_cap - BT.656/BT.1120 timing capabilities
1714 * @min_pixelclock: Pixel clock in HZ. Ex. 74.25MHz->74250000
1715 * @max_pixelclock: Pixel clock in HZ. Ex. 74.25MHz->74250000
1733 #define V4L2_DV_BT_CAP_INTERLACED (1 << 0)
1735 #define V4L2_DV_BT_CAP_PROGRESSIVE (1 << 1)
1737 #define V4L2_DV_BT_CAP_REDUCED_BLANKING (1 << 2)
1739 #define V4L2_DV_BT_CAP_CUSTOM (1 << 3)
1741 /** struct v4l2_dv_timings_cap - DV timings capabilities
1744 * v4l-subdev nodes only)
1759 * V I D E O I N P U T S
1774 #define V4L2_INPUT_TYPE_TUNER 1
1778 /* field 'status' - general */
1783 /* field 'status' - sensor orientation */
1788 /* field 'status' - analog */
1789 #define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */
1791 #define V4L2_IN_ST_NO_V_LOCK 0x00000400 /* No vertical sync lock */
1792 #define V4L2_IN_ST_NO_STD_LOCK 0x00000800 /* No standard format lock */
1794 /* field 'status' - digital */
1795 #define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */
1796 #define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */
1799 /* field 'status' - VCR and set-top box */
1811 * V I D E O O U T P U T S
1824 #define V4L2_OUTPUT_TYPE_MODULATOR 1
1845 __u32 reserved2[1];
1894 __u32 reserved[1];
1910 V4L2_CTRL_TYPE_INTEGER = 1,
1917 V4L2_CTRL_TYPE_BITMASK = 8,
2019 /* User-class control IDs defined by V4L2 */
2089 __u32 reserved[8];
2092 #define V4L2_BAND_MODULATION_VSB (1 << 1)
2093 #define V4L2_BAND_MODULATION_FM (1 << 2)
2094 #define V4L2_BAND_MODULATION_AM (1 << 3)
2130 #define V4L2_RDS_BLOCK_B 1
2166 * M P E G S E R V I C E S
2168 #if 1
2170 #define V4L2_ENC_IDX_FRAME_P (1)
2192 #define V4L2_ENC_CMD_STOP (1)
2197 #define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
2204 __u32 data[8];
2211 #define V4L2_DEC_CMD_STOP (1)
2217 #define V4L2_DEC_CMD_START_MUTE_AUDIO (1 << 0)
2220 #define V4L2_DEC_CMD_PAUSE_TO_BLACK (1 << 0)
2223 #define V4L2_DEC_CMD_STOP_TO_BLACK (1 << 0)
2224 #define V4L2_DEC_CMD_STOP_IMMEDIATELY (1 << 1)
2228 /* The decoder has no special format requirements */
2231 #define V4L2_DEC_START_FMT_GOP (1)
2245 1 specifies forward single stepping,
2246 -1 specifies backward single stepping,
2247 >1: playback at speed/1000 of the normal speed,
2248 <-1: reverse playback at (-speed/1000) of the normal speed. */
2262 * D A T A S E R V I C E S ( V B I )
2269 __u32 sampling_rate; /* in 1 Hz */
2280 #define V4L2_VBI_UNSYNC (1 << 0)
2281 #define V4L2_VBI_INTERLACED (1 << 1)
2283 /* ITU-R start lines for each field */
2284 #define V4L2_VBI_ITU_525_F1_START (1)
2286 #define V4L2_VBI_ITU_625_F1_START (1)
2298 /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
2299 service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
2300 (equals frame lines 313-336 for 625 line video
2301 standards, 263-286 for 525 line standards) */
2308 (WST), defined on ITU-R BT.653-2 */
2312 /* Closed Caption, defined on EIA-608 */
2314 /* Wide Screen System, defined on ITU-R BT1119.1 */
2322 /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
2323 service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
2324 (equals frame lines 313-336 for 625 line video
2325 standards, 263-286 for 525 line standards) */
2333 __u32 field; /* 0: first field, 1: second field */
2334 __u32 line; /* 1-23 */
2346 * Structure of payload contained in an MPEG 2 Private Stream 1 PES Packet in an
2347 * MPEG-2 Program Pack that contains V4L2_MPEG_STREAM_VBI_FMT_IVTV Sliced VBI
2350 * Note, the MPEG-2 Program Pack and Private Stream 1 PES packet header
2351 * definitions are not included here. See the MPEG-2 specifications for details
2356 #define V4L2_MPEG_VBI_IVTV_TELETEXT_B (1)
2391 * struct v4l2_plane_pix_format - additional, per-plane format definition
2405 * struct v4l2_pix_format_mplane - multiplanar format definition
2411 * @plane_fmt: per-plane information
2440 * struct v4l2_sdr_format - SDR format definition
2452 * struct v4l2_meta_format - metadata format definition
2471 * struct v4l2_format - stream data format
2492 __u8 raw_data[200]; /* user-defined */
2496 /* Stream type-dependent parameters
2503 __u8 raw_data[200]; /* user-defined */
2508 * E V E N T S
2512 #define V4L2_EVENT_VSYNC 1
2527 #define V4L2_EVENT_CTRL_CH_VALUE (1 << 0)
2528 #define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1)
2529 #define V4L2_EVENT_CTRL_CH_RANGE (1 << 2)
2530 #define V4L2_EVENT_CTRL_CH_DIMENSIONS (1 << 3)
2550 #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0)
2556 #define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0)
2559 * struct v4l2_event_motion_det - motion detection event
2589 __u32 reserved[8];
2592 #define V4L2_EVENT_SUB_FL_SEND_INITIAL (1 << 0)
2593 #define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK (1 << 1)
2603 * A D V A N C E D D E B U G G I N G
2614 /* The following four defines are no longer in use */
2616 #define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */
2617 #define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
2635 #define V4L2_CHIP_FL_READABLE (1 << 0)
2636 #define V4L2_CHIP_FL_WRITABLE (1 << 1)
2647 * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
2674 * struct v4l2_remove_buffers - VIDIOC_REMOVE_BUFS argument
2688 * I O C T L C O D E S F O R V I D E O D E V I C E S
2691 #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability)
2692 #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc)
2693 #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format)
2694 #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format)
2695 #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers)
2696 #define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer)
2697 #define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer)
2698 #define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer)
2699 #define VIDIOC_OVERLAY _IOW('V', 14, int)
2700 #define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer)
2701 #define VIDIOC_EXPBUF _IOWR('V', 16, struct v4l2_exportbuffer)
2702 #define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer)
2703 #define VIDIOC_STREAMON _IOW('V', 18, int)
2704 #define VIDIOC_STREAMOFF _IOW('V', 19, int)
2705 #define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm)
2706 #define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm)
2707 #define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id)
2708 #define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id)
2709 #define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard)
2710 #define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input)
2711 #define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control)
2712 #define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control)
2713 #define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner)
2714 #define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner)
2715 #define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio)
2716 #define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio)
2717 #define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl)
2718 #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu)
2719 #define VIDIOC_G_INPUT _IOR('V', 38, int)
2720 #define VIDIOC_S_INPUT _IOWR('V', 39, int)
2721 #define VIDIOC_G_EDID _IOWR('V', 40, struct v4l2_edid)
2722 #define VIDIOC_S_EDID _IOWR('V', 41, struct v4l2_edid)
2723 #define VIDIOC_G_OUTPUT _IOR('V', 46, int)
2724 #define VIDIOC_S_OUTPUT _IOWR('V', 47, int)
2725 #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output)
2726 #define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout)
2727 #define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout)
2728 #define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator)
2729 #define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator)
2730 #define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency)
2731 #define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency)
2732 #define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap)
2733 #define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop)
2734 #define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop)
2735 #define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression)
2736 #define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression)
2737 #define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id)
2738 #define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format)
2739 #define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio)
2740 #define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout)
2741 #define VIDIOC_G_PRIORITY _IOR('V', 67, __u32) /* enum v4l2_priority */
2742 #define VIDIOC_S_PRIORITY _IOW('V', 68, __u32) /* enum v4l2_priority */
2743 #define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap)
2744 #define VIDIOC_LOG_STATUS _IO('V', 70)
2745 #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls)
2746 #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls)
2747 #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls)
2748 #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
2749 #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
2750 #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx)
2751 #define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd)
2752 #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd)
2759 #define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_dbg_register)
2760 #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
2762 #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
2763 #define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
2764 #define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
2765 #define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
2766 #define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
2767 #define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
2768 #define VIDIOC_CREATE_BUFS _IOWR('V', 92, struct v4l2_create_buffers)
2769 #define VIDIOC_PREPARE_BUF _IOWR('V', 93, struct v4l2_buffer)
2770 #define VIDIOC_G_SELECTION _IOWR('V', 94, struct v4l2_selection)
2771 #define VIDIOC_S_SELECTION _IOWR('V', 95, struct v4l2_selection)
2772 #define VIDIOC_DECODER_CMD _IOWR('V', 96, struct v4l2_decoder_cmd)
2773 #define VIDIOC_TRY_DECODER_CMD _IOWR('V', 97, struct v4l2_decoder_cmd)
2774 #define VIDIOC_ENUM_DV_TIMINGS _IOWR('V', 98, struct v4l2_enum_dv_timings)
2775 #define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
2776 #define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
2777 #define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band)
2783 #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
2785 #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl)
2786 #define VIDIOC_REMOVE_BUFS _IOWR('V', 104, struct v4l2_remove_buffers)
2790 drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */
2792 #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */