DragonFly BSD
DragonFly submit List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[PATCH] make bktr work with terratec tvalue


From: Patrick Mauritz <oxygene@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 24 Apr 2004 16:17:57 +0200

the attached patch enables bktr to work with Terratec TValue, incl. sound.
apart from 5 register values from linux everything is copied from within the
driver.

patrick mauritz
Index: sys/dev/video/bktr/bktr_card.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/video/bktr/bktr_card.c,v
retrieving revision 1.5
diff -u -r1.5 bktr_card.c
--- sys/dev/video/bktr/bktr_card.c	5 Apr 2004 05:34:36 -0000	1.5
+++ sys/dev/video/bktr/bktr_card.c	24 Apr 2004 12:58:30 -0000
@@ -356,6 +356,19 @@
 	   { 0x10000, 0, 0x10000, 0, 1 },	/* audio MUX values */
 	   0x10f00 },				/* GPIO mask */
 
+        {  CARD_TERRATEC_TVALUE,                /* the card id */
+          "Terratec TerraTValue Bt878",         /* 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, 0, 0x300, 0x900, 0x900 },	/* audio MUX values */
+	   0x10f00 },				/* GPIO mask */
+
 };
 
 struct bt848_card_sig bt848_card_signature[1]= {
@@ -557,6 +570,7 @@
 #define PCI_VENDOR_FLYVIDEO_2	0x1852
 #define PCI_VENDOR_PINNACLE_ALT	0xBD11
 #define PCI_VENDOR_IODATA	0x10fc
+#define PCI_VENDOR_TERRATEC	0x153b
 
 #define MODEL_IODATA_GV_BCTV3_PCI	0x4020
 
@@ -703,6 +717,14 @@
 		    goto checkTuner;
 		}
 
+		if (subsystem_vendor_id == PCI_VENDOR_TERRATEC &&
+		    subsystem_id == 0x1118) {
+		    bktr->card = cards[ (card = CARD_TERRATEC_TVALUE) ];
+		    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",
@@ -1120,6 +1142,11 @@
 	    goto checkDBX;
 	    break;
 
+	case CARD_TERRATEC_TVALUE:
+	    select_tuner( bktr, PHILIPS_PAL );
+	    goto checkDBX;
+	    break;
+
 	} /* end switch(card) */
 
 
Index: sys/dev/video/bktr/bktr_card.h
===================================================================
RCS file: /home/dcvs/src/sys/dev/video/bktr/bktr_card.h,v
retrieving revision 1.2
diff -u -r1.2 bktr_card.h
--- sys/dev/video/bktr/bktr_card.h	17 Jun 2003 04:28:23 -0000	1.2
+++ sys/dev/video/bktr/bktr_card.h	24 Apr 2004 12:56:54 -0000
@@ -78,7 +78,8 @@
 #define CARD_LEADTEK		15
 #define CARD_TERRATVPLUS	16
 #define CARD_IO_BCTV3		17
-#define Bt848_MAX_CARD		18
+#define CARD_TERRATEC_TVALUE	18
+#define Bt848_MAX_CARD		19
 
 #define CARD_IO_GV		CARD_IO_BCTV2
 


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]