Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Nov 2005 13:29:17 +0100
From:      Simon Barner <barner@FreeBSD.org>
To:        multimedia@freebsd.org
Subject:   [bktr] Add pci device id for TerraTValue cards.
Message-ID:  <20051112122917.GB29397@zi025.glhnet.mhn.de>

next in thread | raw e-mail | index | archive | help

--yNb1oOkm5a9FJOVX
Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+"
Content-Disposition: inline


--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

could somebody please have a look at kern/53383? I've added another
subid, and made the patch apply against RELENG_6. The card works fine
with xawtv, mplayer, ... The patch is also attached.

Btw., kern/76002 also contains new PCI ids.

Thanks in advance,

--=20
Best regards / Viele Gr=FC=DFe,                             barner@FreeBSD.=
org
 Simon Barner                                                barner@gmx.de

--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bktr.patch"
Content-Transfer-Encoding: quoted-printable

diff -ruN sys/dev/bktr.orig/bktr_card.c sys/dev/bktr/bktr_card.c
--- sys/dev/bktr.orig/bktr_card.c	Sat Nov 12 12:19:40 2005
+++ sys/dev/bktr/bktr_card.c	Sat Nov 12 12:29:01 2005
@@ -391,6 +391,18 @@
 	    { 0x20000, 0x80000, 0, 0xa8000, 1 },        /* audio MUX values */
 	    0xAA0000 },                         /* GPIO mask */
=20
+	{  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 */
 };
=20
 struct bt848_card_sig bt848_card_signature[1]=3D {
@@ -582,6 +594,7 @@
 #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 */
@@ -595,6 +608,8 @@
 #define PCI_VENDOR_PINNACLE_NEW	0x11BD
=20
 #define MODEL_IODATA_GV_BCTV3_PCI	0x4020
+#define MODEL_TERRATVALUE_1118		0x1118
+#define MODEL_TERRATVALUE_1134		0x1134
=20
 void
 probeCard( bktr_ptr_t bktr, int verbose, int unit )
@@ -739,6 +754,15 @@
 		    goto checkTuner;
 		}
=20
+		if ((subsystem_vendor_id =3D=3D PCI_VENDOR_TERRATEC) &&
+		    (subsystem_id =3D=3D MODEL_TERRATVALUE_1134 ||
+		    subsystem_id =3D=3D MODEL_TERRATVALUE_1118)) {
+		    bktr->card =3D cards[ (card =3D CARD_TERRATVALUE) ];
+		    bktr->card.eepromAddr =3D eeprom_i2c_address;
+		    bktr->card.eepromSize =3D (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",
@@ -1162,6 +1186,11 @@
=20
 	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;
=20
diff -ruN sys/dev/bktr.orig/bktr_card.h sys/dev/bktr/bktr_card.h
--- sys/dev/bktr.orig/bktr_card.h	Sat Nov 12 12:19:40 2005
+++ sys/dev/bktr/bktr_card.h	Sat Nov 12 12:21:01 2005
@@ -80,8 +80,9 @@
 #define	CARD_AOPEN_VA1000	18
 #define CARD_PINNACLE_PCTV_RAVE	19
 #define CARD_PIXELVIEW_PLAYTV_PAK	20
-#define Bt848_MAX_CARD		21
-
+#define CARD_TERRATVALUE	21
+#define Bt848_MAX_CARD		22
+=20
 #define CARD_IO_GV		CARD_IO_BCTV2
=20
 int	signCard( bktr_ptr_t bktr, int offset, int count, u_char* sig );

--8t9RHnE3ZwKMSgU+--

--yNb1oOkm5a9FJOVX
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDdeAdCkn+/eutqCoRAjxwAKDIlZlLpvXRFOTDwSWXK1NVTP7uEwCggqTC
/HR9BBmGVXs7tn/u6LNiVAo=
=NSHh
-----END PGP SIGNATURE-----

--yNb1oOkm5a9FJOVX--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051112122917.GB29397>