aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-11-12 06:10:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:41:49 -0200
commit69f1fe28f08000a123b3d71fac88564109da09fd (patch)
tree1793c9991115b073b40362c1c878ec31353ad590 /drivers/media
parentb014f94b28713e169a438131a5ce2752068068ad (diff)
V4L/DVB (13424): gspca - ov534: Fix ov772x brightness and ov965x frame rate.
- the ov772x brightness was not setteble (fixed by M. Thrun) - the set_frame_rate function does not work for ov965x Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/ov534.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c
index b665c84ca86..548f9e7edd8 100644
--- a/drivers/media/video/gspca/ov534.c
+++ b/drivers/media/video/gspca/ov534.c
@@ -1023,8 +1023,8 @@ static void sccb_w_array(struct gspca_dev *gspca_dev,
}
}
-/* set framerate */
-static void ov534_set_frame_rate(struct gspca_dev *gspca_dev)
+/* ov772x specific controls */
+static void set_frame_rate(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i;
@@ -1072,7 +1072,6 @@ static void ov534_set_frame_rate(struct gspca_dev *gspca_dev)
PDEBUG(D_PROBE, "frame_rate: %d", r->fps);
}
-/* ov772x controls */
static void setbrightness(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
@@ -1292,7 +1291,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
ARRAY_SIZE(sensor_init_ov772x));
ov534_reg_write(gspca_dev, 0xe0, 0x09);
ov534_set_led(gspca_dev, 0);
- ov534_set_frame_rate(gspca_dev);
+ set_frame_rate(gspca_dev);
break;
default:
/* case SENSOR_OV965X: */
@@ -1329,7 +1328,7 @@ static int sd_start_ov772x(struct gspca_dev *gspca_dev)
sccb_w_array(gspca_dev, sensor_start_ov772x_vga,
ARRAY_SIZE(sensor_start_ov772x_vga));
}
- ov534_set_frame_rate(gspca_dev);
+ set_frame_rate(gspca_dev);
setautogain(gspca_dev);
setawb(gspca_dev);
@@ -1518,7 +1517,7 @@ static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val)
sd->brightness = val;
if (gspca_dev->streaming)
- setcontrast(gspca_dev);
+ setbrightness(gspca_dev);
return 0;
}
@@ -1723,8 +1722,8 @@ static int sd_set_streamparm(struct gspca_dev *gspca_dev,
/* Set requested framerate */
sd->frame_rate = tpf->denominator / tpf->numerator;
- if (gspca_dev->streaming)
- ov534_set_frame_rate(gspca_dev);
+ if (gspca_dev->streaming && sd->sensor == SENSOR_OV772X)
+ set_frame_rate(gspca_dev);
/* Return the actual framerate */
tpf->numerator = 1;