@@ -1743,6 +1743,22 @@
do_command(gspca_dev, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0);
}
+static void sd_disable_qx3_ctrls(struct gspca_dev *gspca_dev)
+{
+ int i, n;
+ __u32 id;
+
+ n = ARRAY_SIZE(sd_ctrls);
+ for (i = 0; i < n; i++) {
+ id = sd_ctrls[i].qctrl.id;
+
+ if (id == V4L2_CID_ILLUMINATORS_1 ||
+ id == V4L2_CID_ILLUMINATORS_2) {
+ gspca_dev->ctrl_dis |= (1 << i);
+ }
+ }
+}
+
/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
@@ -1758,6 +1774,9 @@
sd_stopN(gspca_dev);
+ if (!sd->params.qx3.qx3_detected)
+ sd_disable_qx3_ctrls(gspca_dev);
+
PDEBUG(D_PROBE, "CPIA Version: %d.%02d (%d.%d)",
sd->params.version.firmwareVersion,
sd->params.version.firmwareRevision,