diff options
-rw-r--r-- | drivers/media/dvb/bt8xx/Kconfig | 4 | ||||
-rw-r--r-- | drivers/media/dvb/bt8xx/dvb-bt8xx.c | 67 | ||||
-rw-r--r-- | drivers/media/dvb/bt8xx/dvb-bt8xx.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.c | 1 |
4 files changed, 72 insertions, 1 deletions
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig index 1e85d16491b0..2337b41714e0 100644 --- a/drivers/media/dvb/bt8xx/Kconfig +++ b/drivers/media/dvb/bt8xx/Kconfig | |||
@@ -6,10 +6,12 @@ config DVB_BT8XX | |||
6 | select DVB_NXT6000 | 6 | select DVB_NXT6000 |
7 | select DVB_CX24110 | 7 | select DVB_CX24110 |
8 | select DVB_OR51211 | 8 | select DVB_OR51211 |
9 | select DVB_LGDT330X | ||
9 | help | 10 | help |
10 | Support for PCI cards based on the Bt8xx PCI bridge. Examples are | 11 | Support for PCI cards based on the Bt8xx PCI bridge. Examples are |
11 | the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards, | 12 | the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards, |
12 | the pcHDTV HD2000 cards, and certain AVerMedia cards. | 13 | the pcHDTV HD2000 cards, the DViCO FusionHDTV Lite cards, and |
14 | some AVerMedia cards. | ||
13 | 15 | ||
14 | Since these cards have no MPEG decoder onboard, they transmit | 16 | Since these cards have no MPEG decoder onboard, they transmit |
15 | only compressed MPEG data over the PCI bus, so you need | 17 | only compressed MPEG data over the PCI bus, so you need |
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c index c5c7672cd538..96ef35ecab49 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "dvb_frontend.h" | 34 | #include "dvb_frontend.h" |
35 | #include "dvb-bt8xx.h" | 35 | #include "dvb-bt8xx.h" |
36 | #include "bt878.h" | 36 | #include "bt878.h" |
37 | #include "dvb-pll.h" | ||
37 | 38 | ||
38 | static int debug; | 39 | static int debug; |
39 | 40 | ||
@@ -546,6 +547,55 @@ static struct mt352_config digitv_alps_tded4_config = { | |||
546 | .pll_set = digitv_alps_tded4_pll_set, | 547 | .pll_set = digitv_alps_tded4_pll_set, |
547 | }; | 548 | }; |
548 | 549 | ||
550 | static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params) | ||
551 | { | ||
552 | struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv; | ||
553 | u8 buf[4]; | ||
554 | struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) }; | ||
555 | int err; | ||
556 | |||
557 | dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0); | ||
558 | dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | ||
559 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | ||
560 | if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) { | ||
561 | printk(KERN_WARNING "dvb-bt8xx: %s error " | ||
562 | "(addr %02x <- %02x, err = %i)\n", | ||
563 | __FUNCTION__, buf[0], buf[1], err); | ||
564 | if (err < 0) | ||
565 | return err; | ||
566 | else | ||
567 | return -EREMOTEIO; | ||
568 | } | ||
569 | |||
570 | /* Set the Auxiliary Byte. */ | ||
571 | buf[2] &= ~0x20; | ||
572 | buf[2] |= 0x18; | ||
573 | buf[3] = 0x50; | ||
574 | i2c_transfer(card->i2c_adapter, &msg, 1); | ||
575 | |||
576 | return 0; | ||
577 | } | ||
578 | |||
579 | static struct lgdt330x_config tdvs_tua6034_config = { | ||
580 | .demod_address = 0x0e, | ||
581 | .demod_chip = LGDT3303, | ||
582 | .serial_mpeg = 0x40, /* TPSERIAL for 3303 in TOP_CONTROL */ | ||
583 | .pll_set = tdvs_tua6034_pll_set, | ||
584 | }; | ||
585 | |||
586 | static void lgdt330x_reset(struct dvb_bt8xx_card *bt) | ||
587 | { | ||
588 | /* Set pin 27 of the lgdt3303 chip high to reset the frontend */ | ||
589 | |||
590 | /* Pulse the reset line */ | ||
591 | bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */ | ||
592 | bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low */ | ||
593 | msleep(100); | ||
594 | |||
595 | bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */ | ||
596 | msleep(100); | ||
597 | } | ||
598 | |||
549 | static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | 599 | static void frontend_init(struct dvb_bt8xx_card *card, u32 type) |
550 | { | 600 | { |
551 | int ret; | 601 | int ret; |
@@ -562,6 +612,15 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type) | |||
562 | break; | 612 | break; |
563 | #endif | 613 | #endif |
564 | 614 | ||
615 | #ifdef BTTV_DVICO_FUSIONHDTV_5_LITE | ||
616 | case BTTV_DVICO_FUSIONHDTV_5_LITE: | ||
617 | lgdt330x_reset(card); | ||
618 | card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter); | ||
619 | if (card->fe != NULL) | ||
620 | dprintk ("dvb_bt8xx: lgdt330x detected\n"); | ||
621 | break; | ||
622 | #endif | ||
623 | |||
565 | #ifdef BTTV_TWINHAN_VP3021 | 624 | #ifdef BTTV_TWINHAN_VP3021 |
566 | case BTTV_TWINHAN_VP3021: | 625 | case BTTV_TWINHAN_VP3021: |
567 | #else | 626 | #else |
@@ -765,6 +824,14 @@ static int dvb_bt8xx_probe(struct device *dev) | |||
765 | * DA_APP(parallel) */ | 824 | * DA_APP(parallel) */ |
766 | break; | 825 | break; |
767 | 826 | ||
827 | #ifdef BTTV_DVICO_FUSIONHDTV_5_LITE | ||
828 | case BTTV_DVICO_FUSIONHDTV_5_LITE: | ||
829 | #endif | ||
830 | card->gpio_mode = 0x0400c060; | ||
831 | card->op_sync_orin = BT878_RISC_SYNC_MASK; | ||
832 | card->irq_err_ignore = BT878_AFBUS | BT878_AFDSR; | ||
833 | break; | ||
834 | |||
768 | #ifdef BTTV_TWINHAN_VP3021 | 835 | #ifdef BTTV_TWINHAN_VP3021 |
769 | case BTTV_TWINHAN_VP3021: | 836 | case BTTV_TWINHAN_VP3021: |
770 | #else | 837 | #else |
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/drivers/media/dvb/bt8xx/dvb-bt8xx.h index 9ec8e5bd6c1f..cf035a80361c 100644 --- a/drivers/media/dvb/bt8xx/dvb-bt8xx.h +++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "nxt6000.h" | 35 | #include "nxt6000.h" |
36 | #include "cx24110.h" | 36 | #include "cx24110.h" |
37 | #include "or51211.h" | 37 | #include "or51211.h" |
38 | #include "lgdt330x.h" | ||
38 | 39 | ||
39 | struct dvb_bt8xx_card { | 40 | struct dvb_bt8xx_card { |
40 | struct semaphore lock; | 41 | struct semaphore lock; |
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index 7852b83b82d4..145918877d2f 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -26,6 +26,7 @@ | |||
26 | * DViCO FusionHDTV 3 Gold-Q | 26 | * DViCO FusionHDTV 3 Gold-Q |
27 | * DViCO FusionHDTV 3 Gold-T | 27 | * DViCO FusionHDTV 3 Gold-T |
28 | * DViCO FusionHDTV 5 Gold | 28 | * DViCO FusionHDTV 5 Gold |
29 | * DViCO FusionHDTV 5 Lite | ||
29 | * | 30 | * |
30 | * TODO: | 31 | * TODO: |
31 | * signal strength always returns 0. | 32 | * signal strength always returns 0. |