diff options
author | Andrew de Quincy <devnull@localhost> | 2005-09-04 15:23:44 +0000 |
---|---|---|
committer | Andrew de Quincy <devnull@localhost> | 2005-09-04 15:23:44 +0000 |
commit | e58a9c04d9ddc890dd5ba79be764dfb20dc83f7d (patch) | |
tree | 2ff614d21b01bfd238821101db5d9c1dca027357 /linux/drivers | |
parent | 6b68749fb9ab4db1bcd3f98ca2c665dc058a514a (diff) | |
download | mediapointer-dvb-s2-e58a9c04d9ddc890dd5ba79be764dfb20dc83f7d.tar.gz mediapointer-dvb-s2-e58a9c04d9ddc890dd5ba79be764dfb20dc83f7d.tar.bz2 |
Remove my badly thought out patch. This does need done, but in a proper way.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0299.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c index 2d62931f2..db66d417d 100644 --- a/linux/drivers/media/dvb/frontends/stv0299.c +++ b/linux/drivers/media/dvb/frontends/stv0299.c @@ -63,8 +63,12 @@ struct stv0299_state { u32 tuner_frequency; u32 symbol_rate; fe_code_rate_t fec_inner; + int errmode; }; +#define STATUS_BER 0 +#define STATUS_UCBLOCKS 1 + static int debug; static int debug_legacy_dish_switch; #define dprintk(args...) \ @@ -516,8 +520,7 @@ static int stv0299_read_ber(struct dvb_frontend* fe, u32* ber) { struct stv0299_state* state = fe->demodulator_priv; - stv0299_writeregI(state, 0x34, (stv0299_readreg(state, 0x34) & 0xcf) | 0x10); - msleep(100); + if (state->errmode != STATUS_BER) return 0; *ber = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); return 0; @@ -556,9 +559,8 @@ static int stv0299_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) { struct stv0299_state* state = fe->demodulator_priv; - stv0299_writeregI(state, 0x34, (stv0299_readreg(state, 0x34) & 0xcf) | 0x30); - msleep(100); - *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); + if (state->errmode != STATUS_UCBLOCKS) *ucblocks = 0; + else *ucblocks = (stv0299_readreg (state, 0x1d) << 8) | stv0299_readreg (state, 0x1e); return 0; } @@ -707,6 +709,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config, state->tuner_frequency = 0; state->symbol_rate = 0; state->fec_inner = 0; + state->errmode = STATUS_BER; /* check if the demod is there */ stv0299_writeregI(state, 0x02, 0x34); /* standby off */ |