aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r--drivers/media/video/gspca/gspca.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index c17625cff9ba..4779dd0b06da 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -49,13 +49,14 @@ extern int gspca_debug;
49 } while (0) 49 } while (0)
50 50
51#define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */ 51#define GSPCA_MAX_FRAMES 16 /* maximum number of video frame buffers */
52/* ISOC transfers */ 52/* image transfers */
53#define MAX_NURBS 16 /* max number of URBs */ 53#define MAX_NURBS 4 /* max number of URBs */
54#define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */ 54#define ISO_MAX_PKT 32 /* max number of packets in an ISOC transfer */
55#define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */ 55#define ISO_MAX_SIZE 0x8000 /* max size of one URB buffer (32 Kb) */
56 56
57/* device information - set at probe time */ 57/* device information - set at probe time */
58struct cam { 58struct cam {
59 int bulk_size; /* buffer size when image transfer by bulk */
59 struct v4l2_pix_format *cam_mode; /* size nmodes */ 60 struct v4l2_pix_format *cam_mode; /* size nmodes */
60 char nmodes; 61 char nmodes;
61 __u8 epaddr; 62 __u8 epaddr;
@@ -93,7 +94,7 @@ struct sd_desc {
93/* mandatory operations */ 94/* mandatory operations */
94 cam_cf_op config; /* called on probe */ 95 cam_cf_op config; /* called on probe */
95 cam_op init; /* called on probe and resume */ 96 cam_op init; /* called on probe and resume */
96 cam_v_op start; /* called on stream on */ 97 cam_op start; /* called on stream on */
97 cam_pkt_op pkt_scan; 98 cam_pkt_op pkt_scan;
98/* optional operations */ 99/* optional operations */
99 cam_v_op stopN; /* called on stream off - main alt */ 100 cam_v_op stopN; /* called on stream off - main alt */
@@ -105,10 +106,12 @@ struct sd_desc {
105}; 106};
106 107
107/* packet types when moving from iso buf to frame buf */ 108/* packet types when moving from iso buf to frame buf */
108#define DISCARD_PACKET 0 109enum gspca_packet_type {
109#define FIRST_PACKET 1 110 DISCARD_PACKET,
110#define INTER_PACKET 2 111 FIRST_PACKET,
111#define LAST_PACKET 3 112 INTER_PACKET,
113 LAST_PACKET
114};
112 115
113struct gspca_frame { 116struct gspca_frame {
114 __u8 *data; /* frame buffer */ 117 __u8 *data; /* frame buffer */
@@ -121,6 +124,7 @@ struct gspca_dev {
121 struct video_device vdev; /* !! must be the first item */ 124 struct video_device vdev; /* !! must be the first item */
122 struct file_operations fops; 125 struct file_operations fops;
123 struct usb_device *dev; 126 struct usb_device *dev;
127 struct kref kref;
124 struct file *capt_file; /* file doing video capture */ 128 struct file *capt_file; /* file doing video capture */
125 129
126 struct cam cam; /* device information */ 130 struct cam cam; /* device information */
@@ -173,10 +177,11 @@ int gspca_dev_probe(struct usb_interface *intf,
173 struct module *module); 177 struct module *module);
174void gspca_disconnect(struct usb_interface *intf); 178void gspca_disconnect(struct usb_interface *intf);
175struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev, 179struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
176 int packet_type, 180 enum gspca_packet_type packet_type,
177 struct gspca_frame *frame, 181 struct gspca_frame *frame,
178 const __u8 *data, 182 const __u8 *data,
179 int len); 183 int len);
184struct gspca_frame *gspca_get_i_frame(struct gspca_dev *gspca_dev);
180#ifdef CONFIG_PM 185#ifdef CONFIG_PM
181int gspca_suspend(struct usb_interface *intf, pm_message_t message); 186int gspca_suspend(struct usb_interface *intf, pm_message_t message);
182int gspca_resume(struct usb_interface *intf); 187int gspca_resume(struct usb_interface *intf);