diff options
author | Andrew de Quincy <quincy@linuxtv.org> | 2005-11-09 00:35:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:03 -0500 |
commit | 3528cc4e731b098b5743f8f91516e2e6c01dd1ce (patch) | |
tree | ced5870f7d36e55e21b3813f7008ff5c10cba4ba /drivers/media/dvb/frontends/stv0299.c | |
parent | 83b75b049be981e579ba2cb88aa9bf3534bbbdb1 (diff) |
[PATCH] dvb: Remove broken stv0299 enhanced tuning code
Remove broken stv0299 enhanced tuning code
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/stv0299.c')
-rw-r--r-- | drivers/media/dvb/frontends/stv0299.c | 53 |
1 files changed, 10 insertions, 43 deletions
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c index ae00d7a40d7c..35dc8439be1b 100644 --- a/drivers/media/dvb/frontends/stv0299.c +++ b/drivers/media/dvb/frontends/stv0299.c | |||
@@ -553,49 +553,16 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
553 | if (state->config->invert) invval = (~invval) & 1; | 553 | if (state->config->invert) invval = (~invval) & 1; |
554 | stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval); | 554 | stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval); |
555 | 555 | ||
556 | if (state->config->enhanced_tuning) { | 556 | stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ |
557 | /* check if we should do a finetune */ | 557 | state->config->pll_set(fe, state->i2c, p); |
558 | int frequency_delta = p->frequency - state->tuner_frequency; | 558 | stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */ |
559 | int minmax = p->u.qpsk.symbol_rate / 2000; | 559 | |
560 | if (minmax < 5000) minmax = 5000; | 560 | stv0299_set_FEC (state, p->u.qpsk.fec_inner); |
561 | 561 | stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate); | |
562 | if ((frequency_delta > -minmax) && (frequency_delta < minmax) && (frequency_delta != 0) && | 562 | stv0299_writeregI(state, 0x22, 0x00); |
563 | (state->fec_inner == p->u.qpsk.fec_inner) && | 563 | stv0299_writeregI(state, 0x23, 0x00); |
564 | (state->symbol_rate == p->u.qpsk.symbol_rate)) { | 564 | stv0299_readreg (state, 0x23); |
565 | int Drot_freq = (frequency_delta << 16) / (state->config->mclk / 1000); | 565 | stv0299_writeregI(state, 0x12, 0xb9); |
566 | |||
567 | // zap the derotator registers first | ||
568 | stv0299_writeregI(state, 0x22, 0x00); | ||
569 | stv0299_writeregI(state, 0x23, 0x00); | ||
570 | |||
571 | // now set them as we want | ||
572 | stv0299_writeregI(state, 0x22, Drot_freq >> 8); | ||
573 | stv0299_writeregI(state, 0x23, Drot_freq); | ||
574 | } else { | ||
575 | /* A "normal" tune is requested */ | ||
576 | stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ | ||
577 | state->config->pll_set(fe, state->i2c, p); | ||
578 | stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */ | ||
579 | |||
580 | stv0299_writeregI(state, 0x32, 0x80); | ||
581 | stv0299_writeregI(state, 0x22, 0x00); | ||
582 | stv0299_writeregI(state, 0x23, 0x00); | ||
583 | stv0299_writeregI(state, 0x32, 0x19); | ||
584 | stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate); | ||
585 | stv0299_set_FEC (state, p->u.qpsk.fec_inner); | ||
586 | } | ||
587 | } else { | ||
588 | stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */ | ||
589 | state->config->pll_set(fe, state->i2c, p); | ||
590 | stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */ | ||
591 | |||
592 | stv0299_set_FEC (state, p->u.qpsk.fec_inner); | ||
593 | stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate); | ||
594 | stv0299_writeregI(state, 0x22, 0x00); | ||
595 | stv0299_writeregI(state, 0x23, 0x00); | ||
596 | stv0299_readreg (state, 0x23); | ||
597 | stv0299_writeregI(state, 0x12, 0xb9); | ||
598 | } | ||
599 | 566 | ||
600 | state->tuner_frequency = p->frequency; | 567 | state->tuner_frequency = p->frequency; |
601 | state->fec_inner = p->u.qpsk.fec_inner; | 568 | state->fec_inner = p->u.qpsk.fec_inner; |