diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-cards.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 78 |
1 files changed, 69 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 4399d1371cc1..782832e7ed6d 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2543,10 +2543,10 @@ struct saa7134_board saa7134_boards[] = { | |||
2543 | .name = "Philips Tiger reference design", | 2543 | .name = "Philips Tiger reference design", |
2544 | .audio_clock = 0x00187de7, | 2544 | .audio_clock = 0x00187de7, |
2545 | .tuner_type = TUNER_PHILIPS_TDA8290, | 2545 | .tuner_type = TUNER_PHILIPS_TDA8290, |
2546 | .tuner_config = 0, | ||
2547 | .radio_type = UNSET, | 2546 | .radio_type = UNSET, |
2548 | .tuner_addr = ADDR_UNSET, | 2547 | .tuner_addr = ADDR_UNSET, |
2549 | .radio_addr = ADDR_UNSET, | 2548 | .radio_addr = ADDR_UNSET, |
2549 | .tuner_config = 0, | ||
2550 | .mpeg = SAA7134_MPEG_DVB, | 2550 | .mpeg = SAA7134_MPEG_DVB, |
2551 | .gpiomask = 0x0200000, | 2551 | .gpiomask = 0x0200000, |
2552 | .inputs = {{ | 2552 | .inputs = {{ |
@@ -2625,7 +2625,7 @@ struct saa7134_board saa7134_boards[] = { | |||
2625 | }}, | 2625 | }}, |
2626 | .radio = { | 2626 | .radio = { |
2627 | .name = name_radio, | 2627 | .name = name_radio, |
2628 | .amux = LINE1, | 2628 | .amux = TV, |
2629 | .gpio = 0x0200000, | 2629 | .gpio = 0x0200000, |
2630 | }, | 2630 | }, |
2631 | }, | 2631 | }, |
@@ -3044,6 +3044,7 @@ struct saa7134_board saa7134_boards[] = { | |||
3044 | .radio_type = UNSET, | 3044 | .radio_type = UNSET, |
3045 | .tuner_addr = ADDR_UNSET, | 3045 | .tuner_addr = ADDR_UNSET, |
3046 | .radio_addr = ADDR_UNSET, | 3046 | .radio_addr = ADDR_UNSET, |
3047 | .tuner_config = 1, | ||
3047 | .mpeg = SAA7134_MPEG_DVB, | 3048 | .mpeg = SAA7134_MPEG_DVB, |
3048 | .gpiomask = 0x000200000, | 3049 | .gpiomask = 0x000200000, |
3049 | .inputs = {{ | 3050 | .inputs = {{ |
@@ -3290,6 +3291,36 @@ struct saa7134_board saa7134_boards[] = { | |||
3290 | .amux = LINE1, | 3291 | .amux = LINE1, |
3291 | }}, | 3292 | }}, |
3292 | }, | 3293 | }, |
3294 | [SAA7134_BOARD_PHILIPS_TIGER_S] = { | ||
3295 | .name = "Philips Tiger - S Reference design", | ||
3296 | .audio_clock = 0x00187de7, | ||
3297 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
3298 | .radio_type = UNSET, | ||
3299 | .tuner_addr = ADDR_UNSET, | ||
3300 | .radio_addr = ADDR_UNSET, | ||
3301 | .tuner_config = 2, | ||
3302 | .mpeg = SAA7134_MPEG_DVB, | ||
3303 | .gpiomask = 0x0200000, | ||
3304 | .inputs = {{ | ||
3305 | .name = name_tv, | ||
3306 | .vmux = 1, | ||
3307 | .amux = TV, | ||
3308 | .tv = 1, | ||
3309 | },{ | ||
3310 | .name = name_comp1, | ||
3311 | .vmux = 3, | ||
3312 | .amux = LINE1, | ||
3313 | },{ | ||
3314 | .name = name_svideo, | ||
3315 | .vmux = 8, | ||
3316 | .amux = LINE1, | ||
3317 | }}, | ||
3318 | .radio = { | ||
3319 | .name = name_radio, | ||
3320 | .amux = TV, | ||
3321 | .gpio = 0x0200000, | ||
3322 | }, | ||
3323 | }, | ||
3293 | }; | 3324 | }; |
3294 | 3325 | ||
3295 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 3326 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -4104,8 +4135,8 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
4104 | break; | 4135 | break; |
4105 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: | 4136 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: |
4106 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: | 4137 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: |
4107 | saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); | 4138 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x08000000, 0x08000000); |
4108 | saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); | 4139 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000); |
4109 | break; | 4140 | break; |
4110 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: | 4141 | case SAA7134_BOARD_AVERMEDIA_CARDBUS: |
4111 | /* power-up tuner chip */ | 4142 | /* power-up tuner chip */ |
@@ -4168,6 +4199,8 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4168 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; | 4199 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; |
4169 | tun_setup.type = dev->tuner_type; | 4200 | tun_setup.type = dev->tuner_type; |
4170 | tun_setup.addr = ADDR_UNSET; | 4201 | tun_setup.addr = ADDR_UNSET; |
4202 | tun_setup.config = 0; | ||
4203 | tun_setup.gpio_func = NULL; | ||
4171 | 4204 | ||
4172 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup); | 4205 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup); |
4173 | } | 4206 | } |
@@ -4235,6 +4268,8 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4235 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; | 4268 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; |
4236 | tun_setup.type = dev->tuner_type; | 4269 | tun_setup.type = dev->tuner_type; |
4237 | tun_setup.addr = ADDR_UNSET; | 4270 | tun_setup.addr = ADDR_UNSET; |
4271 | tun_setup.config = 0; | ||
4272 | tun_setup.gpio_func = NULL; | ||
4238 | 4273 | ||
4239 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); | 4274 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); |
4240 | } | 4275 | } |
@@ -4254,11 +4289,36 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4254 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; | 4289 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; |
4255 | tun_setup.type = dev->tuner_type; | 4290 | tun_setup.type = dev->tuner_type; |
4256 | tun_setup.addr = dev->tuner_addr; | 4291 | tun_setup.addr = dev->tuner_addr; |
4292 | tun_setup.config = 0; | ||
4293 | tun_setup.gpio_func = NULL; | ||
4257 | 4294 | ||
4258 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); | 4295 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); |
4259 | } | 4296 | } |
4260 | break; | 4297 | break; |
4261 | case SAA7134_BOARD_PHILIPS_TIGER: | 4298 | case SAA7134_BOARD_PHILIPS_TIGER: |
4299 | case SAA7134_BOARD_PHILIPS_TIGER_S: | ||
4300 | { | ||
4301 | u8 data[] = { 0x3c, 0x33, 0x60}; | ||
4302 | struct tuner_setup tun_setup; | ||
4303 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | ||
4304 | if(dev->autodetected && (dev->eedata[0x49] == 0x50)) { | ||
4305 | dev->board = SAA7134_BOARD_PHILIPS_TIGER_S; | ||
4306 | printk(KERN_INFO "%s: Reconfigured board as %s\n", | ||
4307 | dev->name, saa7134_boards[dev->board].name); | ||
4308 | } | ||
4309 | if(dev->board == SAA7134_BOARD_PHILIPS_TIGER_S) { | ||
4310 | tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV; | ||
4311 | tun_setup.type = TUNER_PHILIPS_TDA8290; | ||
4312 | tun_setup.addr = 0x4b; | ||
4313 | tun_setup.config = 2; | ||
4314 | tun_setup.gpio_func = (tuner_gpio_func_t) saa7134_set_gpio; | ||
4315 | |||
4316 | saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup); | ||
4317 | data[2] = 0x68; | ||
4318 | } | ||
4319 | i2c_transfer(&dev->i2c_adap, &msg, 1); | ||
4320 | } | ||
4321 | break; | ||
4262 | case SAA7134_BOARD_PINNACLE_PCTV_310i: | 4322 | case SAA7134_BOARD_PINNACLE_PCTV_310i: |
4263 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 4323 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
4264 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 4324 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
@@ -4268,7 +4328,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4268 | * and configure firmware eeprom address | 4328 | * and configure firmware eeprom address |
4269 | */ | 4329 | */ |
4270 | { | 4330 | { |
4271 | u8 data[] = { 0x3c, 0x33, 0x68}; | 4331 | u8 data[] = { 0x3c, 0x33, 0x60}; |
4272 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | 4332 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; |
4273 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 4333 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
4274 | } | 4334 | } |
@@ -4282,18 +4342,18 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4282 | break; | 4342 | break; |
4283 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: | 4343 | case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: |
4284 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: | 4344 | case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: |
4285 | /* make the tda10046 find its eeprom */ | 4345 | /* initialize analog mode */ |
4286 | { | 4346 | { |
4287 | u8 data[] = { 0x3c, 0x33, 0x62}; | 4347 | u8 data[] = { 0x3c, 0x33, 0x6a}; |
4288 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | 4348 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; |
4289 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 4349 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
4290 | } | 4350 | } |
4291 | break; | 4351 | break; |
4292 | case SAA7134_BOARD_CINERGY_HT_PCMCIA: | 4352 | case SAA7134_BOARD_CINERGY_HT_PCMCIA: |
4293 | case SAA7134_BOARD_CINERGY_HT_PCI: | 4353 | case SAA7134_BOARD_CINERGY_HT_PCI: |
4294 | /* make the tda10046 find its eeprom */ | 4354 | /* initialize analog mode */ |
4295 | { | 4355 | { |
4296 | u8 data[] = { 0x3c, 0x33, 0x60}; | 4356 | u8 data[] = { 0x3c, 0x33, 0x68}; |
4297 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; | 4357 | struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; |
4298 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 4358 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
4299 | } | 4359 | } |