summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-cards.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-04-27 12:31:12 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 15:43:32 -0300
commit58ef4f924cf2824ae198b1fec3eea1e4059a021c (patch)
treedc10d767ffc30857a183dacbc4d50a6deacee442 /drivers/media/video/saa7134/saa7134-cards.c
parentde956c1e0f89413a3837b642d592e2dff3e3eb78 (diff)
V4L/DVB (5314): Added support for tda827x tuners with preamlifiers
This patch contains - new tuning code for the tda827xa silicon tuner. - controls the preamplifier of some boards with this tuner. - support for the Philips Tiger S hybrid DVB-T reference design. - reworked the saa7134-dvb modulue to get rid of most of the small board specific functions. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-cards.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c78
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 4399d1371cc..782832e7ed6 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[] = {
.name = "Philips Tiger reference design",
.audio_clock = 0x00187de7,
.tuner_type = TUNER_PHILIPS_TDA8290,
- .tuner_config = 0,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
+ .tuner_config = 0,
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x0200000,
.inputs = {{
@@ -2625,7 +2625,7 @@ struct saa7134_board saa7134_boards[] = {
}},
.radio = {
.name = name_radio,
- .amux = LINE1,
+ .amux = TV,
.gpio = 0x0200000,
},
},
@@ -3044,6 +3044,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
+ .tuner_config = 1,
.mpeg = SAA7134_MPEG_DVB,
.gpiomask = 0x000200000,
.inputs = {{
@@ -3290,6 +3291,36 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
}},
},
+ [SAA7134_BOARD_PHILIPS_TIGER_S] = {
+ .name = "Philips Tiger - S Reference design",
+ .audio_clock = 0x00187de7,
+ .tuner_type = TUNER_PHILIPS_TDA8290,
+ .radio_type = UNSET,
+ .tuner_addr = ADDR_UNSET,
+ .radio_addr = ADDR_UNSET,
+ .tuner_config = 2,
+ .mpeg = SAA7134_MPEG_DVB,
+ .gpiomask = 0x0200000,
+ .inputs = {{
+ .name = name_tv,
+ .vmux = 1,
+ .amux = TV,
+ .tv = 1,
+ },{
+ .name = name_comp1,
+ .vmux = 3,
+ .amux = LINE1,
+ },{
+ .name = name_svideo,
+ .vmux = 8,
+ .amux = LINE1,
+ }},
+ .radio = {
+ .name = name_radio,
+ .amux = TV,
+ .gpio = 0x0200000,
+ },
+ },
};
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -4104,8 +4135,8 @@ int saa7134_board_init1(struct saa7134_dev *dev)
break;
case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS:
- saa_writeb(SAA7134_GPIO_GPMODE3, 0x08);
- saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00);
+ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x08000000, 0x08000000);
+ saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000);
break;
case SAA7134_BOARD_AVERMEDIA_CARDBUS:
/* power-up tuner chip */
@@ -4168,6 +4199,8 @@ int saa7134_board_init2(struct saa7134_dev *dev)
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = dev->tuner_type;
tun_setup.addr = ADDR_UNSET;
+ tun_setup.config = 0;
+ tun_setup.gpio_func = NULL;
saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup);
}
@@ -4235,6 +4268,8 @@ int saa7134_board_init2(struct saa7134_dev *dev)
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = dev->tuner_type;
tun_setup.addr = ADDR_UNSET;
+ tun_setup.config = 0;
+ tun_setup.gpio_func = NULL;
saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
}
@@ -4254,11 +4289,36 @@ int saa7134_board_init2(struct saa7134_dev *dev)
tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = dev->tuner_type;
tun_setup.addr = dev->tuner_addr;
+ tun_setup.config = 0;
+ tun_setup.gpio_func = NULL;
saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
}
break;
case SAA7134_BOARD_PHILIPS_TIGER:
+ case SAA7134_BOARD_PHILIPS_TIGER_S:
+ {
+ u8 data[] = { 0x3c, 0x33, 0x60};
+ struct tuner_setup tun_setup;
+ struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+ if(dev->autodetected && (dev->eedata[0x49] == 0x50)) {
+ dev->board = SAA7134_BOARD_PHILIPS_TIGER_S;
+ printk(KERN_INFO "%s: Reconfigured board as %s\n",
+ dev->name, saa7134_boards[dev->board].name);
+ }
+ if(dev->board == SAA7134_BOARD_PHILIPS_TIGER_S) {
+ tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
+ tun_setup.type = TUNER_PHILIPS_TDA8290;
+ tun_setup.addr = 0x4b;
+ tun_setup.config = 2;
+ tun_setup.gpio_func = (tuner_gpio_func_t) saa7134_set_gpio;
+
+ saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
+ data[2] = 0x68;
+ }
+ i2c_transfer(&dev->i2c_adap, &msg, 1);
+ }
+ break;
case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_TEVION_DVBT_220RF:
case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
@@ -4268,7 +4328,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
* and configure firmware eeprom address
*/
{
- u8 data[] = { 0x3c, 0x33, 0x68};
+ u8 data[] = { 0x3c, 0x33, 0x60};
struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
i2c_transfer(&dev->i2c_adap, &msg, 1);
}
@@ -4282,18 +4342,18 @@ int saa7134_board_init2(struct saa7134_dev *dev)
break;
case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS:
- /* make the tda10046 find its eeprom */
+ /* initialize analog mode */
{
- u8 data[] = { 0x3c, 0x33, 0x62};
+ u8 data[] = { 0x3c, 0x33, 0x6a};
struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
i2c_transfer(&dev->i2c_adap, &msg, 1);
}
break;
case SAA7134_BOARD_CINERGY_HT_PCMCIA:
case SAA7134_BOARD_CINERGY_HT_PCI:
- /* make the tda10046 find its eeprom */
+ /* initialize analog mode */
{
- u8 data[] = { 0x3c, 0x33, 0x60};
+ u8 data[] = { 0x3c, 0x33, 0x68};
struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
i2c_transfer(&dev->i2c_adap, &msg, 1);
}