diff options
Diffstat (limited to 'include/linux/videodev2.h')
-rw-r--r-- | include/linux/videodev2.h | 433 |
1 files changed, 222 insertions, 211 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 4a535ea1e123..4669d7e72e75 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -55,13 +55,13 @@ | |||
55 | */ | 55 | */ |
56 | #ifndef __LINUX_VIDEODEV2_H | 56 | #ifndef __LINUX_VIDEODEV2_H |
57 | #define __LINUX_VIDEODEV2_H | 57 | #define __LINUX_VIDEODEV2_H |
58 | |||
58 | #ifdef __KERNEL__ | 59 | #ifdef __KERNEL__ |
59 | #include <linux/time.h> /* need struct timeval */ | 60 | #include <linux/time.h> /* need struct timeval */ |
60 | #include <linux/compiler.h> /* need __user */ | ||
61 | #else | 61 | #else |
62 | #define __user | ||
63 | #include <sys/time.h> | 62 | #include <sys/time.h> |
64 | #endif | 63 | #endif |
64 | #include <linux/compiler.h> | ||
65 | #include <linux/ioctl.h> | 65 | #include <linux/ioctl.h> |
66 | #include <linux/types.h> | 66 | #include <linux/types.h> |
67 | 67 | ||
@@ -71,6 +71,11 @@ | |||
71 | */ | 71 | */ |
72 | #define VIDEO_MAX_FRAME 32 | 72 | #define VIDEO_MAX_FRAME 32 |
73 | 73 | ||
74 | #ifndef __KERNEL__ | ||
75 | |||
76 | /* These defines are V4L1 specific and should not be used with the V4L2 API! | ||
77 | They will be removed from this header in the future. */ | ||
78 | |||
74 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | 79 | #define VID_TYPE_CAPTURE 1 /* Can capture */ |
75 | #define VID_TYPE_TUNER 2 /* Can tune */ | 80 | #define VID_TYPE_TUNER 2 /* Can tune */ |
76 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | 81 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ |
@@ -85,14 +90,15 @@ | |||
85 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | 90 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ |
86 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | 91 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ |
87 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | 92 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ |
93 | #endif | ||
88 | 94 | ||
89 | /* | 95 | /* |
90 | * M I S C E L L A N E O U S | 96 | * M I S C E L L A N E O U S |
91 | */ | 97 | */ |
92 | 98 | ||
93 | /* Four-character-code (FOURCC) */ | 99 | /* Four-character-code (FOURCC) */ |
94 | #define v4l2_fourcc(a,b,c,d)\ | 100 | #define v4l2_fourcc(a, b, c, d)\ |
95 | (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) | 101 | ((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24)) |
96 | 102 | ||
97 | /* | 103 | /* |
98 | * E N U M S | 104 | * E N U M S |
@@ -226,8 +232,7 @@ struct v4l2_fract { | |||
226 | /* | 232 | /* |
227 | * D R I V E R C A P A B I L I T I E S | 233 | * D R I V E R C A P A B I L I T I E S |
228 | */ | 234 | */ |
229 | struct v4l2_capability | 235 | struct v4l2_capability { |
230 | { | ||
231 | __u8 driver[16]; /* i.e. "bttv" */ | 236 | __u8 driver[16]; /* i.e. "bttv" */ |
232 | __u8 card[32]; /* i.e. "Hauppauge WinTV" */ | 237 | __u8 card[32]; /* i.e. "Hauppauge WinTV" */ |
233 | __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ | 238 | __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ |
@@ -246,6 +251,7 @@ struct v4l2_capability | |||
246 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 251 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
247 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 252 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
248 | #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */ | 253 | #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 */ | ||
249 | 255 | ||
250 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 256 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
251 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 257 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
@@ -258,8 +264,7 @@ struct v4l2_capability | |||
258 | /* | 264 | /* |
259 | * V I D E O I M A G E F O R M A T | 265 | * V I D E O I M A G E F O R M A T |
260 | */ | 266 | */ |
261 | struct v4l2_pix_format | 267 | struct v4l2_pix_format { |
262 | { | ||
263 | __u32 width; | 268 | __u32 width; |
264 | __u32 height; | 269 | __u32 height; |
265 | __u32 pixelformat; | 270 | __u32 pixelformat; |
@@ -271,64 +276,78 @@ struct v4l2_pix_format | |||
271 | }; | 276 | }; |
272 | 277 | ||
273 | /* Pixel format FOURCC depth Description */ | 278 | /* Pixel format FOURCC depth Description */ |
274 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ | 279 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ |
275 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R','4','4','4') /* 16 xxxxrrrr ggggbbbb */ | 280 | #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */ |
276 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ | 281 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ |
277 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ | 282 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ |
278 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ | 283 | #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ |
279 | #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ | 284 | #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ |
280 | #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ | 285 | #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ |
281 | #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ | 286 | #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ |
282 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ | 287 | #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ |
283 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ | 288 | #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ |
284 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ | 289 | #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ |
285 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y','1','6',' ') /* 16 Greyscale */ | 290 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
286 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P','A','L','8') /* 8 8-bit palette */ | 291 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ |
287 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ | 292 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ |
288 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ | 293 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ |
289 | #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ | 294 | #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y', 'U', 'Y', 'V') /* 16 YUV 4:2:2 */ |
290 | #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ | 295 | #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U', 'Y', 'V', 'Y') /* 16 YUV 4:2:2 */ |
291 | #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ | 296 | #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4', '2', '2', 'P') /* 16 YVU422 planar */ |
292 | #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ | 297 | #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4', '1', '1', 'P') /* 16 YVU411 planar */ |
293 | #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ | 298 | #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ |
294 | #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y','4','4','4') /* 16 xxxxyyyy uuuuvvvv */ | 299 | #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ |
295 | #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y','U','V','O') /* 16 YUV-5-5-5 */ | 300 | #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ |
296 | #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y','U','V','P') /* 16 YUV-5-6-5 */ | 301 | #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ |
297 | #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y','U','V','4') /* 32 YUV-8-8-8-8 */ | 302 | #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ |
298 | 303 | ||
299 | /* two planes -- one Y, one Cr + Cb interleaved */ | 304 | /* two planes -- one Y, one Cr + Cb interleaved */ |
300 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ | 305 | #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
301 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ | 306 | #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N', 'V', '2', '1') /* 12 Y/CrCb 4:2:0 */ |
302 | 307 | ||
303 | /* The following formats are not defined in the V4L2 specification */ | 308 | /* The following formats are not defined in the V4L2 specification */ |
304 | #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ | 309 | #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y', 'U', 'V', '9') /* 9 YUV 4:1:0 */ |
305 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ | 310 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y', 'U', '1', '2') /* 12 YUV 4:2:0 */ |
306 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ | 311 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y', 'Y', 'U', 'V') /* 16 YUV 4:2:2 */ |
307 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ | 312 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* 8 8-bit color */ |
308 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:2:0 16x16 macroblocks */ | 313 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H', 'M', '1', '2') /* 8 YUV 4:2:0 16x16 macroblocks */ |
309 | 314 | ||
310 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 315 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
311 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 316 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
312 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */ | 317 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
318 | /* | ||
319 | * 10bit raw bayer, expanded to 16 bits | ||
320 | * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... | ||
321 | */ | ||
322 | #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') | ||
323 | /* 10bit raw bayer DPCM compressed to 8 bits */ | ||
324 | #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') | ||
325 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ | ||
313 | 326 | ||
314 | /* compressed formats */ | 327 | /* compressed formats */ |
315 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ | 328 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ |
316 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ | 329 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ |
317 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ | 330 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ |
318 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4 */ | 331 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ |
319 | 332 | ||
320 | /* Vendor-specific formats */ | 333 | /* Vendor-specific formats */ |
321 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ | 334 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
322 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ | 335 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
323 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ | 336 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ |
324 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ | 337 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ |
325 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ | 338 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ |
339 | #define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */ | ||
340 | #define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S', '5', '0', '5') /* YYUV per line */ | ||
341 | #define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */ | ||
342 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | ||
343 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | ||
344 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | ||
345 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ | ||
326 | 346 | ||
327 | /* | 347 | /* |
328 | * F O R M A T E N U M E R A T I O N | 348 | * F O R M A T E N U M E R A T I O N |
329 | */ | 349 | */ |
330 | struct v4l2_fmtdesc | 350 | struct v4l2_fmtdesc { |
331 | { | ||
332 | __u32 index; /* Format number */ | 351 | __u32 index; /* Format number */ |
333 | enum v4l2_buf_type type; /* buffer type */ | 352 | enum v4l2_buf_type type; /* buffer type */ |
334 | __u32 flags; | 353 | __u32 flags; |
@@ -344,21 +363,18 @@ struct v4l2_fmtdesc | |||
344 | /* | 363 | /* |
345 | * F R A M E S I Z E E N U M E R A T I O N | 364 | * F R A M E S I Z E E N U M E R A T I O N |
346 | */ | 365 | */ |
347 | enum v4l2_frmsizetypes | 366 | enum v4l2_frmsizetypes { |
348 | { | ||
349 | V4L2_FRMSIZE_TYPE_DISCRETE = 1, | 367 | V4L2_FRMSIZE_TYPE_DISCRETE = 1, |
350 | V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, | 368 | V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, |
351 | V4L2_FRMSIZE_TYPE_STEPWISE = 3, | 369 | V4L2_FRMSIZE_TYPE_STEPWISE = 3, |
352 | }; | 370 | }; |
353 | 371 | ||
354 | struct v4l2_frmsize_discrete | 372 | struct v4l2_frmsize_discrete { |
355 | { | ||
356 | __u32 width; /* Frame width [pixel] */ | 373 | __u32 width; /* Frame width [pixel] */ |
357 | __u32 height; /* Frame height [pixel] */ | 374 | __u32 height; /* Frame height [pixel] */ |
358 | }; | 375 | }; |
359 | 376 | ||
360 | struct v4l2_frmsize_stepwise | 377 | struct v4l2_frmsize_stepwise { |
361 | { | ||
362 | __u32 min_width; /* Minimum frame width [pixel] */ | 378 | __u32 min_width; /* Minimum frame width [pixel] */ |
363 | __u32 max_width; /* Maximum frame width [pixel] */ | 379 | __u32 max_width; /* Maximum frame width [pixel] */ |
364 | __u32 step_width; /* Frame width step size [pixel] */ | 380 | __u32 step_width; /* Frame width step size [pixel] */ |
@@ -367,8 +383,7 @@ struct v4l2_frmsize_stepwise | |||
367 | __u32 step_height; /* Frame height step size [pixel] */ | 383 | __u32 step_height; /* Frame height step size [pixel] */ |
368 | }; | 384 | }; |
369 | 385 | ||
370 | struct v4l2_frmsizeenum | 386 | struct v4l2_frmsizeenum { |
371 | { | ||
372 | __u32 index; /* Frame size number */ | 387 | __u32 index; /* Frame size number */ |
373 | __u32 pixel_format; /* Pixel format */ | 388 | __u32 pixel_format; /* Pixel format */ |
374 | __u32 type; /* Frame size type the device supports. */ | 389 | __u32 type; /* Frame size type the device supports. */ |
@@ -384,22 +399,19 @@ struct v4l2_frmsizeenum | |||
384 | /* | 399 | /* |
385 | * F R A M E R A T E E N U M E R A T I O N | 400 | * F R A M E R A T E E N U M E R A T I O N |
386 | */ | 401 | */ |
387 | enum v4l2_frmivaltypes | 402 | enum v4l2_frmivaltypes { |
388 | { | ||
389 | V4L2_FRMIVAL_TYPE_DISCRETE = 1, | 403 | V4L2_FRMIVAL_TYPE_DISCRETE = 1, |
390 | V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, | 404 | V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, |
391 | V4L2_FRMIVAL_TYPE_STEPWISE = 3, | 405 | V4L2_FRMIVAL_TYPE_STEPWISE = 3, |
392 | }; | 406 | }; |
393 | 407 | ||
394 | struct v4l2_frmival_stepwise | 408 | struct v4l2_frmival_stepwise { |
395 | { | ||
396 | struct v4l2_fract min; /* Minimum frame interval [s] */ | 409 | struct v4l2_fract min; /* Minimum frame interval [s] */ |
397 | struct v4l2_fract max; /* Maximum frame interval [s] */ | 410 | struct v4l2_fract max; /* Maximum frame interval [s] */ |
398 | struct v4l2_fract step; /* Frame interval step size [s] */ | 411 | struct v4l2_fract step; /* Frame interval step size [s] */ |
399 | }; | 412 | }; |
400 | 413 | ||
401 | struct v4l2_frmivalenum | 414 | struct v4l2_frmivalenum { |
402 | { | ||
403 | __u32 index; /* Frame format index */ | 415 | __u32 index; /* Frame format index */ |
404 | __u32 pixel_format; /* Pixel format */ | 416 | __u32 pixel_format; /* Pixel format */ |
405 | __u32 width; /* Frame width */ | 417 | __u32 width; /* Frame width */ |
@@ -418,8 +430,7 @@ struct v4l2_frmivalenum | |||
418 | /* | 430 | /* |
419 | * T I M E C O D E | 431 | * T I M E C O D E |
420 | */ | 432 | */ |
421 | struct v4l2_timecode | 433 | struct v4l2_timecode { |
422 | { | ||
423 | __u32 type; | 434 | __u32 type; |
424 | __u32 flags; | 435 | __u32 flags; |
425 | __u8 frames; | 436 | __u8 frames; |
@@ -444,8 +455,7 @@ struct v4l2_timecode | |||
444 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 | 455 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 |
445 | /* The above is based on SMPTE timecodes */ | 456 | /* The above is based on SMPTE timecodes */ |
446 | 457 | ||
447 | struct v4l2_jpegcompression | 458 | struct v4l2_jpegcompression { |
448 | { | ||
449 | int quality; | 459 | int quality; |
450 | 460 | ||
451 | int APPn; /* Number of APP segment to be written, | 461 | int APPn; /* Number of APP segment to be written, |
@@ -477,16 +487,14 @@ struct v4l2_jpegcompression | |||
477 | /* | 487 | /* |
478 | * M E M O R Y - M A P P I N G B U F F E R S | 488 | * M E M O R Y - M A P P I N G B U F F E R S |
479 | */ | 489 | */ |
480 | struct v4l2_requestbuffers | 490 | struct v4l2_requestbuffers { |
481 | { | ||
482 | __u32 count; | 491 | __u32 count; |
483 | enum v4l2_buf_type type; | 492 | enum v4l2_buf_type type; |
484 | enum v4l2_memory memory; | 493 | enum v4l2_memory memory; |
485 | __u32 reserved[2]; | 494 | __u32 reserved[2]; |
486 | }; | 495 | }; |
487 | 496 | ||
488 | struct v4l2_buffer | 497 | struct v4l2_buffer { |
489 | { | ||
490 | __u32 index; | 498 | __u32 index; |
491 | enum v4l2_buf_type type; | 499 | enum v4l2_buf_type type; |
492 | __u32 bytesused; | 500 | __u32 bytesused; |
@@ -520,13 +528,12 @@ struct v4l2_buffer | |||
520 | /* | 528 | /* |
521 | * O V E R L A Y P R E V I E W | 529 | * O V E R L A Y P R E V I E W |
522 | */ | 530 | */ |
523 | struct v4l2_framebuffer | 531 | struct v4l2_framebuffer { |
524 | { | ||
525 | __u32 capability; | 532 | __u32 capability; |
526 | __u32 flags; | 533 | __u32 flags; |
527 | /* FIXME: in theory we should pass something like PCI device + memory | 534 | /* FIXME: in theory we should pass something like PCI device + memory |
528 | * region + offset instead of some physical address */ | 535 | * region + offset instead of some physical address */ |
529 | void* base; | 536 | void *base; |
530 | struct v4l2_pix_format fmt; | 537 | struct v4l2_pix_format fmt; |
531 | }; | 538 | }; |
532 | /* Flags for the 'capability' field. Read only */ | 539 | /* Flags for the 'capability' field. Read only */ |
@@ -545,14 +552,12 @@ struct v4l2_framebuffer | |||
545 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 552 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
546 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 553 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
547 | 554 | ||
548 | struct v4l2_clip | 555 | struct v4l2_clip { |
549 | { | ||
550 | struct v4l2_rect c; | 556 | struct v4l2_rect c; |
551 | struct v4l2_clip __user *next; | 557 | struct v4l2_clip __user *next; |
552 | }; | 558 | }; |
553 | 559 | ||
554 | struct v4l2_window | 560 | struct v4l2_window { |
555 | { | ||
556 | struct v4l2_rect w; | 561 | struct v4l2_rect w; |
557 | enum v4l2_field field; | 562 | enum v4l2_field field; |
558 | __u32 chromakey; | 563 | __u32 chromakey; |
@@ -565,8 +570,7 @@ struct v4l2_window | |||
565 | /* | 570 | /* |
566 | * C A P T U R E P A R A M E T E R S | 571 | * C A P T U R E P A R A M E T E R S |
567 | */ | 572 | */ |
568 | struct v4l2_captureparm | 573 | struct v4l2_captureparm { |
569 | { | ||
570 | __u32 capability; /* Supported modes */ | 574 | __u32 capability; /* Supported modes */ |
571 | __u32 capturemode; /* Current mode */ | 575 | __u32 capturemode; /* Current mode */ |
572 | struct v4l2_fract timeperframe; /* Time per frame in .1us units */ | 576 | struct v4l2_fract timeperframe; /* Time per frame in .1us units */ |
@@ -579,8 +583,7 @@ struct v4l2_captureparm | |||
579 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ | 583 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ |
580 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ | 584 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ |
581 | 585 | ||
582 | struct v4l2_outputparm | 586 | struct v4l2_outputparm { |
583 | { | ||
584 | __u32 capability; /* Supported modes */ | 587 | __u32 capability; /* Supported modes */ |
585 | __u32 outputmode; /* Current mode */ | 588 | __u32 outputmode; /* Current mode */ |
586 | struct v4l2_fract timeperframe; /* Time per frame in seconds */ | 589 | struct v4l2_fract timeperframe; /* Time per frame in seconds */ |
@@ -697,8 +700,7 @@ typedef __u64 v4l2_std_id; | |||
697 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ | 700 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ |
698 | V4L2_STD_625_50) | 701 | V4L2_STD_625_50) |
699 | 702 | ||
700 | struct v4l2_standard | 703 | struct v4l2_standard { |
701 | { | ||
702 | __u32 index; | 704 | __u32 index; |
703 | v4l2_std_id id; | 705 | v4l2_std_id id; |
704 | __u8 name[24]; | 706 | __u8 name[24]; |
@@ -710,8 +712,7 @@ struct v4l2_standard | |||
710 | /* | 712 | /* |
711 | * V I D E O I N P U T S | 713 | * V I D E O I N P U T S |
712 | */ | 714 | */ |
713 | struct v4l2_input | 715 | struct v4l2_input { |
714 | { | ||
715 | __u32 index; /* Which input */ | 716 | __u32 index; /* Which input */ |
716 | __u8 name[32]; /* Label */ | 717 | __u8 name[32]; /* Label */ |
717 | __u32 type; /* Type of input */ | 718 | __u32 type; /* Type of input */ |
@@ -748,8 +749,7 @@ struct v4l2_input | |||
748 | /* | 749 | /* |
749 | * V I D E O O U T P U T S | 750 | * V I D E O O U T P U T S |
750 | */ | 751 | */ |
751 | struct v4l2_output | 752 | struct v4l2_output { |
752 | { | ||
753 | __u32 index; /* Which output */ | 753 | __u32 index; /* Which output */ |
754 | __u8 name[32]; /* Label */ | 754 | __u8 name[32]; /* Label */ |
755 | __u32 type; /* Type of output */ | 755 | __u32 type; /* Type of output */ |
@@ -766,14 +766,12 @@ struct v4l2_output | |||
766 | /* | 766 | /* |
767 | * C O N T R O L S | 767 | * C O N T R O L S |
768 | */ | 768 | */ |
769 | struct v4l2_control | 769 | struct v4l2_control { |
770 | { | ||
771 | __u32 id; | 770 | __u32 id; |
772 | __s32 value; | 771 | __s32 value; |
773 | }; | 772 | }; |
774 | 773 | ||
775 | struct v4l2_ext_control | 774 | struct v4l2_ext_control { |
776 | { | ||
777 | __u32 id; | 775 | __u32 id; |
778 | __u32 reserved2[2]; | 776 | __u32 reserved2[2]; |
779 | union { | 777 | union { |
@@ -783,8 +781,7 @@ struct v4l2_ext_control | |||
783 | }; | 781 | }; |
784 | } __attribute__ ((packed)); | 782 | } __attribute__ ((packed)); |
785 | 783 | ||
786 | struct v4l2_ext_controls | 784 | struct v4l2_ext_controls { |
787 | { | ||
788 | __u32 ctrl_class; | 785 | __u32 ctrl_class; |
789 | __u32 count; | 786 | __u32 count; |
790 | __u32 error_idx; | 787 | __u32 error_idx; |
@@ -802,8 +799,7 @@ struct v4l2_ext_controls | |||
802 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | 799 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
803 | 800 | ||
804 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 801 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
805 | struct v4l2_queryctrl | 802 | struct v4l2_queryctrl { |
806 | { | ||
807 | __u32 id; | 803 | __u32 id; |
808 | enum v4l2_ctrl_type type; | 804 | enum v4l2_ctrl_type type; |
809 | __u8 name[32]; /* Whatever */ | 805 | __u8 name[32]; /* Whatever */ |
@@ -816,8 +812,7 @@ struct v4l2_queryctrl | |||
816 | }; | 812 | }; |
817 | 813 | ||
818 | /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ | 814 | /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ |
819 | struct v4l2_querymenu | 815 | struct v4l2_querymenu { |
820 | { | ||
821 | __u32 id; | 816 | __u32 id; |
822 | __u32 index; | 817 | __u32 index; |
823 | __u8 name[32]; /* Whatever */ | 818 | __u8 name[32]; /* Whatever */ |
@@ -922,6 +917,8 @@ enum v4l2_mpeg_audio_encoding { | |||
922 | V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, | 917 | V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, |
923 | V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, | 918 | V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, |
924 | V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, | 919 | V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, |
920 | V4L2_MPEG_AUDIO_ENCODING_AAC = 3, | ||
921 | V4L2_MPEG_AUDIO_ENCODING_AC3 = 4, | ||
925 | }; | 922 | }; |
926 | #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) | 923 | #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) |
927 | enum v4l2_mpeg_audio_l1_bitrate { | 924 | enum v4l2_mpeg_audio_l1_bitrate { |
@@ -1000,12 +997,36 @@ enum v4l2_mpeg_audio_crc { | |||
1000 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, | 997 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, |
1001 | }; | 998 | }; |
1002 | #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) | 999 | #define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) |
1000 | #define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110) | ||
1001 | #define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111) | ||
1002 | enum v4l2_mpeg_audio_ac3_bitrate { | ||
1003 | V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, | ||
1004 | V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, | ||
1005 | V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2, | ||
1006 | V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3, | ||
1007 | V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4, | ||
1008 | V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5, | ||
1009 | V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6, | ||
1010 | V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7, | ||
1011 | V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8, | ||
1012 | V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9, | ||
1013 | V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10, | ||
1014 | V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11, | ||
1015 | V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12, | ||
1016 | V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13, | ||
1017 | V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14, | ||
1018 | V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15, | ||
1019 | V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16, | ||
1020 | V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, | ||
1021 | V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, | ||
1022 | }; | ||
1003 | 1023 | ||
1004 | /* MPEG video */ | 1024 | /* MPEG video */ |
1005 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | 1025 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) |
1006 | enum v4l2_mpeg_video_encoding { | 1026 | enum v4l2_mpeg_video_encoding { |
1007 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, | 1027 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, |
1008 | V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, | 1028 | V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, |
1029 | V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, | ||
1009 | }; | 1030 | }; |
1010 | #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) | 1031 | #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) |
1011 | enum v4l2_mpeg_video_aspect { | 1032 | enum v4l2_mpeg_video_aspect { |
@@ -1099,8 +1120,7 @@ enum v4l2_exposure_auto_type { | |||
1099 | /* | 1120 | /* |
1100 | * T U N I N G | 1121 | * T U N I N G |
1101 | */ | 1122 | */ |
1102 | struct v4l2_tuner | 1123 | struct v4l2_tuner { |
1103 | { | ||
1104 | __u32 index; | 1124 | __u32 index; |
1105 | __u8 name[32]; | 1125 | __u8 name[32]; |
1106 | enum v4l2_tuner_type type; | 1126 | enum v4l2_tuner_type type; |
@@ -1114,8 +1134,7 @@ struct v4l2_tuner | |||
1114 | __u32 reserved[4]; | 1134 | __u32 reserved[4]; |
1115 | }; | 1135 | }; |
1116 | 1136 | ||
1117 | struct v4l2_modulator | 1137 | struct v4l2_modulator { |
1118 | { | ||
1119 | __u32 index; | 1138 | __u32 index; |
1120 | __u8 name[32]; | 1139 | __u8 name[32]; |
1121 | __u32 capability; | 1140 | __u32 capability; |
@@ -1148,19 +1167,25 @@ struct v4l2_modulator | |||
1148 | #define V4L2_TUNER_MODE_LANG1 0x0003 | 1167 | #define V4L2_TUNER_MODE_LANG1 0x0003 |
1149 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 | 1168 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 |
1150 | 1169 | ||
1151 | struct v4l2_frequency | 1170 | struct v4l2_frequency { |
1152 | { | ||
1153 | __u32 tuner; | 1171 | __u32 tuner; |
1154 | enum v4l2_tuner_type type; | 1172 | enum v4l2_tuner_type type; |
1155 | __u32 frequency; | 1173 | __u32 frequency; |
1156 | __u32 reserved[8]; | 1174 | __u32 reserved[8]; |
1157 | }; | 1175 | }; |
1158 | 1176 | ||
1177 | struct v4l2_hw_freq_seek { | ||
1178 | __u32 tuner; | ||
1179 | enum v4l2_tuner_type type; | ||
1180 | __u32 seek_upward; | ||
1181 | __u32 wrap_around; | ||
1182 | __u32 reserved[8]; | ||
1183 | }; | ||
1184 | |||
1159 | /* | 1185 | /* |
1160 | * A U D I O | 1186 | * A U D I O |
1161 | */ | 1187 | */ |
1162 | struct v4l2_audio | 1188 | struct v4l2_audio { |
1163 | { | ||
1164 | __u32 index; | 1189 | __u32 index; |
1165 | __u8 name[32]; | 1190 | __u8 name[32]; |
1166 | __u32 capability; | 1191 | __u32 capability; |
@@ -1175,8 +1200,7 @@ struct v4l2_audio | |||
1175 | /* Flags for the 'mode' field */ | 1200 | /* Flags for the 'mode' field */ |
1176 | #define V4L2_AUDMODE_AVL 0x00001 | 1201 | #define V4L2_AUDMODE_AVL 0x00001 |
1177 | 1202 | ||
1178 | struct v4l2_audioout | 1203 | struct v4l2_audioout { |
1179 | { | ||
1180 | __u32 index; | 1204 | __u32 index; |
1181 | __u8 name[32]; | 1205 | __u8 name[32]; |
1182 | __u32 capability; | 1206 | __u32 capability; |
@@ -1240,8 +1264,7 @@ struct v4l2_encoder_cmd { | |||
1240 | */ | 1264 | */ |
1241 | 1265 | ||
1242 | /* Raw VBI */ | 1266 | /* Raw VBI */ |
1243 | struct v4l2_vbi_format | 1267 | struct v4l2_vbi_format { |
1244 | { | ||
1245 | __u32 sampling_rate; /* in 1 Hz */ | 1268 | __u32 sampling_rate; /* in 1 Hz */ |
1246 | __u32 offset; | 1269 | __u32 offset; |
1247 | __u32 samples_per_line; | 1270 | __u32 samples_per_line; |
@@ -1253,8 +1276,8 @@ struct v4l2_vbi_format | |||
1253 | }; | 1276 | }; |
1254 | 1277 | ||
1255 | /* VBI flags */ | 1278 | /* VBI flags */ |
1256 | #define V4L2_VBI_UNSYNC (1<< 0) | 1279 | #define V4L2_VBI_UNSYNC (1 << 0) |
1257 | #define V4L2_VBI_INTERLACED (1<< 1) | 1280 | #define V4L2_VBI_INTERLACED (1 << 1) |
1258 | 1281 | ||
1259 | /* Sliced VBI | 1282 | /* Sliced VBI |
1260 | * | 1283 | * |
@@ -1263,8 +1286,7 @@ struct v4l2_vbi_format | |||
1263 | * notice in the definitive implementation. | 1286 | * notice in the definitive implementation. |
1264 | */ | 1287 | */ |
1265 | 1288 | ||
1266 | struct v4l2_sliced_vbi_format | 1289 | struct v4l2_sliced_vbi_format { |
1267 | { | ||
1268 | __u16 service_set; | 1290 | __u16 service_set; |
1269 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 1291 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
1270 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 1292 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
@@ -1288,8 +1310,7 @@ struct v4l2_sliced_vbi_format | |||
1288 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | 1310 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
1289 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | 1311 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
1290 | 1312 | ||
1291 | struct v4l2_sliced_vbi_cap | 1313 | struct v4l2_sliced_vbi_cap { |
1292 | { | ||
1293 | __u16 service_set; | 1314 | __u16 service_set; |
1294 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 1315 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
1295 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 1316 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
@@ -1300,8 +1321,7 @@ struct v4l2_sliced_vbi_cap | |||
1300 | __u32 reserved[3]; /* must be 0 */ | 1321 | __u32 reserved[3]; /* must be 0 */ |
1301 | }; | 1322 | }; |
1302 | 1323 | ||
1303 | struct v4l2_sliced_vbi_data | 1324 | struct v4l2_sliced_vbi_data { |
1304 | { | ||
1305 | __u32 id; | 1325 | __u32 id; |
1306 | __u32 field; /* 0: first field, 1: second field */ | 1326 | __u32 field; /* 0: first field, 1: second field */ |
1307 | __u32 line; /* 1-23 */ | 1327 | __u32 line; /* 1-23 */ |
@@ -1315,27 +1335,23 @@ struct v4l2_sliced_vbi_data | |||
1315 | 1335 | ||
1316 | /* Stream data format | 1336 | /* Stream data format |
1317 | */ | 1337 | */ |
1318 | struct v4l2_format | 1338 | struct v4l2_format { |
1319 | { | ||
1320 | enum v4l2_buf_type type; | 1339 | enum v4l2_buf_type type; |
1321 | union | 1340 | union { |
1322 | { | 1341 | struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ |
1323 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 1342 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ |
1324 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 1343 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
1325 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 1344 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
1326 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | 1345 | __u8 raw_data[200]; /* user-defined */ |
1327 | __u8 raw_data[200]; // user-defined | ||
1328 | } fmt; | 1346 | } fmt; |
1329 | }; | 1347 | }; |
1330 | 1348 | ||
1331 | 1349 | ||
1332 | /* Stream type-dependent parameters | 1350 | /* Stream type-dependent parameters |
1333 | */ | 1351 | */ |
1334 | struct v4l2_streamparm | 1352 | struct v4l2_streamparm { |
1335 | { | ||
1336 | enum v4l2_buf_type type; | 1353 | enum v4l2_buf_type type; |
1337 | union | 1354 | union { |
1338 | { | ||
1339 | struct v4l2_captureparm capture; | 1355 | struct v4l2_captureparm capture; |
1340 | struct v4l2_outputparm output; | 1356 | struct v4l2_outputparm output; |
1341 | __u8 raw_data[200]; /* user-defined */ | 1357 | __u8 raw_data[200]; /* user-defined */ |
@@ -1373,91 +1389,86 @@ struct v4l2_chip_ident { | |||
1373 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 1389 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
1374 | * | 1390 | * |
1375 | */ | 1391 | */ |
1376 | #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability) | 1392 | #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) |
1377 | #define VIDIOC_RESERVED _IO ('V', 1) | 1393 | #define VIDIOC_RESERVED _IO('V', 1) |
1378 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) | 1394 | #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) |
1379 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) | 1395 | #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) |
1380 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) | 1396 | #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) |
1381 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) | 1397 | #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) |
1382 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) | 1398 | #define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer) |
1383 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) | 1399 | #define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer) |
1384 | #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer) | 1400 | #define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer) |
1385 | #define VIDIOC_OVERLAY _IOW ('V', 14, int) | 1401 | #define VIDIOC_OVERLAY _IOW('V', 14, int) |
1386 | #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer) | 1402 | #define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer) |
1387 | #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer) | 1403 | #define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer) |
1388 | #define VIDIOC_STREAMON _IOW ('V', 18, int) | 1404 | #define VIDIOC_STREAMON _IOW('V', 18, int) |
1389 | #define VIDIOC_STREAMOFF _IOW ('V', 19, int) | 1405 | #define VIDIOC_STREAMOFF _IOW('V', 19, int) |
1390 | #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm) | 1406 | #define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm) |
1391 | #define VIDIOC_S_PARM _IOWR ('V', 22, struct v4l2_streamparm) | 1407 | #define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm) |
1392 | #define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id) | 1408 | #define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id) |
1393 | #define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id) | 1409 | #define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id) |
1394 | #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard) | 1410 | #define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard) |
1395 | #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input) | 1411 | #define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input) |
1396 | #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control) | 1412 | #define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control) |
1397 | #define VIDIOC_S_CTRL _IOWR ('V', 28, struct v4l2_control) | 1413 | #define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control) |
1398 | #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner) | 1414 | #define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner) |
1399 | #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner) | 1415 | #define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner) |
1400 | #define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio) | 1416 | #define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio) |
1401 | #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio) | 1417 | #define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio) |
1402 | #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl) | 1418 | #define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl) |
1403 | #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu) | 1419 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) |
1404 | #define VIDIOC_G_INPUT _IOR ('V', 38, int) | 1420 | #define VIDIOC_G_INPUT _IOR('V', 38, int) |
1405 | #define VIDIOC_S_INPUT _IOWR ('V', 39, int) | 1421 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) |
1406 | #define VIDIOC_G_OUTPUT _IOR ('V', 46, int) | 1422 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) |
1407 | #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int) | 1423 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) |
1408 | #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output) | 1424 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) |
1409 | #define VIDIOC_G_AUDOUT _IOR ('V', 49, struct v4l2_audioout) | 1425 | #define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout) |
1410 | #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout) | 1426 | #define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout) |
1411 | #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator) | 1427 | #define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator) |
1412 | #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator) | 1428 | #define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator) |
1413 | #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) | 1429 | #define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency) |
1414 | #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) | 1430 | #define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency) |
1415 | #define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap) | 1431 | #define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap) |
1416 | #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) | 1432 | #define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop) |
1417 | #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) | 1433 | #define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop) |
1418 | #define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression) | 1434 | #define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression) |
1419 | #define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression) | 1435 | #define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression) |
1420 | #define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id) | 1436 | #define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id) |
1421 | #define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format) | 1437 | #define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format) |
1422 | #define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio) | 1438 | #define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio) |
1423 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 1439 | #define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout) |
1424 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 1440 | #define VIDIOC_G_PRIORITY _IOR('V', 67, enum v4l2_priority) |
1425 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 1441 | #define VIDIOC_S_PRIORITY _IOW('V', 68, enum v4l2_priority) |
1426 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) | 1442 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap) |
1427 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1443 | #define VIDIOC_LOG_STATUS _IO('V', 70) |
1428 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | 1444 | #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls) |
1429 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) | 1445 | #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls) |
1430 | #define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls) | 1446 | #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls) |
1431 | #if 1 | 1447 | #if 1 |
1432 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) | 1448 | #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum) |
1433 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) | 1449 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum) |
1434 | #define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx) | 1450 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) |
1435 | #define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd) | 1451 | #define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) |
1436 | #define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd) | 1452 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) |
1437 | 1453 | ||
1438 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 1454 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ |
1439 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) | 1455 | #define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_register) |
1440 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) | 1456 | #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_register) |
1441 | 1457 | ||
1442 | #define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident) | 1458 | #define VIDIOC_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_chip_ident) |
1443 | #endif | 1459 | #endif |
1460 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) | ||
1444 | 1461 | ||
1445 | #ifdef __OLD_VIDIOC_ | 1462 | #ifdef __OLD_VIDIOC_ |
1446 | /* for compatibility, will go away some day */ | 1463 | /* for compatibility, will go away some day */ |
1447 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 1464 | #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int) |
1448 | #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) | 1465 | #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm) |
1449 | #define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control) | 1466 | #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control) |
1450 | #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) | 1467 | #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio) |
1451 | #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) | 1468 | #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout) |
1452 | #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) | 1469 | #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap) |
1453 | #endif | 1470 | #endif |
1454 | 1471 | ||
1455 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ | 1472 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |
1456 | 1473 | ||
1457 | #endif /* __LINUX_VIDEODEV2_H */ | 1474 | #endif /* __LINUX_VIDEODEV2_H */ |
1458 | |||
1459 | /* | ||
1460 | * Local variables: | ||
1461 | * c-basic-offset: 8 | ||
1462 | * End: | ||
1463 | */ | ||