diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-06-12 09:58:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:14:45 -0400 |
commit | d43fa32fec442571f10f5d0c3b553413288728de (patch) | |
tree | 6bbf2a57d5b9a94bca4246518094f32758eecb1e /drivers/media/video/gspca/gspca.h | |
parent | 4aa0d037a6c8e6b37ecfd986a444f83190c32a21 (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.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index c2618c0e6615..e69d8472a284 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h | |||
@@ -25,6 +25,7 @@ extern int gspca_debug; | |||
25 | #define D_PACK 0x20 | 25 | #define D_PACK 0x20 |
26 | #define D_USBI 0x40 | 26 | #define D_USBI 0x40 |
27 | #define D_USBO 0x80 | 27 | #define D_USBO 0x80 |
28 | #define D_V4L2 0x0100 | ||
28 | #else | 29 | #else |
29 | #define PDEBUG(level, fmt, args...) | 30 | #define PDEBUG(level, fmt, args...) |
30 | #endif | 31 | #endif |
@@ -46,9 +47,9 @@ extern int gspca_debug; | |||
46 | 47 | ||
47 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ | 48 | #define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ |
48 | /* ISOC transfers */ | 49 | /* ISOC transfers */ |
49 | #define NURBS 4 /* number of URBs */ | 50 | #define MAX_NURBS 32 /* max number of URBs (read & userptr) */ |
50 | #define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ | 51 | #define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ |
51 | #define ISO_MAX_SIZE 0x10000 /* max size of one URB buffer (64 Kb) */ | 52 | #define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */ |
52 | 53 | ||
53 | /* device information - set at probe time */ | 54 | /* device information - set at probe time */ |
54 | struct cam_mode { | 55 | struct cam_mode { |
@@ -123,13 +124,14 @@ struct gspca_frame { | |||
123 | 124 | ||
124 | struct gspca_dev { | 125 | struct gspca_dev { |
125 | struct video_device vdev; /* !! must be the first item */ | 126 | struct video_device vdev; /* !! must be the first item */ |
127 | struct file_operations fops; | ||
126 | struct usb_device *dev; | 128 | struct usb_device *dev; |
127 | struct file *capt_file; /* file doing video capture */ | 129 | struct file *capt_file; /* file doing video capture */ |
128 | 130 | ||
129 | struct cam cam; /* device information */ | 131 | struct cam cam; /* device information */ |
130 | const struct sd_desc *sd_desc; /* subdriver description */ | 132 | const struct sd_desc *sd_desc; /* subdriver description */ |
131 | 133 | ||
132 | struct urb *urb[NURBS]; | 134 | struct urb *urb[MAX_NURBS]; |
133 | 135 | ||
134 | __u8 *frbuf; /* buffer for nframes */ | 136 | __u8 *frbuf; /* buffer for nframes */ |
135 | struct gspca_frame frame[GSPCA_MAX_FRAMES]; | 137 | struct gspca_frame frame[GSPCA_MAX_FRAMES]; |
@@ -155,15 +157,21 @@ struct gspca_dev { | |||
155 | struct mutex queue_lock; /* ISOC queue protection */ | 157 | struct mutex queue_lock; /* ISOC queue protection */ |
156 | __u32 sequence; /* frame sequence number */ | 158 | __u32 sequence; /* frame sequence number */ |
157 | char streaming; | 159 | char streaming; |
158 | char users; /* # open */ | 160 | char users; /* number of opens */ |
159 | char present; /* device connected */ | 161 | char present; /* device connected */ |
160 | char nbufread; /* number of buffers for read() */ | 162 | char nbufread; /* number of buffers for read() */ |
163 | char nurbs; /* number of allocated URBs */ | ||
164 | char memory; /* memory type (V4L2_MEMORY_xxx) */ | ||
165 | __u8 urb_in; /* URB pointers - used when !mmap */ | ||
166 | __u8 urb_out; | ||
167 | __u8 nbalt; /* number of USB alternate settings */ | ||
161 | }; | 168 | }; |
162 | 169 | ||
163 | int gspca_dev_probe(struct usb_interface *intf, | 170 | int gspca_dev_probe(struct usb_interface *intf, |
164 | const struct usb_device_id *id, | 171 | const struct usb_device_id *id, |
165 | const struct sd_desc *sd_desc, | 172 | const struct sd_desc *sd_desc, |
166 | int dev_size); | 173 | int dev_size, |
174 | struct module *module); | ||
167 | void gspca_disconnect(struct usb_interface *intf); | 175 | void gspca_disconnect(struct usb_interface *intf); |
168 | struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, | 176 | struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, |
169 | int packet_type, | 177 | int packet_type, |