aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 19:36:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-05 19:36:30 -0400
commitf4d33337eac4007793ca11fd1ab68d91ce7aa762 (patch)
treeb775ad213179822225a3e1c1a27e4cc16f8aff68 /include/uapi/linux
parent91c2ff7708d4edf73ef1f0abb3ea4a44b4b0cf1d (diff)
parent0f3bf3dc1ca394a8385079a5653088672b65c5c4 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - removal of sn9c102. This device driver was replaced a long time ago by gspca - solo6x10 and go7007 webcam drivers moved from staging into mainstream. They were waiting for an API to allow setting the image detection matrix - SDR drivers moved from staging into mainstream: sdr-msi3101 (renamed as msi2500) and rtl2832 - added SDR driver for airspy - added demux driver: si2165 - rework at several RC subsystem, making the code for RC-5 SZ variant to be added at the standard RC5 decoder - added decoder for the XMP IR protocol - tuner driver moved from staging into mainstream: msi3101 (renamed as msi001) - added documentation for some additional SDR pixfmt - some device tree bindings documented - added support for exynos3250 at s5p-jpeg - remove the obsolete, unmaintained and broken mx1_camera driver - added support for remote controllers at au0828 driver - added a RC driver: sunxi-cir - several driver fixes, enhancements and cleanups. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (455 commits) [media] cx23885: fix UNSET/TUNER_ABSENT confusion [media] coda: fix build error by making reset control optional [media] radio-miropcm20: fix sparse NULL pointer warning [media] MAINTAINERS: Update go7007 pattern [media] MAINTAINERS: Update solo6x10 patterns [media] media: atmel-isi: add primary DT support [media] media: atmel-isi: convert the pdata from pointer to structure [media] media: atmel-isi: add v4l2 async probe support [media] rcar_vin: add devicetree support [media] media: pxa_camera device-tree support [media] media: mt9m111: add device-tree suppport [media] soc_camera: add support for dt binding soc_camera drivers [media] media: soc_camera: pxa_camera documentation device-tree support [media] media: mt9m111: add device-tree documentation [media] s5p-mfc: remove unnecessary calling to function video_devdata() [media] s5p-jpeg: add chroma subsampling adjustment for Exynos3250 [media] s5p-jpeg: Prevent erroneous downscaling for Exynos3250 SoC [media] s5p-jpeg: Assure proper crop rectangle initialization [media] s5p-jpeg: fix g_selection op [media] s5p-jpeg: Adjust jpeg_bound_align_image to Exynos3250 needs ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/v4l2-controls.h32
-rw-r--r--include/uapi/linux/videodev2.h101
2 files changed, 128 insertions, 5 deletions
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 2ac5597f3ee1..e946e43fb8d5 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -61,6 +61,7 @@
61#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */ 61#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */
62#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */ 62#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */
63#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ 63#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */
64#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */
64 65
65/* User-class control IDs */ 66/* User-class control IDs */
66 67
@@ -756,6 +757,15 @@ enum v4l2_auto_focus_range {
756#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) 757#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
757#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) 758#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
758#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) 759#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
760#define V4L2_CID_RDS_TX_MONO_STEREO (V4L2_CID_FM_TX_CLASS_BASE + 7)
761#define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (V4L2_CID_FM_TX_CLASS_BASE + 8)
762#define V4L2_CID_RDS_TX_COMPRESSED (V4L2_CID_FM_TX_CLASS_BASE + 9)
763#define V4L2_CID_RDS_TX_DYNAMIC_PTY (V4L2_CID_FM_TX_CLASS_BASE + 10)
764#define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_TX_CLASS_BASE + 11)
765#define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (V4L2_CID_FM_TX_CLASS_BASE + 12)
766#define V4L2_CID_RDS_TX_MUSIC_SPEECH (V4L2_CID_FM_TX_CLASS_BASE + 13)
767#define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (V4L2_CID_FM_TX_CLASS_BASE + 14)
768#define V4L2_CID_RDS_TX_ALT_FREQS (V4L2_CID_FM_TX_CLASS_BASE + 15)
759 769
760#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) 770#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
761#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) 771#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
@@ -900,6 +910,12 @@ enum v4l2_deemphasis {
900}; 910};
901 911
902#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2) 912#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2)
913#define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3)
914#define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4)
915#define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5)
916#define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6)
917#define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7)
918#define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8)
903 919
904#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900) 920#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900)
905#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1) 921#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1)
@@ -914,4 +930,20 @@ enum v4l2_deemphasis {
914#define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62) 930#define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62)
915#define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91) 931#define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91)
916 932
933
934/* Detection-class control IDs defined by V4L2 */
935#define V4L2_CID_DETECT_CLASS_BASE (V4L2_CTRL_CLASS_DETECT | 0x900)
936#define V4L2_CID_DETECT_CLASS (V4L2_CTRL_CLASS_DETECT | 1)
937
938#define V4L2_CID_DETECT_MD_MODE (V4L2_CID_DETECT_CLASS_BASE + 1)
939enum v4l2_detect_md_mode {
940 V4L2_DETECT_MD_MODE_DISABLED = 0,
941 V4L2_DETECT_MD_MODE_GLOBAL = 1,
942 V4L2_DETECT_MD_MODE_THRESHOLD_GRID = 2,
943 V4L2_DETECT_MD_MODE_REGION_GRID = 3,
944};
945#define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (V4L2_CID_DETECT_CLASS_BASE + 2)
946#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3)
947#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4)
948
917#endif 949#endif
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 168ff507bf75..778a3298fb34 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -124,6 +124,10 @@ enum v4l2_field {
124 (field) == V4L2_FIELD_INTERLACED_BT ||\ 124 (field) == V4L2_FIELD_INTERLACED_BT ||\
125 (field) == V4L2_FIELD_SEQ_TB ||\ 125 (field) == V4L2_FIELD_SEQ_TB ||\
126 (field) == V4L2_FIELD_SEQ_BT) 126 (field) == V4L2_FIELD_SEQ_BT)
127#define V4L2_FIELD_HAS_T_OR_B(field) \
128 ((field) == V4L2_FIELD_BOTTOM ||\
129 (field) == V4L2_FIELD_TOP ||\
130 (field) == V4L2_FIELD_ALTERNATE)
127 131
128enum v4l2_buf_type { 132enum v4l2_buf_type {
129 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, 133 V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
@@ -268,6 +272,7 @@ struct v4l2_capability {
268#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */ 272#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
269 273
270#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ 274#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */
275#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */
271 276
272#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ 277#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
273#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ 278#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
@@ -287,6 +292,7 @@ struct v4l2_pix_format {
287 __u32 sizeimage; 292 __u32 sizeimage;
288 __u32 colorspace; /* enum v4l2_colorspace */ 293 __u32 colorspace; /* enum v4l2_colorspace */
289 __u32 priv; /* private data, depends on pixelformat */ 294 __u32 priv; /* private data, depends on pixelformat */
295 __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
290}; 296};
291 297
292/* Pixel format FOURCC depth Description */ 298/* Pixel format FOURCC depth Description */
@@ -294,7 +300,11 @@ struct v4l2_pix_format {
294/* RGB formats */ 300/* RGB formats */
295#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ 301#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
296#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ 302#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
303#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */
304#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */
297#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ 305#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
306#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */
307#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */
298#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ 308#define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
299#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ 309#define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
300#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ 310#define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
@@ -302,7 +312,11 @@ struct v4l2_pix_format {
302#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ 312#define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
303#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ 313#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
304#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ 314#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
315#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */
316#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */
305#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ 317#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
318#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */
319#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
306 320
307/* Grey formats */ 321/* Grey formats */
308#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ 322#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
@@ -439,6 +453,15 @@ struct v4l2_pix_format {
439/* SDR formats - used only for Software Defined Radio devices */ 453/* SDR formats - used only for Software Defined Radio devices */
440#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */ 454#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
441#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */ 455#define V4L2_SDR_FMT_CU16LE v4l2_fourcc('C', 'U', '1', '6') /* IQ u16le */
456#define V4L2_SDR_FMT_CS8 v4l2_fourcc('C', 'S', '0', '8') /* complex s8 */
457#define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */
458#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */
459
460/* priv field value to indicates that subsequent fields are valid. */
461#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
462
463/* Flags */
464#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001
442 465
443/* 466/*
444 * F O R M A T E N U M E R A T I O N 467 * F O R M A T E N U M E R A T I O N
@@ -744,7 +767,16 @@ struct v4l2_framebuffer {
744/* FIXME: in theory we should pass something like PCI device + memory 767/* FIXME: in theory we should pass something like PCI device + memory
745 * region + offset instead of some physical address */ 768 * region + offset instead of some physical address */
746 void *base; 769 void *base;
747 struct v4l2_pix_format fmt; 770 struct {
771 __u32 width;
772 __u32 height;
773 __u32 pixelformat;
774 __u32 field; /* enum v4l2_field */
775 __u32 bytesperline; /* for padding, zero if unused */
776 __u32 sizeimage;
777 __u32 colorspace; /* enum v4l2_colorspace */
778 __u32 priv; /* reserved field, set to 0 */
779 } fmt;
748}; 780};
749/* Flags for the 'capability' field. Read only */ 781/* Flags for the 'capability' field. Read only */
750#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 782#define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
@@ -1254,6 +1286,10 @@ struct v4l2_ext_control {
1254 __s32 value; 1286 __s32 value;
1255 __s64 value64; 1287 __s64 value64;
1256 char *string; 1288 char *string;
1289 __u8 *p_u8;
1290 __u16 *p_u16;
1291 __u32 *p_u32;
1292 void *ptr;
1257 }; 1293 };
1258} __attribute__ ((packed)); 1294} __attribute__ ((packed));
1259 1295
@@ -1268,6 +1304,7 @@ struct v4l2_ext_controls {
1268#define V4L2_CTRL_ID_MASK (0x0fffffff) 1304#define V4L2_CTRL_ID_MASK (0x0fffffff)
1269#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 1305#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
1270#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) 1306#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
1307#define V4L2_CTRL_MAX_DIMS (4)
1271 1308
1272enum v4l2_ctrl_type { 1309enum v4l2_ctrl_type {
1273 V4L2_CTRL_TYPE_INTEGER = 1, 1310 V4L2_CTRL_TYPE_INTEGER = 1,
@@ -1278,7 +1315,13 @@ enum v4l2_ctrl_type {
1278 V4L2_CTRL_TYPE_CTRL_CLASS = 6, 1315 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
1279 V4L2_CTRL_TYPE_STRING = 7, 1316 V4L2_CTRL_TYPE_STRING = 7,
1280 V4L2_CTRL_TYPE_BITMASK = 8, 1317 V4L2_CTRL_TYPE_BITMASK = 8,
1281 V4L2_CTRL_TYPE_INTEGER_MENU = 9, 1318 V4L2_CTRL_TYPE_INTEGER_MENU = 9,
1319
1320 /* Compound types are >= 0x0100 */
1321 V4L2_CTRL_COMPOUND_TYPES = 0x0100,
1322 V4L2_CTRL_TYPE_U8 = 0x0100,
1323 V4L2_CTRL_TYPE_U16 = 0x0101,
1324 V4L2_CTRL_TYPE_U32 = 0x0102,
1282}; 1325};
1283 1326
1284/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ 1327/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
@@ -1294,6 +1337,23 @@ struct v4l2_queryctrl {
1294 __u32 reserved[2]; 1337 __u32 reserved[2];
1295}; 1338};
1296 1339
1340/* Used in the VIDIOC_QUERY_EXT_CTRL ioctl for querying extended controls */
1341struct v4l2_query_ext_ctrl {
1342 __u32 id;
1343 __u32 type;
1344 char name[32];
1345 __s64 minimum;
1346 __s64 maximum;
1347 __u64 step;
1348 __s64 default_value;
1349 __u32 flags;
1350 __u32 elem_size;
1351 __u32 elems;
1352 __u32 nr_of_dims;
1353 __u32 dims[V4L2_CTRL_MAX_DIMS];
1354 __u32 reserved[32];
1355};
1356
1297/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ 1357/* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */
1298struct v4l2_querymenu { 1358struct v4l2_querymenu {
1299 __u32 id; 1359 __u32 id;
@@ -1314,9 +1374,11 @@ struct v4l2_querymenu {
1314#define V4L2_CTRL_FLAG_SLIDER 0x0020 1374#define V4L2_CTRL_FLAG_SLIDER 0x0020
1315#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040 1375#define V4L2_CTRL_FLAG_WRITE_ONLY 0x0040
1316#define V4L2_CTRL_FLAG_VOLATILE 0x0080 1376#define V4L2_CTRL_FLAG_VOLATILE 0x0080
1377#define V4L2_CTRL_FLAG_HAS_PAYLOAD 0x0100
1317 1378
1318/* Query flag, to be ORed with the control ID */ 1379/* Query flags, to be ORed with the control ID */
1319#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 1380#define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000
1381#define V4L2_CTRL_FLAG_NEXT_COMPOUND 0x40000000
1320 1382
1321/* User-class control IDs defined by V4L2 */ 1383/* User-class control IDs defined by V4L2 */
1322#define V4L2_CID_MAX_CTRLS 1024 1384#define V4L2_CID_MAX_CTRLS 1024
@@ -1582,6 +1644,12 @@ struct v4l2_vbi_format {
1582#define V4L2_VBI_UNSYNC (1 << 0) 1644#define V4L2_VBI_UNSYNC (1 << 0)
1583#define V4L2_VBI_INTERLACED (1 << 1) 1645#define V4L2_VBI_INTERLACED (1 << 1)
1584 1646
1647/* ITU-R start lines for each field */
1648#define V4L2_VBI_ITU_525_F1_START (1)
1649#define V4L2_VBI_ITU_525_F2_START (264)
1650#define V4L2_VBI_ITU_625_F1_START (1)
1651#define V4L2_VBI_ITU_625_F2_START (314)
1652
1585/* Sliced VBI 1653/* Sliced VBI
1586 * 1654 *
1587 * This implements is a proposal V4L2 API to allow SLICED VBI 1655 * This implements is a proposal V4L2 API to allow SLICED VBI
@@ -1705,6 +1773,7 @@ struct v4l2_plane_pix_format {
1705 * @colorspace: enum v4l2_colorspace; supplemental to pixelformat 1773 * @colorspace: enum v4l2_colorspace; supplemental to pixelformat
1706 * @plane_fmt: per-plane information 1774 * @plane_fmt: per-plane information
1707 * @num_planes: number of planes for this format 1775 * @num_planes: number of planes for this format
1776 * @flags: format flags (V4L2_PIX_FMT_FLAG_*)
1708 */ 1777 */
1709struct v4l2_pix_format_mplane { 1778struct v4l2_pix_format_mplane {
1710 __u32 width; 1779 __u32 width;
@@ -1715,16 +1784,19 @@ struct v4l2_pix_format_mplane {
1715 1784
1716 struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; 1785 struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
1717 __u8 num_planes; 1786 __u8 num_planes;
1718 __u8 reserved[11]; 1787 __u8 flags;
1788 __u8 reserved[10];
1719} __attribute__ ((packed)); 1789} __attribute__ ((packed));
1720 1790
1721/** 1791/**
1722 * struct v4l2_sdr_format - SDR format definition 1792 * struct v4l2_sdr_format - SDR format definition
1723 * @pixelformat: little endian four character code (fourcc) 1793 * @pixelformat: little endian four character code (fourcc)
1794 * @buffersize: maximum size in bytes required for data
1724 */ 1795 */
1725struct v4l2_sdr_format { 1796struct v4l2_sdr_format {
1726 __u32 pixelformat; 1797 __u32 pixelformat;
1727 __u8 reserved[28]; 1798 __u32 buffersize;
1799 __u8 reserved[24];
1728} __attribute__ ((packed)); 1800} __attribute__ ((packed));
1729 1801
1730/** 1802/**
@@ -1771,6 +1843,7 @@ struct v4l2_streamparm {
1771#define V4L2_EVENT_CTRL 3 1843#define V4L2_EVENT_CTRL 3
1772#define V4L2_EVENT_FRAME_SYNC 4 1844#define V4L2_EVENT_FRAME_SYNC 4
1773#define V4L2_EVENT_SOURCE_CHANGE 5 1845#define V4L2_EVENT_SOURCE_CHANGE 5
1846#define V4L2_EVENT_MOTION_DET 6
1774#define V4L2_EVENT_PRIVATE_START 0x08000000 1847#define V4L2_EVENT_PRIVATE_START 0x08000000
1775 1848
1776/* Payload for V4L2_EVENT_VSYNC */ 1849/* Payload for V4L2_EVENT_VSYNC */
@@ -1808,6 +1881,21 @@ struct v4l2_event_src_change {
1808 __u32 changes; 1881 __u32 changes;
1809}; 1882};
1810 1883
1884#define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ (1 << 0)
1885
1886/**
1887 * struct v4l2_event_motion_det - motion detection event
1888 * @flags: if V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ is set, then the
1889 * frame_sequence field is valid.
1890 * @frame_sequence: the frame sequence number associated with this event.
1891 * @region_mask: which regions detected motion.
1892 */
1893struct v4l2_event_motion_det {
1894 __u32 flags;
1895 __u32 frame_sequence;
1896 __u32 region_mask;
1897};
1898
1811struct v4l2_event { 1899struct v4l2_event {
1812 __u32 type; 1900 __u32 type;
1813 union { 1901 union {
@@ -1815,6 +1903,7 @@ struct v4l2_event {
1815 struct v4l2_event_ctrl ctrl; 1903 struct v4l2_event_ctrl ctrl;
1816 struct v4l2_event_frame_sync frame_sync; 1904 struct v4l2_event_frame_sync frame_sync;
1817 struct v4l2_event_src_change src_change; 1905 struct v4l2_event_src_change src_change;
1906 struct v4l2_event_motion_det motion_det;
1818 __u8 data[64]; 1907 __u8 data[64];
1819 } u; 1908 } u;
1820 __u32 pending; 1909 __u32 pending;
@@ -2005,6 +2094,8 @@ struct v4l2_create_buffers {
2005 Never use these in applications! */ 2094 Never use these in applications! */
2006#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) 2095#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
2007 2096
2097#define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl)
2098
2008/* Reminder: when adding new ioctls please add support for them to 2099/* Reminder: when adding new ioctls please add support for them to
2009 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 2100 drivers/media/video/v4l2-compat-ioctl32.c as well! */
2010 2101