diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-07-27 02:44:37 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-07-27 02:44:37 +0000 |
commit | 947261850fdd8ce08a4bc1232033a0fde8e609d5 (patch) | |
tree | 6020b1ee53a43350614d2f2088288e3a89a29d31 | |
parent | 77f6f81388b60cd9de567077cb6e890ccec60f2e (diff) | |
download | mediapointer-dvb-s2-947261850fdd8ce08a4bc1232033a0fde8e609d5.tar.gz mediapointer-dvb-s2-947261850fdd8ce08a4bc1232033a0fde8e609d5.tar.bz2 |
- Add new parameter to help identify radio chipsets:
show_i2c=1 will show 16 reading bytes from detected tuners.
* tea5767.c:
- Improved autodetection code commented. Sometimes, it doesn't work.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r-- | linux/drivers/media/video/tea5767.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 16 | ||||
-rw-r--r-- | v4l/ChangeLog | 10 |
3 files changed, 29 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) { diff --git a/v4l/ChangeLog b/v4l/ChangeLog index b5156f1c7..4dd2ead07 100644 --- a/v4l/ChangeLog +++ b/v4l/ChangeLog @@ -1,3 +1,13 @@ +2005-07-27 02:42 mchehab + * tuner-core.c: + - Add new parameter to help identify radio chipsets: + show_i2c=1 will show 16 reading bytes from detected tuners. + + * tea5767.c: + - Improved autodetection code commented. Sometimes, it doesn't work. + + Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> + 2005-07-27 02:01 mkrufky * cx88-mpeg.c: - convert ugly if-else statement to switch-case. |