diff options
author | Timothy Lee <timothy.lee@siriushk.com> | 2011-03-25 14:00:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:28:22 -0400 |
commit | ce02704d48767bdd31eb0b804b1d45da5b683a8c (patch) | |
tree | 0377224fecd99ada63d15086222268cdf4dadc9c | |
parent | 5398b622152767aa70f2ac92d952c4c045aa86b5 (diff) |
[media] saa7134: support MagicPro ProHDTV Pro2 Hybrid DMB-TH PCI card
This card has a TD18271 silicon tuner, and uses TDA8290 and LGS8G75 to
demodulate analog and digital broadcast respectively. GPIO configurations
were derived using DScaler regspy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 54 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 34 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 |
3 files changed, 89 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 50f1be05ebd3..a41c72cc76c0 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5591,6 +5591,47 @@ struct saa7134_board saa7134_boards[] = { | |||
5591 | .amux = TV, | 5591 | .amux = TV, |
5592 | }, | 5592 | }, |
5593 | }, | 5593 | }, |
5594 | [SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2] = { | ||
5595 | /* Timothy Lee <timothy.lee@siriushk.com> */ | ||
5596 | .name = "MagicPro ProHDTV Pro2 DMB-TH/Hybrid", | ||
5597 | .audio_clock = 0x00187de7, | ||
5598 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
5599 | .radio_type = UNSET, | ||
5600 | .tuner_config = 3, | ||
5601 | .tuner_addr = ADDR_UNSET, | ||
5602 | .radio_addr = ADDR_UNSET, | ||
5603 | .gpiomask = 0x02050000, | ||
5604 | .mpeg = SAA7134_MPEG_DVB, | ||
5605 | .ts_type = SAA7134_MPEG_TS_PARALLEL, | ||
5606 | .inputs = { { | ||
5607 | .name = name_tv, | ||
5608 | .vmux = 1, | ||
5609 | .amux = TV, | ||
5610 | .tv = 1, | ||
5611 | .gpio = 0x00050000, | ||
5612 | }, { | ||
5613 | .name = name_comp1, | ||
5614 | .vmux = 3, | ||
5615 | .amux = LINE1, | ||
5616 | .gpio = 0x00050000, | ||
5617 | }, { | ||
5618 | .name = name_svideo, | ||
5619 | .vmux = 8, | ||
5620 | .amux = LINE1, | ||
5621 | .gpio = 0x00050000, | ||
5622 | } }, | ||
5623 | .radio = { | ||
5624 | .name = name_radio, | ||
5625 | .amux = TV, | ||
5626 | .gpio = 0x00050000, | ||
5627 | }, | ||
5628 | .mute = { | ||
5629 | .name = name_mute, | ||
5630 | .vmux = 0, | ||
5631 | .amux = TV, | ||
5632 | .gpio = 0x00050000, | ||
5633 | }, | ||
5634 | }, | ||
5594 | 5635 | ||
5595 | }; | 5636 | }; |
5596 | 5637 | ||
@@ -6796,6 +6837,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
6796 | .subdevice = 0xc900, | 6837 | .subdevice = 0xc900, |
6797 | .driver_data = SAA7134_BOARD_VIDEOMATE_M1F, | 6838 | .driver_data = SAA7134_BOARD_VIDEOMATE_M1F, |
6798 | }, { | 6839 | }, { |
6840 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
6841 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | ||
6842 | .subvendor = 0x17de, | ||
6843 | .subdevice = 0xd136, | ||
6844 | .driver_data = SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2, | ||
6845 | }, { | ||
6799 | /* --- boards without eeprom + subsystem ID --- */ | 6846 | /* --- boards without eeprom + subsystem ID --- */ |
6800 | .vendor = PCI_VENDOR_ID_PHILIPS, | 6847 | .vendor = PCI_VENDOR_ID_PHILIPS, |
6801 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 6848 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
@@ -6988,6 +7035,7 @@ static int saa7134_tda8290_18271_callback(struct saa7134_dev *dev, | |||
6988 | switch (dev->board) { | 7035 | switch (dev->board) { |
6989 | case SAA7134_BOARD_HAUPPAUGE_HVR1150: | 7036 | case SAA7134_BOARD_HAUPPAUGE_HVR1150: |
6990 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: | 7037 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: |
7038 | case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2: | ||
6991 | ret = saa7134_tda18271_hvr11x0_toggle_agc(dev, arg); | 7039 | ret = saa7134_tda18271_hvr11x0_toggle_agc(dev, arg); |
6992 | break; | 7040 | break; |
6993 | case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: | 7041 | case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: |
@@ -7014,6 +7062,7 @@ static int saa7134_tda8290_callback(struct saa7134_dev *dev, | |||
7014 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: | 7062 | case SAA7134_BOARD_HAUPPAUGE_HVR1120: |
7015 | case SAA7134_BOARD_AVERMEDIA_M733A: | 7063 | case SAA7134_BOARD_AVERMEDIA_M733A: |
7016 | case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: | 7064 | case SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG: |
7065 | case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2: | ||
7017 | /* tda8290 + tda18271 */ | 7066 | /* tda8290 + tda18271 */ |
7018 | ret = saa7134_tda8290_18271_callback(dev, command, arg); | 7067 | ret = saa7134_tda8290_18271_callback(dev, command, arg); |
7019 | break; | 7068 | break; |
@@ -7326,6 +7375,11 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
7326 | saa7134_set_gpio(dev, 1, 1); | 7375 | saa7134_set_gpio(dev, 1, 1); |
7327 | dev->has_remote = SAA7134_REMOTE_GPIO; | 7376 | dev->has_remote = SAA7134_REMOTE_GPIO; |
7328 | break; | 7377 | break; |
7378 | case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2: | ||
7379 | /* enable LGS-8G75 */ | ||
7380 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x0e050000, 0x0c050000); | ||
7381 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0e050000, 0x0c050000); | ||
7382 | break; | ||
7329 | } | 7383 | } |
7330 | return 0; | 7384 | return 0; |
7331 | } | 7385 | } |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index f65cad287b83..996a206c6d79 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "lgdt3305.h" | 53 | #include "lgdt3305.h" |
54 | #include "tda8290.h" | 54 | #include "tda8290.h" |
55 | #include "mb86a20s.h" | 55 | #include "mb86a20s.h" |
56 | #include "lgs8gxx.h" | ||
56 | 57 | ||
57 | #include "zl10353.h" | 58 | #include "zl10353.h" |
58 | 59 | ||
@@ -1123,6 +1124,26 @@ static struct tda18271_config dtv1000s_tda18271_config = { | |||
1123 | .gate = TDA18271_GATE_ANALOG, | 1124 | .gate = TDA18271_GATE_ANALOG, |
1124 | }; | 1125 | }; |
1125 | 1126 | ||
1127 | static struct lgs8gxx_config prohdtv_pro2_lgs8g75_config = { | ||
1128 | .prod = LGS8GXX_PROD_LGS8G75, | ||
1129 | .demod_address = 0x1d, | ||
1130 | .serial_ts = 0, | ||
1131 | .ts_clk_pol = 1, | ||
1132 | .ts_clk_gated = 0, | ||
1133 | .if_clk_freq = 30400, /* 30.4 MHz */ | ||
1134 | .if_freq = 4000, /* 4.00 MHz */ | ||
1135 | .if_neg_center = 0, | ||
1136 | .ext_adc = 0, | ||
1137 | .adc_signed = 1, | ||
1138 | .adc_vpp = 3, /* 2.0 Vpp */ | ||
1139 | .if_neg_edge = 1, | ||
1140 | }; | ||
1141 | |||
1142 | static struct tda18271_config prohdtv_pro2_tda18271_config = { | ||
1143 | .gate = TDA18271_GATE_ANALOG, | ||
1144 | .output_opt = TDA18271_OUTPUT_LT_OFF, | ||
1145 | }; | ||
1146 | |||
1126 | /* ================================================================== | 1147 | /* ================================================================== |
1127 | * Core code | 1148 | * Core code |
1128 | */ | 1149 | */ |
@@ -1674,6 +1695,19 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1674 | 1695 | ||
1675 | /* mb86a20s need to use the I2C gateway */ | 1696 | /* mb86a20s need to use the I2C gateway */ |
1676 | break; | 1697 | break; |
1698 | case SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2: | ||
1699 | fe0->dvb.frontend = dvb_attach(lgs8gxx_attach, | ||
1700 | &prohdtv_pro2_lgs8g75_config, | ||
1701 | &dev->i2c_adap); | ||
1702 | if (fe0->dvb.frontend != NULL) { | ||
1703 | dvb_attach(tda829x_attach, fe0->dvb.frontend, | ||
1704 | &dev->i2c_adap, 0x4b, | ||
1705 | &tda829x_no_probe); | ||
1706 | dvb_attach(tda18271_attach, fe0->dvb.frontend, | ||
1707 | 0x60, &dev->i2c_adap, | ||
1708 | &prohdtv_pro2_tda18271_config); | ||
1709 | } | ||
1710 | break; | ||
1677 | default: | 1711 | default: |
1678 | wprintk("Huh? unknown DVB card?\n"); | 1712 | wprintk("Huh? unknown DVB card?\n"); |
1679 | break; | 1713 | break; |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index f96cd5d761f9..0385d0bd7f7f 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -328,6 +328,7 @@ struct saa7134_card_ir { | |||
328 | #define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182 | 328 | #define SAA7134_BOARD_KWORLD_PCI_SBTVD_FULLSEG 182 |
329 | #define SAA7134_BOARD_VIDEOMATE_M1F 183 | 329 | #define SAA7134_BOARD_VIDEOMATE_M1F 183 |
330 | #define SAA7134_BOARD_ENCORE_ENLTV_FM3 184 | 330 | #define SAA7134_BOARD_ENCORE_ENLTV_FM3 184 |
331 | #define SAA7134_BOARD_MAGICPRO_PROHDTV_PRO2 185 | ||
331 | 332 | ||
332 | #define SAA7134_MAXBOARDS 32 | 333 | #define SAA7134_MAXBOARDS 32 |
333 | #define SAA7134_INPUT_MAX 8 | 334 | #define SAA7134_INPUT_MAX 8 |