summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-07-27 02:44:37 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-07-27 02:44:37 +0000
commit947261850fdd8ce08a4bc1232033a0fde8e609d5 (patch)
tree6020b1ee53a43350614d2f2088288e3a89a29d31 /linux/drivers/media/video/tuner-core.c
parent77f6f81388b60cd9de567077cb6e890ccec60f2e (diff)
downloadmediapointer-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>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c16
1 files changed, 15 insertions, 1 deletions
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) {