Skip to content

Commit

Permalink
V4L/DVB (6607): saa7134: add support for reading Hauppauge eeprom
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent ddf1222 commit 993efa7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
33 changes: 32 additions & 1 deletion drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "saa7134-reg.h"
#include "saa7134.h"
#include <media/v4l2-common.h>
#include <media/tveeprom.h>

/* commly used strings */
static char name_mute[] = "mute";
Expand Down Expand Up @@ -4381,6 +4382,34 @@ static void board_flyvideo(struct saa7134_dev *dev)

/* ----------------------------------------------------------- */

static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data)
{
struct tveeprom tv;

tveeprom_hauppauge_analog(&dev->i2c_client, &tv, eeprom_data);

/* Make sure we support the board model */
switch (tv.model) {
case 67019: /* WinTV-HVR1110 (Retail, IR Blaster, hybrid, FM, SVid/Comp, 3.5mm audio in) */
case 67109: /* WinTV-HVR1000 (Retail, IR Receive, analog, no FM, SVid/Comp, 3.5mm audio in) */
case 67559: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */
case 67569: /* WinTV-HVR1110 (OEM, no IR, hybrid, FM) */
case 67579: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM) */
case 67589: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM, SVid/Comp, RCA aud) */
case 67599: /* WinTV-HVR1110 (OEM, no IR, hybrid, no FM, SVid/Comp, RCA aud) */
break;
default:
printk(KERN_WARNING "%s: warning: "
"unknown hauppauge model #%d\n", dev->name, tv.model);
break;
}

printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
dev->name, tv.model);
}

/* ----------------------------------------------------------- */

int saa7134_board_init1(struct saa7134_dev *dev)
{
/* Always print gpio, often manufacturers encode tuner type and other info. */
Expand Down Expand Up @@ -4661,13 +4690,15 @@ int saa7134_board_init2(struct saa7134_dev *dev)
i2c_transfer(&dev->i2c_adap, &msg, 1);
}
break;
case SAA7134_BOARD_HAUPPAUGE_HVR1110:
hauppauge_eeprom(dev, dev->eedata+0x80);
/* break intentionally omitted */
case SAA7134_BOARD_PINNACLE_PCTV_310i:
case SAA7134_BOARD_KWORLD_DVBT_210:
case SAA7134_BOARD_TEVION_DVBT_220RF:
case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA:
case SAA7134_BOARD_MEDION_MD8800_QUADRO:
case SAA7134_BOARD_HAUPPAUGE_HVR1110:
/* this is a hybrid board, initialize to analog mode
* and configure firmware eeprom address
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ struct saa7134_dev {
/* i2c i/o */
struct i2c_adapter i2c_adap;
struct i2c_client i2c_client;
unsigned char eedata[128];
unsigned char eedata[256];

/* video overlay */
struct v4l2_framebuffer ovbuf;
Expand Down

0 comments on commit 993efa7

Please sign in to comment.