Add support for two models of Terratec TValue cards.
From FreeBSD problem report 53383, submitted by Tanja Wittke, updated by Simon Barner. Adapted for NetBSD by Alexander Becher, via port-i386.
This commit is contained in:
parent
3a21a4243b
commit
483767fb43
@ -1,6 +1,6 @@
|
||||
/* $SourceForge: bktr_card.c,v 1.3 2003/03/11 23:11:21 thomasklausner Exp $ */
|
||||
|
||||
/* $NetBSD: bktr_card.c,v 1.20 2005/05/30 04:30:18 christos Exp $ */
|
||||
/* $NetBSD: bktr_card.c,v 1.21 2005/12/06 23:43:57 wiz Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/bktr/bktr_card.c,v 1.16 2000/10/31 13:09:56 roger Exp$ */
|
||||
|
||||
/*
|
||||
@ -51,7 +51,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: bktr_card.c,v 1.20 2005/05/30 04:30:18 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bktr_card.c,v 1.21 2005/12/06 23:43:57 wiz Exp $");
|
||||
|
||||
#include "opt_bktr.h" /* Include any kernel config options */
|
||||
|
||||
@ -348,6 +348,18 @@ static const struct CARDTYPE cards[] = {
|
||||
{ 0x20000, 0x00000, 0x30000, 0x40000, 1 }, /* audio MUX values*/
|
||||
0x70000 }, /* GPIO mask */
|
||||
|
||||
{ CARD_TERRATVALUE, /* the card id */
|
||||
"Terratec TValue", /* the 'name' */
|
||||
NULL, /* the tuner */
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0, /* EEProm type */
|
||||
0, /* EEProm size */
|
||||
{ 0x500, 0x900, 0x300, 0x900, 1 }, /* audio MUX values*/
|
||||
0xffff00 }, /* GPIO mask */
|
||||
|
||||
};
|
||||
|
||||
struct bt848_card_sig bt848_card_signature[1]= {
|
||||
@ -539,6 +551,7 @@ static int locate_eeprom_address(bktr_ptr_t bktr) {
|
||||
#define PCI_VENDOR_AVERMEDIA 0x1461
|
||||
#define PCI_VENDOR_STB 0x10B4
|
||||
#define PCI_VENDOR_ASKEY 0x144F
|
||||
#define PCI_VENDOR_TERRATEC 0x153B
|
||||
#endif
|
||||
/* Following not confirmed with http://www.pcidatabase.com/,
|
||||
so not added to NetBSD's pcidevs */
|
||||
@ -549,6 +562,9 @@ static int locate_eeprom_address(bktr_ptr_t bktr) {
|
||||
#define PCI_VENDOR_FLYVIDEO_2 0x1852
|
||||
#define PCI_VENDOR_PINNACLE_ALT 0xBD11
|
||||
|
||||
#define MODEL_TERRATVALUE_1118 0x1118
|
||||
#define MODEL_TERRATVALUE_1134 0x1134
|
||||
|
||||
void
|
||||
probeCard(bktr_ptr_t bktr, int verbose, int unit)
|
||||
{
|
||||
@ -686,6 +702,15 @@ probeCard(bktr_ptr_t bktr, int verbose, int unit)
|
||||
goto checkTuner;
|
||||
}
|
||||
|
||||
if (subsystem_vendor_id == PCI_VENDOR_TERRATEC
|
||||
&& (subsystem_id == MODEL_TERRATVALUE_1118
|
||||
|| subsystem_id == MODEL_TERRATVALUE_1134)) {
|
||||
bktr->card = cards[(card = CARD_TERRATVALUE)];
|
||||
bktr->card.eepromAddr = eeprom_i2c_address;
|
||||
bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE);
|
||||
goto checkTuner;
|
||||
}
|
||||
|
||||
if (subsystem_vendor_id == PCI_VENDOR_TERRATEC) {
|
||||
bktr->card = cards[(card = CARD_TERRATVPLUS)];
|
||||
bktr->card.eepromAddr = eeprom_i2c_address;
|
||||
@ -1101,6 +1126,11 @@ checkTuner:
|
||||
goto checkDBX;
|
||||
break;
|
||||
|
||||
case CARD_TERRATVALUE:
|
||||
select_tuner(bktr, PHILIPS_PAL);
|
||||
goto checkDBX;
|
||||
break;
|
||||
|
||||
} /* end switch(card) */
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* $SourceForge: bktr_card.h,v 1.3 2003/03/11 23:11:22 thomasklausner Exp $ */
|
||||
|
||||
/* $NetBSD: bktr_card.h,v 1.4 2003/03/12 00:14:40 wiz Exp $ */
|
||||
/* $NetBSD: bktr_card.h,v 1.5 2005/12/06 23:43:57 wiz Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/bktr/bktr_card.h,v 1.4 2000/06/26 09:41:31 roger Exp$ */
|
||||
|
||||
/*
|
||||
@ -79,7 +79,8 @@
|
||||
#define CARD_ASKEY_DYNALINK_MAGIC_TVIEW 14
|
||||
#define CARD_LEADTEK 15
|
||||
#define CARD_TERRATVPLUS 16
|
||||
#define Bt848_MAX_CARD 17
|
||||
#define CARD_TERRATVALUE 17
|
||||
#define Bt848_MAX_CARD 18
|
||||
|
||||
|
||||
int signCard(bktr_ptr_t bktr, int offset, int count, u_char* sig);
|
||||
|
Loading…
Reference in New Issue
Block a user