summaryrefslogtreecommitdiff
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-07-15 03:56:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-15 09:54:50 -0700
commitc5287ba132ff742e595d42c28b66cbba19522c4e (patch)
tree26a33ea2e756586d9696c050449c0d5f1666e908 /drivers/media/video/tuner-core.c
parent1eb29128c644581fa51f822545921394ad4f719f (diff)
[PATCH] v4l: bug fixes for tuner, cx88 and tea5767
- In CX88 code, some cards needs to have audio reprogramed after changing video channel; - Tuner autodetection code seems not to work on some cards. Now, no_autodetect insmod option allows disabling autodetection code; - Minor fixes in tea5767 to reduce integer trunc; - There are some new Pixelview Ultra Pro cards that doesn't use TEA5767 for radio. As autodetection is capable of checking for tea, radio tuners and addresses removed. - CX88 version number incremented. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r--drivers/media/video/tuner-core.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index de190630babb..b25a9c08ac02 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.55 2005/07/08 13:20:33 mchehab Exp $
+ * $Id: tuner-core.c,v 1.58 2005/07/14 03:06:43 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -39,6 +39,9 @@ I2C_CLIENT_INSMOD;
static unsigned int addr = 0;
module_param(addr, int, 0444);
+static unsigned int no_autodetect = 0;
+module_param(no_autodetect, int, 0444);
+
/* insmod options used at runtime => read/write */
unsigned int tuner_debug = 0;
module_param(tuner_debug, int, 0644);
@@ -318,17 +321,19 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name);
/* TEA5767 autodetection code - only for addr = 0xc0 */
- if (addr == 0x60) {
- if (tea5767_autodetection(&t->i2c) != EINVAL) {
- t->type = TUNER_TEA5767;
- t->mode_mask = T_RADIO;
- t->mode = T_STANDBY;
- t->freq = 87.5 * 16; /* Sets freq to FM range */
- default_mode_mask &= ~T_RADIO;
-
- i2c_attach_client (&t->i2c);
- set_type(&t->i2c,t->type, t->mode_mask);
- return 0;
+ if (!no_autodetect) {
+ if (addr == 0x60) {
+ if (tea5767_autodetection(&t->i2c) != EINVAL) {
+ t->type = TUNER_TEA5767;
+ t->mode_mask = T_RADIO;
+ t->mode = T_STANDBY;
+ t->freq = 87.5 * 16; /* Sets freq to FM range */
+ default_mode_mask &= ~T_RADIO;
+
+ i2c_attach_client (&t->i2c);
+ set_type(&t->i2c,t->type, t->mode_mask);
+ return 0;
+ }
}
}
@@ -631,7 +636,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
break;
}
default:
- tuner_dbg("Unimplemented IOCTL 0x%08x called to tuner.\n", cmd);
+ tuner_dbg("Unimplemented IOCTL 0x%08x(dir=%d,tp=0x%02x,nr=%d,sz=%d)\n",
+ cmd, _IOC_DIR(cmd), _IOC_TYPE(cmd),
+ _IOC_NR(cmd), _IOC_SIZE(cmd));
break;
}