V4L/DVB (3396): Add DVB-T support for the LifeView DVB Trio PCI card
authorNico Sabbi <nsabbi@tiscali.it>
Fri, 3 Mar 2006 15:11:28 +0000 (12:11 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 3 Mar 2006 15:11:28 +0000 (12:11 -0300)
This patch adds DVB-T support, no DVB-S yet

Signed-off-by: Nico Sabbi <nsabbi@tiscali.it>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-dvb.c

index 722ebff0f8890bbda5871445c0669132c96ea768..288d1f8841be54c0f25e9f0582c5231b716d5966 100644 (file)
@@ -2624,6 +2624,7 @@ struct saa7134_board saa7134_boards[] = {
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .gpiomask       = 0x00200000,
+               .mpeg           = SAA7134_MPEG_DVB,     /* FIXME: DVB not implemented yet */
                .inputs         = {{
                        .name = name_tv,        /* Analog broadcast/cable TV */
                        .vmux = 1,
@@ -3547,6 +3548,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                i2c_transfer(&dev->i2c_adap, &msg, 1);
                }
                break;
+       case SAA7134_BOARD_FLYDVB_TRIO:
        case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
                /* make the tda10046 find its eeprom */
                {
index 5969481ed4fbaea6393b3ca93775a9bf0db68be3..ad34eb5b17cb6f3e4232fb745a957b2d789e6a9a 100644 (file)
@@ -852,6 +852,39 @@ static struct tda1004x_config philips_tiger_config = {
 
 /* ------------------------------------------------------------------ */
 
+static int lifeview_trio_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
+{
+       int ret;
+
+       ret = philips_tda827xa_pll_set(0x60, fe, params);
+       return ret;
+}
+
+static int lifeview_trio_dvb_mode(struct dvb_frontend *fe)
+{
+       return 0;
+}
+
+static void lifeview_trio_analog_mode(struct dvb_frontend *fe)
+{
+       philips_tda827xa_pll_sleep(0x60, fe);
+}
+
+static struct tda1004x_config lifeview_trio_config = {
+       .demod_address = 0x09,
+       .invert        = 1,
+       .invert_oclk   = 0,
+       .xtal_freq     = TDA10046_XTAL_16M,
+       .agc_config    = TDA10046_AGC_TDA827X_GPL,
+       .if_freq       = TDA10046_FREQ_045,
+       .pll_init      = lifeview_trio_dvb_mode,
+       .pll_set       = lifeview_trio_pll_set,
+       .pll_sleep     = lifeview_trio_analog_mode,
+       .request_firmware = NULL,
+};
+
+/* ------------------------------------------------------------------ */
+
 static int ads_duo_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
 {
        int ret;
@@ -1019,6 +1052,10 @@ static int dvb_init(struct saa7134_dev *dev)
                dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config,
                                                    &dev->i2c_adap);
                break;
+       case SAA7134_BOARD_FLYDVB_TRIO:
+               dev->dvb.frontend = tda10046_attach(&lifeview_trio_config,
+                                                   &dev->i2c_adap);
+               break;
        case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
                dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config,
                                                    &dev->i2c_adap);