summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-02-21 15:30:30 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 00:32:11 +0100
commit76fafe78df9e4062b9b6595f3225a2c0c2847ae5 (patch)
treed7b954eea5a99d5b3c636f7209a244ccd986e37f
parent[media] gspca: Add new vicam subdriver (diff)
downloadlinux-76fafe78df9e4062b9b6595f3225a2c0c2847ae5.tar.xz
linux-76fafe78df9e4062b9b6595f3225a2c0c2847ae5.zip
[media] gspca_cpia1: Don't allow the framerate divisor to go above 2
Having a framerate divisor of 3 is not really necesarry and leads to various troubles (frames going missing, compression issues) when allowed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/cpia1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c
index 4bf2cab98d64..2a4a428f2018 100644
--- a/drivers/media/video/gspca/cpia1.c
+++ b/drivers/media/video/gspca/cpia1.c
@@ -1,7 +1,7 @@
/*
* cpia CPiA (1) gspca driver
*
- * Copyright (C) 2010 Hans de Goede <hdegoede@redhat.com>
+ * Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.com>
*
* This module is adapted from the in kernel v4l1 cpia driver which is :
*
@@ -1400,7 +1400,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev)
if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
sd->exposure_status == EXPOSURE_DARK) &&
sd->exposure_count >= DARK_TIME * framerate &&
- sd->params.sensorFps.divisor < 3) {
+ sd->params.sensorFps.divisor < 2) {
/* dark for too long */
++sd->params.sensorFps.divisor;
@@ -1456,7 +1456,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev)
if ((sd->exposure_status == EXPOSURE_VERY_DARK ||
sd->exposure_status == EXPOSURE_DARK) &&
sd->exposure_count >= DARK_TIME * framerate &&
- sd->params.sensorFps.divisor < 3) {
+ sd->params.sensorFps.divisor < 2) {
/* dark for too long */
++sd->params.sensorFps.divisor;