diff options
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 16 |
2 files changed, 19 insertions, 4 deletions
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c index 325f6f273..445a6360e 100644 --- a/linux/drivers/media/video/tea5767.c +++ b/linux/drivers/media/video/tea5767.c @@ -2,7 +2,7 @@ * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview * I2C address is allways 0xC0. * - * $Id: tea5767.c,v 1.23 2005/07/26 10:37:41 mchehab Exp $ + * $Id: tea5767.c,v 1.24 2005/07/27 02:44:37 mchehab Exp $ * * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) * This code is placed under the terms of the GNU General Public License @@ -319,6 +319,7 @@ int tea5767_autodetection(struct i2c_client *c) return EINVAL; } +#if 0 /* Sets tuner at some freq (87.5 MHz) and see if it is ok */ div = ((87500 * 4000 + 700000 + 225000) + 16768) >> 15; buffer[0] = ((div >> 8) & 0x3f) | TEA5767_MUTE; @@ -331,7 +332,7 @@ int tea5767_autodetection(struct i2c_client *c) if (5 != (rc = i2c_master_send(c, buffer, 5))) tuner_warn("i2c i/o error: rc == %d (should be 5)\n", rc); - msleep(10); + msleep(15); if (5 != (rc = i2c_master_recv(c, buffer, 5))) { tuner_warn("It is not a TEA5767. Received %i bytes.\n", rc); @@ -345,7 +346,7 @@ int tea5767_autodetection(struct i2c_client *c) tea5767_status_dump(buffer); return EINVAL; } - +#endif tuner_warn("TEA5767 detected.\n"); return 0; } diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 525412c39..8d4f19a0a 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.60 2005/07/15 21:44:14 mchehab Exp $ + * $Id: tuner-core.c,v 1.61 2005/07/27 02:44:37 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -46,6 +46,9 @@ module_param(addr, int, 0444); static unsigned int no_autodetect = 0; module_param(no_autodetect, int, 0444); +static unsigned int show_i2c = 0; +module_param(show_i2c, int, 0444); + /* insmod options used at runtime => read/write */ unsigned int tuner_debug = 0; module_param(tuner_debug, int, 0644); @@ -330,6 +333,17 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); + if (show_i2c) { + unsigned char buffer[16]; + int i,rc; + + memset(buffer, 0, sizeof(buffer)); + rc = i2c_master_recv(&t->i2c, buffer, sizeof(buffer)); + printk("tuner-%04x I2C RECV = ",addr); + for (i=0;i<rc;i++) + printk("0x%02x ",buffer[i]); + printk("\n"); + } /* TEA5767 autodetection code - only for addr = 0xc0 */ if (!no_autodetect) { if (addr == 0x60) { |