diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-05-10 13:52:37 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 14:44:02 +0200 |
commit | 0413d3b286076b052f624275897d243d5865e0d2 (patch) | |
tree | 4b72bd4fa28351509c1854997158e89c894b6632 /drivers/media/video/gspca/pac207.c | |
parent | [media] gspca_pac207: Convert to the control framework (diff) | |
download | linux-0413d3b286076b052f624275897d243d5865e0d2.tar.xz linux-0413d3b286076b052f624275897d243d5865e0d2.zip |
[media] gscpa_pac207: Switch to coarse_grained_expo auto gain algorithm
The pac207's exposure control is a clock-divider, so it goes with quite
big steps. So lets use an autogain algorithm optimised for that.
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/pac207.c')
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 44ad57aa4058..fa661c6d6d55 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -46,13 +46,11 @@ MODULE_LICENSE("GPL"); #define PAC207_EXPOSURE_MIN 3 #define PAC207_EXPOSURE_MAX 90 /* 1 sec expo time / 1 fps */ #define PAC207_EXPOSURE_DEFAULT 5 /* power on default: 3 */ -#define PAC207_EXPOSURE_KNEE 9 /* fps: 90 / exposure -> 9: 10 fps */ #define PAC207_EXPOSURE_REG 0x02 #define PAC207_GAIN_MIN 0 #define PAC207_GAIN_MAX 31 #define PAC207_GAIN_DEFAULT 7 /* power on default: 9 */ -#define PAC207_GAIN_KNEE 15 #define PAC207_GAIN_REG 0x0e #define PAC207_AUTOGAIN_DEADZONE 30 @@ -343,9 +341,8 @@ static void pac207_do_auto_gain(struct gspca_dev *gspca_dev) if (sd->autogain_ignore_frames > 0) sd->autogain_ignore_frames--; - else if (gspca_expo_autogain(gspca_dev, avg_lum, - 90, PAC207_AUTOGAIN_DEADZONE, - PAC207_GAIN_KNEE, PAC207_EXPOSURE_KNEE)) + else if (gspca_coarse_grained_expo_autogain(gspca_dev, avg_lum, + 90, PAC207_AUTOGAIN_DEADZONE)) sd->autogain_ignore_frames = PAC_AUTOGAIN_IGNORE_FRAMES; } |