[linux-dvb] DViCO FusionHDTV& lgdt330x support plans

Mac Michaels wmichaels1 at earthlink.net
Wed Jul 20 02:25:45 CEST 2005


On Tuesday 19 July 2005 12:56 pm, Mac Michaels wrote:
> On Sunday 17 July 2005 10:54 pm, Mac Michaels wrote:
> > Here are the next changes I plan to make to the driver
> > I maintain. Many of these changes are in preparation of
> > merging the lgdt3302 and lgdt3303 drivers.

1) is done.

> > 2) Select the RF input connector based upon the type of
> > demodulation selected. ANT RF connector is selected for
> > 8-VSB and CABLE RF connector is selected for
> > QAM64/QAM256. Implement this along the lines posted to
> > this list earlier by Patrick. This only affects the
> > cards that use the Microtune 4042 tuner. This is not
> > ideal, but there is no current specification for
> > selecting RF inputs. It makes the card work the same
> > way as the Windows driver thus it may reduce user
> > confusion.
> >
> > 3) Modify the driver make initialization table driven.
> > This is done in preparation of merging with the
> > lgdt3303.
> >
> > 4) Merge with existing lgdt3303 driver.
> >
> > *5) Add support for the FusionHDTV 5 Gold.
> >
> > *6) Add support for the FusionHDTV 5 Lite.
> >
> > *Note. The order of 5 and 6 could be reversed if by
> > some miracle I receive a Lite card for testing.
> >
> > -- Mac
>
A patch to implement item 2 above follows.  This patch 
requires the patch for item 1 sent previously.

This patch is against the 2005-07-14 version of the 
video4linux CVS. That version still has the lgdt3302.* files 
and the makefile to build them. 

I will post patches for items 3 - 6 as I complete them.

-- Mac

diff -u video4linux.pll.patch/cx88-dvb.c video4linux/cx88-dvb.c
--- video4linux.pll.patch/cx88-dvb.c    2005-07-19 14:51:29.000000000 -0500
+++ video4linux/cx88-dvb.c      2005-07-19 18:42:17.000000000 -0500
@@ -221,6 +221,19 @@
        return 0;
 }

+static int lgdt3302_pll_rf_set(struct dvb_frontend* fe, int index)
+{
+       struct cx8802_dev *dev= fe->dvb->priv;
+       struct cx88_core *core = dev->core;
+
+       dprintk(1, "%s: index = %d\n", __FUNCTION__, index);
+       if (index == 0)
+               cx_clear(MO_GP0_IO, 8);
+       else
+               cx_set(MO_GP0_IO, 8);
+       return 0;
+}
+
 static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured)
 {
        struct cx8802_dev *dev= fe->dvb->priv;
@@ -294,8 +307,11 @@

                cx_clear(MO_GP0_IO, 1);
                mdelay(100);
-               cx_set(MO_GP0_IO, 9); // ANT connector too FIXME
+               cx_set(MO_GP0_IO, 1);
                mdelay(200);
+
+               /* Select RF connector callback */
+               fusionhdtv_3_gold.pll_rf_set = lgdt3302_pll_rf_set;
                dev->core->pll_addr = 0x61;
                dev->core->pll_desc = &dvb_pll_microtune_4042;
                dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold,
diff -u video4linux.pll.patch/lgdt3302.c video4linux/lgdt3302.c
--- video4linux.pll.patch/lgdt3302.c    2005-07-19 15:01:02.000000000 -0500
+++ video4linux/lgdt3302.c      2005-07-19 18:29:00.000000000 -0500
@@ -216,6 +216,10 @@

                        /* Select VSB mode and serial MPEG interface */
                        top_ctrl_cfg[1] = 0x07;
+
+                       /* Select ANT connector if supported by card */
+                       if (state->config->pll_rf_set)
+                                       state->config->pll_rf_set(fe, 1);
                        break;

                case QAM_64:
@@ -223,6 +227,10 @@

                        /* Select QAM_64 mode and serial MPEG interface */
                        top_ctrl_cfg[1] = 0x04;
+
+                       /* Select CABLE connector if supported by card */
+                       if (state->config->pll_rf_set)
+                                       state->config->pll_rf_set(fe, 0);
                        break;

                case QAM_256:
@@ -230,6 +238,10 @@

                        /* Select QAM_256 mode and serial MPEG interface */
                        top_ctrl_cfg[1] = 0x05;
+
+                       /* Select CABLE connector if supported by card */
+                       if (state->config->pll_rf_set)
+                                       state->config->pll_rf_set(fe, 0);
                        break;
                default:
                        printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation);
diff -u video4linux.pll.patch/lgdt3302.h video4linux/lgdt3302.h
--- video4linux.pll.patch/lgdt3302.h    2005-07-19 14:51:28.000000000 -0500
+++ video4linux/lgdt3302.h      2005-07-19 17:15:35.000000000 -0500
@@ -32,6 +32,7 @@
        u8 demod_address;

        /* PLL interface */
+       int (*pll_rf_set) (struct dvb_frontend* fe, int index);
        int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pll_address);

        /* Need to set device param for start_dma */




More information about the linux-dvb mailing list