diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-12 10:21:58 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-12-12 10:21:58 +0100 |
commit | c2314c0cd5b945a80aede3b06c36b0585f17e5b4 (patch) | |
tree | 5dcdea34f3858e96c402e4293d1722f8ee781709 /linux/drivers/media/video/tveeprom.c | |
parent | 4981413b8584d461413c56d89f91b5d11796aa31 (diff) | |
download | mediapointer-dvb-s2-c2314c0cd5b945a80aede3b06c36b0585f17e5b4.tar.gz mediapointer-dvb-s2-c2314c0cd5b945a80aede3b06c36b0585f17e5b4.tar.bz2 |
tveeprom: add support for Hauppauge models 74xxx
From: Hans Verkuil <hverkuil@xs4all.nl>
Thanks to Steve Toth from Hauppauge with providing me with the information
needed to add support for these models.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/tveeprom.c')
-rw-r--r-- | linux/drivers/media/video/tveeprom.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c index baef98966..ddd94a22f 100644 --- a/linux/drivers/media/video/tveeprom.c +++ b/linux/drivers/media/video/tveeprom.c @@ -409,9 +409,9 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, ** # of inputs/outputs ??? */ - int i, j, len, done, beenhere, tag,start; + int i, j, len, done, beenhere, tag, start; - int tuner1 = 0, t_format1 = 0, audioic=-1; + int tuner1 = 0, t_format1 = 0, audioic = -1; char *t_name1 = NULL; const char *t_fmt_name1[8] = { " none", "", "", "", "", "", "", "" }; @@ -422,17 +422,24 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, memset(tvee, 0, sizeof(*tvee)); done = len = beenhere = 0; - /* Hack for processing eeprom for em28xx and cx 2388x*/ - if ((eeprom_data[0] == 0x1a) && (eeprom_data[1] == 0xeb) && - (eeprom_data[2] == 0x67) && (eeprom_data[3] == 0x95)) - start=0xa0; /* Generic em28xx offset */ - else if (((eeprom_data[0] & 0xe1) == 0x01) && - (eeprom_data[1] == 0x00) && - (eeprom_data[2] == 0x00) && - (eeprom_data[8] == 0x84)) - start=8; /* Generic cx2388x offset */ + /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */ + if (eeprom_data[0] == 0x1a && + eeprom_data[1] == 0xeb && + eeprom_data[2] == 0x67 && + eeprom_data[3] == 0x95) + start = 0xa0; /* Generic em28xx offset */ + else if ((eeprom_data[0] & 0xe1) == 0x01 && + eeprom_data[1] == 0x00 && + eeprom_data[2] == 0x00 && + eeprom_data[8] == 0x84) + start = 8; /* Generic cx2388x offset */ + else if (eeprom_data[1] == 0x70 && + eeprom_data[2] == 0x00 && + eeprom_data[4] == 0x74 && + eeprom_data[8] == 0x84) + start = 8; /* Generic cx23418 offset (models 74xxx) */ else - start=0; + start = 0; for (i = start; !done && i < 256; i += len) { if (eeprom_data[i] == 0x84) { |