diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-05-05 11:15:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-18 13:23:14 -0400 |
commit | 4abe9f9d94e60303c30b1a9bbbc8e6532f6138cb (patch) | |
tree | c71ff23ff82c19edadddca9aed2b00b43bf6f18a /drivers/media/dvb/frontends/nxt200x.c | |
parent | 77d675047062d514acdc1bbe9f84658b39f99abe (diff) |
V4L/DVB (5633): Tuv1236d: move rf input switching code into dvb-pll
This patch removes duplicate code from cx88-dvb and saa7134-dvb that handles
rf input switching for the TUV1236d tuner.
The functionality is added to dvb-pll, where all the other code that
handles the TUV1236d is kept.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/frontends/nxt200x.c')
-rw-r--r-- | drivers/media/dvb/frontends/nxt200x.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index b809f83d9563..b96f8e846fd3 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c | |||
@@ -546,11 +546,6 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, | |||
546 | nxt200x_writebytes(state, 0x17, buf, 1); | 546 | nxt200x_writebytes(state, 0x17, buf, 1); |
547 | } | 547 | } |
548 | 548 | ||
549 | /* get tuning information */ | ||
550 | if (fe->ops.tuner_ops.calc_regs) { | ||
551 | fe->ops.tuner_ops.calc_regs(fe, p, buf, 5); | ||
552 | } | ||
553 | |||
554 | /* set additional params */ | 549 | /* set additional params */ |
555 | switch (p->u.vsb.modulation) { | 550 | switch (p->u.vsb.modulation) { |
556 | case QAM_64: | 551 | case QAM_64: |
@@ -559,27 +554,24 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, | |||
559 | /* This is just a guess since I am unable to test it */ | 554 | /* This is just a guess since I am unable to test it */ |
560 | if (state->config->set_ts_params) | 555 | if (state->config->set_ts_params) |
561 | state->config->set_ts_params(fe, 1); | 556 | state->config->set_ts_params(fe, 1); |
562 | |||
563 | /* set input */ | ||
564 | if (state->config->set_pll_input) | ||
565 | state->config->set_pll_input(buf+1, 1); | ||
566 | break; | 557 | break; |
567 | case VSB_8: | 558 | case VSB_8: |
568 | /* Set non-punctured clock for VSB */ | 559 | /* Set non-punctured clock for VSB */ |
569 | if (state->config->set_ts_params) | 560 | if (state->config->set_ts_params) |
570 | state->config->set_ts_params(fe, 0); | 561 | state->config->set_ts_params(fe, 0); |
571 | |||
572 | /* set input */ | ||
573 | if (state->config->set_pll_input) | ||
574 | state->config->set_pll_input(buf+1, 0); | ||
575 | break; | 562 | break; |
576 | default: | 563 | default: |
577 | return -EINVAL; | 564 | return -EINVAL; |
578 | break; | 565 | break; |
579 | } | 566 | } |
580 | 567 | ||
581 | /* write frequency information */ | 568 | if (fe->ops.tuner_ops.calc_regs) { |
582 | nxt200x_writetuner(state, buf); | 569 | /* get tuning information */ |
570 | fe->ops.tuner_ops.calc_regs(fe, p, buf, 5); | ||
571 | |||
572 | /* write frequency information */ | ||
573 | nxt200x_writetuner(state, buf); | ||
574 | } | ||
583 | 575 | ||
584 | /* reset the agc now that tuning has been completed */ | 576 | /* reset the agc now that tuning has been completed */ |
585 | nxt200x_agc_reset(state); | 577 | nxt200x_agc_reset(state); |