Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124372
b: refs/heads/master
c: 3adba44
h: refs/heads/master
v: v3
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 3ef739e commit 3d9cb43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9da98a4336df020e5f089b963295373c6c3e6b9
refs/heads/master: 3adba442246a81aad29cf99ef55500379b7a3669
26 changes: 9 additions & 17 deletions trunk/drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ static int frame_rate;
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
__u8 frame_rate;
};

/* V4L2 controls supported by the driver */
Expand Down Expand Up @@ -358,45 +357,38 @@ static int sd_config(struct gspca_dev *gspca_dev,
/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *)gspca_dev;
ov534_setup(gspca_dev->dev);
int fr;

if (frame_rate > 0)
sd->frame_rate = frame_rate;
ov534_setup(gspca_dev->dev);

PDEBUG(D_PROBE, "frame_rate = %d", sd->frame_rate);
fr = frame_rate;

switch (sd->frame_rate) {
switch (fr) {
case 50:
sccb_reg_write(gspca_dev->dev, 0x11, 0x01);
sccb_check_status(gspca_dev->dev);
sccb_reg_write(gspca_dev->dev, 0x0d, 0x41);
sccb_check_status(gspca_dev->dev);
ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x02);
break;
case 40:
sccb_reg_write(gspca_dev->dev, 0x11, 0x02);
sccb_check_status(gspca_dev->dev);
sccb_reg_write(gspca_dev->dev, 0x0d, 0xc1);
sccb_check_status(gspca_dev->dev);
ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x04);
break;
case 30:
/* case 30: */
default:
fr = 30;
sccb_reg_write(gspca_dev->dev, 0x11, 0x04);
sccb_check_status(gspca_dev->dev);
sccb_reg_write(gspca_dev->dev, 0x0d, 0x81);
sccb_check_status(gspca_dev->dev);
ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x02);
break;
case 15:
sccb_reg_write(gspca_dev->dev, 0x11, 0x03);
sccb_check_status(gspca_dev->dev);
sccb_reg_write(gspca_dev->dev, 0x0d, 0x41);
sccb_check_status(gspca_dev->dev);
ov534_reg_verify_write(gspca_dev->dev, 0xe5, 0x04);
break;
};
}

PDEBUG(D_PROBE, "frame_rate: %d", fr);

return 0;
}
Expand Down

0 comments on commit 3d9cb43

Please sign in to comment.