aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t\-online.de>2006-02-07 03:49:09 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 03:49:09 -0500
commit0157a9cc727dec90a7d60ad254eb899a775685a9 (patch)
tree3945ae8c3b689cf21d22961a3a4afc0d81701755
parent3d8466ece44c70555a101da73845955c443f4d18 (diff)
V4L/DVB (3303): TDA8290 update
This patch - works around a bug in the I2C bridge that makes the initialization of the TDA10046 fail on recent LifeView cards - puts the AGC output to tristate in sleep mode. This is necessary for recent hybrid cards that switch the AGC via tristateing. Signed-off-by: Hartmut Hackmann<hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/tda8290.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index 7b4fb282ac82..2b954b3d2ba6 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -281,7 +281,7 @@ static void tda827xa_agcf(struct i2c_client *c)
281static void tda8290_i2c_bridge(struct i2c_client *c, int close) 281static void tda8290_i2c_bridge(struct i2c_client *c, int close)
282{ 282{
283 unsigned char enable[2] = { 0x21, 0xC0 }; 283 unsigned char enable[2] = { 0x21, 0xC0 };
284 unsigned char disable[2] = { 0x21, 0x80 }; 284 unsigned char disable[2] = { 0x21, 0x00 };
285 unsigned char *msg; 285 unsigned char *msg;
286 if(close) { 286 if(close) {
287 msg = enable; 287 msg = enable;
@@ -302,6 +302,7 @@ static int tda8290_tune(struct i2c_client *c, u16 ifc, unsigned int freq)
302 unsigned char soft_reset[] = { 0x00, 0x00 }; 302 unsigned char soft_reset[] = { 0x00, 0x00 };
303 unsigned char easy_mode[] = { 0x01, t->tda8290_easy_mode }; 303 unsigned char easy_mode[] = { 0x01, t->tda8290_easy_mode };
304 unsigned char expert_mode[] = { 0x01, 0x80 }; 304 unsigned char expert_mode[] = { 0x01, 0x80 };
305 unsigned char agc_out_on[] = { 0x02, 0x00 };
305 unsigned char gainset_off[] = { 0x28, 0x14 }; 306 unsigned char gainset_off[] = { 0x28, 0x14 };
306 unsigned char if_agc_spd[] = { 0x0f, 0x88 }; 307 unsigned char if_agc_spd[] = { 0x0f, 0x88 };
307 unsigned char adc_head_6[] = { 0x05, 0x04 }; 308 unsigned char adc_head_6[] = { 0x05, 0x04 };
@@ -320,6 +321,7 @@ static int tda8290_tune(struct i2c_client *c, u16 ifc, unsigned int freq)
320 pll_stat; 321 pll_stat;
321 322
322 i2c_master_send(c, easy_mode, 2); 323 i2c_master_send(c, easy_mode, 2);
324 i2c_master_send(c, agc_out_on, 2);
323 i2c_master_send(c, soft_reset, 2); 325 i2c_master_send(c, soft_reset, 2);
324 msleep(1); 326 msleep(1);
325 327
@@ -470,6 +472,7 @@ static void standby(struct i2c_client *c)
470 struct tuner *t = i2c_get_clientdata(c); 472 struct tuner *t = i2c_get_clientdata(c);
471 unsigned char cb1[] = { 0x30, 0xD0 }; 473 unsigned char cb1[] = { 0x30, 0xD0 };
472 unsigned char tda8290_standby[] = { 0x00, 0x02 }; 474 unsigned char tda8290_standby[] = { 0x00, 0x02 };
475 unsigned char tda8290_agc_tri[] = { 0x02, 0x20 };
473 struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, .buf=cb1, .len = 2}; 476 struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, .buf=cb1, .len = 2};
474 477
475 tda8290_i2c_bridge(c, 1); 478 tda8290_i2c_bridge(c, 1);
@@ -477,6 +480,7 @@ static void standby(struct i2c_client *c)
477 cb1[1] = 0x90; 480 cb1[1] = 0x90;
478 i2c_transfer(c->adapter, &msg, 1); 481 i2c_transfer(c->adapter, &msg, 1);
479 tda8290_i2c_bridge(c, 0); 482 tda8290_i2c_bridge(c, 0);
483 i2c_master_send(c, tda8290_agc_tri, 2);
480 i2c_master_send(c, tda8290_standby, 2); 484 i2c_master_send(c, tda8290_standby, 2);
481} 485}
482 486
@@ -565,7 +569,7 @@ int tda8290_init(struct i2c_client *c)
565 strlcpy(c->name, "tda8290+75a", sizeof(c->name)); 569 strlcpy(c->name, "tda8290+75a", sizeof(c->name));
566 t->tda827x_ver = 2; 570 t->tda827x_ver = 2;
567 } 571 }
568 tuner_info("tuner: type set to %s\n", c->name); 572 tuner_info("type set to %s\n", c->name);
569 573
570 t->set_tv_freq = set_tv_freq; 574 t->set_tv_freq = set_tv_freq;
571 t->set_radio_freq = set_radio_freq; 575 t->set_radio_freq = set_radio_freq;