diff options
author | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2006-10-03 01:18:26 +0200 |
---|---|---|
committer | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2006-10-03 01:18:26 +0200 |
commit | febb5d44e0b20c4bfe175cb774f2b7431261be58 (patch) | |
tree | 1a42efb23ad4284406f4ed8d81010590fcbbb3c2 /linux/drivers/media/video/saa7134/saa7134-dvb.c | |
parent | f6be445ce41068654aafdaf802ba52656d1a791c (diff) | |
download | mediapointer-dvb-s2-febb5d44e0b20c4bfe175cb774f2b7431261be58.tar.gz mediapointer-dvb-s2-febb5d44e0b20c4bfe175cb774f2b7431261be58.tar.bz2 |
Asus P7131 Dual hybrid, set antenna input for DVB-T
From: Hermann Pitton <hermann-pitton@arcor.de>
This patch forces the correct antenna input input in DVB-T
mode for this card
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 0718f131a..591d5fefa 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -875,6 +875,34 @@ static struct tda1004x_config philips_tiger_config = { /* ------------------------------------------------------------------ */ +static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe) +{ + struct saa7134_dev *dev = fe->dvb->priv; + static u8 data[] = { 0x3c, 0x33, 0x6a}; + struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)}; + + if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) + return -EIO; + /* make sure the DVB-T antenna input is set */ + saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000); + return 0; +} + +static int asus_p7131_dual_tuner_sleep(struct dvb_frontend *fe) +{ + struct saa7134_dev *dev = fe->dvb->priv; + static 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); + philips_tda827xa_tuner_sleep( 0x61, fe); + /* reset antenna inputs for analog usage */ + saa_clearl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000); + return 0; +} + +/* ------------------------------------------------------------------ */ + static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) { int ret; @@ -1149,8 +1177,8 @@ static int dvb_init(struct saa7134_dev *dev) &philips_tiger_config, &dev->i2c_adap); if (dev->dvb.frontend) { - dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; - dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; + dev->dvb.frontend->ops.tuner_ops.init = asus_p7131_dual_tuner_init; + dev->dvb.frontend->ops.tuner_ops.sleep = asus_p7131_dual_tuner_sleep; dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; } break; |