diff options
author | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2005-08-01 01:34:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-01 22:13:59 -0400 |
commit | fd3113e84e188781aa2935fbc4351d64ccdd171b (patch) | |
tree | 7db491fdc25d938ea51be3f85a91161a95fdd67f /drivers/media/video/tea5767.c | |
parent | cdf32eaa4e601b15146e21b6470de00f149ce37f (diff) |
[PATCH] V4L: Miscellaneous fixes
- Fixed some bttv card numbers.
- BTTV and SAA7134 version numbers incremented to reflect changes.
- pci_dma_supported() is called after pci_set_dma_mask() which
already did check that for us. This patch removes the unneeded call to
pci_dma_supported() at bttv-driver.c
- Ensure a sufficient I2C bus idle time between 2 messages for
saa7134-i2c.c
- It is important to write at first to MO_GP3_IO for cx88-tvaudio.c
- Use try_to_freeze() instead of refrigerator at msp3400.c
- Recognizing the MFPE05-2 Tuner at tveeprom.c
- Add new parameter to help identify radio chipsets at tuner module:
show_i2c=1 will show 16 reading bytes from detected tuners.
- BTTV does generate some Unimplemented IOCTL log at tuner module:
0x40046d11(dir=1,tp=0x6d,nr=17,sz=4) means that it is sending
MSP3400 calls to non-msp3400 tuners. Warning eliminated.
VIDIOSAUDIO is also called, so debug messages updated. It is still
requiring IOCTL implementation.
- Added two more tuners.
- Add support for the SVideo input on the GDI Black Gold.
Signed-off-by: Peter Missel <peter.missel@onlinehome.de>
Signed-off-by: Graham Bevan <graham.bevan@ntlworld.com>
Signed-off-by: Torsten Seeboth <Torsten.Seeboth@t-online.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t.online.de>
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
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/tea5767.c')
-rw-r--r-- | drivers/media/video/tea5767.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/video/tea5767.c b/drivers/media/video/tea5767.c index 4d27ac1b7fb8..c8fd4204cd0a 100644 --- a/drivers/media/video/tea5767.c +++ b/drivers/media/video/tea5767.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview | 2 | * For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview |
3 | * I2C address is allways 0xC0. | 3 | * I2C address is allways 0xC0. |
4 | * | 4 | * |
5 | * $Id: tea5767.c,v 1.21 2005/07/14 03:06:43 mchehab Exp $ | 5 | * $Id: tea5767.c,v 1.26 2005/07/27 12:00:36 mkrufky Exp $ |
6 | * | 6 | * |
7 | * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) | 7 | * Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br) |
8 | * This code is placed under the terms of the GNU General Public License | 8 | * This code is placed under the terms of the GNU General Public License |
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/videodev.h> | 15 | #include <linux/videodev.h> |
16 | #include <linux/delay.h> | 16 | #include <linux/delay.h> |
17 | #include <media/tuner.h> | 17 | #include <media/tuner.h> |
18 | #include <media/tuner.h> | ||
19 | 18 | ||
20 | #define PREFIX "TEA5767 " | 19 | #define PREFIX "TEA5767 " |
21 | 20 | ||
@@ -293,7 +292,7 @@ static int tea5767_stereo(struct i2c_client *c) | |||
293 | 292 | ||
294 | int tea5767_autodetection(struct i2c_client *c) | 293 | int tea5767_autodetection(struct i2c_client *c) |
295 | { | 294 | { |
296 | unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff }; | 295 | unsigned char buffer[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |
297 | int rc; | 296 | int rc; |
298 | struct tuner *t = i2c_get_clientdata(c); | 297 | struct tuner *t = i2c_get_clientdata(c); |
299 | 298 | ||
@@ -302,7 +301,7 @@ int tea5767_autodetection(struct i2c_client *c) | |||
302 | return EINVAL; | 301 | return EINVAL; |
303 | } | 302 | } |
304 | 303 | ||
305 | /* If all bytes are the same then it's a TV tuner and not a tea5767 chip. */ | 304 | /* If all bytes are the same then it's a TV tuner and not a tea5767 */ |
306 | if (buffer[0] == buffer[1] && buffer[0] == buffer[2] && | 305 | if (buffer[0] == buffer[1] && buffer[0] == buffer[2] && |
307 | buffer[0] == buffer[3] && buffer[0] == buffer[4]) { | 306 | buffer[0] == buffer[3] && buffer[0] == buffer[4]) { |
308 | tuner_warn("All bytes are equal. It is not a TEA5767\n"); | 307 | tuner_warn("All bytes are equal. It is not a TEA5767\n"); |
@@ -318,6 +317,11 @@ int tea5767_autodetection(struct i2c_client *c) | |||
318 | tuner_warn("Chip ID is not zero. It is not a TEA5767\n"); | 317 | tuner_warn("Chip ID is not zero. It is not a TEA5767\n"); |
319 | return EINVAL; | 318 | return EINVAL; |
320 | } | 319 | } |
320 | /* It seems that tea5767 returns 0xff after the 5th byte */ | ||
321 | if ((buffer[5] != 0xff) || (buffer[6] != 0xff)) { | ||
322 | tuner_warn("Returned more than 5 bytes. It is not a TEA5767\n"); | ||
323 | return EINVAL; | ||
324 | } | ||
321 | 325 | ||
322 | tuner_warn("TEA5767 detected.\n"); | 326 | tuner_warn("TEA5767 detected.\n"); |
323 | return 0; | 327 | return 0; |
@@ -327,9 +331,6 @@ int tea5767_tuner_init(struct i2c_client *c) | |||
327 | { | 331 | { |
328 | struct tuner *t = i2c_get_clientdata(c); | 332 | struct tuner *t = i2c_get_clientdata(c); |
329 | 333 | ||
330 | if (tea5767_autodetection(c) == EINVAL) | ||
331 | return EINVAL; | ||
332 | |||
333 | tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); | 334 | tuner_info("type set to %d (%s)\n", t->type, "Philips TEA5767HN FM Radio"); |
334 | strlcpy(c->name, "tea5767", sizeof(c->name)); | 335 | strlcpy(c->name, "tea5767", sizeof(c->name)); |
335 | 336 | ||