diff options
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 83 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 7 |
3 files changed, 89 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index e530e1f81..b68ef8236 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-cards.c,v 1.27 2004/09/30 14:17:12 kraxel Exp $ + * $Id: saa7134-cards.c,v 1.28 2004/10/12 17:08:43 kraxel Exp $ * * device driver for philips saa7134 based TV cards * card-specific stuff. @@ -1154,6 +1154,60 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE2, }, }, + [SAA7134_BOARD_ZOLID_XPERT_TV7134] = { + /* Helge Jensen <helge.jensen@slog.dk> */ + .name = ":Zolid Xpert TV7134", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_NTSC, + .inputs = {{ + .name = name_svideo, + .vmux = 8, + .amux = LINE1, + },{ + .name = name_comp1, + .vmux = 3, + .amux = LINE1, + },{ + .name = name_tv, + .vmux = 1, + .amux = LINE2, + .tv = 1, + }}, + }, + [SAA7134_EMPIRE_PCI_TV_RADIO_LE] = { + /* "Matteo Az" <matte.az@nospam.libero.it> ;-) */ + .name = "Empire PCI TV-Radio LE", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_PAL, + .gpiomask = 0x4000, + .inputs = {{ + .name = name_tv_mono, + .vmux = 1, + .amux = LINE2, + .gpio = 0x8000, + .tv = 1, + },{ + .name = name_comp1, + .vmux = 3, + .amux = LINE1, + .gpio = 0x8000, + },{ + .name = name_svideo, + .vmux = 6, + .amux = LINE1, + .gpio = 0x8000, + }}, + .radio = { + .name = name_radio, + .amux = LINE1, + .gpio = 0x8000, + }, + .mute = { + .name = name_mute, + .amux = TV, + .gpio =0x8000, + } + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -1470,7 +1524,7 @@ static void board_flyvideo(struct saa7134_dev *dev) /* ----------------------------------------------------------- */ -int saa7134_board_init(struct saa7134_dev *dev) +int saa7134_board_init1(struct saa7134_dev *dev) { // Always print gpio, often manufacturers encode tuner type and other info. saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0); @@ -1505,6 +1559,31 @@ int saa7134_board_init(struct saa7134_dev *dev) return 0; } +/* stuff which needs working i2c */ +int saa7134_board_init2(struct saa7134_dev *dev) +{ + unsigned char buf; + int board; + + switch (dev->board) { + case SAA7134_BOARD_BMK_MPEX_NOTUNER: + case SAA7134_BOARD_BMK_MPEX_TUNER: + dev->i2c_client.addr = 0x60; + board = (i2c_master_recv(&dev->i2c_client,&buf,0) < 0) + ? SAA7134_BOARD_BMK_MPEX_NOTUNER + : SAA7134_BOARD_BMK_MPEX_TUNER; + if (board == dev->board) + break; + printk("%s: board type fixup: %s\n", dev->name, + saa7134_boards[dev->board].name); + dev->tuner_type = saa7134_boards[dev->board].tuner_type; + if (TUNER_ABSENT != dev->tuner_type) + saa7134_i2c_call_clients(dev,TUNER_SET_TYPE,&dev->tuner_type); + break; + } + return 0; +} + /* ----------------------------------------------------------- */ /* * Local variables: diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index d9a3b0195..4aa0a441c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.10 2004/09/15 16:15:24 kraxel Exp $ + * $Id: saa7134-core.c,v 1.11 2004/10/12 17:08:43 kraxel Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -902,7 +902,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, } /* initialize hardware #1 */ - saa7134_board_init(dev); + saa7134_board_init1(dev); saa7134_hwinit1(dev); /* get irq */ @@ -919,6 +919,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, saa7134_i2c_register(dev); /* initialize hardware #2 */ + saa7134_board_init2(dev); saa7134_hwinit2(dev); /* load i2c helpers */ diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index d6bf37a1a..89c0813c4 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.20 2004/09/30 12:21:15 kraxel Exp $ + * $Id: saa7134.h,v 1.21 2004/10/12 17:08:43 kraxel Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -182,6 +182,8 @@ struct saa7134_format { #define SAA7134_BOARD_VIDEOMATE_TV_PVR 40 #define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS 41 #define SAA7134_BOARD_SABRENT_SBTTVFM 42 +#define SAA7134_BOARD_ZOLID_XPERT_TV7134 43 +#define SAA7134_EMPIRE_PCI_TV_RADIO_LE 44 #define SAA7134_INPUT_MAX 8 @@ -497,7 +499,8 @@ extern struct saa7134_board saa7134_boards[]; extern const unsigned int saa7134_bcount; extern struct pci_device_id __devinitdata saa7134_pci_tbl[]; -extern int saa7134_board_init(struct saa7134_dev *dev); +extern int saa7134_board_init1(struct saa7134_dev *dev); +extern int saa7134_board_init2(struct saa7134_dev *dev); /* ----------------------------------------------------------- */ |