Commit a63d6018 authored by Jean-François Moine's avatar Jean-François Moine Committed by Mauro Carvalho Chehab

[media] gspca - sonixj: Add LED (illuminator) control to the webcam 0c45:614a

Signed-off-by: default avatarJean-François Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3afef85b
...@@ -2193,14 +2193,22 @@ static void setillum(struct gspca_dev *gspca_dev) ...@@ -2193,14 +2193,22 @@ static void setillum(struct gspca_dev *gspca_dev)
if (gspca_dev->ctrl_dis & (1 << ILLUM)) if (gspca_dev->ctrl_dis & (1 << ILLUM))
return; return;
if (starcam) switch (sd->sensor) {
reg_w1(gspca_dev, 0x02, /* gpio */ case SENSOR_ADCM1700:
sd->ctrls[ILLUM].val ? reg_w1(gspca_dev, 0x02, /* gpio */
0x55 : 0x54); /* 370i */ sd->ctrls[ILLUM].val ? 0x64 : 0x60);
else break;
reg_w1(gspca_dev, 0x02, case SENSOR_MT9V111:
sd->ctrls[ILLUM].val ? if (starcam)
0x66 : 0x64); /* Clip */ reg_w1(gspca_dev, 0x02,
sd->ctrls[ILLUM].val ?
0x55 : 0x54); /* 370i */
else
reg_w1(gspca_dev, 0x02,
sd->ctrls[ILLUM].val ?
0x66 : 0x64); /* Clip */
break;
}
} }
static void setfreq(struct gspca_dev *gspca_dev) static void setfreq(struct gspca_dev *gspca_dev)
...@@ -2959,7 +2967,7 @@ static const struct usb_device_id device_table[] = { ...@@ -2959,7 +2967,7 @@ static const struct usb_device_id device_table[] = {
/* or GC0305 / GC0307 */ /* or GC0305 / GC0307 */
{USB_DEVICE(0x0c45, 0x6143), BS(SN9C120, SP80708)}, /*sn9c120b*/ {USB_DEVICE(0x0c45, 0x6143), BS(SN9C120, SP80708)}, /*sn9c120b*/
{USB_DEVICE(0x0c45, 0x6148), BS(SN9C120, OM6802)}, /*sn9c120b*/ {USB_DEVICE(0x0c45, 0x6148), BS(SN9C120, OM6802)}, /*sn9c120b*/
{USB_DEVICE(0x0c45, 0x614a), BS(SN9C120, ADCM1700)}, /*sn9c120b*/ {USB_DEVICE(0x0c45, 0x614a), BSF(SN9C120, ADCM1700, F_ILLUM)},
/* {USB_DEVICE(0x0c45, 0x614c), BS(SN9C120, GC0306)}, */ /*sn9c120b*/ /* {USB_DEVICE(0x0c45, 0x614c), BS(SN9C120, GC0306)}, */ /*sn9c120b*/
{} {}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment