From patchwork Thu May 24 15:09:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 10425005 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 245F16019D for ; Thu, 24 May 2018 15:15:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F7029605 for ; Thu, 24 May 2018 15:15:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDDA32967F; Thu, 24 May 2018 15:15:02 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable 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 9E9FC29605 for ; Thu, 24 May 2018 15:15:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970883AbeEXPPB (ORCPT ); Thu, 24 May 2018 11:15:01 -0400 Received: from smtp-1b.atlantis.sk ([80.94.52.26]:59306 "EHLO smtp-1b.atlantis.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966566AbeEXPO5 (ORCPT ); Thu, 24 May 2018 11:14:57 -0400 Received: from gsql.ggedos.sk (off-7.infotel.telecom.sk [212.5.213.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-1b.atlantis.sk (Postfix) with ESMTPSA id 16E1B8344A96; Thu, 24 May 2018 17:09:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rainbow-software.org; s=atlsmtp; t=1527174575; bh=qmRvkHk9YZYQy/NvGOldo0I9y4cd7mDTyclhZlz862Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YbJtcQivMBidbeOcKZr1DynLnehR6mpsywZo8k/DG7svwH2xfSy9lDwtzHET4WHQ0 pkor5A0xboOmY7xenItZ6Yvzk4blNUzAE1qfUcy2ZfX6FwFgvc98+PwRvC/G9sOxEF cmjvPRixl0x0Eauo9TpDq0QP3UF0B1x4uztMRkcA= From: Ondrej Zary To: Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] gspca_zc3xx: Fix power line frequency settings for OV7648 Date: Thu, 24 May 2018 17:09:30 +0200 Message-Id: <20180524150931.26574-2-linux@rainbow-software.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180524150931.26574-1-linux@rainbow-software.org> References: <20180524150931.26574-1-linux@rainbow-software.org> 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 Power line frequency settings for OV7648 sensor contain autogain and exposure commands, affecting unrelated controls. Remove them. Signed-off-by: Ondrej Zary --- drivers/media/usb/gspca/zc3xx.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/gspca/zc3xx.c b/drivers/media/usb/gspca/zc3xx.c index 992918b3ad0c..9a78420e8ad8 100644 --- a/drivers/media/usb/gspca/zc3xx.c +++ b/drivers/media/usb/gspca/zc3xx.c @@ -3184,7 +3184,8 @@ static const struct usb_action ov7620_InitialScale[] = { /* 320x240 */ {} }; static const struct usb_action ov7620_50HZ[] = { - {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ +/* {0xaa, 0x13, 0x00a3}, * 00,13,a3,aa + * don't change autoexposure */ {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ @@ -3195,15 +3196,16 @@ static const struct usb_action ov7620_50HZ[] = { {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ - {0xaa, 0x10, 0x0082}, /* 00,10,82,aa */ +/* {0xaa, 0x10, 0x0082}, * 00,10,82,aa + * don't change exposure */ {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc * if mode0 (640x480) */ {} }; static const struct usb_action ov7620_60HZ[] = { - {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ - /* (bug in zs211.inf) */ +/* {0xaa, 0x13, 0x00a3}, * 00,13,a3,aa + * don't change autoexposure */ {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ @@ -3214,7 +3216,8 @@ static const struct usb_action ov7620_60HZ[] = { {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ - {0xaa, 0x10, 0x0020}, /* 00,10,20,aa */ +/* {0xaa, 0x10, 0x0020}, * 00,10,20,aa + * don't change exposure */ {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc * if mode0 (640x480) */ @@ -3224,8 +3227,8 @@ static const struct usb_action ov7620_60HZ[] = { {} }; static const struct usb_action ov7620_NoFliker[] = { - {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ - /* (bug in zs211.inf) */ +/* {0xaa, 0x13, 0x00a3}, * 00,13,a3,aa + * don't change autoexposure */ {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ {0xaa, 0x75, 0x008e}, /* 00,75,8e,aa */