diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dvb/dmx.h | 26 | ||||
-rw-r--r-- | include/linux/i2c-id.h | 3 | ||||
-rw-r--r-- | include/linux/videodev.h | 51 | ||||
-rw-r--r-- | include/linux/videodev2.h | 392 | ||||
-rw-r--r-- | include/media/cx2341x.h | 189 | ||||
-rw-r--r-- | include/media/ir-common.h | 5 | ||||
-rw-r--r-- | include/media/ir-kbd-i2c.h | 3 | ||||
-rw-r--r-- | include/media/ovcamchip.h | 1 | ||||
-rw-r--r-- | include/media/pwc-ioctl.h | 325 | ||||
-rw-r--r-- | include/media/saa7115.h | 11 | ||||
-rw-r--r-- | include/media/saa7146_vv.h | 2 | ||||
-rw-r--r-- | include/media/tuner.h | 13 | ||||
-rw-r--r-- | include/media/tvp5150.h | 34 | ||||
-rw-r--r-- | include/media/v4l2-common.h | 32 | ||||
-rw-r--r-- | include/media/v4l2-dev.h | 375 | ||||
-rw-r--r-- | include/media/video-buf-dvb.h | 3 | ||||
-rw-r--r-- | include/media/video-buf.h | 1 | ||||
-rw-r--r-- | include/sound/tea575x-tuner.h | 3 |
18 files changed, 1251 insertions, 218 deletions
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 2787b8a22ff1..c6a2353c4e68 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h | |||
@@ -88,20 +88,6 @@ typedef enum | |||
88 | #define DMX_PES_PCR DMX_PES_PCR0 | 88 | #define DMX_PES_PCR DMX_PES_PCR0 |
89 | 89 | ||
90 | 90 | ||
91 | typedef enum | ||
92 | { | ||
93 | DMX_SCRAMBLING_EV, | ||
94 | DMX_FRONTEND_EV | ||
95 | } dmx_event_t; | ||
96 | |||
97 | |||
98 | typedef enum | ||
99 | { | ||
100 | DMX_SCRAMBLING_OFF, | ||
101 | DMX_SCRAMBLING_ON | ||
102 | } dmx_scrambling_status_t; | ||
103 | |||
104 | |||
105 | typedef struct dmx_filter | 91 | typedef struct dmx_filter |
106 | { | 92 | { |
107 | __u8 filter[DMX_FILTER_SIZE]; | 93 | __u8 filter[DMX_FILTER_SIZE]; |
@@ -132,17 +118,6 @@ struct dmx_pes_filter_params | |||
132 | __u32 flags; | 118 | __u32 flags; |
133 | }; | 119 | }; |
134 | 120 | ||
135 | |||
136 | struct dmx_event | ||
137 | { | ||
138 | dmx_event_t event; | ||
139 | time_t timeStamp; | ||
140 | union | ||
141 | { | ||
142 | dmx_scrambling_status_t scrambling; | ||
143 | } u; | ||
144 | }; | ||
145 | |||
146 | typedef struct dmx_caps { | 121 | typedef struct dmx_caps { |
147 | __u32 caps; | 122 | __u32 caps; |
148 | int num_decoders; | 123 | int num_decoders; |
@@ -171,7 +146,6 @@ struct dmx_stc { | |||
171 | #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) | 146 | #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) |
172 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) | 147 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) |
173 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) | 148 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) |
174 | #define DMX_GET_EVENT _IOR('o', 46, struct dmx_event) | ||
175 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) | 149 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) |
176 | #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) | 150 | #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) |
177 | #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) | 151 | #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index c8b81f419fd8..21338bb3441d 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -112,6 +112,9 @@ | |||
112 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ | 112 | #define I2C_DRIVERID_X1205 82 /* Xicor/Intersil X1205 RTC */ |
113 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ | 113 | #define I2C_DRIVERID_PCF8563 83 /* Philips PCF8563 RTC */ |
114 | #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ | 114 | #define I2C_DRIVERID_RS5C372 84 /* Ricoh RS5C372 RTC */ |
115 | #define I2C_DRIVERID_BT866 85 /* Conexant bt866 video encoder */ | ||
116 | #define I2C_DRIVERID_KS0127 86 /* Samsung ks0127 video decoder */ | ||
117 | #define I2C_DRIVERID_TLV320AIC23B 87 /* TI TLV320AIC23B audio codec */ | ||
115 | 118 | ||
116 | #define I2C_DRIVERID_I2CDEV 900 | 119 | #define I2C_DRIVERID_I2CDEV 900 |
117 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 91140091ced2..41bc7e9603cd 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -1,49 +1,21 @@ | |||
1 | /* | ||
2 | * Video for Linux version 1 - OBSOLETE | ||
3 | * | ||
4 | * Header file for v4l1 drivers and applications, for | ||
5 | * Linux kernels 2.2.x or 2.4.x. | ||
6 | * | ||
7 | * Provides header for legacy drivers and applications | ||
8 | * | ||
9 | * See http://linuxtv.org for more info | ||
10 | * | ||
11 | */ | ||
1 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
2 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
3 | 14 | ||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define HAVE_V4L1 1 | 15 | #define HAVE_V4L1 1 |
7 | 16 | ||
8 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
9 | 18 | ||
10 | #ifdef __KERNEL__ | ||
11 | |||
12 | #include <linux/mm.h> | ||
13 | |||
14 | extern struct video_device* video_devdata(struct file*); | ||
15 | |||
16 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
17 | static inline void | ||
18 | video_device_create_file(struct video_device *vfd, | ||
19 | struct class_device_attribute *attr) | ||
20 | { | ||
21 | class_device_create_file(&vfd->class_dev, attr); | ||
22 | } | ||
23 | static inline void | ||
24 | video_device_remove_file(struct video_device *vfd, | ||
25 | struct class_device_attribute *attr) | ||
26 | { | ||
27 | class_device_remove_file(&vfd->class_dev, attr); | ||
28 | } | ||
29 | |||
30 | #if OBSOLETE_OWNER /* to be removed in 2.6.15 */ | ||
31 | /* helper functions to access driver private data. */ | ||
32 | static inline void *video_get_drvdata(struct video_device *dev) | ||
33 | { | ||
34 | return dev->priv; | ||
35 | } | ||
36 | |||
37 | static inline void video_set_drvdata(struct video_device *dev, void *data) | ||
38 | { | ||
39 | dev->priv = data; | ||
40 | } | ||
41 | #endif | ||
42 | |||
43 | extern int video_exclusive_open(struct inode *inode, struct file *file); | ||
44 | extern int video_exclusive_release(struct inode *inode, struct file *file); | ||
45 | #endif /* __KERNEL__ */ | ||
46 | |||
47 | struct video_capability | 19 | struct video_capability |
48 | { | 20 | { |
49 | char name[32]; | 21 | char name[32]; |
@@ -363,6 +335,7 @@ struct video_code | |||
363 | #define VID_HARDWARE_SAA7114H 37 | 335 | #define VID_HARDWARE_SAA7114H 37 |
364 | #define VID_HARDWARE_SN9C102 38 | 336 | #define VID_HARDWARE_SN9C102 38 |
365 | #define VID_HARDWARE_ARV 39 | 337 | #define VID_HARDWARE_ARV 39 |
338 | |||
366 | #endif /* __LINUX_VIDEODEV_H */ | 339 | #endif /* __LINUX_VIDEODEV_H */ |
367 | 340 | ||
368 | /* | 341 | /* |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index ad7fa9c86c10..4f428547ec09 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1,35 +1,33 @@ | |||
1 | #ifndef __LINUX_VIDEODEV2_H | ||
2 | #define __LINUX_VIDEODEV2_H | ||
3 | /* | 1 | /* |
4 | * Video for Linux Two | 2 | * Video for Linux Two |
5 | * | 3 | * |
6 | * Header file for v4l or V4L2 drivers and applications, for | 4 | * Header file for v4l or V4L2 drivers and applications |
7 | * Linux kernels 2.2.x or 2.4.x. | 5 | * with public API. |
6 | * All kernel-specific stuff were moved to media/v4l2-dev.h, so | ||
7 | * no #if __KERNEL tests are allowed here | ||
8 | * | 8 | * |
9 | * See http://bytesex.org/v4l/ for API specs and other | 9 | * See http://linuxtv.org for more info |
10 | * v4l2 documentation. | ||
11 | * | 10 | * |
12 | * Author: Bill Dirks <bdirks@pacbell.net> | 11 | * Author: Bill Dirks <bdirks@pacbell.net> |
13 | * Justin Schoeman | 12 | * Justin Schoeman |
14 | * et al. | 13 | * et al. |
15 | */ | 14 | */ |
15 | #ifndef __LINUX_VIDEODEV2_H | ||
16 | #define __LINUX_VIDEODEV2_H | ||
16 | #ifdef __KERNEL__ | 17 | #ifdef __KERNEL__ |
17 | #include <linux/time.h> /* need struct timeval */ | 18 | #include <linux/time.h> /* need struct timeval */ |
18 | #include <linux/poll.h> | ||
19 | #include <linux/device.h> | ||
20 | #include <linux/mutex.h> | ||
21 | #endif | ||
22 | #include <linux/compiler.h> /* need __user */ | 19 | #include <linux/compiler.h> /* need __user */ |
20 | #else | ||
21 | #define __user | ||
22 | #endif | ||
23 | #include <linux/types.h> | ||
23 | 24 | ||
24 | |||
25 | #define OBSOLETE_OWNER 1 /* It will be removed for 2.6.17 */ | ||
26 | #define HAVE_V4L2 1 | 25 | #define HAVE_V4L2 1 |
27 | 26 | ||
28 | /* | 27 | /* |
29 | * Common stuff for both V4L1 and V4L2 | 28 | * Common stuff for both V4L1 and V4L2 |
30 | * Moved from videodev.h | 29 | * Moved from videodev.h |
31 | */ | 30 | */ |
32 | |||
33 | #define VIDEO_MAX_FRAME 32 | 31 | #define VIDEO_MAX_FRAME 32 |
34 | 32 | ||
35 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | 33 | #define VID_TYPE_CAPTURE 1 /* Can capture */ |
@@ -47,71 +45,6 @@ | |||
47 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | 45 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ |
48 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | 46 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ |
49 | 47 | ||
50 | #ifdef __KERNEL__ | ||
51 | |||
52 | /* Minor device allocation */ | ||
53 | #define MINOR_VFL_TYPE_GRABBER_MIN 0 | ||
54 | #define MINOR_VFL_TYPE_GRABBER_MAX 63 | ||
55 | #define MINOR_VFL_TYPE_RADIO_MIN 64 | ||
56 | #define MINOR_VFL_TYPE_RADIO_MAX 127 | ||
57 | #define MINOR_VFL_TYPE_VTX_MIN 192 | ||
58 | #define MINOR_VFL_TYPE_VTX_MAX 223 | ||
59 | #define MINOR_VFL_TYPE_VBI_MIN 224 | ||
60 | #define MINOR_VFL_TYPE_VBI_MAX 255 | ||
61 | |||
62 | #define VFL_TYPE_GRABBER 0 | ||
63 | #define VFL_TYPE_VBI 1 | ||
64 | #define VFL_TYPE_RADIO 2 | ||
65 | #define VFL_TYPE_VTX 3 | ||
66 | |||
67 | struct video_device | ||
68 | { | ||
69 | /* device info */ | ||
70 | struct device *dev; | ||
71 | char name[32]; | ||
72 | int type; /* v4l1 */ | ||
73 | int type2; /* v4l2 */ | ||
74 | int hardware; | ||
75 | int minor; | ||
76 | |||
77 | /* device ops + callbacks */ | ||
78 | const struct file_operations *fops; | ||
79 | void (*release)(struct video_device *vfd); | ||
80 | |||
81 | |||
82 | #if OBSOLETE_OWNER /* to be removed in 2.6.15 */ | ||
83 | /* obsolete -- fops->owner is used instead */ | ||
84 | struct module *owner; | ||
85 | /* dev->driver_data will be used instead some day. | ||
86 | * Use the video_{get|set}_drvdata() helper functions, | ||
87 | * so the switch over will be transparent for you. | ||
88 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
89 | void *priv; | ||
90 | #endif | ||
91 | |||
92 | /* for videodev.c intenal usage -- please don't touch */ | ||
93 | int users; /* video_exclusive_{open|close} ... */ | ||
94 | struct mutex lock; /* ... helper function uses these */ | ||
95 | char devfs_name[64]; /* devfs */ | ||
96 | struct class_device class_dev; /* sysfs */ | ||
97 | }; | ||
98 | |||
99 | #define VIDEO_MAJOR 81 | ||
100 | |||
101 | extern int video_register_device(struct video_device *, int type, int nr); | ||
102 | extern void video_unregister_device(struct video_device *); | ||
103 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
104 | unsigned int cmd, unsigned long arg, | ||
105 | int (*func)(struct inode *inode, struct file *file, | ||
106 | unsigned int cmd, void *arg)); | ||
107 | |||
108 | /* helper functions to alloc / release struct video_device, the | ||
109 | later can be used for video_device->release() */ | ||
110 | struct video_device *video_device_alloc(void); | ||
111 | void video_device_release(struct video_device *vfd); | ||
112 | |||
113 | #endif | ||
114 | |||
115 | /* | 48 | /* |
116 | * M I S C E L L A N E O U S | 49 | * M I S C E L L A N E O U S |
117 | */ | 50 | */ |
@@ -172,6 +105,8 @@ enum v4l2_ctrl_type { | |||
172 | V4L2_CTRL_TYPE_BOOLEAN = 2, | 105 | V4L2_CTRL_TYPE_BOOLEAN = 2, |
173 | V4L2_CTRL_TYPE_MENU = 3, | 106 | V4L2_CTRL_TYPE_MENU = 3, |
174 | V4L2_CTRL_TYPE_BUTTON = 4, | 107 | V4L2_CTRL_TYPE_BUTTON = 4, |
108 | V4L2_CTRL_TYPE_INTEGER64 = 5, | ||
109 | V4L2_CTRL_TYPE_CTRL_CLASS = 6, | ||
175 | }; | 110 | }; |
176 | 111 | ||
177 | enum v4l2_tuner_type { | 112 | enum v4l2_tuner_type { |
@@ -270,7 +205,6 @@ struct v4l2_capability | |||
270 | /* | 205 | /* |
271 | * V I D E O I M A G E F O R M A T | 206 | * V I D E O I M A G E F O R M A T |
272 | */ | 207 | */ |
273 | |||
274 | struct v4l2_pix_format | 208 | struct v4l2_pix_format |
275 | { | 209 | { |
276 | __u32 width; | 210 | __u32 width; |
@@ -283,7 +217,7 @@ struct v4l2_pix_format | |||
283 | __u32 priv; /* private data, depends on pixelformat */ | 217 | __u32 priv; /* private data, depends on pixelformat */ |
284 | }; | 218 | }; |
285 | 219 | ||
286 | /* Pixel format FOURCC depth Description */ | 220 | /* Pixel format FOURCC depth Description */ |
287 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ | 221 | #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ |
288 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ | 222 | #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ |
289 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ | 223 | #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ |
@@ -319,7 +253,7 @@ struct v4l2_pix_format | |||
319 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ | 253 | #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ |
320 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ | 254 | #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ |
321 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ | 255 | #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ |
322 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ | 256 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG-1/2/4 */ |
323 | 257 | ||
324 | /* Vendor-specific formats */ | 258 | /* Vendor-specific formats */ |
325 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ | 259 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ |
@@ -343,7 +277,6 @@ struct v4l2_fmtdesc | |||
343 | 277 | ||
344 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 | 278 | #define V4L2_FMT_FLAG_COMPRESSED 0x0001 |
345 | 279 | ||
346 | |||
347 | /* | 280 | /* |
348 | * T I M E C O D E | 281 | * T I M E C O D E |
349 | */ | 282 | */ |
@@ -373,16 +306,15 @@ struct v4l2_timecode | |||
373 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 | 306 | #define V4L2_TC_USERBITS_8BITCHARS 0x0008 |
374 | /* The above is based on SMPTE timecodes */ | 307 | /* The above is based on SMPTE timecodes */ |
375 | 308 | ||
376 | 309 | #ifdef __KERNEL__ | |
377 | /* | 310 | /* |
378 | * M P E G C O M P R E S S I O N P A R A M E T E R S | 311 | * M P E G C O M P R E S S I O N P A R A M E T E R S |
379 | * | 312 | * |
380 | * ### WARNING: this is still work-in-progress right now, most likely | 313 | * ### WARNING: This experimental MPEG compression API is obsolete. |
381 | * ### there will be some incompatible changes. | 314 | * ### It is replaced by the MPEG controls API. |
315 | * ### This old API will disappear in the near future! | ||
382 | * | 316 | * |
383 | */ | 317 | */ |
384 | |||
385 | |||
386 | enum v4l2_bitrate_mode { | 318 | enum v4l2_bitrate_mode { |
387 | V4L2_BITRATE_NONE = 0, /* not specified */ | 319 | V4L2_BITRATE_NONE = 0, /* not specified */ |
388 | V4L2_BITRATE_CBR, /* constant bitrate */ | 320 | V4L2_BITRATE_CBR, /* constant bitrate */ |
@@ -460,6 +392,7 @@ struct v4l2_mpeg_compression { | |||
460 | /* I don't expect the above being perfect yet ;) */ | 392 | /* I don't expect the above being perfect yet ;) */ |
461 | __u32 reserved_5[8]; | 393 | __u32 reserved_5[8]; |
462 | }; | 394 | }; |
395 | #endif | ||
463 | 396 | ||
464 | struct v4l2_jpegcompression | 397 | struct v4l2_jpegcompression |
465 | { | 398 | { |
@@ -491,7 +424,6 @@ struct v4l2_jpegcompression | |||
491 | * allways use APP0 */ | 424 | * allways use APP0 */ |
492 | }; | 425 | }; |
493 | 426 | ||
494 | |||
495 | /* | 427 | /* |
496 | * M E M O R Y - M A P P I N G B U F F E R S | 428 | * M E M O R Y - M A P P I N G B U F F E R S |
497 | */ | 429 | */ |
@@ -573,7 +505,6 @@ struct v4l2_window | |||
573 | void __user *bitmap; | 505 | void __user *bitmap; |
574 | }; | 506 | }; |
575 | 507 | ||
576 | |||
577 | /* | 508 | /* |
578 | * C A P T U R E P A R A M E T E R S | 509 | * C A P T U R E P A R A M E T E R S |
579 | */ | 510 | */ |
@@ -586,6 +517,7 @@ struct v4l2_captureparm | |||
586 | __u32 readbuffers; /* # of buffers for read */ | 517 | __u32 readbuffers; /* # of buffers for read */ |
587 | __u32 reserved[4]; | 518 | __u32 reserved[4]; |
588 | }; | 519 | }; |
520 | |||
589 | /* Flags for 'capability' and 'capturemode' fields */ | 521 | /* Flags for 'capability' and 'capturemode' fields */ |
590 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ | 522 | #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ |
591 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ | 523 | #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ |
@@ -603,7 +535,6 @@ struct v4l2_outputparm | |||
603 | /* | 535 | /* |
604 | * I N P U T I M A G E C R O P P I N G | 536 | * I N P U T I M A G E C R O P P I N G |
605 | */ | 537 | */ |
606 | |||
607 | struct v4l2_cropcap { | 538 | struct v4l2_cropcap { |
608 | enum v4l2_buf_type type; | 539 | enum v4l2_buf_type type; |
609 | struct v4l2_rect bounds; | 540 | struct v4l2_rect bounds; |
@@ -710,7 +641,6 @@ struct v4l2_standard | |||
710 | __u32 reserved[4]; | 641 | __u32 reserved[4]; |
711 | }; | 642 | }; |
712 | 643 | ||
713 | |||
714 | /* | 644 | /* |
715 | * V I D E O I N P U T S | 645 | * V I D E O I N P U T S |
716 | */ | 646 | */ |
@@ -725,6 +655,7 @@ struct v4l2_input | |||
725 | __u32 status; | 655 | __u32 status; |
726 | __u32 reserved[4]; | 656 | __u32 reserved[4]; |
727 | }; | 657 | }; |
658 | |||
728 | /* Values for the 'type' field */ | 659 | /* Values for the 'type' field */ |
729 | #define V4L2_INPUT_TYPE_TUNER 1 | 660 | #define V4L2_INPUT_TYPE_TUNER 1 |
730 | #define V4L2_INPUT_TYPE_CAMERA 2 | 661 | #define V4L2_INPUT_TYPE_CAMERA 2 |
@@ -775,6 +706,34 @@ struct v4l2_control | |||
775 | __s32 value; | 706 | __s32 value; |
776 | }; | 707 | }; |
777 | 708 | ||
709 | struct v4l2_ext_control | ||
710 | { | ||
711 | __u32 id; | ||
712 | __u32 reserved2[2]; | ||
713 | union { | ||
714 | __s32 value; | ||
715 | __s64 value64; | ||
716 | void *reserved; | ||
717 | }; | ||
718 | }; | ||
719 | |||
720 | struct v4l2_ext_controls | ||
721 | { | ||
722 | __u32 ctrl_class; | ||
723 | __u32 count; | ||
724 | __u32 error_idx; | ||
725 | __u32 reserved[2]; | ||
726 | struct v4l2_ext_control *controls; | ||
727 | }; | ||
728 | |||
729 | /* Values for ctrl_class field */ | ||
730 | #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ | ||
731 | #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ | ||
732 | |||
733 | #define V4L2_CTRL_ID_MASK (0x0fffffff) | ||
734 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) | ||
735 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) | ||
736 | |||
778 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ | 737 | /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ |
779 | struct v4l2_queryctrl | 738 | struct v4l2_queryctrl |
780 | { | 739 | { |
@@ -801,12 +760,21 @@ struct v4l2_querymenu | |||
801 | /* Control flags */ | 760 | /* Control flags */ |
802 | #define V4L2_CTRL_FLAG_DISABLED 0x0001 | 761 | #define V4L2_CTRL_FLAG_DISABLED 0x0001 |
803 | #define V4L2_CTRL_FLAG_GRABBED 0x0002 | 762 | #define V4L2_CTRL_FLAG_GRABBED 0x0002 |
763 | #define V4L2_CTRL_FLAG_READ_ONLY 0x0004 | ||
764 | #define V4L2_CTRL_FLAG_UPDATE 0x0008 | ||
765 | #define V4L2_CTRL_FLAG_INACTIVE 0x0010 | ||
766 | #define V4L2_CTRL_FLAG_SLIDER 0x0020 | ||
767 | |||
768 | /* Query flag, to be ORed with the control ID */ | ||
769 | #define V4L2_CTRL_FLAG_NEXT_CTRL 0x80000000 | ||
804 | 770 | ||
805 | /* Control IDs defined by V4L2 */ | 771 | /* User-class control IDs defined by V4L2 */ |
806 | #define V4L2_CID_BASE 0x00980900 | 772 | #define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) |
773 | #define V4L2_CID_USER_BASE V4L2_CID_BASE | ||
807 | /* IDs reserved for driver specific controls */ | 774 | /* IDs reserved for driver specific controls */ |
808 | #define V4L2_CID_PRIVATE_BASE 0x08000000 | 775 | #define V4L2_CID_PRIVATE_BASE 0x08000000 |
809 | 776 | ||
777 | #define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) | ||
810 | #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) | 778 | #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) |
811 | #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) | 779 | #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) |
812 | #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) | 780 | #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) |
@@ -833,6 +801,183 @@ struct v4l2_querymenu | |||
833 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) | 801 | #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) |
834 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ | 802 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ |
835 | 803 | ||
804 | /* MPEG-class control IDs defined by V4L2 */ | ||
805 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | ||
806 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) | ||
807 | |||
808 | /* MPEG streams */ | ||
809 | #define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) | ||
810 | enum v4l2_mpeg_stream_type { | ||
811 | V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ | ||
812 | V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */ | ||
813 | V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */ | ||
814 | V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ | ||
815 | V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ | ||
816 | V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ | ||
817 | }; | ||
818 | #define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) | ||
819 | #define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) | ||
820 | #define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3) | ||
821 | #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) | ||
822 | #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) | ||
823 | #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) | ||
824 | |||
825 | /* MPEG audio */ | ||
826 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) | ||
827 | enum v4l2_mpeg_audio_sampling_freq { | ||
828 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, | ||
829 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, | ||
830 | V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, | ||
831 | }; | ||
832 | #define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101) | ||
833 | enum v4l2_mpeg_audio_encoding { | ||
834 | V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, | ||
835 | V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, | ||
836 | V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, | ||
837 | }; | ||
838 | #define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) | ||
839 | enum v4l2_mpeg_audio_l1_bitrate { | ||
840 | V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, | ||
841 | V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, | ||
842 | V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, | ||
843 | V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, | ||
844 | V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, | ||
845 | V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, | ||
846 | V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, | ||
847 | V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, | ||
848 | V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, | ||
849 | V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, | ||
850 | V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, | ||
851 | V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, | ||
852 | V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, | ||
853 | V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, | ||
854 | }; | ||
855 | #define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103) | ||
856 | enum v4l2_mpeg_audio_l2_bitrate { | ||
857 | V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, | ||
858 | V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, | ||
859 | V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, | ||
860 | V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, | ||
861 | V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, | ||
862 | V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, | ||
863 | V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, | ||
864 | V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, | ||
865 | V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, | ||
866 | V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, | ||
867 | V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, | ||
868 | V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, | ||
869 | V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, | ||
870 | V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, | ||
871 | }; | ||
872 | #define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104) | ||
873 | enum v4l2_mpeg_audio_l3_bitrate { | ||
874 | V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, | ||
875 | V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, | ||
876 | V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, | ||
877 | V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, | ||
878 | V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, | ||
879 | V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, | ||
880 | V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, | ||
881 | V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, | ||
882 | V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, | ||
883 | V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, | ||
884 | V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, | ||
885 | V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, | ||
886 | V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, | ||
887 | V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, | ||
888 | }; | ||
889 | #define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105) | ||
890 | enum v4l2_mpeg_audio_mode { | ||
891 | V4L2_MPEG_AUDIO_MODE_STEREO = 0, | ||
892 | V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, | ||
893 | V4L2_MPEG_AUDIO_MODE_DUAL = 2, | ||
894 | V4L2_MPEG_AUDIO_MODE_MONO = 3, | ||
895 | }; | ||
896 | #define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106) | ||
897 | enum v4l2_mpeg_audio_mode_extension { | ||
898 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, | ||
899 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, | ||
900 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, | ||
901 | V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, | ||
902 | }; | ||
903 | #define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107) | ||
904 | enum v4l2_mpeg_audio_emphasis { | ||
905 | V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, | ||
906 | V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, | ||
907 | V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, | ||
908 | }; | ||
909 | #define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108) | ||
910 | enum v4l2_mpeg_audio_crc { | ||
911 | V4L2_MPEG_AUDIO_CRC_NONE = 0, | ||
912 | V4L2_MPEG_AUDIO_CRC_CRC16 = 1, | ||
913 | }; | ||
914 | |||
915 | /* MPEG video */ | ||
916 | #define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) | ||
917 | enum v4l2_mpeg_video_encoding { | ||
918 | V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, | ||
919 | V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, | ||
920 | }; | ||
921 | #define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) | ||
922 | enum v4l2_mpeg_video_aspect { | ||
923 | V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, | ||
924 | V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, | ||
925 | V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, | ||
926 | V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, | ||
927 | }; | ||
928 | #define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202) | ||
929 | #define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203) | ||
930 | #define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204) | ||
931 | #define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205) | ||
932 | #define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206) | ||
933 | enum v4l2_mpeg_video_bitrate_mode { | ||
934 | V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, | ||
935 | V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, | ||
936 | }; | ||
937 | #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) | ||
938 | #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) | ||
939 | #define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) | ||
940 | |||
941 | /* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */ | ||
942 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) | ||
943 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) | ||
944 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { | ||
945 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, | ||
946 | V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, | ||
947 | }; | ||
948 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1) | ||
949 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2) | ||
950 | enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { | ||
951 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
952 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
953 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, | ||
954 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, | ||
955 | V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, | ||
956 | }; | ||
957 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3) | ||
958 | enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { | ||
959 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, | ||
960 | V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, | ||
961 | }; | ||
962 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4) | ||
963 | enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { | ||
964 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, | ||
965 | V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, | ||
966 | }; | ||
967 | #define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5) | ||
968 | #define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6) | ||
969 | enum v4l2_mpeg_cx2341x_video_median_filter_type { | ||
970 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, | ||
971 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, | ||
972 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, | ||
973 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, | ||
974 | V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, | ||
975 | }; | ||
976 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7) | ||
977 | #define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) | ||
978 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) | ||
979 | #define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) | ||
980 | |||
836 | /* | 981 | /* |
837 | * T U N I N G | 982 | * T U N I N G |
838 | */ | 983 | */ |
@@ -904,6 +1049,7 @@ struct v4l2_audio | |||
904 | __u32 mode; | 1049 | __u32 mode; |
905 | __u32 reserved[2]; | 1050 | __u32 reserved[2]; |
906 | }; | 1051 | }; |
1052 | |||
907 | /* Flags for the 'capability' field */ | 1053 | /* Flags for the 'capability' field */ |
908 | #define V4L2_AUDCAP_STEREO 0x00001 | 1054 | #define V4L2_AUDCAP_STEREO 0x00001 |
909 | #define V4L2_AUDCAP_AVL 0x00002 | 1055 | #define V4L2_AUDCAP_AVL 0x00002 |
@@ -927,7 +1073,6 @@ struct v4l2_audioout | |||
927 | */ | 1073 | */ |
928 | 1074 | ||
929 | /* Raw VBI */ | 1075 | /* Raw VBI */ |
930 | |||
931 | struct v4l2_vbi_format | 1076 | struct v4l2_vbi_format |
932 | { | 1077 | { |
933 | __u32 sampling_rate; /* in 1 Hz */ | 1078 | __u32 sampling_rate; /* in 1 Hz */ |
@@ -1034,8 +1179,6 @@ struct v4l2_streamparm | |||
1034 | } parm; | 1179 | } parm; |
1035 | }; | 1180 | }; |
1036 | 1181 | ||
1037 | |||
1038 | |||
1039 | /* | 1182 | /* |
1040 | * 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 | 1183 | * 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 |
1041 | * | 1184 | * |
@@ -1045,8 +1188,10 @@ struct v4l2_streamparm | |||
1045 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) | 1188 | #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) |
1046 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) | 1189 | #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) |
1047 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) | 1190 | #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) |
1191 | #ifdef __KERNEL__ | ||
1048 | #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) | 1192 | #define VIDIOC_G_MPEGCOMP _IOR ('V', 6, struct v4l2_mpeg_compression) |
1049 | #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) | 1193 | #define VIDIOC_S_MPEGCOMP _IOW ('V', 7, struct v4l2_mpeg_compression) |
1194 | #endif | ||
1050 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) | 1195 | #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) |
1051 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) | 1196 | #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) |
1052 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) | 1197 | #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) |
@@ -1096,7 +1241,11 @@ struct v4l2_streamparm | |||
1096 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) | 1241 | #define VIDIOC_G_SLICED_VBI_CAP _IOR ('V', 69, struct v4l2_sliced_vbi_cap) |
1097 | #endif | 1242 | #endif |
1098 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1243 | #define VIDIOC_LOG_STATUS _IO ('V', 70) |
1244 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | ||
1245 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) | ||
1246 | #define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls) | ||
1099 | 1247 | ||
1248 | #ifdef __OLD_VIDIOC_ | ||
1100 | /* for compatibility, will go away some day */ | 1249 | /* for compatibility, will go away some day */ |
1101 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) | 1250 | #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) |
1102 | #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) | 1251 | #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) |
@@ -1104,57 +1253,10 @@ struct v4l2_streamparm | |||
1104 | #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) | 1253 | #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) |
1105 | #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) | 1254 | #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) |
1106 | #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) | 1255 | #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) |
1107 | |||
1108 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ | ||
1109 | |||
1110 | |||
1111 | #ifdef __KERNEL__ | ||
1112 | /* | ||
1113 | * | ||
1114 | * V 4 L 2 D R I V E R H E L P E R A P I | ||
1115 | * | ||
1116 | * Some commonly needed functions for drivers (v4l2-common.o module) | ||
1117 | */ | ||
1118 | #include <linux/fs.h> | ||
1119 | |||
1120 | /* Video standard functions */ | ||
1121 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | ||
1122 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | ||
1123 | int id, char *name); | ||
1124 | |||
1125 | /* prority handling */ | ||
1126 | struct v4l2_prio_state { | ||
1127 | atomic_t prios[4]; | ||
1128 | }; | ||
1129 | int v4l2_prio_init(struct v4l2_prio_state *global); | ||
1130 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
1131 | enum v4l2_priority new); | ||
1132 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
1133 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
1134 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
1135 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
1136 | |||
1137 | /* names for fancy debug output */ | ||
1138 | extern char *v4l2_field_names[]; | ||
1139 | extern char *v4l2_type_names[]; | ||
1140 | |||
1141 | /* Compatibility layer interface -- v4l1-compat module */ | ||
1142 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | ||
1143 | unsigned int cmd, void *arg); | ||
1144 | |||
1145 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
1146 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | ||
1147 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | ||
1148 | #else | ||
1149 | #define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL | ||
1150 | #endif | 1256 | #endif |
1151 | 1257 | ||
1152 | /* 32 Bits compatibility layer for 64 bits processors */ | 1258 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |
1153 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
1154 | unsigned long arg); | ||
1155 | |||
1156 | 1259 | ||
1157 | #endif /* __KERNEL__ */ | ||
1158 | #endif /* __LINUX_VIDEODEV2_H */ | 1260 | #endif /* __LINUX_VIDEODEV2_H */ |
1159 | 1261 | ||
1160 | /* | 1262 | /* |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h new file mode 100644 index 000000000000..51fb06b4c394 --- /dev/null +++ b/include/media/cx2341x.h | |||
@@ -0,0 +1,189 @@ | |||
1 | /* | ||
2 | cx23415/6 header containing common defines. | ||
3 | |||
4 | This program is free software; you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation; either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program; if not, write to the Free Software | ||
16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef CX2341X_H | ||
20 | #define CX2341X_H | ||
21 | |||
22 | enum cx2341x_port { | ||
23 | CX2341X_PORT_MEMORY = 0, | ||
24 | CX2341X_PORT_STREAMING = 1, | ||
25 | CX2341X_PORT_SERIAL = 2 | ||
26 | }; | ||
27 | |||
28 | struct cx2341x_mpeg_params { | ||
29 | /* misc */ | ||
30 | enum cx2341x_port port; | ||
31 | u16 width; | ||
32 | u16 height; | ||
33 | u16 is_50hz; | ||
34 | |||
35 | /* stream */ | ||
36 | enum v4l2_mpeg_stream_type stream_type; | ||
37 | |||
38 | /* audio */ | ||
39 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; | ||
40 | enum v4l2_mpeg_audio_encoding audio_encoding; | ||
41 | enum v4l2_mpeg_audio_l2_bitrate audio_l2_bitrate; | ||
42 | enum v4l2_mpeg_audio_mode audio_mode; | ||
43 | enum v4l2_mpeg_audio_mode_extension audio_mode_extension; | ||
44 | enum v4l2_mpeg_audio_emphasis audio_emphasis; | ||
45 | enum v4l2_mpeg_audio_crc audio_crc; | ||
46 | u8 audio_properties; | ||
47 | |||
48 | /* video */ | ||
49 | enum v4l2_mpeg_video_encoding video_encoding; | ||
50 | enum v4l2_mpeg_video_aspect video_aspect; | ||
51 | u16 video_b_frames; | ||
52 | u16 video_gop_size; | ||
53 | u16 video_gop_closure; | ||
54 | u16 video_pulldown; | ||
55 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; | ||
56 | u32 video_bitrate; | ||
57 | u32 video_bitrate_peak; | ||
58 | u16 video_temporal_decimation; | ||
59 | |||
60 | /* encoding filters */ | ||
61 | enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode; | ||
62 | u16 video_spatial_filter; | ||
63 | enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type video_luma_spatial_filter_type; | ||
64 | enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type video_chroma_spatial_filter_type; | ||
65 | enum v4l2_mpeg_cx2341x_video_temporal_filter_mode video_temporal_filter_mode; | ||
66 | u16 video_temporal_filter; | ||
67 | enum v4l2_mpeg_cx2341x_video_median_filter_type video_median_filter_type; | ||
68 | u16 video_luma_median_filter_top; | ||
69 | u16 video_luma_median_filter_bottom; | ||
70 | u16 video_chroma_median_filter_top; | ||
71 | u16 video_chroma_median_filter_bottom; | ||
72 | }; | ||
73 | |||
74 | #define CX2341X_MBOX_MAX_DATA 16 | ||
75 | |||
76 | extern const u32 cx2341x_mpeg_ctrls[]; | ||
77 | typedef int (*cx2341x_mbox_func)(void *priv, int cmd, int in, int out, | ||
78 | u32 data[CX2341X_MBOX_MAX_DATA]); | ||
79 | int cx2341x_update(void *priv, cx2341x_mbox_func func, | ||
80 | const struct cx2341x_mpeg_params *old, | ||
81 | const struct cx2341x_mpeg_params *new); | ||
82 | int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, | ||
83 | struct v4l2_queryctrl *qctrl); | ||
84 | const char **cx2341x_ctrl_get_menu(u32 id); | ||
85 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, | ||
86 | struct v4l2_ext_controls *ctrls, int cmd); | ||
87 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); | ||
88 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, int cardid); | ||
89 | |||
90 | /* Firmware names */ | ||
91 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" | ||
92 | /* Decoder firmware for the cx23415 only */ | ||
93 | #define CX2341X_FIRM_DEC_FILENAME "v4l-cx2341x-dec.fw" | ||
94 | |||
95 | /* Firmware API commands */ | ||
96 | |||
97 | /* MPEG decoder API, specific to the cx23415 */ | ||
98 | #define CX2341X_DEC_PING_FW 0x00 | ||
99 | #define CX2341X_DEC_START_PLAYBACK 0x01 | ||
100 | #define CX2341X_DEC_STOP_PLAYBACK 0x02 | ||
101 | #define CX2341X_DEC_SET_PLAYBACK_SPEED 0x03 | ||
102 | #define CX2341X_DEC_STEP_VIDEO 0x05 | ||
103 | #define CX2341X_DEC_SET_DMA_BLOCK_SIZE 0x08 | ||
104 | #define CX2341X_DEC_GET_XFER_INFO 0x09 | ||
105 | #define CX2341X_DEC_GET_DMA_STATUS 0x0a | ||
106 | #define CX2341X_DEC_SCHED_DMA_FROM_HOST 0x0b | ||
107 | #define CX2341X_DEC_PAUSE_PLAYBACK 0x0d | ||
108 | #define CX2341X_DEC_HALT_FW 0x0e | ||
109 | #define CX2341X_DEC_SET_STANDARD 0x10 | ||
110 | #define CX2341X_DEC_GET_VERSION 0x11 | ||
111 | #define CX2341X_DEC_SET_STREAM_INPUT 0x14 | ||
112 | #define CX2341X_DEC_GET_TIMING_INFO 0x15 | ||
113 | #define CX2341X_DEC_SET_AUDIO_MODE 0x16 | ||
114 | #define CX2341X_DEC_SET_EVENT_NOTIFICATION 0x17 | ||
115 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 | ||
116 | #define CX2341X_DEC_EXTRACT_VBI 0x19 | ||
117 | #define CX2341X_DEC_SET_DECODER_SOURCE 0x1a | ||
118 | #define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b | ||
119 | #define CX2341X_DEC_SET_AV_DELAY 0x1c | ||
120 | #define CX2341X_DEC_SET_PREBUFFERING 0x1e | ||
121 | |||
122 | /* MPEG encoder API */ | ||
123 | #define CX2341X_ENC_PING_FW 0x80 | ||
124 | #define CX2341X_ENC_START_CAPTURE 0x81 | ||
125 | #define CX2341X_ENC_STOP_CAPTURE 0x82 | ||
126 | #define CX2341X_ENC_SET_AUDIO_ID 0x89 | ||
127 | #define CX2341X_ENC_SET_VIDEO_ID 0x8b | ||
128 | #define CX2341X_ENC_SET_PCR_ID 0x8d | ||
129 | #define CX2341X_ENC_SET_FRAME_RATE 0x8f | ||
130 | #define CX2341X_ENC_SET_FRAME_SIZE 0x91 | ||
131 | #define CX2341X_ENC_SET_BIT_RATE 0x95 | ||
132 | #define CX2341X_ENC_SET_GOP_PROPERTIES 0x97 | ||
133 | #define CX2341X_ENC_SET_ASPECT_RATIO 0x99 | ||
134 | #define CX2341X_ENC_SET_DNR_FILTER_MODE 0x9b | ||
135 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d | ||
136 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f | ||
137 | #define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 | ||
138 | #define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1 | ||
139 | #define CX2341X_ENC_SET_VBI_LINE 0xb7 | ||
140 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 | ||
141 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb | ||
142 | #define CX2341X_ENC_SET_AUDIO_PROPERTIES 0xbd | ||
143 | #define CX2341X_ENC_HALT_FW 0xc3 | ||
144 | #define CX2341X_ENC_GET_VERSION 0xc4 | ||
145 | #define CX2341X_ENC_SET_GOP_CLOSURE 0xc5 | ||
146 | #define CX2341X_ENC_GET_SEQ_END 0xc6 | ||
147 | #define CX2341X_ENC_SET_PGM_INDEX_INFO 0xc7 | ||
148 | #define CX2341X_ENC_SET_VBI_CONFIG 0xc8 | ||
149 | #define CX2341X_ENC_SET_DMA_BLOCK_SIZE 0xc9 | ||
150 | #define CX2341X_ENC_GET_PREV_DMA_INFO_MB_10 0xca | ||
151 | #define CX2341X_ENC_GET_PREV_DMA_INFO_MB_9 0xcb | ||
152 | #define CX2341X_ENC_SCHED_DMA_TO_HOST 0xcc | ||
153 | #define CX2341X_ENC_INITIALIZE_INPUT 0xcd | ||
154 | #define CX2341X_ENC_SET_FRAME_DROP_RATE 0xd0 | ||
155 | #define CX2341X_ENC_PAUSE_ENCODER 0xd2 | ||
156 | #define CX2341X_ENC_REFRESH_INPUT 0xd3 | ||
157 | #define CX2341X_ENC_SET_COPYRIGHT 0xd4 | ||
158 | #define CX2341X_ENC_SET_EVENT_NOTIFICATION 0xd5 | ||
159 | #define CX2341X_ENC_SET_NUM_VSYNC_LINES 0xd6 | ||
160 | #define CX2341X_ENC_SET_PLACEHOLDER 0xd7 | ||
161 | #define CX2341X_ENC_MUTE_VIDEO 0xd9 | ||
162 | #define CX2341X_ENC_MUTE_AUDIO 0xda | ||
163 | #define CX2341X_ENC_UNKNOWN 0xdb | ||
164 | #define CX2341X_ENC_MISC 0xdc | ||
165 | |||
166 | /* OSD API, specific to the cx23415 */ | ||
167 | #define CX2341X_OSD_GET_FRAMEBUFFER 0x41 | ||
168 | #define CX2341X_OSD_GET_PIXEL_FORMAT 0x42 | ||
169 | #define CX2341X_OSD_SET_PIXEL_FORMAT 0x43 | ||
170 | #define CX2341X_OSD_GET_STATE 0x44 | ||
171 | #define CX2341X_OSD_SET_STATE 0x45 | ||
172 | #define CX2341X_OSD_GET_OSD_COORDS 0x46 | ||
173 | #define CX2341X_OSD_SET_OSD_COORDS 0x47 | ||
174 | #define CX2341X_OSD_GET_SCREEN_COORDS 0x48 | ||
175 | #define CX2341X_OSD_SET_SCREEN_COORDS 0x49 | ||
176 | #define CX2341X_OSD_GET_GLOBAL_ALPHA 0x4a | ||
177 | #define CX2341X_OSD_SET_GLOBAL_ALPHA 0x4b | ||
178 | #define CX2341X_OSD_SET_BLEND_COORDS 0x4c | ||
179 | #define CX2341X_OSD_GET_FLICKER_STATE 0x4f | ||
180 | #define CX2341X_OSD_SET_FLICKER_STATE 0x50 | ||
181 | #define CX2341X_OSD_BLT_COPY 0x52 | ||
182 | #define CX2341X_OSD_BLT_FILL 0x53 | ||
183 | #define CX2341X_OSD_BLT_TEXT 0x54 | ||
184 | #define CX2341X_OSD_SET_FRAMEBUFFER_WINDOW 0x56 | ||
185 | #define CX2341X_OSD_SET_CHROMA_KEY 0x60 | ||
186 | #define CX2341X_OSD_GET_ALPHA_CONTENT_INDEX 0x61 | ||
187 | #define CX2341X_OSD_SET_ALPHA_CONTENT_INDEX 0x62 | ||
188 | |||
189 | #endif /* CX2341X_H */ | ||
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 302d5b3946e7..7bab09b0ed45 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -73,7 +73,7 @@ extern IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE]; | |||
73 | extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; | 73 | extern IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE]; |
74 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; | 74 | extern IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE]; |
75 | extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; | 75 | extern IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE]; |
76 | extern IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE]; | 76 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE]; |
77 | extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; | 77 | extern IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE]; |
78 | extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; | 78 | extern IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE]; |
79 | extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; | 79 | extern IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE]; |
@@ -87,8 +87,9 @@ extern IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE]; | |||
87 | extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; | 87 | extern IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE]; |
88 | extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; | 88 | extern IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE]; |
89 | extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; | 89 | extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE]; |
90 | extern IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE]; | 90 | extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE]; |
91 | extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; | 91 | extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; |
92 | extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; | ||
92 | 93 | ||
93 | #endif | 94 | #endif |
94 | 95 | ||
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 730f21ed91db..a455f7ce5ee8 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
@@ -20,5 +20,6 @@ struct IR_i2c { | |||
20 | int (*get_key)(struct IR_i2c*, u32*, u32*); | 20 | int (*get_key)(struct IR_i2c*, u32*, u32*); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | 23 | int get_key_pinnacle_grey(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); |
24 | int get_key_pinnacle_color(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw); | ||
24 | #endif | 25 | #endif |
diff --git a/include/media/ovcamchip.h b/include/media/ovcamchip.h index 8138983adced..0f43451f8bb3 100644 --- a/include/media/ovcamchip.h +++ b/include/media/ovcamchip.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define __LINUX_OVCAMCHIP_H | 15 | #define __LINUX_OVCAMCHIP_H |
16 | 16 | ||
17 | #include <linux/videodev.h> | 17 | #include <linux/videodev.h> |
18 | #include <media/v4l2-common.h> | ||
18 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
19 | 20 | ||
20 | /* --------------------------------- */ | 21 | /* --------------------------------- */ |
diff --git a/include/media/pwc-ioctl.h b/include/media/pwc-ioctl.h new file mode 100644 index 000000000000..adc1254e887e --- /dev/null +++ b/include/media/pwc-ioctl.h | |||
@@ -0,0 +1,325 @@ | |||
1 | #ifndef PWC_IOCTL_H | ||
2 | #define PWC_IOCTL_H | ||
3 | |||
4 | /* (C) 2001-2004 Nemosoft Unv. | ||
5 | (C) 2004-2006 Luc Saillard (luc@saillard.org) | ||
6 | |||
7 | NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx | ||
8 | driver and thus may have bugs that are not present in the original version. | ||
9 | Please send bug reports and support requests to <luc@saillard.org>. | ||
10 | The decompression routines have been implemented by reverse-engineering the | ||
11 | Nemosoft binary pwcx module. Caveat emptor. | ||
12 | |||
13 | This program is free software; you can redistribute it and/or modify | ||
14 | it under the terms of the GNU General Public License as published by | ||
15 | the Free Software Foundation; either version 2 of the License, or | ||
16 | (at your option) any later version. | ||
17 | |||
18 | This program is distributed in the hope that it will be useful, | ||
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | GNU General Public License for more details. | ||
22 | |||
23 | You should have received a copy of the GNU General Public License | ||
24 | along with this program; if not, write to the Free Software | ||
25 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
26 | */ | ||
27 | |||
28 | /* This is pwc-ioctl.h belonging to PWC 10.0.10 | ||
29 | It contains structures and defines to communicate from user space | ||
30 | directly to the driver. | ||
31 | */ | ||
32 | |||
33 | /* | ||
34 | Changes | ||
35 | 2001/08/03 Alvarado Added ioctl constants to access methods for | ||
36 | changing white balance and red/blue gains | ||
37 | 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE | ||
38 | 2003/12/13 Nemosft Unv. Some modifications to make interfacing to | ||
39 | PWCX easier | ||
40 | 2006/01/01 Luc Saillard Add raw format definition | ||
41 | */ | ||
42 | |||
43 | /* These are private ioctl() commands, specific for the Philips webcams. | ||
44 | They contain functions not found in other webcams, and settings not | ||
45 | specified in the Video4Linux API. | ||
46 | |||
47 | The #define names are built up like follows: | ||
48 | VIDIOC VIDeo IOCtl prefix | ||
49 | PWC Philps WebCam | ||
50 | G optional: Get | ||
51 | S optional: Set | ||
52 | ... the function | ||
53 | */ | ||
54 | |||
55 | #include <linux/types.h> | ||
56 | #include <linux/version.h> | ||
57 | |||
58 | |||
59 | /* Enumeration of image sizes */ | ||
60 | #define PSZ_SQCIF 0x00 | ||
61 | #define PSZ_QSIF 0x01 | ||
62 | #define PSZ_QCIF 0x02 | ||
63 | #define PSZ_SIF 0x03 | ||
64 | #define PSZ_CIF 0x04 | ||
65 | #define PSZ_VGA 0x05 | ||
66 | #define PSZ_MAX 6 | ||
67 | |||
68 | |||
69 | /* The frame rate is encoded in the video_window.flags parameter using | ||
70 | the upper 16 bits, since some flags are defined nowadays. The following | ||
71 | defines provide a mask and shift to filter out this value. | ||
72 | This value can also be passing using the private flag when using v4l2 and | ||
73 | VIDIOC_S_FMT ioctl. | ||
74 | |||
75 | In 'Snapshot' mode the camera freezes its automatic exposure and colour | ||
76 | balance controls. | ||
77 | */ | ||
78 | #define PWC_FPS_SHIFT 16 | ||
79 | #define PWC_FPS_MASK 0x00FF0000 | ||
80 | #define PWC_FPS_FRMASK 0x003F0000 | ||
81 | #define PWC_FPS_SNAPSHOT 0x00400000 | ||
82 | #define PWC_QLT_MASK 0x03000000 | ||
83 | #define PWC_QLT_SHIFT 24 | ||
84 | |||
85 | |||
86 | /* structure for transferring x & y coordinates */ | ||
87 | struct pwc_coord | ||
88 | { | ||
89 | int x, y; /* guess what */ | ||
90 | int size; /* size, or offset */ | ||
91 | }; | ||
92 | |||
93 | |||
94 | /* Used with VIDIOCPWCPROBE */ | ||
95 | struct pwc_probe | ||
96 | { | ||
97 | char name[32]; | ||
98 | int type; | ||
99 | }; | ||
100 | |||
101 | struct pwc_serial | ||
102 | { | ||
103 | char serial[30]; /* String with serial number. Contains terminating 0 */ | ||
104 | }; | ||
105 | |||
106 | /* pwc_whitebalance.mode values */ | ||
107 | #define PWC_WB_INDOOR 0 | ||
108 | #define PWC_WB_OUTDOOR 1 | ||
109 | #define PWC_WB_FL 2 | ||
110 | #define PWC_WB_MANUAL 3 | ||
111 | #define PWC_WB_AUTO 4 | ||
112 | |||
113 | /* Used with VIDIOCPWC[SG]AWB (Auto White Balance). | ||
114 | Set mode to one of the PWC_WB_* values above. | ||
115 | *red and *blue are the respective gains of these colour components inside | ||
116 | the camera; range 0..65535 | ||
117 | When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; | ||
118 | otherwise undefined. | ||
119 | 'read_red' and 'read_blue' are read-only. | ||
120 | */ | ||
121 | struct pwc_whitebalance | ||
122 | { | ||
123 | int mode; | ||
124 | int manual_red, manual_blue; /* R/W */ | ||
125 | int read_red, read_blue; /* R/O */ | ||
126 | }; | ||
127 | |||
128 | /* | ||
129 | 'control_speed' and 'control_delay' are used in automatic whitebalance mode, | ||
130 | and tell the camera how fast it should react to changes in lighting, and | ||
131 | with how much delay. Valid values are 0..65535. | ||
132 | */ | ||
133 | struct pwc_wb_speed | ||
134 | { | ||
135 | int control_speed; | ||
136 | int control_delay; | ||
137 | |||
138 | }; | ||
139 | |||
140 | /* Used with VIDIOCPWC[SG]LED */ | ||
141 | struct pwc_leds | ||
142 | { | ||
143 | int led_on; /* Led on-time; range = 0..25000 */ | ||
144 | int led_off; /* Led off-time; range = 0..25000 */ | ||
145 | }; | ||
146 | |||
147 | /* Image size (used with GREALSIZE) */ | ||
148 | struct pwc_imagesize | ||
149 | { | ||
150 | int width; | ||
151 | int height; | ||
152 | }; | ||
153 | |||
154 | /* Defines and structures for Motorized Pan & Tilt */ | ||
155 | #define PWC_MPT_PAN 0x01 | ||
156 | #define PWC_MPT_TILT 0x02 | ||
157 | #define PWC_MPT_TIMEOUT 0x04 /* for status */ | ||
158 | |||
159 | /* Set angles; when absolute != 0, the angle is absolute and the | ||
160 | driver calculates the relative offset for you. This can only | ||
161 | be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns | ||
162 | absolute angles. | ||
163 | */ | ||
164 | struct pwc_mpt_angles | ||
165 | { | ||
166 | int absolute; /* write-only */ | ||
167 | int pan; /* degrees * 100 */ | ||
168 | int tilt; /* degress * 100 */ | ||
169 | }; | ||
170 | |||
171 | /* Range of angles of the camera, both horizontally and vertically. | ||
172 | */ | ||
173 | struct pwc_mpt_range | ||
174 | { | ||
175 | int pan_min, pan_max; /* degrees * 100 */ | ||
176 | int tilt_min, tilt_max; | ||
177 | }; | ||
178 | |||
179 | struct pwc_mpt_status | ||
180 | { | ||
181 | int status; | ||
182 | int time_pan; | ||
183 | int time_tilt; | ||
184 | }; | ||
185 | |||
186 | |||
187 | /* This is used for out-of-kernel decompression. With it, you can get | ||
188 | all the necessary information to initialize and use the decompressor | ||
189 | routines in standalone applications. | ||
190 | */ | ||
191 | struct pwc_video_command | ||
192 | { | ||
193 | int type; /* camera type (645, 675, 730, etc.) */ | ||
194 | int release; /* release number */ | ||
195 | |||
196 | int size; /* one of PSZ_* */ | ||
197 | int alternate; | ||
198 | int command_len; /* length of USB video command */ | ||
199 | unsigned char command_buf[13]; /* Actual USB video command */ | ||
200 | int bandlength; /* >0 = compressed */ | ||
201 | int frame_size; /* Size of one (un)compressed frame */ | ||
202 | }; | ||
203 | |||
204 | /* Flags for PWCX subroutines. Not all modules honour all flags. */ | ||
205 | #define PWCX_FLAG_PLANAR 0x0001 | ||
206 | #define PWCX_FLAG_BAYER 0x0008 | ||
207 | |||
208 | |||
209 | /* IOCTL definitions */ | ||
210 | |||
211 | /* Restore user settings */ | ||
212 | #define VIDIOCPWCRUSER _IO('v', 192) | ||
213 | /* Save user settings */ | ||
214 | #define VIDIOCPWCSUSER _IO('v', 193) | ||
215 | /* Restore factory settings */ | ||
216 | #define VIDIOCPWCFACTORY _IO('v', 194) | ||
217 | |||
218 | /* You can manipulate the compression factor. A compression preference of 0 | ||
219 | means use uncompressed modes when available; 1 is low compression, 2 is | ||
220 | medium and 3 is high compression preferred. Of course, the higher the | ||
221 | compression, the lower the bandwidth used but more chance of artefacts | ||
222 | in the image. The driver automatically chooses a higher compression when | ||
223 | the preferred mode is not available. | ||
224 | */ | ||
225 | /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ | ||
226 | #define VIDIOCPWCSCQUAL _IOW('v', 195, int) | ||
227 | /* Get preferred compression quality */ | ||
228 | #define VIDIOCPWCGCQUAL _IOR('v', 195, int) | ||
229 | |||
230 | |||
231 | /* Retrieve serial number of camera */ | ||
232 | #define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) | ||
233 | |||
234 | /* This is a probe function; since so many devices are supported, it | ||
235 | becomes difficult to include all the names in programs that want to | ||
236 | check for the enhanced Philips stuff. So in stead, try this PROBE; | ||
237 | it returns a structure with the original name, and the corresponding | ||
238 | Philips type. | ||
239 | To use, fill the structure with zeroes, call PROBE and if that succeeds, | ||
240 | compare the name with that returned from VIDIOCGCAP; they should be the | ||
241 | same. If so, you can be assured it is a Philips (OEM) cam and the type | ||
242 | is valid. | ||
243 | */ | ||
244 | #define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) | ||
245 | |||
246 | /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ | ||
247 | #define VIDIOCPWCSAGC _IOW('v', 200, int) | ||
248 | /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ | ||
249 | #define VIDIOCPWCGAGC _IOR('v', 200, int) | ||
250 | /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ | ||
251 | #define VIDIOCPWCSSHUTTER _IOW('v', 201, int) | ||
252 | |||
253 | /* Color compensation (Auto White Balance) */ | ||
254 | #define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) | ||
255 | #define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) | ||
256 | |||
257 | /* Auto WB speed */ | ||
258 | #define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) | ||
259 | #define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) | ||
260 | |||
261 | /* LEDs on/off/blink; int range 0..65535 */ | ||
262 | #define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) | ||
263 | #define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) | ||
264 | |||
265 | /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ | ||
266 | #define VIDIOCPWCSCONTOUR _IOW('v', 206, int) | ||
267 | #define VIDIOCPWCGCONTOUR _IOR('v', 206, int) | ||
268 | |||
269 | /* Backlight compensation; 0 = off, otherwise on */ | ||
270 | #define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) | ||
271 | #define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) | ||
272 | |||
273 | /* Flickerless mode; = 0 off, otherwise on */ | ||
274 | #define VIDIOCPWCSFLICKER _IOW('v', 208, int) | ||
275 | #define VIDIOCPWCGFLICKER _IOR('v', 208, int) | ||
276 | |||
277 | /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ | ||
278 | #define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) | ||
279 | #define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) | ||
280 | |||
281 | /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ | ||
282 | #define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) | ||
283 | |||
284 | /* Motorized pan & tilt functions */ | ||
285 | #define VIDIOCPWCMPTRESET _IOW('v', 211, int) | ||
286 | #define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) | ||
287 | #define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) | ||
288 | #define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) | ||
289 | #define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) | ||
290 | |||
291 | /* Get the USB set-video command; needed for initializing libpwcx */ | ||
292 | #define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) | ||
293 | struct pwc_table_init_buffer { | ||
294 | int len; | ||
295 | char *buffer; | ||
296 | |||
297 | }; | ||
298 | #define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) | ||
299 | |||
300 | /* | ||
301 | * This is private command used when communicating with v4l2. | ||
302 | * In the future all private ioctl will be remove/replace to | ||
303 | * use interface offer by v4l2. | ||
304 | */ | ||
305 | |||
306 | #define V4L2_CID_PRIVATE_SAVE_USER (V4L2_CID_PRIVATE_BASE + 0) | ||
307 | #define V4L2_CID_PRIVATE_RESTORE_USER (V4L2_CID_PRIVATE_BASE + 1) | ||
308 | #define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2) | ||
309 | #define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3) | ||
310 | #define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4) | ||
311 | #define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5) | ||
312 | #define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6) | ||
313 | #define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7) | ||
314 | #define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8) | ||
315 | |||
316 | struct pwc_raw_frame { | ||
317 | __le16 type; /* type of the webcam */ | ||
318 | __le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */ | ||
319 | __u8 cmd[4]; /* the four byte of the command (in case of nala, | ||
320 | only the first 3 bytes is filled) */ | ||
321 | __u8 rawframe[0]; /* frame_size = H/4*vbandlength */ | ||
322 | } __attribute__ ((packed)); | ||
323 | |||
324 | |||
325 | #endif | ||
diff --git a/include/media/saa7115.h b/include/media/saa7115.h index 6b4836f3f057..9f0e2285a099 100644 --- a/include/media/saa7115.h +++ b/include/media/saa7115.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | saa7115.h - definition for saa7113/4/5 inputs | 2 | saa7115.h - definition for saa7113/4/5 inputs and frequency flags |
3 | 3 | ||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | 4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) |
5 | 5 | ||
@@ -33,5 +33,14 @@ | |||
33 | #define SAA7115_SVIDEO2 8 | 33 | #define SAA7115_SVIDEO2 8 |
34 | #define SAA7115_SVIDEO3 9 | 34 | #define SAA7115_SVIDEO3 9 |
35 | 35 | ||
36 | /* SAA7115 v4l2_crystal_freq frequency values */ | ||
37 | #define SAA7115_FREQ_32_11_MHZ 32110000 /* 32.11 MHz crystal, SAA7114/5 only */ | ||
38 | #define SAA7115_FREQ_24_576_MHZ 24576000 /* 24.576 MHz crystal */ | ||
39 | |||
40 | /* SAA7115 v4l2_crystal_freq audio clock control flags */ | ||
41 | #define SAA7115_FREQ_FL_UCGC (1 << 0) /* SA 3A[7], UCGC, SAA7115 only */ | ||
42 | #define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ | ||
43 | #define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ | ||
44 | |||
36 | #endif | 45 | #endif |
37 | 46 | ||
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 4507cb61ae93..83fe2e3d1e25 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __SAA7146_VV__ | 2 | #define __SAA7146_VV__ |
3 | 3 | ||
4 | #include <linux/videodev.h> | 4 | #include <linux/videodev.h> |
5 | 5 | #include <media/v4l2-common.h> | |
6 | #include <media/saa7146.h> | 6 | #include <media/saa7146.h> |
7 | #include <media/video-buf.h> | 7 | #include <media/video-buf.h> |
8 | 8 | ||
diff --git a/include/media/tuner.h b/include/media/tuner.h index 017fed7d5e4d..2f7b00b08e88 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #include <media/tuner-types.h> | 26 | #include <media/tuner-types.h> |
27 | 27 | ||
28 | extern int tuner_debug; | ||
29 | |||
28 | #define ADDR_UNSET (255) | 30 | #define ADDR_UNSET (255) |
29 | 31 | ||
30 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ | 32 | #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ |
@@ -108,7 +110,7 @@ | |||
108 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ | 110 | #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ |
109 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 | 111 | #define TUNER_PHILIPS_FMD1216ME_MK3 63 |
110 | 112 | ||
111 | #define TUNER_LG_TDVS_H062F 64 /* DViCO FusionHDTV 5 */ | 113 | #define TUNER_LG_TDVS_H06XF 64 /* TDVS H061F, H062F, H064F */ |
112 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ | 114 | #define TUNER_YMEC_TVF66T5_B_DFF 65 /* Acorp Y878F */ |
113 | #define TUNER_LG_TALN 66 | 115 | #define TUNER_LG_TALN 66 |
114 | #define TUNER_PHILIPS_TD1316 67 | 116 | #define TUNER_PHILIPS_TD1316 67 |
@@ -119,6 +121,8 @@ | |||
119 | #define TUNER_XCEIVE_XC3028 71 | 121 | #define TUNER_XCEIVE_XC3028 71 |
120 | 122 | ||
121 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ | 123 | #define TUNER_THOMSON_FE6600 72 /* DViCO FusionHDTV DVB-T Hybrid */ |
124 | #define TUNER_SAMSUNG_TCPG_6121P30A 73 /* Hauppauge PVR-500 PAL */ | ||
125 | #define TUNER_TDA9887 74 /* This tuner should be used only internally */ | ||
122 | 126 | ||
123 | /* tv card specific */ | 127 | /* tv card specific */ |
124 | #define TDA9887_PRESENT (1<<0) | 128 | #define TDA9887_PRESENT (1<<0) |
@@ -190,6 +194,10 @@ struct tuner { | |||
190 | 194 | ||
191 | int using_v4l2; | 195 | int using_v4l2; |
192 | 196 | ||
197 | /* used by tda9887 */ | ||
198 | unsigned int tda9887_config; | ||
199 | unsigned char tda9887_data[4]; | ||
200 | |||
193 | /* used by MT2032 */ | 201 | /* used by MT2032 */ |
194 | unsigned int xogc; | 202 | unsigned int xogc; |
195 | unsigned int radio_if2; | 203 | unsigned int radio_if2; |
@@ -206,6 +214,8 @@ struct tuner { | |||
206 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); | 214 | void (*set_radio_freq)(struct i2c_client *c, unsigned int freq); |
207 | int (*has_signal)(struct i2c_client *c); | 215 | int (*has_signal)(struct i2c_client *c); |
208 | int (*is_stereo)(struct i2c_client *c); | 216 | int (*is_stereo)(struct i2c_client *c); |
217 | int (*get_afc)(struct i2c_client *c); | ||
218 | void (*tuner_status)(struct i2c_client *c); | ||
209 | void (*standby)(struct i2c_client *c); | 219 | void (*standby)(struct i2c_client *c); |
210 | }; | 220 | }; |
211 | 221 | ||
@@ -218,6 +228,7 @@ extern int tda8290_probe(struct i2c_client *c); | |||
218 | extern int tea5767_tuner_init(struct i2c_client *c); | 228 | extern int tea5767_tuner_init(struct i2c_client *c); |
219 | extern int default_tuner_init(struct i2c_client *c); | 229 | extern int default_tuner_init(struct i2c_client *c); |
220 | extern int tea5767_autodetection(struct i2c_client *c); | 230 | extern int tea5767_autodetection(struct i2c_client *c); |
231 | extern int tda9887_tuner_init(struct i2c_client *c); | ||
221 | 232 | ||
222 | #define tuner_warn(fmt, arg...) do {\ | 233 | #define tuner_warn(fmt, arg...) do {\ |
223 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ | 234 | printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->driver.name, \ |
diff --git a/include/media/tvp5150.h b/include/media/tvp5150.h new file mode 100644 index 000000000000..72bd2a2b8bfd --- /dev/null +++ b/include/media/tvp5150.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | tvp5150.h - definition for tvp5150 inputs | ||
3 | |||
4 | Copyright (C) 2006 Hans Verkuil (hverkuil@xs4all.nl) | ||
5 | |||
6 | This program is free software; you can redistribute it and/or modify | ||
7 | it under the terms of the GNU General Public License as published by | ||
8 | the Free Software Foundation; either version 2 of the License, or | ||
9 | (at your option) any later version. | ||
10 | |||
11 | This program is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _TVP5150_H_ | ||
22 | #define _TVP5150_H_ | ||
23 | |||
24 | /* TVP5150 HW inputs */ | ||
25 | #define TVP5150_COMPOSITE0 0 | ||
26 | #define TVP5150_COMPOSITE1 1 | ||
27 | #define TVP5150_SVIDEO 2 | ||
28 | |||
29 | /* TVP5150 HW outputs */ | ||
30 | #define TVP5150_NORMAL 0 | ||
31 | #define TVP5150_BLACK_SCREEN 1 | ||
32 | |||
33 | #endif | ||
34 | |||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 642520acdfa7..5564db13c0d5 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -26,8 +26,14 @@ | |||
26 | #ifndef V4L2_COMMON_H_ | 26 | #ifndef V4L2_COMMON_H_ |
27 | #define V4L2_COMMON_H_ | 27 | #define V4L2_COMMON_H_ |
28 | 28 | ||
29 | #include <media/v4l2-dev.h> | ||
30 | |||
29 | /* v4l debugging and diagnostics */ | 31 | /* v4l debugging and diagnostics */ |
30 | 32 | ||
33 | /* Debug bitmask flags to be used on V4L2 */ | ||
34 | #define V4L2_DEBUG_IOCTL 0x01 | ||
35 | #define V4L2_DEBUG_IOCTL_ARG 0x02 | ||
36 | |||
31 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique | 37 | /* Common printk constucts for v4l-i2c drivers. These macros create a unique |
32 | prefix consisting of the driver name, the adapter number and the i2c | 38 | prefix consisting of the driver name, the adapter number and the i2c |
33 | address. */ | 39 | address. */ |
@@ -78,6 +84,19 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); | |||
78 | 84 | ||
79 | /* ------------------------------------------------------------------------- */ | 85 | /* ------------------------------------------------------------------------- */ |
80 | 86 | ||
87 | /* Control helper functions */ | ||
88 | |||
89 | int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, | ||
90 | const char **menu_items); | ||
91 | const char **v4l2_ctrl_get_menu(u32 id); | ||
92 | int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); | ||
93 | int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); | ||
94 | int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, | ||
95 | struct v4l2_queryctrl *qctrl, const char **menu_items); | ||
96 | u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | ||
97 | |||
98 | /* ------------------------------------------------------------------------- */ | ||
99 | |||
81 | /* Internal ioctls */ | 100 | /* Internal ioctls */ |
82 | 101 | ||
83 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ | 102 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ |
@@ -112,6 +131,8 @@ enum v4l2_chip_ident { | |||
112 | V4L2_IDENT_SAA7129 = 159, | 131 | V4L2_IDENT_SAA7129 = 159, |
113 | 132 | ||
114 | /* module cx25840: reserved range 200-249 */ | 133 | /* module cx25840: reserved range 200-249 */ |
134 | V4L2_IDENT_CX25836 = 236, | ||
135 | V4L2_IDENT_CX25837 = 237, | ||
115 | V4L2_IDENT_CX25840 = 240, | 136 | V4L2_IDENT_CX25840 = 240, |
116 | V4L2_IDENT_CX25841 = 241, | 137 | V4L2_IDENT_CX25841 = 241, |
117 | V4L2_IDENT_CX25842 = 242, | 138 | V4L2_IDENT_CX25842 = 242, |
@@ -211,4 +232,15 @@ struct v4l2_routing { | |||
211 | #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) | 232 | #define VIDIOC_INT_S_VIDEO_ROUTING _IOW ('d', 111, struct v4l2_routing) |
212 | #define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) | 233 | #define VIDIOC_INT_G_VIDEO_ROUTING _IOR ('d', 112, struct v4l2_routing) |
213 | 234 | ||
235 | struct v4l2_crystal_freq { | ||
236 | u32 freq; /* frequency in Hz of the crystal */ | ||
237 | u32 flags; /* device specific flags */ | ||
238 | }; | ||
239 | |||
240 | /* Sets the frequency of the crystal used to generate the clocks. | ||
241 | An extra flags field allows device specific configuration regarding | ||
242 | clock frequency dividers, etc. If not used, then set flags to 0. | ||
243 | If the frequency is not supported, then -EINVAL is returned. */ | ||
244 | #define VIDIOC_INT_S_CRYSTAL_FREQ _IOW ('d', 113, struct v4l2_crystal_freq) | ||
245 | |||
214 | #endif /* V4L2_COMMON_H_ */ | 246 | #endif /* V4L2_COMMON_H_ */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h new file mode 100644 index 000000000000..a1b473190e65 --- /dev/null +++ b/include/media/v4l2-dev.h | |||
@@ -0,0 +1,375 @@ | |||
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_DEV_H | ||
10 | #define _V4L2_DEV_H | ||
11 | |||
12 | #define OBSOLETE_OWNER 1 /* to be removed soon */ | ||
13 | |||
14 | #include <linux/poll.h> | ||
15 | #include <linux/fs.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/mutex.h> | ||
18 | #include <linux/compiler.h> /* need __user */ | ||
19 | #ifdef CONFIG_VIDEO_V4L1 | ||
20 | #include <linux/videodev.h> | ||
21 | #else | ||
22 | #include <linux/videodev2.h> | ||
23 | #endif | ||
24 | |||
25 | #include <linux/fs.h> | ||
26 | |||
27 | #define VIDEO_MAJOR 81 | ||
28 | /* Minor device allocation */ | ||
29 | #define MINOR_VFL_TYPE_GRABBER_MIN 0 | ||
30 | #define MINOR_VFL_TYPE_GRABBER_MAX 63 | ||
31 | #define MINOR_VFL_TYPE_RADIO_MIN 64 | ||
32 | #define MINOR_VFL_TYPE_RADIO_MAX 127 | ||
33 | #define MINOR_VFL_TYPE_VTX_MIN 192 | ||
34 | #define MINOR_VFL_TYPE_VTX_MAX 223 | ||
35 | #define MINOR_VFL_TYPE_VBI_MIN 224 | ||
36 | #define MINOR_VFL_TYPE_VBI_MAX 255 | ||
37 | |||
38 | #define VFL_TYPE_GRABBER 0 | ||
39 | #define VFL_TYPE_VBI 1 | ||
40 | #define VFL_TYPE_RADIO 2 | ||
41 | #define VFL_TYPE_VTX 3 | ||
42 | |||
43 | /* Video standard functions */ | ||
44 | extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); | ||
45 | extern int v4l2_video_std_construct(struct v4l2_standard *vs, | ||
46 | int id, char *name); | ||
47 | |||
48 | /* prority handling */ | ||
49 | struct v4l2_prio_state { | ||
50 | atomic_t prios[4]; | ||
51 | }; | ||
52 | int v4l2_prio_init(struct v4l2_prio_state *global); | ||
53 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
54 | enum v4l2_priority new); | ||
55 | int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
56 | int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
57 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
58 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
59 | |||
60 | /* names for fancy debug output */ | ||
61 | extern char *v4l2_field_names[]; | ||
62 | extern char *v4l2_type_names[]; | ||
63 | |||
64 | /* Compatibility layer interface -- v4l1-compat module */ | ||
65 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | ||
66 | unsigned int cmd, void *arg); | ||
67 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
68 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | ||
69 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | ||
70 | #else | ||
71 | #define v4l_compat_translate_ioctl(inode,file,cmd,arg,ioctl) -EINVAL | ||
72 | #endif | ||
73 | |||
74 | /* 32 Bits compatibility layer for 64 bits processors */ | ||
75 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | ||
76 | unsigned long arg); | ||
77 | |||
78 | /* | ||
79 | * Newer version of video_device, handled by videodev2.c | ||
80 | * This version moves redundant code from video device code to | ||
81 | * the common handler | ||
82 | */ | ||
83 | struct v4l2_tvnorm { | ||
84 | char *name; | ||
85 | v4l2_std_id id; | ||
86 | |||
87 | void *priv_data; | ||
88 | }; | ||
89 | |||
90 | struct video_device | ||
91 | { | ||
92 | /* device ops */ | ||
93 | const struct file_operations *fops; | ||
94 | |||
95 | /* device info */ | ||
96 | struct device *dev; | ||
97 | char name[32]; | ||
98 | int type; /* v4l1 */ | ||
99 | int type2; /* v4l2 */ | ||
100 | int hardware; | ||
101 | int minor; | ||
102 | |||
103 | int debug; /* Activates debug level*/ | ||
104 | |||
105 | /* Video standard vars */ | ||
106 | int tvnormsize; /* Size of tvnorm array */ | ||
107 | v4l2_std_id current_norm; /* Current tvnorm */ | ||
108 | struct v4l2_tvnorm *tvnorms; | ||
109 | |||
110 | /* callbacks */ | ||
111 | void (*release)(struct video_device *vfd); | ||
112 | |||
113 | /* ioctl callbacks */ | ||
114 | |||
115 | /* VIDIOC_QUERYCAP handler */ | ||
116 | int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_capability *cap); | ||
117 | |||
118 | /* Priority handling */ | ||
119 | int (*vidioc_g_priority) (struct file *file, void *fh, | ||
120 | enum v4l2_priority *p); | ||
121 | int (*vidioc_s_priority) (struct file *file, void *fh, | ||
122 | enum v4l2_priority p); | ||
123 | |||
124 | /* VIDIOC_ENUM_FMT handlers */ | ||
125 | int (*vidioc_enum_fmt_cap) (struct file *file, void *fh, | ||
126 | struct v4l2_fmtdesc *f); | ||
127 | int (*vidioc_enum_fmt_overlay) (struct file *file, void *fh, | ||
128 | struct v4l2_fmtdesc *f); | ||
129 | int (*vidioc_enum_fmt_vbi) (struct file *file, void *fh, | ||
130 | struct v4l2_fmtdesc *f); | ||
131 | int (*vidioc_enum_fmt_vbi_capture) (struct file *file, void *fh, | ||
132 | struct v4l2_fmtdesc *f); | ||
133 | int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh, | ||
134 | struct v4l2_fmtdesc *f); | ||
135 | int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh, | ||
136 | struct v4l2_fmtdesc *f); | ||
137 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | ||
138 | struct v4l2_fmtdesc *f); | ||
139 | |||
140 | /* VIDIOC_G_FMT handlers */ | ||
141 | int (*vidioc_g_fmt_cap) (struct file *file, void *fh, | ||
142 | struct v4l2_format *f); | ||
143 | int (*vidioc_g_fmt_overlay) (struct file *file, void *fh, | ||
144 | struct v4l2_format *f); | ||
145 | int (*vidioc_g_fmt_vbi) (struct file *file, void *fh, | ||
146 | struct v4l2_format *f); | ||
147 | int (*vidioc_g_fmt_vbi_output) (struct file *file, void *fh, | ||
148 | struct v4l2_format *f); | ||
149 | int (*vidioc_g_fmt_vbi_capture)(struct file *file, void *fh, | ||
150 | struct v4l2_format *f); | ||
151 | int (*vidioc_g_fmt_video_output)(struct file *file, void *fh, | ||
152 | struct v4l2_format *f); | ||
153 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | ||
154 | struct v4l2_format *f); | ||
155 | |||
156 | /* VIDIOC_S_FMT handlers */ | ||
157 | int (*vidioc_s_fmt_cap) (struct file *file, void *fh, | ||
158 | struct v4l2_format *f); | ||
159 | |||
160 | int (*vidioc_s_fmt_overlay) (struct file *file, void *fh, | ||
161 | struct v4l2_format *f); | ||
162 | int (*vidioc_s_fmt_vbi) (struct file *file, void *fh, | ||
163 | struct v4l2_format *f); | ||
164 | int (*vidioc_s_fmt_vbi_output) (struct file *file, void *fh, | ||
165 | struct v4l2_format *f); | ||
166 | int (*vidioc_s_fmt_vbi_capture)(struct file *file, void *fh, | ||
167 | struct v4l2_format *f); | ||
168 | int (*vidioc_s_fmt_video_output)(struct file *file, void *fh, | ||
169 | struct v4l2_format *f); | ||
170 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | ||
171 | struct v4l2_format *f); | ||
172 | |||
173 | /* VIDIOC_TRY_FMT handlers */ | ||
174 | int (*vidioc_try_fmt_cap) (struct file *file, void *fh, | ||
175 | struct v4l2_format *f); | ||
176 | int (*vidioc_try_fmt_overlay) (struct file *file, void *fh, | ||
177 | struct v4l2_format *f); | ||
178 | int (*vidioc_try_fmt_vbi) (struct file *file, void *fh, | ||
179 | struct v4l2_format *f); | ||
180 | int (*vidioc_try_fmt_vbi_output) (struct file *file, void *fh, | ||
181 | struct v4l2_format *f); | ||
182 | int (*vidioc_try_fmt_vbi_capture)(struct file *file, void *fh, | ||
183 | struct v4l2_format *f); | ||
184 | int (*vidioc_try_fmt_video_output)(struct file *file, void *fh, | ||
185 | struct v4l2_format *f); | ||
186 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | ||
187 | struct v4l2_format *f); | ||
188 | |||
189 | /* Buffer handlers */ | ||
190 | int (*vidioc_reqbufs) (struct file *file, void *fh, struct v4l2_requestbuffers *b); | ||
191 | int (*vidioc_querybuf)(struct file *file, void *fh, struct v4l2_buffer *b); | ||
192 | int (*vidioc_qbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
193 | int (*vidioc_dqbuf) (struct file *file, void *fh, struct v4l2_buffer *b); | ||
194 | |||
195 | |||
196 | int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); | ||
197 | #ifdef HAVE_V4L1 | ||
198 | /* buffer type is struct vidio_mbuf * */ | ||
199 | int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); | ||
200 | #endif | ||
201 | int (*vidioc_g_fbuf) (struct file *file, void *fh, | ||
202 | struct v4l2_framebuffer *a); | ||
203 | int (*vidioc_s_fbuf) (struct file *file, void *fh, | ||
204 | struct v4l2_framebuffer *a); | ||
205 | |||
206 | /* Stream on/off */ | ||
207 | int (*vidioc_streamon) (struct file *file, void *fh, enum v4l2_buf_type i); | ||
208 | int (*vidioc_streamoff)(struct file *file, void *fh, enum v4l2_buf_type i); | ||
209 | |||
210 | /* Standard handling | ||
211 | G_STD and ENUMSTD are handled by videodev.c | ||
212 | */ | ||
213 | int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); | ||
214 | int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); | ||
215 | |||
216 | /* Input handling */ | ||
217 | int (*vidioc_enum_input)(struct file *file, void *fh, | ||
218 | struct v4l2_input *inp); | ||
219 | int (*vidioc_g_input) (struct file *file, void *fh, unsigned int *i); | ||
220 | int (*vidioc_s_input) (struct file *file, void *fh, unsigned int i); | ||
221 | |||
222 | /* Output handling */ | ||
223 | int (*vidioc_enumoutput) (struct file *file, void *fh, | ||
224 | struct v4l2_output *a); | ||
225 | int (*vidioc_g_output) (struct file *file, void *fh, unsigned int *i); | ||
226 | int (*vidioc_s_output) (struct file *file, void *fh, unsigned int i); | ||
227 | |||
228 | /* Control handling */ | ||
229 | int (*vidioc_queryctrl) (struct file *file, void *fh, | ||
230 | struct v4l2_queryctrl *a); | ||
231 | int (*vidioc_g_ctrl) (struct file *file, void *fh, | ||
232 | struct v4l2_control *a); | ||
233 | int (*vidioc_s_ctrl) (struct file *file, void *fh, | ||
234 | struct v4l2_control *a); | ||
235 | int (*vidioc_g_ext_ctrls) (struct file *file, void *fh, | ||
236 | struct v4l2_ext_controls *a); | ||
237 | int (*vidioc_s_ext_ctrls) (struct file *file, void *fh, | ||
238 | struct v4l2_ext_controls *a); | ||
239 | int (*vidioc_try_ext_ctrls) (struct file *file, void *fh, | ||
240 | struct v4l2_ext_controls *a); | ||
241 | int (*vidioc_querymenu) (struct file *file, void *fh, | ||
242 | struct v4l2_querymenu *a); | ||
243 | |||
244 | /* Audio ioctls */ | ||
245 | int (*vidioc_enumaudio) (struct file *file, void *fh, | ||
246 | struct v4l2_audio *a); | ||
247 | int (*vidioc_g_audio) (struct file *file, void *fh, | ||
248 | struct v4l2_audio *a); | ||
249 | int (*vidioc_s_audio) (struct file *file, void *fh, | ||
250 | struct v4l2_audio *a); | ||
251 | |||
252 | /* Audio out ioctls */ | ||
253 | int (*vidioc_enumaudout) (struct file *file, void *fh, | ||
254 | struct v4l2_audioout *a); | ||
255 | int (*vidioc_g_audout) (struct file *file, void *fh, | ||
256 | struct v4l2_audioout *a); | ||
257 | int (*vidioc_s_audout) (struct file *file, void *fh, | ||
258 | struct v4l2_audioout *a); | ||
259 | int (*vidioc_g_modulator) (struct file *file, void *fh, | ||
260 | struct v4l2_modulator *a); | ||
261 | int (*vidioc_s_modulator) (struct file *file, void *fh, | ||
262 | struct v4l2_modulator *a); | ||
263 | /* Crop ioctls */ | ||
264 | int (*vidioc_cropcap) (struct file *file, void *fh, | ||
265 | struct v4l2_cropcap *a); | ||
266 | int (*vidioc_g_crop) (struct file *file, void *fh, | ||
267 | struct v4l2_crop *a); | ||
268 | int (*vidioc_s_crop) (struct file *file, void *fh, | ||
269 | struct v4l2_crop *a); | ||
270 | /* Compression ioctls */ | ||
271 | int (*vidioc_g_mpegcomp) (struct file *file, void *fh, | ||
272 | struct v4l2_mpeg_compression *a); | ||
273 | int (*vidioc_s_mpegcomp) (struct file *file, void *fh, | ||
274 | struct v4l2_mpeg_compression *a); | ||
275 | int (*vidioc_g_jpegcomp) (struct file *file, void *fh, | ||
276 | struct v4l2_jpegcompression *a); | ||
277 | int (*vidioc_s_jpegcomp) (struct file *file, void *fh, | ||
278 | struct v4l2_jpegcompression *a); | ||
279 | |||
280 | /* Stream type-dependent parameter ioctls */ | ||
281 | int (*vidioc_g_parm) (struct file *file, void *fh, | ||
282 | struct v4l2_streamparm *a); | ||
283 | int (*vidioc_s_parm) (struct file *file, void *fh, | ||
284 | struct v4l2_streamparm *a); | ||
285 | |||
286 | /* Tuner ioctls */ | ||
287 | int (*vidioc_g_tuner) (struct file *file, void *fh, | ||
288 | struct v4l2_tuner *a); | ||
289 | int (*vidioc_s_tuner) (struct file *file, void *fh, | ||
290 | struct v4l2_tuner *a); | ||
291 | int (*vidioc_g_frequency) (struct file *file, void *fh, | ||
292 | struct v4l2_frequency *a); | ||
293 | int (*vidioc_s_frequency) (struct file *file, void *fh, | ||
294 | struct v4l2_frequency *a); | ||
295 | |||
296 | /* Sliced VBI cap */ | ||
297 | int (*vidioc_g_sliced_vbi_cap) (struct file *file, void *fh, | ||
298 | struct v4l2_sliced_vbi_cap *a); | ||
299 | |||
300 | /* Log status ioctl */ | ||
301 | int (*vidioc_log_status) (struct file *file, void *fh); | ||
302 | |||
303 | |||
304 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
305 | /* obsolete -- fops->owner is used instead */ | ||
306 | struct module *owner; | ||
307 | /* dev->driver_data will be used instead some day. | ||
308 | * Use the video_{get|set}_drvdata() helper functions, | ||
309 | * so the switch over will be transparent for you. | ||
310 | * Or use {pci|usb}_{get|set}_drvdata() directly. */ | ||
311 | void *priv; | ||
312 | #endif | ||
313 | |||
314 | /* for videodev.c intenal usage -- please don't touch */ | ||
315 | int users; /* video_exclusive_{open|close} ... */ | ||
316 | struct mutex lock; /* ... helper function uses these */ | ||
317 | char devfs_name[64]; /* devfs */ | ||
318 | struct class_device class_dev; /* sysfs */ | ||
319 | }; | ||
320 | |||
321 | /* Version 2 functions */ | ||
322 | extern int video_register_device(struct video_device *vfd, int type, int nr); | ||
323 | void video_unregister_device(struct video_device *); | ||
324 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
325 | unsigned int cmd, unsigned long arg); | ||
326 | |||
327 | /* helper functions to alloc / release struct video_device, the | ||
328 | later can be used for video_device->release() */ | ||
329 | struct video_device *video_device_alloc(void); | ||
330 | void video_device_release(struct video_device *vfd); | ||
331 | |||
332 | /* Include support for obsoleted stuff */ | ||
333 | extern int video_usercopy(struct inode *inode, struct file *file, | ||
334 | unsigned int cmd, unsigned long arg, | ||
335 | int (*func)(struct inode *inode, struct file *file, | ||
336 | unsigned int cmd, void *arg)); | ||
337 | |||
338 | |||
339 | #ifdef HAVE_V4L1 | ||
340 | #include <linux/mm.h> | ||
341 | |||
342 | extern struct video_device* video_devdata(struct file*); | ||
343 | |||
344 | #define to_video_device(cd) container_of(cd, struct video_device, class_dev) | ||
345 | static inline void | ||
346 | video_device_create_file(struct video_device *vfd, | ||
347 | struct class_device_attribute *attr) | ||
348 | { | ||
349 | class_device_create_file(&vfd->class_dev, attr); | ||
350 | } | ||
351 | static inline void | ||
352 | video_device_remove_file(struct video_device *vfd, | ||
353 | struct class_device_attribute *attr) | ||
354 | { | ||
355 | class_device_remove_file(&vfd->class_dev, attr); | ||
356 | } | ||
357 | |||
358 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | ||
359 | /* helper functions to access driver private data. */ | ||
360 | static inline void *video_get_drvdata(struct video_device *dev) | ||
361 | { | ||
362 | return dev->priv; | ||
363 | } | ||
364 | |||
365 | static inline void video_set_drvdata(struct video_device *dev, void *data) | ||
366 | { | ||
367 | dev->priv = data; | ||
368 | } | ||
369 | #endif | ||
370 | |||
371 | extern int video_exclusive_open(struct inode *inode, struct file *file); | ||
372 | extern int video_exclusive_release(struct inode *inode, struct file *file); | ||
373 | #endif /* HAVE_V4L1 */ | ||
374 | |||
375 | #endif /* _V4L2_DEV_H */ | ||
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index b78d90fe629f..8233cafdeef6 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h | |||
@@ -26,7 +26,8 @@ struct videobuf_dvb { | |||
26 | 26 | ||
27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, | 27 | int videobuf_dvb_register(struct videobuf_dvb *dvb, |
28 | struct module *module, | 28 | struct module *module, |
29 | void *adapter_priv); | 29 | void *adapter_priv, |
30 | struct device *device); | ||
30 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); | 31 | void videobuf_dvb_unregister(struct videobuf_dvb *dvb); |
31 | 32 | ||
32 | /* | 33 | /* |
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index fff3fd0fbf94..1115a256969f 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/videodev2.h> | 25 | #include <linux/videodev2.h> |
26 | #include <linux/poll.h> | ||
26 | 27 | ||
27 | #define UNSET (-1U) | 28 | #define UNSET (-1U) |
28 | 29 | ||
diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index a4f554520197..b5067d3c2387 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h | |||
@@ -20,9 +20,10 @@ | |||
20 | * along with this program; if not, write to the Free Software | 20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/videodev.h> | 25 | #include <linux/videodev.h> |
26 | #include <media/v4l2-dev.h> | ||
26 | 27 | ||
27 | struct snd_tea575x; | 28 | struct snd_tea575x; |
28 | 29 | ||