From: Hartmut Hackmann Date: Mon, 18 Sep 2006 22:56:25 +0000 (+0200) Subject: V4L/DVB: TDA8290 update X-Git-Tag: v2.6.16.30-pre1~5 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cec8f39e59c4b40b4e40a3ad653ca0d42178d2e2;p=karo-tx-linux.git V4L/DVB: 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 Signed-off-by: Mauro Carvalho Chehab Acked-by: Michael Krufky Signed-off-by: Adrian Bunk --- diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index a796a4e1917c..65930a310efb 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) static void tda8290_i2c_bridge(struct i2c_client *c, int close) { unsigned char enable[2] = { 0x21, 0xC0 }; - unsigned char disable[2] = { 0x21, 0x80 }; + unsigned char disable[2] = { 0x21, 0x00 }; unsigned char *msg; if(close) { msg = enable; @@ -302,6 +302,7 @@ static int tda8290_tune(struct i2c_client *c, u16 ifc, unsigned int freq) unsigned char soft_reset[] = { 0x00, 0x00 }; unsigned char easy_mode[] = { 0x01, t->tda8290_easy_mode }; unsigned char expert_mode[] = { 0x01, 0x80 }; + unsigned char agc_out_on[] = { 0x02, 0x00 }; unsigned char gainset_off[] = { 0x28, 0x14 }; unsigned char if_agc_spd[] = { 0x0f, 0x88 }; unsigned char adc_head_6[] = { 0x05, 0x04 }; @@ -320,6 +321,7 @@ static int tda8290_tune(struct i2c_client *c, u16 ifc, unsigned int freq) pll_stat; i2c_master_send(c, easy_mode, 2); + i2c_master_send(c, agc_out_on, 2); i2c_master_send(c, soft_reset, 2); msleep(1); @@ -470,6 +472,7 @@ static void standby(struct i2c_client *c) struct tuner *t = i2c_get_clientdata(c); unsigned char cb1[] = { 0x30, 0xD0 }; unsigned char tda8290_standby[] = { 0x00, 0x02 }; + unsigned char tda8290_agc_tri[] = { 0x02, 0x20 }; struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, .buf=cb1, .len = 2}; tda8290_i2c_bridge(c, 1); @@ -477,6 +480,7 @@ static void standby(struct i2c_client *c) cb1[1] = 0x90; i2c_transfer(c->adapter, &msg, 1); tda8290_i2c_bridge(c, 0); + i2c_master_send(c, tda8290_agc_tri, 2); i2c_master_send(c, tda8290_standby, 2); }