]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7391): saa7134: Add DVB-S support for the MD 1734 cards with 2 saa7134
authorHartmut Hackmann <hartmut.hackmann@t-online.de>
Tue, 22 Apr 2008 17:46:08 +0000 (14:46 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:52 +0000 (14:07 -0300)
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 e30f34e019b053e4fcdbd38e055585013d9d23a2..1b6c7d697f04b7fa0085418fb6baa05e5bd217c9 100644 (file)
@@ -2911,15 +2911,13 @@ struct saa7134_board saa7134_boards[] = {
                }},
        },
        [SAA7134_BOARD_MD7134_BRIDGE_2] = {
-               /* This card has two saa7134 chips on it,
-                  but only one of them is currently working.
-                  The programming for the primary decoder is
-                  in SAA7134_BOARD_MD7134 */
+               /* The second saa7134 on this card only serves as DVB-S host bridge */
                .name           = "Medion 7134 Bridge #2",
                .audio_clock    = 0x00187de7,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
+               .mpeg           = SAA7134_MPEG_DVB,
        },
        [SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS] = {
                .name           = "LifeView FlyDVB-T Hybrid Cardbus/MSI TV @nywhere A/D NB",
@@ -5438,7 +5436,6 @@ int saa7134_board_init1(struct saa7134_dev *dev)
                dev->has_remote = SAA7134_REMOTE_I2C;
                break;
        case SAA7134_BOARD_AVERMEDIA_A169_B:
-       case SAA7134_BOARD_MD7134_BRIDGE_2:
                printk("%s: %s: dual saa713x broadcast decoders\n"
                       "%s: Sorry, none of the inputs to this chip are supported yet.\n"
                       "%s: Dual decoder functionality is disabled for now, use the other chip.\n",
index 00f325ad565af93c8d01d4cba8c95e703db5ae12..a29d800616b17a09baec8f1959de910bcd731f4e 100644 (file)
@@ -1156,6 +1156,29 @@ static int dvb_init(struct saa7134_dev *dev)
                                               &dev->i2c_adap);
                attach_xc3028 = 1;
                break;
+       case SAA7134_BOARD_MD7134_BRIDGE_2:
+               dev->dvb.frontend = dvb_attach(tda10086_attach,
+                                               &flydvbs, &dev->i2c_adap);
+               if (dev->dvb.frontend) {
+                       struct dvb_frontend *fe;
+                       if (dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x60,
+                                 &dev->i2c_adap, DVB_PLL_PHILIPS_SD1878_TDA8261) == NULL)
+                               wprintk("%s: MD7134 DVB-S, no SD1878 "
+                                       "found !\n", __FUNCTION__);
+                       /* we need to open the i2c gate (we know it exists) */
+                       fe = dev->dvb.frontend;
+                       fe->ops.i2c_gate_ctrl(fe, 1);
+                       if (dvb_attach(isl6405_attach, fe,
+                                       &dev->i2c_adap, 0x08, 0, 0) == NULL)
+                               wprintk("%s: MD7134 DVB-S, no ISL6405 "
+                                       "found !\n", __FUNCTION__);
+                       fe->ops.i2c_gate_ctrl(fe, 0);
+                       dev->original_set_voltage = fe->ops.set_voltage;
+                       fe->ops.set_voltage = md8800_set_voltage;
+                       dev->original_set_high_voltage = fe->ops.enable_high_lnb_voltage;
+                       fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage;
+               }
+               break;
        default:
                wprintk("Huh? unknown DVB card?\n");
                break;