[linux-dvb] Re: FusionHDTV5 Lite

Michael Krufky mkrufky at m1k.net
Thu Aug 25 03:40:59 CEST 2005


Doug Stevens wrote:

> I've been following the driver progress on the linux-dvb list.  If 
> you'd like help testing I've got a couple of FusionHDTV5 Lite cards.
>
> Let me know I'd be happy to help.

Doug -

That's great!  First off, it would be helpfull if you can test the 
analog driver in video4linux cvs.  It works perfectly for me, but I 
haven't heard of anyone else that tested it.  It would be nice if you 
could report on your experience with the video4linux analog driver in an 
email to me, cc'd to the video4linux mailing list ( Linux and Kernel 
Video <video4linux-list at redhat.com> )  I cc'd this to linux-dvb, I hope 
you don't mind.

After testing that, feel free to test my latest dvb-bt8xx patch (against 
dvb-kernel cvs).  This so far does NOT work for me.  It is possible that 
it might work for you, however...  It might be as simple as a PCI quirk 
on my motherboard.  In order to get this dvb-bt8xx patch to (hopefully) 
work, you will have to use a 2.6.13 kernel.  You also need the newer 
version of lgdt330x.c from inside dvb-kernel cvs.  (the version in 
2.6.13 isn't going to work with the lite board, because the Lite board 
depends on Patrick's check-callback patch, which is currently in -mm)   
After getting everything compiled, you will have to recompile 
video4linux cvs again, but with a small change..... Edit bttv-cards.c, 
and go to line ~2410 card # 0x87 is FusionHDTV5 Lite ... .near the end, 
change the #if 0 to a #if 1, right above the line that reads, ".has_dvb 
= 1" and recompile.

If you have anything useful to report with the attached patch, please 
report it in an email to me cc'd to the linux-dvb list.  Once again... I 
must remind you that the attached patch doesn't work yet for me.  I can 
tune, yes... but I cannot get a TS.  I do not expect for you to either, 
although it may be possible.

-- 
Michael Krufky

-------------- next part --------------
diff -upr dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/Kconfig dvb-kernel/linux/drivers/media/dvb/bt8xx/Kconfig
--- dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/Kconfig	2005-08-22 20:27:17.000000000 +0000
+++ dvb-kernel/linux/drivers/media/dvb/bt8xx/Kconfig	2005-08-22 20:31:07.000000000 +0000
@@ -6,6 +6,7 @@ config DVB_BT8XX
 	select DVB_NXT6000
 	select DVB_CX24110
 	select DVB_OR51211
+	select DVB_LGDT330X
 	help
 	  Support for PCI cards based on the Bt8xx PCI bridge. Examples are
 	  the Nebula cards, the Pinnacle PCTV cards, the Twinhan DST cards,
diff -upr dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c dvb-kernel/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
--- dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c	2005-08-22 20:27:17.000000000 +0000
+++ dvb-kernel/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c	2005-08-23 00:37:09.000000000 +0000
@@ -34,6 +34,7 @@
 #include "dvb_frontend.h"
 #include "dvb-bt8xx.h"
 #include "bt878.h"
+#include "dvb-pll.h"
 
 static int debug;
 
@@ -546,6 +547,54 @@ static struct mt352_config digitv_alps_t
 	.pll_set = digitv_alps_tded4_pll_set,
 };
 
+static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_parameters* params)
+{
+	struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *) fe->dvb->priv;
+	u8 buf[4];
+	struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = buf, .len = sizeof(buf) };
+	int err;
+
+	dvb_pll_configure(&dvb_pll_tdvs_tua6034, buf, params->frequency, 0);
+	dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
+		__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
+	if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) {
+	        printk(KERN_WARNING "dvb-bt8xx: %s error "
+		        "(addr %02x <- %02x, err = %i)\n",
+		        __FUNCTION__, buf[0], buf[1], err);
+		if (err < 0)
+			return err;
+		else
+			return -EREMOTEIO;
+	}
+
+	/* Set the Auxiliary Byte. */
+	buf[2] &= ~0x20;
+	buf[2] |= 0x18;
+	buf[3] = 0x50;
+	i2c_transfer(card->i2c_adapter, &msg, 1);
+
+	return 0;
+}
+
+static struct lgdt330x_config tdvs_tua6034_config = {
+	.demod_address    = 0x0e,
+	.demod_chip       = LGDT3303,
+	.serial_mpeg      = 0x00,
+	.pll_set          = tdvs_tua6034_pll_set,
+};
+
+static void lgdt330x_reset(struct dvb_bt8xx_card *bt)
+{
+	/* Set pin 27 of the lgdt3303 chip high to reset the frontend */
+
+	/* Pulse the reset line */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000000); /* Low  */
+	msleep(100);
+
+	bttv_write_gpio(bt->bttv_nr, 0x00e00007, 0x00000001); /* High */
+}
+
 static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
 {
 	int ret;
@@ -562,6 +611,15 @@ static void frontend_init(struct dvb_bt8
 		break;
 #endif
 
+#ifdef BTTV_DVICO_FUSIONHDTV_5_LITE
+	case BTTV_DVICO_FUSIONHDTV_5_LITE:
+		lgdt330x_reset(card);
+		card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter);
+		if (card->fe != NULL)
+			dprintk ("dvb_bt8xx: lgdt330x detected\n");
+		break;
+#endif
+
 #ifdef BTTV_TWINHAN_VP3021
 	case BTTV_TWINHAN_VP3021:
 #else
@@ -763,6 +821,14 @@ static int dvb_bt8xx_probe(struct device
 		 * DA_APP(parallel) */
 		break;
 
+#ifdef BTTV_DVICO_FUSIONHDTV_5_LITE
+	case BTTV_DVICO_FUSIONHDTV_5_LITE:
+#endif
+		card->gpio_mode = 0x00e00007;
+		card->op_sync_orin = 0;
+		card->irq_err_ignore = 0;
+		break;
+
 #ifdef BTTV_TWINHAN_VP3021
 	case BTTV_TWINHAN_VP3021:
 #else
diff -upr dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h dvb-kernel/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
--- dvb-kernel.orig/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h	2005-08-22 20:27:17.000000000 +0000
+++ dvb-kernel/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h	2005-08-22 20:31:07.000000000 +0000
@@ -35,6 +35,7 @@
 #include "nxt6000.h"
 #include "cx24110.h"
 #include "or51211.h"
+#include "lgdt330x.h"
 
 struct dvb_bt8xx_card {
 	struct semaphore lock;


More information about the linux-dvb mailing list