summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-06-12 10:58:58 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 07:14:45 -0300
commitd43fa32fec442571f10f5d0c3b553413288728de (patch)
tree6bbf2a57d5b9a94bca4246518094f32758eecb1e /drivers/media/video/gspca/gspca.h
parent4aa0d037a6c8e6b37ecfd986a444f83190c32a21 (diff)
V4L/DVB (8156): Many bug fixes, zc3xx added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r--drivers/media/video/gspca/gspca.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index c2618c0e661..e69d8472a28 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -25,6 +25,7 @@ extern int gspca_debug;
#define D_PACK 0x20
#define D_USBI 0x40
#define D_USBO 0x80
+#define D_V4L2 0x0100
#else
#define PDEBUG(level, fmt, args...)
#endif
@@ -46,9 +47,9 @@ extern int gspca_debug;
#define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */
/* ISOC transfers */
-#define NURBS 4 /* number of URBs */
+#define MAX_NURBS 32 /* max number of URBs (read & userptr) */
#define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */
-#define ISO_MAX_SIZE 0x10000 /* max size of one URB buffer (64 Kb) */
+#define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */
/* device information - set at probe time */
struct cam_mode {
@@ -123,13 +124,14 @@ struct gspca_frame {
struct gspca_dev {
struct video_device vdev; /* !! must be the first item */
+ struct file_operations fops;
struct usb_device *dev;
struct file *capt_file; /* file doing video capture */
struct cam cam; /* device information */
const struct sd_desc *sd_desc; /* subdriver description */
- struct urb *urb[NURBS];
+ struct urb *urb[MAX_NURBS];
__u8 *frbuf; /* buffer for nframes */
struct gspca_frame frame[GSPCA_MAX_FRAMES];
@@ -155,15 +157,21 @@ struct gspca_dev {
struct mutex queue_lock; /* ISOC queue protection */
__u32 sequence; /* frame sequence number */
char streaming;
- char users; /* # open */
+ char users; /* number of opens */
char present; /* device connected */
char nbufread; /* number of buffers for read() */
+ char nurbs; /* number of allocated URBs */
+ char memory; /* memory type (V4L2_MEMORY_xxx) */
+ __u8 urb_in; /* URB pointers - used when !mmap */
+ __u8 urb_out;
+ __u8 nbalt; /* number of USB alternate settings */
};
int gspca_dev_probe(struct usb_interface *intf,
const struct usb_device_id *id,
const struct sd_desc *sd_desc,
- int dev_size);
+ int dev_size,
+ struct module *module);
void gspca_disconnect(struct usb_interface *intf);
struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
int packet_type,