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.h105
1 files changed, 86 insertions, 19 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 74f16876f38d..3689d7d81fe9 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -167,6 +167,7 @@ enum v4l2_ctrl_type {
167 V4L2_CTRL_TYPE_BUTTON = 4, 167 V4L2_CTRL_TYPE_BUTTON = 4,
168 V4L2_CTRL_TYPE_INTEGER64 = 5, 168 V4L2_CTRL_TYPE_INTEGER64 = 5,
169 V4L2_CTRL_TYPE_CTRL_CLASS = 6, 169 V4L2_CTRL_TYPE_CTRL_CLASS = 6,
170 V4L2_CTRL_TYPE_STRING = 7,
170}; 171};
171 172
172enum v4l2_tuner_type { 173enum v4l2_tuner_type {
@@ -252,10 +253,12 @@ struct v4l2_capability {
252#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ 253#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
253#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ 254#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
254#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ 255#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
256#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
255 257
256#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ 258#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
257#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ 259#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
258#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ 260#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
261#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
259 262
260#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ 263#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
261#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ 264#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
@@ -275,7 +278,9 @@ struct v4l2_pix_format {
275 __u32 priv; /* private data, depends on pixelformat */ 278 __u32 priv; /* private data, depends on pixelformat */
276}; 279};
277 280
278/* Pixel format FOURCC depth Description */ 281/* Pixel format FOURCC depth Description */
282
283/* RGB formats */
279#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ 284#define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
280#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ 285#define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
281#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ 286#define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
@@ -286,12 +291,20 @@ struct v4l2_pix_format {
286#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ 291#define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
287#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ 292#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
288#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ 293#define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
294
295/* Grey formats */
289#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ 296#define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
290#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ 297#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */
298
299/* Palette formats */
291#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ 300#define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */
301
302/* Luminance+Chrominance formats */
292#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ 303#define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */
293#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ 304#define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */
294#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ 305#define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */
306#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
307#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
295#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ 308#define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */
296#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ 309#define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
297#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ 310#define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */
@@ -301,6 +314,10 @@ struct v4l2_pix_format {
301#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ 314#define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
302#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ 315#define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
303#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ 316#define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
317#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
318#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
319#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
320#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
304 321
305/* two planes -- one Y, one Cr + Cb interleaved */ 322/* two planes -- one Y, one Cr + Cb interleaved */
306#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ 323#define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */
@@ -308,25 +325,17 @@ struct v4l2_pix_format {
308#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ 325#define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */
309#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ 326#define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */
310 327
311/* The following formats are not defined in the V4L2 specification */ 328/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
312#define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */
313#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */
314#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */
315#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */
316#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */
317
318/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
319#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 329#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
320#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 330#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
321#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ 331#define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */
322 332#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10bit raw bayer */
323/* 333 /* 10bit raw bayer DPCM compressed to 8 bits */
324 * 10bit raw bayer, expanded to 16 bits
325 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
326 */
327#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
328/* 10bit raw bayer DPCM compressed to 8 bits */
329#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') 334#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
335 /*
336 * 10bit raw bayer, expanded to 16 bits
337 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
338 */
330#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ 339#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
331 340
332/* compressed formats */ 341/* compressed formats */
@@ -350,7 +359,6 @@ struct v4l2_pix_format {
350#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */ 359#define V4L2_PIX_FMT_MR97310A v4l2_fourcc('M', '3', '1', '0') /* compressed BGGR bayer */
351#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ 360#define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */
352#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ 361#define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */
353#define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */
354#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 */
355#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 */
356 364
@@ -367,6 +375,7 @@ struct v4l2_fmtdesc {
367}; 375};
368 376
369#define V4L2_FMT_FLAG_COMPRESSED 0x0001 377#define V4L2_FMT_FLAG_COMPRESSED 0x0001
378#define V4L2_FMT_FLAG_EMULATED 0x0002
370 379
371#if 1 380#if 1
372 /* Experimental Frame Size and frame rate enumeration */ 381 /* Experimental Frame Size and frame rate enumeration */
@@ -788,11 +797,12 @@ struct v4l2_control {
788 797
789struct v4l2_ext_control { 798struct v4l2_ext_control {
790 __u32 id; 799 __u32 id;
791 __u32 reserved2[2]; 800 __u32 size;
801 __u32 reserved2[1];
792 union { 802 union {
793 __s32 value; 803 __s32 value;
794 __s64 value64; 804 __s64 value64;
795 void *reserved; 805 char *string;
796 }; 806 };
797} __attribute__ ((packed)); 807} __attribute__ ((packed));
798 808
@@ -808,6 +818,7 @@ struct v4l2_ext_controls {
808#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ 818#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
809#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ 819#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */
810#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ 820#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */
821#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator control class */
811 822
812#define V4L2_CTRL_ID_MASK (0x0fffffff) 823#define V4L2_CTRL_ID_MASK (0x0fffffff)
813#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) 824#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
@@ -1147,6 +1158,39 @@ enum v4l2_exposure_auto_type {
1147 1158
1148#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) 1159#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16)
1149 1160
1161/* FM Modulator class control IDs */
1162#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)
1163#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1)
1164
1165#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1)
1166#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2)
1167#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3)
1168#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5)
1169#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6)
1170
1171#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64)
1172#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65)
1173#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66)
1174
1175#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80)
1176#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81)
1177#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82)
1178#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83)
1179#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84)
1180
1181#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96)
1182#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97)
1183#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98)
1184
1185#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112)
1186enum v4l2_preemphasis {
1187 V4L2_PREEMPHASIS_DISABLED = 0,
1188 V4L2_PREEMPHASIS_50_uS = 1,
1189 V4L2_PREEMPHASIS_75_uS = 2,
1190};
1191#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113)
1192#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114)
1193
1150/* 1194/*
1151 * T U N I N G 1195 * T U N I N G
1152 */ 1196 */
@@ -1181,6 +1225,7 @@ struct v4l2_modulator {
1181#define V4L2_TUNER_CAP_LANG2 0x0020 1225#define V4L2_TUNER_CAP_LANG2 0x0020
1182#define V4L2_TUNER_CAP_SAP 0x0020 1226#define V4L2_TUNER_CAP_SAP 0x0020
1183#define V4L2_TUNER_CAP_LANG1 0x0040 1227#define V4L2_TUNER_CAP_LANG1 0x0040
1228#define V4L2_TUNER_CAP_RDS 0x0080
1184 1229
1185/* Flags for the 'rxsubchans' field */ 1230/* Flags for the 'rxsubchans' field */
1186#define V4L2_TUNER_SUB_MONO 0x0001 1231#define V4L2_TUNER_SUB_MONO 0x0001
@@ -1188,6 +1233,7 @@ struct v4l2_modulator {
1188#define V4L2_TUNER_SUB_LANG2 0x0004 1233#define V4L2_TUNER_SUB_LANG2 0x0004
1189#define V4L2_TUNER_SUB_SAP 0x0004 1234#define V4L2_TUNER_SUB_SAP 0x0004
1190#define V4L2_TUNER_SUB_LANG1 0x0008 1235#define V4L2_TUNER_SUB_LANG1 0x0008
1236#define V4L2_TUNER_SUB_RDS 0x0010
1191 1237
1192/* Values for the 'audmode' field */ 1238/* Values for the 'audmode' field */
1193#define V4L2_TUNER_MODE_MONO 0x0000 1239#define V4L2_TUNER_MODE_MONO 0x0000
@@ -1213,6 +1259,27 @@ struct v4l2_hw_freq_seek {
1213}; 1259};
1214 1260
1215/* 1261/*
1262 * R D S
1263 */
1264
1265struct v4l2_rds_data {
1266 __u8 lsb;
1267 __u8 msb;
1268 __u8 block;
1269} __attribute__ ((packed));
1270
1271#define V4L2_RDS_BLOCK_MSK 0x7
1272#define V4L2_RDS_BLOCK_A 0
1273#define V4L2_RDS_BLOCK_B 1
1274#define V4L2_RDS_BLOCK_C 2
1275#define V4L2_RDS_BLOCK_D 3
1276#define V4L2_RDS_BLOCK_C_ALT 4
1277#define V4L2_RDS_BLOCK_INVALID 7
1278
1279#define V4L2_RDS_BLOCK_CORRECTED 0x40
1280#define V4L2_RDS_BLOCK_ERROR 0x80
1281
1282/*
1216 * A U D I O 1283 * A U D I O
1217 */ 1284 */
1218struct v4l2_audio { 1285struct v4l2_audio {