Skip to content

Commit

Permalink
V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensor
Browse files Browse the repository at this point in the history
Make the range of exposure values (0-0x1770) distribute evenly through
HV7131R's exposure control bytes.

Signed-off-by: German Galkin <galkinga@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
German Galkin authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 24f222e commit e10f731
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/gspca/sn9c20x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,9 +1655,9 @@ static int set_exposure(struct gspca_dev *gspca_dev)
case SENSOR_HV7131R:
exp[0] |= (4 << 4);
exp[2] = 0x25;
exp[3] = ((sd->exposure * 0xffffff) / 0xffff) >> 16;
exp[4] = ((sd->exposure * 0xffffff) / 0xffff) >> 8;
exp[5] = ((sd->exposure * 0xffffff) / 0xffff) & 0xff;
exp[3] = (sd->exposure >> 5) & 0xff;
exp[4] = (sd->exposure << 3) & 0xff;
exp[5] = 0;
break;
default:
return 0;
Expand Down

0 comments on commit e10f731

Please sign in to comment.