Skip to content

Commit

Permalink
[PATCH] dvb: Remove broken stv0299 enhanced tuning code
Browse files Browse the repository at this point in the history
Remove broken stv0299 enhanced tuning code

Signed-off-by: Michael Krufky <[email protected]>
Cc: Johannes Stezenbach <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andrew de Quincy authored and Linus Torvalds committed Nov 9, 2005
1 parent 83b75b0 commit 3528cc4
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 57 deletions.
1 change: 0 additions & 1 deletion drivers/media/dvb/b2c2/flexcop-fe-tuner.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ static struct stv0299_config samsung_tbmu24112_config = {
.inittab = samsung_tbmu24112_inittab,
.mclk = 88000000UL,
.invert = 0,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_LK,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down
53 changes: 10 additions & 43 deletions drivers/media/dvb/frontends/stv0299.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,49 +553,16 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
if (state->config->invert) invval = (~invval) & 1;
stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval);

if (state->config->enhanced_tuning) {
/* check if we should do a finetune */
int frequency_delta = p->frequency - state->tuner_frequency;
int minmax = p->u.qpsk.symbol_rate / 2000;
if (minmax < 5000) minmax = 5000;

if ((frequency_delta > -minmax) && (frequency_delta < minmax) && (frequency_delta != 0) &&
(state->fec_inner == p->u.qpsk.fec_inner) &&
(state->symbol_rate == p->u.qpsk.symbol_rate)) {
int Drot_freq = (frequency_delta << 16) / (state->config->mclk / 1000);

// zap the derotator registers first
stv0299_writeregI(state, 0x22, 0x00);
stv0299_writeregI(state, 0x23, 0x00);

// now set them as we want
stv0299_writeregI(state, 0x22, Drot_freq >> 8);
stv0299_writeregI(state, 0x23, Drot_freq);
} else {
/* A "normal" tune is requested */
stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */
state->config->pll_set(fe, state->i2c, p);
stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */

stv0299_writeregI(state, 0x32, 0x80);
stv0299_writeregI(state, 0x22, 0x00);
stv0299_writeregI(state, 0x23, 0x00);
stv0299_writeregI(state, 0x32, 0x19);
stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate);
stv0299_set_FEC (state, p->u.qpsk.fec_inner);
}
} else {
stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */
state->config->pll_set(fe, state->i2c, p);
stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */

stv0299_set_FEC (state, p->u.qpsk.fec_inner);
stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate);
stv0299_writeregI(state, 0x22, 0x00);
stv0299_writeregI(state, 0x23, 0x00);
stv0299_readreg (state, 0x23);
stv0299_writeregI(state, 0x12, 0xb9);
}
stv0299_writeregI(state, 0x05, 0xb5); /* enable i2c repeater on stv0299 */
state->config->pll_set(fe, state->i2c, p);
stv0299_writeregI(state, 0x05, 0x35); /* disable i2c repeater on stv0299 */

stv0299_set_FEC (state, p->u.qpsk.fec_inner);
stv0299_set_symbolrate (fe, p->u.qpsk.symbol_rate);
stv0299_writeregI(state, 0x22, 0x00);
stv0299_writeregI(state, 0x23, 0x00);
stv0299_readreg (state, 0x23);
stv0299_writeregI(state, 0x12, 0xb9);

state->tuner_frequency = p->frequency;
state->fec_inner = p->u.qpsk.fec_inner;
Expand Down
3 changes: 0 additions & 3 deletions drivers/media/dvb/frontends/stv0299.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ struct stv0299_config
/* does the inversion require inversion? */
u8 invert:1;

/* Should the enhanced tuning code be used? */
u8 enhanced_tuning:1;

/* Skip reinitialisation? */
u8 skip_reinit:1;

Expand Down
2 changes: 0 additions & 2 deletions drivers/media/dvb/ttpci/av7110.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,6 @@ static struct stv0299_config alps_bsru6_config = {
.inittab = alps_bsru6_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down Expand Up @@ -1721,7 +1720,6 @@ static struct stv0299_config alps_bsbe1_config = {
.inittab = alps_bsbe1_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.min_delay_ms = 100,
.set_symbol_rate = alps_bsru6_set_symbol_rate,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/dvb/ttpci/budget-av.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ static struct stv0299_config typhoon_config = {
.inittab = typhoon_cinergy1200s_inittab,
.mclk = 88000000UL,
.invert = 0,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP0,
Expand All @@ -546,7 +545,6 @@ static struct stv0299_config cinergy_1200s_config = {
.inittab = typhoon_cinergy1200s_inittab,
.mclk = 88000000UL,
.invert = 0,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_0,
.volt13_op0_op1 = STV0299_VOLT13_OP0,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/dvb/ttpci/budget-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ static struct stv0299_config alps_bsru6_config = {
.inittab = alps_bsru6_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down Expand Up @@ -710,7 +709,6 @@ static struct stv0299_config philips_su1278_tt_config = {
.inittab = philips_su1278_tt_inittab,
.mclk = 64000000UL,
.invert = 0,
.enhanced_tuning = 1,
.skip_reinit = 1,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down
1 change: 0 additions & 1 deletion drivers/media/dvb/ttpci/budget-patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ static struct stv0299_config alps_bsru6_config = {
.inittab = alps_bsru6_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down
2 changes: 0 additions & 2 deletions drivers/media/dvb/ttpci/budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ static struct stv0299_config alps_bsru6_config = {
.inittab = alps_bsru6_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down Expand Up @@ -436,7 +435,6 @@ static struct stv0299_config alps_bsbe1_config = {
.inittab = alps_bsbe1_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.min_delay_ms = 100,
.set_symbol_rate = alps_bsru6_set_symbol_rate,
Expand Down
1 change: 0 additions & 1 deletion drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,6 @@ static struct stv0299_config alps_stv0299_config = {
.inittab = alps_bsru6_inittab,
.mclk = 88000000UL,
.invert = 1,
.enhanced_tuning = 0,
.skip_reinit = 0,
.lock_output = STV0229_LOCKOUTPUT_1,
.volt13_op0_op1 = STV0299_VOLT13_OP1,
Expand Down

0 comments on commit 3528cc4

Please sign in to comment.