aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-ioctl.h
diff options
context:
space:
mode:
authorLuc Saillard <luc@saillard.org>2007-04-22 22:54:36 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:45:50 -0400
commit9ee6d78cd4112c0f5a257a01383c64dadbf66da9 (patch)
tree6a240c9938d7970c5d13c40dcc21b20fb3c3369e /drivers/media/video/pwc/pwc-ioctl.h
parent1de69238111a65283a4548d8fd4727397873a02f (diff)
V4L/DVB (5547): Add ENUM_FRAMESIZES and ENUM_FRAMEINTERVALS ioctls
This patch add support for the VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctl. * check if the maximum native framesize for raw mode is correct * raw mode framerates for all three chipset types Signed-off-by: Gregor Jasny <gjasny@web.de> Signed-off-by: Luc Saillard <luc@saillard.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pwc/pwc-ioctl.h')
-rw-r--r--drivers/media/video/pwc/pwc-ioctl.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/media/video/pwc/pwc-ioctl.h b/drivers/media/video/pwc/pwc-ioctl.h
index 784bc72521fa..cec660299768 100644
--- a/drivers/media/video/pwc/pwc-ioctl.h
+++ b/drivers/media/video/pwc/pwc-ioctl.h
@@ -2,7 +2,7 @@
2#define PWC_IOCTL_H 2#define PWC_IOCTL_H
3 3
4/* (C) 2001-2004 Nemosoft Unv. 4/* (C) 2001-2004 Nemosoft Unv.
5 (C) 2004 Luc Saillard (luc@saillard.org) 5 (C) 2004-2006 Luc Saillard (luc@saillard.org)
6 6
7 NOTE: this version of pwc is an unofficial (modified) release of pwc & pcwx 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. 8 driver and thus may have bugs that are not present in the original version.
@@ -25,7 +25,7 @@
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26*/ 26*/
27 27
28/* This is pwc-ioctl.h belonging to PWC 8.12.1 28/* This is pwc-ioctl.h belonging to PWC 10.0.10
29 It contains structures and defines to communicate from user space 29 It contains structures and defines to communicate from user space
30 directly to the driver. 30 directly to the driver.
31 */ 31 */
@@ -51,6 +51,9 @@
51 ... the function 51 ... the function
52 */ 52 */
53 53
54#include <linux/types.h>
55#include <linux/version.h>
56
54 57
55 /* Enumeration of image sizes */ 58 /* Enumeration of image sizes */
56#define PSZ_SQCIF 0x00 59#define PSZ_SQCIF 0x00
@@ -65,6 +68,8 @@
65/* The frame rate is encoded in the video_window.flags parameter using 68/* The frame rate is encoded in the video_window.flags parameter using
66 the upper 16 bits, since some flags are defined nowadays. The following 69 the upper 16 bits, since some flags are defined nowadays. The following
67 defines provide a mask and shift to filter out this value. 70 defines provide a mask and shift to filter out this value.
71 This value can also be passing using the private flag when using v4l2 and
72 VIDIOC_S_FMT ioctl.
68 73
69 In 'Snapshot' mode the camera freezes its automatic exposure and colour 74 In 'Snapshot' mode the camera freezes its automatic exposure and colour
70 balance controls. 75 balance controls.
@@ -73,6 +78,8 @@
73#define PWC_FPS_MASK 0x00FF0000 78#define PWC_FPS_MASK 0x00FF0000
74#define PWC_FPS_FRMASK 0x003F0000 79#define PWC_FPS_FRMASK 0x003F0000
75#define PWC_FPS_SNAPSHOT 0x00400000 80#define PWC_FPS_SNAPSHOT 0x00400000
81#define PWC_QLT_MASK 0x03000000
82#define PWC_QLT_SHIFT 24
76 83
77 84
78/* structure for transferring x & y coordinates */ 85/* structure for transferring x & y coordinates */
@@ -289,4 +296,29 @@ struct pwc_table_init_buffer {
289}; 296};
290#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer) 297#define VIDIOCPWCGVIDTABLE _IOR('v', 216, struct pwc_table_init_buffer)
291 298
299/*
300 * This is private command used when communicating with v4l2.
301 * In the future all private ioctl will be remove/replace to
302 * use interface offer by v4l2.
303 */
304
305#define V4L2_CID_PRIVATE_SAVE_USER (V4L2_CID_PRIVATE_BASE + 0)
306#define V4L2_CID_PRIVATE_RESTORE_USER (V4L2_CID_PRIVATE_BASE + 1)
307#define V4L2_CID_PRIVATE_RESTORE_FACTORY (V4L2_CID_PRIVATE_BASE + 2)
308#define V4L2_CID_PRIVATE_COLOUR_MODE (V4L2_CID_PRIVATE_BASE + 3)
309#define V4L2_CID_PRIVATE_AUTOCONTOUR (V4L2_CID_PRIVATE_BASE + 4)
310#define V4L2_CID_PRIVATE_CONTOUR (V4L2_CID_PRIVATE_BASE + 5)
311#define V4L2_CID_PRIVATE_BACKLIGHT (V4L2_CID_PRIVATE_BASE + 6)
312#define V4L2_CID_PRIVATE_FLICKERLESS (V4L2_CID_PRIVATE_BASE + 7)
313#define V4L2_CID_PRIVATE_NOISE_REDUCTION (V4L2_CID_PRIVATE_BASE + 8)
314
315struct pwc_raw_frame {
316 __le16 type; /* type of the webcam */
317 __le16 vbandlength; /* Size of 4lines compressed (used by the decompressor) */
318 __u8 cmd[4]; /* the four byte of the command (in case of nala,
319 only the first 3 bytes is filled) */
320 __u8 rawframe[0]; /* frame_size = H/4*vbandlength */
321} __attribute__ ((packed));
322
323
292#endif 324#endif