aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t\-online.de>2006-02-07 03:49:10 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 03:49:10 -0500
commitdf42eaf2b2f2c43969d879dbcafa698c666fe8a9 (patch)
tree7cbfeaf66d839d29f682cfc7356bd8cca0116965
parent0eb3de20a1cec67547951cebc4fcddc701e7428b (diff)
V4L/DVB (3305): Added support for the ADS Instant TV DUO Cardbus PTV331
Analog and DVB-T are working, Remote not yet. This card is based on the new LifeView design, there should be many variants. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c36
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c43
-rw-r--r--drivers/media/video/saa7134/saa7134.h1
4 files changed, 80 insertions, 1 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 1823e4ced087..ee1618deadf2 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -85,3 +85,4 @@
85 84 -> LifeView FlyDVB Trio [5168:0319] 85 84 -> LifeView FlyDVB Trio [5168:0319]
86 85 -> AverTV DVB-T 777 [1461:2c05] 86 85 -> AverTV DVB-T 777 [1461:2c05]
87 86 -> LifeView FlyDVB-T [5168:0301] 87 86 -> LifeView FlyDVB-T [5168:0301]
88 87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421]
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index f469f17a25cf..d65b9dd90342 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -2657,7 +2657,23 @@ struct saa7134_board saa7134_boards[] = {
2657 .amux = LINE2, 2657 .amux = LINE2,
2658 }}, 2658 }},
2659 }, 2659 },
2660 2660 [SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331] = {
2661 .name = "ADS Instant TV Duo Cardbus PTV331",
2662 .audio_clock = 0x00200000,
2663 .tuner_type = TUNER_PHILIPS_TDA8290,
2664 .radio_type = UNSET,
2665 .tuner_addr = ADDR_UNSET,
2666 .radio_addr = ADDR_UNSET,
2667 .mpeg = SAA7134_MPEG_DVB,
2668 .gpiomask = 0x00600000, /* Bit 21 0=Radio, Bit 22 0=TV */
2669 .inputs = {{
2670 .name = name_tv,
2671 .vmux = 1,
2672 .amux = TV,
2673 .tv = 1,
2674 .gpio = 0x00200000,
2675 }},
2676 },
2661}; 2677};
2662 2678
2663const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); 2679const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3141,6 +3157,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
3141 .subdevice = 0x0301, 3157 .subdevice = 0x0301,
3142 .driver_data = SAA7134_BOARD_FLYDVBT_LR301, 3158 .driver_data = SAA7134_BOARD_FLYDVBT_LR301,
3143 },{ 3159 },{
3160 .vendor = PCI_VENDOR_ID_PHILIPS,
3161 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
3162 .subvendor = 0x0331,
3163 .subdevice = 0x1421,
3164 .driver_data = SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331,
3165 },{
3144 /* --- boards without eeprom + subsystem ID --- */ 3166 /* --- boards without eeprom + subsystem ID --- */
3145 .vendor = PCI_VENDOR_ID_PHILIPS, 3167 .vendor = PCI_VENDOR_ID_PHILIPS,
3146 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, 3168 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3263,6 +3285,10 @@ int saa7134_board_init1(struct saa7134_dev *dev)
3263 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); 3285 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08);
3264 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06); 3286 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06);
3265 break; 3287 break;
3288 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
3289 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08);
3290 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00);
3291 break;
3266 case SAA7134_BOARD_AVERMEDIA_CARDBUS: 3292 case SAA7134_BOARD_AVERMEDIA_CARDBUS:
3267 /* power-up tuner chip */ 3293 /* power-up tuner chip */
3268 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); 3294 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff);
@@ -3413,6 +3439,14 @@ int saa7134_board_init2(struct saa7134_dev *dev)
3413 i2c_transfer(&dev->i2c_adap, &msg, 1); 3439 i2c_transfer(&dev->i2c_adap, &msg, 1);
3414 } 3440 }
3415 break; 3441 break;
3442 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
3443 /* make the tda10046 find its eeprom */
3444 {
3445 u8 data[] = { 0x3c, 0x33, 0x62};
3446 struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
3447 i2c_transfer(&dev->i2c_adap, &msg, 1);
3448 }
3449 break;
3416 } 3450 }
3417 return 0; 3451 return 0;
3418} 3452}
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index be110b85f097..a0c8fa393501 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -846,6 +846,45 @@ static struct tda1004x_config philips_tiger_config = {
846 .request_firmware = NULL, 846 .request_firmware = NULL,
847}; 847};
848 848
849/* ------------------------------------------------------------------ */
850
851static int ads_duo_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
852{
853 int ret;
854
855 ret = philips_tda827xa_pll_set(0x61, fe, params);
856 return ret;
857};
858
859static int ads_duo_dvb_mode(struct dvb_frontend *fe)
860{
861 struct saa7134_dev *dev = fe->dvb->priv;
862 /* route TDA8275a AGC input to the channel decoder */
863 saa_writeb(SAA7134_GPIO_GPSTATUS2, 0x60);
864 return 0;
865}
866
867static void ads_duo_analog_mode(struct dvb_frontend *fe)
868{
869 struct saa7134_dev *dev = fe->dvb->priv;
870 /* route TDA8275a AGC input to the analog IF chip*/
871 saa_writeb(SAA7134_GPIO_GPSTATUS2, 0x20);
872 philips_tda827xa_pll_sleep( 0x61, fe);
873}
874
875static struct tda1004x_config ads_tech_duo_config = {
876 .demod_address = 0x08,
877 .invert = 1,
878 .invert_oclk = 0,
879 .xtal_freq = TDA10046_XTAL_16M,
880 .agc_config = TDA10046_AGC_TDA827X_GPL,
881 .if_freq = TDA10046_FREQ_045,
882 .pll_init = ads_duo_dvb_mode,
883 .pll_set = ads_duo_pll_set,
884 .pll_sleep = ads_duo_analog_mode,
885 .request_firmware = NULL,
886};
887
849#endif 888#endif
850 889
851/* ------------------------------------------------------------------ */ 890/* ------------------------------------------------------------------ */
@@ -928,6 +967,10 @@ static int dvb_init(struct saa7134_dev *dev)
928 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, 967 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config,
929 &dev->i2c_adap); 968 &dev->i2c_adap);
930 break; 969 break;
970 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
971 dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config,
972 &dev->i2c_adap);
973 break;
931#endif 974#endif
932#ifdef HAVE_NXT200X 975#ifdef HAVE_NXT200X
933 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: 976 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index ed556e6e61a7..4b49ee03fc21 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -213,6 +213,7 @@ struct saa7134_format {
213#define SAA7134_BOARD_FLYDVB_TRIO 84 213#define SAA7134_BOARD_FLYDVB_TRIO 84
214#define SAA7134_BOARD_AVERMEDIA_777 85 214#define SAA7134_BOARD_AVERMEDIA_777 85
215#define SAA7134_BOARD_FLYDVBT_LR301 86 215#define SAA7134_BOARD_FLYDVBT_LR301 86
216#define SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331 87
216 217
217#define SAA7134_MAXBOARDS 8 218#define SAA7134_MAXBOARDS 8
218#define SAA7134_INPUT_MAX 8 219#define SAA7134_INPUT_MAX 8