diff options
Diffstat (limited to 'drivers/media/dvb/frontends/nxt6000.c')
-rw-r--r-- | drivers/media/dvb/frontends/nxt6000.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/nxt6000.c b/drivers/media/dvb/frontends/nxt6000.c index 6599b8fea9e9..90ae6c72c0e3 100644 --- a/drivers/media/dvb/frontends/nxt6000.c +++ b/drivers/media/dvb/frontends/nxt6000.c | |||
@@ -81,22 +81,21 @@ static void nxt6000_reset(struct nxt6000_state* state) | |||
81 | nxt6000_writereg(state, OFDM_COR_CTL, val | COREACT); | 81 | nxt6000_writereg(state, OFDM_COR_CTL, val | COREACT); |
82 | } | 82 | } |
83 | 83 | ||
84 | static int nxt6000_set_bandwidth(struct nxt6000_state* state, fe_bandwidth_t bandwidth) | 84 | static int nxt6000_set_bandwidth(struct nxt6000_state *state, u32 bandwidth) |
85 | { | 85 | { |
86 | u16 nominal_rate; | 86 | u16 nominal_rate; |
87 | int result; | 87 | int result; |
88 | 88 | ||
89 | switch (bandwidth) { | 89 | switch (bandwidth) { |
90 | 90 | case 6000000: | |
91 | case BANDWIDTH_6_MHZ: | ||
92 | nominal_rate = 0x55B7; | 91 | nominal_rate = 0x55B7; |
93 | break; | 92 | break; |
94 | 93 | ||
95 | case BANDWIDTH_7_MHZ: | 94 | case 7000000: |
96 | nominal_rate = 0x6400; | 95 | nominal_rate = 0x6400; |
97 | break; | 96 | break; |
98 | 97 | ||
99 | case BANDWIDTH_8_MHZ: | 98 | case 8000000: |
100 | nominal_rate = 0x7249; | 99 | nominal_rate = 0x7249; |
101 | break; | 100 | break; |
102 | 101 | ||
@@ -457,23 +456,31 @@ static int nxt6000_init(struct dvb_frontend* fe) | |||
457 | return 0; | 456 | return 0; |
458 | } | 457 | } |
459 | 458 | ||
460 | static int nxt6000_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *param) | 459 | static int nxt6000_set_frontend(struct dvb_frontend *fe) |
461 | { | 460 | { |
461 | struct dtv_frontend_properties *p = &fe->dtv_property_cache; | ||
462 | struct nxt6000_state* state = fe->demodulator_priv; | 462 | struct nxt6000_state* state = fe->demodulator_priv; |
463 | int result; | 463 | int result; |
464 | 464 | ||
465 | if (fe->ops.tuner_ops.set_params) { | 465 | if (fe->ops.tuner_ops.set_params) { |
466 | fe->ops.tuner_ops.set_params(fe, param); | 466 | fe->ops.tuner_ops.set_params(fe); |
467 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); | 467 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); |
468 | } | 468 | } |
469 | 469 | ||
470 | if ((result = nxt6000_set_bandwidth(state, param->u.ofdm.bandwidth)) < 0) | 470 | result = nxt6000_set_bandwidth(state, p->bandwidth_hz); |
471 | if (result < 0) | ||
471 | return result; | 472 | return result; |
472 | if ((result = nxt6000_set_guard_interval(state, param->u.ofdm.guard_interval)) < 0) | 473 | |
474 | result = nxt6000_set_guard_interval(state, p->guard_interval); | ||
475 | if (result < 0) | ||
473 | return result; | 476 | return result; |
474 | if ((result = nxt6000_set_transmission_mode(state, param->u.ofdm.transmission_mode)) < 0) | 477 | |
478 | result = nxt6000_set_transmission_mode(state, p->transmission_mode); | ||
479 | if (result < 0) | ||
475 | return result; | 480 | return result; |
476 | if ((result = nxt6000_set_inversion(state, param->inversion)) < 0) | 481 | |
482 | result = nxt6000_set_inversion(state, p->inversion); | ||
483 | if (result < 0) | ||
477 | return result; | 484 | return result; |
478 | 485 | ||
479 | msleep(500); | 486 | msleep(500); |
@@ -566,10 +573,9 @@ error: | |||
566 | } | 573 | } |
567 | 574 | ||
568 | static struct dvb_frontend_ops nxt6000_ops = { | 575 | static struct dvb_frontend_ops nxt6000_ops = { |
569 | 576 | .delsys = { SYS_DVBT }, | |
570 | .info = { | 577 | .info = { |
571 | .name = "NxtWave NXT6000 DVB-T", | 578 | .name = "NxtWave NXT6000 DVB-T", |
572 | .type = FE_OFDM, | ||
573 | .frequency_min = 0, | 579 | .frequency_min = 0, |
574 | .frequency_max = 863250000, | 580 | .frequency_max = 863250000, |
575 | .frequency_stepsize = 62500, | 581 | .frequency_stepsize = 62500, |