diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-05-09 09:58:33 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 09:33:15 -0300 |
commit | 8cd058423f22072c1147d3e99161252e1e72333a (patch) | |
tree | 05176a18bc76178736e72e8396bea660b28897ee /drivers/media/video/gspca/gspca.h | |
parent | a3cc74d4ec3f2462c6f2dfa527c126c096852f02 (diff) | |
download | linux-8cd058423f22072c1147d3e99161252e1e72333a.tar.gz linux-8cd058423f22072c1147d3e99161252e1e72333a.tar.bz2 linux-8cd058423f22072c1147d3e99161252e1e72333a.zip |
[media] gspca: Add autogain functions for use with control framework drivers
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.h')
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h index 436d881ce443..449ff8e37fe7 100644 --- a/drivers/media/video/gspca/gspca.h +++ b/drivers/media/video/gspca/gspca.h @@ -6,6 +6,7 @@ #include <linux/usb.h> #include <linux/videodev2.h> #include <media/v4l2-common.h> +#include <media/v4l2-ctrls.h> #include <media/v4l2-device.h> #include <linux/mutex.h> @@ -174,6 +175,15 @@ struct gspca_dev { unsigned ctrl_dis; /* disabled controls (bit map) */ unsigned ctrl_inac; /* inactive controls (bit map) */ + /* autogain and exposure or gain control cluster, these are global as + the autogain/exposure functions in autogain_functions.c use them */ + struct { + struct v4l2_ctrl *autogain; + struct v4l2_ctrl *exposure; + struct v4l2_ctrl *gain; + int exp_too_low_cnt, exp_too_high_cnt; + }; + #define USB_BUF_SZ 64 __u8 *usb_buf; /* buffer for USB exchanges */ struct urb *urb[MAX_NURBS]; @@ -242,4 +252,9 @@ int gspca_resume(struct usb_interface *intf); #endif int gspca_auto_gain_n_exposure(struct gspca_dev *gspca_dev, int avg_lum, int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee); +int gspca_expo_autogain(struct gspca_dev *gspca_dev, int avg_lum, + int desired_avg_lum, int deadzone, int gain_knee, int exposure_knee); +int gspca_coarse_grained_expo_autogain(struct gspca_dev *gspca_dev, + int avg_lum, int desired_avg_lum, int deadzone); + #endif /* GSPCAV2_H */ |