aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c52
1 files changed, 47 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index be48b9b66a67..87c10983266f 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -553,7 +553,6 @@ static int configure_tda827x_fe(struct saa7134_dev *dev,
553/* ------------------------------------------------------------------ */ 553/* ------------------------------------------------------------------ */
554 554
555static struct tda827x_config tda827x_cfg_0 = { 555static struct tda827x_config tda827x_cfg_0 = {
556 .tuner_callback = saa7134_tuner_callback,
557 .init = philips_tda827x_tuner_init, 556 .init = philips_tda827x_tuner_init,
558 .sleep = philips_tda827x_tuner_sleep, 557 .sleep = philips_tda827x_tuner_sleep,
559 .config = 0, 558 .config = 0,
@@ -561,7 +560,6 @@ static struct tda827x_config tda827x_cfg_0 = {
561}; 560};
562 561
563static struct tda827x_config tda827x_cfg_1 = { 562static struct tda827x_config tda827x_cfg_1 = {
564 .tuner_callback = saa7134_tuner_callback,
565 .init = philips_tda827x_tuner_init, 563 .init = philips_tda827x_tuner_init,
566 .sleep = philips_tda827x_tuner_sleep, 564 .sleep = philips_tda827x_tuner_sleep,
567 .config = 1, 565 .config = 1,
@@ -569,7 +567,6 @@ static struct tda827x_config tda827x_cfg_1 = {
569}; 567};
570 568
571static struct tda827x_config tda827x_cfg_2 = { 569static struct tda827x_config tda827x_cfg_2 = {
572 .tuner_callback = saa7134_tuner_callback,
573 .init = philips_tda827x_tuner_init, 570 .init = philips_tda827x_tuner_init,
574 .sleep = philips_tda827x_tuner_sleep, 571 .sleep = philips_tda827x_tuner_sleep,
575 .config = 2, 572 .config = 2,
@@ -577,7 +574,6 @@ static struct tda827x_config tda827x_cfg_2 = {
577}; 574};
578 575
579static struct tda827x_config tda827x_cfg_2_sw42 = { 576static struct tda827x_config tda827x_cfg_2_sw42 = {
580 .tuner_callback = saa7134_tuner_callback,
581 .init = philips_tda827x_tuner_init, 577 .init = philips_tda827x_tuner_init,
582 .sleep = philips_tda827x_tuner_sleep, 578 .sleep = philips_tda827x_tuner_sleep,
583 .config = 2, 579 .config = 2,
@@ -799,6 +795,20 @@ static struct tda1004x_config twinhan_dtv_dvb_3056_config = {
799 .request_firmware = philips_tda1004x_request_firmware 795 .request_firmware = philips_tda1004x_request_firmware
800}; 796};
801 797
798static struct tda1004x_config asus_tiger_3in1_config = {
799 .demod_address = 0x0b,
800 .invert = 1,
801 .invert_oclk = 0,
802 .xtal_freq = TDA10046_XTAL_16M,
803 .agc_config = TDA10046_AGC_TDA827X,
804 .gpio_config = TDA10046_GP11_I,
805 .if_freq = TDA10046_FREQ_045,
806 .i2c_gate = 0x4b,
807 .tuner_address = 0x61,
808 .antenna_switch = 1,
809 .request_firmware = philips_tda1004x_request_firmware
810};
811
802/* ------------------------------------------------------------------ 812/* ------------------------------------------------------------------
803 * special case: this card uses saa713x GPIO22 for the mode switch 813 * special case: this card uses saa713x GPIO22 for the mode switch
804 */ 814 */
@@ -822,7 +832,6 @@ static int ads_duo_tuner_sleep(struct dvb_frontend *fe)
822} 832}
823 833
824static struct tda827x_config ads_duo_cfg = { 834static struct tda827x_config ads_duo_cfg = {
825 .tuner_callback = saa7134_tuner_callback,
826 .init = ads_duo_tuner_init, 835 .init = ads_duo_tuner_init,
827 .sleep = ads_duo_tuner_sleep, 836 .sleep = ads_duo_tuner_sleep,
828 .config = 0 837 .config = 0
@@ -1147,6 +1156,7 @@ static int dvb_init(struct saa7134_dev *dev)
1147 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61, 1156 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
1148 NULL, DVB_PLL_TDHU2); 1157 NULL, DVB_PLL_TDHU2);
1149 break; 1158 break;
1159 case SAA7134_BOARD_ADS_INSTANT_HDTV_PCI:
1150 case SAA7134_BOARD_KWORLD_ATSC110: 1160 case SAA7134_BOARD_KWORLD_ATSC110:
1151 dev->dvb.frontend = dvb_attach(nxt200x_attach, &kworldatsc110, 1161 dev->dvb.frontend = dvb_attach(nxt200x_attach, &kworldatsc110,
1152 &dev->i2c_adap); 1162 &dev->i2c_adap);
@@ -1300,6 +1310,36 @@ static int dvb_init(struct saa7134_dev *dev)
1300 &dev->i2c_adap); 1310 &dev->i2c_adap);
1301 attach_xc3028 = 1; 1311 attach_xc3028 = 1;
1302 break; 1312 break;
1313 case SAA7134_BOARD_ASUSTeK_TIGER_3IN1:
1314 if (!use_frontend) { /* terrestrial */
1315 if (configure_tda827x_fe(dev, &asus_tiger_3in1_config,
1316 &tda827x_cfg_2) < 0)
1317 goto dettach_frontend;
1318 } else { /* satellite */
1319 dev->dvb.frontend = dvb_attach(tda10086_attach,
1320 &flydvbs, &dev->i2c_adap);
1321 if (dev->dvb.frontend) {
1322 if (dvb_attach(tda826x_attach,
1323 dev->dvb.frontend, 0x60,
1324 &dev->i2c_adap, 0) == NULL) {
1325 wprintk("%s: Asus Tiger 3in1, no "
1326 "tda826x found!\n", __func__);
1327 goto dettach_frontend;
1328 }
1329 if (dvb_attach(lnbp21_attach, dev->dvb.frontend,
1330 &dev->i2c_adap, 0, 0) == NULL) {
1331 wprintk("%s: Asus Tiger 3in1, no lnbp21"
1332 " found!\n", __func__);
1333 goto dettach_frontend;
1334 }
1335 }
1336 }
1337 break;
1338 case SAA7134_BOARD_ASUSTeK_TIGER:
1339 if (configure_tda827x_fe(dev, &philips_tiger_config,
1340 &tda827x_cfg_0) < 0)
1341 goto dettach_frontend;
1342 break;
1303 default: 1343 default:
1304 wprintk("Huh? unknown DVB card?\n"); 1344 wprintk("Huh? unknown DVB card?\n");
1305 break; 1345 break;
@@ -1327,6 +1367,8 @@ static int dvb_init(struct saa7134_dev *dev)
1327 printk(KERN_ERR "%s/dvb: frontend initialization failed\n", dev->name); 1367 printk(KERN_ERR "%s/dvb: frontend initialization failed\n", dev->name);
1328 return -1; 1368 return -1;
1329 } 1369 }
1370 /* define general-purpose callback pointer */
1371 dev->dvb.frontend->callback = saa7134_tuner_callback;
1330 1372
1331 /* register everything else */ 1373 /* register everything else */
1332 ret = videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev, 1374 ret = videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev,