diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-19 23:52:21 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-06-19 23:52:21 +0000 |
commit | c02793e14e09db70e60f8d5caad26c81b9ce466e (patch) | |
tree | 29ad78654b4f41c2bd0c680c95c4ca8fbddd94af /linux/drivers/media/video/tuner-core.c | |
parent | d1d2c497c261f42502519d510765671a75f2326e (diff) | |
download | mediapointer-dvb-s2-c02793e14e09db70e60f8d5caad26c81b9ce466e.tar.gz mediapointer-dvb-s2-c02793e14e09db70e60f8d5caad26c81b9ce466e.tar.bz2 |
tea5767 autodetection code included. It uses the same approach as DScaler code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index e360a5c02..bda1fbbda 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.25 2005/06/19 20:05:12 mchehab Exp $ + * $Id: tuner-core.c,v 1.26 2005/06/19 23:52:22 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -144,7 +144,6 @@ static void set_type(struct i2c_client *c, unsigned int type) struct tuner *t = i2c_get_clientdata(c); unsigned char buffer[4]; - tuner_dbg ("I2C addr 0x%02x with type %d\n",c->addr<<1,type); /* sanity check */ if (type == UNSET || type == TUNER_ABSENT) return; @@ -171,7 +170,7 @@ static void set_type(struct i2c_client *c, unsigned int type) tda8290_init(c); break; case TUNER_TEA5767: - tea5767_tuner_init(c); + if (tea5767_tuner_init(c)==EINVAL) t->type=TUNER_ABSENT; break; case TUNER_PHILIPS_FMD1216ME_MK3: buffer[0] = 0x0b; @@ -186,9 +185,20 @@ static void set_type(struct i2c_client *c, unsigned int type) default_tuner_init(c); break; default: + /* TEA5767 autodetection code */ + if ( c->addr==0x60 ) { + if (tea5767_tuner_init(c)!=EINVAL) { + t->type = TUNER_TEA5767; + if (first_tuner == 0x60) + first_tuner++; + break; + } + } + default_tuner_init(c); break; } + tuner_dbg ("I2C addr 0x%02x with type %d\n",c->addr<<1,type); } #define CHECK_ADDR(tp,cmd,tun) if (client->addr!=tp) { \ |