kern/53383: adding Terratec TValue to bktr driver
Tanja Wittke
tawi at gruft.de
Mon Jun 16 13:20:03 PDT 2003
>Number: 53383
>Category: kern
>Synopsis: adding Terratec TValue to bktr driver
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Jun 16 13:20:01 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Tanja Wittke
>Release: FreeBSD 4.8-PRERELEASE i386
>Organization:
private
>Environment:
System: FreeBSD strolch.ob-home.lan 4.8-STABLE FreeBSD 4.8-STABLE #20: Mon Jun 16 21:12:17 CEST 2003 root at strolch.ob-home.lan:/usr/obj/usr/src/sys/STROLCH i386
>Description:
When using the Terratec TValue Card widely used in Germany there is no sound
and the wrong tuner is detected on the card. Adding the audio mux values,
gpio mask and detection of the card fixes this.
>How-To-Repeat:
Simply use a Terratec TValue card with the bktr driver...
>Fix:
Applied you find a diff for the bktr_card.[ch] files which fixes the behaviour
for that card.
NOTE: I implemented this for only one specific model of the card (according
to the PCI device ID). There are several other device IDs which seem to use
the same values according to the SOlaris/Linux driver. These IDs are:
0x1117
0x1118 (which is implemented with my patch)
0x1119
0x111a
(and maybe others)
SNIP HERE
diff -c sys/dev/bktr.old/bktr_card.c sys/dev/bktr/bktr_card.c
*** sys/dev/bktr.old/bktr_card.c Sat Feb 8 03:04:57 2003
--- sys/dev/bktr/bktr_card.c Mon Jun 16 22:03:01 2003
***************
*** 355,360 ****
--- 355,373 ----
{ 0x10000, 0, 0x10000, 0, 1 }, /* audio MUX values */
0x10f00 }, /* GPIO mask */
+ { CARD_TERRATVALUE, /* the card id */
+ "TerraTec TValue", /* the 'name' */
+ NULL, /* the tuner */
+ 0, /* the tuner i2c address */
+ 0, /* dbx is optional */
+ 0,
+ 0,
+ 0, /* EEProm type */
+ 0, /* EEProm size */
+ /* Tuner, Extern, Intern, Mute, Enabled */
+ { 0x500, 0x900, 0x300, 0x900, 1 }, /* audio MUX values */
+ 0xffff00 }, /* GPIO mask */
+
};
struct bt848_card_sig bt848_card_signature[1]= {
***************
*** 546,551 ****
--- 559,565 ----
#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://members.hyperlink.net.au/~chart,
so not added to NetBSD's pcidevs */
***************
*** 556,561 ****
--- 570,576 ----
#define PCI_VENDOR_IODATA 0x10fc
#define MODEL_IODATA_GV_BCTV3_PCI 0x4020
+ #define MODEL_TERRATVALUE1118 0x1118
void
probeCard( bktr_ptr_t bktr, int verbose, int unit )
***************
*** 697,702 ****
--- 712,725 ----
goto checkTuner;
}
+ if (subsystem_vendor_id == PCI_VENDOR_TERRATEC &&
+ subsystem_id == MODEL_TERRATVALUE1118 ) {
+ bktr->card = cards[ (card = CARD_TERRATVALUE) ];
+ bktr->card.eepromAddr = eeprom_i2c_address;
+ bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE);
+ goto checkTuner;
+ }
+
/* Vendor is unknown. We will use the standard probe code */
/* which may not give best results */
printf("%s: Warning - card vendor 0x%04x (model 0x%04x) unknown.\n",
***************
*** 1111,1116 ****
--- 1134,1144 ----
case CARD_IO_BCTV3:
select_tuner( bktr, ALPS_TSCH5 ); /* ALPS_TSCH6, in fact. */
+ goto checkDBX;
+ break;
+
+ case CARD_TERRATVALUE:
+ select_tuner( bktr, PHILIPS_PAL); /* Phlips PAL tuner */
goto checkDBX;
break;
diff -c sys/dev/bktr.old/bktr_card.h sys/dev/bktr/bktr_card.h
*** sys/dev/bktr.old/bktr_card.h Sat Feb 8 03:04:57 2003
--- sys/dev/bktr/bktr_card.h Mon Jun 16 22:03:01 2003
***************
*** 77,83 ****
#define CARD_LEADTEK 15
#define CARD_TERRATVPLUS 16
#define CARD_IO_BCTV3 17
! #define Bt848_MAX_CARD 18
#define CARD_IO_GV CARD_IO_BCTV2
--- 77,84 ----
#define CARD_LEADTEK 15
#define CARD_TERRATVPLUS 16
#define CARD_IO_BCTV3 17
! #define CARD_TERRATVALUE 18
! #define Bt848_MAX_CARD 19
#define CARD_IO_GV CARD_IO_BCTV2
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list