* [PATCH 1/9 v2] ds3000: fill in demod init function
@ 2011-02-01 22:40 Igor M. Liplianin
0 siblings, 0 replies; only message in thread
From: Igor M. Liplianin @ 2011-02-01 22:40 UTC (permalink / raw)
To: mchehab, linux-media
Make some initializations in init, not in tune function
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
---
drivers/media/dvb/frontends/ds3000.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 125dfad..4773916 100644
--- a/drivers/media/dvb/frontends/ds3000.c
+++ b/drivers/media/dvb/frontends/ds3000.c
@@ -1092,10 +1092,6 @@ static int ds3000_tune(struct dvb_frontend *fe,
/* Reset status register */
status = 0;
/* Tune */
- /* TS2020 init */
- ds3000_tuner_writereg(state, 0x42, 0x73);
- ds3000_tuner_writereg(state, 0x05, 0x01);
- ds3000_tuner_writereg(state, 0x62, 0xf5);
/* unknown */
ds3000_tuner_writereg(state, 0x07, 0x02);
ds3000_tuner_writereg(state, 0x10, 0x00);
@@ -1345,7 +1341,19 @@ static enum dvbfe_algo ds3000_get_algo(struct dvb_frontend *fe)
*/
static int ds3000_initfe(struct dvb_frontend *fe)
{
+ struct ds3000_state *state = fe->demodulator_priv;
+ int ret;
+
dprintk("%s()\n", __func__);
+ /* hard reset */
+ ds3000_writereg(state, 0x08, 0x01 | ds3000_readreg(state, 0x08));
+ msleep(1);
+
+ /* TS2020 init */
+ ds3000_tuner_writereg(state, 0x42, 0x73);
+ ds3000_tuner_writereg(state, 0x05, 0x01);
+ ds3000_tuner_writereg(state, 0x62, 0xf5);
+
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-01 22:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 22:40 [PATCH 1/9 v2] ds3000: fill in demod init function Igor M. Liplianin
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.