summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends
diff options
context:
space:
mode:
authorDaniel Scheller2017-03-29 18:43:06 +0200
committerMauro Carvalho Chehab2017-06-20 14:22:39 +0200
commit7718dcf06ed17b18e8a4c6d78f10235eac02414b (patch)
treef1aaff35c0adbf273642f0d4a96023980295b0da /drivers/media/dvb-frontends
parent[media] dvb-frontends/stv0367: make PLLSETUP a function, add 58MHz IC speed (diff)
downloadkernel-qcow2-linux-7718dcf06ed17b18e8a4c6d78f10235eac02414b.tar.gz
kernel-qcow2-linux-7718dcf06ed17b18e8a4c6d78f10235eac02414b.tar.xz
kernel-qcow2-linux-7718dcf06ed17b18e8a4c6d78f10235eac02414b.zip
[media] dvb-frontends/stv0367: make full reinit on set_frontend() optional
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r--drivers/media/dvb-frontends/stv0367.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index da10d9abbc91..9370afabf4ad 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);