diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2006-04-18 16:47:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:58:28 -0400 |
commit | 7e557743360104cf71aab1f34df58ef5e7d0b042 (patch) | |
tree | 9d0f64fe735a3cebcb0c821f61cb2c71f63a68f1 /drivers/media/video/cx88/cx88-dvb.c | |
parent | 3d043661064b37f54e8123d17b436aea05da19d6 (diff) |
V4L/DVB (3842): Cx88-dvb: use fe_lgh06xf.h
- removed duplicated tuning code for LG TDVS H062F/H064F
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 28e0d3d94515..f874fa686643 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #endif | 51 | #endif |
52 | #ifdef HAVE_LGDT330X | 52 | #ifdef HAVE_LGDT330X |
53 | # include "lgdt330x.h" | 53 | # include "lgdt330x.h" |
54 | # include "fe_lgh06xf.h" | ||
54 | #endif | 55 | #endif |
55 | #ifdef HAVE_NXT200X | 56 | #ifdef HAVE_NXT200X |
56 | # include "nxt200x.h" | 57 | # include "nxt200x.h" |
@@ -378,7 +379,7 @@ static struct or51132_config pchdtv_hd3000 = { | |||
378 | #endif | 379 | #endif |
379 | 380 | ||
380 | #ifdef HAVE_LGDT330X | 381 | #ifdef HAVE_LGDT330X |
381 | static int lgdt330x_pll_set(struct dvb_frontend* fe, | 382 | static int lgdt3302_pll_set(struct dvb_frontend* fe, |
382 | struct dvb_frontend_parameters* params) | 383 | struct dvb_frontend_parameters* params) |
383 | { | 384 | { |
384 | /* FIXME make this routine use the tuner-simple code. | 385 | /* FIXME make this routine use the tuner-simple code. |
@@ -392,9 +393,6 @@ static int lgdt330x_pll_set(struct dvb_frontend* fe, | |||
392 | { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; | 393 | { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 }; |
393 | int err; | 394 | int err; |
394 | 395 | ||
395 | /* Put the analog decoder in standby to keep it quiet */ | ||
396 | cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); | ||
397 | |||
398 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); | 396 | dvb_pll_configure(core->pll_desc, buf, params->frequency, 0); |
399 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | 397 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", |
400 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | 398 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); |
@@ -407,16 +405,21 @@ static int lgdt330x_pll_set(struct dvb_frontend* fe, | |||
407 | else | 405 | else |
408 | return -EREMOTEIO; | 406 | return -EREMOTEIO; |
409 | } | 407 | } |
410 | if (core->tuner_type == TUNER_LG_TDVS_H062F) { | ||
411 | /* Set the Auxiliary Byte. */ | ||
412 | buf[2] &= ~0x20; | ||
413 | buf[2] |= 0x18; | ||
414 | buf[3] = 0x50; | ||
415 | i2c_transfer(&core->i2c_adap, &msg, 1); | ||
416 | } | ||
417 | return 0; | 408 | return 0; |
418 | } | 409 | } |
419 | 410 | ||
411 | static int lgdt3303_pll_set(struct dvb_frontend* fe, | ||
412 | struct dvb_frontend_parameters* params) | ||
413 | { | ||
414 | struct cx8802_dev *dev= fe->dvb->priv; | ||
415 | struct cx88_core *core = dev->core; | ||
416 | |||
417 | /* Put the analog decoder in standby to keep it quiet */ | ||
418 | cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); | ||
419 | |||
420 | return lg_h06xf_pll_set(fe, &core->i2c_adap, params); | ||
421 | } | ||
422 | |||
420 | static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) | 423 | static int lgdt330x_pll_rf_set(struct dvb_frontend* fe, int index) |
421 | { | 424 | { |
422 | struct cx8802_dev *dev= fe->dvb->priv; | 425 | struct cx8802_dev *dev= fe->dvb->priv; |
@@ -444,7 +447,7 @@ static struct lgdt330x_config fusionhdtv_3_gold = { | |||
444 | .demod_address = 0x0e, | 447 | .demod_address = 0x0e, |
445 | .demod_chip = LGDT3302, | 448 | .demod_chip = LGDT3302, |
446 | .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */ | 449 | .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */ |
447 | .pll_set = lgdt330x_pll_set, | 450 | .pll_set = lgdt3302_pll_set, |
448 | .set_ts_params = lgdt330x_set_ts_param, | 451 | .set_ts_params = lgdt330x_set_ts_param, |
449 | }; | 452 | }; |
450 | 453 | ||
@@ -452,7 +455,7 @@ static struct lgdt330x_config fusionhdtv_5_gold = { | |||
452 | .demod_address = 0x0e, | 455 | .demod_address = 0x0e, |
453 | .demod_chip = LGDT3303, | 456 | .demod_chip = LGDT3303, |
454 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | 457 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ |
455 | .pll_set = lgdt330x_pll_set, | 458 | .pll_set = lgdt3303_pll_set, |
456 | .set_ts_params = lgdt330x_set_ts_param, | 459 | .set_ts_params = lgdt330x_set_ts_param, |
457 | }; | 460 | }; |
458 | 461 | ||
@@ -460,7 +463,7 @@ static struct lgdt330x_config pchdtv_hd5500 = { | |||
460 | .demod_address = 0x59, | 463 | .demod_address = 0x59, |
461 | .demod_chip = LGDT3303, | 464 | .demod_chip = LGDT3303, |
462 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | 465 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ |
463 | .pll_set = lgdt330x_pll_set, | 466 | .pll_set = lgdt3303_pll_set, |
464 | .set_ts_params = lgdt330x_set_ts_param, | 467 | .set_ts_params = lgdt330x_set_ts_param, |
465 | }; | 468 | }; |
466 | #endif | 469 | #endif |
@@ -663,8 +666,6 @@ static int dvb_register(struct cx8802_dev *dev) | |||
663 | mdelay(100); | 666 | mdelay(100); |
664 | cx_set(MO_GP0_IO, 1); | 667 | cx_set(MO_GP0_IO, 1); |
665 | mdelay(200); | 668 | mdelay(200); |
666 | dev->core->pll_addr = 0x61; | ||
667 | dev->core->pll_desc = &dvb_pll_tdvs_tua6034; | ||
668 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, | 669 | dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, |
669 | &dev->core->i2c_adap); | 670 | &dev->core->i2c_adap); |
670 | } | 671 | } |
@@ -679,8 +680,6 @@ static int dvb_register(struct cx8802_dev *dev) | |||
679 | mdelay(100); | 680 | mdelay(100); |
680 | cx_set(MO_GP0_IO, 1); | 681 | cx_set(MO_GP0_IO, 1); |
681 | mdelay(200); | 682 | mdelay(200); |
682 | dev->core->pll_addr = 0x61; | ||
683 | dev->core->pll_desc = &dvb_pll_tdvs_tua6034; | ||
684 | dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, | 683 | dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, |
685 | &dev->core->i2c_adap); | 684 | &dev->core->i2c_adap); |
686 | } | 685 | } |