From patchwork Fri Mar 24 18:24:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9643697 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 A108C60328 for ; Fri, 24 Mar 2017 18:25:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9714926907 for ; Fri, 24 Mar 2017 18:25:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C35A26E78; Fri, 24 Mar 2017 18:25:59 +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 3211D26CF9 for ; Fri, 24 Mar 2017 18:25:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964809AbdCXSZ4 (ORCPT ); Fri, 24 Mar 2017 14:25:56 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33147 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935737AbdCXSZr (ORCPT ); Fri, 24 Mar 2017 14:25:47 -0400 Received: by mail-wm0-f68.google.com with SMTP id n11so2236237wma.0 for ; Fri, 24 Mar 2017 11:25:46 -0700 (PDT) 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=B7qzssCgK7Vq0ytutDqVjIc4pimQ16CR4VzO/Rc1fW/60IWS+0z7DWZ23rVLh/M6Vv QggH14pKzKkPMyyWYWxBX8eUMXEyjvZVhf3ahRY9yLxCehvH7IsRz6LwbWq+/S3RzWGt 2NA8A1CkAiU0ZaxYswfX3YhjEZ3391yg276VbbJ8Fj/WnhBCnmRLVIZ1dhaGvfcmmtUr TKyStcYZaPtJdKgM1YyTq8uQfS+MPpoDPCXhzQ6sSjJIZWWqcraNceNPUCnEnZoq7v2/ 274IVlrDmvDcBSi6ws+ez8Er+J+9Ssiy1roREY4fDtRQb7/04JCTgLtYuBt4BK3sovUu 8nNA== 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=s9VhtTcH88uuzKOOC1NeLFSXjKfftgEAZCV+DseLBtw1spCTCRiduZ0aafwIbqSClW nQjTuT6+Sg7HR5iMJiePQQBkKKAgOtBJIpnSqGRM2feY8TVdLHR5E6j9w9+TeBwhXWhd GIU7X8ZWlSYjL62vhuFU75KNq15e7iRI2kbxE+QVOSIXBBC+ALlZ9rhJLHSVwMF78jAm Yz6GMZIo4rpIuZ8sjU3xig+QQ2W6CA3t93BVbnVOx0Wdsce1j/5MD9gi72e+2smkyj5G UF+RF7ovJprYKRCGKLpzb1zH195QO4c5YVVBvdrzfCGhr6yNfjgJr+fkJCNPdaNaPH9Y 0C8w== X-Gm-Message-State: AFeK/H2i7nZJMi+LluAcuVZrq7zgToEPb+BFhEkuDuF5wFElJtLV4mxp5L1RODCkhKrrdA== X-Received: by 10.28.195.214 with SMTP id t205mr4181794wmf.104.1490379945324; Fri, 24 Mar 2017 11:25:45 -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 w12sm3830519wra.21.2017.03.24.11.25.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Mar 2017 11:25:44 -0700 (PDT) From: Daniel Scheller To: mchehab@kernel.org, linux-media@vger.kernel.org Subject: [PATCH v2 09/12] [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() Date: Fri, 24 Mar 2017 19:24:05 +0100 Message-Id: <20170324182408.25996-10-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170324182408.25996-1-d.scheller.oss@gmail.com> References: <20170324182408.25996-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);