From patchwork Wed Mar 29 16:43:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9651963 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 78A2E602C8 for ; Wed, 29 Mar 2017 16:43:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6ADC62845F for ; Wed, 29 Mar 2017 16:43:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FC5D28497; Wed, 29 Mar 2017 16:43:32 +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 0EBC52845F for ; Wed, 29 Mar 2017 16:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbdC2Qna (ORCPT ); Wed, 29 Mar 2017 12:43:30 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35227 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932138AbdC2QnZ (ORCPT ); Wed, 29 Mar 2017 12:43:25 -0400 Received: by mail-wr0-f193.google.com with SMTP id p52so4573708wrc.2 for ; Wed, 29 Mar 2017 09:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RWh2z/UqzYvkWmnrIHfJmdrH+zP+SSRVmRDQJsIGIc8=; b=arDTosSKlsbbnF4x38elghEtVTYlbeVyAUbiwOAAW0Oty4+0R8qyas2YtHDHUCM1ZX DcFZyy6Dv2gsEUSP+tsHm4RYYAYGjmZi84gzfzfhkni7L5SI1sOVMrT+Yf0hEYnUi7Hs NRKNubIOzaB1BBR+ACHByEDv1d1cNsxGxcfPPYphaYOhuKD8z4bPPL99JWhX8BGNKGtr oUDn25nYiwDZDdPADME5lyywm5aBwju9z/7qSAv3U8WpK9TZSINq9Sem+ErN6XJDtK0L wJUW1fD+cHj9XYcGB3wFq3rAr81txStL+CBEJRURCMoCGgFOViWbtNO5nc29wkZRXDFC Ab5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RWh2z/UqzYvkWmnrIHfJmdrH+zP+SSRVmRDQJsIGIc8=; b=PfCePie6kJqFF4qmSE8Okfxtui75pizzEWCrAOE0skE/yg5a4c7kvHEur+mtIG8C01 P3al+o+zEPNiZxHxH2h31Lq56CW+Q/VOvC10rtlWgm9vGMWCGnldWePW5CpIM36K6xqw JRspWscWyucoIzIMIF4ddbi/u5/HEahGec5dtVucs2Sj8OshwxboP1k6hIW9WbWo2RXQ OIFo+iAzbUH4pJIUXlI/sD+J7Tas2dxl2wRlv8TVsMES9kXeI3QmEX33fhs22NxTOnV4 Zso+PSiNaUPDnSiE9VTSkSq9HkoJCXegTCFVqXkDxVNiq4r/G0k+3RhgZXuQ5JT+TOcX XH/w== X-Gm-Message-State: AFeK/H1YBo3O6EDZfO4jr5DAEOAvSQeVePpBwhaN7/5u1EPa1ShZPzNdNnVED6PWzOz4bA== X-Received: by 10.223.175.202 with SMTP id y10mr1344285wrd.77.1490805803351; Wed, 29 Mar 2017 09:43:23 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-24-178-151.hsi14.unitymediagroup.de. [37.24.178.151]) by smtp.gmail.com with ESMTPSA id x127sm8835277wmf.31.2017.03.29.09.43.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 09:43:22 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org Cc: liplianin@netup.ru, rjkm@metzlerbros.de, crope@iki.fi Subject: [PATCH v3 09/13] [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() Date: Wed, 29 Mar 2017 18:43:09 +0200 Message-Id: <20170329164313.14636-10-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170329164313.14636-1-d.scheller.oss@gmail.com> References: <20170329164313.14636-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);