From patchwork Mon Sep 6 18:11:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 4206 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Mon, 06 Sep 2010 15:13:41 -0300 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1OsgCK-0004nz-Vo for mchehab@gaivota; Mon, 06 Sep 2010 15:13:41 -0300 Received: from bombadil.infradead.org [18.85.46.34] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 06 Sep 2010 15:13:40 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Osg9p-0003OF-Ld; Mon, 06 Sep 2010 18:11:05 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754918Ab0IFSLE (ORCPT + 1 other); Mon, 6 Sep 2010 14:11:04 -0400 Received: from smtp5-g21.free.fr ([212.27.42.5]:44776 "EHLO smtp5-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754908Ab0IFSLC (ORCPT ); Mon, 6 Sep 2010 14:11:02 -0400 Received: from tele (unknown [82.245.201.222]) by smtp5-g21.free.fr (Postfix) with ESMTP id 81147D480ED for ; Mon, 6 Sep 2010 20:10:56 +0200 (CEST) Date: Mon, 6 Sep 2010 20:11:05 +0200 From: Jean-Francois Moine To: linux-media@vger.kernel.org Subject: [PATCH] Illuminators and status LED controls Message-ID: <20100906201105.4029d7e7@tele> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab Hi, This new proposal cancels the previous 'LED control' patch. Cheers. Acked-by: Hans de Goede Some media devices (microscopes) may have one or many illuminators, and most webcams have a status LED which is normally on when capture is active. This patch makes them controlable by the applications. Signed-off-by: Jean-Francois Moine diff --git a/Documentation/DocBook/v4l/controls.xml b/Documentation/DocBook/v4l/controls.xml index 8408caa..77f87ad 100644 --- a/Documentation/DocBook/v4l/controls.xml +++ b/Documentation/DocBook/v4l/controls.xml @@ -312,10 +312,27 @@ minimum value disables backlight compensation. information and bits 24-31 must be zero. + V4L2_CID_ILLUMINATORS + integer + Switch on or off the illuminator(s) of the device + (usually a microscope). + The control type and values depend on the driver and may be either + a single boolean (0: off, 1:on) or defined by a menu type. + + + V4L2_CID_STATUS_LED + integer + Set the status LED behaviour. Possible values for +enum v4l2_status_led are: +V4L2_STATUS_LED_AUTO (0), +V4L2_STATUS_LED_ON (1), +V4L2_STATUS_LED_OFF (2). + + V4L2_CID_LASTP1 End of the predefined control IDs (currently -V4L2_CID_BG_COLOR + 1). +V4L2_CID_STATUS_LED + 1). V4L2_CID_PRIVATE_BASE diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 61490c6..75e8869 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1045,8 +1045,16 @@ enum v4l2_colorfx { #define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) +#define V4L2_CID_ILLUMINATORS (V4L2_CID_BASE+37) +#define V4L2_CID_STATUS_LED (V4L2_CID_BASE+38) +enum v4l2_status_led { + V4L2_STATUS_LED_AUTO = 0, + V4L2_STATUS_LED_ON = 1, + V4L2_STATUS_LED_OFF = 2, +}; + /* last CID + 1 */ -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+37) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+39) /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)