aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/ov534.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-11-12 04:10:36 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:49 -0500
commit69f1fe28f08000a123b3d71fac88564109da09fd (patch)
tree1793c9991115b073b40362c1c878ec31353ad590 /drivers/media/video/gspca/ov534.c
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/video/gspca/ov534.c')
-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 b665c84ca864..548f9e7edd8c 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,
1023 } 1023 }
1024} 1024}
1025 1025
1026/* set framerate */ 1026/* ov772x specific controls */
1027static void ov534_set_frame_rate(struct gspca_dev *gspca_dev) 1027static void set_frame_rate(struct gspca_dev *gspca_dev)
1028{ 1028{
1029 struct sd *sd = (struct sd *) gspca_dev; 1029 struct sd *sd = (struct sd *) gspca_dev;
1030 int i; 1030 int i;
@@ -1072,7 +1072,6 @@ static void ov534_set_frame_rate(struct gspca_dev *gspca_dev)
1072 PDEBUG(D_PROBE, "frame_rate: %d", r->fps); 1072 PDEBUG(D_PROBE, "frame_rate: %d", r->fps);
1073} 1073}
1074 1074
1075/* ov772x controls */
1076static void setbrightness(struct gspca_dev *gspca_dev) 1075static void setbrightness(struct gspca_dev *gspca_dev)
1077{ 1076{
1078 struct sd *sd = (struct sd *) gspca_dev; 1077 struct sd *sd = (struct sd *) gspca_dev;
@@ -1292,7 +1291,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
1292 ARRAY_SIZE(sensor_init_ov772x)); 1291 ARRAY_SIZE(sensor_init_ov772x));
1293 ov534_reg_write(gspca_dev, 0xe0, 0x09); 1292 ov534_reg_write(gspca_dev, 0xe0, 0x09);
1294 ov534_set_led(gspca_dev, 0); 1293 ov534_set_led(gspca_dev, 0);
1295 ov534_set_frame_rate(gspca_dev); 1294 set_frame_rate(gspca_dev);
1296 break; 1295 break;
1297 default: 1296 default:
1298/* case SENSOR_OV965X: */ 1297/* case SENSOR_OV965X: */
@@ -1329,7 +1328,7 @@ static int sd_start_ov772x(struct gspca_dev *gspca_dev)
1329 sccb_w_array(gspca_dev, sensor_start_ov772x_vga, 1328 sccb_w_array(gspca_dev, sensor_start_ov772x_vga,
1330 ARRAY_SIZE(sensor_start_ov772x_vga)); 1329 ARRAY_SIZE(sensor_start_ov772x_vga));
1331 } 1330 }
1332 ov534_set_frame_rate(gspca_dev); 1331 set_frame_rate(gspca_dev);
1333 1332
1334 setautogain(gspca_dev); 1333 setautogain(gspca_dev);
1335 setawb(gspca_dev); 1334 setawb(gspca_dev);
@@ -1518,7 +1517,7 @@ static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val)
1518 1517
1519 sd->brightness = val; 1518 sd->brightness = val;
1520 if (gspca_dev->streaming) 1519 if (gspca_dev->streaming)
1521 setcontrast(gspca_dev); 1520 setbrightness(gspca_dev);
1522 return 0; 1521 return 0;
1523} 1522}
1524 1523
@@ -1723,8 +1722,8 @@ static int sd_set_streamparm(struct gspca_dev *gspca_dev,
1723 1722
1724 /* Set requested framerate */ 1723 /* Set requested framerate */
1725 sd->frame_rate = tpf->denominator / tpf->numerator; 1724 sd->frame_rate = tpf->denominator / tpf->numerator;
1726 if (gspca_dev->streaming) 1725 if (gspca_dev->streaming && sd->sensor == SENSOR_OV772X)
1727 ov534_set_frame_rate(gspca_dev); 1726 set_frame_rate(gspca_dev);
1728 1727
1729 /* Return the actual framerate */ 1728 /* Return the actual framerate */
1730 tpf->numerator = 1; 1729 tpf->numerator = 1;