]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] dvb/4vl: RF input selection fir
authorMichael Krufky <mkrufky@m1k.net>
Wed, 27 Jul 2005 18:45:55 +0000 (11:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:26:16 +0000 (16:26 -0700)
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.  This only affects the cards that use the Microtune 4042
tuner.

Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/dvb/frontends/lgdt3302.c
drivers/media/dvb/frontends/lgdt3302.h
drivers/media/video/cx88/cx88-dvb.c

index 136563606fb15a0e0a5e74c7d96dd1323bee4d93..c803c05002ad0261bb66a7813436e3bef560fee2 100644 (file)
@@ -214,6 +214,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe,
 
                        /* 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:
@@ -221,6 +225,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe,
 
                        /* 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:
@@ -228,6 +236,10 @@ static int lgdt3302_set_parameters(struct dvb_frontend* fe,
 
                        /* 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);
index 327c47e598a232cf52ff163ce1877178f6a1db2b..6bf6f985e0805fc43b328d1b134481ebf39b4b00 100644 (file)
@@ -30,6 +30,7 @@ struct lgdt3302_config
        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 */
index 3a8551a02d0ceb4c0c050b28b9e7a0e98e517540..492f8afe6b968707da856b8e78965cb8c93ccd32 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cx88-dvb.c,v 1.47 2005/07/20 05:20:37 mkrufky Exp $
+ * $Id: cx88-dvb.c,v 1.48 2005/07/20 05:33:33 mkrufky Exp $
  *
  * device driver for Conexant 2388x based TV cards
  * MPEG Transport Stream (DVB) routines
@@ -223,6 +223,19 @@ static int lgdt3302_pll_set(struct dvb_frontend* fe,
        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;
@@ -296,8 +309,11 @@ static int dvb_register(struct cx8802_dev *dev)
 
                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,