From patchwork Tue Mar 7 18:57:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9609743 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 8353C604DD for ; Tue, 7 Mar 2017 20:08:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA1A528511 for ; Tue, 7 Mar 2017 20:08:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F39D2852B; Tue, 7 Mar 2017 20:08:30 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 4D9E128518 for ; Tue, 7 Mar 2017 20:08:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755789AbdCGUI3 (ORCPT ); Tue, 7 Mar 2017 15:08:29 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36555 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756103AbdCGUI2 (ORCPT ); Tue, 7 Mar 2017 15:08:28 -0500 Received: by mail-wm0-f67.google.com with SMTP id v190so2797195wme.3 for ; Tue, 07 Mar 2017 12:08:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=RWh2z/UqzYvkWmnrIHfJmdrH+zP+SSRVmRDQJsIGIc8=; b=MrpWRN1h+iNnTjNqbJT4lJ5BHOj8WYMOC80gxh6jkFH5H9Z4qvf/e7DJ2Kut7dEtUS LvmCDg1+GixiFxf3sZonsdpXq04I+oqq+s6LYxMITWdkhWLayKA3oC8ZVcfWJ5Uy09i0 eO2qR3KLUMOInLRlnQXcE9gO43QEn/JV23eGknruBU5ZBSTOJN28Bicmz+lAods4xUSW yHrPJbCgi6uph9r426UZaZvIO825lXFa6mPu+lMieh/hI2ByTQxA8NY4WjQyzvAjXqAT 72KCaJOTGwi5pxjzbQn6dLI1K5Tuh9bWKC3lWrrpeTdk1SBdzyPTR9T4+L6rTJaw9VZ5 OiUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=RWh2z/UqzYvkWmnrIHfJmdrH+zP+SSRVmRDQJsIGIc8=; b=fAsWviTGBrO+T9TjKUsrb1zqvVyz/9eoE74Q8/FRrejLU+M912NJLimmOdoYUu+zz1 VkgZGbhu5QZjbE9CR3XMOAF7ObHp5IKZ99BjK9KVghevQeLf+aDkjICXxulMGw0eim++ XxUb8pehSu9ZnJf9OXdiovZOvxBKR2e3gnxWEuzlujaqpSHOko5sXOw2piLUOX6v5Pfi 8VBiUP2Zpla7Rm4Q8BKZGSWvtM9kx+kDfnki4Sq+Lt7ML0YMMDjXNgv60LeePnX50luQ a31SFomu5GGRMkUlIOD/e/PhFXaKPKGJ87xbpIWgoxbVG8hw1g5+BkjdSKYAVgs05+4b JCHg== X-Gm-Message-State: AMke39luqh2xBU4wQH0qTamXNhfwQiwuFYuPlm/Ae/VEz+oJeLe7Tz9BEeCudl6vmwLb4Q== X-Received: by 10.28.66.77 with SMTP id p74mr20783991wma.107.1488913117215; Tue, 07 Mar 2017 10:58:37 -0800 (PST) Received: from dvbdev.wuest.de (ip-178-201-73-185.hsi08.unitymediagroup.de. [178.201.73.185]) by smtp.gmail.com with ESMTPSA id m186sm13760369wmd.21.2017.03.07.10.58.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Mar 2017 10:58:36 -0800 (PST) From: Daniel Scheller To: linux-media@vger.kernel.org Subject: [PATCH 09/13] [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() Date: Tue, 7 Mar 2017 19:57:23 +0100 Message-Id: <20170307185727.564-10-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170307185727.564-1-d.scheller.oss@gmail.com> References: <20170307185727.564-1-d.scheller.oss@gmail.com> 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 From: Daniel Scheller The values used for comparing symbol rates and the resulting conditional reg writes seem wrong (rates multiplied by ten), so fix those values. While this doesn't seem to influence operation, it should be fixed anyway. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0367.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c index fb41c7b..ffc046a 100644 --- a/drivers/media/dvb-frontends/stv0367.c +++ b/drivers/media/dvb-frontends/stv0367.c @@ -1838,11 +1838,11 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state, case FE_CAB_MOD_QAM64: stv0367_writereg(state, R367CAB_IQDEM_ADJ_AGC_REF, 0x82); stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x5a); - if (SymbolRate > 45000000) { + if (SymbolRate > 4500000) { stv0367_writereg(state, R367CAB_FSM_STATE, 0xb0); stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1); stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa5); - } else if (SymbolRate > 25000000) { + } else if (SymbolRate > 2500000) { stv0367_writereg(state, R367CAB_FSM_STATE, 0xa0); stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1); stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa6); @@ -1860,9 +1860,9 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state, stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x76); stv0367_writereg(state, R367CAB_FSM_STATE, 0x90); stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xb1); - if (SymbolRate > 45000000) + if (SymbolRate > 4500000) stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa7); - else if (SymbolRate > 25000000) + else if (SymbolRate > 2500000) stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0xa6); else stv0367_writereg(state, R367CAB_EQU_CRL_LPF_GAIN, 0x97); @@ -1875,9 +1875,9 @@ static enum stv0367cab_mod stv0367cab_SetQamSize(struct stv0367_state *state, stv0367_writereg(state, R367CAB_IQDEM_ADJ_AGC_REF, 0x94); stv0367_writereg(state, R367CAB_AGC_PWR_REF_L, 0x5a); stv0367_writereg(state, R367CAB_FSM_STATE, 0xa0); - if (SymbolRate > 45000000) + if (SymbolRate > 4500000) stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1); - else if (SymbolRate > 25000000) + else if (SymbolRate > 2500000) stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xc1); else stv0367_writereg(state, R367CAB_EQU_CTR_LPF_GAIN, 0xd1);