diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-07-15 06:56:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-15 12:54:50 -0400 |
commit | c5287ba132ff742e595d42c28b66cbba19522c4e (patch) | |
tree | 26a33ea2e756586d9696c050449c0d5f1666e908 /drivers/media/video/tuner-core.c | |
parent | 1eb29128c644581fa51f822545921394ad4f719f (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.c | 33 |
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 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: tuner-core.c,v 1.55 2005/07/08 13:20:33 mchehab Exp $ | 2 | * $Id: tuner-core.c,v 1.58 2005/07/14 03:06:43 mchehab Exp $ |
3 | * | 3 | * |
4 | * i2c tv tuner chip device driver | 4 | * i2c tv tuner chip device driver |
5 | * core core, i.e. kernel interfaces, registering and so on | 5 | * core core, i.e. kernel interfaces, registering and so on |
@@ -39,6 +39,9 @@ I2C_CLIENT_INSMOD; | |||
39 | static unsigned int addr = 0; | 39 | static unsigned int addr = 0; |
40 | module_param(addr, int, 0444); | 40 | module_param(addr, int, 0444); |
41 | 41 | ||
42 | static unsigned int no_autodetect = 0; | ||
43 | module_param(no_autodetect, int, 0444); | ||
44 | |||
42 | /* insmod options used at runtime => read/write */ | 45 | /* insmod options used at runtime => read/write */ |
43 | unsigned int tuner_debug = 0; | 46 | unsigned int tuner_debug = 0; |
44 | module_param(tuner_debug, int, 0644); | 47 | module_param(tuner_debug, int, 0644); |
@@ -318,17 +321,19 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) | |||
318 | tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); | 321 | tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); |
319 | 322 | ||
320 | /* TEA5767 autodetection code - only for addr = 0xc0 */ | 323 | /* TEA5767 autodetection code - only for addr = 0xc0 */ |
321 | if (addr == 0x60) { | 324 | if (!no_autodetect) { |
322 | if (tea5767_autodetection(&t->i2c) != EINVAL) { | 325 | if (addr == 0x60) { |
323 | t->type = TUNER_TEA5767; | 326 | if (tea5767_autodetection(&t->i2c) != EINVAL) { |
324 | t->mode_mask = T_RADIO; | 327 | t->type = TUNER_TEA5767; |
325 | t->mode = T_STANDBY; | 328 | t->mode_mask = T_RADIO; |
326 | t->freq = 87.5 * 16; /* Sets freq to FM range */ | 329 | t->mode = T_STANDBY; |
327 | default_mode_mask &= ~T_RADIO; | 330 | t->freq = 87.5 * 16; /* Sets freq to FM range */ |
328 | 331 | default_mode_mask &= ~T_RADIO; | |
329 | i2c_attach_client (&t->i2c); | 332 | |
330 | set_type(&t->i2c,t->type, t->mode_mask); | 333 | i2c_attach_client (&t->i2c); |
331 | return 0; | 334 | set_type(&t->i2c,t->type, t->mode_mask); |
335 | return 0; | ||
336 | } | ||
332 | } | 337 | } |
333 | } | 338 | } |
334 | 339 | ||
@@ -631,7 +636,9 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
631 | break; | 636 | break; |
632 | } | 637 | } |
633 | default: | 638 | default: |
634 | tuner_dbg("Unimplemented IOCTL 0x%08x called to tuner.\n", cmd); | 639 | tuner_dbg("Unimplemented IOCTL 0x%08x(dir=%d,tp=0x%02x,nr=%d,sz=%d)\n", |
640 | cmd, _IOC_DIR(cmd), _IOC_TYPE(cmd), | ||
641 | _IOC_NR(cmd), _IOC_SIZE(cmd)); | ||
635 | break; | 642 | break; |
636 | } | 643 | } |
637 | 644 | ||