From patchwork Thu Feb 24 10:45:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kim, HeungJun" X-Patchwork-Id: 587121 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1OAtj9o003025 for ; Thu, 24 Feb 2011 10:55:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756002Ab1BXKzn (ORCPT ); Thu, 24 Feb 2011 05:55:43 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:59577 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755571Ab1BXKzn (ORCPT ); Thu, 24 Feb 2011 05:55:43 -0500 Received: from epmmp2 (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LH400GSXB7SNQB0@mailout2.samsung.com> for linux-media@vger.kernel.org; Thu, 24 Feb 2011 19:45:28 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LH400MITB7SZU@mmp2.samsung.com> for linux-media@vger.kernel.org; Thu, 24 Feb 2011 19:45:29 +0900 (KST) Received: from [165.213.219.118] ([165.213.219.118]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Thu, 24 Feb 2011 19:45:28 +0900 Date: Thu, 24 Feb 2011 19:45:28 +0900 From: "Kim, HeungJun" Subject: [RFC PATCH 2/2] v4l2-ctrls: modify uvc driver to use new menu type of V4L2_CID_FOCUS_AUTO To: "linux-media@vger.kernel.org" Cc: Hans Verkuil , Laurent Pinchart , Sylwester Nawrocki , "kyungmin.park@samsung.com" Reply-to: riverful.kim@samsung.com Message-id: <4D6636C8.3040809@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7BIT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ko; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 X-OriginalArrivalTime: 24 Feb 2011 10:45:28.0549 (UTC) FILETIME=[F386D950:01CBD40F] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Feb 2011 10:55:52 +0000 (UTC) diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 59f8a9a..795fd3f 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c @@ -333,6 +333,11 @@ static struct uvc_menu_info exposure_auto_controls[] = { { 8, "Aperture Priority Mode" }, }; +static struct uvc_menu_info focus_auto_controls[] = { + { 2, "Auto Mode" }, + { 1, "Manual Mode" }, +}; + static __s32 uvc_ctrl_get_zoom(struct uvc_control_mapping *mapping, __u8 query, const __u8 *data) { @@ -558,10 +563,12 @@ static struct uvc_control_mapping uvc_ctrl_mappings[] = { .name = "Focus, Auto", .entity = UVC_GUID_UVC_CAMERA, .selector = UVC_CT_FOCUS_AUTO_CONTROL, - .size = 1, + .size = 2, .offset = 0, - .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, - .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, + .v4l2_type = V4L2_CTRL_TYPE_MENU, + .data_type = UVC_CTRL_DATA_TYPE_BITMASK, + .menu_info = focus_auto_ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html