From patchwork Mon Apr 9 16:47:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10331785 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 AFAAC6037F for ; Mon, 9 Apr 2018 16:48:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A240E28800 for ; Mon, 9 Apr 2018 16:48:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9715B2881D; Mon, 9 Apr 2018 16:48:34 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 356F228800 for ; Mon, 9 Apr 2018 16:48:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbeDIQsC (ORCPT ); Mon, 9 Apr 2018 12:48:02 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:46411 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbeDIQr6 (ORCPT ); Mon, 9 Apr 2018 12:47:58 -0400 Received: by mail-wr0-f194.google.com with SMTP id d1so10239197wrj.13 for ; Mon, 09 Apr 2018 09:47:58 -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=vbEir7EZEhxSrY4SpPwp8VXeBq+N2AkCIap6irW1FBk=; b=SayCWKHYqqH4wfGa0sj3K1WGN7UCykXNFdtCQgJDxTQMa9/HVBaNni3ZKDCT7JSqbZ Q5/z2pByX6ses/NTPWNpb1Mlva7cAXMi+IifTR2csw5D2QDryNb3CriGdKwS4P83dY8X Hxp5kJvy1sNF4YJ6IVpTEysnfNR0yRxMEsnkyohUsKqTFy9Jc3zu2cabL7RJcbfBtI+U mynzF99qmbsZDHbleAuCPVbzEWmEi04e4vuu3pSOIXeGGUXszToJyww7PsWlKhLLXgte MQfk+wEccbP7IsoXrCCcI2zgfMV+Amsh6jR+tJApnSPMCK+UG/zWdMcRJ8qVUaIJZur8 18nA== 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=vbEir7EZEhxSrY4SpPwp8VXeBq+N2AkCIap6irW1FBk=; b=tSPV4xlz37dmG5FaPAeNO+EPLXNbgb3RWSuH+uDLWaw9na+jofu+kXlNLouf+PvOoz WrgcoBKgDc/P5oaegQm1zs6FUO9MheONI98TNkkhGrvRcpXssIljD3gQz0ddnSLcEz1U a44GFM+Sk56kx4K0PTVtS28/Pwd6n8mOwX86a9MsBfGAqjC7hpex0KSOOeueZ8oTLL+a BMnSOHpFgnWjze21pkBVcwg1LS3xaylpOofk6mlSmT9N2X+TMLax8hMi08Xe0xmNUTuH 6iBcsH3krqQe/eSyWBAFajUZ4qTId8a88jzEvInNvb2jhbS7NgX8bAJauVgmXFZeDfU2 Y+eg== X-Gm-Message-State: AElRT7FlzzpVzPVOVA2OP1SHCADphilhB8CaNsVQK8BkHFPOxh7IqsAi M3n+mA/hNh8pty/zrF5Rl1ZnMQ== X-Google-Smtp-Source: AIpwx4/sQ14ltIcvf2Stb04x0KNsyOoepHvRDfQvUhR7sZnWUV4V9Yo/q1q3dVJ6hXY4hPAp5cnBlQ== X-Received: by 10.223.153.49 with SMTP id x46mr28318551wrb.224.1523292477380; Mon, 09 Apr 2018 09:47:57 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-200.unity-media.net. [84.118.193.200]) by smtp.gmail.com with ESMTPSA id 11sm1380416wmd.1.2018.04.09.09.47.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Apr 2018 09:47:56 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Subject: [PATCH v2 02/19] [media] dvb-frontends/stv0910: fix CNR reporting in read_snr() Date: Mon, 9 Apr 2018 18:47:35 +0200 Message-Id: <20180409164752.641-3-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180409164752.641-1-d.scheller.oss@gmail.com> References: <20180409164752.641-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 CNR value determined in read_snr() is reported via the wrong variable. It uses FE_SCALE_DECIBEL, which implies the value to be reported in svalue instead of uvalue. Fix this accordingly. Picked up from the upstream dddvb-0.9.33 release. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index f5b5ce971c0c..1d96ae9f9f6e 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1326,7 +1326,7 @@ static int read_snr(struct dvb_frontend *fe) if (!get_signal_to_noise(state, &snrval)) { p->cnr.stat[0].scale = FE_SCALE_DECIBEL; - p->cnr.stat[0].uvalue = 100 * snrval; /* fix scale */ + p->cnr.stat[0].svalue = 100 * snrval; /* fix scale */ } else { p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; }