diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 13 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 6 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 160 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 7 | ||||
-rw-r--r-- | drivers/media/video/tda8290.c | 9 | ||||
-rw-r--r-- | drivers/media/video/tda8290.h | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 2 |
7 files changed, 86 insertions, 113 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 1b6c7d697f04..bab8498046c8 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5260,12 +5260,13 @@ int saa7134_tuner_callback(void *priv, int command, int arg) | |||
5260 | { | 5260 | { |
5261 | struct i2c_algo_bit_data *i2c_algo = priv; | 5261 | struct i2c_algo_bit_data *i2c_algo = priv; |
5262 | struct saa7134_dev *dev = i2c_algo->data; | 5262 | struct saa7134_dev *dev = i2c_algo->data; |
5263 | 5263 | if (dev != NULL) { | |
5264 | switch (dev->tuner_type) { | 5264 | switch (dev->tuner_type) { |
5265 | case TUNER_PHILIPS_TDA8290: | 5265 | case TUNER_PHILIPS_TDA8290: |
5266 | return saa7134_tda8290_callback(dev, command, arg); | 5266 | return saa7134_tda8290_callback(dev, command, arg); |
5267 | case TUNER_XC2028: | 5267 | case TUNER_XC2028: |
5268 | return saa7134_xc2028_callback(dev, command, arg); | 5268 | return saa7134_xc2028_callback(dev, command, arg); |
5269 | } | ||
5269 | } | 5270 | } |
5270 | return -EINVAL; | 5271 | return -EINVAL; |
5271 | } | 5272 | } |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index ed96ce775a9b..599273894f34 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -864,6 +864,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
864 | struct saa7134_dev *dev; | 864 | struct saa7134_dev *dev; |
865 | struct saa7134_mpeg_ops *mops; | 865 | struct saa7134_mpeg_ops *mops; |
866 | int err; | 866 | int err; |
867 | int mask; | ||
867 | 868 | ||
868 | dev = kzalloc(sizeof(*dev),GFP_KERNEL); | 869 | dev = kzalloc(sizeof(*dev),GFP_KERNEL); |
869 | if (NULL == dev) | 870 | if (NULL == dev) |
@@ -1061,6 +1062,11 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, | |||
1061 | if (TUNER_ABSENT != dev->tuner_type) | 1062 | if (TUNER_ABSENT != dev->tuner_type) |
1062 | saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL); | 1063 | saa7134_i2c_call_clients(dev, TUNER_SET_STANDBY, NULL); |
1063 | 1064 | ||
1065 | if (card(dev).gpiomask != 0) { | ||
1066 | mask = card(dev).gpiomask; | ||
1067 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask); | ||
1068 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, 0); | ||
1069 | } | ||
1064 | return 0; | 1070 | return 0; |
1065 | 1071 | ||
1066 | fail4: | 1072 | fail4: |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 8e55c7572b4b..f95f5f2fbf72 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -439,8 +439,6 @@ static struct tda1004x_config philips_europa_config = { | |||
439 | .request_firmware = philips_tda1004x_request_firmware | 439 | .request_firmware = philips_tda1004x_request_firmware |
440 | }; | 440 | }; |
441 | 441 | ||
442 | /* ------------------------------------------------------------------ */ | ||
443 | |||
444 | static struct tda1004x_config medion_cardbus = { | 442 | static struct tda1004x_config medion_cardbus = { |
445 | .demod_address = 0x08, | 443 | .demod_address = 0x08, |
446 | .invert = 1, | 444 | .invert = 1, |
@@ -456,47 +454,6 @@ static struct tda1004x_config medion_cardbus = { | |||
456 | * tda 1004x based cards with philips silicon tuner | 454 | * tda 1004x based cards with philips silicon tuner |
457 | */ | 455 | */ |
458 | 456 | ||
459 | static void philips_tda827x_lna_gain(struct dvb_frontend *fe, int high) | ||
460 | { | ||
461 | struct saa7134_dev *dev = fe->dvb->priv; | ||
462 | struct tda1004x_state *state = fe->demodulator_priv; | ||
463 | u8 addr = state->config->i2c_gate; | ||
464 | u8 config = state->config->tuner_config; | ||
465 | u8 GP00_CF[] = {0x20, 0x01}; | ||
466 | u8 GP00_LEV[] = {0x22, 0x00}; | ||
467 | |||
468 | struct i2c_msg msg = {.addr = addr,.flags = 0,.buf = GP00_CF, .len = 2}; | ||
469 | if (config) { | ||
470 | if (high) { | ||
471 | dprintk("setting LNA to high gain\n"); | ||
472 | } else { | ||
473 | dprintk("setting LNA to low gain\n"); | ||
474 | } | ||
475 | } | ||
476 | switch (config) { | ||
477 | case 0: /* no LNA */ | ||
478 | break; | ||
479 | case 1: /* switch is GPIO 0 of tda8290 */ | ||
480 | case 2: | ||
481 | /* turn Vsync off */ | ||
482 | saa7134_set_gpio(dev, 22, 0); | ||
483 | GP00_LEV[1] = high ? 0 : 1; | ||
484 | if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) { | ||
485 | wprintk("could not access tda8290 at addr: 0x%02x\n", | ||
486 | addr << 1); | ||
487 | return; | ||
488 | } | ||
489 | msg.buf = GP00_LEV; | ||
490 | if (config == 2) | ||
491 | GP00_LEV[1] = high ? 1 : 0; | ||
492 | i2c_transfer(&dev->i2c_adap, &msg, 1); | ||
493 | break; | ||
494 | case 3: /* switch with GPIO of saa713x */ | ||
495 | saa7134_set_gpio(dev, 22, high); | ||
496 | break; | ||
497 | } | ||
498 | } | ||
499 | |||
500 | static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable) | 457 | static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable) |
501 | { | 458 | { |
502 | struct tda1004x_state *state = fe->demodulator_priv; | 459 | struct tda1004x_state *state = fe->demodulator_priv; |
@@ -519,8 +476,6 @@ static int tda8290_i2c_gate_ctrl( struct dvb_frontend* fe, int enable) | |||
519 | return 0; | 476 | return 0; |
520 | } | 477 | } |
521 | 478 | ||
522 | /* ------------------------------------------------------------------ */ | ||
523 | |||
524 | static int philips_tda827x_tuner_init(struct dvb_frontend *fe) | 479 | static int philips_tda827x_tuner_init(struct dvb_frontend *fe) |
525 | { | 480 | { |
526 | struct saa7134_dev *dev = fe->dvb->priv; | 481 | struct saa7134_dev *dev = fe->dvb->priv; |
@@ -555,28 +510,57 @@ static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe) | |||
555 | return 0; | 510 | return 0; |
556 | } | 511 | } |
557 | 512 | ||
558 | static struct tda827x_config tda827x_cfg = { | 513 | static void configure_tda827x_fe(struct saa7134_dev *dev, struct tda1004x_config *cdec_conf, |
559 | .lna_gain = philips_tda827x_lna_gain, | 514 | struct tda827x_config *tuner_conf) |
560 | .init = philips_tda827x_tuner_init, | ||
561 | .sleep = philips_tda827x_tuner_sleep | ||
562 | }; | ||
563 | |||
564 | static void configure_tda827x_fe(struct saa7134_dev *dev, struct tda1004x_config *tda_conf) | ||
565 | { | 515 | { |
566 | dev->dvb.frontend = dvb_attach(tda10046_attach, tda_conf, &dev->i2c_adap); | 516 | dev->dvb.frontend = dvb_attach(tda10046_attach, cdec_conf, &dev->i2c_adap); |
567 | if (dev->dvb.frontend) { | 517 | if (dev->dvb.frontend) { |
568 | if (tda_conf->i2c_gate) | 518 | if (cdec_conf->i2c_gate) |
569 | dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl; | 519 | dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl; |
570 | if (dvb_attach(tda827x_attach, dev->dvb.frontend, tda_conf->tuner_address, | 520 | if (dvb_attach(tda827x_attach, dev->dvb.frontend, cdec_conf->tuner_address, |
571 | &dev->i2c_adap,&tda827x_cfg) == NULL) { | 521 | &dev->i2c_adap, tuner_conf) == NULL) { |
572 | wprintk("no tda827x tuner found at addr: %02x\n", | 522 | wprintk("no tda827x tuner found at addr: %02x\n", |
573 | tda_conf->tuner_address); | 523 | cdec_conf->tuner_address); |
574 | } | 524 | } |
575 | } | 525 | } |
576 | } | 526 | } |
577 | 527 | ||
578 | /* ------------------------------------------------------------------ */ | 528 | /* ------------------------------------------------------------------ */ |
579 | 529 | ||
530 | static struct tda827x_config tda827x_cfg_0 = { | ||
531 | .tuner_callback = saa7134_tuner_callback, | ||
532 | .init = philips_tda827x_tuner_init, | ||
533 | .sleep = philips_tda827x_tuner_sleep, | ||
534 | .config = 0, | ||
535 | .switch_addr = 0 | ||
536 | }; | ||
537 | |||
538 | static struct tda827x_config tda827x_cfg_1 = { | ||
539 | .tuner_callback = saa7134_tuner_callback, | ||
540 | .init = philips_tda827x_tuner_init, | ||
541 | .sleep = philips_tda827x_tuner_sleep, | ||
542 | .config = 1, | ||
543 | .switch_addr = 0x4b | ||
544 | }; | ||
545 | |||
546 | static struct tda827x_config tda827x_cfg_2 = { | ||
547 | .tuner_callback = saa7134_tuner_callback, | ||
548 | .init = philips_tda827x_tuner_init, | ||
549 | .sleep = philips_tda827x_tuner_sleep, | ||
550 | .config = 2, | ||
551 | .switch_addr = 0x4b | ||
552 | }; | ||
553 | |||
554 | static struct tda827x_config tda827x_cfg_2_sw42 = { | ||
555 | .tuner_callback = saa7134_tuner_callback, | ||
556 | .init = philips_tda827x_tuner_init, | ||
557 | .sleep = philips_tda827x_tuner_sleep, | ||
558 | .config = 2, | ||
559 | .switch_addr = 0x42 | ||
560 | }; | ||
561 | |||
562 | /* ------------------------------------------------------------------ */ | ||
563 | |||
580 | static struct tda1004x_config tda827x_lifeview_config = { | 564 | static struct tda1004x_config tda827x_lifeview_config = { |
581 | .demod_address = 0x08, | 565 | .demod_address = 0x08, |
582 | .invert = 1, | 566 | .invert = 1, |
@@ -599,7 +583,6 @@ static struct tda1004x_config philips_tiger_config = { | |||
599 | .if_freq = TDA10046_FREQ_045, | 583 | .if_freq = TDA10046_FREQ_045, |
600 | .i2c_gate = 0x4b, | 584 | .i2c_gate = 0x4b, |
601 | .tuner_address = 0x61, | 585 | .tuner_address = 0x61, |
602 | .tuner_config = 0, | ||
603 | .antenna_switch= 1, | 586 | .antenna_switch= 1, |
604 | .request_firmware = philips_tda1004x_request_firmware | 587 | .request_firmware = philips_tda1004x_request_firmware |
605 | }; | 588 | }; |
@@ -614,7 +597,6 @@ static struct tda1004x_config cinergy_ht_config = { | |||
614 | .if_freq = TDA10046_FREQ_045, | 597 | .if_freq = TDA10046_FREQ_045, |
615 | .i2c_gate = 0x4b, | 598 | .i2c_gate = 0x4b, |
616 | .tuner_address = 0x61, | 599 | .tuner_address = 0x61, |
617 | .tuner_config = 0, | ||
618 | .request_firmware = philips_tda1004x_request_firmware | 600 | .request_firmware = philips_tda1004x_request_firmware |
619 | }; | 601 | }; |
620 | 602 | ||
@@ -628,7 +610,6 @@ static struct tda1004x_config cinergy_ht_pci_config = { | |||
628 | .if_freq = TDA10046_FREQ_045, | 610 | .if_freq = TDA10046_FREQ_045, |
629 | .i2c_gate = 0x4b, | 611 | .i2c_gate = 0x4b, |
630 | .tuner_address = 0x60, | 612 | .tuner_address = 0x60, |
631 | .tuner_config = 0, | ||
632 | .request_firmware = philips_tda1004x_request_firmware | 613 | .request_firmware = philips_tda1004x_request_firmware |
633 | }; | 614 | }; |
634 | 615 | ||
@@ -642,7 +623,6 @@ static struct tda1004x_config philips_tiger_s_config = { | |||
642 | .if_freq = TDA10046_FREQ_045, | 623 | .if_freq = TDA10046_FREQ_045, |
643 | .i2c_gate = 0x4b, | 624 | .i2c_gate = 0x4b, |
644 | .tuner_address = 0x61, | 625 | .tuner_address = 0x61, |
645 | .tuner_config = 2, | ||
646 | .antenna_switch= 1, | 626 | .antenna_switch= 1, |
647 | .request_firmware = philips_tda1004x_request_firmware | 627 | .request_firmware = philips_tda1004x_request_firmware |
648 | }; | 628 | }; |
@@ -657,7 +637,6 @@ static struct tda1004x_config pinnacle_pctv_310i_config = { | |||
657 | .if_freq = TDA10046_FREQ_045, | 637 | .if_freq = TDA10046_FREQ_045, |
658 | .i2c_gate = 0x4b, | 638 | .i2c_gate = 0x4b, |
659 | .tuner_address = 0x61, | 639 | .tuner_address = 0x61, |
660 | .tuner_config = 1, | ||
661 | .request_firmware = philips_tda1004x_request_firmware | 640 | .request_firmware = philips_tda1004x_request_firmware |
662 | }; | 641 | }; |
663 | 642 | ||
@@ -671,7 +650,6 @@ static struct tda1004x_config hauppauge_hvr_1110_config = { | |||
671 | .if_freq = TDA10046_FREQ_045, | 650 | .if_freq = TDA10046_FREQ_045, |
672 | .i2c_gate = 0x4b, | 651 | .i2c_gate = 0x4b, |
673 | .tuner_address = 0x61, | 652 | .tuner_address = 0x61, |
674 | .tuner_config = 1, | ||
675 | .request_firmware = philips_tda1004x_request_firmware | 653 | .request_firmware = philips_tda1004x_request_firmware |
676 | }; | 654 | }; |
677 | 655 | ||
@@ -685,7 +663,6 @@ static struct tda1004x_config asus_p7131_dual_config = { | |||
685 | .if_freq = TDA10046_FREQ_045, | 663 | .if_freq = TDA10046_FREQ_045, |
686 | .i2c_gate = 0x4b, | 664 | .i2c_gate = 0x4b, |
687 | .tuner_address = 0x61, | 665 | .tuner_address = 0x61, |
688 | .tuner_config = 0, | ||
689 | .antenna_switch= 2, | 666 | .antenna_switch= 2, |
690 | .request_firmware = philips_tda1004x_request_firmware | 667 | .request_firmware = philips_tda1004x_request_firmware |
691 | }; | 668 | }; |
@@ -724,7 +701,6 @@ static struct tda1004x_config md8800_dvbt_config = { | |||
724 | .if_freq = TDA10046_FREQ_045, | 701 | .if_freq = TDA10046_FREQ_045, |
725 | .i2c_gate = 0x4b, | 702 | .i2c_gate = 0x4b, |
726 | .tuner_address = 0x60, | 703 | .tuner_address = 0x60, |
727 | .tuner_config = 0, | ||
728 | .request_firmware = philips_tda1004x_request_firmware | 704 | .request_firmware = philips_tda1004x_request_firmware |
729 | }; | 705 | }; |
730 | 706 | ||
@@ -738,7 +714,6 @@ static struct tda1004x_config asus_p7131_4871_config = { | |||
738 | .if_freq = TDA10046_FREQ_045, | 714 | .if_freq = TDA10046_FREQ_045, |
739 | .i2c_gate = 0x4b, | 715 | .i2c_gate = 0x4b, |
740 | .tuner_address = 0x61, | 716 | .tuner_address = 0x61, |
741 | .tuner_config = 2, | ||
742 | .antenna_switch= 2, | 717 | .antenna_switch= 2, |
743 | .request_firmware = philips_tda1004x_request_firmware | 718 | .request_firmware = philips_tda1004x_request_firmware |
744 | }; | 719 | }; |
@@ -753,7 +728,6 @@ static struct tda1004x_config asus_p7131_hybrid_lna_config = { | |||
753 | .if_freq = TDA10046_FREQ_045, | 728 | .if_freq = TDA10046_FREQ_045, |
754 | .i2c_gate = 0x4b, | 729 | .i2c_gate = 0x4b, |
755 | .tuner_address = 0x61, | 730 | .tuner_address = 0x61, |
756 | .tuner_config = 2, | ||
757 | .antenna_switch= 2, | 731 | .antenna_switch= 2, |
758 | .request_firmware = philips_tda1004x_request_firmware | 732 | .request_firmware = philips_tda1004x_request_firmware |
759 | }; | 733 | }; |
@@ -768,7 +742,6 @@ static struct tda1004x_config kworld_dvb_t_210_config = { | |||
768 | .if_freq = TDA10046_FREQ_045, | 742 | .if_freq = TDA10046_FREQ_045, |
769 | .i2c_gate = 0x4b, | 743 | .i2c_gate = 0x4b, |
770 | .tuner_address = 0x61, | 744 | .tuner_address = 0x61, |
771 | .tuner_config = 2, | ||
772 | .antenna_switch= 1, | 745 | .antenna_switch= 1, |
773 | .request_firmware = philips_tda1004x_request_firmware | 746 | .request_firmware = philips_tda1004x_request_firmware |
774 | }; | 747 | }; |
@@ -783,7 +756,6 @@ static struct tda1004x_config avermedia_super_007_config = { | |||
783 | .if_freq = TDA10046_FREQ_045, | 756 | .if_freq = TDA10046_FREQ_045, |
784 | .i2c_gate = 0x4b, | 757 | .i2c_gate = 0x4b, |
785 | .tuner_address = 0x60, | 758 | .tuner_address = 0x60, |
786 | .tuner_config = 0, | ||
787 | .antenna_switch= 1, | 759 | .antenna_switch= 1, |
788 | .request_firmware = philips_tda1004x_request_firmware | 760 | .request_firmware = philips_tda1004x_request_firmware |
789 | }; | 761 | }; |
@@ -798,7 +770,6 @@ static struct tda1004x_config twinhan_dtv_dvb_3056_config = { | |||
798 | .if_freq = TDA10046_FREQ_045, | 770 | .if_freq = TDA10046_FREQ_045, |
799 | .i2c_gate = 0x42, | 771 | .i2c_gate = 0x42, |
800 | .tuner_address = 0x61, | 772 | .tuner_address = 0x61, |
801 | .tuner_config = 2, | ||
802 | .antenna_switch = 1, | 773 | .antenna_switch = 1, |
803 | .request_firmware = philips_tda1004x_request_firmware | 774 | .request_firmware = philips_tda1004x_request_firmware |
804 | }; | 775 | }; |
@@ -826,9 +797,10 @@ static int ads_duo_tuner_sleep(struct dvb_frontend *fe) | |||
826 | } | 797 | } |
827 | 798 | ||
828 | static struct tda827x_config ads_duo_cfg = { | 799 | static struct tda827x_config ads_duo_cfg = { |
829 | .lna_gain = philips_tda827x_lna_gain, | 800 | .tuner_callback = saa7134_tuner_callback, |
830 | .init = ads_duo_tuner_init, | 801 | .init = ads_duo_tuner_init, |
831 | .sleep = ads_duo_tuner_sleep | 802 | .sleep = ads_duo_tuner_sleep, |
803 | .config = 0 | ||
832 | }; | 804 | }; |
833 | 805 | ||
834 | static struct tda1004x_config ads_tech_duo_config = { | 806 | static struct tda1004x_config ads_tech_duo_config = { |
@@ -981,7 +953,7 @@ static int dvb_init(struct saa7134_dev *dev) | |||
981 | break; | 953 | break; |
982 | case SAA7134_BOARD_FLYDVBTDUO: | 954 | case SAA7134_BOARD_FLYDVBTDUO: |
983 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: | 955 | case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: |
984 | configure_tda827x_fe(dev, &tda827x_lifeview_config); | 956 | configure_tda827x_fe(dev, &tda827x_lifeview_config, &tda827x_cfg_0); |
985 | break; | 957 | break; |
986 | case SAA7134_BOARD_PHILIPS_EUROPA: | 958 | case SAA7134_BOARD_PHILIPS_EUROPA: |
987 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: | 959 | case SAA7134_BOARD_VIDEOMATE_DVBT_300: |
@@ -1006,27 +978,27 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1006 | } | 978 | } |
1007 | break; | 979 | break; |
1008 | case SAA7134_BOARD_KWORLD_DVBT_210: | 980 | case SAA7134_BOARD_KWORLD_DVBT_210: |
1009 | configure_tda827x_fe(dev, &kworld_dvb_t_210_config); | 981 | configure_tda827x_fe(dev, &kworld_dvb_t_210_config, &tda827x_cfg_2); |
1010 | break; | 982 | break; |
1011 | case SAA7134_BOARD_PHILIPS_TIGER: | 983 | case SAA7134_BOARD_PHILIPS_TIGER: |
1012 | configure_tda827x_fe(dev, &philips_tiger_config); | 984 | configure_tda827x_fe(dev, &philips_tiger_config, &tda827x_cfg_0); |
1013 | break; | 985 | break; |
1014 | case SAA7134_BOARD_PINNACLE_PCTV_310i: | 986 | case SAA7134_BOARD_PINNACLE_PCTV_310i: |
1015 | configure_tda827x_fe(dev, &pinnacle_pctv_310i_config); | 987 | configure_tda827x_fe(dev, &pinnacle_pctv_310i_config, &tda827x_cfg_1); |
1016 | break; | 988 | break; |
1017 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: | 989 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: |
1018 | configure_tda827x_fe(dev, &hauppauge_hvr_1110_config); | 990 | configure_tda827x_fe(dev, &hauppauge_hvr_1110_config, &tda827x_cfg_1); |
1019 | break; | 991 | break; |
1020 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 992 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
1021 | configure_tda827x_fe(dev, &asus_p7131_dual_config); | 993 | configure_tda827x_fe(dev, &asus_p7131_dual_config, &tda827x_cfg_0); |
1022 | break; | 994 | break; |
1023 | case SAA7134_BOARD_FLYDVBT_LR301: | 995 | case SAA7134_BOARD_FLYDVBT_LR301: |
1024 | configure_tda827x_fe(dev, &tda827x_lifeview_config); | 996 | configure_tda827x_fe(dev, &tda827x_lifeview_config, &tda827x_cfg_0); |
1025 | break; | 997 | break; |
1026 | case SAA7134_BOARD_FLYDVB_TRIO: | 998 | case SAA7134_BOARD_FLYDVB_TRIO: |
1027 | if(! use_frontend) { /* terrestrial */ | 999 | if(! use_frontend) { /* terrestrial */ |
1028 | configure_tda827x_fe(dev, &lifeview_trio_config); | 1000 | configure_tda827x_fe(dev, &lifeview_trio_config, &tda827x_cfg_0); |
1029 | } else { /* satellite */ | 1001 | } else { /* satellite */ |
1030 | dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap); | 1002 | dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap); |
1031 | if (dev->dvb.frontend) { | 1003 | if (dev->dvb.frontend) { |
1032 | if (dvb_attach(tda826x_attach, dev->dvb.frontend, 0x63, | 1004 | if (dvb_attach(tda826x_attach, dev->dvb.frontend, 0x63, |
@@ -1047,19 +1019,19 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1047 | &dev->i2c_adap); | 1019 | &dev->i2c_adap); |
1048 | if (dev->dvb.frontend) { | 1020 | if (dev->dvb.frontend) { |
1049 | if (dvb_attach(tda827x_attach,dev->dvb.frontend, | 1021 | if (dvb_attach(tda827x_attach,dev->dvb.frontend, |
1050 | ads_tech_duo_config.tuner_address, | 1022 | ads_tech_duo_config.tuner_address, &dev->i2c_adap, |
1051 | &dev->i2c_adap,&ads_duo_cfg) == NULL) { | 1023 | &ads_duo_cfg) == NULL) { |
1052 | wprintk("no tda827x tuner found at addr: %02x\n", | 1024 | wprintk("no tda827x tuner found at addr: %02x\n", |
1053 | ads_tech_duo_config.tuner_address); | 1025 | ads_tech_duo_config.tuner_address); |
1054 | } | 1026 | } |
1055 | } | 1027 | } |
1056 | break; | 1028 | break; |
1057 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 1029 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
1058 | configure_tda827x_fe(dev, &tevion_dvbt220rf_config); | 1030 | configure_tda827x_fe(dev, &tevion_dvbt220rf_config, &tda827x_cfg_0); |
1059 | break; | 1031 | break; |
1060 | case SAA7134_BOARD_MEDION_MD8800_QUADRO: | 1032 | case SAA7134_BOARD_MEDION_MD8800_QUADRO: |
1061 | if (!use_frontend) { /* terrestrial */ | 1033 | if (!use_frontend) { /* terrestrial */ |
1062 | configure_tda827x_fe(dev, &md8800_dvbt_config); | 1034 | configure_tda827x_fe(dev, &md8800_dvbt_config, &tda827x_cfg_0); |
1063 | } else { /* satellite */ | 1035 | } else { /* satellite */ |
1064 | dev->dvb.frontend = dvb_attach(tda10086_attach, | 1036 | dev->dvb.frontend = dvb_attach(tda10086_attach, |
1065 | &flydvbs, &dev->i2c_adap); | 1037 | &flydvbs, &dev->i2c_adap); |
@@ -1148,25 +1120,25 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1148 | } | 1120 | } |
1149 | break; | 1121 | break; |
1150 | case SAA7134_BOARD_CINERGY_HT_PCMCIA: | 1122 | case SAA7134_BOARD_CINERGY_HT_PCMCIA: |
1151 | configure_tda827x_fe(dev, &cinergy_ht_config); | 1123 | configure_tda827x_fe(dev, &cinergy_ht_config, &tda827x_cfg_0); |
1152 | break; | 1124 | break; |
1153 | case SAA7134_BOARD_CINERGY_HT_PCI: | 1125 | case SAA7134_BOARD_CINERGY_HT_PCI: |
1154 | configure_tda827x_fe(dev, &cinergy_ht_pci_config); | 1126 | configure_tda827x_fe(dev, &cinergy_ht_pci_config, &tda827x_cfg_0); |
1155 | break; | 1127 | break; |
1156 | case SAA7134_BOARD_PHILIPS_TIGER_S: | 1128 | case SAA7134_BOARD_PHILIPS_TIGER_S: |
1157 | configure_tda827x_fe(dev, &philips_tiger_s_config); | 1129 | configure_tda827x_fe(dev, &philips_tiger_s_config, &tda827x_cfg_2); |
1158 | break; | 1130 | break; |
1159 | case SAA7134_BOARD_ASUS_P7131_4871: | 1131 | case SAA7134_BOARD_ASUS_P7131_4871: |
1160 | configure_tda827x_fe(dev, &asus_p7131_4871_config); | 1132 | configure_tda827x_fe(dev, &asus_p7131_4871_config, &tda827x_cfg_2); |
1161 | break; | 1133 | break; |
1162 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: | 1134 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: |
1163 | configure_tda827x_fe(dev, &asus_p7131_hybrid_lna_config); | 1135 | configure_tda827x_fe(dev, &asus_p7131_hybrid_lna_config, &tda827x_cfg_2); |
1164 | break; | 1136 | break; |
1165 | case SAA7134_BOARD_AVERMEDIA_SUPER_007: | 1137 | case SAA7134_BOARD_AVERMEDIA_SUPER_007: |
1166 | configure_tda827x_fe(dev, &avermedia_super_007_config); | 1138 | configure_tda827x_fe(dev, &avermedia_super_007_config, &tda827x_cfg_0); |
1167 | break; | 1139 | break; |
1168 | case SAA7134_BOARD_TWINHAN_DTV_DVB_3056: | 1140 | case SAA7134_BOARD_TWINHAN_DTV_DVB_3056: |
1169 | configure_tda827x_fe(dev, &twinhan_dtv_dvb_3056_config); | 1141 | configure_tda827x_fe(dev, &twinhan_dtv_dvb_3056_config, &tda827x_cfg_2_sw42); |
1170 | break; | 1142 | break; |
1171 | case SAA7134_BOARD_PHILIPS_SNAKE: | 1143 | case SAA7134_BOARD_PHILIPS_SNAKE: |
1172 | dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, | 1144 | dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, |
@@ -1181,10 +1153,10 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1181 | } | 1153 | } |
1182 | break; | 1154 | break; |
1183 | case SAA7134_BOARD_CREATIX_CTX953: | 1155 | case SAA7134_BOARD_CREATIX_CTX953: |
1184 | configure_tda827x_fe(dev, &md8800_dvbt_config); | 1156 | configure_tda827x_fe(dev, &md8800_dvbt_config, &tda827x_cfg_0); |
1185 | break; | 1157 | break; |
1186 | case SAA7134_BOARD_MSI_TVANYWHERE_AD11: | 1158 | case SAA7134_BOARD_MSI_TVANYWHERE_AD11: |
1187 | configure_tda827x_fe(dev, &philips_tiger_s_config); | 1159 | configure_tda827x_fe(dev, &philips_tiger_s_config, &tda827x_cfg_2); |
1188 | break; | 1160 | break; |
1189 | case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: | 1161 | case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: |
1190 | dev->dvb.frontend = dvb_attach(mt352_attach, | 1162 | dev->dvb.frontend = dvb_attach(mt352_attach, |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index ecc5243da57e..a0baf2d0ba7f 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -626,13 +626,8 @@ void saa7134_set_tvnorm_hw(struct saa7134_dev *dev) | |||
626 | { | 626 | { |
627 | saa7134_set_decoder(dev); | 627 | saa7134_set_decoder(dev); |
628 | 628 | ||
629 | if (card_in(dev, dev->ctl_input).tv) { | 629 | if (card_in(dev, dev->ctl_input).tv) |
630 | if ((card(dev).tuner_type == TUNER_PHILIPS_TDA8290) | ||
631 | && ((card(dev).tuner_config == 1) | ||
632 | || (card(dev).tuner_config == 2))) | ||
633 | saa7134_set_gpio(dev, 22, 5); | ||
634 | saa7134_i2c_call_clients(dev, VIDIOC_S_STD, &dev->tvnorm->id); | 630 | saa7134_i2c_call_clients(dev, VIDIOC_S_STD, &dev->tvnorm->id); |
635 | } | ||
636 | } | 631 | } |
637 | 632 | ||
638 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) | 633 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) |
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 6f2449ab46a0..89afb19c9468 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -172,7 +172,7 @@ static void tda8290_set_params(struct dvb_frontend *fe, | |||
172 | set_audio(fe, params); | 172 | set_audio(fe, params); |
173 | 173 | ||
174 | if (priv->cfg.config) | 174 | if (priv->cfg.config) |
175 | tuner_dbg("tda827xa config is 0x%02x\n", *priv->cfg.config); | 175 | tuner_dbg("tda827xa config is 0x%02x\n", priv->cfg.config); |
176 | tuner_i2c_xfer_send(&priv->i2c_props, easy_mode, 2); | 176 | tuner_i2c_xfer_send(&priv->i2c_props, easy_mode, 2); |
177 | tuner_i2c_xfer_send(&priv->i2c_props, agc_out_on, 2); | 177 | tuner_i2c_xfer_send(&priv->i2c_props, agc_out_on, 2); |
178 | tuner_i2c_xfer_send(&priv->i2c_props, soft_reset, 2); | 178 | tuner_i2c_xfer_send(&priv->i2c_props, soft_reset, 2); |
@@ -442,8 +442,7 @@ static void tda8290_init_if(struct dvb_frontend *fe) | |||
442 | unsigned char set_GP00_CF[] = { 0x20, 0x01 }; | 442 | unsigned char set_GP00_CF[] = { 0x20, 0x01 }; |
443 | unsigned char set_GP01_CF[] = { 0x20, 0x0B }; | 443 | unsigned char set_GP01_CF[] = { 0x20, 0x0B }; |
444 | 444 | ||
445 | if ((priv->cfg.config) && | 445 | if ((priv->cfg.config == 1) || (priv->cfg.config == 2)) |
446 | ((*priv->cfg.config == 1) || (*priv->cfg.config == 2))) | ||
447 | tuner_i2c_xfer_send(&priv->i2c_props, set_GP00_CF, 2); | 446 | tuner_i2c_xfer_send(&priv->i2c_props, set_GP00_CF, 2); |
448 | else | 447 | else |
449 | tuner_i2c_xfer_send(&priv->i2c_props, set_GP01_CF, 2); | 448 | tuner_i2c_xfer_send(&priv->i2c_props, set_GP01_CF, 2); |
@@ -588,8 +587,8 @@ static int tda829x_find_tuner(struct dvb_frontend *fe) | |||
588 | else | 587 | else |
589 | priv->ver |= TDA8275A; | 588 | priv->ver |= TDA8275A; |
590 | 589 | ||
591 | tda827x_attach(fe, priv->tda827x_addr, | 590 | tda827x_attach(fe, priv->tda827x_addr, priv->i2c_props.adap, &priv->cfg); |
592 | priv->i2c_props.adap, &priv->cfg); | 591 | priv->cfg.switch_addr = priv->i2c_props.addr; |
593 | } | 592 | } |
594 | if (fe->ops.tuner_ops.init) | 593 | if (fe->ops.tuner_ops.init) |
595 | fe->ops.tuner_ops.init(fe); | 594 | fe->ops.tuner_ops.init(fe); |
diff --git a/drivers/media/video/tda8290.h b/drivers/media/video/tda8290.h index dc8ef310b7b2..9dd8b73eb8c6 100644 --- a/drivers/media/video/tda8290.h +++ b/drivers/media/video/tda8290.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "dvb_frontend.h" | 21 | #include "dvb_frontend.h" |
22 | 22 | ||
23 | struct tda829x_config { | 23 | struct tda829x_config { |
24 | unsigned int *lna_cfg; | 24 | unsigned int lna_cfg; |
25 | int (*tuner_callback) (void *dev, int command, int arg); | 25 | int (*tuner_callback) (void *dev, int command, int arg); |
26 | 26 | ||
27 | unsigned int probe_tuner:1; | 27 | unsigned int probe_tuner:1; |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 335a971298a3..4b936b809d78 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -320,7 +320,7 @@ static void tuner_i2c_address_check(struct tuner *t) | |||
320 | static void attach_tda829x(struct tuner *t) | 320 | static void attach_tda829x(struct tuner *t) |
321 | { | 321 | { |
322 | struct tda829x_config cfg = { | 322 | struct tda829x_config cfg = { |
323 | .lna_cfg = &t->config, | 323 | .lna_cfg = t->config, |
324 | .tuner_callback = t->tuner_callback, | 324 | .tuner_callback = t->tuner_callback, |
325 | }; | 325 | }; |
326 | tda829x_attach(&t->fe, t->i2c->adapter, t->i2c->addr, &cfg); | 326 | tda829x_attach(&t->fe, t->i2c->adapter, t->i2c->addr, &cfg); |