diff options
author | Jean-François Moine <moinejf@free.fr> | 2012-03-24 09:28:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-03 15:29:56 -0300 |
commit | 4fb8137c43ebc0f5bc0dde6b64faa9dd1b1d7970 (patch) | |
tree | ae44b806795fcba2d94cf1b9e074b9a1447591be | |
parent | c4407fe86d3856f60ec711e025bbe9a0159354a3 (diff) | |
download | lwn-4fb8137c43ebc0f5bc0dde6b64faa9dd1b1d7970.tar.gz lwn-4fb8137c43ebc0f5bc0dde6b64faa9dd1b1d7970.zip |
[media] gspca - sn9c20x: Don't do sensor update before the capture is started
Telling the bridge to update the sensor when setting the exposure or the gain
is not needed when the image transfer is not started.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/sn9c20x.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/sn9c20x.c b/drivers/media/video/gspca/sn9c20x.c index c5b42e4ac9b4..da2904a891aa 100644 --- a/drivers/media/video/gspca/sn9c20x.c +++ b/drivers/media/video/gspca/sn9c20x.c @@ -1644,9 +1644,12 @@ static void set_exposure(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; u8 exp[8] = {sd->i2c_intf, sd->i2c_addr, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10}; int expo; + if (gspca_dev->streaming) + exp[7] = 0x1e; + expo = sd->ctrls[EXPOSURE].val; switch (sd->sensor) { case SENSOR_OV7660: @@ -1683,9 +1686,12 @@ static void set_gain(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; u8 gain[8] = {sd->i2c_intf, sd->i2c_addr, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d}; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10}; int g; + if (gspca_dev->streaming) + gain[7] = 0x15; /* or 1d ? */ + g = sd->ctrls[GAIN].val; switch (sd->sensor) { case SENSOR_OV7660: |