diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-11-15 08:34:33 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:13 -0500 |
commit | 993efa7133985597eb48fb486c661010ab08b525 (patch) | |
tree | 153f76daad07109b2dd8c6920c76f5630076f064 /drivers/media/video/saa7134/saa7134-cards.c | |
parent | ddf12227c3f8413d09c54f85e6642f79312f1430 (diff) |
V4L/DVB (6607): saa7134: add support for reading Hauppauge eeprom
Increased size of dev->eedata from 128 to 256, since the Hauppauge data begins
at byte 128. This has been tested on boards with smaller eeproms, and caused
no problems.
Added comments to distinguish between the various versions of the HVR1110.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-cards.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 138cec8bb023..533fb02394fb 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "saa7134-reg.h" | 26 | #include "saa7134-reg.h" |
27 | #include "saa7134.h" | 27 | #include "saa7134.h" |
28 | #include <media/v4l2-common.h> | 28 | #include <media/v4l2-common.h> |
29 | #include <media/tveeprom.h> | ||
29 | 30 | ||
30 | /* commly used strings */ | 31 | /* commly used strings */ |
31 | static char name_mute[] = "mute"; | 32 | static char name_mute[] = "mute"; |
@@ -4381,6 +4382,34 @@ static void board_flyvideo(struct saa7134_dev *dev) | |||
4381 | 4382 | ||
4382 | /* ----------------------------------------------------------- */ | 4383 | /* ----------------------------------------------------------- */ |
4383 | 4384 | ||
4385 | static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data) | ||
4386 | { | ||
4387 | struct tveeprom tv; | ||
4388 | |||
4389 | tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data); | ||
4390 | |||
4391 | /* Make sure we support the board model */ | ||
4392 | switch (tv.model) { | ||
4393 | case 67019: /* WinTV-HVR1110 (Retail, IR Blaster, hybrid, FM, SVid/Comp, 3.5mm audio in) */ | ||
4394 | case 67109: /* WinTV-HVR1000 (Retail, IR Receive, analog, no FM, SVid/Comp, 3.5mm audio in) */ | ||
4395 | case 67559: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */ | ||
4396 | case 67569: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM) */ | ||
4397 | case 67579: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM) */ | ||
4398 | case 67589: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM, SVid/Comp, RCA aud) */ | ||
4399 | case 67599: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM, SVid/Comp, RCA aud) */ | ||
4400 | break; | ||
4401 | default: | ||
4402 | printk(KERN_WARNING "%s: warning: " | ||
4403 | "unknown hauppauge model #%d\n", dev->name, tv.model); | ||
4404 | break; | ||
4405 | } | ||
4406 | |||
4407 | printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n", | ||
4408 | dev->name, tv.model); | ||
4409 | } | ||
4410 | |||
4411 | /* ----------------------------------------------------------- */ | ||
4412 | |||
4384 | int saa7134_board_init1(struct saa7134_dev *dev) | 4413 | int saa7134_board_init1(struct saa7134_dev *dev) |
4385 | { | 4414 | { |
4386 | /* Always print gpio, often manufacturers encode tuner type and other info. */ | 4415 | /* Always print gpio, often manufacturers encode tuner type and other info. */ |
@@ -4661,13 +4690,15 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
4661 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 4690 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
4662 | } | 4691 | } |
4663 | break; | 4692 | break; |
4693 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: | ||
4694 | hauppauge_eeprom(dev, dev->eedata+0x80); | ||
4695 | /* break intentionally omitted */ | ||
4664 | case SAA7134_BOARD_PINNACLE_PCTV_310i: | 4696 | case SAA7134_BOARD_PINNACLE_PCTV_310i: |
4665 | case SAA7134_BOARD_KWORLD_DVBT_210: | 4697 | case SAA7134_BOARD_KWORLD_DVBT_210: |
4666 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 4698 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
4667 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 4699 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
4668 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: | 4700 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: |
4669 | case SAA7134_BOARD_MEDION_MD8800_QUADRO: | 4701 | case SAA7134_BOARD_MEDION_MD8800_QUADRO: |
4670 | case SAA7134_BOARD_HAUPPAUGE_HVR1110: | ||
4671 | /* this is a hybrid board, initialize to analog mode | 4702 | /* this is a hybrid board, initialize to analog mode |
4672 | * and configure firmware eeprom address | 4703 | * and configure firmware eeprom address |
4673 | */ | 4704 | */ |