aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2012-03-24 08:28:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-03 14:29:56 -0400
commit4fb8137c43ebc0f5bc0dde6b64faa9dd1b1d7970 (patch)
treeae44b806795fcba2d94cf1b9e074b9a1447591be /drivers
parentc4407fe86d3856f60ec711e025bbe9a0159354a3 (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/sn9c20x.c10
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)
1644{ 1644{
1645 struct sd *sd = (struct sd *) gspca_dev; 1645 struct sd *sd = (struct sd *) gspca_dev;
1646 u8 exp[8] = {sd->i2c_intf, sd->i2c_addr, 1646 u8 exp[8] = {sd->i2c_intf, sd->i2c_addr,
1647 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e}; 1647 0x00, 0x00, 0x00, 0x00, 0x00, 0x10};
1648 int expo; 1648 int expo;
1649 1649
1650 if (gspca_dev->streaming)
1651 exp[7] = 0x1e;
1652
1650 expo = sd->ctrls[EXPOSURE].val; 1653 expo = sd->ctrls[EXPOSURE].val;
1651 switch (sd->sensor) { 1654 switch (sd->sensor) {
1652 case SENSOR_OV7660: 1655 case SENSOR_OV7660:
@@ -1683,9 +1686,12 @@ static void set_gain(struct gspca_dev *gspca_dev)
1683{ 1686{
1684 struct sd *sd = (struct sd *) gspca_dev; 1687 struct sd *sd = (struct sd *) gspca_dev;
1685 u8 gain[8] = {sd->i2c_intf, sd->i2c_addr, 1688 u8 gain[8] = {sd->i2c_intf, sd->i2c_addr,
1686 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d}; 1689 0x00, 0x00, 0x00, 0x00, 0x00, 0x10};
1687 int g; 1690 int g;
1688 1691
1692 if (gspca_dev->streaming)
1693 gain[7] = 0x15; /* or 1d ? */
1694
1689 g = sd->ctrls[GAIN].val; 1695 g = sd->ctrls[GAIN].val;
1690 switch (sd->sensor) { 1696 switch (sd->sensor) {
1691 case SENSOR_OV7660: 1697 case SENSOR_OV7660: