aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 12:59:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 12:59:29 -0400
commit296e1ce0dc36bb106c139e25482d02da43c70e71 (patch)
treeb473ef8735dbdf437ae8caf1bb0e742e9fda342a /include
parentb14ea38e13686799b9d2545d467a0ec84732981c (diff)
parentbecd43056c8f65e3b8510b1a8a0940683ee185a2 (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')
-rw-r--r--include/linux/videodev2.h7
-rw-r--r--include/media/v4l2-int-device.h28
-rw-r--r--include/media/v4l2-ioctl.h24
-rw-r--r--include/media/videobuf-dvb.h1
4 files changed, 52 insertions, 8 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index d4b03034ee73..4669d7e72e75 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -315,6 +315,13 @@ struct v4l2_pix_format {
315/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ 315/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
316#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ 316#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
317#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ 317#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
318/*
319 * 10bit raw bayer, expanded to 16 bits
320 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
321 */
322#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
323/* 10bit raw bayer DPCM compressed to 8 bits */
324#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
318#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ 325#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */
319 326
320/* compressed formats */ 327/* compressed formats */
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
87void v4l2_int_device_try_attach_all(void);
88
87int v4l2_int_device_register(struct v4l2_int_device *d); 89int v4l2_int_device_register(struct v4l2_int_device *d);
88void v4l2_int_device_unregister(struct v4l2_int_device *d); 90void 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
101enum 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. */
100enum v4l2_if_type { 108enum 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, *);
261V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *); 279V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *);
262V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *); 280V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *);
263V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *); 281V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *);
282V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *);
283V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *);
284V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *);
264V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *); 285V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *);
265V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *); 286V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
266 287
267V4L2_INT_WRAPPER_0(dev_init); 288V4L2_INT_WRAPPER_0(dev_init);
268V4L2_INT_WRAPPER_0(dev_exit); 289V4L2_INT_WRAPPER_0(dev_exit);
269V4L2_INT_WRAPPER_1(s_power, int, ); 290V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
291V4L2_INT_WRAPPER_1(g_priv, void, *);
270V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *); 292V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
271V4L2_INT_WRAPPER_1(g_needs_reset, void, *); 293V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
294V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *);
295V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *);
272 296
273V4L2_INT_WRAPPER_0(reset); 297V4L2_INT_WRAPPER_0(reset);
274V4L2_INT_WRAPPER_0(init); 298V4L2_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[];
271extern const char *v4l2_type_names[]; 271extern const char *v4l2_type_names[];
272 272
273/* Compatibility layer interface -- v4l1-compat module */ 273/* Compatibility layer interface -- v4l1-compat module */
274typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, 274typedef 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
277int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, 277int 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 */
284extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, 284extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
285 unsigned long arg); 285 unsigned long arg);
286 286
287extern 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 */
291extern int video_usercopy(struct inode *inode, struct file *file, 288extern 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 */
296extern 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 */
305extern 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,
47void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f); 47void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
48 48
49struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id); 49struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id);
50void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f);
50 51
51struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id); 52struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
52int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p); 53int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);