diff options
author | German Galkin <galkinga@gmail.com> | 2010-03-07 06:19:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-18 00:46:29 -0300 |
commit | e10f73194d63321d020433fa1287e619d4107b79 (patch) | |
tree | a5864a948c0c7e3f8d15e06a84491ef0c9504297 /drivers/media/video/gspca/sn9c20x.c | |
parent | 24f222e77ad62e41b1a882c77feeb8268c80b909 (diff) | |
download | blackbird-op-linux-e10f73194d63321d020433fa1287e619d4107b79.tar.gz blackbird-op-linux-e10f73194d63321d020433fa1287e619d4107b79.zip |
V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensor
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>
Diffstat (limited to 'drivers/media/video/gspca/sn9c20x.c')
-rw-r--r-- | drivers/media/video/gspca/sn9c20x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index 3dee3e5844b6..04bf80ddfbb8 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c @@ -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; |