aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 17:29:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-05 17:29:50 -0400
commit14408c4f4172eafc26ff52bebb7a8ab85b1c5492 (patch)
tree64b9310e8f704c54e3a1cbe48b9b21c5f85dff0b /drivers/media/video/gspca/gspca.h
parent54e2a3270f4d5f50aefb08630a3c3c758b9c2723 (diff)
parent8561098ff11d21f1a6a9a01fae2e68653928dbb5 (diff)
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (98 commits) V4L/DVB (8881): gspca: After 'while (retry--) {...}', retry will be -1 but not 0. V4L/DVB (8880): PATCH: Fix parents on some webcam drivers V4L/DVB (8877): b2c2 and bt8xx: udelay to mdelay V4L/DVB (8876): budget: udelay changed to mdelay V4L/DVB (8874): gspca: Adjust hstart for sn9c103/ov7630 and update usb-id's. V4L/DVB (8873): gspca: Bad image offset with rev012a of spca561 and adjust exposure. V4L/DVB (8872): gspca: Bad image format and offset with rev072a of spca561. V4L/DVB (8870): gspca: Fix dark room problem with sonixb. V4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 to gspca. V4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb. V4L/DVB (8844): dabusb_fpga_download(): fix a memory leak V4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak V4L/DVB (8842): vivi_release(): fix use-after-free V4L/DVB (8840): dib0700: add basic support for Hauppauge Nova-TD-500 (84xxx) V4L/DVB (8839): dib0700: add comment to identify 35th USB id pair V4L/DVB (8837): dvb: fix I2C adapters name size V4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added in sonixb. V4L/DVB (8834): gspca: Have a bigger buffer for sn9c10x compressed images. V4L/DVB (8833): gspca: Cleanup the sonixb code. V4L/DVB (8832): gspca: Bad pixelformat of vc0321 webcams. ...
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r--drivers/media/video/gspca/gspca.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index 67e448940eaa..c17625cff9ba 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -56,7 +56,6 @@ extern int gspca_debug;
56 56
57/* device information - set at probe time */ 57/* device information - set at probe time */
58struct cam { 58struct cam {
59 char *dev_name;
60 struct v4l2_pix_format *cam_mode; /* size nmodes */ 59 struct v4l2_pix_format *cam_mode; /* size nmodes */
61 char nmodes; 60 char nmodes;
62 __u8 epaddr; 61 __u8 epaddr;
@@ -91,15 +90,14 @@ struct sd_desc {
91/* controls */ 90/* controls */
92 const struct ctrl *ctrls; 91 const struct ctrl *ctrls;
93 int nctrls; 92 int nctrls;
94/* operations */ 93/* mandatory operations */
95 cam_cf_op config; /* called on probe */ 94 cam_cf_op config; /* called on probe */
96 cam_op open; /* called on open */ 95 cam_op init; /* called on probe and resume */
97 cam_v_op start; /* called on stream on */ 96 cam_v_op start; /* called on stream on */
98 cam_v_op stopN; /* called on stream off - main alt */
99 cam_v_op stop0; /* called on stream off - alt 0 */
100 cam_v_op close; /* called on close */
101 cam_pkt_op pkt_scan; 97 cam_pkt_op pkt_scan;
102/* optional operations */ 98/* optional operations */
99 cam_v_op stopN; /* called on stream off - main alt */
100 cam_v_op stop0; /* called on stream off - alt 0 */
103 cam_v_op dq_callback; /* called when a frame has been dequeued */ 101 cam_v_op dq_callback; /* called when a frame has been dequeued */
104 cam_jpg_op get_jcomp; 102 cam_jpg_op get_jcomp;
105 cam_jpg_op set_jcomp; 103 cam_jpg_op set_jcomp;
@@ -127,8 +125,10 @@ struct gspca_dev {
127 125
128 struct cam cam; /* device information */ 126 struct cam cam; /* device information */
129 const struct sd_desc *sd_desc; /* subdriver description */ 127 const struct sd_desc *sd_desc; /* subdriver description */
128 unsigned ctrl_dis; /* disabled controls (bit map) */
130 129
131 __u8 usb_buf[8]; /* buffer for USB exchanges */ 130#define USB_BUF_SZ 64
131 __u8 *usb_buf; /* buffer for USB exchanges */
132 struct urb *urb[MAX_NURBS]; 132 struct urb *urb[MAX_NURBS];
133 133
134 __u8 *frbuf; /* buffer for nframes */ 134 __u8 *frbuf; /* buffer for nframes */
@@ -155,6 +155,9 @@ struct gspca_dev {
155 struct mutex queue_lock; /* ISOC queue protection */ 155 struct mutex queue_lock; /* ISOC queue protection */
156 __u32 sequence; /* frame sequence number */ 156 __u32 sequence; /* frame sequence number */
157 char streaming; 157 char streaming;
158#ifdef CONFIG_PM
159 char frozen; /* suspend - resume */
160#endif
158 char users; /* number of opens */ 161 char users; /* number of opens */
159 char present; /* device connected */ 162 char present; /* device connected */
160 char nbufread; /* number of buffers for read() */ 163 char nbufread; /* number of buffers for read() */
@@ -174,6 +177,10 @@ struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
174 struct gspca_frame *frame, 177 struct gspca_frame *frame,
175 const __u8 *data, 178 const __u8 *data,
176 int len); 179 int len);
180#ifdef CONFIG_PM
181int gspca_suspend(struct usb_interface *intf, pm_message_t message);
182int gspca_resume(struct usb_interface *intf);
183#endif
177int gspca_auto_gain_n_exposure(struct gspca_dev *gspca_dev, int avg_lum, 184int gspca_auto_gain_n_exposure(struct gspca_dev *gspca_dev, int avg_lum,
178 int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee); 185 int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee);
179#endif /* GSPCAV2_H */ 186#endif /* GSPCAV2_H */