Skip to content

Commit

Permalink
[media] gspca_cpia1: Don't allow the framerate divisor to go above 2
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent 49b61ec commit 76fafe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/gspca/cpia1.c
Original file line number Diff line number Diff line change
@@ -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 :
*
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 76fafe7

Please sign in to comment.