diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 12:59:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 12:59:29 -0400 |
commit | 296e1ce0dc36bb106c139e25482d02da43c70e71 (patch) | |
tree | b473ef8735dbdf437ae8caf1bb0e742e9fda342a /include/media | |
parent | b14ea38e13686799b9d2545d467a0ec84732981c (diff) | |
parent | becd43056c8f65e3b8510b1a8a0940683ee185a2 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (36 commits)
V4L/DVB (9336): cx88: always de-alloc frontends on fault condition
V4L/DVB (9335): videobuf: split unregister bus creating self-contained frontend de-allocator
V4L/DVB (9334): cx88: dvb_remove debug output
V4L/DVB (9333): cx88: Not all boards that requires cx88-mpeg has frontends
V4L/DVB (9332): cx88: initial fix for analogue only compilation
V4L/DVB (9331): Remove unused inode parameter from video_ioctl2
V4L/DVB (9330): Get rid of inode parameter at v4l_compat_translate_ioctl()
V4L/DVB (9328): ivtvfb: FB_BLANK_POWERDOWN turns off video output
V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
V4L/DVB (9326): ivtv: avoid green flashing when loading ivtv
V4L/DVB (9325): ivtv: switch to unlocked_ioctl.
V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
V4L/DVB (9323): v4l2-int-if: Add enum_framesizes and enum_frameintervals ioctls.
V4L/DVB (9322): v4l2-int-if: Export more interfaces to modules
V4L/DVB (9321): v4l2-int-if: Define new power state changes
V4L/DVB (9320): v4l2: Add 10-bit RAW Bayer formats
V4L/DVB (9319): v4l2-int-if: Add cropcap, g_crop and s_crop commands.
V4L/DVB (9318): v4l2-int-if: Add command to get slave private data.
V4L/DVB (9316): s5h1411: Power down s5h1411 when not in use
V4L/DVB (9315): s5h1411: Skip reconfiguring demod modulation if already at the desired modulation
...
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-int-device.h | 28 | ||||
-rw-r--r-- | include/media/v4l2-ioctl.h | 24 | ||||
-rw-r--r-- | include/media/videobuf-dvb.h | 1 |
3 files changed, 45 insertions, 8 deletions
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h index c8b80e0f0651..9c2df41dbf92 100644 --- a/include/media/v4l2-int-device.h +++ b/include/media/v4l2-int-device.h | |||
@@ -84,6 +84,8 @@ struct v4l2_int_device { | |||
84 | void *priv; | 84 | void *priv; |
85 | }; | 85 | }; |
86 | 86 | ||
87 | void v4l2_int_device_try_attach_all(void); | ||
88 | |||
87 | int v4l2_int_device_register(struct v4l2_int_device *d); | 89 | int v4l2_int_device_register(struct v4l2_int_device *d); |
88 | void v4l2_int_device_unregister(struct v4l2_int_device *d); | 90 | void v4l2_int_device_unregister(struct v4l2_int_device *d); |
89 | 91 | ||
@@ -96,6 +98,12 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg); | |||
96 | * | 98 | * |
97 | */ | 99 | */ |
98 | 100 | ||
101 | enum v4l2_power { | ||
102 | V4L2_POWER_OFF = 0, | ||
103 | V4L2_POWER_ON, | ||
104 | V4L2_POWER_STANDBY, | ||
105 | }; | ||
106 | |||
99 | /* Slave interface type. */ | 107 | /* Slave interface type. */ |
100 | enum v4l2_if_type { | 108 | enum v4l2_if_type { |
101 | /* | 109 | /* |
@@ -170,6 +178,9 @@ enum v4l2_int_ioctl_num { | |||
170 | vidioc_int_queryctrl_num, | 178 | vidioc_int_queryctrl_num, |
171 | vidioc_int_g_ctrl_num, | 179 | vidioc_int_g_ctrl_num, |
172 | vidioc_int_s_ctrl_num, | 180 | vidioc_int_s_ctrl_num, |
181 | vidioc_int_cropcap_num, | ||
182 | vidioc_int_g_crop_num, | ||
183 | vidioc_int_s_crop_num, | ||
173 | vidioc_int_g_parm_num, | 184 | vidioc_int_g_parm_num, |
174 | vidioc_int_s_parm_num, | 185 | vidioc_int_s_parm_num, |
175 | 186 | ||
@@ -182,12 +193,19 @@ enum v4l2_int_ioctl_num { | |||
182 | vidioc_int_dev_init_num = 1000, | 193 | vidioc_int_dev_init_num = 1000, |
183 | /* Delinitialise the device at slave detach. */ | 194 | /* Delinitialise the device at slave detach. */ |
184 | vidioc_int_dev_exit_num, | 195 | vidioc_int_dev_exit_num, |
185 | /* Set device power state: 0 is off, non-zero is on. */ | 196 | /* Set device power state. */ |
186 | vidioc_int_s_power_num, | 197 | vidioc_int_s_power_num, |
198 | /* | ||
199 | * Get slave private data, e.g. platform-specific slave | ||
200 | * configuration used by the master. | ||
201 | */ | ||
202 | vidioc_int_g_priv_num, | ||
187 | /* Get slave interface parameters. */ | 203 | /* Get slave interface parameters. */ |
188 | vidioc_int_g_ifparm_num, | 204 | vidioc_int_g_ifparm_num, |
189 | /* Does the slave need to be reset after VIDIOC_DQBUF? */ | 205 | /* Does the slave need to be reset after VIDIOC_DQBUF? */ |
190 | vidioc_int_g_needs_reset_num, | 206 | vidioc_int_g_needs_reset_num, |
207 | vidioc_int_enum_framesizes_num, | ||
208 | vidioc_int_enum_frameintervals_num, | ||
191 | 209 | ||
192 | /* | 210 | /* |
193 | * | 211 | * |
@@ -261,14 +279,20 @@ V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *); | |||
261 | V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); | 279 | V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); |
262 | V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); | 280 | V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); |
263 | V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); | 281 | V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); |
282 | V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *); | ||
283 | V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *); | ||
284 | V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *); | ||
264 | V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); | 285 | V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); |
265 | V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); | 286 | V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); |
266 | 287 | ||
267 | V4L2_INT_WRAPPER_0(dev_init); | 288 | V4L2_INT_WRAPPER_0(dev_init); |
268 | V4L2_INT_WRAPPER_0(dev_exit); | 289 | V4L2_INT_WRAPPER_0(dev_exit); |
269 | V4L2_INT_WRAPPER_1(s_power, int, ); | 290 | V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, ); |
291 | V4L2_INT_WRAPPER_1(g_priv, void, *); | ||
270 | V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); | 292 | V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); |
271 | V4L2_INT_WRAPPER_1(g_needs_reset, void, *); | 293 | V4L2_INT_WRAPPER_1(g_needs_reset, void, *); |
294 | V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *); | ||
295 | V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *); | ||
272 | 296 | ||
273 | V4L2_INT_WRAPPER_0(reset); | 297 | V4L2_INT_WRAPPER_0(reset); |
274 | V4L2_INT_WRAPPER_0(init); | 298 | V4L2_INT_WRAPPER_0(init); |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 0bef03add796..e6ba25b3d7c8 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -271,26 +271,38 @@ extern const char *v4l2_field_names[]; | |||
271 | extern const char *v4l2_type_names[]; | 271 | extern const char *v4l2_type_names[]; |
272 | 272 | ||
273 | /* Compatibility layer interface -- v4l1-compat module */ | 273 | /* Compatibility layer interface -- v4l1-compat module */ |
274 | typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, | 274 | typedef int (*v4l2_kioctl)(struct file *file, |
275 | unsigned int cmd, void *arg); | 275 | unsigned int cmd, void *arg); |
276 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 276 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
277 | int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, | 277 | int v4l_compat_translate_ioctl(struct file *file, |
278 | int cmd, void *arg, v4l2_kioctl driver_ioctl); | 278 | int cmd, void *arg, v4l2_kioctl driver_ioctl); |
279 | #else | 279 | #else |
280 | #define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) | 280 | #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | /* 32 Bits compatibility layer for 64 bits processors */ | 283 | /* 32 Bits compatibility layer for 64 bits processors */ |
284 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, | 284 | extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, |
285 | unsigned long arg); | 285 | unsigned long arg); |
286 | 286 | ||
287 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
288 | unsigned int cmd, unsigned long arg); | ||
289 | |||
290 | /* Include support for obsoleted stuff */ | 287 | /* Include support for obsoleted stuff */ |
291 | extern int video_usercopy(struct inode *inode, struct file *file, | 288 | extern int video_usercopy(struct inode *inode, struct file *file, |
292 | unsigned int cmd, unsigned long arg, | 289 | unsigned int cmd, unsigned long arg, |
293 | int (*func)(struct inode *inode, struct file *file, | 290 | int (*func)(struct inode *inode, struct file *file, |
294 | unsigned int cmd, void *arg)); | 291 | unsigned int cmd, void *arg)); |
295 | 292 | ||
293 | /* Standard handlers for V4L ioctl's */ | ||
294 | |||
295 | /* This prototype is used on fops.unlocked_ioctl */ | ||
296 | extern int __video_ioctl2(struct file *file, | ||
297 | unsigned int cmd, unsigned long arg); | ||
298 | |||
299 | /* This prototype is used on fops.ioctl | ||
300 | * Since fops.ioctl enables Kernel Big Lock, it is preferred | ||
301 | * to use __video_ioctl2 instead. | ||
302 | * It should be noticed that there's no lock code inside | ||
303 | * video_ioctl2(). | ||
304 | */ | ||
305 | extern int video_ioctl2(struct inode *inode, struct file *file, | ||
306 | unsigned int cmd, unsigned long arg); | ||
307 | |||
296 | #endif /* _V4L2_IOCTL_H */ | 308 | #endif /* _V4L2_IOCTL_H */ |
diff --git a/include/media/videobuf-dvb.h b/include/media/videobuf-dvb.h index 80471c2b6343..6ba4f1271d23 100644 --- a/include/media/videobuf-dvb.h +++ b/include/media/videobuf-dvb.h | |||
@@ -47,6 +47,7 @@ int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f, | |||
47 | void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f); | 47 | void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f); |
48 | 48 | ||
49 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); | 49 | struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); |
50 | void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f); | ||
50 | 51 | ||
51 | struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); | 52 | struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); |
52 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); | 53 | int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); |