X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Ftda8290.c;h=027c8a074dfe6bc2d0fcaee90b3c230bfbda6366;hb=9cb2318b885d2039eeb3eb5394fa215046be058f;hp=2498b76df429c3d36cd48588703a4e0513b896e7;hpb=e7de369050534025b33aab1033358bf47a577e4d;p=powerpc.git diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 2498b76df4..027c8a074d 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); } @@ -565,10 +569,10 @@ int tda8290_init(struct i2c_client *c) strlcpy(c->name, "tda8290+75a", sizeof(c->name)); t->tda827x_ver = 2; } - tuner_info("tuner: type set to %s\n", c->name); + tuner_info("type set to %s\n", c->name); - t->tv_freq = set_tv_freq; - t->radio_freq = set_radio_freq; + t->set_tv_freq = set_tv_freq; + t->set_radio_freq = set_radio_freq; t->has_signal = has_signal; t->standby = standby; t->tda827x_lpsel = 0; @@ -580,9 +584,10 @@ int tda8290_init(struct i2c_client *c) int tda8290_probe(struct i2c_client *c) { - unsigned char soft_reset[] = { 0x00, 0x00 }; - unsigned char easy_mode_b[] = { 0x01, 0x02 }; - unsigned char easy_mode_g[] = { 0x01, 0x04 }; + unsigned char soft_reset[] = { 0x00, 0x00 }; + unsigned char easy_mode_b[] = { 0x01, 0x02 }; + unsigned char easy_mode_g[] = { 0x01, 0x04 }; + unsigned char restore_9886[] = { 0x00, 0xd6, 0x30 }; unsigned char addr_dto_lsb = 0x07; unsigned char data; @@ -599,6 +604,7 @@ int tda8290_probe(struct i2c_client *c) return 0; } } + i2c_master_send(c, restore_9886, 3); return -1; }