From patchwork Mon Mar 11 19:00:26 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: 2250071 Return-Path: X-Original-To: patchwork-linux-media@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 3FF7A3FC8F for ; Mon, 11 Mar 2013 19:01:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754493Ab3CKTB1 (ORCPT ); Mon, 11 Mar 2013 15:01:27 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:43993 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463Ab3CKTBZ (ORCPT ); Mon, 11 Mar 2013 15:01:25 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MJI007GVFI6JY40@mailout3.samsung.com>; Tue, 12 Mar 2013 04:01:24 +0900 (KST) X-AuditID: cbfee61b-b7f076d0000034b6-e1-513e2a04bfd7 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 60.CB.13494.40A2E315; Tue, 12 Mar 2013 04:01:24 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MJI00F2XFGXUP00@mmp2.samsung.com>; Tue, 12 Mar 2013 04:01:24 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, myungjoo.ham@samsung.com, shaik.samsung@gmail.com, arun.kk@samsung.com, a.hajda@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH RFC 11/11] V4L: Add MATRIX option to V4L2_CID_EXPOSURE_METERING control Date: Mon, 11 Mar 2013 20:00:26 +0100 Message-id: <1363028426-2771-12-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1363028426-2771-1-git-send-email-s.nawrocki@samsung.com> References: <1363028426-2771-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnluLIzCtJLcpLzFFi42I5/e+xoC6Lll2gwaMLSha31p1jtfh46jar xdmmN+wWPRu2slrMOL+PyeJ24wo2i8Nv2lkt1u2cxO7A4bFz1l12j74tqxg9Pm+SC2CO4rJJ Sc3JLEst0rdL4Mo4smg9W8F0kYp9n9exNzBeEehi5OSQEDCReP9iDyuELSZx4d56ti5GLg4h gemMEvO/HWaCcDqYJM4/Xs0GUsUmYCjRe7SPEcQWEZCXeNJ7A6yDWeAco8SbG6/BRgkLREoc +3uMGcRmEVCVWLhvAVgDr4CbRNv3HqA4B9A6BYk5k2xAwpxA4TVPFoDNFxJwlfjx8wz7BEbe BYwMqxhFUwuSC4qT0nON9IoTc4tL89L1kvNzNzGCg+mZ9A7GVQ0WhxgFOBiVeHgVvtkGCrEm lhVX5h5ilOBgVhLhXbnJJlCINyWxsiq1KD++qDQntfgQozQHi5I478FW60AhgfTEktTs1NSC 1CKYLBMHp1QDo99vozznV0c0/x1/zXdAyFn++Js/tYscig7unVcnfXI9t/eeiLLXa3aE/NWd 8rT+vG/jId23G7PZxO7N1hNb/2CjCMv+uwvf1nK9F4qTP1i4umDPPbmMf4tfGm9sDt5wV8HP qfFG6bLvNt1L733gNC0O1ecu9/Ca82qt1f3Gsv23Xxw/r8PyOlGJpTgj0VCLuag4EQBQ71iE IgIAAA== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 | 9 ++++++++- drivers/media/v4l2-core/v4l2-ctrls.c | 1 + include/uapi/linux/v4l2-controls.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml index 7fe5be1..0484a7d 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. + @@ -3986,7 +3993,7 @@ interface and may change in the future. Flash Control IDs - + 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)