aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/videodev2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/videodev2.h')
-rw-r--r--include/uapi/linux/videodev2.h111
1 files changed, 26 insertions, 85 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 234d1d870914..f40b41c7e108 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -72,27 +72,6 @@
72#define VIDEO_MAX_FRAME 32 72#define VIDEO_MAX_FRAME 32
73#define VIDEO_MAX_PLANES 8 73#define VIDEO_MAX_PLANES 8
74 74
75#ifndef __KERNEL__
76
77/* These defines are V4L1 specific and should not be used with the V4L2 API!
78 They will be removed from this header in the future. */
79
80#define VID_TYPE_CAPTURE 1 /* Can capture */
81#define VID_TYPE_TUNER 2 /* Can tune */
82#define VID_TYPE_TELETEXT 4 /* Does teletext */
83#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
84#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
85#define VID_TYPE_CLIPPING 32 /* Can clip */
86#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
87#define VID_TYPE_SCALES 128 /* Scalable */
88#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
89#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
90#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
91#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
92#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
93#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
94#endif
95
96/* 75/*
97 * M I S C E L L A N E O U S 76 * M I S C E L L A N E O U S
98 */ 77 */
@@ -705,6 +684,7 @@ struct v4l2_buffer {
705#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000 684#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000
706#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 685#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000
707#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 686#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000
687#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000
708 688
709/** 689/**
710 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor 690 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor
@@ -980,52 +960,6 @@ struct v4l2_standard {
980 __u32 reserved[4]; 960 __u32 reserved[4];
981}; 961};
982 962
983/* The DV Preset API is deprecated in favor of the DV Timings API.
984 New drivers shouldn't use this anymore! */
985
986/*
987 * V I D E O T I M I N G S D V P R E S E T
988 */
989struct v4l2_dv_preset {
990 __u32 preset;
991 __u32 reserved[4];
992};
993
994/*
995 * D V P R E S E T S E N U M E R A T I O N
996 */
997struct v4l2_dv_enum_preset {
998 __u32 index;
999 __u32 preset;
1000 __u8 name[32]; /* Name of the preset timing */
1001 __u32 width;
1002 __u32 height;
1003 __u32 reserved[4];
1004};
1005
1006/*
1007 * D V P R E S E T V A L U E S
1008 */
1009#define V4L2_DV_INVALID 0
1010#define V4L2_DV_480P59_94 1 /* BT.1362 */
1011#define V4L2_DV_576P50 2 /* BT.1362 */
1012#define V4L2_DV_720P24 3 /* SMPTE 296M */
1013#define V4L2_DV_720P25 4 /* SMPTE 296M */
1014#define V4L2_DV_720P30 5 /* SMPTE 296M */
1015#define V4L2_DV_720P50 6 /* SMPTE 296M */
1016#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
1017#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
1018#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
1019#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
1020#define V4L2_DV_1080I25 11 /* BT.1120 */
1021#define V4L2_DV_1080I50 12 /* SMPTE 296M */
1022#define V4L2_DV_1080I60 13 /* SMPTE 296M */
1023#define V4L2_DV_1080P24 14 /* SMPTE 296M */
1024#define V4L2_DV_1080P25 15 /* SMPTE 296M */
1025#define V4L2_DV_1080P30 16 /* SMPTE 296M */
1026#define V4L2_DV_1080P50 17 /* BT.1120 */
1027#define V4L2_DV_1080P60 18 /* BT.1120 */
1028
1029/* 963/*
1030 * D V B T T I M I N G S 964 * D V B T T I M I N G S
1031 */ 965 */
@@ -1119,7 +1053,7 @@ struct v4l2_bt_timings {
1119 longer and field 2 is really one half-line shorter, so each field has 1053 longer and field 2 is really one half-line shorter, so each field has
1120 exactly the same number of half-lines. Whether half-lines can be detected 1054 exactly the same number of half-lines. Whether half-lines can be detected
1121 or used depends on the hardware. */ 1055 or used depends on the hardware. */
1122#define V4L2_DV_FL_HALF_LINE (1 << 0) 1056#define V4L2_DV_FL_HALF_LINE (1 << 3)
1123 1057
1124 1058
1125/** struct v4l2_dv_timings - DV timings 1059/** struct v4l2_dv_timings - DV timings
@@ -1239,7 +1173,6 @@ struct v4l2_input {
1239#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ 1173#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
1240 1174
1241/* capabilities flags */ 1175/* capabilities flags */
1242#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
1243#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ 1176#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
1244#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ 1177#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */
1245#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ 1178#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
@@ -1263,7 +1196,6 @@ struct v4l2_output {
1263#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 1196#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
1264 1197
1265/* capabilities flags */ 1198/* capabilities flags */
1266#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
1267#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ 1199#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
1268#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ 1200#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */
1269#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ 1201#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
@@ -1854,10 +1786,12 @@ struct v4l2_event_subscription {
1854 1786
1855/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ 1787/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
1856 1788
1857#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ 1789#define V4L2_CHIP_MATCH_BRIDGE 0 /* Match against chip ID on the bridge (0 for the bridge) */
1858#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */ 1790#define V4L2_CHIP_MATCH_HOST V4L2_CHIP_MATCH_BRIDGE
1859#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ 1791#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */
1860#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */ 1792#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
1793#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */
1794#define V4L2_CHIP_MATCH_SUBDEV 4 /* Match against subdev index */
1861 1795
1862struct v4l2_dbg_match { 1796struct v4l2_dbg_match {
1863 __u32 type; /* Match type */ 1797 __u32 type; /* Match type */
@@ -1881,6 +1815,17 @@ struct v4l2_dbg_chip_ident {
1881 __u32 revision; /* chip revision, chip specific */ 1815 __u32 revision; /* chip revision, chip specific */
1882} __attribute__ ((packed)); 1816} __attribute__ ((packed));
1883 1817
1818#define V4L2_CHIP_FL_READABLE (1 << 0)
1819#define V4L2_CHIP_FL_WRITABLE (1 << 1)
1820
1821/* VIDIOC_DBG_G_CHIP_INFO */
1822struct v4l2_dbg_chip_info {
1823 struct v4l2_dbg_match match;
1824 char name[32];
1825 __u32 flags;
1826 __u32 reserved[32];
1827} __attribute__ ((packed));
1828
1884/** 1829/**
1885 * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument 1830 * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
1886 * @index: on return, index of the first created buffer 1831 * @index: on return, index of the first created buffer
@@ -1958,15 +1903,12 @@ struct v4l2_create_buffers {
1958#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls) 1903#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls)
1959#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls) 1904#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls)
1960#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls) 1905#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls)
1961#if 1
1962#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum) 1906#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
1963#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum) 1907#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
1964#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) 1908#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx)
1965#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) 1909#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd)
1966#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) 1910#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd)
1967#endif
1968 1911
1969#if 1
1970/* Experimental, meant for debugging, testing and internal use. 1912/* Experimental, meant for debugging, testing and internal use.
1971 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. 1913 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
1972 You must be root to use these ioctls. Never use these in applications! */ 1914 You must be root to use these ioctls. Never use these in applications! */
@@ -1974,18 +1916,13 @@ struct v4l2_create_buffers {
1974#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register) 1916#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
1975 1917
1976/* Experimental, meant for debugging, testing and internal use. 1918/* Experimental, meant for debugging, testing and internal use.
1977 Never use this ioctl in applications! */ 1919 Never use this ioctl in applications!
1920 Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_INFO and
1921 will go away in the future. */
1978#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) 1922#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
1979#endif
1980 1923
1981#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) 1924#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
1982 1925
1983/* These four DV Preset ioctls are deprecated in favor of the DV Timings
1984 ioctls. */
1985#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct v4l2_dv_enum_preset)
1986#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct v4l2_dv_preset)
1987#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct v4l2_dv_preset)
1988#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset)
1989#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) 1926#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
1990#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) 1927#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
1991#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) 1928#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
@@ -2016,6 +1953,10 @@ struct v4l2_create_buffers {
2016 versions. */ 1953 versions. */
2017#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band) 1954#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band)
2018 1955
1956/* Experimental, meant for debugging, testing and internal use.
1957 Never use these in applications! */
1958#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
1959
2019/* Reminder: when adding new ioctls please add support for them to 1960/* Reminder: when adding new ioctls please add support for them to
2020 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1961 drivers/media/video/v4l2-compat-ioctl32.c as well! */
2021 1962