From patchwork Mon Feb 6 06:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 9557145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CDEFC60242 for ; Mon, 6 Feb 2017 06:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1BC62621D for ; Mon, 6 Feb 2017 06:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B549C2723E; Mon, 6 Feb 2017 06:58:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56BEC269E2 for ; Mon, 6 Feb 2017 06:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751071AbdBFG5o (ORCPT ); Mon, 6 Feb 2017 01:57:44 -0500 Received: from shell.v3.sk ([92.60.52.57]:54720 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdBFG5n (ORCPT ); Mon, 6 Feb 2017 01:57:43 -0500 X-Greylist: delayed 592 seconds by postgrey-1.27 at vger.kernel.org; Mon, 06 Feb 2017 01:57:42 EST Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 6E32E42FEC; Mon, 6 Feb 2017 07:47:47 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ty86P8QAz8u6; Mon, 6 Feb 2017 07:47:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id E2E9443081; Mon, 6 Feb 2017 07:47:43 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pw_T9Zby-px7; Mon, 6 Feb 2017 07:47:43 +0100 (CET) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id 06AE942FEC; Mon, 6 Feb 2017 07:47:42 +0100 (CET) From: Lubomir Rintel To: Mauro Carvalho Chehab Cc: Federico Simoncelli , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Lubomir Rintel Subject: [PATCH] [media] usbtv: add sharpness control Date: Mon, 6 Feb 2017 07:47:36 +0100 Message-Id: <20170206064736.17187-1-lkundrak@v3.sk> X-Mailer: git-send-email 2.9.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Lubomir Rintel --- drivers/media/usb/usbtv/usbtv-video.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index d3b6d3d..8135614 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -757,6 +757,12 @@ static int usbtv_s_ctrl(struct v4l2_ctrl *ctrl) data[1] = -ctrl->val & 0xff; } break; + case V4L2_CID_SHARPNESS: + index = USBTV_BASE + 0x0239; + data[0] = 0; + data[1] = ctrl->val; + size = 2; + break; default: kfree(data); return -EINVAL; @@ -825,6 +831,8 @@ int usbtv_video_init(struct usbtv *usbtv) V4L2_CID_SATURATION, 0, 0x3ff, 1, 0x200); v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops, V4L2_CID_HUE, -0xdff, 0xdff, 1, 0x000); + v4l2_ctrl_new_std(&usbtv->ctrl, &usbtv_ctrl_ops, + V4L2_CID_SHARPNESS, 0x0, 0xff, 1, 0x60); ret = usbtv->ctrl.error; if (ret < 0) { dev_warn(usbtv->dev, "Could not initialize controls\n");