xref: /netbsd/sys/dev/pci/bktr/bktr_card.h (revision 6550d01e)
1 /* $SourceForge: bktr_card.h,v 1.3 2003/03/11 23:11:22 thomasklausner Exp $ */
2 
3 /*	$NetBSD: bktr_card.h,v 1.5 2005/12/06 23:43:57 wiz Exp $	*/
4 /* $FreeBSD: src/sys/dev/bktr/bktr_card.h,v 1.4 2000/06/26 09:41:31 roger Exp$ */
5 
6 /*
7  * This is part of the Driver for Video Capture Cards (Frame grabbers)
8  * and TV Tuner cards using the Brooktree Bt848, Bt848A, Bt849A, Bt878, Bt879
9  * chipset.
10  * Copyright Roger Hardiman and Amancio Hasty.
11  *
12  * bktr_card : This deals with identifying TV cards.
13  *               trying to find the card make and model of card.
14  *               trying to find the type of tuner fitted.
15  *               reading the configuration EEPROM.
16  *               locating i2c devices.
17  *
18  */
19 
20 /*
21  * 1. Redistributions of source code must retain the
22  * Copyright (c) 1997 Amancio Hasty, 1999 Roger Hardiman
23  * All rights reserved.
24  *
25  * Redistribution and use in source and binary forms, with or without
26  * modification, are permitted provided that the following conditions
27  * are met:
28  * 1. Redistributions of source code must retain the above copyright
29  *    notice, this list of conditions and the following disclaimer.
30  * 2. Redistributions in binary form must reproduce the above copyright
31  *    notice, this list of conditions and the following disclaimer in the
32  *    documentation and/or other materials provided with the distribution.
33  * 3. All advertising materials mentioning features or use of this software
34  *    must display the following acknowledgement:
35  *      This product includes software developed by Amancio Hasty and
36  *      Roger Hardiman
37  * 4. The name of the author may not be used to endorse or promote products
38  *    derived from this software without specific prior written permission.
39  *
40  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
41  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
42  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
43  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
44  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
45  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
46  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
49  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
50  * POSSIBILITY OF SUCH DAMAGE.
51  */
52 
53 /*
54  * If probeCard() fails to detect the correct card on boot you can
55  * override it by setting adding the following option to your kernel config
56  *  options BKTR_OVERRIDE_CARD  <card type>
57  *  eg options BKTR_OVERRIDE CARD=1
58  *
59  * or using the sysclt  hw.bt848.card
60  *  eg sysctl -w hw.bt848.card=1
61  *
62  * where <card type> is one of the following card defines.
63  */
64 
65 #define CARD_UNKNOWN		0
66 #define CARD_MIRO		1
67 #define CARD_HAUPPAUGE		2
68 #define CARD_STB		3
69 #define CARD_INTEL		4   /* Also for VideoLogic Captivator PCI */
70 #define CARD_IMS_TURBO		5
71 #define CARD_AVER_MEDIA		6
72 #define CARD_OSPREY		7
73 #define CARD_NEC_PK		8
74 #define CARD_IO_GV		9
75 #define CARD_FLYVIDEO		10
76 #define CARD_ZOLTRIX		11
77 #define CARD_KISS		12
78 #define CARD_VIDEO_HIGHWAY_XTREME	13
79 #define CARD_ASKEY_DYNALINK_MAGIC_TVIEW	14
80 #define CARD_LEADTEK		15
81 #define CARD_TERRATVPLUS	16
82 #define CARD_TERRATVALUE	17
83 #define Bt848_MAX_CARD		18
84 
85 
86 int	signCard(bktr_ptr_t bktr, int offset, int count, u_char* sig);
87 void	probeCard(bktr_ptr_t bktr, int verbose, int unit);
88 
89 int	writeEEProm(bktr_ptr_t bktr, int offset, int count, u_char *data);
90 int	readEEProm(bktr_ptr_t bktr, int offset, int count, u_char *data);
91 
92