From 8a59c7d103ce703187bbc6aa1498adfb25dbb12d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 5 Jun 2005 17:44:04 +0000 Subject: tea5767.c, Makefile, tuner-core.c, tuner-simple.c, tuner.h: - Support for radio chip tea5767hn included. - It is used on several TV+FM cards, like cards with Tvision tuners (maybe also Tenna?). - This chip is always at I2C address 0xC0. --- linux/drivers/media/video/tuner-simple.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media/video/tuner-simple.c') diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c index d5760d104..7fe80fa91 100644 --- a/linux/drivers/media/video/tuner-simple.c +++ b/linux/drivers/media/video/tuner-simple.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-simple.c,v 1.16 2005/06/03 18:00:42 mchehab Exp $ + * $Id: tuner-simple.c,v 1.17 2005/06/05 17:44:04 mchehab Exp $ * * i2c tv tuner chip device driver * controls all those simple 4-control-bytes style tuners. @@ -469,17 +469,17 @@ int default_tuner_init(struct i2c_client *c) { struct tuner *t = i2c_get_clientdata(c); - tuner_info("type set to %d (%s)\n", - t->type, tuners[t->type].name); - strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); - switch (t->type) { case TUNER_YMEC_TVF_5533MF: { struct tuner_addr tun_addr = { V4L2_TUNER_ANALOG_TV, 0xc2>>1 }; - + if (c->driver->command) { c->driver->command(c, TUNER_SET_ADDR, &tun_addr); + if (c->addr==0xC0>>1) { + tea5767_tuner_init(c); + return (0); + } } else { tuner_warn("Couldn't set TV tuner I2C address to 0x%02x\n",tun_addr.addr<<1); } @@ -487,6 +487,10 @@ int default_tuner_init(struct i2c_client *c) } } + tuner_info("type set to %d (%s)\n", + t->type, tuners[t->type].name); + strlcpy(c->name, tuners[t->type].name, sizeof(c->name)); + t->tv_freq = default_set_tv_freq; t->radio_freq = default_set_radio_freq; t->has_signal = tuner_signal; -- cgit v1.2.3