diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-26 13:07:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-31 06:48:47 -0500 |
commit | 042e5eb79f3c9eba2ad382f079834af20cbecc17 (patch) | |
tree | 1f973886cef2eeadd1b819ac9e26ab1a56070cbc /drivers | |
parent | 102a820d36c94b489a40549f9c4cf0dc84a09ec9 (diff) |
[media] tda8083: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were
designed for a subset of the supported standards, use the DVBv5
cache information.
Also, fill the supported delivery systems at dvb_frontend_ops
struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/frontends/tda8083.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c index 7ff2946f39b2..0f9841c07c3f 100644 --- a/drivers/media/dvb/frontends/tda8083.c +++ b/drivers/media/dvb/frontends/tda8083.c | |||
@@ -315,8 +315,9 @@ static int tda8083_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) | |||
315 | return 0; | 315 | return 0; |
316 | } | 316 | } |
317 | 317 | ||
318 | static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 318 | static int tda8083_set_frontend(struct dvb_frontend *fe) |
319 | { | 319 | { |
320 | struct dtv_frontend_properties *p = &fe->dtv_property_cache; | ||
320 | struct tda8083_state* state = fe->demodulator_priv; | 321 | struct tda8083_state* state = fe->demodulator_priv; |
321 | 322 | ||
322 | if (fe->ops.tuner_ops.set_params) { | 323 | if (fe->ops.tuner_ops.set_params) { |
@@ -325,8 +326,8 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
325 | } | 326 | } |
326 | 327 | ||
327 | tda8083_set_inversion (state, p->inversion); | 328 | tda8083_set_inversion (state, p->inversion); |
328 | tda8083_set_fec (state, p->u.qpsk.fec_inner); | 329 | tda8083_set_fec(state, p->fec_inner); |
329 | tda8083_set_symbolrate (state, p->u.qpsk.symbol_rate); | 330 | tda8083_set_symbolrate(state, p->symbol_rate); |
330 | 331 | ||
331 | tda8083_writereg (state, 0x00, 0x3c); | 332 | tda8083_writereg (state, 0x00, 0x3c); |
332 | tda8083_writereg (state, 0x00, 0x04); | 333 | tda8083_writereg (state, 0x00, 0x04); |
@@ -334,7 +335,7 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
334 | return 0; | 335 | return 0; |
335 | } | 336 | } |
336 | 337 | ||
337 | static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 338 | static int tda8083_get_frontend(struct dvb_frontend *fe, struct dtv_frontend_properties *p) |
338 | { | 339 | { |
339 | struct tda8083_state* state = fe->demodulator_priv; | 340 | struct tda8083_state* state = fe->demodulator_priv; |
340 | 341 | ||
@@ -342,8 +343,8 @@ static int tda8083_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
342 | /*p->frequency = ???;*/ | 343 | /*p->frequency = ???;*/ |
343 | p->inversion = (tda8083_readreg (state, 0x0e) & 0x80) ? | 344 | p->inversion = (tda8083_readreg (state, 0x0e) & 0x80) ? |
344 | INVERSION_ON : INVERSION_OFF; | 345 | INVERSION_ON : INVERSION_OFF; |
345 | p->u.qpsk.fec_inner = tda8083_get_fec (state); | 346 | p->fec_inner = tda8083_get_fec(state); |
346 | /*p->u.qpsk.symbol_rate = tda8083_get_symbolrate (state);*/ | 347 | /*p->symbol_rate = tda8083_get_symbolrate (state);*/ |
347 | 348 | ||
348 | return 0; | 349 | return 0; |
349 | } | 350 | } |
@@ -438,7 +439,7 @@ error: | |||
438 | } | 439 | } |
439 | 440 | ||
440 | static struct dvb_frontend_ops tda8083_ops = { | 441 | static struct dvb_frontend_ops tda8083_ops = { |
441 | 442 | .delsys = { SYS_DVBS }, | |
442 | .info = { | 443 | .info = { |
443 | .name = "Philips TDA8083 DVB-S", | 444 | .name = "Philips TDA8083 DVB-S", |
444 | .type = FE_QPSK, | 445 | .type = FE_QPSK, |
@@ -461,8 +462,8 @@ static struct dvb_frontend_ops tda8083_ops = { | |||
461 | .init = tda8083_init, | 462 | .init = tda8083_init, |
462 | .sleep = tda8083_sleep, | 463 | .sleep = tda8083_sleep, |
463 | 464 | ||
464 | .set_frontend_legacy = tda8083_set_frontend, | 465 | .set_frontend = tda8083_set_frontend, |
465 | .get_frontend_legacy = tda8083_get_frontend, | 466 | .get_frontend = tda8083_get_frontend, |
466 | 467 | ||
467 | .read_status = tda8083_read_status, | 468 | .read_status = tda8083_read_status, |
468 | .read_signal_strength = tda8083_read_signal_strength, | 469 | .read_signal_strength = tda8083_read_signal_strength, |