提交 6b14ff9e 编写于 作者: H Hermann Pitton 提交者: Mauro Carvalho Chehab

V4L/DVB (4702): Fix: set antenna input for DVB-T for Asus P7131 Dual hybrid

This patch forces the correct antenna input input in DVB-T
mode for this card.
Signed-off-by: NHermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: NHartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 17b10a73
...@@ -874,6 +874,34 @@ static struct tda1004x_config philips_tiger_config = { ...@@ -874,6 +874,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) static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
{ {
int ret; int ret;
...@@ -1148,8 +1176,8 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1148,8 +1176,8 @@ static int dvb_init(struct saa7134_dev *dev)
&philips_tiger_config, &philips_tiger_config,
&dev->i2c_adap); &dev->i2c_adap);
if (dev->dvb.frontend) { if (dev->dvb.frontend) {
dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; dev->dvb.frontend->ops.tuner_ops.init = asus_p7131_dual_tuner_init;
dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; 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; dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
} }
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册