Re: [PATCH] gspca_cpia1: Add lamp control for Intel Play QX3 microscope

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

p.s. (forgot to mention this in my previous mail)

On 09/03/2010 03:09 AM, Andy Walls wrote:

<snip>

@@ -447,6 +449,20 @@
  		.set = sd_setcomptarget,
  		.get = sd_getcomptarget,
  	},
+	{
+		{
+#define V4L2_CID_LAMPS (V4L2_CID_PRIVATE_BASE+1)
+			.id	 = V4L2_CID_LAMPS,
+			.type    = V4L2_CTRL_TYPE_MENU,
+			.name    = "Lamps",
+			.minimum = 0,
+			.maximum = 3,
+			.step    = 1,
+			.default_value = 0,
+		},
+		.set = sd_setlamps,
+		.get = sd_getlamps,
+	},
  };

  static const struct v4l2_pix_format mode[] = {

We only want this control to be available on the qx3 and not on
all cpia1 devices, so you need to add something like the following to
sd_config:

	if (!(id->idVendor == 0x0813 && id->idProduct == 0x0001))
		gspca_dev->ctrl_dis = 1 << LAMPS_IDX;

Where LAMPS_IDX is a define giving the index of V4L2_CID_LAMPS in the
sd_ctrls array, see the ov519 gspca driver for example.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux