diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 11:35:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 11:35:40 -0400 |
| commit | 58f250714f2bfa3514798fde8b9d38a15e4a9836 (patch) | |
| tree | f4d297b4711f52c4cd0c182a58836812e76e50e9 /include | |
| parent | c32f1a34ff1097110469a240ea4539dc9c101e96 (diff) | |
| parent | c2f90e9536887fb76fb6a2aa239a70fc49beda10 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (98 commits)
V4L/DVB (8549): mxl5007: Fix an error at include file
V4L/DVB (8548): pwc: Fix compilation
V4L/DVB (8546): add tuner-3036 and dpc7146 drivers to feature-removal-schedule.txt
V4L/DVB (8546): saa7146: fix read from uninitialized memory
V4L/DVB (8544): gspca: probe/open race.
V4L/DVB (8543): em28xx: Rename #define for Compro VideoMate ForYou/Stereo
V4L/DVB (8542): em28xx: AMD ATI TV Wonder HD 600 entry at cards struct is duplicated
V4L/DVB (8541): em28xx: HVR-950 entry is duplicated.
V4L/DVB (8540): em28xx-cards: Add Compro VideoMate ForYou/Stereo model
V4L/DVB (8539): em28xx-cards: New supported IDs for analog models
V4L/DVB (8538): em28xx-cards: Add GrabBeeX+ USB2800 model
V4L/DVB (8534): remove select's of FW_LOADER
V4L/DVB (8522): videodev2: Fix merge conflict
V4L/DVB (8532): mxl5007t: remove excessive locks
V4L/DVB (8531): mxl5007t: move i2c gate handling outside of mutex protected code blocks
V4L/DVB (8530): au0828: add support for new revision of HVR950Q
V4L/DVB (8529): mxl5007t: enable _init and _sleep power management functionality
V4L/DVB (8528): add support for MaxLinear MxL5007T silicon tuner
V4L/DVB (8526): saa7146: fix VIDIOC_ENUM_FMT
V4L/DVB (8525): fix a few assorted spelling mistakes.
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/videodev.h | 15 | ||||
| -rw-r--r-- | include/linux/videodev2.h | 386 | ||||
| -rw-r--r-- | include/linux/videotext.h | 16 | ||||
| -rw-r--r-- | include/media/audiochip.h | 26 | ||||
| -rw-r--r-- | include/media/saa7146_vv.h | 1 | ||||
| -rw-r--r-- | include/media/tveeprom.h | 7 | ||||
| -rw-r--r-- | include/media/v4l2-chip-ident.h | 7 | ||||
| -rw-r--r-- | include/media/v4l2-common.h | 31 | ||||
| -rw-r--r-- | include/media/v4l2-dev.h | 325 | ||||
| -rw-r--r-- | include/media/v4l2-ioctl.h | 301 |
10 files changed, 538 insertions, 577 deletions
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 9385a566aed8..15a653d41132 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
| @@ -17,6 +17,21 @@ | |||
| 17 | 17 | ||
| 18 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) | 18 | #if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) |
| 19 | 19 | ||
| 20 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
| 21 | #define VID_TYPE_TUNER 2 /* Can tune */ | ||
| 22 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
| 23 | #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
| 24 | #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
| 25 | #define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
| 26 | #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
| 27 | #define VID_TYPE_SCALES 128 /* Scalable */ | ||
| 28 | #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
| 29 | #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
| 30 | #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
| 31 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
| 32 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
| 33 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
| 34 | |||
| 20 | struct video_capability | 35 | struct video_capability |
| 21 | { | 36 | { |
| 22 | char name[32]; | 37 | char name[32]; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 2e66a95e8d32..e466bd54a50e 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -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) */ |
| @@ -259,8 +264,7 @@ struct v4l2_capability | |||
| 259 | /* | 264 | /* |
| 260 | * 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 |
| 261 | */ | 266 | */ |
| 262 | struct v4l2_pix_format | 267 | struct v4l2_pix_format { |
| 263 | { | ||
| 264 | __u32 width; | 268 | __u32 width; |
| 265 | __u32 height; | 269 | __u32 height; |
| 266 | __u32 pixelformat; | 270 | __u32 pixelformat; |
| @@ -272,68 +276,69 @@ struct v4l2_pix_format | |||
| 272 | }; | 276 | }; |
| 273 | 277 | ||
| 274 | /* Pixel format FOURCC depth Description */ | 278 | /* Pixel format FOURCC depth Description */ |
| 275 | #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 */ |
| 276 | #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 */ |
| 277 | #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 */ |
| 278 | #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 */ |
| 279 | #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 */ |
| 280 | #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 */ |
| 281 | #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 */ |
| 282 | #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 */ |
| 283 | #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 */ |
| 284 | #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 */ |
| 285 | #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 */ |
| 286 | #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 */ |
| 287 | #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 */ |
| 288 | #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 */ |
| 289 | #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 */ |
| 290 | #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 */ |
| 291 | #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 */ |
| 292 | #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 */ |
| 293 | #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 */ |
| 294 | #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 */ |
| 295 | #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 */ |
| 296 | #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 */ |
| 297 | #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 */ |
| 298 | #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 */ |
| 299 | 303 | ||
| 300 | /* two planes -- one Y, one Cr + Cb interleaved */ | 304 | /* two planes -- one Y, one Cr + Cb interleaved */ |
| 301 | #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 */ |
| 302 | #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 */ |
| 303 | 307 | ||
| 304 | /* The following formats are not defined in the V4L2 specification */ | 308 | /* The following formats are not defined in the V4L2 specification */ |
| 305 | #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 */ |
| 306 | #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 */ |
| 307 | #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 */ |
| 308 | #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 */ |
| 309 | #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 */ |
| 310 | 314 | ||
| 311 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 315 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
| 312 | #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.. */ |
| 313 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G','B','R','G') /* 8 GBGB.. RGRG.. */ | 317 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
| 314 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2') /* 16 BGBG.. GRGR.. */ | 318 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ |
| 315 | 319 | ||
| 316 | /* compressed formats */ | 320 | /* compressed formats */ |
| 317 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ | 321 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M', 'J', 'P', 'G') /* Motion-JPEG */ |
| 318 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ | 322 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J', 'P', 'E', 'G') /* JFIF JPEG */ |
| 319 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ | 323 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d', 'v', 's', 'd') /* 1394 */ |
| 320 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4 */ | 324 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 */ |
| 321 | 325 | ||
| 322 | /* Vendor-specific formats */ | 326 | /* Vendor-specific formats */ |
| 323 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ | 327 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
| 324 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S','9','1','0') /* SN9C10x compression */ | 328 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
| 325 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P','W','C','1') /* pwc older webcam */ | 329 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ |
| 326 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P','W','C','2') /* pwc newer webcam */ | 330 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ |
| 327 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E','6','2','5') /* ET61X251 compression */ | 331 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ |
| 328 | #define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S','5','0','1') /* YUYV per line */ | 332 | #define V4L2_PIX_FMT_SPCA501 v4l2_fourcc('S', '5', '0', '1') /* YUYV per line */ |
| 329 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S','5','6','1') /* compressed GBRG bayer */ | 333 | #define V4L2_PIX_FMT_SPCA505 v4l2_fourcc('S', '5', '0', '5') /* YYUV per line */ |
| 330 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P','2','0','7') /* compressed BGGR bayer */ | 334 | #define V4L2_PIX_FMT_SPCA508 v4l2_fourcc('S', '5', '0', '8') /* YUVY per line */ |
| 335 | #define V4L2_PIX_FMT_SPCA561 v4l2_fourcc('S', '5', '6', '1') /* compressed GBRG bayer */ | ||
| 336 | #define V4L2_PIX_FMT_PAC207 v4l2_fourcc('P', '2', '0', '7') /* compressed BGGR bayer */ | ||
| 331 | 337 | ||
| 332 | /* | 338 | /* |
| 333 | * F O R M A T E N U M E R A T I O N | 339 | * F O R M A T E N U M E R A T I O N |
| 334 | */ | 340 | */ |
| 335 | struct v4l2_fmtdesc | 341 | struct v4l2_fmtdesc { |
| 336 | { | ||
| 337 | __u32 index; /* Format number */ | 342 | __u32 index; /* Format number */ |
| 338 | enum v4l2_buf_type type; /* buffer type */ | 343 | enum v4l2_buf_type type; /* buffer type */ |
| 339 | __u32 flags; | 344 | __u32 flags; |
| @@ -349,21 +354,18 @@ struct v4l2_fmtdesc | |||
| 349 | /* | 354 | /* |
| 350 | * F R A M E S I Z E E N U M E R A T I O N | 355 | * F R A M E S I Z E E N U M E R A T I O N |
| 351 | */ | 356 | */ |
| 352 | enum v4l2_frmsizetypes | 357 | enum v4l2_frmsizetypes { |
| 353 | { | ||
| 354 | V4L2_FRMSIZE_TYPE_DISCRETE = 1, | 358 | V4L2_FRMSIZE_TYPE_DISCRETE = 1, |
| 355 | V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, | 359 | V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, |
| 356 | V4L2_FRMSIZE_TYPE_STEPWISE = 3, | 360 | V4L2_FRMSIZE_TYPE_STEPWISE = 3, |
| 357 | }; | 361 | }; |
| 358 | 362 | ||
| 359 | struct v4l2_frmsize_discrete | 363 | struct v4l2_frmsize_discrete { |
| 360 | { | ||
| 361 | __u32 width; /* Frame width [pixel] */ | 364 | __u32 width; /* Frame width [pixel] */ |
| 362 | __u32 height; /* Frame height [pixel] */ | 365 | __u32 height; /* Frame height [pixel] */ |
| 363 | }; | 366 | }; |
| 364 | 367 | ||
| 365 | struct v4l2_frmsize_stepwise | 368 | struct v4l2_frmsize_stepwise { |
| 366 | { | ||
| 367 | __u32 min_width; /* Minimum frame width [pixel] */ | 369 | __u32 min_width; /* Minimum frame width [pixel] */ |
| 368 | __u32 max_width; /* Maximum frame width [pixel] */ | 370 | __u32 max_width; /* Maximum frame width [pixel] */ |
| 369 | __u32 step_width; /* Frame width step size [pixel] */ | 371 | __u32 step_width; /* Frame width step size [pixel] */ |
| @@ -372,8 +374,7 @@ struct v4l2_frmsize_stepwise | |||
| 372 | __u32 step_height; /* Frame height step size [pixel] */ | 374 | __u32 step_height; /* Frame height step size [pixel] */ |
| 373 | }; | 375 | }; |
| 374 | 376 | ||
| 375 | struct v4l2_frmsizeenum | 377 | struct v4l2_frmsizeenum { |
| 376 | { | ||
| 377 | __u32 index; /* Frame size number */ | 378 | __u32 index; /* Frame size number */ |
| 378 | __u32 pixel_format; /* Pixel format */ | 379 | __u32 pixel_format; /* Pixel format */ |
| 379 | __u32 type; /* Frame size type the device supports. */ | 380 | __u32 type; /* Frame size type the device supports. */ |
| @@ -389,22 +390,19 @@ struct v4l2_frmsizeenum | |||
| 389 | /* | 390 | /* |
| 390 | * F R A M E R A T E E N U M E R A T I O N | 391 | * F R A M E R A T E E N U M E R A T I O N |
| 391 | */ | 392 | */ |
| 392 | enum v4l2_frmivaltypes | 393 | enum v4l2_frmivaltypes { |
| 393 | { | ||
| 394 | V4L2_FRMIVAL_TYPE_DISCRETE = 1, | 394 | V4L2_FRMIVAL_TYPE_DISCRETE = 1, |
| 395 | V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, | 395 | V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, |
| 396 | V4L2_FRMIVAL_TYPE_STEPWISE = 3, | 396 | V4L2_FRMIVAL_TYPE_STEPWISE = 3, |
| 397 | }; | 397 | }; |
| 398 | 398 | ||
| 399 | struct v4l2_frmival_stepwise | 399 | struct v4l2_frmival_stepwise { |
| 400 | { | ||
| 401 | struct v4l2_fract min; /* Minimum frame interval [s] */ | 400 | struct v4l2_fract min; /* Minimum frame interval [s] */ |
| 402 | struct v4l2_fract max; /* Maximum frame interval [s] */ | 401 | struct v4l2_fract max; /* Maximum frame interval [s] */ |
| 403 | struct v4l2_fract step; /* Frame interval step size [s] */ | 402 | struct v4l2_fract step; /* Frame interval step size [s] */ |
| 404 | }; | 403 | }; |
| 405 | 404 | ||
| 406 | struct v4l2_frmivalenum | 405 | struct v4l2_frmivalenum { |
| 407 | { | ||
| 408 | __u32 index; /* Frame format index */ | 406 | __u32 index; /* Frame format index */ |
| 409 | __u32 pixel_format; /* Pixel format */ | 407 | __u32 pixel_format; /* Pixel format */ |
| 410 | __u32 width; /* Frame width */ | 408 | __u32 width; /* Frame width */ |
| @@ -423,8 +421,7 @@ struct v4l2_frmivalenum | |||
| 423 | /* | 421 | /* |
| 424 | * T I M E C O D E | 422 | * T I M E C O D E |
| 425 | */ | 423 | */ |
| 426 | struct v4l2_timecode | 424 | struct v4l2_timecode { |
| 427 | { | ||
| 428 | __u32 type; | 425 | __u32 type; |
| 429 | __u32 flags; | 426 | __u32 flags; |
| 430 | __u8 frames; | 427 | __u8 frames; |
| @@ -449,8 +446,7 @@ struct v4l2_timecode | |||
| 449 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 | 446 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 |
| 450 | /* The above is based on SMPTE timecodes */ | 447 | /* The above is based on SMPTE timecodes */ |
| 451 | 448 | ||
| 452 | struct v4l2_jpegcompression | 449 | struct v4l2_jpegcompression { |
| 453 | { | ||
| 454 | int quality; | 450 | int quality; |
| 455 | 451 | ||
| 456 | int APPn; /* Number of APP segment to be written, | 452 | int APPn; /* Number of APP segment to be written, |
| @@ -482,16 +478,14 @@ struct v4l2_jpegcompression | |||
| 482 | /* | 478 | /* |
| 483 | * M E M O R Y - M A P P I N G B U F F E R S | 479 | * M E M O R Y - M A P P I N G B U F F E R S |
| 484 | */ | 480 | */ |
| 485 | struct v4l2_requestbuffers | 481 | struct v4l2_requestbuffers { |
| 486 | { | ||
| 487 | __u32 count; | 482 | __u32 count; |
| 488 | enum v4l2_buf_type type; | 483 | enum v4l2_buf_type type; |
| 489 | enum v4l2_memory memory; | 484 | enum v4l2_memory memory; |
| 490 | __u32 reserved[2]; | 485 | __u32 reserved[2]; |
| 491 | }; | 486 | }; |
| 492 | 487 | ||
| 493 | struct v4l2_buffer | 488 | struct v4l2_buffer { |
| 494 | { | ||
| 495 | __u32 index; | 489 | __u32 index; |
| 496 | enum v4l2_buf_type type; | 490 | enum v4l2_buf_type type; |
| 497 | __u32 bytesused; | 491 | __u32 bytesused; |
| @@ -525,13 +519,12 @@ struct v4l2_buffer | |||
| 525 | /* | 519 | /* |
| 526 | * O V E R L A Y P R E V I E W | 520 | * O V E R L A Y P R E V I E W |
| 527 | */ | 521 | */ |
| 528 | struct v4l2_framebuffer | 522 | struct v4l2_framebuffer { |
| 529 | { | ||
| 530 | __u32 capability; | 523 | __u32 capability; |
| 531 | __u32 flags; | 524 | __u32 flags; |
| 532 | /* FIXME: in theory we should pass something like PCI device + memory | 525 | /* FIXME: in theory we should pass something like PCI device + memory |
| 533 | * region + offset instead of some physical address */ | 526 | * region + offset instead of some physical address */ |
| 534 | void* base; | 527 | void *base; |
| 535 | struct v4l2_pix_format fmt; | 528 | struct v4l2_pix_format fmt; |
| 536 | }; | 529 | }; |
| 537 | /* Flags for the 'capability' field. Read only */ | 530 | /* Flags for the 'capability' field. Read only */ |
| @@ -550,14 +543,12 @@ struct v4l2_framebuffer | |||
| 550 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 | 543 | #define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 |
| 551 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 | 544 | #define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 |
| 552 | 545 | ||
| 553 | struct v4l2_clip | 546 | struct v4l2_clip { |
| 554 | { | ||
| 555 | struct v4l2_rect c; | 547 | struct v4l2_rect c; |
| 556 | struct v4l2_clip __user *next; | 548 | struct v4l2_clip __user *next; |
| 557 | }; | 549 | }; |
| 558 | 550 | ||
| 559 | struct v4l2_window | 551 | struct v4l2_window { |
| 560 | { | ||
| 561 | struct v4l2_rect w; | 552 | struct v4l2_rect w; |
| 562 | enum v4l2_field field; | 553 | enum v4l2_field field; |
| 563 | __u32 chromakey; | 554 | __u32 chromakey; |
| @@ -570,8 +561,7 @@ struct v4l2_window | |||
| 570 | /* | 561 | /* |
| 571 | * C A P T U R E P A R A M E T E R S | 562 | * C A P T U R E P A R A M E T E R S |
| 572 | */ | 563 | */ |
| 573 | struct v4l2_captureparm | 564 | struct v4l2_captureparm { |
| 574 | { | ||
| 575 | __u32 capability; /* Supported modes */ | 565 | __u32 capability; /* Supported modes */ |
| 576 | __u32 capturemode; /* Current mode */ | 566 | __u32 capturemode; /* Current mode */ |
| 577 | struct v4l2_fract timeperframe; /* Time per frame in .1us units */ | 567 | struct v4l2_fract timeperframe; /* Time per frame in .1us units */ |
| @@ -584,8 +574,7 @@ struct v4l2_captureparm | |||
| 584 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ | 574 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ |
| 585 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ | 575 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ |
| 586 | 576 | ||
| 587 | struct v4l2_outputparm | 577 | struct v4l2_outputparm { |
| 588 | { | ||
| 589 | __u32 capability; /* Supported modes */ | 578 | __u32 capability; /* Supported modes */ |
| 590 | __u32 outputmode; /* Current mode */ | 579 | __u32 outputmode; /* Current mode */ |
| 591 | struct v4l2_fract timeperframe; /* Time per frame in seconds */ | 580 | struct v4l2_fract timeperframe; /* Time per frame in seconds */ |
| @@ -702,8 +691,7 @@ typedef __u64 v4l2_std_id; | |||
| 702 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ | 691 | #define V4L2_STD_ALL (V4L2_STD_525_60 |\ |
| 703 | V4L2_STD_625_50) | 692 | V4L2_STD_625_50) |
| 704 | 693 | ||
| 705 | struct v4l2_standard | 694 | struct v4l2_standard { |
| 706 | { | ||
| 707 | __u32 index; | 695 | __u32 index; |
| 708 | v4l2_std_id id; | 696 | v4l2_std_id id; |
| 709 | __u8 name[24]; | 697 | __u8 name[24]; |
| @@ -715,8 +703,7 @@ struct v4l2_standard | |||
| 715 | /* | 703 | /* |
| 716 | * V I D E O I N P U T S | 704 | * V I D E O I N P U T S |
| 717 | */ | 705 | */ |
| 718 | struct v4l2_input | 706 | struct v4l2_input { |
| 719 | { | ||
| 720 | __u32 index; /* Which input */ | 707 | __u32 index; /* Which input */ |
| 721 | __u8 name[32]; /* Label */ | 708 | __u8 name[32]; /* Label */ |
| 722 | __u32 type; /* Type of input */ | 709 | __u32 type; /* Type of input */ |
| @@ -753,8 +740,7 @@ struct v4l2_input | |||
| 753 | /* | 740 | /* |
| 754 | * V I D E O O U T P U T S | 741 | * V I D E O O U T P U T S |
| 755 | */ | 742 | */ |
| 756 | struct v4l2_output | 743 | struct v4l2_output { |
| 757 | { | ||
| 758 | __u32 index; /* Which output */ | 744 | __u32 index; /* Which output */ |
| 759 | __u8 name[32]; /* Label */ | 745 | __u8 name[32]; /* Label */ |
| 760 | __u32 type; /* Type of output */ | 746 | __u32 type; /* Type of output */ |
| @@ -771,14 +757,12 @@ struct v4l2_output | |||
| 771 | /* | 757 | /* |
| 772 | * C O N T R O L S | 758 | * C O N T R O L S |
| 773 | */ | 759 | */ |
| 774 | struct v4l2_control | 760 | struct v4l2_control { |
| 775 | { | ||
| 776 | __u32 id; | 761 | __u32 id; |
| 777 | __s32 value; | 762 | __s32 value; |
| 778 | }; | 763 | }; |
| 779 | 764 | ||
| 780 | struct v4l2_ext_control | 765 | struct v4l2_ext_control { |
| 781 | { | ||
| 782 | __u32 id; | 766 | __u32 id; |
| 783 | __u32 reserved2[2]; | 767 | __u32 reserved2[2]; |
| 784 | union { | 768 | union { |
| @@ -788,8 +772,7 @@ struct v4l2_ext_control | |||
| 788 | }; | 772 | }; |
| 789 | } __attribute__ ((packed)); | 773 | } __attribute__ ((packed)); |
| 790 | 774 | ||
| 791 | struct v4l2_ext_controls | 775 | struct v4l2_ext_controls { |
| 792 | { | ||
| 793 | __u32 ctrl_class; | 776 | __u32 ctrl_class; |
| 794 | __u32 count; | 777 | __u32 count; |
| 795 | __u32 error_idx; | 778 | __u32 error_idx; |
| @@ -807,8 +790,7 @@ struct v4l2_ext_controls | |||
| 807 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | 790 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
| 808 | 791 | ||
| 809 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 792 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
| 810 | struct v4l2_queryctrl | 793 | struct v4l2_queryctrl { |
| 811 | { | ||
| 812 | __u32 id; | 794 | __u32 id; |
| 813 | enum v4l2_ctrl_type type; | 795 | enum v4l2_ctrl_type type; |
| 814 | __u8 name[32]; /* Whatever */ | 796 | __u8 name[32]; /* Whatever */ |
| @@ -821,8 +803,7 @@ struct v4l2_queryctrl | |||
| 821 | }; | 803 | }; |
| 822 | 804 | ||
| 823 | /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ | 805 | /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ |
| 824 | struct v4l2_querymenu | 806 | struct v4l2_querymenu { |
| 825 | { | ||
| 826 | __u32 id; | 807 | __u32 id; |
| 827 | __u32 index; | 808 | __u32 index; |
| 828 | __u8 name[32]; /* Whatever */ | 809 | __u8 name[32]; /* Whatever */ |
| @@ -1104,8 +1085,7 @@ enum v4l2_exposure_auto_type { | |||
| 1104 | /* | 1085 | /* |
| 1105 | * T U N I N G | 1086 | * T U N I N G |
| 1106 | */ | 1087 | */ |
| 1107 | struct v4l2_tuner | 1088 | struct v4l2_tuner { |
| 1108 | { | ||
| 1109 | __u32 index; | 1089 | __u32 index; |
| 1110 | __u8 name[32]; | 1090 | __u8 name[32]; |
| 1111 | enum v4l2_tuner_type type; | 1091 | enum v4l2_tuner_type type; |
| @@ -1119,8 +1099,7 @@ struct v4l2_tuner | |||
| 1119 | __u32 reserved[4]; | 1099 | __u32 reserved[4]; |
| 1120 | }; | 1100 | }; |
| 1121 | 1101 | ||
| 1122 | struct v4l2_modulator | 1102 | struct v4l2_modulator { |
| 1123 | { | ||
| 1124 | __u32 index; | 1103 | __u32 index; |
| 1125 | __u8 name[32]; | 1104 | __u8 name[32]; |
| 1126 | __u32 capability; | 1105 | __u32 capability; |
| @@ -1153,8 +1132,7 @@ struct v4l2_modulator | |||
| 1153 | #define V4L2_TUNER_MODE_LANG1 0x0003 | 1132 | #define V4L2_TUNER_MODE_LANG1 0x0003 |
| 1154 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 | 1133 | #define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 |
| 1155 | 1134 | ||
| 1156 | struct v4l2_frequency | 1135 | struct v4l2_frequency { |
| 1157 | { | ||
| 1158 | __u32 tuner; | 1136 | __u32 tuner; |
| 1159 | enum v4l2_tuner_type type; | 1137 | enum v4l2_tuner_type type; |
| 1160 | __u32 frequency; | 1138 | __u32 frequency; |
| @@ -1172,8 +1150,7 @@ struct v4l2_hw_freq_seek { | |||
| 1172 | /* | 1150 | /* |
| 1173 | * A U D I O | 1151 | * A U D I O |
| 1174 | */ | 1152 | */ |
| 1175 | struct v4l2_audio | 1153 | struct v4l2_audio { |
| 1176 | { | ||
| 1177 | __u32 index; | 1154 | __u32 index; |
| 1178 | __u8 name[32]; | 1155 | __u8 name[32]; |
| 1179 | __u32 capability; | 1156 | __u32 capability; |
| @@ -1188,8 +1165,7 @@ struct v4l2_audio | |||
| 1188 | /* Flags for the 'mode' field */ | 1165 | /* Flags for the 'mode' field */ |
| 1189 | #define V4L2_AUDMODE_AVL 0x00001 | 1166 | #define V4L2_AUDMODE_AVL 0x00001 |
| 1190 | 1167 | ||
| 1191 | struct v4l2_audioout | 1168 | struct v4l2_audioout { |
| 1192 | { | ||
| 1193 | __u32 index; | 1169 | __u32 index; |
| 1194 | __u8 name[32]; | 1170 | __u8 name[32]; |
| 1195 | __u32 capability; | 1171 | __u32 capability; |
| @@ -1253,8 +1229,7 @@ struct v4l2_encoder_cmd { | |||
| 1253 | */ | 1229 | */ |
| 1254 | 1230 | ||
| 1255 | /* Raw VBI */ | 1231 | /* Raw VBI */ |
| 1256 | struct v4l2_vbi_format | 1232 | struct v4l2_vbi_format { |
| 1257 | { | ||
| 1258 | __u32 sampling_rate; /* in 1 Hz */ | 1233 | __u32 sampling_rate; /* in 1 Hz */ |
| 1259 | __u32 offset; | 1234 | __u32 offset; |
| 1260 | __u32 samples_per_line; | 1235 | __u32 samples_per_line; |
| @@ -1266,8 +1241,8 @@ struct v4l2_vbi_format | |||
| 1266 | }; | 1241 | }; |
| 1267 | 1242 | ||
| 1268 | /* VBI flags */ | 1243 | /* VBI flags */ |
| 1269 | #define V4L2_VBI_UNSYNC (1<< 0) | 1244 | #define V4L2_VBI_UNSYNC (1 << 0) |
| 1270 | #define V4L2_VBI_INTERLACED (1<< 1) | 1245 | #define V4L2_VBI_INTERLACED (1 << 1) |
| 1271 | 1246 | ||
| 1272 | /* Sliced VBI | 1247 | /* Sliced VBI |
| 1273 | * | 1248 | * |
| @@ -1276,8 +1251,7 @@ struct v4l2_vbi_format | |||
| 1276 | * notice in the definitive implementation. | 1251 | * notice in the definitive implementation. |
| 1277 | */ | 1252 | */ |
| 1278 | 1253 | ||
| 1279 | struct v4l2_sliced_vbi_format | 1254 | struct v4l2_sliced_vbi_format { |
| 1280 | { | ||
| 1281 | __u16 service_set; | 1255 | __u16 service_set; |
| 1282 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 1256 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
| 1283 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 1257 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
| @@ -1301,8 +1275,7 @@ struct v4l2_sliced_vbi_format | |||
| 1301 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | 1275 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
| 1302 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | 1276 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
| 1303 | 1277 | ||
| 1304 | struct v4l2_sliced_vbi_cap | 1278 | struct v4l2_sliced_vbi_cap { |
| 1305 | { | ||
| 1306 | __u16 service_set; | 1279 | __u16 service_set; |
| 1307 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field | 1280 | /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field |
| 1308 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field | 1281 | service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field |
| @@ -1313,8 +1286,7 @@ struct v4l2_sliced_vbi_cap | |||
| 1313 | __u32 reserved[3]; /* must be 0 */ | 1286 | __u32 reserved[3]; /* must be 0 */ |
| 1314 | }; | 1287 | }; |
| 1315 | 1288 | ||
| 1316 | struct v4l2_sliced_vbi_data | 1289 | struct v4l2_sliced_vbi_data { |
| 1317 | { | ||
| 1318 | __u32 id; | 1290 | __u32 id; |
| 1319 | __u32 field; /* 0: first field, 1: second field */ | 1291 | __u32 field; /* 0: first field, 1: second field */ |
| 1320 | __u32 line; /* 1-23 */ | 1292 | __u32 line; /* 1-23 */ |
| @@ -1328,27 +1300,23 @@ struct v4l2_sliced_vbi_data | |||
| 1328 | 1300 | ||
| 1329 | /* Stream data format | 1301 | /* Stream data format |
| 1330 | */ | 1302 | */ |
| 1331 | struct v4l2_format | 1303 | struct v4l2_format { |
| 1332 | { | ||
| 1333 | enum v4l2_buf_type type; | 1304 | enum v4l2_buf_type type; |
| 1334 | union | 1305 | union { |
| 1335 | { | 1306 | struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ |
| 1336 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 1307 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ |
| 1337 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 1308 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
| 1338 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 1309 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
| 1339 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | 1310 | __u8 raw_data[200]; /* user-defined */ |
| 1340 | __u8 raw_data[200]; // user-defined | ||
| 1341 | } fmt; | 1311 | } fmt; |
| 1342 | }; | 1312 | }; |
| 1343 | 1313 | ||
| 1344 | 1314 | ||
| 1345 | /* Stream type-dependent parameters | 1315 | /* Stream type-dependent parameters |
| 1346 | */ | 1316 | */ |
| 1347 | struct v4l2_streamparm | 1317 | struct v4l2_streamparm { |
| 1348 | { | ||
| 1349 | enum v4l2_buf_type type; | 1318 | enum v4l2_buf_type type; |
| 1350 | union | 1319 | union { |
| 1351 | { | ||
| 1352 | struct v4l2_captureparm capture; | 1320 | struct v4l2_captureparm capture; |
| 1353 | struct v4l2_outputparm output; | 1321 | struct v4l2_outputparm output; |
| 1354 | __u8 raw_data[200]; /* user-defined */ | 1322 | __u8 raw_data[200]; /* user-defined */ |
| @@ -1386,92 +1354,86 @@ struct v4l2_chip_ident { | |||
| 1386 | * 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 | 1354 | * 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 |
| 1387 | * | 1355 | * |
| 1388 | */ | 1356 | */ |
| 1389 | #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability) | 1357 | #define VIDIOC_QUERYCAP _IOR('V', 0, struct v4l2_capability) |
| 1390 | #define VIDIOC_RESERVED _IO ('V', 1) | 1358 | #define VIDIOC_RESERVED _IO('V', 1) |
| 1391 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) | 1359 | #define VIDIOC_ENUM_FMT _IOWR('V', 2, struct v4l2_fmtdesc) |
| 1392 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) | 1360 | #define VIDIOC_G_FMT _IOWR('V', 4, struct v4l2_format) |
| 1393 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) | 1361 | #define VIDIOC_S_FMT _IOWR('V', 5, struct v4l2_format) |
| 1394 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) | 1362 | #define VIDIOC_REQBUFS _IOWR('V', 8, struct v4l2_requestbuffers) |
| 1395 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) | 1363 | #define VIDIOC_QUERYBUF _IOWR('V', 9, struct v4l2_buffer) |
| 1396 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) | 1364 | #define VIDIOC_G_FBUF _IOR('V', 10, struct v4l2_framebuffer) |
| 1397 | #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer) | 1365 | #define VIDIOC_S_FBUF _IOW('V', 11, struct v4l2_framebuffer) |
| 1398 | #define VIDIOC_OVERLAY _IOW ('V', 14, int) | 1366 | #define VIDIOC_OVERLAY _IOW('V', 14, int) |
| 1399 | #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer) | 1367 | #define VIDIOC_QBUF _IOWR('V', 15, struct v4l2_buffer) |
| 1400 | #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer) | 1368 | #define VIDIOC_DQBUF _IOWR('V', 17, struct v4l2_buffer) |
| 1401 | #define VIDIOC_STREAMON _IOW ('V', 18, int) | 1369 | #define VIDIOC_STREAMON _IOW('V', 18, int) |
| 1402 | #define VIDIOC_STREAMOFF _IOW ('V', 19, int) | 1370 | #define VIDIOC_STREAMOFF _IOW('V', 19, int) |
| 1403 | #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm) | 1371 | #define VIDIOC_G_PARM _IOWR('V', 21, struct v4l2_streamparm) |
| 1404 | #define VIDIOC_S_PARM _IOWR ('V', 22, struct v4l2_streamparm) | 1372 | #define VIDIOC_S_PARM _IOWR('V', 22, struct v4l2_streamparm) |
| 1405 | #define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id) | 1373 | #define VIDIOC_G_STD _IOR('V', 23, v4l2_std_id) |
| 1406 | #define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id) | 1374 | #define VIDIOC_S_STD _IOW('V', 24, v4l2_std_id) |
| 1407 | #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard) | 1375 | #define VIDIOC_ENUMSTD _IOWR('V', 25, struct v4l2_standard) |
| 1408 | #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input) | 1376 | #define VIDIOC_ENUMINPUT _IOWR('V', 26, struct v4l2_input) |
| 1409 | #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control) | 1377 | #define VIDIOC_G_CTRL _IOWR('V', 27, struct v4l2_control) |
| 1410 | #define VIDIOC_S_CTRL _IOWR ('V', 28, struct v4l2_control) | 1378 | #define VIDIOC_S_CTRL _IOWR('V', 28, struct v4l2_control) |
| 1411 | #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner) | 1379 | #define VIDIOC_G_TUNER _IOWR('V', 29, struct v4l2_tuner) |
| 1412 | #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner) | 1380 | #define VIDIOC_S_TUNER _IOW('V', 30, struct v4l2_tuner) |
| 1413 | #define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio) | 1381 | #define VIDIOC_G_AUDIO _IOR('V', 33, struct v4l2_audio) |
| 1414 | #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio) | 1382 | #define VIDIOC_S_AUDIO _IOW('V', 34, struct v4l2_audio) |
| 1415 | #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl) | 1383 | #define VIDIOC_QUERYCTRL _IOWR('V', 36, struct v4l2_queryctrl) |
| 1416 | #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu) | 1384 | #define VIDIOC_QUERYMENU _IOWR('V', 37, struct v4l2_querymenu) |
| 1417 | #define VIDIOC_G_INPUT _IOR ('V', 38, int) | 1385 | #define VIDIOC_G_INPUT _IOR('V', 38, int) |
| 1418 | #define VIDIOC_S_INPUT _IOWR ('V', 39, int) | 1386 | #define VIDIOC_S_INPUT _IOWR('V', 39, int) |
| 1419 | #define VIDIOC_G_OUTPUT _IOR ('V', 46, int) | 1387 | #define VIDIOC_G_OUTPUT _IOR('V', 46, int) |
| 1420 | #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int) | 1388 | #define VIDIOC_S_OUTPUT _IOWR('V', 47, int) |
| 1421 | #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output) | 1389 | #define VIDIOC_ENUMOUTPUT _IOWR('V', 48, struct v4l2_output) |
| 1422 | #define VIDIOC_G_AUDOUT _IOR ('V', 49, struct v4l2_audioout) | 1390 | #define VIDIOC_G_AUDOUT _IOR('V', 49, struct v4l2_audioout) |
| 1423 | #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout) | 1391 | #define VIDIOC_S_AUDOUT _IOW('V', 50, struct v4l2_audioout) |
| 1424 | #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator) | 1392 | #define VIDIOC_G_MODULATOR _IOWR('V', 54, struct v4l2_modulator) |
| 1425 | #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator) | 1393 | #define VIDIOC_S_MODULATOR _IOW('V', 55, struct v4l2_modulator) |
| 1426 | #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) | 1394 | #define VIDIOC_G_FREQUENCY _IOWR('V', 56, struct v4l2_frequency) |
| 1427 | #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) | 1395 | #define VIDIOC_S_FREQUENCY _IOW('V', 57, struct v4l2_frequency) |
| 1428 | #define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap) | 1396 | #define VIDIOC_CROPCAP _IOWR('V', 58, struct v4l2_cropcap) |
| 1429 | #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) | 1397 | #define VIDIOC_G_CROP _IOWR('V', 59, struct v4l2_crop) |
| 1430 | #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) | 1398 | #define VIDIOC_S_CROP _IOW('V', 60, struct v4l2_crop) |
| 1431 | #define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression) | 1399 | #define VIDIOC_G_JPEGCOMP _IOR('V', 61, struct v4l2_jpegcompression) |
| 1432 | #define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression) | 1400 | #define VIDIOC_S_JPEGCOMP _IOW('V', 62, struct v4l2_jpegcompression) |
| 1433 | #define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id) | 1401 | #define VIDIOC_QUERYSTD _IOR('V', 63, v4l2_std_id) |
| 1434 | #define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format) | 1402 | #define VIDIOC_TRY_FMT _IOWR('V', 64, struct v4l2_format) |
| 1435 | #define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio) | 1403 | #define VIDIOC_ENUMAUDIO _IOWR('V', 65, struct v4l2_audio) |
| 1436 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 1404 | #define VIDIOC_ENUMAUDOUT _IOWR('V', 66, struct v4l2_audioout) |
| 1437 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 1405 | #define VIDIOC_G_PRIORITY _IOR('V', 67, enum v4l2_priority) |
| 1438 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 1406 | #define VIDIOC_S_PRIORITY _IOW('V', 68, enum v4l2_priority) |
| 1439 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) | 1407 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR('V', 69, struct v4l2_sliced_vbi_cap) |
| 1440 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1408 | #define VIDIOC_LOG_STATUS _IO('V', 70) |
| 1441 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | 1409 | #define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls) |
| 1442 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) | 1410 | #define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls) |
| 1443 | #define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls) | 1411 | #define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls) |
| 1444 | #if 1 | 1412 | #if 1 |
| 1445 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) | 1413 | #define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum) |
| 1446 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) | 1414 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum) |
| 1447 | #define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx) | 1415 | #define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) |
| 1448 | #define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd) | 1416 | #define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) |
| 1449 | #define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd) | 1417 | #define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) |
| 1450 | 1418 | ||
| 1451 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 1419 | /* Experimental, only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ |
| 1452 | #define VIDIOC_DBG_S_REGISTER _IOW ('V', 79, struct v4l2_register) | 1420 | #define VIDIOC_DBG_S_REGISTER _IOW('V', 79, struct v4l2_register) |
| 1453 | #define VIDIOC_DBG_G_REGISTER _IOWR ('V', 80, struct v4l2_register) | 1421 | #define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_register) |
| 1454 | 1422 | ||
| 1455 | #define VIDIOC_G_CHIP_IDENT _IOWR ('V', 81, struct v4l2_chip_ident) | 1423 | #define VIDIOC_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_chip_ident) |
| 1456 | #endif | 1424 | #endif |
| 1457 | #define VIDIOC_S_HW_FREQ_SEEK _IOW ('V', 82, struct v4l2_hw_freq_seek) | 1425 | #define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) |
| 1458 | 1426 | ||
| 1459 | #ifdef __OLD_VIDIOC_ | 1427 | #ifdef __OLD_VIDIOC_ |
| 1460 | /* for compatibility, will go away some day */ | 1428 | /* for compatibility, will go away some day */ |
| 1461 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 1429 | #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int) |
| 1462 | #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) | 1430 | #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm) |
| 1463 | #define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control) | 1431 | #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control) |
| 1464 | #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) | 1432 | #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio) |
| 1465 | #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) | 1433 | #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout) |
| 1466 | #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) | 1434 | #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap) |
| 1467 | #endif | 1435 | #endif |
| 1468 | 1436 | ||
| 1469 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ | 1437 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |
| 1470 | 1438 | ||
| 1471 | #endif /* __LINUX_VIDEODEV2_H */ | 1439 | #endif /* __LINUX_VIDEODEV2_H */ |
| 1472 | |||
| 1473 | /* | ||
| 1474 | * Local variables: | ||
| 1475 | * c-basic-offset: 8 | ||
| 1476 | * End: | ||
| 1477 | */ | ||
diff --git a/include/linux/videotext.h b/include/linux/videotext.h index 018f92047ff8..3e68c8d1c7f7 100644 --- a/include/linux/videotext.h +++ b/include/linux/videotext.h | |||
| @@ -45,10 +45,10 @@ | |||
| 45 | #define VTXIOCCLRCACHE_OLD 0x710b /* clear cache on VTX-interface (if avail.) */ | 45 | #define VTXIOCCLRCACHE_OLD 0x710b /* clear cache on VTX-interface (if avail.) */ |
| 46 | #define VTXIOCSETVIRT_OLD 0x710c /* turn on virtual mode (this disables TV-display) */ | 46 | #define VTXIOCSETVIRT_OLD 0x710c /* turn on virtual mode (this disables TV-display) */ |
| 47 | 47 | ||
| 48 | /* | 48 | /* |
| 49 | * Definitions for VTXIOCGETINFO | 49 | * Definitions for VTXIOCGETINFO |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | #define SAA5243 0 | 52 | #define SAA5243 0 |
| 53 | #define SAA5246 1 | 53 | #define SAA5246 1 |
| 54 | #define SAA5249 2 | 54 | #define SAA5249 2 |
| @@ -57,10 +57,10 @@ | |||
| 57 | 57 | ||
| 58 | typedef struct { | 58 | typedef struct { |
| 59 | int version_major, version_minor; /* version of driver; if version_major changes, driver */ | 59 | int version_major, version_minor; /* version of driver; if version_major changes, driver */ |
| 60 | /* is not backward compatible!!! CHECK THIS!!! */ | 60 | /* is not backward compatible!!! CHECK THIS!!! */ |
| 61 | int numpages; /* number of page-buffers of vtx-chipset */ | 61 | int numpages; /* number of page-buffers of vtx-chipset */ |
| 62 | int cct_type; /* type of vtx-chipset (SAA5243, SAA5246, SAA5248 or | 62 | int cct_type; /* type of vtx-chipset (SAA5243, SAA5246, SAA5248 or |
| 63 | * SAA5249) */ | 63 | * SAA5249) */ |
| 64 | } | 64 | } |
| 65 | vtx_info_t; | 65 | vtx_info_t; |
| 66 | 66 | ||
| @@ -81,7 +81,7 @@ vtx_info_t; | |||
| 81 | #define PGMASK_HOUR (HR_TEN | HR_UNIT) | 81 | #define PGMASK_HOUR (HR_TEN | HR_UNIT) |
| 82 | #define PGMASK_MINUTE (MIN_TEN | MIN_UNIT) | 82 | #define PGMASK_MINUTE (MIN_TEN | MIN_UNIT) |
| 83 | 83 | ||
| 84 | typedef struct | 84 | typedef struct |
| 85 | { | 85 | { |
| 86 | int page; /* number of requested page (hexadecimal) */ | 86 | int page; /* number of requested page (hexadecimal) */ |
| 87 | int hour; /* requested hour (hexadecimal) */ | 87 | int hour; /* requested hour (hexadecimal) */ |
| @@ -98,11 +98,11 @@ vtx_pagereq_t; | |||
| 98 | /* | 98 | /* |
| 99 | * Definitions for VTXIOC{GETSTAT,PUTSTAT} | 99 | * Definitions for VTXIOC{GETSTAT,PUTSTAT} |
| 100 | */ | 100 | */ |
| 101 | 101 | ||
| 102 | #define VTX_PAGESIZE (40 * 24) | 102 | #define VTX_PAGESIZE (40 * 24) |
| 103 | #define VTX_VIRTUALSIZE (40 * 49) | 103 | #define VTX_VIRTUALSIZE (40 * 49) |
| 104 | 104 | ||
| 105 | typedef struct | 105 | typedef struct |
| 106 | { | 106 | { |
| 107 | int pagenum; /* number of page (hexadecimal) */ | 107 | int pagenum; /* number of page (hexadecimal) */ |
| 108 | int hour; /* hour (hexadecimal) */ | 108 | int hour; /* hour (hexadecimal) */ |
| @@ -121,5 +121,5 @@ typedef struct | |||
| 121 | unsigned hamming : 1; /* hamming-error occurred */ | 121 | unsigned hamming : 1; /* hamming-error occurred */ |
| 122 | } | 122 | } |
| 123 | vtx_pageinfo_t; | 123 | vtx_pageinfo_t; |
| 124 | 124 | ||
| 125 | #endif /* _VTX_H */ | 125 | #endif /* _VTX_H */ |
diff --git a/include/media/audiochip.h b/include/media/audiochip.h index db8823d45a7d..e69de29bb2d1 100644 --- a/include/media/audiochip.h +++ b/include/media/audiochip.h | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | /* | ||
| 2 | */ | ||
| 3 | |||
| 4 | #ifndef AUDIOCHIP_H | ||
| 5 | #define AUDIOCHIP_H | ||
| 6 | |||
| 7 | enum audiochip { | ||
| 8 | AUDIO_CHIP_NONE, | ||
| 9 | AUDIO_CHIP_UNKNOWN, | ||
| 10 | /* Provided by video chip */ | ||
| 11 | AUDIO_CHIP_INTERNAL, | ||
| 12 | /* Provided by tvaudio.c */ | ||
| 13 | AUDIO_CHIP_TDA8425, | ||
| 14 | AUDIO_CHIP_TEA6300, | ||
| 15 | AUDIO_CHIP_TEA6420, | ||
| 16 | AUDIO_CHIP_TDA9840, | ||
| 17 | AUDIO_CHIP_TDA985X, | ||
| 18 | AUDIO_CHIP_TDA9874, | ||
| 19 | AUDIO_CHIP_PIC16C54, | ||
| 20 | /* Provided by msp3400.c */ | ||
| 21 | AUDIO_CHIP_MSP34XX, | ||
| 22 | /* Provided by wm8775.c */ | ||
| 23 | AUDIO_CHIP_WM8775 | ||
| 24 | }; | ||
| 25 | |||
| 26 | #endif /* AUDIOCHIP_H */ | ||
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 89c442eb8849..1d104096619c 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __SAA7146_VV__ | 2 | #define __SAA7146_VV__ |
| 3 | 3 | ||
| 4 | #include <media/v4l2-common.h> | 4 | #include <media/v4l2-common.h> |
| 5 | #include <media/v4l2-ioctl.h> | ||
| 5 | #include <media/saa7146.h> | 6 | #include <media/saa7146.h> |
| 6 | #include <media/videobuf-dma-sg.h> | 7 | #include <media/videobuf-dma-sg.h> |
| 7 | 8 | ||
diff --git a/include/media/tveeprom.h b/include/media/tveeprom.h index 5660ea24996b..a8ad75a9152a 100644 --- a/include/media/tveeprom.h +++ b/include/media/tveeprom.h | |||
| @@ -3,7 +3,12 @@ | |||
| 3 | 3 | ||
| 4 | struct tveeprom { | 4 | struct tveeprom { |
| 5 | u32 has_radio; | 5 | u32 has_radio; |
| 6 | u32 has_ir; /* bit 0: IR receiver present, bit 1: IR transmitter (blaster) present. -1 == unknown */ | 6 | /* If has_ir == 0, then it is unknown what the IR capabilities are, |
| 7 | otherwise: | ||
| 8 | bit 0: 1 (= IR capabilities are known) | ||
| 9 | bit 1: IR receiver present | ||
| 10 | bit 2: IR transmitter (blaster) present */ | ||
| 11 | u32 has_ir; | ||
| 7 | u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */ | 12 | u32 has_MAC_address; /* 0: no MAC, 1: MAC present, 2: unknown */ |
| 8 | 13 | ||
| 9 | u32 tuner_type; | 14 | u32 tuner_type; |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 2a527742701a..41b509babf3f 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
| @@ -90,7 +90,10 @@ enum { | |||
| 90 | /* module m52790: just ident 52790 */ | 90 | /* module m52790: just ident 52790 */ |
| 91 | V4L2_IDENT_M52790 = 52790, | 91 | V4L2_IDENT_M52790 = 52790, |
| 92 | 92 | ||
| 93 | /* module msp34xx: reserved range 34000-34999 */ | 93 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ |
| 94 | V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only | ||
| 95 | use internally (tveeprom.c). */ | ||
| 96 | |||
| 94 | V4L2_IDENT_MSP3400B = 34002, | 97 | V4L2_IDENT_MSP3400B = 34002, |
| 95 | V4L2_IDENT_MSP3410B = 34102, | 98 | V4L2_IDENT_MSP3410B = 34102, |
| 96 | 99 | ||
| @@ -142,7 +145,7 @@ enum { | |||
| 142 | V4L2_IDENT_MSP3457G = 34577, | 145 | V4L2_IDENT_MSP3457G = 34577, |
| 143 | V4L2_IDENT_MSP3467G = 34677, | 146 | V4L2_IDENT_MSP3467G = 34677, |
| 144 | 147 | ||
| 145 | /* module msp44xx: reserved range 44000-44999 */ | 148 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ |
| 146 | V4L2_IDENT_MSP4400G = 44007, | 149 | V4L2_IDENT_MSP4400G = 44007, |
| 147 | V4L2_IDENT_MSP4410G = 44107, | 150 | V4L2_IDENT_MSP4410G = 44107, |
| 148 | V4L2_IDENT_MSP4420G = 44207, | 151 | V4L2_IDENT_MSP4420G = 44207, |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 020d05758bd8..07d3a9a575d1 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -28,12 +28,6 @@ | |||
| 28 | 28 | ||
| 29 | #include <media/v4l2-dev.h> | 29 | #include <media/v4l2-dev.h> |
| 30 | 30 | ||
| 31 | /* v4l debugging and diagnostics */ | ||
| 32 | |||
| 33 | /* Debug bitmask flags to be used on V4L2 */ | ||
| 34 | #define V4L2_DEBUG_IOCTL 0x01 | ||
| 35 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | ||
| 36 | |||
| 37 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique | 31 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique |
| 38 | prefix consisting of the driver name, the adapter number and the i2c | 32 | prefix consisting of the driver name, the adapter number and the i2c |
| 39 | address. */ | 33 | address. */ |
| @@ -61,21 +55,20 @@ | |||
| 61 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ | 55 | v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ |
| 62 | } while (0) | 56 | } while (0) |
| 63 | 57 | ||
| 58 | /* ------------------------------------------------------------------------- */ | ||
| 64 | 59 | ||
| 65 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | 60 | /* Priority helper functions */ |
| 66 | #define v4l_print_ioctl(name, cmd) \ | ||
| 67 | do { \ | ||
| 68 | printk(KERN_DEBUG "%s: ", name); \ | ||
| 69 | v4l_printk_ioctl(cmd); \ | ||
| 70 | } while (0) | ||
| 71 | 61 | ||
| 72 | /* Use this macro in I2C drivers where 'client' is the struct i2c_client | 62 | struct v4l2_prio_state { |
| 73 | pointer */ | 63 | atomic_t prios[4]; |
| 74 | #define v4l_i2c_print_ioctl(client, cmd) \ | 64 | }; |
| 75 | do { \ | 65 | int v4l2_prio_init(struct v4l2_prio_state *global); |
| 76 | v4l_client_printk(KERN_DEBUG, client, ""); \ | 66 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, |
| 77 | v4l_printk_ioctl(cmd); \ | 67 | enum v4l2_priority new); |
| 78 | } while (0) | 68 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); |
| 69 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 70 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
| 71 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 79 | 72 | ||
| 80 | /* ------------------------------------------------------------------------- */ | 73 | /* ------------------------------------------------------------------------- */ |
| 81 | 74 | ||
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 33f379b1ecfe..2745e1afc722 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #ifndef _V4L2_DEV_H | 9 | #ifndef _V4L2_DEV_H |
| 10 | #define _V4L2_DEV_H | 10 | #define _V4L2_DEV_H |
| 11 | 11 | ||
| 12 | #define OBSOLETE_OWNER 1 /* to be removed soon */ | ||
| 13 | #define OBSOLETE_DEVDATA 1 /* to be removed soon */ | 12 | #define OBSOLETE_DEVDATA 1 /* to be removed soon */ |
| 14 | 13 | ||
| 15 | #include <linux/poll.h> | 14 | #include <linux/poll.h> |
| @@ -17,11 +16,7 @@ | |||
| 17 | #include <linux/device.h> | 16 | #include <linux/device.h> |
| 18 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
| 19 | #include <linux/compiler.h> /* need __user */ | 18 | #include <linux/compiler.h> /* need __user */ |
| 20 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 21 | #include <linux/videodev.h> | ||
| 22 | #else | ||
| 23 | #include <linux/videodev2.h> | 19 | #include <linux/videodev2.h> |
| 24 | #endif | ||
| 25 | 20 | ||
| 26 | #define VIDEO_MAJOR 81 | 21 | #define VIDEO_MAJOR 81 |
| 27 | /* Minor device allocation */ | 22 | /* Minor device allocation */ |
| @@ -39,42 +34,7 @@ | |||
| 39 | #define VFL_TYPE_RADIO 2 | 34 | #define VFL_TYPE_RADIO 2 |
| 40 | #define VFL_TYPE_VTX 3 | 35 | #define VFL_TYPE_VTX 3 |
| 41 | 36 | ||
| 42 | /* Video standard functions */ | 37 | struct v4l2_ioctl_callbacks; |
| 43 | extern const char *v4l2_norm_to_name(v4l2_std_id id); | ||
| 44 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | ||
| 45 | int id, const char *name); | ||
| 46 | /* Prints the ioctl in a human-readable format */ | ||
| 47 | extern void v4l_printk_ioctl(unsigned int cmd); | ||
| 48 | |||
| 49 | /* prority handling */ | ||
| 50 | struct v4l2_prio_state { | ||
| 51 | atomic_t prios[4]; | ||
| 52 | }; | ||
| 53 | int v4l2_prio_init(struct v4l2_prio_state *global); | ||
| 54 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
| 55 | enum v4l2_priority new); | ||
| 56 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 57 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 58 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
| 59 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
| 60 | |||
| 61 | /* names for fancy debug output */ | ||
| 62 | extern const char *v4l2_field_names[]; | ||
| 63 | extern const char *v4l2_type_names[]; | ||
| 64 | |||
| 65 | /* Compatibility layer interface -- v4l1-compat module */ | ||
| 66 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | ||
| 67 | unsigned int cmd, void *arg); | ||
| 68 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 69 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | ||
| 70 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | ||
| 71 | #else | ||
| 72 | #define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL | ||
| 73 | #endif | ||
| 74 | |||
| 75 | /* 32 Bits compatibility layer for 64 bits processors */ | ||
| 76 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
| 77 | unsigned long arg); | ||
| 78 | 38 | ||
| 79 | /* | 39 | /* |
| 80 | * Newer version of video_device, handled by videodev2.c | 40 | * Newer version of video_device, handled by videodev2.c |
| @@ -88,18 +48,17 @@ struct video_device | |||
| 88 | const struct file_operations *fops; | 48 | const struct file_operations *fops; |
| 89 | 49 | ||
| 90 | /* sysfs */ | 50 | /* sysfs */ |
| 91 | struct device class_dev; /* v4l device */ | 51 | struct device dev; /* v4l device */ |
| 92 | struct device *dev; /* device parent */ | 52 | struct device *parent; /* device parent */ |
| 93 | 53 | ||
| 94 | /* device info */ | 54 | /* device info */ |
| 95 | char name[32]; | 55 | char name[32]; |
| 96 | int type; /* v4l1 */ | 56 | int vfl_type; |
| 97 | int type2; /* v4l2 */ | ||
| 98 | int minor; | 57 | int minor; |
| 99 | /* attribute to diferentiate multiple indexs on one physical device */ | 58 | /* attribute to differentiate multiple indices on one physical device */ |
| 100 | int index; | 59 | int index; |
| 101 | 60 | ||
| 102 | int debug; /* Activates debug level*/ | 61 | int debug; /* Activates debug level*/ |
| 103 | 62 | ||
| 104 | /* Video standard vars */ | 63 | /* Video standard vars */ |
| 105 | v4l2_std_id tvnorms; /* Supported tv norms */ | 64 | v4l2_std_id tvnorms; /* Supported tv norms */ |
| @@ -109,285 +68,36 @@ struct video_device | |||
| 109 | void (*release)(struct video_device *vfd); | 68 | void (*release)(struct video_device *vfd); |
| 110 | 69 | ||
| 111 | /* ioctl callbacks */ | 70 | /* ioctl callbacks */ |
| 71 | const struct v4l2_ioctl_ops *ioctl_ops; | ||
| 112 | 72 | ||
| 113 | /* VIDIOC_QUERYCAP handler */ | 73 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ |
| 114 | int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); | 74 | /* dev->driver_data will be used instead some day. |
| 115 | 75 | * Use the video_{get|set}_drvdata() helper functions, | |
| 116 | /* Priority handling */ | 76 | * so the switch over will be transparent for you. |
| 117 | int (*vidioc_g_priority) (struct file *file, void *fh, | 77 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ |
| 118 | enum v4l2_priority *p); | 78 | void *priv; |
| 119 | int (*vidioc_s_priority) (struct file *file, void *fh, | ||
| 120 | enum v4l2_priority p); | ||
| 121 | |||
| 122 | /* VIDIOC_ENUM_FMT handlers */ | ||
| 123 | int (*vidioc_enum_fmt_vid_cap) (struct file *file, void *fh, | ||
| 124 | struct v4l2_fmtdesc *f); | ||
| 125 | int (*vidioc_enum_fmt_vid_overlay) (struct file *file, void *fh, | ||
| 126 | struct v4l2_fmtdesc *f); | ||
| 127 | int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh, | ||
| 128 | struct v4l2_fmtdesc *f); | ||
| 129 | #if 1 | ||
| 130 | /* deprecated, will be removed in 2.6.28 */ | ||
| 131 | int (*vidioc_enum_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 132 | struct v4l2_fmtdesc *f); | ||
| 133 | #endif | ||
| 134 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | ||
| 135 | struct v4l2_fmtdesc *f); | ||
| 136 | |||
| 137 | /* VIDIOC_G_FMT handlers */ | ||
| 138 | int (*vidioc_g_fmt_vid_cap) (struct file *file, void *fh, | ||
| 139 | struct v4l2_format *f); | ||
| 140 | int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 141 | struct v4l2_format *f); | ||
| 142 | int (*vidioc_g_fmt_vid_out) (struct file *file, void *fh, | ||
| 143 | struct v4l2_format *f); | ||
| 144 | int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 145 | struct v4l2_format *f); | ||
| 146 | int (*vidioc_g_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 147 | struct v4l2_format *f); | ||
| 148 | int (*vidioc_g_fmt_vbi_out) (struct file *file, void *fh, | ||
| 149 | struct v4l2_format *f); | ||
| 150 | int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 151 | struct v4l2_format *f); | ||
| 152 | int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 153 | struct v4l2_format *f); | ||
| 154 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | ||
| 155 | struct v4l2_format *f); | ||
| 156 | |||
| 157 | /* VIDIOC_S_FMT handlers */ | ||
| 158 | int (*vidioc_s_fmt_vid_cap) (struct file *file, void *fh, | ||
| 159 | struct v4l2_format *f); | ||
| 160 | int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 161 | struct v4l2_format *f); | ||
| 162 | int (*vidioc_s_fmt_vid_out) (struct file *file, void *fh, | ||
| 163 | struct v4l2_format *f); | ||
| 164 | int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 165 | struct v4l2_format *f); | ||
| 166 | int (*vidioc_s_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 167 | struct v4l2_format *f); | ||
| 168 | int (*vidioc_s_fmt_vbi_out) (struct file *file, void *fh, | ||
| 169 | struct v4l2_format *f); | ||
| 170 | int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 171 | struct v4l2_format *f); | ||
| 172 | int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 173 | struct v4l2_format *f); | ||
| 174 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | ||
| 175 | struct v4l2_format *f); | ||
| 176 | |||
| 177 | /* VIDIOC_TRY_FMT handlers */ | ||
| 178 | int (*vidioc_try_fmt_vid_cap) (struct file *file, void *fh, | ||
| 179 | struct v4l2_format *f); | ||
| 180 | int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 181 | struct v4l2_format *f); | ||
| 182 | int (*vidioc_try_fmt_vid_out) (struct file *file, void *fh, | ||
| 183 | struct v4l2_format *f); | ||
| 184 | int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 185 | struct v4l2_format *f); | ||
| 186 | int (*vidioc_try_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 187 | struct v4l2_format *f); | ||
| 188 | int (*vidioc_try_fmt_vbi_out) (struct file *file, void *fh, | ||
| 189 | struct v4l2_format *f); | ||
| 190 | int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 191 | struct v4l2_format *f); | ||
| 192 | int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 193 | struct v4l2_format *f); | ||
| 194 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | ||
| 195 | struct v4l2_format *f); | ||
| 196 | |||
| 197 | /* Buffer handlers */ | ||
| 198 | int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b); | ||
| 199 | int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 200 | int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 201 | int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 202 | |||
| 203 | |||
| 204 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); | ||
| 205 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 206 | /* buffer type is struct vidio_mbuf * */ | ||
| 207 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); | ||
| 208 | #endif | ||
| 209 | int (*vidioc_g_fbuf) (struct file *file, void *fh, | ||
| 210 | struct v4l2_framebuffer *a); | ||
| 211 | int (*vidioc_s_fbuf) (struct file *file, void *fh, | ||
| 212 | struct v4l2_framebuffer *a); | ||
| 213 | |||
| 214 | /* Stream on/off */ | ||
| 215 | int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 216 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 217 | |||
| 218 | /* Standard handling | ||
| 219 | ENUMSTD is handled by videodev.c | ||
| 220 | */ | ||
| 221 | int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm); | ||
| 222 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); | ||
| 223 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | ||
| 224 | |||
| 225 | /* Input handling */ | ||
| 226 | int (*vidioc_enum_input)(struct file *file, void *fh, | ||
| 227 | struct v4l2_input *inp); | ||
| 228 | int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i); | ||
| 229 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); | ||
| 230 | |||
| 231 | /* Output handling */ | ||
| 232 | int (*vidioc_enum_output) (struct file *file, void *fh, | ||
| 233 | struct v4l2_output *a); | ||
| 234 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); | ||
| 235 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); | ||
| 236 | |||
| 237 | /* Control handling */ | ||
| 238 | int (*vidioc_queryctrl) (struct file *file, void *fh, | ||
| 239 | struct v4l2_queryctrl *a); | ||
| 240 | int (*vidioc_g_ctrl) (struct file *file, void *fh, | ||
| 241 | struct v4l2_control *a); | ||
| 242 | int (*vidioc_s_ctrl) (struct file *file, void *fh, | ||
| 243 | struct v4l2_control *a); | ||
| 244 | int (*vidioc_g_ext_ctrls) (struct file *file, void *fh, | ||
| 245 | struct v4l2_ext_controls *a); | ||
| 246 | int (*vidioc_s_ext_ctrls) (struct file *file, void *fh, | ||
| 247 | struct v4l2_ext_controls *a); | ||
| 248 | int (*vidioc_try_ext_ctrls) (struct file *file, void *fh, | ||
| 249 | struct v4l2_ext_controls *a); | ||
| 250 | int (*vidioc_querymenu) (struct file *file, void *fh, | ||
| 251 | struct v4l2_querymenu *a); | ||
| 252 | |||
| 253 | /* Audio ioctls */ | ||
| 254 | int (*vidioc_enumaudio) (struct file *file, void *fh, | ||
| 255 | struct v4l2_audio *a); | ||
| 256 | int (*vidioc_g_audio) (struct file *file, void *fh, | ||
| 257 | struct v4l2_audio *a); | ||
| 258 | int (*vidioc_s_audio) (struct file *file, void *fh, | ||
| 259 | struct v4l2_audio *a); | ||
| 260 | |||
| 261 | /* Audio out ioctls */ | ||
| 262 | int (*vidioc_enumaudout) (struct file *file, void *fh, | ||
| 263 | struct v4l2_audioout *a); | ||
| 264 | int (*vidioc_g_audout) (struct file *file, void *fh, | ||
| 265 | struct v4l2_audioout *a); | ||
| 266 | int (*vidioc_s_audout) (struct file *file, void *fh, | ||
| 267 | struct v4l2_audioout *a); | ||
| 268 | int (*vidioc_g_modulator) (struct file *file, void *fh, | ||
| 269 | struct v4l2_modulator *a); | ||
| 270 | int (*vidioc_s_modulator) (struct file *file, void *fh, | ||
| 271 | struct v4l2_modulator *a); | ||
| 272 | /* Crop ioctls */ | ||
| 273 | int (*vidioc_cropcap) (struct file *file, void *fh, | ||
| 274 | struct v4l2_cropcap *a); | ||
| 275 | int (*vidioc_g_crop) (struct file *file, void *fh, | ||
| 276 | struct v4l2_crop *a); | ||
| 277 | int (*vidioc_s_crop) (struct file *file, void *fh, | ||
| 278 | struct v4l2_crop *a); | ||
| 279 | /* Compression ioctls */ | ||
| 280 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, | ||
| 281 | struct v4l2_jpegcompression *a); | ||
| 282 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | ||
| 283 | struct v4l2_jpegcompression *a); | ||
| 284 | int (*vidioc_g_enc_index) (struct file *file, void *fh, | ||
| 285 | struct v4l2_enc_idx *a); | ||
| 286 | int (*vidioc_encoder_cmd) (struct file *file, void *fh, | ||
| 287 | struct v4l2_encoder_cmd *a); | ||
| 288 | int (*vidioc_try_encoder_cmd) (struct file *file, void *fh, | ||
| 289 | struct v4l2_encoder_cmd *a); | ||
| 290 | |||
| 291 | /* Stream type-dependent parameter ioctls */ | ||
| 292 | int (*vidioc_g_parm) (struct file *file, void *fh, | ||
| 293 | struct v4l2_streamparm *a); | ||
| 294 | int (*vidioc_s_parm) (struct file *file, void *fh, | ||
| 295 | struct v4l2_streamparm *a); | ||
| 296 | |||
| 297 | /* Tuner ioctls */ | ||
| 298 | int (*vidioc_g_tuner) (struct file *file, void *fh, | ||
| 299 | struct v4l2_tuner *a); | ||
| 300 | int (*vidioc_s_tuner) (struct file *file, void *fh, | ||
| 301 | struct v4l2_tuner *a); | ||
| 302 | int (*vidioc_g_frequency) (struct file *file, void *fh, | ||
| 303 | struct v4l2_frequency *a); | ||
| 304 | int (*vidioc_s_frequency) (struct file *file, void *fh, | ||
| 305 | struct v4l2_frequency *a); | ||
| 306 | |||
| 307 | /* Sliced VBI cap */ | ||
| 308 | int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, | ||
| 309 | struct v4l2_sliced_vbi_cap *a); | ||
| 310 | |||
| 311 | /* Log status ioctl */ | ||
| 312 | int (*vidioc_log_status) (struct file *file, void *fh); | ||
| 313 | |||
| 314 | int (*vidioc_s_hw_freq_seek) (struct file *file, void *fh, | ||
| 315 | struct v4l2_hw_freq_seek *a); | ||
| 316 | |||
| 317 | /* Debugging ioctls */ | ||
| 318 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
| 319 | int (*vidioc_g_register) (struct file *file, void *fh, | ||
| 320 | struct v4l2_register *reg); | ||
| 321 | int (*vidioc_s_register) (struct file *file, void *fh, | ||
| 322 | struct v4l2_register *reg); | ||
| 323 | #endif | ||
| 324 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | ||
| 325 | struct v4l2_chip_ident *chip); | ||
| 326 | |||
| 327 | /* For other private ioctls */ | ||
| 328 | int (*vidioc_default) (struct file *file, void *fh, | ||
| 329 | int cmd, void *arg); | ||
| 330 | |||
| 331 | |||
| 332 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
| 333 | /* obsolete -- fops->owner is used instead */ | ||
| 334 | struct module *owner; | ||
| 335 | /* dev->driver_data will be used instead some day. | ||
| 336 | * Use the video_{get|set}_drvdata() helper functions, | ||
| 337 | * so the switch over will be transparent for you. | ||
| 338 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
| 339 | void *priv; | ||
| 340 | #endif | 79 | #endif |
| 341 | 80 | ||
| 342 | /* for videodev.c intenal usage -- please don't touch */ | 81 | /* for videodev.c internal usage -- please don't touch */ |
| 343 | int users; /* video_exclusive_{open|close} ... */ | 82 | int users; /* video_exclusive_{open|close} ... */ |
| 344 | struct mutex lock; /* ... helper function uses these */ | 83 | struct mutex lock; /* ... helper function uses these */ |
| 345 | }; | 84 | }; |
| 346 | 85 | ||
| 347 | /* Class-dev to video-device */ | 86 | /* Class-dev to video-device */ |
| 348 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | 87 | #define to_video_device(cd) container_of(cd, struct video_device, dev) |
| 349 | 88 | ||
| 350 | /* Version 2 functions */ | 89 | /* Version 2 functions */ |
| 351 | extern int video_register_device(struct video_device *vfd, int type, int nr); | 90 | extern int video_register_device(struct video_device *vfd, int type, int nr); |
| 352 | int video_register_device_index(struct video_device *vfd, int type, int nr, | 91 | int video_register_device_index(struct video_device *vfd, int type, int nr, |
| 353 | int index); | 92 | int index); |
| 354 | void video_unregister_device(struct video_device *); | 93 | void video_unregister_device(struct video_device *); |
| 355 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
| 356 | unsigned int cmd, unsigned long arg); | ||
| 357 | 94 | ||
| 358 | /* helper functions to alloc / release struct video_device, the | 95 | /* helper functions to alloc / release struct video_device, the |
| 359 | later can be used for video_device->release() */ | 96 | later can be used for video_device->release() */ |
| 360 | struct video_device *video_device_alloc(void); | 97 | struct video_device *video_device_alloc(void); |
| 361 | void video_device_release(struct video_device *vfd); | 98 | void video_device_release(struct video_device *vfd); |
| 362 | 99 | ||
| 363 | /* Include support for obsoleted stuff */ | 100 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ |
| 364 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
| 365 | unsigned int cmd, unsigned long arg, | ||
| 366 | int (*func)(struct inode *inode, struct file *file, | ||
| 367 | unsigned int cmd, void *arg)); | ||
| 368 | |||
| 369 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 370 | #include <linux/mm.h> | ||
| 371 | |||
| 372 | static inline int __must_check | ||
| 373 | video_device_create_file(struct video_device *vfd, | ||
| 374 | struct device_attribute *attr) | ||
| 375 | { | ||
| 376 | int ret = device_create_file(&vfd->class_dev, attr); | ||
| 377 | if (ret < 0) | ||
| 378 | printk(KERN_WARNING "%s error: %d\n", __func__, ret); | ||
| 379 | return ret; | ||
| 380 | } | ||
| 381 | static inline void | ||
| 382 | video_device_remove_file(struct video_device *vfd, | ||
| 383 | struct device_attribute *attr) | ||
| 384 | { | ||
| 385 | device_remove_file(&vfd->class_dev, attr); | ||
| 386 | } | ||
| 387 | |||
| 388 | #endif /* CONFIG_VIDEO_V4L1_COMPAT */ | ||
| 389 | |||
| 390 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
| 391 | /* helper functions to access driver private data. */ | 101 | /* helper functions to access driver private data. */ |
| 392 | static inline void *video_get_drvdata(struct video_device *dev) | 102 | static inline void *video_get_drvdata(struct video_device *dev) |
| 393 | { | 103 | { |
| @@ -399,9 +109,6 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) | |||
| 399 | dev->priv = data; | 109 | dev->priv = data; |
| 400 | } | 110 | } |
| 401 | 111 | ||
| 402 | #endif | ||
| 403 | |||
| 404 | #ifdef OBSOLETE_DEVDATA /* to be removed soon */ | ||
| 405 | /* Obsolete stuff - Still needed for radio devices and obsolete drivers */ | 112 | /* Obsolete stuff - Still needed for radio devices and obsolete drivers */ |
| 406 | extern struct video_device* video_devdata(struct file*); | 113 | extern struct video_device* video_devdata(struct file*); |
| 407 | extern int video_exclusive_open(struct inode *inode, struct file *file); | 114 | extern int video_exclusive_open(struct inode *inode, struct file *file); |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h new file mode 100644 index 000000000000..dc6404618555 --- /dev/null +++ b/include/media/v4l2-ioctl.h | |||
| @@ -0,0 +1,301 @@ | |||
| 1 | /* | ||
| 2 | * | ||
| 3 | * V 4 L 2 D R I V E R H E L P E R A P I | ||
| 4 | * | ||
| 5 | * Moved from videodev2.h | ||
| 6 | * | ||
| 7 | * Some commonly needed functions for drivers (v4l2-common.o module) | ||
| 8 | */ | ||
| 9 | #ifndef _V4L2_IOCTL_H | ||
| 10 | #define _V4L2_IOCTL_H | ||
| 11 | |||
| 12 | #include <linux/poll.h> | ||
| 13 | #include <linux/fs.h> | ||
| 14 | #include <linux/device.h> | ||
| 15 | #include <linux/mutex.h> | ||
| 16 | #include <linux/compiler.h> /* need __user */ | ||
| 17 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 18 | #include <linux/videodev.h> | ||
| 19 | #else | ||
| 20 | #include <linux/videodev2.h> | ||
| 21 | #endif | ||
| 22 | |||
| 23 | struct v4l2_ioctl_ops { | ||
| 24 | /* ioctl callbacks */ | ||
| 25 | |||
| 26 | /* VIDIOC_QUERYCAP handler */ | ||
| 27 | int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); | ||
| 28 | |||
| 29 | /* Priority handling */ | ||
| 30 | int (*vidioc_g_priority) (struct file *file, void *fh, | ||
| 31 | enum v4l2_priority *p); | ||
| 32 | int (*vidioc_s_priority) (struct file *file, void *fh, | ||
| 33 | enum v4l2_priority p); | ||
| 34 | |||
| 35 | /* VIDIOC_ENUM_FMT handlers */ | ||
| 36 | int (*vidioc_enum_fmt_vid_cap) (struct file *file, void *fh, | ||
| 37 | struct v4l2_fmtdesc *f); | ||
| 38 | int (*vidioc_enum_fmt_vid_overlay) (struct file *file, void *fh, | ||
| 39 | struct v4l2_fmtdesc *f); | ||
| 40 | int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh, | ||
| 41 | struct v4l2_fmtdesc *f); | ||
| 42 | #if 1 | ||
| 43 | /* deprecated, will be removed in 2.6.28 */ | ||
| 44 | int (*vidioc_enum_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 45 | struct v4l2_fmtdesc *f); | ||
| 46 | #endif | ||
| 47 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | ||
| 48 | struct v4l2_fmtdesc *f); | ||
| 49 | |||
| 50 | /* VIDIOC_G_FMT handlers */ | ||
| 51 | int (*vidioc_g_fmt_vid_cap) (struct file *file, void *fh, | ||
| 52 | struct v4l2_format *f); | ||
| 53 | int (*vidioc_g_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 54 | struct v4l2_format *f); | ||
| 55 | int (*vidioc_g_fmt_vid_out) (struct file *file, void *fh, | ||
| 56 | struct v4l2_format *f); | ||
| 57 | int (*vidioc_g_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 58 | struct v4l2_format *f); | ||
| 59 | int (*vidioc_g_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 60 | struct v4l2_format *f); | ||
| 61 | int (*vidioc_g_fmt_vbi_out) (struct file *file, void *fh, | ||
| 62 | struct v4l2_format *f); | ||
| 63 | int (*vidioc_g_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 64 | struct v4l2_format *f); | ||
| 65 | int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 66 | struct v4l2_format *f); | ||
| 67 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | ||
| 68 | struct v4l2_format *f); | ||
| 69 | |||
| 70 | /* VIDIOC_S_FMT handlers */ | ||
| 71 | int (*vidioc_s_fmt_vid_cap) (struct file *file, void *fh, | ||
| 72 | struct v4l2_format *f); | ||
| 73 | int (*vidioc_s_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 74 | struct v4l2_format *f); | ||
| 75 | int (*vidioc_s_fmt_vid_out) (struct file *file, void *fh, | ||
| 76 | struct v4l2_format *f); | ||
| 77 | int (*vidioc_s_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 78 | struct v4l2_format *f); | ||
| 79 | int (*vidioc_s_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 80 | struct v4l2_format *f); | ||
| 81 | int (*vidioc_s_fmt_vbi_out) (struct file *file, void *fh, | ||
| 82 | struct v4l2_format *f); | ||
| 83 | int (*vidioc_s_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 84 | struct v4l2_format *f); | ||
| 85 | int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 86 | struct v4l2_format *f); | ||
| 87 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | ||
| 88 | struct v4l2_format *f); | ||
| 89 | |||
| 90 | /* VIDIOC_TRY_FMT handlers */ | ||
| 91 | int (*vidioc_try_fmt_vid_cap) (struct file *file, void *fh, | ||
| 92 | struct v4l2_format *f); | ||
| 93 | int (*vidioc_try_fmt_vid_overlay)(struct file *file, void *fh, | ||
| 94 | struct v4l2_format *f); | ||
| 95 | int (*vidioc_try_fmt_vid_out) (struct file *file, void *fh, | ||
| 96 | struct v4l2_format *f); | ||
| 97 | int (*vidioc_try_fmt_vid_out_overlay)(struct file *file, void *fh, | ||
| 98 | struct v4l2_format *f); | ||
| 99 | int (*vidioc_try_fmt_vbi_cap) (struct file *file, void *fh, | ||
| 100 | struct v4l2_format *f); | ||
| 101 | int (*vidioc_try_fmt_vbi_out) (struct file *file, void *fh, | ||
| 102 | struct v4l2_format *f); | ||
| 103 | int (*vidioc_try_fmt_sliced_vbi_cap)(struct file *file, void *fh, | ||
| 104 | struct v4l2_format *f); | ||
| 105 | int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh, | ||
| 106 | struct v4l2_format *f); | ||
| 107 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | ||
| 108 | struct v4l2_format *f); | ||
| 109 | |||
| 110 | /* Buffer handlers */ | ||
| 111 | int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b); | ||
| 112 | int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 113 | int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 114 | int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
| 115 | |||
| 116 | |||
| 117 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); | ||
| 118 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 119 | /* buffer type is struct vidio_mbuf * */ | ||
| 120 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); | ||
| 121 | #endif | ||
| 122 | int (*vidioc_g_fbuf) (struct file *file, void *fh, | ||
| 123 | struct v4l2_framebuffer *a); | ||
| 124 | int (*vidioc_s_fbuf) (struct file *file, void *fh, | ||
| 125 | struct v4l2_framebuffer *a); | ||
| 126 | |||
| 127 | /* Stream on/off */ | ||
| 128 | int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 129 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); | ||
| 130 | |||
| 131 | /* Standard handling | ||
| 132 | ENUMSTD is handled by videodev.c | ||
| 133 | */ | ||
| 134 | int (*vidioc_g_std) (struct file *file, void *fh, v4l2_std_id *norm); | ||
| 135 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); | ||
| 136 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | ||
| 137 | |||
| 138 | /* Input handling */ | ||
| 139 | int (*vidioc_enum_input)(struct file *file, void *fh, | ||
| 140 | struct v4l2_input *inp); | ||
| 141 | int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i); | ||
| 142 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); | ||
| 143 | |||
| 144 | /* Output handling */ | ||
| 145 | int (*vidioc_enum_output) (struct file *file, void *fh, | ||
| 146 | struct v4l2_output *a); | ||
| 147 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); | ||
| 148 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); | ||
| 149 | |||
| 150 | /* Control handling */ | ||
| 151 | int (*vidioc_queryctrl) (struct file *file, void *fh, | ||
| 152 | struct v4l2_queryctrl *a); | ||
| 153 | int (*vidioc_g_ctrl) (struct file *file, void *fh, | ||
| 154 | struct v4l2_control *a); | ||
| 155 | int (*vidioc_s_ctrl) (struct file *file, void *fh, | ||
| 156 | struct v4l2_control *a); | ||
| 157 | int (*vidioc_g_ext_ctrls) (struct file *file, void *fh, | ||
| 158 | struct v4l2_ext_controls *a); | ||
| 159 | int (*vidioc_s_ext_ctrls) (struct file *file, void *fh, | ||
| 160 | struct v4l2_ext_controls *a); | ||
| 161 | int (*vidioc_try_ext_ctrls) (struct file *file, void *fh, | ||
| 162 | struct v4l2_ext_controls *a); | ||
| 163 | int (*vidioc_querymenu) (struct file *file, void *fh, | ||
| 164 | struct v4l2_querymenu *a); | ||
| 165 | |||
| 166 | /* Audio ioctls */ | ||
| 167 | int (*vidioc_enumaudio) (struct file *file, void *fh, | ||
| 168 | struct v4l2_audio *a); | ||
| 169 | int (*vidioc_g_audio) (struct file *file, void *fh, | ||
| 170 | struct v4l2_audio *a); | ||
| 171 | int (*vidioc_s_audio) (struct file *file, void *fh, | ||
| 172 | struct v4l2_audio *a); | ||
| 173 | |||
| 174 | /* Audio out ioctls */ | ||
| 175 | int (*vidioc_enumaudout) (struct file *file, void *fh, | ||
| 176 | struct v4l2_audioout *a); | ||
| 177 | int (*vidioc_g_audout) (struct file *file, void *fh, | ||
| 178 | struct v4l2_audioout *a); | ||
| 179 | int (*vidioc_s_audout) (struct file *file, void *fh, | ||
| 180 | struct v4l2_audioout *a); | ||
| 181 | int (*vidioc_g_modulator) (struct file *file, void *fh, | ||
| 182 | struct v4l2_modulator *a); | ||
| 183 | int (*vidioc_s_modulator) (struct file *file, void *fh, | ||
| 184 | struct v4l2_modulator *a); | ||
| 185 | /* Crop ioctls */ | ||
| 186 | int (*vidioc_cropcap) (struct file *file, void *fh, | ||
| 187 | struct v4l2_cropcap *a); | ||
| 188 | int (*vidioc_g_crop) (struct file *file, void *fh, | ||
| 189 | struct v4l2_crop *a); | ||
| 190 | int (*vidioc_s_crop) (struct file *file, void *fh, | ||
| 191 | struct v4l2_crop *a); | ||
| 192 | /* Compression ioctls */ | ||
| 193 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, | ||
| 194 | struct v4l2_jpegcompression *a); | ||
| 195 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | ||
| 196 | struct v4l2_jpegcompression *a); | ||
| 197 | int (*vidioc_g_enc_index) (struct file *file, void *fh, | ||
| 198 | struct v4l2_enc_idx *a); | ||
| 199 | int (*vidioc_encoder_cmd) (struct file *file, void *fh, | ||
| 200 | struct v4l2_encoder_cmd *a); | ||
| 201 | int (*vidioc_try_encoder_cmd) (struct file *file, void *fh, | ||
| 202 | struct v4l2_encoder_cmd *a); | ||
| 203 | |||
| 204 | /* Stream type-dependent parameter ioctls */ | ||
| 205 | int (*vidioc_g_parm) (struct file *file, void *fh, | ||
| 206 | struct v4l2_streamparm *a); | ||
| 207 | int (*vidioc_s_parm) (struct file *file, void *fh, | ||
| 208 | struct v4l2_streamparm *a); | ||
| 209 | |||
| 210 | /* Tuner ioctls */ | ||
| 211 | int (*vidioc_g_tuner) (struct file *file, void *fh, | ||
| 212 | struct v4l2_tuner *a); | ||
| 213 | int (*vidioc_s_tuner) (struct file *file, void *fh, | ||
| 214 | struct v4l2_tuner *a); | ||
| 215 | int (*vidioc_g_frequency) (struct file *file, void *fh, | ||
| 216 | struct v4l2_frequency *a); | ||
| 217 | int (*vidioc_s_frequency) (struct file *file, void *fh, | ||
| 218 | struct v4l2_frequency *a); | ||
| 219 | |||
| 220 | /* Sliced VBI cap */ | ||
| 221 | int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, | ||
| 222 | struct v4l2_sliced_vbi_cap *a); | ||
| 223 | |||
| 224 | /* Log status ioctl */ | ||
| 225 | int (*vidioc_log_status) (struct file *file, void *fh); | ||
| 226 | |||
| 227 | int (*vidioc_s_hw_freq_seek) (struct file *file, void *fh, | ||
| 228 | struct v4l2_hw_freq_seek *a); | ||
| 229 | |||
| 230 | /* Debugging ioctls */ | ||
| 231 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
| 232 | int (*vidioc_g_register) (struct file *file, void *fh, | ||
| 233 | struct v4l2_register *reg); | ||
| 234 | int (*vidioc_s_register) (struct file *file, void *fh, | ||
| 235 | struct v4l2_register *reg); | ||
| 236 | #endif | ||
| 237 | int (*vidioc_g_chip_ident) (struct file *file, void *fh, | ||
| 238 | struct v4l2_chip_ident *chip); | ||
| 239 | |||
| 240 | /* For other private ioctls */ | ||
| 241 | int (*vidioc_default) (struct file *file, void *fh, | ||
| 242 | int cmd, void *arg); | ||
| 243 | }; | ||
| 244 | |||
| 245 | |||
| 246 | /* v4l debugging and diagnostics */ | ||
| 247 | |||
| 248 | /* Debug bitmask flags to be used on V4L2 */ | ||
| 249 | #define V4L2_DEBUG_IOCTL 0x01 | ||
| 250 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | ||
| 251 | |||
| 252 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | ||
| 253 | #define v4l_print_ioctl(name, cmd) \ | ||
| 254 | do { \ | ||
| 255 | printk(KERN_DEBUG "%s: ", name); \ | ||
| 256 | v4l_printk_ioctl(cmd); \ | ||
| 257 | } while (0) | ||
| 258 | |||
| 259 | /* Use this macro in I2C drivers where 'client' is the struct i2c_client | ||
| 260 | pointer */ | ||
| 261 | #define v4l_i2c_print_ioctl(client, cmd) \ | ||
| 262 | do { \ | ||
| 263 | v4l_client_printk(KERN_DEBUG, client, ""); \ | ||
| 264 | v4l_printk_ioctl(cmd); \ | ||
| 265 | } while (0) | ||
| 266 | |||
| 267 | /* Video standard functions */ | ||
| 268 | extern const char *v4l2_norm_to_name(v4l2_std_id id); | ||
| 269 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | ||
| 270 | int id, const char *name); | ||
| 271 | /* Prints the ioctl in a human-readable format */ | ||
| 272 | extern void v4l_printk_ioctl(unsigned int cmd); | ||
| 273 | |||
| 274 | /* names for fancy debug output */ | ||
| 275 | extern const char *v4l2_field_names[]; | ||
| 276 | extern const char *v4l2_type_names[]; | ||
| 277 | |||
| 278 | /* Compatibility layer interface -- v4l1-compat module */ | ||
| 279 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | ||
| 280 | unsigned int cmd, void *arg); | ||
| 281 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
| 282 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | ||
| 283 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | ||
| 284 | #else | ||
| 285 | #define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) | ||
| 286 | #endif | ||
| 287 | |||
| 288 | /* 32 Bits compatibility layer for 64 bits processors */ | ||
| 289 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
| 290 | unsigned long arg); | ||
| 291 | |||
| 292 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
| 293 | unsigned int cmd, unsigned long arg); | ||
| 294 | |||
| 295 | /* Include support for obsoleted stuff */ | ||
| 296 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
| 297 | unsigned int cmd, unsigned long arg, | ||
| 298 | int (*func)(struct inode *inode, struct file *file, | ||
| 299 | unsigned int cmd, void *arg)); | ||
| 300 | |||
| 301 | #endif /* _V4L2_IOCTL_H */ | ||
