Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174034
b: refs/heads/master
c: b4b84de
h: refs/heads/master
v: v3
  • Loading branch information
Theodore Kilgore authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 9ccd5b5 commit fa2bc81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: b31210d737f383c14a02b20ab68e1a5770818f2d
refs/heads/master: b4b84deede5edb1e5492533a04f24ea16d1fae0a
11 changes: 5 additions & 6 deletions trunk/drivers/media/video/gspca/mr97310a.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,8 @@ static int sd_start(struct gspca_dev *gspca_dev)

/* Some of the VGA cameras require the memory pointer
* to be set to 0 again. We have been forced to start the
* stream somewhere else to detect the hardware, and closed it,
* and now since we are restarting the stream we need to do a
* completely fresh and clean start. */
* stream in sd_config() to detect the hardware, and closed it.
* Thus, we need here to do a completely fresh and clean start. */
err_code = zero_the_pointer(gspca_dev);
if (err_code < 0)
return err_code;
Expand Down Expand Up @@ -875,7 +874,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
value_reg += 4;
}

/* Note register 7 is also seen as 0x8x or 0xCx in dumps */
/* Note register 7 is also seen as 0x8x or 0xCx in some dumps */
if (sd->brightness > 0) {
sensor_write1(gspca_dev, sign_reg, 0x00);
val = sd->brightness;
Expand All @@ -900,15 +899,15 @@ static void setexposure(struct gspca_dev *gspca_dev)
return;

if (sd->cam_type == CAM_TYPE_CIF && sd->sensor_type == 1) {
/* This cam does not like exposure settings > 300,
/* This cam does not like exposure settings < 300,
so scale 0 - 4095 to 300 - 4095 */
exposure = (sd->exposure * 9267) / 10000 + 300;
sensor_write1(gspca_dev, 3, exposure >> 4);
sensor_write1(gspca_dev, 4, exposure & 0x0f);
} else {
/* We have both a clock divider and an exposure register.
We first calculate the clock divider, as that determines
the maximum exposure and then we calculayte the exposure
the maximum exposure and then we calculate the exposure
register setting (which goes from 0 - 511).
Note our 0 - 4095 exposure is mapped to 0 - 511
Expand Down

0 comments on commit fa2bc81

Please sign in to comment.