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