All of lore.kernel.org
 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: rascobie@slingshot.co.nz
Subject: [PATCH v2 4/5] media: dvb-frontends/stv0910: report S2 rolloff in get_frontend()
Date: Mon, 22 Jan 2018 18:13:45 +0100	[thread overview]
Message-ID: <20180122171346.822-5-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20180122171346.822-1-d.scheller.oss@gmail.com>

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

Report the currently used  S2 rolloff factor in get_frontend(). For
cosmetic reasons, also change all feroll_off occurences to fe_rolloff.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
 drivers/media/dvb-frontends/stv0910.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index de132a85e537..7ab014cec56c 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -113,7 +113,7 @@ struct stv {
 	enum fe_stv0910_mod_cod  mod_cod;
 	enum dvbs2_fectype       fectype;
 	u32                      pilots;
-	enum fe_stv0910_roll_off feroll_off;
+	enum fe_stv0910_roll_off fe_rolloff;
 
 	int   is_standard_broadcast;
 	int   is_vcm;
@@ -541,7 +541,7 @@ static int get_signal_parameters(struct stv *state)
 		}
 		state->is_vcm = 0;
 		state->is_standard_broadcast = 1;
-		state->feroll_off = FE_SAT_35;
+		state->fe_rolloff = FE_SAT_35;
 	}
 	return 0;
 }
@@ -1300,14 +1300,14 @@ static int manage_matype_info(struct stv *state)
 
 		read_regs(state, RSTV0910_P2_MATSTR1 + state->regoff,
 			  bbheader, 2);
-		state->feroll_off =
+		state->fe_rolloff =
 			(enum fe_stv0910_roll_off)(bbheader[0] & 0x03);
 		state->is_vcm = (bbheader[0] & 0x10) == 0;
 		state->is_standard_broadcast = (bbheader[0] & 0xFC) == 0xF0;
 	} else if (state->receive_mode == RCVMODE_DVBS) {
 		state->is_vcm = 0;
 		state->is_standard_broadcast = 1;
-		state->feroll_off = FE_SAT_35;
+		state->fe_rolloff = FE_SAT_35;
 	}
 	return 0;
 }
@@ -1571,11 +1571,15 @@ static int get_frontend(struct dvb_frontend *fe,
 			FEC_3_4, FEC_4_5, FEC_5_6, FEC_8_9,
 			FEC_9_10
 		};
+		const enum fe_rolloff ro2ro[4] = {
+			ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_15,
+		};
 		read_reg(state, RSTV0910_P2_DMDMODCOD + state->regoff, &tmp);
 		mc = ((tmp & 0x7c) >> 2);
 		p->pilot = (tmp & 0x01) ? PILOT_ON : PILOT_OFF;
 		p->modulation = modcod2mod[mc];
 		p->fec_inner = modcod2fec[mc];
+		p->rolloff = ro2ro[state->fe_rolloff];
 	} else if (state->receive_mode == RCVMODE_DVBS) {
 		read_reg(state, RSTV0910_P2_VITCURPUN + state->regoff, &tmp);
 		switch (tmp & 0x1F) {
-- 
2.13.6

  parent reply	other threads:[~2018-01-22 17:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations " Daniel Scheller
2018-03-06 13:17   ` Mauro Carvalho Chehab
2018-01-22 17:13 ` [PATCH v2 2/5] media: dvb_frontend: add DVB-S2X rolloff factors Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 3/5] media: dvb-frontends/stv0910: report FEC 1/4 and 1/3 in get_frontend() Daniel Scheller
2018-01-22 17:13 ` Daniel Scheller [this message]
2018-01-22 17:13 ` [PATCH v2 5/5] media: dvb-frontends/stv0910: report active delsys " 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=20180122171346.822-5-d.scheller.oss@gmail.com \
    --to=d.scheller.oss@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=rascobie@slingshot.co.nz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.