aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/videodev2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r--include/linux/videodev2.h76
1 files changed, 65 insertions, 11 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 3793d168b44d..61490c6dcdbd 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -160,16 +160,6 @@ enum v4l2_buf_type {
160 V4L2_BUF_TYPE_PRIVATE = 0x80, 160 V4L2_BUF_TYPE_PRIVATE = 0x80,
161}; 161};
162 162
163enum v4l2_ctrl_type {
164 V4L2_CTRL_TYPE_INTEGER = 1,
165 V4L2_CTRL_TYPE_BOOLEAN = 2,
166 V4L2_CTRL_TYPE_MENU = 3,
167 V4L2_CTRL_TYPE_BUTTON = 4,
168 V4L2_CTRL_TYPE_INTEGER64 = 5,
169 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
170 V4L2_CTRL_TYPE_STRING = 7,
171};
172
173enum v4l2_tuner_type { 163enum v4l2_tuner_type {
174 V4L2_TUNER_RADIO = 1, 164 V4L2_TUNER_RADIO = 1,
175 V4L2_TUNER_ANALOG_TV = 2, 165 V4L2_TUNER_ANALOG_TV = 2,
@@ -287,6 +277,7 @@ struct v4l2_pix_format {
287#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ 277#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
288#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ 278#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
289#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ 279#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
280#define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */
290#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ 281#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
291#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ 282#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
292#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ 283#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
@@ -294,6 +285,8 @@ struct v4l2_pix_format {
294 285
295/* Grey formats */ 286/* Grey formats */
296#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ 287#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
288#define V4L2_PIX_FMT_Y4 v4l2_fourcc('Y', '0', '4', ' ') /* 4 Greyscale */
289#define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */
297#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ 290#define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */
298#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ 291#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
299 292
@@ -369,6 +362,7 @@ struct v4l2_pix_format {
369#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ 362#define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */
370#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ 363#define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */
371#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */ 364#define V4L2_PIX_FMT_STV0680 v4l2_fourcc('S', '6', '8', '0') /* stv0680 bayer */
365#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
372 366
373/* 367/*
374 * F O R M A T E N U M E R A T I O N 368 * F O R M A T E N U M E R A T I O N
@@ -549,6 +543,8 @@ struct v4l2_buffer {
549#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ 543#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */
550#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ 544#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */
551#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ 545#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */
546/* Buffer is ready, but the data contained within is corrupted. */
547#define V4L2_BUF_FLAG_ERROR 0x0040
552#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ 548#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */
553#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ 549#define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */
554 550
@@ -939,6 +935,16 @@ struct v4l2_ext_controls {
939#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 935#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
940#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) 936#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
941 937
938enum v4l2_ctrl_type {
939 V4L2_CTRL_TYPE_INTEGER = 1,
940 V4L2_CTRL_TYPE_BOOLEAN = 2,
941 V4L2_CTRL_TYPE_MENU = 3,
942 V4L2_CTRL_TYPE_BUTTON = 4,
943 V4L2_CTRL_TYPE_INTEGER64 = 5,
944 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
945 V4L2_CTRL_TYPE_STRING = 7,
946};
947
942/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ 948/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
943struct v4l2_queryctrl { 949struct v4l2_queryctrl {
944 __u32 id; 950 __u32 id;
@@ -1023,14 +1029,24 @@ enum v4l2_colorfx {
1023 V4L2_COLORFX_NONE = 0, 1029 V4L2_COLORFX_NONE = 0,
1024 V4L2_COLORFX_BW = 1, 1030 V4L2_COLORFX_BW = 1,
1025 V4L2_COLORFX_SEPIA = 2, 1031 V4L2_COLORFX_SEPIA = 2,
1032 V4L2_COLORFX_NEGATIVE = 3,
1033 V4L2_COLORFX_EMBOSS = 4,
1034 V4L2_COLORFX_SKETCH = 5,
1035 V4L2_COLORFX_SKY_BLUE = 6,
1036 V4L2_COLORFX_GRASS_GREEN = 7,
1037 V4L2_COLORFX_SKIN_WHITEN = 8,
1038 V4L2_COLORFX_VIVID = 9,
1026}; 1039};
1027#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) 1040#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32)
1028#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) 1041#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33)
1029 1042
1030#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) 1043#define V4L2_CID_ROTATE (V4L2_CID_BASE+34)
1031#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) 1044#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35)
1045
1046#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36)
1047
1032/* last CID + 1 */ 1048/* last CID + 1 */
1033#define V4L2_CID_LASTP1 (V4L2_CID_BASE+36) 1049#define V4L2_CID_LASTP1 (V4L2_CID_BASE+37)
1034 1050
1035/* MPEG-class control IDs defined by V4L2 */ 1051/* MPEG-class control IDs defined by V4L2 */
1036#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 1052#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
@@ -1276,6 +1292,9 @@ enum v4l2_exposure_auto_type {
1276 1292
1277#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) 1293#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1278 1294
1295#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17)
1296#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18)
1297
1279/* FM Modulator class control IDs */ 1298/* FM Modulator class control IDs */
1280#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) 1299#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
1281#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) 1300#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
@@ -1621,6 +1640,38 @@ struct v4l2_streamparm {
1621}; 1640};
1622 1641
1623/* 1642/*
1643 * E V E N T S
1644 */
1645
1646#define V4L2_EVENT_ALL 0
1647#define V4L2_EVENT_VSYNC 1
1648#define V4L2_EVENT_EOS 2
1649#define V4L2_EVENT_PRIVATE_START 0x08000000
1650
1651/* Payload for V4L2_EVENT_VSYNC */
1652struct v4l2_event_vsync {
1653 /* Can be V4L2_FIELD_ANY, _NONE, _TOP or _BOTTOM */
1654 __u8 field;
1655} __attribute__ ((packed));
1656
1657struct v4l2_event {
1658 __u32 type;
1659 union {
1660 struct v4l2_event_vsync vsync;
1661 __u8 data[64];
1662 } u;
1663 __u32 pending;
1664 __u32 sequence;
1665 struct timespec timestamp;
1666 __u32 reserved[9];
1667};
1668
1669struct v4l2_event_subscription {
1670 __u32 type;
1671 __u32 reserved[7];
1672};
1673
1674/*
1624 * A D V A N C E D D E B U G G I N G 1675 * A D V A N C E D D E B U G G I N G
1625 * 1676 *
1626 * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS! 1677 * NOTE: EXPERIMENTAL API, NEVER RELY ON THIS IN APPLICATIONS!
@@ -1742,6 +1793,9 @@ struct v4l2_dbg_chip_ident {
1742#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset) 1793#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset)
1743#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) 1794#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
1744#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) 1795#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
1796#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
1797#define VIDIOC_SUBSCRIBE_EVENT _IOW('V', 90, struct v4l2_event_subscription)
1798#define VIDIOC_UNSUBSCRIBE_EVENT _IOW('V', 91, struct v4l2_event_subscription)
1745 1799
1746/* Reminder: when adding new ioctls please add support for them to 1800/* Reminder: when adding new ioctls please add support for them to
1747 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1801 drivers/media/video/v4l2-compat-ioctl32.c as well! */