aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-01-06 08:58:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-01-19 08:45:07 -0500
commit4e17cd2eac2544267bdfab67655be468f80f50c6 (patch)
tree957a8afa19fd5e8e2a62a0491d2ebd33c8283858
parent0d0d7ef71ec6ba6abb680478f7d0514584b8277f (diff)
[media] gspca_sonixb: TAS5130C brightness control really is a gain control
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/sonixb.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 5c8420e5c02e..36253417bde4 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -564,7 +564,8 @@ SENS(initTas5110c, tas5110c_sensor_init, F_GAIN|F_SIF|F_COARSE_EXPO,
564 NO_BRIGHTNESS|NO_FREQ, 0), 564 NO_BRIGHTNESS|NO_FREQ, 0),
565SENS(initTas5110d, tas5110d_sensor_init, F_GAIN|F_SIF|F_COARSE_EXPO, 565SENS(initTas5110d, tas5110d_sensor_init, F_GAIN|F_SIF|F_COARSE_EXPO,
566 NO_BRIGHTNESS|NO_FREQ, 0), 566 NO_BRIGHTNESS|NO_FREQ, 0),
567SENS(initTas5130, tas5130_sensor_init, 0, NO_EXPO|NO_FREQ, 0), 567SENS(initTas5130, tas5130_sensor_init, F_GAIN,
568 NO_BRIGHTNESS|NO_EXPO|NO_FREQ, 0),
568}; 569};
569 570
570/* get one byte in gspca_dev->usb_buf */ 571/* get one byte in gspca_dev->usb_buf */
@@ -636,7 +637,6 @@ static void i2c_w_vector(struct gspca_dev *gspca_dev,
636static void setbrightness(struct gspca_dev *gspca_dev) 637static void setbrightness(struct gspca_dev *gspca_dev)
637{ 638{
638 struct sd *sd = (struct sd *) gspca_dev; 639 struct sd *sd = (struct sd *) gspca_dev;
639 __u8 value;
640 640
641 switch (sd->sensor) { 641 switch (sd->sensor) {
642 case SENSOR_OV6650: 642 case SENSOR_OV6650:
@@ -678,17 +678,6 @@ static void setbrightness(struct gspca_dev *gspca_dev)
678 goto err; 678 goto err;
679 break; 679 break;
680 } 680 }
681 case SENSOR_TAS5130CXX: {
682 __u8 i2c[] =
683 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10};
684
685 value = 0xff - sd->brightness;
686 i2c[4] = value;
687 PDEBUG(D_CONF, "brightness %d : %d", value, i2c[4]);
688 if (i2c_w(gspca_dev, i2c) < 0)
689 goto err;
690 break;
691 }
692 } 681 }
693 return; 682 return;
694err: 683err:
@@ -713,7 +702,8 @@ static void setsensorgain(struct gspca_dev *gspca_dev)
713 goto err; 702 goto err;
714 break; 703 break;
715 } 704 }
716 case SENSOR_TAS5110C: { 705 case SENSOR_TAS5110C:
706 case SENSOR_TAS5130CXX: {
717 __u8 i2c[] = 707 __u8 i2c[] =
718 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10}; 708 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10};
719 709