aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 16:22:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 16:22:22 -0400
commitde34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 (patch)
tree88b5db2fc7fbbb0353edd8447a832a5225a49d01 /include/uapi/linux
parent56e520c7a0a490b63b042b047ec9659fc08762a4 (diff)
parent9fce0c226536fc36c7fb0a80000ca38a995be43e (diff)
Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Documentation improvements: conversion of all non-DocBook documents to Sphinx and lots of fixes to the uAPI media book - New PCI driver for Techwell TW5864 media grabber boards - New SoC driver for ATMEL Image Sensor Controller - Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera drivers) - Addition of ST CEC driver - Lots of drivers fixes, improvements and additions * tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits) [media] ttusb_dec: avoid the risk of go past buffer [media] cx23885: Fix some smatch warnings [media] si2165: switch to regmap [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging [media] si2165: Remove legacy attach [media] cx231xx: attach si2165 driver via i2c_client [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers [media] cx23885: attach si2165 driver via i2c_client [media] si2165: support i2c_client attach [media] si2165: avoid division by zero [media] rcar-vin: add R-Car gen2 fallback compatibility string [media] lgdt3306a: remove 20*50 msec unnecessary timeout [media] cx25821: Remove deprecated create_singlethread_workqueue [media] cx25821: Drop Freeing of Workqueue [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported [media] redrat3: hardware-specific parameters [media] redrat3: remove hw_timeout member [media] cxd2841er: BER and SNR reading for ISDB-T [media] dvb-usb: avoid link error with dib3000m{b,c| [media] dvb-usb: split out common parts of dibusb ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/dvb/video.h3
-rw-r--r--include/uapi/linux/media-bus-format.h10
-rw-r--r--include/uapi/linux/media.h1
-rw-r--r--include/uapi/linux/v4l2-dv-timings.h12
-rw-r--r--include/uapi/linux/videodev2.h38
5 files changed, 54 insertions, 10 deletions
diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h
index 49392564f9d6..260f033a5b54 100644
--- a/include/uapi/linux/dvb/video.h
+++ b/include/uapi/linux/dvb/video.h
@@ -206,7 +206,8 @@ typedef __u16 video_attributes_t;
206/* 6 line 21-2 data present in GOP (1=yes, 0=no) */ 206/* 6 line 21-2 data present in GOP (1=yes, 0=no) */
207/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */ 207/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
208/* 2 source letterboxed (1=yes, 0=no) */ 208/* 2 source letterboxed (1=yes, 0=no) */
209/* 0 film/camera mode (0=camera, 1=film (625/50 only)) */ 209/* 0 film/camera mode (0=
210 *camera, 1=film (625/50 only)) */
210 211
211 212
212/* bit definitions for capabilities: */ 213/* bit definitions for capabilities: */
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 190d491d5b13..2168759c1287 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -97,7 +97,7 @@
97#define MEDIA_BUS_FMT_YUV10_1X30 0x2016 97#define MEDIA_BUS_FMT_YUV10_1X30 0x2016
98#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017 98#define MEDIA_BUS_FMT_AYUV8_1X32 0x2017
99 99
100/* Bayer - next is 0x3019 */ 100/* Bayer - next is 0x3021 */
101#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 101#define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
102#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 102#define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
103#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002 103#define MEDIA_BUS_FMT_SGRBG8_1X8 0x3002
@@ -122,6 +122,14 @@
122#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010 122#define MEDIA_BUS_FMT_SGBRG12_1X12 0x3010
123#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011 123#define MEDIA_BUS_FMT_SGRBG12_1X12 0x3011
124#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012 124#define MEDIA_BUS_FMT_SRGGB12_1X12 0x3012
125#define MEDIA_BUS_FMT_SBGGR14_1X14 0x3019
126#define MEDIA_BUS_FMT_SGBRG14_1X14 0x301a
127#define MEDIA_BUS_FMT_SGRBG14_1X14 0x301b
128#define MEDIA_BUS_FMT_SRGGB14_1X14 0x301c
129#define MEDIA_BUS_FMT_SBGGR16_1X16 0x301d
130#define MEDIA_BUS_FMT_SGBRG16_1X16 0x301e
131#define MEDIA_BUS_FMT_SGRBG16_1X16 0x301f
132#define MEDIA_BUS_FMT_SRGGB16_1X16 0x3020
125 133
126/* JPEG compressed formats - next is 0x4002 */ 134/* JPEG compressed formats - next is 0x4002 */
127#define MEDIA_BUS_FMT_JPEG_1X8 0x4001 135#define MEDIA_BUS_FMT_JPEG_1X8 0x4001
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 7acf0f634f70..4890787731b8 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -307,6 +307,7 @@ struct media_links_enum {
307#define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) 307#define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2)
308#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) 308#define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3)
309#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) 309#define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4)
310#define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5)
310 311
311#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) 312#define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE)
312#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) 313#define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1)
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h
index 086168e18ca8..f31957166337 100644
--- a/include/uapi/linux/v4l2-dv-timings.h
+++ b/include/uapi/linux/v4l2-dv-timings.h
@@ -934,4 +934,16 @@
934 V4L2_DV_FL_REDUCED_BLANKING) \ 934 V4L2_DV_FL_REDUCED_BLANKING) \
935} 935}
936 936
937/* SDI timings definitions */
938
939/* SMPTE-125M */
940#define V4L2_DV_BT_SDI_720X487I60 { \
941 .type = V4L2_DV_BT_656_1120, \
942 V4L2_INIT_BT_TIMINGS(720, 487, 1, \
943 V4L2_DV_HSYNC_POS_POL, \
944 13500000, 16, 121, 0, 0, 19, 0, 0, 19, 0, \
945 V4L2_DV_BT_STD_SDI, \
946 V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE) \
947}
948
937#endif 949#endif
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 724f43e69d03..94f123f3e04e 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -292,13 +292,11 @@ enum v4l2_ycbcr_encoding {
292 * various colorspaces: 292 * various colorspaces:
293 * 293 *
294 * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M, 294 * V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
295 * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_ADOBERGB and 295 * V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB,
296 * V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601 296 * V4L2_COLORSPACE_ADOBERGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
297 * 297 *
298 * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709 298 * V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
299 * 299 *
300 * V4L2_COLORSPACE_SRGB: V4L2_YCBCR_ENC_SYCC
301 *
302 * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020 300 * V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020
303 * 301 *
304 * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M 302 * V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M
@@ -317,8 +315,14 @@ enum v4l2_ycbcr_encoding {
317 /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */ 315 /* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
318 V4L2_YCBCR_ENC_XV709 = 4, 316 V4L2_YCBCR_ENC_XV709 = 4,
319 317
320 /* sYCC (Y'CbCr encoding of sRGB) */ 318#ifndef __KERNEL__
319 /*
320 * sYCC (Y'CbCr encoding of sRGB), identical to ENC_601. It was added
321 * originally due to a misunderstanding of the sYCC standard. It should
322 * not be used, instead use V4L2_YCBCR_ENC_601.
323 */
321 V4L2_YCBCR_ENC_SYCC = 5, 324 V4L2_YCBCR_ENC_SYCC = 5,
325#endif
322 326
323 /* BT.2020 Non-constant Luminance Y'CbCr */ 327 /* BT.2020 Non-constant Luminance Y'CbCr */
324 V4L2_YCBCR_ENC_BT2020 = 6, 328 V4L2_YCBCR_ENC_BT2020 = 6,
@@ -345,8 +349,8 @@ enum v4l2_quantization {
345 /* 349 /*
346 * The default for R'G'B' quantization is always full range, except 350 * The default for R'G'B' quantization is always full range, except
347 * for the BT2020 colorspace. For Y'CbCr the quantization is always 351 * for the BT2020 colorspace. For Y'CbCr the quantization is always
348 * limited range, except for COLORSPACE_JPEG, SYCC, XV601 or XV709: 352 * limited range, except for COLORSPACE_JPEG, SRGB, ADOBERGB,
349 * those are full range. 353 * XV601 or XV709: those are full range.
350 */ 354 */
351 V4L2_QUANTIZATION_DEFAULT = 0, 355 V4L2_QUANTIZATION_DEFAULT = 0,
352 V4L2_QUANTIZATION_FULL_RANGE = 1, 356 V4L2_QUANTIZATION_FULL_RANGE = 1,
@@ -361,7 +365,8 @@ enum v4l2_quantization {
361#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, colsp, ycbcr_enc) \ 365#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, colsp, ycbcr_enc) \
362 (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE : \ 366 (((is_rgb) && (colsp) == V4L2_COLORSPACE_BT2020) ? V4L2_QUANTIZATION_LIM_RANGE : \
363 (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 || \ 367 (((is_rgb) || (ycbcr_enc) == V4L2_YCBCR_ENC_XV601 || \
364 (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) ? \ 368 (ycbcr_enc) == V4L2_YCBCR_ENC_XV709 || (colsp) == V4L2_COLORSPACE_JPEG) || \
369 (colsp) == V4L2_COLORSPACE_ADOBERGB || (colsp) == V4L2_COLORSPACE_SRGB ? \
365 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE)) 370 V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
366 371
367enum v4l2_priority { 372enum v4l2_priority {
@@ -440,6 +445,8 @@ struct v4l2_capability {
440#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ 445#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
441#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ 446#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
442 447
448#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */
449
443#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */ 450#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
444 451
445/* 452/*
@@ -635,6 +642,12 @@ struct v4l2_pix_format {
635#define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */ 642#define V4L2_SDR_FMT_CS14LE v4l2_fourcc('C', 'S', '1', '4') /* complex s14le */
636#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */ 643#define V4L2_SDR_FMT_RU12LE v4l2_fourcc('R', 'U', '1', '2') /* real u12le */
637 644
645/* Touch formats - used for Touch devices */
646#define V4L2_TCH_FMT_DELTA_TD16 v4l2_fourcc('T', 'D', '1', '6') /* 16-bit signed deltas */
647#define V4L2_TCH_FMT_DELTA_TD08 v4l2_fourcc('T', 'D', '0', '8') /* 8-bit signed deltas */
648#define V4L2_TCH_FMT_TU16 v4l2_fourcc('T', 'U', '1', '6') /* 16-bit unsigned touch data */
649#define V4L2_TCH_FMT_TU08 v4l2_fourcc('T', 'U', '0', '8') /* 8-bit unsigned touch data */
650
638/* priv field value to indicates that subsequent fields are valid. */ 651/* priv field value to indicates that subsequent fields are valid. */
639#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe 652#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
640 653
@@ -1261,6 +1274,7 @@ struct v4l2_bt_timings {
1261#define V4L2_DV_BT_STD_DMT (1 << 1) /* VESA Discrete Monitor Timings */ 1274#define V4L2_DV_BT_STD_DMT (1 << 1) /* VESA Discrete Monitor Timings */
1262#define V4L2_DV_BT_STD_CVT (1 << 2) /* VESA Coordinated Video Timings */ 1275#define V4L2_DV_BT_STD_CVT (1 << 2) /* VESA Coordinated Video Timings */
1263#define V4L2_DV_BT_STD_GTF (1 << 3) /* VESA Generalized Timings Formula */ 1276#define V4L2_DV_BT_STD_GTF (1 << 3) /* VESA Generalized Timings Formula */
1277#define V4L2_DV_BT_STD_SDI (1 << 4) /* SDI Timings */
1264 1278
1265/* Flags */ 1279/* Flags */
1266 1280
@@ -1292,6 +1306,11 @@ struct v4l2_bt_timings {
1292 * use the range 16-235) as opposed to 0-255. All formats defined in CEA-861 1306 * use the range 16-235) as opposed to 0-255. All formats defined in CEA-861
1293 * except for the 640x480 format are CE formats. */ 1307 * except for the 640x480 format are CE formats. */
1294#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4) 1308#define V4L2_DV_FL_IS_CE_VIDEO (1 << 4)
1309/* Some formats like SMPTE-125M have an interlaced signal with a odd
1310 * total height. For these formats, if this flag is set, the first
1311 * field has the extra line. If not, it is the second field.
1312 */
1313#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5)
1295 1314
1296/* A few useful defines to calculate the total blanking and frame sizes */ 1315/* A few useful defines to calculate the total blanking and frame sizes */
1297#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ 1316#define V4L2_DV_BT_BLANKING_WIDTH(bt) \
@@ -1401,6 +1420,7 @@ struct v4l2_input {
1401/* Values for the 'type' field */ 1420/* Values for the 'type' field */
1402#define V4L2_INPUT_TYPE_TUNER 1 1421#define V4L2_INPUT_TYPE_TUNER 1
1403#define V4L2_INPUT_TYPE_CAMERA 2 1422#define V4L2_INPUT_TYPE_CAMERA 2
1423#define V4L2_INPUT_TYPE_TOUCH 3
1404 1424
1405/* field 'status' - general */ 1425/* field 'status' - general */
1406#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ 1426#define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */
@@ -1415,6 +1435,8 @@ struct v4l2_input {
1415/* field 'status' - analog */ 1435/* field 'status' - analog */
1416#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ 1436#define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */
1417#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ 1437#define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */
1438#define V4L2_IN_ST_NO_V_LOCK 0x00000400 /* No vertical sync lock */
1439#define V4L2_IN_ST_NO_STD_LOCK 0x00000800 /* No standard format lock */
1418 1440
1419/* field 'status' - digital */ 1441/* field 'status' - digital */
1420#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ 1442#define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */