From patchwork Sun Oct 15 20:51:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10007269 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 26DA460216 for ; Sun, 15 Oct 2017 20:52:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1878E252D5 for ; Sun, 15 Oct 2017 20:52:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D52A256E6; Sun, 15 Oct 2017 20:52:13 +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 B96B6252D5 for ; Sun, 15 Oct 2017 20:52:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbdJOUwJ (ORCPT ); Sun, 15 Oct 2017 16:52:09 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37304 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbdJOUwH (ORCPT ); Sun, 15 Oct 2017 16:52:07 -0400 Received: by mail-wm0-f67.google.com with SMTP id r68so6159673wmr.4 for ; Sun, 15 Oct 2017 13:52:06 -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=n3eqEo0EexgIUiTyQ069ygRKrF8sfZg2YxOYn77bpHc=; b=shQtL67IG6WMb4YzYAzY4VEW5uMswVU3UU2tcFxeVcQE6tSgPELrrCzOmZ7zJTyZu8 xFUdCgxh9ZAVOc92Q1V5f3ur8WRRmu9osIkTT4R16t/vdfJDCkYitRmUOjI6nbVgDb/7 MSf7Ds7EaWctXXWUhUvf4VAZJ2uXy3LEt9qUepcW3Ot7z33CwT0tLy3oBwte/sKdUrts 2PaqVasKu4mMrw4QxK01U9aF0SzX9TOfnOGMlwol87FaI6joErAOxgAk2V2zsiySMubb EjAIACd4VdFWGj4mS512wFLRAfoJMXh529c8lkD2AKQnwrxTbw3piWg61qvYIbIDCAza qpag== 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=n3eqEo0EexgIUiTyQ069ygRKrF8sfZg2YxOYn77bpHc=; b=tqL4eixW1NBrA9odtFReO2zufVKxNou9FS7MoITWlSAK3RSZZm1zu2Rb2dnrN53++t Nvw6I6kS1HRvtSMG/2NryhMp1+JMA/hkMzq81SksplekBghiB5TseSX/Zttete9/UMnw b3UA6JwlVj9vwfbPBUogesveU6T2WDjE9MjwGs16fNB8vTZ6kEV6G8tFG27K86abfqzI gw99DuWdH10U58G4wl4HNFh2TQdo1vUGtWqdJRsVkFBZ7hxpCwq4u7lHQ68BIC0g3+6I 95kGsDognjoEUBePsH+fzkPPEZbrJIhSV2hi/LxvWH4ne5j6DiCjKK1WsfvEpcw4Yspo qBpw== X-Gm-Message-State: AMCzsaU1q4qksoQW+JQljAwh3dgNgb5rwQrsRsl9UKhaamc8XQAOdBKg AP3EbmQsfydulhnJxLjzW35BxQ== X-Google-Smtp-Source: AOwi7QBsXNZb8p33orLR/clRK/h2hqPLsBhE3pgJXBEKFlXPkqbGGSQkuHMUGlbaJ5bUl77zykDqrA== X-Received: by 10.223.170.154 with SMTP id h26mr6218214wrc.87.1508100725710; Sun, 15 Oct 2017 13:52:05 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-201-239-211.hsi13.unitymediagroup.de. [37.201.239.211]) by smtp.gmail.com with ESMTPSA id d18sm4609498wra.50.2017.10.15.13.52.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Oct 2017 13:52:05 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: jasmin@anw.at, rjkm@metzlerbros.de Subject: [PATCH 7/8] [media] stv0910: read and update mod_cod in read_status() Date: Sun, 15 Oct 2017 22:51:56 +0200 Message-Id: <20171015205157.14342-8-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171015205157.14342-1-d.scheller.oss@gmail.com> References: <20171015205157.14342-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 Add missing state->modcod update from upstream driver which needs to be done when manage_matype_info() sets is_vcm on certain S2 transponders. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index 8bf855c301f5..73f6df0abbfe 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1498,6 +1498,19 @@ static int read_status(struct dvb_frontend *fe, enum fe_status *status) enable_puncture_rate(state, state->puncture_rate); } + + /* Use highest signaled ModCod for quality */ + if (state->is_vcm) { + u8 tmp; + enum fe_stv0910_mod_cod mod_cod; + + read_reg(state, RSTV0910_P2_DMDMODCOD + state->regoff, + &tmp); + mod_cod = (enum fe_stv0910_mod_cod)((tmp & 0x7c) >> 2); + + if (mod_cod > state->mod_cod) + state->mod_cod = mod_cod; + } } /* read signal statistics */