From patchwork Tue Mar 26 17:29:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2341711 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 534483FD40 for ; Tue, 26 Mar 2013 17:30:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753269Ab3CZRaO (ORCPT ); Tue, 26 Mar 2013 13:30:14 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:53839 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257Ab3CZRaM (ORCPT ); Tue, 26 Mar 2013 13:30:12 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MKA00D1B3AAT340@mailout1.samsung.com>; Wed, 27 Mar 2013 02:30:11 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-bc-5151db2308b4 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F0.57.13494.32BD1515; Wed, 27 Mar 2013 02:30:11 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MKA004BH39YZW90@mmp1.samsung.com>; Wed, 27 Mar 2013 02:30:11 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, myungjoo.ham@samsung.com, dh09.lee@samsung.com, shaik.samsung@gmail.com, arun.kk@samsung.com, a.hajda@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH v2 01/10] V4L: Add MATRIX option to V4L2_CID_EXPOSURE_METERING control Date: Tue, 26 Mar 2013 18:29:43 +0100 Message-id: <1364318992-20562-2-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1364318992-20562-1-git-send-email-s.nawrocki@samsung.com> References: <1364318992-20562-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprELMWRmVeSWpSXmKPExsVy+t9jAV3l24GBBscO8VncWneO1eLjqdus FtfP21mcbXrDbtGzYSurxYzz+5gsbjeuYLM4/Kad1WLdzknsDpweO2fdZffo27KK0ePzJrkA 5igum5TUnMyy1CJ9uwSujI/T+lgLTgpW/Nhe3cD4iK+LkZNDQsBE4uKVpUwQtpjEhXvr2boY uTiEBBYxSky+fIIZwulgknh2cB5YFZuAoUTv0T5GEFtEQF7iSe8NsA5mgSeMEn9OHAArEhaI kFj/qBmsiEVAVWLuzkYwm1fATeL2o24gmwNonYLEnEk2IGFOAXeJ5TeOsIDYQkAlzxu2sE1g 5F3AyLCKUTS1ILmgOCk910ivODG3uDQvXS85P3cTIziknknvYFzVYHGIUYCDUYmHlyMsIFCI NbGsuDL3EKMEB7OSCK/gxsBAId6UxMqq1KL8+KLSnNTiQ4zSHCxK4rwHW60DhQTSE0tSs1NT C1KLYLJMHJxSDYzWMV9NHzzQZT4WP3fDed/FtuyLN9T9nt236cTdW7WOjl3Toj4fW9swdz7D doa+h6c2cdlsC2xiex/AszklfVEfpyZvoZPBq57c18sWaWicmXvW/OWEDVNN1xkqcK2LOSYc 0+rHy3X/BrPMRoHDr1wqep4LhIV+m3Wz07m+ftM8h3kXZy7h1jZQYinOSDTUYi4qTgQAC2zf uSUCAAA= Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds a menu option to the V4L2_CID_EXPOSURE_METERING control for multi-zone metering. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- Documentation/DocBook/media/v4l/controls.xml | 7 +++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/uapi/linux/v4l2-controls.h | 1 + 3 files changed, 9 insertions(+) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 7fe5be1..c5398ed 100644 --- a/Documentation/DocBook/media/v4l/controls.xml +++ b/Documentation/DocBook/media/v4l/controls.xml @@ -3159,6 +3159,13 @@ giving priority to the center of the metered area. V4L2_EXPOSURE_METERING_SPOT  Measure only very small area at the center of the frame. + + V4L2_EXPOSURE_METERING_MATRIX  + A multi-zone metering. The light intensity is measured +in several points of the frame and the the results are combined. The +algorithm of the zones selection and their significance in calculating the +final value is device dependant. + diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 4b45d49..6b56d7b 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -234,6 +234,7 @@ const char * const *v4l2_ctrl_get_menu(u32 id) "Average", "Center Weighted", "Spot", + "Matrix", NULL }; static const char * const camera_auto_focus_range[] = { diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index f56c945..22556a2 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -642,6 +642,7 @@ enum v4l2_exposure_metering { V4L2_EXPOSURE_METERING_AVERAGE = 0, V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, V4L2_EXPOSURE_METERING_SPOT = 2, + V4L2_EXPOSURE_METERING_MATRIX = 3, }; #define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26)