aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/nxt200x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/nxt200x.c')
-rw-r--r--drivers/media/dvb/frontends/nxt200x.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c
index b809f83d9563..ddc84899cf86 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -49,7 +49,6 @@
49#include <linux/string.h> 49#include <linux/string.h>
50 50
51#include "dvb_frontend.h" 51#include "dvb_frontend.h"
52#include "dvb-pll.h"
53#include "nxt200x.h" 52#include "nxt200x.h"
54 53
55struct nxt200x_state { 54struct nxt200x_state {
@@ -546,11 +545,6 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
546 nxt200x_writebytes(state, 0x17, buf, 1); 545 nxt200x_writebytes(state, 0x17, buf, 1);
547 } 546 }
548 547
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 */ 548 /* set additional params */
555 switch (p->u.vsb.modulation) { 549 switch (p->u.vsb.modulation) {
556 case QAM_64: 550 case QAM_64:
@@ -559,27 +553,24 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
559 /* This is just a guess since I am unable to test it */ 553 /* This is just a guess since I am unable to test it */
560 if (state->config->set_ts_params) 554 if (state->config->set_ts_params)
561 state->config->set_ts_params(fe, 1); 555 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; 556 break;
567 case VSB_8: 557 case VSB_8:
568 /* Set non-punctured clock for VSB */ 558 /* Set non-punctured clock for VSB */
569 if (state->config->set_ts_params) 559 if (state->config->set_ts_params)
570 state->config->set_ts_params(fe, 0); 560 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; 561 break;
576 default: 562 default:
577 return -EINVAL; 563 return -EINVAL;
578 break; 564 break;
579 } 565 }
580 566
581 /* write frequency information */ 567 if (fe->ops.tuner_ops.calc_regs) {
582 nxt200x_writetuner(state, buf); 568 /* get tuning information */
569 fe->ops.tuner_ops.calc_regs(fe, p, buf, 5);
570
571 /* write frequency information */
572 nxt200x_writetuner(state, buf);
573 }
583 574
584 /* reset the agc now that tuning has been completed */ 575 /* reset the agc now that tuning has been completed */
585 nxt200x_agc_reset(state); 576 nxt200x_agc_reset(state);