From: Daniel Scheller <d.scheller.oss@gmail.com>
To: linux-media@vger.kernel.org, mchehab@kernel.org
Cc: liplianin@netup.ru, rjkm@metzlerbros.de, crope@iki.fi
Subject: [PATCH v3 06/13] [media] dvb-frontends/stv0367: make full reinit on set_frontend() optional
Date: Wed, 29 Mar 2017 18:43:06 +0200 [thread overview]
Message-ID: <20170329164313.14636-7-d.scheller.oss@gmail.com> (raw)
In-Reply-To: <20170329164313.14636-1-d.scheller.oss@gmail.com>
From: Daniel Scheller <d.scheller@gmx.net>
Every time dvb_frontend_ops.set_frontend() is called, an almost full reinit
of the demodulator will be performed. While this might cause a slight delay
when switching channels due to all involved tables being rewritten, it can
even be dangerous in certain causes in that the demod may lock up and
requires to be powercycled (this can happen on Digital Devices hardware).
So this adds a flag if it should be done, and to not change behaviour with
existing card support, it'll be enabled in all cases.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/dvb-frontends/stv0367.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index da10d9a..9370afa 100644
--- a/drivers/media/dvb-frontends/stv0367.c
+++ b/drivers/media/dvb-frontends/stv0367.c
@@ -93,6 +93,7 @@ struct stv0367_state {
/* flags for operation control */
u8 use_i2c_gatectrl;
u8 deftabs;
+ u8 reinit_on_setfrontend;
};
#define RF_LOOKUP_TABLE_SIZE 31
@@ -1217,7 +1218,8 @@ static int stv0367ter_set_frontend(struct dvb_frontend *fe)
s8 num_trials, index;
u8 SenseTrials[] = { INVERSION_ON, INVERSION_OFF };
- stv0367ter_init(fe);
+ if (state->reinit_on_setfrontend)
+ stv0367ter_init(fe);
if (fe->ops.tuner_ops.set_params) {
if (state->use_i2c_gatectrl && fe->ops.i2c_gate_ctrl)
@@ -1717,6 +1719,7 @@ struct dvb_frontend *stv0367ter_attach(const struct stv0367_config *config,
/* demod operation options */
state->use_i2c_gatectrl = 1;
state->deftabs = STV0367_DEFTAB_GENERIC;
+ state->reinit_on_setfrontend = 1;
dprintk("%s: chip_id = 0x%x\n", __func__, state->chip_id);
@@ -2511,7 +2514,8 @@ static int stv0367cab_set_frontend(struct dvb_frontend *fe)
break;
}
- stv0367cab_init(fe);
+ if (state->reinit_on_setfrontend)
+ stv0367cab_init(fe);
/* Tuner Frequency Setting */
if (fe->ops.tuner_ops.set_params) {
@@ -2835,6 +2839,7 @@ struct dvb_frontend *stv0367cab_attach(const struct stv0367_config *config,
/* demod operation options */
state->use_i2c_gatectrl = 1;
state->deftabs = STV0367_DEFTAB_GENERIC;
+ state->reinit_on_setfrontend = 1;
dprintk("%s: chip_id = 0x%x\n", __func__, state->chip_id);
--
2.10.2
next prev parent reply other threads:[~2017-03-29 16:43 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 16:43 [PATCH v3 00/13] stv0367/ddbridge: support CTv6/FlexCT hardware Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 01/13] [media] dvb-frontends/stv0367: add flag to make i2c_gatectrl optional Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 02/13] [media] dvb-frontends/stv0367: print CPAMP status only if stv_debug is enabled Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 03/13] [media] dvb-frontends/stv0367: refactor defaults table handling Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 04/13] [media] dvb-frontends/stv0367: move out tables, support multiple tab variants Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 05/13] [media] dvb-frontends/stv0367: make PLLSETUP a function, add 58MHz IC speed Daniel Scheller
2017-03-29 16:43 ` Daniel Scheller [this message]
2017-03-29 16:43 ` [PATCH v3 07/13] [media] dvb-frontends/stv0367: support reading if_khz from tuner config Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 08/13] [media] dvb-frontends/stv0367: selectable QAM FEC Lock status register Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 09/13] [media] dvb-frontends/stv0367: fix symbol rate conditions in cab_SetQamSize() Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 10/13] [media] dvb-frontends/stv0367: add defaults for use w/DD-branded devices Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 11/13] [media] dvb-frontends/stv0367: add Digital Devices compatibility Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 12/13] [media] ddbridge: add i2c_read_regs() Daniel Scheller
2017-03-29 16:43 ` [PATCH v3 13/13] [media] ddbridge: support STV0367-based cards and modules Daniel Scheller
2017-04-12 19:23 ` [PATCH v3 00/13] stv0367/ddbridge: support CTv6/FlexCT hardware Daniel Scheller
2017-05-07 15:42 ` Daniel Scheller
2017-05-28 21:45 ` Daniel Scheller
2017-06-19 20:18 ` Daniel Scheller
2017-06-19 22:14 ` Jasmin J.
2017-06-20 6:13 ` Thomas Kaiser
2017-06-20 12:36 ` Mauro Carvalho Chehab
2017-06-20 18:41 ` DD support improvements (was: Re: [PATCH v3 00/13] stv0367/ddbridge: support CTv6/FlexCT hardware) Daniel Scheller
2017-06-20 19:10 ` Mauro Carvalho Chehab
2017-06-21 20:57 ` Daniel Scheller
2017-06-22 21:35 ` Ralph Metzler
2017-06-24 16:50 ` Mauro Carvalho Chehab
2017-06-25 17:52 ` Daniel Scheller
2017-06-26 9:19 ` Mauro Carvalho Chehab
2017-06-26 9:59 ` Ralph Metzler
2017-06-26 10:14 ` Mauro Carvalho Chehab
2017-06-26 15:22 ` Daniel Scheller
2017-06-27 5:38 ` Ralph Metzler
2017-07-20 15:19 ` Mauro Carvalho Chehab
2017-06-26 15:43 ` Daniel Scheller
2017-06-26 9:45 ` Ralph Metzler
2017-06-26 10:46 ` Mauro Carvalho Chehab
2017-07-11 18:12 ` Ralph Metzler
2017-07-20 15:36 ` Mauro Carvalho Chehab
2017-06-26 18:41 ` Daniel Scheller
2017-06-20 20:54 ` [PATCH v3 00/13] stv0367/ddbridge: support CTv6/FlexCT hardware Jasmin J.
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=20170329164313.14636-7-d.scheller.oss@gmail.com \
--to=d.scheller.oss@gmail.com \
--cc=crope@iki.fi \
--cc=linux-media@vger.kernel.org \
--cc=liplianin@netup.ru \
--cc=mchehab@kernel.org \
--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).