linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Scheller <d.scheller.oss@gmail.com>
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	[thread overview]
Message-ID: <20171015205157.14342-8-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20171015205157.14342-1-d.scheller.oss@gmail.com>

From: Daniel Scheller <d.scheller@gmx.net>

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 <d.scheller@gmx.net>
---
 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 */
-- 
2.13.6

  parent reply	other threads:[~2017-10-15 20:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-15 20:51 [PATCH for 4.15] ddbridge update to 0.9.32 Daniel Scheller
2017-10-15 20:51 ` [PATCH 1/8] [media] ddbridge: remove unneeded *fe vars from attach functions Daniel Scheller
2017-10-15 20:51 ` [PATCH 2/8] [media] ddbridge: fixup checkpatch-strict issues Daniel Scheller
2017-10-15 20:51 ` [PATCH 3/8] [media] ddbridge: split off CI (common interface) from ddbridge-core Daniel Scheller
2017-10-15 20:51 ` [PATCH 4/8] [media] ddbridge/ci: change debug printing to debug severity Daniel Scheller
2017-10-15 20:51 ` [PATCH 5/8] [media] ddbridge/max: rename ddbridge-maxs8.[c|h] to ddbridge-max.[c|h] Daniel Scheller
2017-10-15 20:51 ` [PATCH 6/8] [media] ddbridge/max: prefix lnb_init_fmode() and fe_attach_mxl5xx() Daniel Scheller
2017-10-15 20:51 ` Daniel Scheller [this message]
2017-10-15 20:51 ` [PATCH 8/8] [media] ddbridge: update driver version number Daniel Scheller
2017-12-06 18:06 ` [PATCH for 4.15] ddbridge update to 0.9.32 Daniel Scheller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171015205157.14342-8-d.scheller.oss@gmail.com \
    --to=d.scheller.oss@gmail.com \
    --cc=jasmin@anw.at \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=rjkm@metzlerbros.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).