aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tveeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tveeprom.c')
-rw-r--r--drivers/media/video/tveeprom.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index 8ac4cb82a45..fd0acc5da66 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -40,6 +40,7 @@
40 40
41#include <media/tuner.h> 41#include <media/tuner.h>
42#include <media/tveeprom.h> 42#include <media/tveeprom.h>
43#include <media/v4l2-common.h>
43#include <media/audiochip.h> 44#include <media/audiochip.h>
44 45
45MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver"); 46MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver");
@@ -52,21 +53,19 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
52 53
53#define STRM(array,i) (i < sizeof(array)/sizeof(char*) ? array[i] : "unknown") 54#define STRM(array,i) (i < sizeof(array)/sizeof(char*) ? array[i] : "unknown")
54 55
55#define tveeprom_info(fmt, arg...) do {\ 56#define tveeprom_info(fmt, arg...) \
56 printk(KERN_INFO "tveeprom %d-%04x: " fmt, \ 57 v4l_printk(KERN_INFO, "tveeprom", c->adapter, c->addr, fmt , ## arg)
57 c->adapter->nr, c->addr , ##arg); } while (0) 58#define tveeprom_warn(fmt, arg...) \
58#define tveeprom_warn(fmt, arg...) do {\ 59 v4l_printk(KERN_WARNING, "tveeprom", c->adapter, c->addr, fmt , ## arg)
59 printk(KERN_WARNING "tveeprom %d-%04x: " fmt, \ 60#define tveeprom_dbg(fmt, arg...) do { \
60 c->adapter->nr, c->addr , ##arg); } while (0)
61#define tveeprom_dbg(fmt, arg...) do {\
62 if (debug) \ 61 if (debug) \
63 printk(KERN_INFO "tveeprom %d-%04x: " fmt, \ 62 v4l_printk(KERN_DEBUG, "tveeprom", c->adapter, c->addr, fmt , ## arg); \
64 c->adapter->nr, c->addr , ##arg); } while (0) 63 } while (0)
65
66
67/* ----------------------------------------------------------------------- */
68/* some hauppauge specific stuff */
69 64
65/*
66 * The Hauppauge eeprom uses an 8bit field to determine which
67 * tuner formats the tuner supports.
68 */
70static struct HAUPPAUGE_TUNER_FMT 69static struct HAUPPAUGE_TUNER_FMT
71{ 70{
72 int id; 71 int id;
@@ -74,14 +73,14 @@ static struct HAUPPAUGE_TUNER_FMT
74} 73}
75hauppauge_tuner_fmt[] = 74hauppauge_tuner_fmt[] =
76{ 75{
77 { 0x00000000, " unknown1" }, 76 { V4L2_STD_UNKNOWN," UNKNOWN" },
78 { 0x00000000, " unknown2" }, 77 { V4L2_STD_UNKNOWN," FM" },
79 { 0x00000007, " PAL(B/G)" }, 78 { V4L2_STD_PAL_BG, " PAL(B/G)" },
80 { 0x00001000, " NTSC(M)" }, 79 { V4L2_STD_NTSC_M, " NTSC(M)" },
81 { 0x00000010, " PAL(I)" }, 80 { V4L2_STD_PAL_I, " PAL(I)" },
82 { 0x00400000, " SECAM(L/L')" }, 81 { V4L2_STD_SECAM_L," SECAM(L/L')" },
83 { 0x00000e00, " PAL(D/K)" }, 82 { V4L2_STD_PAL_DK, " PAL(D/D1/K)" },
84 { 0x03000000, " ATSC/DVB Digital" }, 83 { V4L2_STD_ATSC, " ATSC/DVB Digital" },
85}; 84};
86 85
87/* This is the full list of possible tuners. Many thanks to Hauppauge for 86/* This is the full list of possible tuners. Many thanks to Hauppauge for
@@ -387,7 +386,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
387 if ((eeprom_data[0] == 0x1a) && (eeprom_data[1] == 0xeb) && 386 if ((eeprom_data[0] == 0x1a) && (eeprom_data[1] == 0xeb) &&
388 (eeprom_data[2] == 0x67) && (eeprom_data[3] == 0x95)) 387 (eeprom_data[2] == 0x67) && (eeprom_data[3] == 0x95))
389 start=0xa0; /* Generic em28xx offset */ 388 start=0xa0; /* Generic em28xx offset */
390 else if (((eeprom_data[0] & 0xf0) == 0x10) && 389 else if (((eeprom_data[0] & 0xe1) == 0x01) &&
391 (eeprom_data[1] == 0x00) && 390 (eeprom_data[1] == 0x00) &&
392 (eeprom_data[2] == 0x00) && 391 (eeprom_data[2] == 0x00) &&
393 (eeprom_data[8] == 0x84)) 392 (eeprom_data[8] == 0x84))