blob: 21ffe1c8dde46b643e8518db99c4d0844106df75 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3 bttv-cards.c
4
5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
7
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08009 & Marcus Metzler (mocm@thp.uni-koeln.de)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26*/
27
28#include <linux/config.h>
29#include <linux/delay.h>
30#include <linux/module.h>
31#include <linux/moduleparam.h>
32#include <linux/kmod.h>
33#include <linux/init.h>
34#include <linux/pci.h>
35#include <linux/vmalloc.h>
36#include <linux/firmware.h>
37
38#include <asm/io.h>
39
40#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020041#include <media/v4l2-common.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070042
43/* fwd decl */
44static void boot_msp34xx(struct bttv *btv, int pin);
45static void boot_bt832(struct bttv *btv);
46static void hauppauge_eeprom(struct bttv *btv);
47static void avermedia_eeprom(struct bttv *btv);
48static void osprey_eeprom(struct bttv *btv);
49static void modtec_eeprom(struct bttv *btv);
50static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070051static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052
53static void winview_audio(struct bttv *btv, struct video_audio *v, int set);
54static void lt9415_audio(struct bttv *btv, struct video_audio *v, int set);
55static void avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v,
56 int set);
57static void avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v,
58 int set);
59static void terratv_audio(struct bttv *btv, struct video_audio *v, int set);
60static void gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set);
61static void gvbctv5pci_audio(struct bttv *btv, struct video_audio *v, int set);
62static void winfast2000_audio(struct bttv *btv, struct video_audio *v, int set);
63static void pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set);
64static void fv2000s_audio(struct bttv *btv, struct video_audio *v, int set);
65static void windvr_audio(struct bttv *btv, struct video_audio *v, int set);
66static void adtvk503_audio(struct bttv *btv, struct video_audio *v, int set);
67static void rv605_muxsel(struct bttv *btv, unsigned int input);
68static void eagle_muxsel(struct bttv *btv, unsigned int input);
69static void xguard_muxsel(struct bttv *btv, unsigned int input);
70static void ivc120_muxsel(struct bttv *btv, unsigned int input);
71static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
72
73static void PXC200_muxsel(struct bttv *btv, unsigned int input);
74
75static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
76static void picolo_tetra_init(struct bttv *btv);
77
78static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
79static void tibetCS16_init(struct bttv *btv);
80
81static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
82static void kodicom4400r_init(struct bttv *btv);
83
84static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
85static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
86
87static int terratec_active_radio_upgrade(struct bttv *btv);
88static int tea5757_read(struct bttv *btv);
89static int tea5757_write(struct bttv *btv, int value);
90static void identify_by_eeprom(struct bttv *btv,
91 unsigned char eeprom_data[256]);
92static int __devinit pvr_boot(struct bttv *btv);
93
94/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020095static unsigned int triton1;
96static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070097static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070098int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070099
100static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
101static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
102static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
103static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
104static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
105static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
106#ifdef MODULE
107static unsigned int autoload = 1;
108#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -0200109static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110#endif
111static unsigned int gpiomask = UNSET;
112static unsigned int audioall = UNSET;
113static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
114
115/* insmod options */
116module_param(triton1, int, 0444);
117module_param(vsfx, int, 0444);
118module_param(no_overlay, int, 0444);
119module_param(latency, int, 0444);
120module_param(gpiomask, int, 0444);
121module_param(audioall, int, 0444);
122module_param(autoload, int, 0444);
123
124module_param_array(card, int, NULL, 0444);
125module_param_array(pll, int, NULL, 0444);
126module_param_array(tuner, int, NULL, 0444);
127module_param_array(svhs, int, NULL, 0444);
128module_param_array(remote, int, NULL, 0444);
129module_param_array(audiomux, int, NULL, 0444);
130
131MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
132 "[enable bug compatibility for triton1 + others]");
133MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
134 "[yet another chipset flaw workaround]");
135MODULE_PARM_DESC(latency,"pci latency timer");
136MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
137MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
138MODULE_PARM_DESC(tuner,"specify installed tuner type");
139MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
140
141/* ----------------------------------------------------------------------- */
142/* list of card IDs for bt878+ cards */
143
144static struct CARD {
145 unsigned id;
146 int cardnr;
147 char *name;
148} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800149 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
150 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
151 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
152 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
153 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
154 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
155 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
156 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800157 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800159 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
160 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800162 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
163 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
164 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
165 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
166 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800167 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
169 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800170 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800172 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700173 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
175 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700176 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800177 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800179 { 0x3000121a, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
180 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
181 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800183 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
184 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
185 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
186 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
187 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
188 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
189 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800191 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
192 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
193 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
194 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
195 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800197 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
198 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
199 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
200 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800202 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
203 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700204 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800205 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
206 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
207 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
208 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
209 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800211 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
212 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
213 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
214 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
215 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800217 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
218 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
219 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
220 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
221 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800223 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
224 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
225 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
226 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700227
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800228 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
229 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
230 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
231 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700232
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800233 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
234 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
235 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
236 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
237 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
238 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
239 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
240 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
241 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
242 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800259 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
260 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800262 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
263 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
264 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
265 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
266 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
267 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800269 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
270 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700271
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800272 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
273 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
274 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
275 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
276 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
277 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800278 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
279 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800280 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800282 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
283 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800285 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
286 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
287 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
288 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800290 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700292 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800293 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700294
Steven Tothcd1257d2006-01-09 15:25:01 -0200295 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
296 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
297
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700298 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800299 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200300 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
301 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800302 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
303 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
304 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
305 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200306 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800307 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
308 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700309
310 { 0, -1, NULL }
311};
312
313/* ----------------------------------------------------------------------- */
314/* array with description for bt848 / bt878 tv/grabber cards */
315
316struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800317 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800318 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800319 .name = " *** UNKNOWN/GENERIC *** ",
320 .video_inputs = 4,
321 .audio_inputs = 1,
322 .tuner = 0,
323 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200324 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800325 .tuner_type = -1,
326 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800327 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800328 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800329 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800330 .name = "MIRO PCTV",
331 .video_inputs = 4,
332 .audio_inputs = 1,
333 .tuner = 0,
334 .svhs = 2,
335 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200336 .muxsel = { 2, 3, 1, 1 },
337 .audiomux = { 2, 0, 0, 0, 10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800338 .needs_tvaudio = 1,
339 .tuner_type = -1,
340 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800341 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800342 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800343 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800344 .name = "Hauppauge (bt848)",
345 .video_inputs = 4,
346 .audio_inputs = 1,
347 .tuner = 0,
348 .svhs = 2,
349 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200350 .muxsel = { 2, 3, 1, 1 },
351 .audiomux = { 0, 1, 2, 3, 4 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800352 .needs_tvaudio = 1,
353 .tuner_type = -1,
354 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800355 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800357 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800358 .name = "STB, Gateway P/N 6000699 (bt848)",
359 .video_inputs = 3,
360 .audio_inputs = 1,
361 .tuner = 0,
362 .svhs = 2,
363 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200364 .muxsel = { 2, 3, 1, 1 },
365 .audiomux = { 4, 0, 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800366 .no_msp34xx = 1,
367 .needs_tvaudio = 1,
368 .tuner_type = TUNER_PHILIPS_NTSC,
369 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800370 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800371 .pll = PLL_28,
372 .has_radio = 1,
373 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700374
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800375 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800376 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800377 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
378 .video_inputs = 4,
379 .audio_inputs = 0,
380 .tuner = -1,
381 .svhs = 2,
382 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200383 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800384 .audiomux = { 0 },
385 .needs_tvaudio = 0,
386 .tuner_type = 4,
387 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800388 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800390 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800391 .name = "Diamond DTV2000",
392 .video_inputs = 4,
393 .audio_inputs = 1,
394 .tuner = 0,
395 .svhs = 2,
396 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200397 .muxsel = { 2, 3, 1, 0 },
398 .audiomux = { 0, 1, 0, 1, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800399 .needs_tvaudio = 1,
400 .tuner_type = -1,
401 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800402 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800403 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800404 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 .name = "AVerMedia TVPhone",
406 .video_inputs = 3,
407 .audio_inputs = 1,
408 .tuner = 0,
409 .svhs = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200410 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800411 .gpiomask = 0x0f,
Michael Krufkybc286362006-01-11 19:40:17 -0200412 .audiomux = { 0x0c, 0x04, 0x08, 0x04, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800413 /* 0x04 for some cards ?? */
414 .needs_tvaudio = 1,
415 .tuner_type = -1,
416 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800417 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800418 .audio_hook = avermedia_tvphone_audio,
419 .has_remote = 1,
420 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800421 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .name = "MATRIX-Vision MV-Delta",
423 .video_inputs = 5,
424 .audio_inputs = 1,
425 .tuner = -1,
426 .svhs = 3,
427 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200428 .muxsel = { 2, 3, 1, 0, 0 },
429 .audiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800430 .needs_tvaudio = 1,
431 .tuner_type = -1,
432 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800433 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800434 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800437 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
439 .video_inputs = 4,
440 .audio_inputs = 1,
441 .tuner = 0,
442 .svhs = 2,
443 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200444 .muxsel = { 2, 3, 1, 1 },
445 .audiomux = { 0, 0xc00, 0x800, 0x400, 0xc00, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800446 .needs_tvaudio = 1,
447 .pll = PLL_28,
448 .tuner_type = -1,
449 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800450 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800451 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800452 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .name = "IMS/IXmicro TurboTV",
454 .video_inputs = 3,
455 .audio_inputs = 1,
456 .tuner = 0,
457 .svhs = 2,
458 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200459 .muxsel = { 2, 3, 1, 1 },
460 .audiomux = { 1, 1, 2, 3, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800461 .needs_tvaudio = 0,
462 .pll = PLL_28,
463 .tuner_type = TUNER_TEMIC_PAL,
464 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800465 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800466 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800467 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800468 .name = "Hauppauge (bt878)",
469 .video_inputs = 4,
470 .audio_inputs = 1,
471 .tuner = 0,
472 .svhs = 2,
473 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -0200474 .muxsel = { 2, 0, 1, 1 },
475 .audiomux = { 0, 1, 2, 3, 4 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800476 .needs_tvaudio = 1,
477 .pll = PLL_28,
478 .tuner_type = -1,
479 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800480 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800481 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800482 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800483 .name = "MIRO PCTV pro",
484 .video_inputs = 3,
485 .audio_inputs = 1,
486 .tuner = 0,
487 .svhs = 2,
488 .gpiomask = 0x3014f,
Michael Krufkybc286362006-01-11 19:40:17 -0200489 .muxsel = { 2, 3, 1, 1 },
490 .audiomux = { 0x20001,0x10001, 0, 0,10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800491 .needs_tvaudio = 1,
492 .tuner_type = -1,
493 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800494 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800495 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700496
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800497 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800498 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 .name = "ADS Technologies Channel Surfer TV (bt848)",
500 .video_inputs = 3,
501 .audio_inputs = 1,
502 .tuner = 0,
503 .svhs = 2,
504 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200505 .muxsel = { 2, 3, 1, 1 },
506 .audiomux = { 13, 14, 11, 7, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800507 .needs_tvaudio = 1,
508 .tuner_type = -1,
509 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800510 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800511 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800512 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 .name = "AVerMedia TVCapture 98",
514 .video_inputs = 3,
515 .audio_inputs = 4,
516 .tuner = 0,
517 .svhs = 2,
518 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200519 .muxsel = { 2, 3, 1, 1 },
520 .audiomux = { 13, 14, 11, 7, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800521 .needs_tvaudio = 1,
522 .msp34xx_alt = 1,
523 .pll = PLL_28,
524 .tuner_type = TUNER_PHILIPS_PAL,
525 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800526 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800527 .audio_hook = avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800528 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800529 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800530 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800531 .name = "Aimslab Video Highway Xtreme (VHX)",
532 .video_inputs = 3,
533 .audio_inputs = 1,
534 .tuner = 0,
535 .svhs = 2,
536 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200537 .muxsel = { 2, 3, 1, 1 },
538 .audiomux = { 0, 2, 1, 3, 4 }, /* old: {0, 1, 2, 3, 4} */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800539 .needs_tvaudio = 1,
540 .pll = PLL_28,
541 .tuner_type = -1,
542 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800543 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800544 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800545 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800546 .name = "Zoltrix TV-Max",
547 .video_inputs = 3,
548 .audio_inputs = 1,
549 .tuner = 0,
550 .svhs = 2,
551 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200552 .muxsel = { 2, 3, 1, 1 },
553 .audiomux = { 0 , 0, 1 , 0, 10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800554 .needs_tvaudio = 1,
555 .tuner_type = -1,
556 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800557 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800558 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800560 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800561 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 .name = "Prolink Pixelview PlayTV (bt878)",
563 .video_inputs = 3,
564 .audio_inputs = 1,
565 .tuner = 0,
566 .svhs = 2,
567 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200568 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 #if 0
570 /* old */
571 .audiomux = { 0x01c000, 0, 0x018000, 0x014000, 0x002000, 0 },
572 #else
573 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
574 .audiomux = { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
575 #endif
576 .needs_tvaudio = 1,
577 .pll = PLL_28,
578 .tuner_type = -1,
579 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800580 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800581 .name = "Leadtek WinView 601",
582 .video_inputs = 3,
583 .audio_inputs = 1,
584 .tuner = 0,
585 .svhs = 2,
586 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200587 .muxsel = { 2, 3, 1, 1,0 },
588 .audiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800589 .needs_tvaudio = 1,
590 .tuner_type = -1,
591 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800592 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800593 .audio_hook = winview_audio,
594 .has_radio = 1,
595 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800596 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800597 .name = "AVEC Intercapture",
598 .video_inputs = 3,
599 .audio_inputs = 2,
600 .tuner = 0,
601 .svhs = 2,
602 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200603 .muxsel = { 2, 3, 1, 1 },
604 .audiomux = { 1, 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800605 .needs_tvaudio = 1,
606 .tuner_type = -1,
607 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800608 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800609 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800610 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800611 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
612 .video_inputs = 4,
613 .audio_inputs = 1,
614 .tuner = -1,
615 .svhs = -1,
616 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200617 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800618 .audiomux = { 0 },
619 .no_msp34xx = 1,
620 .tuner_type = -1,
621 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800622 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800623 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700624
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800625 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800626 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800627 .name = "CEI Raffles Card",
628 .video_inputs = 3,
629 .audio_inputs = 3,
630 .tuner = 0,
631 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200632 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800633 .tuner_type = -1,
634 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800635 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800636 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800637 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800638 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
639 .video_inputs = 4,
640 .audio_inputs = 2, /* tuner, line in */
641 .tuner = 0,
642 .svhs = 2,
643 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200644 .muxsel = { 2, 3, 1, 1 },
645 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800646 .pll = PLL_28,
647 .tuner_type = TUNER_PHILIPS_PAL_I,
648 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800649 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800650 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800651 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800652 .name = "Askey CPH050/ Phoebe Tv Master + FM",
653 .video_inputs = 3,
654 .audio_inputs = 1,
655 .tuner = 0,
656 .svhs = 2,
657 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200658 .muxsel = { 2, 3, 1, 1 },
659 .audiomux = { 0, 1, 0x800, 0x400, 0xc00, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800660 .needs_tvaudio = 1,
661 .pll = PLL_28,
662 .tuner_type = -1,
663 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800664 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800665 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800666 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800667 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
668 .video_inputs = 3,
669 .audio_inputs = 1,
670 .tuner = 0,
671 .svhs = -1,
672 .gpiomask = 7,
673 .muxsel = { 2, 3, -1 },
674 .digital_mode = DIGITAL_MODE_CAMERA,
675 .audiomux = { 0, 0, 0, 0, 0 },
676 .no_msp34xx = 1,
677 .pll = PLL_28,
678 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
679 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800680 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800681 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700682
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800683 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800684 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800685 .name = "Askey CPH05X/06X (bt878) [many vendors]",
686 .video_inputs = 3,
687 .audio_inputs = 1,
688 .tuner = 0,
689 .svhs = 2,
690 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200691 .muxsel = { 2, 3, 1, 1 },
692 .audiomux = {0x400, 0x400, 0x400, 0x400, 0xc00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 .needs_tvaudio = 1,
694 .pll = PLL_28,
695 .tuner_type = -1,
696 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800697 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800698 .has_remote = 1,
699 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800700 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800701 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
702 .video_inputs = 3,
703 .audio_inputs = 1,
704 .tuner = 0,
705 .svhs = 2,
706 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200707 .muxsel = { 2, 3, 1, 1 },
708 .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800709 .needs_tvaudio = 0,
710 .tuner_type = TUNER_PHILIPS_PAL,
711 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800712 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800713 .audio_hook = terratv_audio,
714 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800715 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800716 .name = "Hauppauge WinCam newer (bt878)",
717 .video_inputs = 4,
718 .audio_inputs = 1,
719 .tuner = 0,
720 .svhs = 3,
721 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200722 .muxsel = { 2, 0, 1, 1 },
723 .audiomux = { 0, 1, 2, 3, 4 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800724 .needs_tvaudio = 1,
725 .tuner_type = -1,
726 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800727 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800728 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800729 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800730 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
731 .video_inputs = 4,
732 .audio_inputs = 2,
733 .tuner = 0,
734 .svhs = 2,
735 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200736 .muxsel = { 2, 3, 1, 1 },
737 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800738 .pll = PLL_28,
739 .tuner_type = TUNER_PHILIPS_SECAM,
740 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800741 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800742 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700743
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800744 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800745 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800746 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
747 .video_inputs = 3,
748 .audio_inputs = 1,
749 .tuner = 0,
750 .svhs = 2,
751 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200752 .muxsel = { 2, 3, 1, 1 },
753 .audiomux = { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800754 .needs_tvaudio = 0,
755 .tuner_type = TUNER_PHILIPS_PAL,
756 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800757 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800758 .audio_hook = terratv_audio,
759 /* GPIO wiring:
760 External 20 pin connector (for Active Radio Upgrade board)
761 gpio00: i2c-sda
762 gpio01: i2c-scl
763 gpio02: om5610-data
764 gpio03: om5610-clk
765 gpio04: om5610-wre
766 gpio05: om5610-stereo
767 gpio06: rds6588-davn
768 gpio07: Pin 7 n.c.
769 gpio08: nIOW
770 gpio09+10: nIOR, nSEL ?? (bt878)
771 gpio09: nIOR (bt848)
772 gpio10: nSEL (bt848)
773 Sound Routing:
774 gpio16: u2-A0 (1st 4052bt)
775 gpio17: u2-A1
776 gpio18: u2-nEN
777 gpio19: u4-A0 (2nd 4052)
778 gpio20: u4-A1
779 u4-nEN - GND
780 Btspy:
781 00000 : Cdrom (internal audio input)
782 10000 : ext. Video audio input
783 20000 : TV Mono
784 a0000 : TV Mono/2
785 1a0000 : TV Stereo
786 30000 : Radio
787 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700788 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700789
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800790 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800791 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800792 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
793 .name = "Imagenation PXC200",
794 .video_inputs = 5,
795 .audio_inputs = 1,
796 .tuner = -1,
797 .svhs = 1, /* was: 4 */
798 .gpiomask = 0,
799 .muxsel = { 2, 3, 1, 0, 0},
800 .audiomux = { 0 },
801 .needs_tvaudio = 1,
802 .tuner_type = -1,
803 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800804 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800805 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700806
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800808 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800809 .name = "Lifeview FlyVideo 98 LR50",
810 .video_inputs = 4,
811 .audio_inputs = 1,
812 .tuner = 0,
813 .svhs = 2,
814 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200815 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800816 .audiomux = { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 },
817 .pll = PLL_28,
818 .tuner_type = -1,
819 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800820 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800821 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800822 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800823 .name = "Formac iProTV, Formac ProTV I (bt848)",
824 .video_inputs = 4,
825 .audio_inputs = 1,
826 .tuner = 0,
827 .svhs = 3,
828 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200829 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 .audiomux = { 1, 0, 0, 0, 0 },
831 .pll = PLL_28,
832 .tuner_type = TUNER_PHILIPS_PAL,
833 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800834 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800835 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700836
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800837 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800838 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800839 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
840 .video_inputs = 4,
841 .audio_inputs = 0,
842 .tuner = -1,
843 .svhs = 2,
844 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200845 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 .audiomux = { 0 },
847 .needs_tvaudio = 0,
848 .tuner_type = 4,
849 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800850 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800851 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800852 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800853 .name = "Terratec TerraTValue Version Bt878",
854 .video_inputs = 3,
855 .audio_inputs = 1,
856 .tuner = 0,
857 .svhs = 2,
858 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200859 .muxsel = { 2, 3, 1, 1 },
860 .audiomux = { 0x500, 0, 0x300, 0x900, 0x900 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800861 .needs_tvaudio = 1,
862 .pll = PLL_28,
863 .tuner_type = TUNER_PHILIPS_PAL,
864 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800865 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800866 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800867 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800868 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
869 .video_inputs = 4,
870 .audio_inputs = 1,
871 .tuner = 0,
872 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200873 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800874 #if 0
875 .gpiomask = 0xc33000,
876 .audiomux = { 0x422000,0x1000,0x0000,0x620000,0x800000 },
877 #else
878 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
879 .gpiomask = 0xb33000,
880 .audiomux = { 0x122000,0x1000,0x0000,0x620000,0x800000 },
881 #endif
882 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
883 gpio23 -- hef4052:nEnable (0x800000)
884 gpio12 -- hef4052:A1
885 gpio13 -- hef4052:A0
886 0x0000: external audio
887 0x1000: FM
888 0x2000: TV
889 0x3000: n.c.
890 Note: There exists another variant "Winfast 2000" with tv stereo !?
891 Note: eeprom only contains FF and pci subsystem id 107d:6606
892 */
893 .needs_tvaudio = 0,
894 .pll = PLL_28,
895 .has_radio = 1,
896 .tuner_type = 5, /* default for now, gpio reads BFFF06 for Pal bg+dk */
897 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800898 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800899 .audio_hook = winfast2000_audio,
900 .has_remote = 1,
901 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800902 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800903 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
904 .video_inputs = 4,
905 .audio_inputs = 3,
906 .tuner = 0,
907 .svhs = 2,
908 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200909 .muxsel = { 2, 3, 1, 1 },
910 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .pll = PLL_28,
912 .tuner_type = -1,
913 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800914 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800915 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700916
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800917 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800918 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800919 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
920 .video_inputs = 4,
921 .audio_inputs = 3,
922 .tuner = 0,
923 .svhs = 2,
924 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200925 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
927 .pll = PLL_28,
928 .tuner_type = -1,
929 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800930 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800931 .has_radio = 1,
932 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800933 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800934 .name = "Prolink PixelView PlayTV pro",
935 .video_inputs = 3,
936 .audio_inputs = 1,
937 .tuner = 0,
938 .svhs = 2,
939 .gpiomask = 0xff,
940 .muxsel = { 2, 3, 1, 1 },
941 .audiomux = { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
942 .no_msp34xx = 1,
943 .pll = PLL_28,
944 .tuner_type = -1,
945 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800946 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800947 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800948 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800949 .name = "Askey CPH06X TView99",
950 .video_inputs = 4,
951 .audio_inputs = 1,
952 .tuner = 0,
953 .svhs = 2,
954 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200955 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .audiomux = { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 },
957 .needs_tvaudio = 1,
958 .pll = PLL_28,
959 .tuner_type = 1,
960 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800961 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800962 .has_remote = 1,
963 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800964 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800965 .name = "Pinnacle PCTV Studio/Rave",
966 .video_inputs = 3,
967 .audio_inputs = 1,
968 .tuner = 0,
969 .svhs = 2,
970 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200971 .muxsel = { 2, 3, 1, 1 },
972 .audiomux = { 2, 0xd0001, 0, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800973 .needs_tvaudio = 0,
974 .pll = PLL_28,
975 .tuner_type = -1,
976 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800977 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800978 },
979
980 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800981 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800982 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
983 .video_inputs = 3,
984 .audio_inputs = 1,
985 .tuner = 0,
986 .svhs = 2,
987 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200988 .muxsel = { 2, 3, 1, 1 },
989 .audiomux = { 4, 0, 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800990 .no_msp34xx = 1,
991 .needs_tvaudio = 1,
992 .tuner_type = TUNER_PHILIPS_NTSC,
993 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800994 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800995 .pll = PLL_28,
996 .has_radio = 1,
997 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800998 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800999 .name = "AVerMedia TVPhone 98",
1000 .video_inputs = 3,
1001 .audio_inputs = 4,
1002 .tuner = 0,
1003 .svhs = 2,
1004 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001005 .muxsel = { 2, 3, 1, 1 },
1006 .audiomux = { 13, 4, 11, 7, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001007 .needs_tvaudio = 1,
1008 .pll = PLL_28,
1009 .tuner_type = -1,
1010 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001011 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001012 .has_radio = 1,
1013 .audio_hook = avermedia_tvphone_audio,
1014 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001015 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .name = "ProVideo PV951", /* pic16c54 */
1017 .video_inputs = 3,
1018 .audio_inputs = 1,
1019 .tuner = 0,
1020 .svhs = 2,
1021 .gpiomask = 0,
1022 .muxsel = { 2, 3, 1, 1},
1023 .audiomux = { 0, 0, 0, 0, 0},
1024 .needs_tvaudio = 1,
1025 .no_msp34xx = 1,
1026 .pll = PLL_28,
1027 .tuner_type = 1,
1028 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001029 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001031 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001032 .name = "Little OnAir TV",
1033 .video_inputs = 3,
1034 .audio_inputs = 1,
1035 .tuner = 0,
1036 .svhs = 2,
1037 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001038 .muxsel = { 2, 3, 1, 1 },
1039 .audiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001040 .no_msp34xx = 1,
1041 .tuner_type = -1,
1042 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001043 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 },
1045
1046 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001047 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001048 .name = "Sigma TVII-FM",
1049 .video_inputs = 2,
1050 .audio_inputs = 1,
1051 .tuner = 0,
1052 .svhs = -1,
1053 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001054 .muxsel = { 2, 3, 1, 1 },
1055 .audiomux = { 1, 1, 0, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001056 .no_msp34xx = 1,
1057 .pll = PLL_NONE,
1058 .tuner_type = -1,
1059 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001060 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001062 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001063 .name = "MATRIX-Vision MV-Delta 2",
1064 .video_inputs = 5,
1065 .audio_inputs = 1,
1066 .tuner = -1,
1067 .svhs = 3,
1068 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001069 .muxsel = { 2, 3, 1, 0, 0 },
1070 .audiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001071 .no_msp34xx = 1,
1072 .pll = PLL_28,
1073 .tuner_type = -1,
1074 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001075 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001076 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001077 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001078 .name = "Zoltrix Genie TV/FM",
1079 .video_inputs = 3,
1080 .audio_inputs = 1,
1081 .tuner = 0,
1082 .svhs = 2,
1083 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001084 .muxsel = { 2, 3, 1, 1 },
1085 .audiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001086 .no_msp34xx = 1,
1087 .pll = PLL_28,
1088 .tuner_type = 21,
1089 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001090 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001091 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001092 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001093 .name = "Terratec TV/Radio+",
1094 .video_inputs = 3,
1095 .audio_inputs = 1,
1096 .tuner = 0,
1097 .svhs = 2,
1098 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001099 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001100 .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000, 0x20000 },
1101 .needs_tvaudio = 1,
1102 .no_msp34xx = 1,
1103 .pll = PLL_35,
1104 .tuner_type = 1,
1105 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001106 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001107 .has_radio = 1,
1108 },
1109
1110 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001111 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001112 .name = "Askey CPH03x/ Dynalink Magic TView",
1113 .video_inputs = 3,
1114 .audio_inputs = 1,
1115 .tuner = 0,
1116 .svhs = 2,
1117 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001118 .muxsel = { 2, 3, 1, 1 },
1119 .audiomux = {2,0,0,0,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001120 .needs_tvaudio = 1,
1121 .pll = PLL_28,
1122 .tuner_type = -1,
1123 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001124 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001125 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001126 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001127 .name = "IODATA GV-BCTV3/PCI",
1128 .video_inputs = 3,
1129 .audio_inputs = 1,
1130 .tuner = 0,
1131 .svhs = 2,
1132 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001133 .muxsel = {2, 3, 0, 0 },
1134 .audiomux = {0x10000, 0, 0x10000, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001135 .no_msp34xx = 1,
1136 .pll = PLL_28,
1137 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1138 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001139 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001140 .audio_hook = gvbctv3pci_audio,
1141 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001142 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001143 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1144 .video_inputs = 5,
1145 .audio_inputs = 1,
1146 .tuner = 0,
1147 .svhs = 3,
1148 .gpiomask = 0xAA0000,
1149 .muxsel = { 2,3,1,1,-1 },
1150 .digital_mode = DIGITAL_MODE_CAMERA,
1151 .audiomux = { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 },
1152 .no_msp34xx = 1,
1153 .pll = PLL_28,
1154 .tuner_type = TUNER_PHILIPS_PAL_I,
1155 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001156 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001157 .has_remote = 1,
1158 /* GPIO wiring: (different from Rev.4C !)
1159 GPIO17: U4.A0 (first hef4052bt)
1160 GPIO19: U4.A1
1161 GPIO20: U5.A1 (second hef4052bt)
1162 GPIO21: U4.nEN
1163 GPIO22: BT832 Reset Line
1164 GPIO23: A5,A0, U5,nEN
1165 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1166 */
1167 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001168 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001169 .name = "Eagle Wireless Capricorn2 (bt878A)",
1170 .video_inputs = 4,
1171 .audio_inputs = 1,
1172 .tuner = 0,
1173 .svhs = 2,
1174 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001175 .muxsel = { 2, 0, 1, 1 },
1176 .audiomux = { 0, 1, 2, 3, 4 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001177 .pll = PLL_28,
1178 .tuner_type = -1 /* TUNER_ALPS_TMDH2_NTSC */,
1179 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001180 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001181 },
1182
1183 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001184 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001185 /* David Härdeman <david@2gen.com> */
1186 .name = "Pinnacle PCTV Studio Pro",
1187 .video_inputs = 4,
1188 .audio_inputs = 1,
1189 .tuner = 0,
1190 .svhs = 3,
1191 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001192 .muxsel = { 2, 3, 1, 1 },
1193 .audiomux = { 1, 0xd0001, 0, 0, 10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001194 /* sound path (5 sources):
1195 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1196 0= ext. Audio IN
1197 1= from MUX2
1198 2= Mono TV sound from Tuner
1199 3= not connected
1200 MUX2 (mask 0x30000):
1201 0,2,3= from MSP34xx
1202 1= FM stereo Radio from Tuner */
1203 .needs_tvaudio = 0,
1204 .pll = PLL_28,
1205 .tuner_type = -1,
1206 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001207 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001208 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001209 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001210 /* Claas Langbehn <claas@bigfoot.com>,
1211 Sven Grothklags <sven@upb.de> */
1212 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1213 .video_inputs = 4,
1214 .audio_inputs = 3,
1215 .tuner = 0,
1216 .svhs = 2,
1217 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001218 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001219 .audiomux = { 0, 0, 0x10, 8, 4 },
1220 .needs_tvaudio = 1,
1221 .pll = PLL_28,
1222 .tuner_type = TUNER_PHILIPS_PAL,
1223 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001224 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001225 .has_radio = 1,
1226 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001227 [BTTV_BOARD_LIFETEC_9415] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001228 /* Tim Röstermundt <rosterm@uni-muenster.de>
1229 in de.comp.os.unix.linux.hardware:
1230 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
1231 audiomux=0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
1232 options tuner type=5 */
1233 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1234 .video_inputs = 4,
1235 .audio_inputs = 1,
1236 .tuner = 0,
1237 .svhs = 2,
1238 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001239 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001240 .audiomux = { 0x0000,0x0800,0x1000,0x1000,0x18e0 },
1241 /* For cards with tda9820/tda9821:
1242 0x0000: Tuner normal stereo
1243 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1244 0x0880: Tuner A2 stereo */
1245 .pll = PLL_28,
1246 .tuner_type = -1,
1247 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001248 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001249 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001250 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001251 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1252 old Easy TV BT848 version (model CPH031) */
1253 .name = "Askey CPH031/ BESTBUY Easy TV",
1254 .video_inputs = 4,
1255 .audio_inputs = 1,
1256 .tuner = 0,
1257 .svhs = 2,
1258 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001259 .muxsel = { 2, 3, 1, 0 },
1260 .audiomux = { 2, 0, 0, 0, 10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001261 .needs_tvaudio = 0,
1262 .pll = PLL_28,
1263 .tuner_type = TUNER_TEMIC_PAL,
1264 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001265 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001266 },
1267
1268 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001269 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001270 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1271 .name = "Lifeview FlyVideo 98FM LR50",
1272 .video_inputs = 4,
1273 .audio_inputs = 3,
1274 .tuner = 0,
1275 .svhs = 2,
1276 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001277 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001278 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
1279 .pll = PLL_28,
1280 .tuner_type = 5,
1281 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001282 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001283 },
1284 /* This is the ultimate cheapo capture card
1285 * just a BT848A on a small PCB!
1286 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001287 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001288 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1289 .video_inputs = 2,
1290 .audio_inputs = 0,
1291 .tuner = -1,
1292 .svhs = 1,
1293 .gpiomask = 0,
1294 .muxsel = { 3, 1 },
1295 .audiomux = { 0 },
1296 .needs_tvaudio = 0,
1297 .no_msp34xx = 1,
1298 .pll = PLL_35,
1299 .tuner_type = -1,
1300 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001301 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001302 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001303 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001304 /* Daniel Herrington <daniel.herrington@home.com> */
1305 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1306 .video_inputs = 3,
1307 .audio_inputs = 1,
1308 .tuner = 0,
1309 .svhs = 2,
1310 .gpiomask = 0xe00,
1311 .muxsel = { 2, 3, 1, 1},
1312 .audiomux = { 0x400, 0x400, 0x400, 0x400, 0x800, 0x400 },
1313 .needs_tvaudio = 1,
1314 .pll = PLL_28,
1315 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1316 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001317 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001319 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001320 /* Matti Mottus <mottus@physic.ut.ee> */
1321 .name = "Askey CPH03x TV Capturer",
1322 .video_inputs = 4,
1323 .audio_inputs = 1,
1324 .tuner = 0,
1325 .svhs = 2,
1326 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001327 .muxsel = { 2, 3, 1, 0 },
1328 .audiomux = { 2, 0, 0, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001329 .pll = PLL_28,
1330 .tuner_type = 0,
1331 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001332 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001333 },
1334
1335 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001336 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001337 /* Philip Blundell <philb@gnu.org> */
1338 .name = "Modular Technology MM100PCTV",
1339 .video_inputs = 2,
1340 .audio_inputs = 2,
1341 .tuner = 0,
1342 .svhs = -1,
1343 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001344 .muxsel = { 2, 3, 1, 1 },
1345 .audiomux = { 2, 0, 0, 1, 8 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001346 .pll = PLL_35,
1347 .tuner_type = TUNER_TEMIC_PAL,
1348 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001349 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001350 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001351 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001352 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001353 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001354 .video_inputs = 2,
1355 .audio_inputs = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001356 .tuner = -1,
1357 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001358 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001359 .muxsel = { 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001360 .audiomux = { },
1361 .no_msp34xx = 1,
1362 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001363 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001364 .tuner_type = -1,
1365 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001366 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001367 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001368 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001369 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1370 new Easy TV BT878 version (model CPH061)
1371 special thanks to Informatica Mieres for providing the card */
1372 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1373 .video_inputs = 3,
1374 .audio_inputs = 2,
1375 .tuner = 0,
1376 .svhs = 2,
1377 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001378 .muxsel = { 2, 3, 1, 0 },
1379 .audiomux = { 1, 0, 4, 4, 9 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001380 .needs_tvaudio = 0,
1381 .pll = PLL_28,
1382 .tuner_type = TUNER_PHILIPS_PAL,
1383 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001384 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001386 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001387 /* Lukas Gebauer <geby@volny.cz> */
1388 .name = "ATI TV-Wonder",
1389 .video_inputs = 3,
1390 .audio_inputs = 1,
1391 .tuner = 0,
1392 .svhs = 2,
1393 .gpiomask = 0xf03f,
1394 .muxsel = { 2, 3, 1, 0 },
Michael Krufkybc286362006-01-11 19:40:17 -02001395 .audiomux = { 0xbffe, 0, 0xbfff, 0, 0xbffe },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001396 .pll = PLL_28,
1397 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1398 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001399 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001400 },
1401
1402 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001403 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001404 /* Lukas Gebauer <geby@volny.cz> */
1405 .name = "ATI TV-Wonder VE",
1406 .video_inputs = 2,
1407 .audio_inputs = 1,
1408 .tuner = 0,
1409 .svhs = -1,
1410 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001411 .muxsel = { 2, 3, 0, 1 },
1412 .audiomux = { 0, 0, 1, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001413 .no_msp34xx = 1,
1414 .pll = PLL_28,
1415 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1416 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001417 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001418 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001419 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001420 /* DeeJay <deejay@westel900.net (2000S) */
1421 .name = "Lifeview FlyVideo 2000S LR90",
1422 .video_inputs = 3,
1423 .audio_inputs = 3,
1424 .tuner = 0,
1425 .svhs = 2,
1426 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001427 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001428 /* Radio changed from 1e80 to 0x800 to make
1429 FlyVideo2000S in .hu happy (gm)*/
1430 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1431 .audiomux = { 0x0000,0x0800,0x1000,0x1000,0x1800, 0x1080 },
1432 .audio_hook = fv2000s_audio,
1433 .no_msp34xx = 1,
1434 .no_tda9875 = 1,
1435 .needs_tvaudio = 1,
1436 .pll = PLL_28,
1437 .tuner_type = 5,
1438 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001439 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001440 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001441 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001442 .name = "Terratec TValueRadio",
1443 .video_inputs = 3,
1444 .audio_inputs = 1,
1445 .tuner = 0,
1446 .svhs = 2,
1447 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001448 .muxsel = { 2, 3, 1, 1 },
1449 .audiomux = { 0x500, 0x500, 0x300, 0x900, 0x900 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001450 .needs_tvaudio = 1,
1451 .pll = PLL_28,
1452 .tuner_type = TUNER_PHILIPS_PAL,
1453 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001454 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001455 .has_radio = 1,
1456 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001457 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001458 /* TANAKA Kei <peg00625@nifty.com> */
1459 .name = "IODATA GV-BCTV4/PCI",
1460 .video_inputs = 3,
1461 .audio_inputs = 1,
1462 .tuner = 0,
1463 .svhs = 2,
1464 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001465 .muxsel = {2, 3, 0, 0 },
1466 .audiomux = {0x10000, 0, 0x10000, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001467 .no_msp34xx = 1,
1468 .pll = PLL_28,
1469 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1470 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001471 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 .audio_hook = gvbctv3pci_audio,
1473 },
1474
1475 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001476 [BTTV_BOARD_VOODOOTV_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .name = "3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA)",
1478 /* try "insmod msp3400 simple=0" if you have
1479 * sound problems with this card. */
1480 .video_inputs = 4,
1481 .audio_inputs = 1,
1482 .tuner = 0,
1483 .svhs = -1,
1484 .gpiomask = 0x4f8a00,
1485 /* 0x100000: 1=MSP enabled (0=disable again)
1486 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1487 .audiomux = {0x947fff, 0x987fff,0x947fff,0x947fff, 0x947fff},
1488 /* tvtuner, radio, external,internal, mute, stereo
1489 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001490 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001491 .tuner_type = TUNER_MT2032,
1492 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001493 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001494 .pll = PLL_28,
1495 .has_radio = 1,
1496 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001497 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001498 /* Philip Blundell <pb@nexus.co.uk> */
1499 .name = "Active Imaging AIMMS",
1500 .video_inputs = 1,
1501 .audio_inputs = 0,
1502 .tuner = -1,
1503 .tuner_type = -1,
1504 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001505 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001506 .pll = PLL_28,
1507 .muxsel = { 2 },
1508 .gpiomask = 0
1509 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001510 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001511 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1512 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1513 .video_inputs = 3,
1514 .audio_inputs = 4,
1515 .tuner = 0,
1516 .svhs = 2,
1517 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001518 .muxsel = { 2, 3, 1, 1 },
1519 .audiomux = { 0, 0, 11, 7, 13, 0 }, /* TV and Radio with same GPIO ! */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001520 .needs_tvaudio = 1,
1521 .pll = PLL_28,
1522 .tuner_type = 25,
1523 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001524 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001525 .has_remote = 1,
1526 /* GPIO wiring:
1527 GPIO0: U4.A0 (hef4052bt)
1528 GPIO1: U4.A1
1529 GPIO2: U4.A1 (second hef4052bt)
1530 GPIO3: U4.nEN, U5.A0, A5.nEN
1531 GPIO8-15: vrd866b ?
1532 */
1533 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001534 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001535 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1536 .video_inputs = 4,
1537 .audio_inputs = 0,
1538 .tuner = -1,
1539 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001540 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001541 .pll = PLL_28,
1542 .no_msp34xx = 1,
1543 .tuner_type = UNSET,
1544 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001545 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001546 },
1547
1548 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001549 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001550 /* Dariusz Kowalewski <darekk@automex.pl> */
1551 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1552 .video_inputs = 4,
1553 .audio_inputs = 1,
1554 .tuner = 0,
1555 .svhs = 2,
1556 .gpiomask = 0x3f,
1557 .muxsel = { 2, 3, 1, 1 },
1558 .audiomux = { 0x01, 0x00, 0x03, 0x03, 0x09, 0x02 },
1559 .needs_tvaudio = 1,
1560 .no_msp34xx = 1,
1561 .no_tda9875 = 1,
1562 .pll = PLL_28,
1563 .tuner_type = 5,
1564 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001565 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001566 .audio_hook = pvbt878p9b_audio, /* Note: not all cards have stereo */
1567 .has_radio = 1, /* Note: not all cards have radio */
1568 .has_remote = 1,
1569 /* GPIO wiring:
1570 GPIO0: A0 hef4052
1571 GPIO1: A1 hef4052
1572 GPIO3: nEN hef4052
1573 GPIO8-15: vrd866b
1574 GPIO20,22,23: R30,R29,R28
1575 */
1576 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001577 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001578 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1579 /* you must jumper JP5 for the card to work */
1580 .name = "Sensoray 311",
1581 .video_inputs = 5,
1582 .audio_inputs = 0,
1583 .tuner = -1,
1584 .svhs = 4,
1585 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001586 .muxsel = { 2, 3, 1, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001587 .audiomux = { 0 },
1588 .needs_tvaudio = 0,
1589 .tuner_type = -1,
1590 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001591 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001592 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001593 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001594 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1595 .name = "RemoteVision MX (RV605)",
1596 .video_inputs = 16,
1597 .audio_inputs = 0,
1598 .tuner = -1,
1599 .svhs = -1,
1600 .gpiomask = 0x00,
1601 .gpiomask2 = 0x07ff,
1602 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1603 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1604 .no_msp34xx = 1,
1605 .no_tda9875 = 1,
1606 .tuner_type = -1,
1607 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001608 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001609 .muxsel_hook = rv605_muxsel,
1610 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001611 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001612 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1613 .video_inputs = 3,
1614 .audio_inputs = 2,
1615 .tuner = 0,
1616 .svhs = 2,
1617 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1618 .muxsel = { 2, 1, 1, },
1619 .audiomux = { 0, 1, 2, 2, 4 },
1620 .needs_tvaudio = 0,
1621 .tuner_type = TUNER_PHILIPS_PAL,
1622 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001623 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001624 .pll = PLL_28,
1625 .has_radio = 1,
1626 },
1627
1628 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001629 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001630 /* Masaki Suzuki <masaki@btree.org> */
1631 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1632 .video_inputs = 3,
1633 .audio_inputs = 1,
1634 .tuner = 0,
1635 .svhs = 2,
1636 .gpiomask = 0x140007,
1637 .muxsel = { 2, 3, 1, 1 },
1638 .audiomux = { 0, 1, 2, 3, 4, 0 },
1639 .tuner_type = TUNER_PHILIPS_NTSC,
1640 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001641 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001642 .audio_hook = windvr_audio,
1643 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001644 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001645 .name = "GrandTec Multi Capture Card (Bt878)",
1646 .video_inputs = 4,
1647 .audio_inputs = 0,
1648 .tuner = -1,
1649 .svhs = -1,
1650 .gpiomask = 0,
1651 .muxsel = { 2, 3, 1, 0 },
1652 .audiomux = { 0 },
1653 .needs_tvaudio = 0,
1654 .no_msp34xx = 1,
1655 .pll = PLL_28,
1656 .tuner_type = -1,
1657 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001658 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001659 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001660 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001661 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1662 .video_inputs = 4,
1663 .audio_inputs = 3,
1664 .tuner = 0,
1665 .svhs = 2,
1666 .gpiomask = 7,
1667 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
1668 .audiomux = { 0 ,0 ,4, 4,4,4},/* Yes, this tuner uses the same audio output for TV and FM radio!
1669 * This card lacks external Audio In, so we mute it on Ext. & Int.
1670 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1671 * This card lacks PCI subsystem ID, sigh.
1672 * audiomux=1: lower volume, 2+3: mute
1673 * btwincap uses 0x80000/0x80003
1674 */
1675 .needs_tvaudio = 0,
1676 .no_msp34xx = 1,
1677 .pll = PLL_28,
1678 .tuner_type = 5,
1679 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001680 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001681 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1682 radio signal strength indicators work fine. */
1683 .has_radio = 1,
1684 /* GPIO Info:
1685 GPIO0,1: HEF4052 A0,A1
1686 GPIO2: HEF4052 nENABLE
1687 GPIO3-7: n.c.
1688 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1689 GPIO14,15: ??
1690 GPIO16-21: n.c.
1691 GPIO22,23: ??
1692 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1693 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001694 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001695 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1696 .name = "DSP Design TCVIDEO",
1697 .video_inputs = 4,
1698 .svhs = -1,
Michael Krufkybc286362006-01-11 19:40:17 -02001699 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001700 .pll = PLL_28,
1701 .tuner_type = -1,
1702 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001703 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001704 },
1705
1706 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001707 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001708 .name = "Hauppauge WinTV PVR",
1709 .video_inputs = 4,
1710 .audio_inputs = 1,
1711 .tuner = 0,
1712 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001713 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001714 .needs_tvaudio = 1,
1715 .pll = PLL_28,
1716 .tuner_type = -1,
1717 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001718 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001719
1720 .gpiomask = 7,
1721 .audiomux = {7},
1722 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001723 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .name = "IODATA GV-BCTV5/PCI",
1725 .video_inputs = 3,
1726 .audio_inputs = 1,
1727 .tuner = 0,
1728 .svhs = 2,
1729 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001730 .muxsel = {2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001731 .audiomux = {0x030000, 0x010000, 0, 0, 0x020000, 0},
1732 .no_msp34xx = 1,
1733 .pll = PLL_28,
1734 .tuner_type = TUNER_PHILIPS_NTSC_M,
1735 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001736 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001737 .audio_hook = gvbctv5pci_audio,
1738 .has_radio = 1,
1739 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001740 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001741 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1742 .video_inputs = 4, /* id-inputs-clock */
1743 .audio_inputs = 0,
1744 .tuner = -1,
1745 .svhs = 3,
1746 .muxsel = { 3, 2, 0, 1 },
1747 .pll = PLL_28,
1748 .tuner_type = -1,
1749 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001750 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001751 .no_msp34xx = 1,
1752 .no_tda9875 = 1,
1753 .no_tda7432 = 1,
1754 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001755 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001756 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1757 .video_inputs = 3,
1758 .audio_inputs = 0,
1759 .tuner = -1,
1760 .svhs = 2,
1761 .muxsel = { 2, 3, 1 },
1762 .pll = PLL_28,
1763 .tuner_type = -1,
1764 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001765 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001766 .no_msp34xx = 1,
1767 .no_tda9875 = 1,
1768 .no_tda7432 = 1,
1769 },
1770
1771 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001772 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001773 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1774 .video_inputs = 2,
1775 .audio_inputs = 0,
1776 .tuner = -1,
1777 .svhs = 1,
1778 .muxsel = { 3, 1 },
1779 .pll = PLL_28,
1780 .tuner_type = -1,
1781 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001782 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .no_msp34xx = 1,
1784 .no_tda9875 = 1,
1785 .no_tda7432 = 1,
1786 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001787 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001788 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1789 .video_inputs = 1,
1790 .audio_inputs = 0,
1791 .tuner = -1,
1792 .svhs = -1,
1793 .muxsel = { 0 },
1794 .pll = PLL_28,
1795 .tuner_type = -1,
1796 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001797 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .no_msp34xx = 1,
1799 .no_tda9875 = 1,
1800 .no_tda7432 = 1,
1801 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001802 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001803 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1804 .video_inputs = 2,
1805 .audio_inputs = 0,
1806 .tuner = -1,
1807 .svhs = 1,
1808 .muxsel = { 0, 1 },
1809 .pll = PLL_28,
1810 .tuner_type = -1,
1811 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001812 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001813 .no_msp34xx = 1,
1814 .no_tda9875 = 1,
1815 .no_tda7432 = 1,
1816 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001817 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001818 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1819 .video_inputs = 1,
1820 .audio_inputs = 1,
1821 .tuner = -1,
1822 .svhs = -1,
1823 .muxsel = { 0 },
1824 .pll = PLL_28,
1825 .tuner_type = UNSET,
1826 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001827 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001828 .no_msp34xx = 1,
1829 .no_tda9875 = 1,
1830 .no_tda7432 = 1,
1831 },
1832
1833 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001834 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001835 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1836 .video_inputs = 2,
1837 .audio_inputs = 1,
1838 .tuner = -1,
1839 .svhs = 1,
1840 .muxsel = { 0, 1 },
1841 .pll = PLL_28,
1842 .tuner_type = UNSET,
1843 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001844 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001845 .no_msp34xx = 1,
1846 .no_tda9875 = 1,
1847 .no_tda7432 = 1,
1848 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001849 [BTTV_BOARD_OSPREY2x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001850 .name = "Osprey 210/220", /* 0x1(A|B)-04C0-C1 */
1851 .video_inputs = 2,
1852 .audio_inputs = 1,
1853 .tuner = -1,
1854 .svhs = 1,
1855 .muxsel = { 2, 3 },
1856 .pll = PLL_28,
1857 .tuner_type = UNSET,
1858 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001859 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001860 .no_msp34xx = 1,
1861 .no_tda9875 = 1,
1862 .no_tda7432 = 1,
1863 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001864 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001865 .name = "Osprey 500", /* 500 */
1866 .video_inputs = 2,
1867 .audio_inputs = 1,
1868 .tuner = -1,
1869 .svhs = 1,
1870 .muxsel = { 2, 3 },
1871 .pll = PLL_28,
1872 .tuner_type = -1,
1873 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001874 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001875 .no_msp34xx = 1,
1876 .no_tda9875 = 1,
1877 .no_tda7432 = 1,
1878 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001879 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .name = "Osprey 540", /* 540 */
1881 .video_inputs = 4,
1882 .audio_inputs = 1,
1883 .tuner = -1,
1884 #if 0 /* TODO ... */
1885 .svhs = OSPREY540_SVID_ANALOG,
1886 .muxsel = { [OSPREY540_COMP_ANALOG] = 2,
1887 [OSPREY540_SVID_ANALOG] = 3, },
1888 #endif
1889 .pll = PLL_28,
1890 .tuner_type = -1,
1891 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001892 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001893 .no_msp34xx = 1,
1894 .no_tda9875 = 1,
1895 .no_tda7432 = 1,
1896 #if 0 /* TODO ... */
1897 .muxsel_hook = osprey_540_muxsel,
1898 .picture_hook = osprey_540_set_picture,
1899 #endif
1900 },
1901
1902 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001903 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001904 .name = "Osprey 2000", /* 2000 */
1905 .video_inputs = 2,
1906 .audio_inputs = 1,
1907 .tuner = -1,
1908 .svhs = 1,
1909 .muxsel = { 2, 3 },
1910 .pll = PLL_28,
1911 .tuner_type = UNSET,
1912 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001913 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001914 .no_msp34xx = 1,
1915 .no_tda9875 = 1,
1916 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1917 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001918 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001919 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1920 .name = "IDS Eagle",
1921 .video_inputs = 4,
1922 .audio_inputs = 0,
1923 .tuner = -1,
1924 .tuner_type = -1,
1925 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001926 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 .svhs = -1,
1928 .gpiomask = 0,
1929 .muxsel = { 0, 1, 2, 3 },
1930 .muxsel_hook = eagle_muxsel,
1931 .no_msp34xx = 1,
1932 .no_tda9875 = 1,
1933 .pll = PLL_28,
1934 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001935 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001936 .name = "Pinnacle PCTV Sat",
1937 .video_inputs = 2,
1938 .audio_inputs = 0,
1939 .svhs = 1,
1940 .tuner = -1,
1941 .tuner_type = -1,
1942 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001943 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001944 .no_msp34xx = 1,
1945 .no_tda9875 = 1,
1946 .no_tda7432 = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001947 .muxsel = { 3, 0, 1, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001948 .pll = PLL_28,
1949 .no_gpioirq = 1,
1950 .has_dvb = 1,
1951 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001952 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001953 .name = "Formac ProTV II (bt878)",
1954 .video_inputs = 4,
1955 .audio_inputs = 1,
1956 .tuner = 0,
1957 .svhs = 3,
1958 .gpiomask = 2,
1959 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02001960 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .audiomux = { 2, 2, 0, 0, 0 },
1962 .pll = PLL_28,
1963 .has_radio = 1,
1964 .tuner_type = TUNER_PHILIPS_PAL,
1965 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001966 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001967 /* sound routing:
1968 GPIO=0x00,0x01,0x03: mute (?)
1969 0x02: both TV and radio (tuner: FM1216/I)
1970 The card has onboard audio connectors labeled "cdrom" and "board",
1971 not soldered here, though unknown wiring.
1972 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001973 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001974 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001975
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001976 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001977 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001978 .name = "MachTV",
1979 .video_inputs = 3,
1980 .audio_inputs = 1,
1981 .tuner = 0,
1982 .svhs = -1,
1983 .gpiomask = 7,
1984 .muxsel = { 2, 3, 1, 1},
1985 .audiomux = { 0, 1, 2, 3, 4},
1986 .needs_tvaudio = 1,
1987 .tuner_type = 5,
1988 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001989 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001990 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001991 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001992 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001993 .name = "Euresys Picolo",
1994 .video_inputs = 3,
1995 .audio_inputs = 0,
1996 .tuner = -1,
1997 .svhs = 2,
1998 .gpiomask = 0,
1999 .no_msp34xx = 1,
2000 .no_tda9875 = 1,
2001 .no_tda7432 = 1,
2002 .muxsel = { 2, 0, 1},
2003 .pll = PLL_28,
2004 .tuner_type = UNSET,
2005 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002006 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002007 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002008 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002009 /* Luc Van Hoeylandt <luc@e-magic.be> */
2010 .name = "ProVideo PV150", /* 0x4f */
2011 .video_inputs = 2,
2012 .audio_inputs = 0,
2013 .tuner = -1,
2014 .svhs = -1,
2015 .gpiomask = 0,
2016 .muxsel = { 2, 3 },
2017 .audiomux = { 0 },
2018 .needs_tvaudio = 0,
2019 .no_msp34xx = 1,
2020 .pll = PLL_28,
2021 .tuner_type = UNSET,
2022 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002023 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002024 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002025 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002026 /* Hiroshi Takekawa <sian@big.or.jp> */
2027 /* This card lacks subsystem ID */
2028 .name = "AD-TVK503", /* 0x63 */
2029 .video_inputs = 4,
2030 .audio_inputs = 1,
2031 .tuner = 0,
2032 .svhs = 2,
2033 .gpiomask = 0x001e8007,
2034 .muxsel = { 2, 3, 1, 0 },
2035 /* Tuner, Radio, external, internal, off, on */
2036 .audiomux = { 0x08, 0x0f, 0x0a, 0x08, 0x0f, 0x08 },
2037 .needs_tvaudio = 0,
2038 .no_msp34xx = 1,
2039 .pll = PLL_28,
2040 .tuner_type = 2,
2041 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002042 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 .audio_hook = adtvk503_audio,
2044 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002045
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002046 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002047 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002048 .name = "Hercules Smart TV Stereo",
2049 .video_inputs = 4,
2050 .audio_inputs = 1,
2051 .tuner = 0,
2052 .svhs = 2,
2053 .gpiomask = 0x00,
2054 .muxsel = { 2, 3, 1, 1 },
2055 .needs_tvaudio = 1,
2056 .no_msp34xx = 1,
2057 .pll = PLL_28,
2058 .tuner_type = 5,
2059 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002060 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 /* Notes:
2062 - card lacks subsystem ID
2063 - stereo variant w/ daughter board with tda9874a @0xb0
2064 - Audio Routing:
2065 always from tda9874 independent of GPIO (?)
2066 external line in: unknown
2067 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2068 hef4053 (instead 4052) for unknown function
2069 */
2070 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002071 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002072 .name = "Pace TV & Radio Card",
2073 .video_inputs = 4,
2074 .audio_inputs = 1,
2075 .tuner = 0,
2076 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002077 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002078 .gpiomask = 0,
2079 .no_tda9875 = 1,
2080 .no_tda7432 = 1,
2081 .tuner_type = 1,
2082 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002083 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002084 .has_radio = 1,
2085 .pll = PLL_28,
2086 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2087 only internal line out: (4pin header) RGGL
2088 Radio must be decoded by msp3410d (not routed through)*/
2089 /*
2090 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2091 */
2092 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002093 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002094 /* Chris Willing <chris@vislab.usyd.edu.au> */
2095 .name = "IVC-200",
2096 .video_inputs = 1,
2097 .audio_inputs = 0,
2098 .tuner = -1,
2099 .tuner_type = -1,
2100 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002101 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002102 .svhs = -1,
2103 .gpiomask = 0xdf,
2104 .muxsel = { 2 },
2105 .pll = PLL_28,
2106 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002107 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002108 .name = "Grand X-Guard / Trust 814PCI",
2109 .video_inputs = 16,
2110 .audio_inputs = 0,
2111 .tuner = -1,
2112 .svhs = -1,
2113 .tuner_type = 4,
2114 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002115 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002116 .gpiomask2 = 0xff,
2117 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2118 .muxsel_hook = xguard_muxsel,
2119 .no_msp34xx = 1,
2120 .no_tda9875 = 1,
2121 .no_tda7432 = 1,
2122 .pll = PLL_28,
2123 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002124
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002125 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002126 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 .name = "Nebula Electronics DigiTV",
2128 .video_inputs = 1,
2129 .tuner = -1,
2130 .svhs = -1,
Michael Krufkybc286362006-01-11 19:40:17 -02002131 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002132 .no_msp34xx = 1,
2133 .no_tda9875 = 1,
2134 .no_tda7432 = 1,
2135 .pll = PLL_28,
2136 .tuner_type = -1,
2137 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002138 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002139 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002140 .has_remote = 1,
2141 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002142 .no_gpioirq = 1,
2143 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002144 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002145 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2146 .name = "ProVideo PV143",
2147 .video_inputs = 4,
2148 .audio_inputs = 0,
2149 .tuner = -1,
2150 .svhs = -1,
2151 .gpiomask = 0,
2152 .muxsel = { 2, 3, 1, 0 },
2153 .audiomux = { 0 },
2154 .needs_tvaudio = 0,
2155 .no_msp34xx = 1,
2156 .pll = PLL_28,
2157 .tuner_type = -1,
2158 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002159 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002160 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002161 [BTTV_BOARD_VD009X1_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002162 /* M.Klahr@phytec.de */
2163 .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
2164 .video_inputs = 4,
2165 .audio_inputs = 0,
2166 .tuner = -1, /* card has no tuner */
2167 .svhs = 3,
2168 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002169 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002170 .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2171 .needs_tvaudio = 1,
2172 .pll = PLL_28,
2173 .tuner_type = -1,
2174 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002175 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002176 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002177 [BTTV_BOARD_VD009X1_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002178 .name = "PHYTEC VD-009-X1 Combi (bt878)",
2179 .video_inputs = 4,
2180 .audio_inputs = 0,
2181 .tuner = -1, /* card has no tuner */
2182 .svhs = 3,
2183 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002184 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002185 .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2186 .needs_tvaudio = 1,
2187 .pll = PLL_28,
2188 .tuner_type = -1,
2189 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002190 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002191 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002192
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002193 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002194 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002195 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2196 .video_inputs = 10,
2197 .audio_inputs = 0,
2198 .tuner = -1, /* card has no tuner */
2199 .svhs = 9,
2200 .gpiomask = 0x00,
2201 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2202 via the upper nibble of muxsel. here: used for
2203 xternal video-mux */
2204 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
2205 .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2206 .needs_tvaudio = 1,
2207 .pll = PLL_28,
2208 .tuner_type = -1,
2209 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002210 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002211 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002212 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002213 .name = "PHYTEC VD-009 Combi (bt878)",
2214 .video_inputs = 10,
2215 .audio_inputs = 0,
2216 .tuner = -1, /* card has no tuner */
2217 .svhs = 9,
2218 .gpiomask = 0x00,
2219 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2220 via the upper nibble of muxsel. here: used for
2221 xternal video-mux */
2222 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
2223 .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2224 .needs_tvaudio = 1,
2225 .pll = PLL_28,
2226 .tuner_type = -1,
2227 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002228 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002230 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 .name = "IVC-100",
2232 .video_inputs = 4,
2233 .audio_inputs = 0,
2234 .tuner = -1,
2235 .tuner_type = -1,
2236 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002237 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002238 .svhs = -1,
2239 .gpiomask = 0xdf,
2240 .muxsel = { 2, 3, 1, 0 },
2241 .pll = PLL_28,
2242 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002243 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2245 .name = "IVC-120G",
2246 .video_inputs = 16,
2247 .audio_inputs = 0, /* card has no audio */
2248 .tuner = -1, /* card has no tuner */
2249 .tuner_type = -1,
2250 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002251 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002252 .svhs = -1, /* card has no svhs */
2253 .needs_tvaudio = 0,
2254 .no_msp34xx = 1,
2255 .no_tda9875 = 1,
2256 .no_tda7432 = 1,
2257 .gpiomask = 0x00,
2258 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2259 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2260 .muxsel_hook = ivc120_muxsel,
2261 .pll = PLL_28,
2262 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002263
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002265 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002266 .name = "pcHDTV HD-2000 TV",
2267 .video_inputs = 4,
2268 .audio_inputs = 1,
2269 .tuner = 0,
2270 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002271 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002272 .tuner_type = TUNER_PHILIPS_ATSC,
2273 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002274 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002275 .has_dvb = 1,
2276 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002277 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002278 .name = "Twinhan DST + clones",
2279 .no_msp34xx = 1,
2280 .no_tda9875 = 1,
2281 .no_tda7432 = 1,
2282 .tuner_type = TUNER_ABSENT,
2283 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002284 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002285 .no_video = 1,
2286 .has_dvb = 1,
2287 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002288 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002289 .name = "Winfast VC100",
2290 .video_inputs = 3,
2291 .audio_inputs = 0,
2292 .svhs = 1,
2293 .tuner = -1,
Michael Krufkybc286362006-01-11 19:40:17 -02002294 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002295 .no_msp34xx = 1,
2296 .no_tda9875 = 1,
2297 .no_tda7432 = 1,
2298 .tuner_type = TUNER_ABSENT,
2299 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002300 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002301 .pll = PLL_28,
2302 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002303 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002304 .name = "Teppro TEV-560/InterVision IV-560",
2305 .video_inputs = 3,
2306 .audio_inputs = 1,
2307 .tuner = 0,
2308 .svhs = 2,
2309 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002310 .muxsel = { 2, 3, 1, 1 },
2311 .audiomux = { 1, 1, 1, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002312 .needs_tvaudio = 1,
2313 .tuner_type = TUNER_PHILIPS_PAL,
2314 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002315 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002316 .pll = PLL_35,
2317 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002318
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002319 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002320 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002321 .name = "SIMUS GVC1100",
2322 .video_inputs = 4,
2323 .audio_inputs = 0,
2324 .tuner = -1,
2325 .svhs = -1,
2326 .tuner_type = -1,
2327 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002328 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002329 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002330 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002331 .gpiomask = 0x3F,
2332 .muxsel_hook = gvc1100_muxsel,
2333 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002334 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002335 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2336 .name = "NGS NGSTV+",
2337 .video_inputs = 3,
2338 .tuner = 0,
2339 .svhs = 2,
2340 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002341 .muxsel = { 2, 3, 0, 0 },
2342 .audiomux = { 0, 0, 0, 0, 0x000003, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002343 .pll = PLL_28,
2344 .tuner_type = TUNER_PHILIPS_PAL,
2345 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002346 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002347 .has_remote = 1,
2348 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002349 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002350 /* http://linuxmedialabs.com */
2351 .name = "LMLBT4",
2352 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2353 .audio_inputs = 0,
2354 .tuner = -1,
2355 .svhs = -1,
2356 .muxsel = { 2, 3, 1, 0 },
2357 .no_msp34xx = 1,
2358 .no_tda9875 = 1,
2359 .no_tda7432 = 1,
2360 .needs_tvaudio = 0,
2361 .tuner_type = -1,
2362 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002363 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002364 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002365 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002366 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2367 .name = "Tekram M205 PRO",
2368 .video_inputs = 3,
2369 .audio_inputs = 1,
2370 .tuner = 0,
2371 .tuner_type = TUNER_PHILIPS_PAL,
2372 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002373 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 .svhs = 2,
2375 .needs_tvaudio = 0,
2376 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002377 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002378 .audiomux = { 0x68, 0x68, 0x61, 0x61, 0x00 },
2379 .pll = PLL_28,
2380 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002381
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002383 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002384 /* Javier Cendan Ares <jcendan@lycos.es> */
2385 /* bt878 TV + FM without subsystem ID */
2386 .name = "Conceptronic CONTVFMi",
2387 .video_inputs = 3,
2388 .audio_inputs = 1,
2389 .tuner = 0,
2390 .svhs = 2,
2391 .gpiomask = 0x008007,
2392 .muxsel = { 2, 3, 1, 1 },
2393 .audiomux = { 0, 1, 2, 2, 3 },
2394 .needs_tvaudio = 0,
2395 .pll = PLL_28,
2396 .tuner_type = TUNER_PHILIPS_PAL,
2397 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002398 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002399 .has_remote = 1,
2400 .has_radio = 1,
2401 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002402 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002403 /*Eric DEBIEF <debief@telemsa.com>*/
2404 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002405 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 /*0x79 in bttv.h*/
2407 .name = "Euresys Picolo Tetra",
2408 .video_inputs = 4,
2409 .audio_inputs = 0,
2410 .tuner = -1,
2411 .svhs = -1,
2412 .gpiomask = 0,
2413 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2414 .no_msp34xx = 1,
2415 .no_tda9875 = 1,
2416 .no_tda7432 = 1,
2417 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
2418 .audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
2419 .pll = PLL_28,
2420 .needs_tvaudio = 0,
2421 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
2422 .tuner_type = -1,
2423 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002424 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002425 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002426 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002427 /* Spirit TV Tuner from http://spiritmodems.com.au */
2428 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2429 .name = "Spirit TV Tuner",
2430 .video_inputs = 3,
2431 .audio_inputs = 1,
2432 .tuner = 0,
2433 .svhs = 2,
2434 .gpiomask = 0x0000000f,
2435 .muxsel = { 2, 1, 1 },
Michael Krufkybc286362006-01-11 19:40:17 -02002436 .audiomux = { 0x02, 0x00, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002437 .tuner_type = TUNER_TEMIC_PAL,
2438 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002439 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002440 .no_msp34xx = 1,
2441 .no_tda9875 = 1,
2442 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002443 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002444 /* Wolfram Joost <wojo@frokaschwei.de> */
2445 .name = "AVerMedia AVerTV DVB-T 771",
2446 .video_inputs = 2,
2447 .svhs = 1,
2448 .tuner = -1,
2449 .tuner_type = TUNER_ABSENT,
2450 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002451 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002452 .muxsel = { 3 , 3 },
2453 .no_msp34xx = 1,
2454 .no_tda9875 = 1,
2455 .no_tda7432 = 1,
2456 .pll = PLL_28,
2457 .has_dvb = 1,
2458 .no_gpioirq = 1,
2459 .has_remote = 1,
2460 },
2461 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002462 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002463 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002464 /* Based on the Nebula card data - added remote and new card number - BTTV_BOARD_AVDVBT_761, see also ir-kbd-gpio.c */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002465 .name = "AverMedia AverTV DVB-T 761",
2466 .video_inputs = 2,
2467 .tuner = -1,
2468 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002469 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002470 .no_msp34xx = 1,
2471 .no_tda9875 = 1,
2472 .no_tda7432 = 1,
2473 .pll = PLL_28,
2474 .tuner_type = -1,
2475 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002476 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002477 .has_dvb = 1,
2478 .no_gpioirq = 1,
2479 .has_remote = 1,
2480 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002481 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002482 /* andre.schwarz@matrix-vision.de */
2483 .name = "MATRIX Vision Sigma-SQ",
2484 .video_inputs = 16,
2485 .audio_inputs = 0,
2486 .tuner = -1,
2487 .svhs = -1,
2488 .gpiomask = 0x0,
2489 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2490 3, 3, 3, 3, 3, 3, 3, 3 },
2491 .muxsel_hook = sigmaSQ_muxsel,
2492 .audiomux = { 0 },
2493 .no_msp34xx = 1,
2494 .pll = PLL_28,
2495 .tuner_type = -1,
2496 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002497 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002499 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002500 /* andre.schwarz@matrix-vision.de */
2501 .name = "MATRIX Vision Sigma-SLC",
2502 .video_inputs = 4,
2503 .audio_inputs = 0,
2504 .tuner = -1,
2505 .svhs = -1,
2506 .gpiomask = 0x0,
2507 .muxsel = { 2, 2, 2, 2 },
2508 .muxsel_hook = sigmaSLC_muxsel,
2509 .audiomux = { 0 },
2510 .no_msp34xx = 1,
2511 .pll = PLL_28,
2512 .tuner_type = -1,
2513 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002514 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002515 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002516 /* BTTV_BOARD_APAC_VIEWCOMP */
2517 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002518 /* Attila Kondoros <attila.kondoros@chello.hu> */
2519 /* bt878 TV + FM 0x00000000 subsystem ID */
2520 .name = "APAC Viewcomp 878(AMAX)",
2521 .video_inputs = 2,
2522 .audio_inputs = 1,
2523 .tuner = 0,
2524 .svhs = -1,
2525 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002526 .muxsel = { 2, 3, 1, 1 },
2527 .audiomux = { 2, 0, 0, 0, 10 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002528 .needs_tvaudio = 0,
2529 .pll = PLL_28,
2530 .tuner_type = TUNER_PHILIPS_PAL,
2531 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002532 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002533 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2534 .has_radio = 1, /* not every card has radio */
2535 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002536
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002538 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002539 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2540 .name = "DViCO FusionHDTV DVB-T Lite",
2541 .tuner = -1,
2542 .no_msp34xx = 1,
2543 .no_tda9875 = 1,
2544 .no_tda7432 = 1,
2545 .pll = PLL_28,
2546 .no_video = 1,
2547 .has_dvb = 1,
2548 .tuner_type = -1,
2549 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002550 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002551 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002552 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002553 /* Steven <photon38@pchome.com.tw> */
2554 .name = "V-Gear MyVCD",
2555 .video_inputs = 3,
2556 .audio_inputs = 1,
2557 .tuner = 0,
2558 .svhs = 2,
2559 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002560 .muxsel = {2, 3, 1, 0 },
2561 .audiomux = {0x31, 0x31, 0x31, 0x31, 0x31, 0x31 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002562 .no_msp34xx = 1,
2563 .pll = PLL_28,
2564 .tuner_type = TUNER_PHILIPS_NTSC_M,
2565 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002566 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002567 .has_radio = 0,
2568 #if 0
2569 .has_remote = 1,
2570 #endif
2571 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002572 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002573 /* Rick C <cryptdragoon@gmail.com> */
2574 .name = "Super TV Tuner",
2575 .video_inputs = 4,
2576 .audio_inputs = 1,
2577 .tuner = 0,
2578 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002579 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002580 .tuner_type = TUNER_PHILIPS_NTSC,
2581 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002582 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002583 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002584 .audiomux = { 0, 0x000001,0,0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002585 .needs_tvaudio = 1,
2586 .has_radio = 1,
2587 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002588 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002589 /* Chris Fanning <video4linux@haydon.net> */
2590 .name = "Tibet Systems 'Progress DVR' CS16",
2591 .video_inputs = 16,
2592 .audio_inputs = 0,
2593 .tuner = -1,
2594 .svhs = -1,
2595 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2596 .pll = PLL_28,
2597 .no_msp34xx = 1,
2598 .no_tda9875 = 1,
2599 .no_tda7432 = 1,
2600 .tuner_type = -1,
2601 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002602 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002603 .muxsel_hook = tibetCS16_muxsel,
2604 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002605 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002606 /* Bill Brack <wbrack@mmm.com.hk> */
2607 /*
2608 * Note that, because of the card's wiring, the "master"
2609 * BT878A chip (i.e. the one which controls the analog switch
2610 * and must use this card type) is the 2nd one detected. The
2611 * other 3 chips should use card type 0x85, whose description
2612 * follows this one. There is a EEPROM on the card (which is
2613 * connected to the I2C of one of those other chips), but is
2614 * not currently handled. There is also a facility for a
2615 * "monitor", which is also not currently implemented.
2616 */
2617 .name = "Kodicom 4400R (master)",
2618 .video_inputs = 16,
2619 .audio_inputs = 0,
2620 .tuner = -1,
2621 .tuner_type = -1,
2622 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002623 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002624 .svhs = -1,
2625 /* GPIO bits 0-9 used for analog switch:
2626 * 00 - 03: camera selector
2627 * 04 - 06: channel (controller) selector
2628 * 07: data (1->on, 0->off)
2629 * 08: strobe
2630 * 09: reset
2631 * bit 16 is input from sync separator for the channel
2632 */
2633 .gpiomask = 0x0003ff,
2634 .no_gpioirq = 1,
2635 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2636 .pll = PLL_28,
2637 .no_msp34xx = 1,
2638 .no_tda7432 = 1,
2639 .no_tda9875 = 1,
2640 .muxsel_hook = kodicom4400r_muxsel,
2641 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002642 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002643 /* Bill Brack <wbrack@mmm.com.hk> */
2644 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2645 * one which controls the analog switch, and must use the card type)
2646 * is the 2nd one detected. The other 3 chips should use this card
2647 * type
2648 */
2649 .name = "Kodicom 4400R (slave)",
2650 .video_inputs = 16,
2651 .audio_inputs = 0,
2652 .tuner = -1,
2653 .tuner_type = -1,
2654 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002655 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002656 .svhs = -1,
2657 .gpiomask = 0x010000,
2658 .no_gpioirq = 1,
2659 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2660 .pll = PLL_28,
2661 .no_msp34xx = 1,
2662 .no_tda7432 = 1,
2663 .no_tda9875 = 1,
2664 .muxsel_hook = kodicom4400r_muxsel,
2665 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002666 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002667 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002668 /* Michael Henson <mhenson@clarityvi.com> */
2669 /* Adlink RTV24 with special unlock codes */
2670 .name = "Adlink RTV24",
2671 .video_inputs = 4,
2672 .audio_inputs = 1,
2673 .tuner = 0,
2674 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002675 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002676 .tuner_type = -1,
2677 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002678 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002679 .pll = PLL_28,
2680 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002681 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002682 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002683 /* Michael Krufky <mkrufky@m1k.net> */
2684 .name = "DViCO FusionHDTV 5 Lite",
2685 .tuner = 0,
2686 .tuner_type = TUNER_LG_TDVS_H062F,
2687 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002688 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002689 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002690 .audio_inputs = 1,
2691 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002692 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002693 .gpiomask = 0x00e00007,
2694 .audiomux = { 0x00400005, 0, 0x00000001, 0, 0x00c00007, 0 },
2695 .no_msp34xx = 1,
2696 .no_tda9875 = 1,
2697 .no_tda7432 = 1,
2698 .has_dvb = 1,
2699 },
2700 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002701 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002702 /* Mauro Carvalho Chehab <mchehab@brturbo.com.br> */
2703 .name = "Acorp Y878F",
2704 .video_inputs = 3,
2705 .audio_inputs = 1,
2706 .tuner = 0,
2707 .svhs = 2,
2708 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002709 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002710 .audiomux = { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
2711 .needs_tvaudio = 1,
2712 .pll = PLL_28,
2713 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2714 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002715 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002716 .has_radio = 1,
2717 },
2718 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002719 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002720 .name = "Conceptronic CTVFMi v2",
2721 .video_inputs = 3,
2722 .audio_inputs = 1,
2723 .tuner = 0,
2724 .svhs = 2,
2725 .gpiomask = 0x001c0007,
2726 .muxsel = { 2, 3, 1, 1 },
2727 .audiomux = { 0, 1, 2, 2, 3 },
2728 .needs_tvaudio = 0,
2729 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002730 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002731 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002732 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002733 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002734 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002735 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002736 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002737 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002738 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2739 .video_inputs = 5,
2740 .audio_inputs = 1,
2741 .tuner = 0,
2742 .svhs = 3,
2743 .gpiomask = 0x01fe00,
2744 .muxsel = { 2,3,1,1,-1 },
2745 .digital_mode = DIGITAL_MODE_CAMERA,
2746 .audiomux = { 0x00400, 0x10400, 0x04400, 0x80000, 0x12400, 0x46000 },
2747 .no_msp34xx = 1,
2748 .pll = PLL_28,
2749 .tuner_type = TUNER_LG_PAL_FM,
2750 .tuner_addr = ADDR_UNSET,
2751 .radio_addr = ADDR_UNSET,
2752 .has_remote = 1,
2753 },
2754 /* ---- card 0x8b ---------------------------------- */
2755 [BTTV_BOARD_PV_M4900] = {
2756 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
2757 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2758 .video_inputs = 3,
2759 .audio_inputs = 1,
2760 .tuner = 0,
2761 .svhs = 2,
2762 .gpiomask = 0x3f,
2763 .muxsel = { 2, 3, 1, 1 },
2764 .audiomux = { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
2765 .no_msp34xx = 1,
2766 .pll = PLL_28,
2767 .tuner_type = TUNER_YMEC_TVF_5533MF,
2768 .tuner_addr = ADDR_UNSET,
2769 .radio_addr = ADDR_UNSET,
2770 .has_radio = 1,
2771 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002772 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002773 /* ---- card 0x8c ---------------------------------- */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002774 [BTTV_BOARD_OSPREY440] = {
2775 .name = "Osprey 440",
2776 .video_inputs = 1,
2777 .audio_inputs = 1,
2778 .tuner = -1,
2779 .svhs = 1,
2780 .muxsel = { 2 },
2781 .pll = PLL_28,
2782 .tuner_type = UNSET,
2783 .tuner_addr = ADDR_UNSET,
2784 .radio_addr = ADDR_UNSET,
2785 .no_msp34xx = 1,
2786 .no_tda9875 = 1,
2787 .no_tda7432 = 1,
2788 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002789 /* ---- card 0x8d ---------------------------------- */
2790 [BTTV_BOARD_ASOUND_SKYEYE] = {
2791 .name = "Asound Skyeye PCTV",
2792 .video_inputs = 3,
2793 .audio_inputs = 1,
2794 .tuner = 0,
2795 .svhs = 2,
2796 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002797 .muxsel = { 2, 3, 1, 1 },
Michael Krufkyca08ca02006-01-11 19:40:25 -02002798 .audiomux = { 2, 0, 0, 0, 1 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002799 .needs_tvaudio = 1,
2800 .pll = PLL_28,
2801 .tuner_type = 2,
2802 .tuner_addr = ADDR_UNSET,
2803 .radio_addr = ADDR_UNSET,
2804 },
Bill Pechter633323f2005-11-13 16:07:50 -08002805 /* ---- card 0x8e ---------------------------------- */
2806 [BTTV_BOARD_SABRENT_TVFM] = {
2807 .name = "Sabrent TV-FM (bttv version)",
2808 .video_inputs = 3,
2809 .audio_inputs = 1,
2810 .tuner = 0,
2811 .svhs = 2,
2812 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002813 .muxsel = { 2, 3, 1, 1 },
2814 .audiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002815 .no_msp34xx = 1,
2816 .no_tda9875 = 1,
2817 .no_tda7432 = 1,
2818 .pll = PLL_28,
2819 .tuner_type = TUNER_TNF_5335MF,
2820 .tuner_addr = ADDR_UNSET,
2821 .has_radio = 1,
2822 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002823 /* ---- card 0x8f ---------------------------------- */
2824 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2825 .name = "Hauppauge ImpactVCB (bt878)",
2826 .video_inputs = 4,
2827 .audio_inputs = 0,
2828 .tuner = -1,
2829 .svhs = -1,
2830 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002831 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002832 .no_msp34xx = 1,
2833 .no_tda9875 = 1,
2834 .no_tda7432 = 1,
2835 .tuner_type = -1,
2836 .tuner_addr = ADDR_UNSET,
2837 .radio_addr = ADDR_UNSET,
2838 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002839 [BTTV_BOARD_MACHTV_MAGICTV] = {
2840 /* Julian Calaby <julian.calaby@gmail.com>
2841 * Slightly different from original MachTV definition (0x60)
2842
2843 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2844 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2845 * properly (methinks) causing no keyup bits being set */
2846
2847 .name = "MagicTV", /* rebranded MachTV */
2848 .video_inputs = 3,
2849 .audio_inputs = 1,
2850 .tuner = 0,
2851 .svhs = 2,
2852 .gpiomask = 7,
2853 .muxsel = { 2, 3, 1, 1 },
2854 .audiomux = { 0, 1, 2, 3, 4 },
2855 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2856 .tuner_addr = ADDR_UNSET,
2857 .radio_addr = ADDR_UNSET,
2858 .pll = PLL_28,
2859 .has_radio = 1,
2860 .has_remote = 1,
2861 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002862};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002863
2864static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2865
2866/* ----------------------------------------------------------------------- */
2867
2868static unsigned char eeprom_data[256];
2869
2870/*
2871 * identify card
2872 */
2873void __devinit bttv_idcard(struct bttv *btv)
2874{
2875 unsigned int gpiobits;
2876 int i,type;
2877 unsigned short tmp;
2878
2879 /* read PCI subsystem ID */
2880 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
2881 btv->cardid = tmp << 16;
2882 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2883 btv->cardid |= tmp;
2884
2885 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2886 /* look for the card */
2887 for (type = -1, i = 0; cards[i].id != 0; i++)
2888 if (cards[i].id == btv->cardid)
2889 type = i;
2890
2891 if (type != -1) {
2892 /* found it */
2893 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
2894 "PCI subsystem ID is %04x:%04x\n",
2895 btv->c.nr,cards[type].name,cards[type].cardnr,
2896 btv->cardid & 0xffff,
2897 (btv->cardid >> 16) & 0xffff);
2898 btv->c.type = cards[type].cardnr;
2899 } else {
2900 /* 404 */
2901 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2902 btv->c.nr, btv->cardid & 0xffff,
2903 (btv->cardid >> 16) & 0xffff);
2904 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08002905 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002906 }
2907 }
2908
2909 /* let the user override the autodetected type */
2910 if (card[btv->c.nr] < bttv_num_tvcards)
2911 btv->c.type=card[btv->c.nr];
2912
2913 /* print which card config we are using */
2914 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
2915 bttv_tvcards[btv->c.type].name, btv->c.type,
2916 card[btv->c.nr] < bttv_num_tvcards
2917 ? "insmod option" : "autodetected");
2918
2919 /* overwrite gpio stuff ?? */
2920 if (UNSET == audioall && UNSET == audiomux[0])
2921 return;
2922
2923 if (UNSET != audiomux[0]) {
2924 gpiobits = 0;
2925 for (i = 0; i < 5; i++) {
2926 bttv_tvcards[btv->c.type].audiomux[i] = audiomux[i];
2927 gpiobits |= audiomux[i];
2928 }
2929 } else {
2930 gpiobits = audioall;
2931 for (i = 0; i < 5; i++) {
2932 bttv_tvcards[btv->c.type].audiomux[i] = audioall;
2933 }
2934 }
2935 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
2936 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
2937 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
2938 for (i = 0; i < 5; i++) {
2939 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].audiomux[i]);
2940 }
2941 printk("\n");
2942}
2943
2944/*
2945 * (most) board specific initialisations goes here
2946 */
2947
2948/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002949static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002950{
2951 int type = -1;
2952
2953 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002954 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002955 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002956 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002957 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002958 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002959
2960 if (-1 != type) {
2961 btv->c.type = type;
2962 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2963 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
2964 }
2965}
2966
2967static void flyvideo_gpio(struct bttv *btv)
2968{
2969 int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
2970 int tuner=-1,ttype;
2971
2972 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002973 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002974 gpio = gpio_read();
2975 /* FIXME: must restore OUR_EN ??? */
2976
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002977 /* all cards provide GPIO info, some have an additional eeprom
2978 * LR50: GPIO coding can be found lower right CP1 .. CP9
2979 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2980 * GPIO14-12: n.c.
2981 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002982
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002983 * lowest 3 bytes are remote control codes (no handshake needed)
2984 * xxxFFF: No remote control chip soldered
2985 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
2986 * Note: Some bits are Audio_Mask !
2987 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002988 ttype=(gpio&0x0f0000)>>16;
2989 switch(ttype) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002990 case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002991 break;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002992 case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002993 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002994 case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002995 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002996 case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002997 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002998 case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002999 break;
3000 default:
3001 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3002 }
3003
3004 has_remote = gpio & 0x800000;
3005 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003006 /* unknown 0x200000;
3007 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003008 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003009 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003010 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3011 /*
3012 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003013
3014 if(is_capture_only)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003015 tuner=4; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003016
3017 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3018 btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
3019 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3020 btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
3021 is_capture_only?"yes":"no ");
3022
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003023 if(tuner!= -1) /* only set if known tuner autodetected, else let insmod option through */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003024 btv->tuner_type = tuner;
3025 btv->has_radio = has_radio;
3026
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003027 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3028 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3029 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003030 if(has_tda9820_tda9821) btv->audio_hook = lt9415_audio;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003031 /* todo: if(has_tda9874) btv->audio_hook = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003032}
3033
3034static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3035 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3036static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3037 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3038
3039static void miro_pinnacle_gpio(struct bttv *btv)
3040{
3041 int id,msp,gpio;
3042 char *info;
3043
3044 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003045 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003046 id = ((gpio>>10) & 63) -1;
3047 msp = bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx");
3048 if (id < 32) {
3049 btv->tuner_type = miro_tunermap[id];
3050 if (0 == (gpio & 0x20)) {
3051 btv->has_radio = 1;
3052 if (!miro_fmtuner[id]) {
3053 btv->has_matchbox = 1;
3054 btv->mbox_we = (1<<6);
3055 btv->mbox_most = (1<<7);
3056 btv->mbox_clk = (1<<8);
3057 btv->mbox_data = (1<<9);
3058 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3059 }
3060 } else {
3061 btv->has_radio = 0;
3062 }
3063 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003064 if (btv->c.type == BTTV_BOARD_MIRO)
3065 btv->c.type = BTTV_BOARD_MIROPRO;
3066 if (btv->c.type == BTTV_BOARD_PINNACLE)
3067 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003068 }
3069 printk(KERN_INFO
3070 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3071 btv->c.nr, id+1, btv->tuner_type,
3072 !btv->has_radio ? "no" :
3073 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3074 (-1 == msp) ? "no" : "yes");
3075 } else {
3076 /* new cards with microtune tuner */
3077 id = 63 - id;
3078 btv->has_radio = 0;
3079 switch (id) {
3080 case 1:
3081 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003082 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003083 break;
3084 case 2:
3085 info = "PAL+SECAM / stereo";
3086 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003087 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003088 break;
3089 case 3:
3090 info = "NTSC / stereo";
3091 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003092 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003093 break;
3094 case 4:
3095 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003096 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003097 break;
3098 case 5:
3099 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003100 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003101 break;
3102 case 6:
3103 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003104 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003105 break;
3106 case 7:
3107 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003108 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003109 break;
3110 default:
3111 info = "oops: unknown card";
3112 break;
3113 }
3114 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003115 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003116 printk(KERN_INFO
3117 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3118 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003119 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003120 }
3121}
3122
3123/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3124#define LM1882_SYNC_DRIVE 0x200000L
3125
3126static void init_ids_eagle(struct bttv *btv)
3127{
3128 gpio_inout(0xffffff,0xFFFF37);
3129 gpio_write(0x200020);
3130
3131 /* flash strobe inverter ?! */
3132 gpio_write(0x200024);
3133
3134 /* switch sync drive off */
3135 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3136
3137 /* set BT848 muxel to 2 */
3138 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3139}
3140
3141/* Muxsel helper for the IDS Eagle.
3142 * the eagles does not use the standard muxsel-bits but
3143 * has its own multiplexer */
3144static void eagle_muxsel(struct bttv *btv, unsigned int input)
3145{
3146 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3147 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3148
Linus Torvalds1da177e2005-04-16 15:20:36 -07003149 /* composite */
3150 /* set chroma ADC to sleep */
3151 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3152 /* set to composite video */
3153 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3154 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003155
3156 /* switch sync drive off */
3157 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3158}
3159
3160static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3161{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003162 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003163 gpio_write(masks[input%4]);
3164}
3165
3166/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3167 alarms output
3168
3169 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3170 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3171
3172 IN - sensor inputs, INx - sensor inputs and TI XORed together
3173 O1,O2,O3 - alarm outputs (relays)
3174
3175 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3176
3177*/
3178
3179static void init_lmlbt4x(struct bttv *btv)
3180{
3181 printk(KERN_DEBUG "LMLBT4x init\n");
3182 btwrite(0x000000, BT848_GPIO_REG_INP);
3183 gpio_inout(0xffffff, 0x0006C0);
3184 gpio_write(0x000000);
3185}
3186
3187static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3188{
3189 unsigned int inmux = input % 8;
3190 gpio_inout( 0xf, 0xf );
3191 gpio_bits( 0xf, inmux );
3192}
3193
3194static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3195{
3196 unsigned int inmux = input % 4;
3197 gpio_inout( 3<<9, 3<<9 );
3198 gpio_bits( 3<<9, inmux<<9 );
3199}
3200
3201/* ----------------------------------------------------------------------- */
3202
3203static void bttv_reset_audio(struct bttv *btv)
3204{
3205 /*
3206 * BT878A has a audio-reset register.
3207 * 1. This register is an audio reset function but it is in
3208 * function-0 (video capture) address space.
3209 * 2. It is enough to do this once per power-up of the card.
3210 * 3. There is a typo in the Conexant doc -- it is not at
3211 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3212 * --//Shrikumar 030609
3213 */
3214 if (btv->id != 878)
3215 return;
3216
3217 if (bttv_debug)
3218 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3219 btwrite((1<<7), 0x058);
3220 udelay(10);
3221 btwrite( 0, 0x058);
3222}
3223
3224/* initialization part one -- before registering i2c bus */
3225void __devinit bttv_init_card1(struct bttv *btv)
3226{
3227 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003228 case BTTV_BOARD_HAUPPAUGE:
3229 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003230 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003231 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003232 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003233 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003234 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003235 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003236 boot_msp34xx(btv,11);
3237 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003238 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003239 pvr_boot(btv);
3240 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003241 case BTTV_BOARD_TWINHAN_DST:
3242 case BTTV_BOARD_AVDVBT_771:
3243 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003244 btv->use_i2c_hw = 1;
3245 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003246 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003247 init_RTV24( btv );
3248 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003249
Linus Torvalds1da177e2005-04-16 15:20:36 -07003250 }
3251 if (!bttv_tvcards[btv->c.type].has_dvb)
3252 bttv_reset_audio(btv);
3253}
3254
3255/* initialization part two -- after registering i2c bus */
3256void __devinit bttv_init_card2(struct bttv *btv)
3257{
3258 int tda9887;
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003259 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003260
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003261 btv->tuner_type = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003262
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003263 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003264 bttv_readee(btv,eeprom_data,0xa0);
3265 identify_by_eeprom(btv,eeprom_data);
3266 }
3267
3268 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003269 case BTTV_BOARD_MIRO:
3270 case BTTV_BOARD_MIROPRO:
3271 case BTTV_BOARD_PINNACLE:
3272 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003273 /* miro/pinnacle */
3274 miro_pinnacle_gpio(btv);
3275 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003276 case BTTV_BOARD_FLYVIDEO_98:
3277 case BTTV_BOARD_MAXI:
3278 case BTTV_BOARD_LIFE_FLYKIT:
3279 case BTTV_BOARD_FLYVIDEO:
3280 case BTTV_BOARD_TYPHOON_TVIEW:
3281 case BTTV_BOARD_CHRONOS_VS2:
3282 case BTTV_BOARD_FLYVIDEO_98FM:
3283 case BTTV_BOARD_FLYVIDEO2000:
3284 case BTTV_BOARD_FLYVIDEO98EZ:
3285 case BTTV_BOARD_CONFERENCETV:
3286 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003287 flyvideo_gpio(btv);
3288 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003289 case BTTV_BOARD_HAUPPAUGE:
3290 case BTTV_BOARD_HAUPPAUGE878:
3291 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003292 /* pick up some config infos from the eeprom */
3293 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003294 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003295 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003296 case BTTV_BOARD_AVERMEDIA98:
3297 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298 bttv_readee(btv,eeprom_data,0xa0);
3299 avermedia_eeprom(btv);
3300 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003301 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003302 init_PXC200(btv);
3303 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003304 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003305 picolo_tetra_init(btv);
3306 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003307 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003308 btv->has_radio = 1;
3309 btv->has_matchbox = 1;
3310 btv->mbox_we = 0x20;
3311 btv->mbox_most = 0;
3312 btv->mbox_clk = 0x08;
3313 btv->mbox_data = 0x10;
3314 btv->mbox_mask = 0x38;
3315 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003316 case BTTV_BOARD_VOBIS_BOOSTAR:
3317 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003318 terratec_active_radio_upgrade(btv);
3319 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003320 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003321 if (btv->cardid == 0x3002144f) {
3322 btv->has_radio=1;
3323 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3324 }
3325 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003326 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003327 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003328 /* Fix up entry for 3DFX VoodooTV 100,
3329 which is an OEM STB card variant. */
3330 btv->has_radio=0;
3331 btv->tuner_type=TUNER_TEMIC_NTSC;
3332 }
3333 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003334 case BTTV_BOARD_OSPREY1x0:
3335 case BTTV_BOARD_OSPREY1x0_848:
3336 case BTTV_BOARD_OSPREY101_848:
3337 case BTTV_BOARD_OSPREY1x1:
3338 case BTTV_BOARD_OSPREY1x1_SVID:
3339 case BTTV_BOARD_OSPREY2xx:
3340 case BTTV_BOARD_OSPREY2x0_SVID:
3341 case BTTV_BOARD_OSPREY2x0:
3342 case BTTV_BOARD_OSPREY500:
3343 case BTTV_BOARD_OSPREY540:
3344 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003345 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003346 osprey_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003347 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003348 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003349 init_ids_eagle(btv);
3350 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003351 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003352 bttv_readee(btv,eeprom_data,0xa0);
3353 modtec_eeprom(btv);
3354 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003355 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003356 init_lmlbt4x(btv);
3357 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003358 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003359 tibetCS16_init(btv);
3360 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003361 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003362 kodicom4400r_init(btv);
3363 break;
3364 }
3365
3366 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003367 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003368 /* defaults from card list */
3369 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3370 btv->pll.pll_ifreq=28636363;
3371 btv->pll.pll_crystal=BT848_IFORM_XT0;
3372 }
3373 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3374 btv->pll.pll_ifreq=35468950;
3375 btv->pll.pll_crystal=BT848_IFORM_XT1;
3376 }
3377 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003378 switch (pll[btv->c.nr]) {
3379 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003380 btv->pll.pll_crystal = 0;
3381 btv->pll.pll_ifreq = 0;
3382 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003383 break;
3384 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003385 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003386 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003387 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003388 btv->pll.pll_crystal = BT848_IFORM_XT0;
3389 break;
3390 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003391 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003392 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003393 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003394 btv->pll.pll_crystal = BT848_IFORM_XT1;
3395 break;
3396 }
3397 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003398 btv->pll.pll_current = -1;
3399
Linus Torvalds1da177e2005-04-16 15:20:36 -07003400 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003401 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3402 addr = bttv_tvcards[btv->c.type].tuner_addr;
3403
3404 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003405 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003406 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003407 if (UNSET != tuner[btv->c.nr])
3408 btv->tuner_type = tuner[btv->c.nr];
3409 printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003410
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003411 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003412 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003413
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003414 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003415 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003416 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003417
3418 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3419 }
3420
Hans Verkuil39e8f402006-01-09 15:25:16 -02003421 if (btv->tda9887_conf) {
3422 bttv_call_i2c_clients(btv, TDA9887_SET_CONFIG,
3423 &btv->tda9887_conf);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003424 }
3425
Linus Torvalds1da177e2005-04-16 15:20:36 -07003426 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3427 if (svhs[btv->c.nr] != UNSET)
3428 btv->svhs = svhs[btv->c.nr];
3429 if (remote[btv->c.nr] != UNSET)
3430 btv->has_remote = remote[btv->c.nr];
3431
3432 if (bttv_tvcards[btv->c.type].has_radio)
3433 btv->has_radio=1;
3434 if (bttv_tvcards[btv->c.type].has_remote)
3435 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003436 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3437 btv->gpioirq=1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003438 if (bttv_tvcards[btv->c.type].audio_hook)
3439 btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook;
3440
3441 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3442 /* detect Bt832 chip for quartzsight digital camera */
3443 if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) ||
3444 (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0))
3445 boot_bt832(btv);
3446 }
3447
3448 if (!autoload)
3449 return;
3450
3451 /* try to detect audio/fader chips */
3452 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
3453 bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0)
3454 request_module("msp3400");
3455
3456 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
3457 bttv_I2CRead(btv, I2C_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
3458 request_module("msp3400");
3459
3460 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
3461 bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0)
3462 request_module("tda9875");
3463
3464 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
3465 bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0)
3466 request_module("tda7432");
3467
3468 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3469 request_module("tvaudio");
3470
3471 /* tuner modules */
3472 tda9887 = 0;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003473 if (btv->tda9887_conf)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003474 tda9887 = 1;
3475 if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb &&
3476 bttv_I2CRead(btv, I2C_TDA9887, "TDA9887") >=0)
3477 tda9887 = 1;
Ricardo Cerqueira6e45f5d2005-11-08 21:38:34 -08003478 /* Hybrid DVB card, DOES have a tda9887 */
3479 if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE)
3480 tda9887 = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003481 if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) ||
3482 (btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) ||
3483 (btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) ||
3484 tda9887)
3485 request_module("tda9887");
3486 if (btv->tuner_type != UNSET)
3487 request_module("tuner");
3488}
3489
3490
3491/* ----------------------------------------------------------------------- */
3492
3493static void modtec_eeprom(struct bttv *btv)
3494{
3495 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3496 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3497 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3498 btv->c.nr,&eeprom_data[0x1e]);
3499 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3500 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3501 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003502 btv->c.nr,&eeprom_data[0x1e]);
3503 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3504 btv->tuner_type=TUNER_PHILIPS_NTSC;
3505 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3506 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003507 } else {
3508 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3509 btv->c.nr,&eeprom_data[0x1e]);
3510 }
3511}
3512
3513static void __devinit hauppauge_eeprom(struct bttv *btv)
3514{
3515 struct tveeprom tv;
3516
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003517 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003518 btv->tuner_type = tv.tuner_type;
3519 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003520
3521 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3522 btv->c.nr, tv.model);
3523
3524 /*
3525 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3526 * type based on model #.
3527 */
3528 if(tv.model == 64900) {
3529 printk("bttv%d: Switching board type from %s to %s\n",
3530 btv->c.nr,
3531 bttv_tvcards[btv->c.type].name,
3532 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3533 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3534 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003535}
3536
3537static int terratec_active_radio_upgrade(struct bttv *btv)
3538{
3539 int freq;
3540
3541 btv->has_radio = 1;
3542 btv->has_matchbox = 1;
3543 btv->mbox_we = 0x10;
3544 btv->mbox_most = 0x20;
3545 btv->mbox_clk = 0x08;
3546 btv->mbox_data = 0x04;
3547 btv->mbox_mask = 0x3c;
3548
3549 btv->mbox_iow = 1 << 8;
3550 btv->mbox_ior = 1 << 9;
3551 btv->mbox_csel = 1 << 10;
3552
3553 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003554 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003555 if (0x1ed8 == tea5757_read(btv)) {
3556 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3557 btv->c.nr);
3558 btv->has_radio = 1;
3559 btv->has_matchbox = 1;
3560 } else {
3561 btv->has_radio = 0;
3562 btv->has_matchbox = 0;
3563 }
3564 return 0;
3565}
3566
3567
3568/* ----------------------------------------------------------------------- */
3569
3570/*
3571 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3572 *
3573 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3574 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3575 * unpacked with unzip).
3576 */
3577#define PVR_GPIO_DELAY 10
3578
3579#define BTTV_ALT_DATA 0x000001
3580#define BTTV_ALT_DCLK 0x100000
3581#define BTTV_ALT_NCONFIG 0x800000
3582
3583static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3584{
3585 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003586 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003587 int i;
3588
3589 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3590 gpio_write(0);
3591 udelay(PVR_GPIO_DELAY);
3592
3593 gpio_write(BTTV_ALT_NCONFIG);
3594 udelay(PVR_GPIO_DELAY);
3595
3596 for (n = 0; n < microlen; n++) {
3597 bits = micro[n];
3598 for ( i = 0 ; i < 8 ; i++ ) {
3599 gpio_bits(BTTV_ALT_DCLK,0);
3600 if (bits & 0x01)
3601 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3602 else
3603 gpio_bits(BTTV_ALT_DATA,0);
3604 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3605 bits >>= 1;
3606 }
3607 }
3608 gpio_bits(BTTV_ALT_DCLK,0);
3609 udelay(PVR_GPIO_DELAY);
3610
3611 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3612 for (i = 0 ; i < 30 ; i++) {
3613 gpio_bits(BTTV_ALT_DCLK,0);
3614 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3615 }
3616 gpio_bits(BTTV_ALT_DCLK,0);
3617 return 0;
3618}
3619
3620static int __devinit pvr_boot(struct bttv *btv)
3621{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003622 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003623 int rc;
3624
3625 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3626 if (rc != 0) {
3627 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3628 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003629 return rc;
3630 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003631 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3632 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3633 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003634 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003635 return rc;
3636}
3637
3638/* ----------------------------------------------------------------------- */
3639/* some osprey specific stuff */
3640
3641static void __devinit osprey_eeprom(struct bttv *btv)
3642{
3643 int i = 0;
3644 unsigned char *ee = eeprom_data;
3645 unsigned long serial = 0;
3646
3647 if (btv->c.type == 0) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003648 /* this might be an antique... check for MMAC label in eeprom */
3649 if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) {
3650 unsigned char checksum = 0;
3651 for (i =0; i<21; i++)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003652 checksum += ee[i];
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003653 if (checksum != ee[21])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003654 return;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003655 btv->c.type = BTTV_BOARD_OSPREY1x0_848;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003656 for (i = 12; i < 21; i++)
3657 serial *= 10, serial += ee[i] - '0';
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003658 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003659 } else {
3660 unsigned short type;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003661 int offset = 4*16;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003662
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003663 for(; offset < 8*16; offset += 16) {
3664 unsigned short checksum = 0;
3665 /* verify the checksum */
3666 for(i = 0; i<14; i++) checksum += ee[i+offset];
3667 checksum = ~checksum; /* no idea why */
3668 if ((((checksum>>8)&0x0FF) == ee[offset+14]) &&
Mauro Carvalho Chehabf2421ca2005-11-08 21:37:45 -08003669 ((checksum & 0x0FF) == ee[offset+15])) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003670 break;
3671 }
3672 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003673
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003674 if (offset >= 8*16)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003675 return;
3676
3677 /* found a valid descriptor */
3678 type = (ee[offset+4]<<8) | (ee[offset+5]);
3679
3680 switch(type) {
3681
3682 /* 848 based */
3683 case 0x0004:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003684 btv->c.type = BTTV_BOARD_OSPREY1x0_848;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003685 break;
3686 case 0x0005:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003687 btv->c.type = BTTV_BOARD_OSPREY101_848;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003688 break;
3689
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003690 /* 878 based */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003691 case 0x0012:
3692 case 0x0013:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003693 btv->c.type = BTTV_BOARD_OSPREY1x0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003694 break;
3695 case 0x0014:
3696 case 0x0015:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003697 btv->c.type = BTTV_BOARD_OSPREY1x1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003698 break;
3699 case 0x0016:
3700 case 0x0017:
3701 case 0x0020:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003702 btv->c.type = BTTV_BOARD_OSPREY1x1_SVID;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003703 break;
3704 case 0x0018:
3705 case 0x0019:
3706 case 0x001E:
3707 case 0x001F:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003708 btv->c.type = BTTV_BOARD_OSPREY2xx;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003709 break;
3710 case 0x001A:
3711 case 0x001B:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003712 btv->c.type = BTTV_BOARD_OSPREY2x0_SVID;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003713 break;
3714 case 0x0040:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003715 btv->c.type = BTTV_BOARD_OSPREY500;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003716 break;
3717 case 0x0050:
3718 case 0x0056:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003719 btv->c.type = BTTV_BOARD_OSPREY540;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003720 /* bttv_osprey_540_init(btv); */
3721 break;
3722 case 0x0060:
3723 case 0x0070:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003724 btv->c.type = BTTV_BOARD_OSPREY2x0;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003725 /* enable output on select control lines */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003726 gpio_inout(0xffffff,0x000303);
3727 break;
3728 default:
3729 /* unknown...leave generic, but get serial # */
3730 break;
3731 }
3732 serial = (ee[offset+6] << 24)
3733 | (ee[offset+7] << 16)
3734 | (ee[offset+8] << 8)
3735 | (ee[offset+9]);
3736 }
3737
3738 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n",
3739 btv->c.nr, btv->c.type, bttv_tvcards[btv->c.type].name,serial);
3740}
3741
3742/* ----------------------------------------------------------------------- */
3743/* AVermedia specific stuff, from bktr_card.c */
3744
3745static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003746 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3747 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3748 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3749 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3750 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003751 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003752
3753static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003754 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003755 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3756 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003757 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3758 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003759
3760static void __devinit avermedia_eeprom(struct bttv *btv)
3761{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003762 int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003763
3764 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003765 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3766 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003767 btv->has_remote = (eeprom_data[0x42] & 0x01);
3768
3769 if (tuner_make == 0 || tuner_make == 2)
3770 if(tuner_format <=0x0a)
3771 tuner = tuner_0_table[tuner_format];
3772 if (tuner_make == 1)
3773 if(tuner_format <=9)
3774 tuner = tuner_1_table[tuner_format];
3775
3776 if (tuner_make == 4)
3777 if(tuner_format == 0x09)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003778 tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003779
3780 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3781 btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
3782 if(tuner) {
3783 btv->tuner_type=tuner;
3784 printk("%d",tuner);
3785 } else
3786 printk("Unknown type");
3787 printk(" radio:%s remote control:%s\n",
3788 tuner_tv_fm ? "yes" : "no",
3789 btv->has_remote ? "yes" : "no");
3790}
3791
3792/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3793void bttv_tda9880_setnorm(struct bttv *btv, int norm)
3794{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003795 /* fix up our card entry */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003796 if(norm==VIDEO_MODE_NTSC) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003797 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[0]=0x957fff;
3798 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[4]=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003799 dprintk("bttv_tda9880_setnorm to NTSC\n");
3800 }
3801 else {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003802 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[0]=0x947fff;
3803 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[4]=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003804 dprintk("bttv_tda9880_setnorm to PAL\n");
3805 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003806 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003807 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
3808 bttv_tvcards[btv->c.type].audiomux[btv->audio]);
3809}
3810
3811
3812/*
3813 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003814 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003815 *
3816 * Hauppauge: pin 5
3817 * Voodoo: pin 20
3818 */
3819static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3820{
3821 int mask = (1 << pin);
3822
3823 gpio_inout(mask,mask);
3824 gpio_bits(mask,0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003825 udelay(2500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003826 gpio_bits(mask,mask);
3827
3828 if (bttv_gpio)
3829 bttv_gpio_tracking(btv,"msp34xx");
3830 if (bttv_verbose)
3831 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3832 "init [%d]\n", btv->c.nr, pin);
3833}
3834
3835static void __devinit boot_bt832(struct bttv *btv)
3836{
Linus Torvalds1da177e2005-04-16 15:20:36 -07003837}
3838
3839/* ----------------------------------------------------------------------- */
3840/* Imagenation L-Model PXC200 Framegrabber */
3841/* This is basically the same procedure as
3842 * used by Alessandro Rubini in his pxc200
3843 * driver, but using BTTV functions */
3844
3845static void __devinit init_PXC200(struct bttv *btv)
3846{
3847 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3848 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3849 0x00 };
3850 unsigned int i;
3851 int tmp;
3852 u32 val;
3853
3854 /* Initialise GPIO-connevted stuff */
3855 gpio_inout(0xffffff, (1<<13));
3856 gpio_write(0);
3857 udelay(3);
3858 gpio_write(1<<13);
3859 /* GPIO inputs are pulled up, so no need to drive
3860 * reset pin any longer */
3861 gpio_bits(0xffffff, 0);
3862 if (bttv_gpio)
3863 bttv_gpio_tracking(btv,"pxc200");
3864
3865 /* we could/should try and reset/control the AD pots? but
3866 right now we simply turned off the crushing. Without
3867 this the AGC drifts drifts
3868 remember the EN is reverse logic -->
3869 setting BT848_ADC_AGC_EN disable the AGC
3870 tboult@eecs.lehigh.edu
3871 */
3872
3873 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
3874
3875 /* Initialise MAX517 DAC */
3876 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
3877 bttv_I2CWrite(btv,0x5E,0,0x80,1);
3878
3879 /* Initialise 12C508 PIC */
3880 /* The I2CWrite and I2CRead commmands are actually to the
3881 * same chips - but the R/W bit is included in the address
3882 * argument so the numbers are different */
3883
3884
3885 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
3886
3887 /* First of all, enable the clock line. This is used in the PXC200-F */
3888 val = btread(BT848_GPIO_DMA_CTL);
3889 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
3890 btwrite(val, BT848_GPIO_DMA_CTL);
3891
3892 /* Then, push to 0 the reset pin long enough to reset the *
3893 * device same as above for the reset line, but not the same
3894 * value sent to the GPIO-connected stuff
3895 * which one is the good one? */
3896 gpio_inout(0xffffff,(1<<2));
3897 gpio_write(0);
3898 udelay(10);
3899 gpio_write(1<<2);
3900
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003901 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003902 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
3903 if (tmp != -1) {
3904 printk(KERN_INFO
3905 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3906 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
3907 }
3908 }
3909
3910 printk(KERN_INFO "PXC200 Initialised.\n");
3911}
3912
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003913
3914
Peter Skipworth93b43f12005-06-23 22:04:45 -07003915/* ----------------------------------------------------------------------- */
3916/*
3917 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3918 * it. This apparently involves the following procedure for each 878 chip:
3919 *
3920 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3921 *
3922 * 2) write to GPIO_DATA
3923 * - 0x0E
3924 * - sleep 1ms
3925 * - 0x10 + 0x0E
3926 * - sleep 10ms
3927 * - 0x0E
3928 * read from GPIO_DATA into buf (uint_32)
3929 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3930 * error. ERROR_CPLD_Check_Failed stop.
3931 *
3932 * 3) write to GPIO_DATA
3933 * - write 0x4400 + 0x0E
3934 * - sleep 10ms
3935 * - write 0x4410 + 0x0E
3936 * - sleep 1ms
3937 * - write 0x0E
3938 * read from GPIO_DATA into buf (uint_32)
3939 * - if ( buf>>18 & 0x01 ) || ( buf>>19 && 0x01 != 0 )
3940 * error. ERROR_CPLD_Check_Failed.
3941 */
3942/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08003943static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003944init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07003945{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003946 uint32_t dataRead = 0;
3947 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07003948
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003949 printk (KERN_INFO
3950 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07003951 btv->c.nr);
3952
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003953 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003954
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003955 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
3956 msleep (1);
3957 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
3958 msleep (10);
3959 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003960
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003961 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003962
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003963 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
3964 printk (KERN_INFO
3965 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
3966 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003967 }
3968
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003969 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
3970 msleep (10);
3971 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
3972 msleep (1);
3973 btwrite (watchdog_value, BT848_GPIO_DATA);
3974 msleep (1);
3975 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003976
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003977 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
3978 printk (KERN_INFO
3979 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
3980 btv->c.nr, dataRead);
3981
Peter Skipworth93b43f12005-06-23 22:04:45 -07003982 return;
3983 }
3984
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003985 printk (KERN_INFO
3986 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003987}
Linus Torvalds1da177e2005-04-16 15:20:36 -07003988
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003989
3990
Linus Torvalds1da177e2005-04-16 15:20:36 -07003991/* ----------------------------------------------------------------------- */
3992/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
3993/*
3994 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
3995 * This code is placed under the terms of the GNU General Public License
3996 *
3997 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
3998 */
3999
4000static void bus_low(struct bttv *btv, int bit)
4001{
4002 if (btv->mbox_ior) {
4003 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4004 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4005 udelay(5);
4006 }
4007
4008 gpio_bits(bit,0);
4009 udelay(5);
4010
4011 if (btv->mbox_ior) {
4012 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4013 udelay(5);
4014 }
4015}
4016
4017static void bus_high(struct bttv *btv, int bit)
4018{
4019 if (btv->mbox_ior) {
4020 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4021 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4022 udelay(5);
4023 }
4024
4025 gpio_bits(bit,bit);
4026 udelay(5);
4027
4028 if (btv->mbox_ior) {
4029 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4030 udelay(5);
4031 }
4032}
4033
4034static int bus_in(struct bttv *btv, int bit)
4035{
4036 if (btv->mbox_ior) {
4037 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4038 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4039 udelay(5);
4040
4041 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4042 udelay(5);
4043 }
4044 return gpio_read() & (bit);
4045}
4046
4047/* TEA5757 register bits */
4048#define TEA_FREQ 0:14
4049#define TEA_BUFFER 15:15
4050
4051#define TEA_SIGNAL_STRENGTH 16:17
4052
4053#define TEA_PORT1 18:18
4054#define TEA_PORT0 19:19
4055
4056#define TEA_BAND 20:21
4057#define TEA_BAND_FM 0
4058#define TEA_BAND_MW 1
4059#define TEA_BAND_LW 2
4060#define TEA_BAND_SW 3
4061
4062#define TEA_MONO 22:22
4063#define TEA_ALLOW_STEREO 0
4064#define TEA_FORCE_MONO 1
4065
4066#define TEA_SEARCH_DIRECTION 23:23
4067#define TEA_SEARCH_DOWN 0
4068#define TEA_SEARCH_UP 1
4069
4070#define TEA_STATUS 24:24
4071#define TEA_STATUS_TUNED 0
4072#define TEA_STATUS_SEARCHING 1
4073
4074/* Low-level stuff */
4075static int tea5757_read(struct bttv *btv)
4076{
4077 unsigned long timeout;
4078 int value = 0;
4079 int i;
4080
4081 /* better safe than sorry */
4082 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4083
4084 if (btv->mbox_ior) {
4085 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4086 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4087 udelay(5);
4088 }
4089
4090 if (bttv_gpio)
4091 bttv_gpio_tracking(btv,"tea5757 read");
4092
4093 bus_low(btv,btv->mbox_we);
4094 bus_low(btv,btv->mbox_clk);
4095
4096 udelay(10);
4097 timeout= jiffies + HZ;
4098
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004099 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004100 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4101 schedule();
4102 if (bus_in(btv,btv->mbox_data)) {
4103 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4104 return -1;
4105 }
4106
4107 dprintk("bttv%d: tea5757:",btv->c.nr);
4108 for(i = 0; i < 24; i++)
4109 {
4110 udelay(5);
4111 bus_high(btv,btv->mbox_clk);
4112 udelay(5);
4113 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4114 bus_low(btv,btv->mbox_clk);
4115 value <<= 1;
4116 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4117 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4118 }
4119 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4120 return value;
4121}
4122
4123static int tea5757_write(struct bttv *btv, int value)
4124{
4125 int i;
4126 int reg = value;
4127
4128 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4129
4130 if (btv->mbox_ior) {
4131 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4132 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4133 udelay(5);
4134 }
4135 if (bttv_gpio)
4136 bttv_gpio_tracking(btv,"tea5757 write");
4137
4138 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4139 bus_low(btv,btv->mbox_clk);
4140 bus_high(btv,btv->mbox_we);
4141 for(i = 0; i < 25; i++)
4142 {
4143 if (reg & 0x1000000)
4144 bus_high(btv,btv->mbox_data);
4145 else
4146 bus_low(btv,btv->mbox_data);
4147 reg <<= 1;
4148 bus_high(btv,btv->mbox_clk);
4149 udelay(10);
4150 bus_low(btv,btv->mbox_clk);
4151 udelay(10);
4152 }
4153 bus_low(btv,btv->mbox_we); /* unmute !!! */
4154 return 0;
4155}
4156
4157void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4158{
4159 dprintk("tea5757_set_freq %d\n",freq);
4160 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004161}
4162
4163
4164/* ----------------------------------------------------------------------- */
4165/* winview */
4166
Adrian Bunk943a4902005-12-01 00:51:35 -08004167static void winview_audio(struct bttv *btv, struct video_audio *v, int set)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004168{
4169 /* PT2254A programming Jon Tombs, jon@gte.esi.us.es */
4170 int bits_out, loops, vol, data;
4171
4172 if (!set) {
4173 /* Fixed by Leandro Lucarella <luca@linuxmendoza.org.ar (07/31/01) */
4174 v->flags |= VIDEO_AUDIO_VOLUME;
4175 return;
4176 }
4177
4178 /* 32 levels logarithmic */
4179 vol = 32 - ((v->volume>>11));
4180 /* units */
4181 bits_out = (PT2254_DBS_IN_2>>(vol%5));
4182 /* tens */
4183 bits_out |= (PT2254_DBS_IN_10>>(vol/5));
4184 bits_out |= PT2254_L_CHANNEL | PT2254_R_CHANNEL;
4185 data = gpio_read();
4186 data &= ~(WINVIEW_PT2254_CLK| WINVIEW_PT2254_DATA|
4187 WINVIEW_PT2254_STROBE);
4188 for (loops = 17; loops >= 0 ; loops--) {
4189 if (bits_out & (1<<loops))
4190 data |= WINVIEW_PT2254_DATA;
4191 else
4192 data &= ~WINVIEW_PT2254_DATA;
4193 gpio_write(data);
4194 udelay(5);
4195 data |= WINVIEW_PT2254_CLK;
4196 gpio_write(data);
4197 udelay(5);
4198 data &= ~WINVIEW_PT2254_CLK;
4199 gpio_write(data);
4200 }
4201 data |= WINVIEW_PT2254_STROBE;
4202 data &= ~WINVIEW_PT2254_DATA;
4203 gpio_write(data);
4204 udelay(10);
4205 data &= ~WINVIEW_PT2254_STROBE;
4206 gpio_write(data);
4207}
4208
4209/* ----------------------------------------------------------------------- */
4210/* mono/stereo control for various cards (which don't use i2c chips but */
4211/* connect something to the GPIO pins */
4212
4213static void
4214gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set)
4215{
4216 unsigned int con = 0;
4217
4218 if (set) {
4219 gpio_inout(0x300, 0x300);
4220 if (v->mode & VIDEO_SOUND_LANG1)
4221 con = 0x000;
4222 if (v->mode & VIDEO_SOUND_LANG2)
4223 con = 0x300;
4224 if (v->mode & VIDEO_SOUND_STEREO)
4225 con = 0x200;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004226/* if (v->mode & VIDEO_SOUND_MONO)
4227 * con = 0x100; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004228 gpio_bits(0x300, con);
4229 } else {
4230 v->mode = VIDEO_SOUND_STEREO |
4231 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4232 }
4233}
4234
4235static void
4236gvbctv5pci_audio(struct bttv *btv, struct video_audio *v, int set)
4237{
4238 unsigned int val, con;
4239
Linus Torvalds1da177e2005-04-16 15:20:36 -07004240 if (btv->radio_user)
4241 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004242
4243 val = gpio_read();
4244 if (set) {
4245 con = 0x000;
4246 if (v->mode & VIDEO_SOUND_LANG2) {
4247 if (v->mode & VIDEO_SOUND_LANG1) {
4248 /* LANG1 + LANG2 */
4249 con = 0x100;
4250 }
4251 else {
4252 /* LANG2 */
4253 con = 0x300;
4254 }
4255 }
4256 if (con != (val & 0x300)) {
4257 gpio_bits(0x300, con);
4258 if (bttv_gpio)
4259 bttv_gpio_tracking(btv,"gvbctv5pci");
4260 }
4261 } else {
4262 switch (val & 0x70) {
4263 case 0x10:
4264 v->mode = VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4265 break;
4266 case 0x30:
4267 v->mode = VIDEO_SOUND_LANG2;
4268 break;
4269 case 0x50:
4270 v->mode = VIDEO_SOUND_LANG1;
4271 break;
4272 case 0x60:
4273 v->mode = VIDEO_SOUND_STEREO;
4274 break;
4275 case 0x70:
4276 v->mode = VIDEO_SOUND_MONO;
4277 break;
4278 default:
4279 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4280 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4281 }
4282 }
4283}
4284
4285/*
4286 * Mario Medina Nussbaum <medisoft@alohabbs.org.mx>
4287 * I discover that on BT848_GPIO_DATA address a byte 0xcce enable stereo,
4288 * 0xdde enables mono and 0xccd enables sap
4289 *
4290 * Petr Vandrovec <VANDROVE@vc.cvut.cz>
4291 * P.S.: At least mask in line above is wrong - GPIO pins 3,2 select
4292 * input/output sound connection, so both must be set for output mode.
4293 *
4294 * Looks like it's needed only for the "tvphone", the "tvphone 98"
4295 * handles this with a tda9840
4296 *
4297 */
4298static void
4299avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v, int set)
4300{
4301 int val = 0;
4302
4303 if (set) {
4304 if (v->mode & VIDEO_SOUND_LANG2) /* SAP */
4305 val = 0x02;
4306 if (v->mode & VIDEO_SOUND_STEREO)
4307 val = 0x01;
4308 if (val) {
4309 gpio_bits(0x03,val);
4310 if (bttv_gpio)
4311 bttv_gpio_tracking(btv,"avermedia");
4312 }
4313 } else {
4314 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4315 VIDEO_SOUND_LANG1;
4316 return;
4317 }
4318}
4319
4320static void
4321avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v, int set)
4322{
4323 int val = 0;
4324
4325 if (set) {
4326 if (v->mode & VIDEO_SOUND_LANG2) /* SAP */
4327 val = 0x01;
4328 if (v->mode & VIDEO_SOUND_STEREO) /* STEREO */
4329 val = 0x02;
4330 btaor(val, ~0x03, BT848_GPIO_DATA);
4331 if (bttv_gpio)
4332 bttv_gpio_tracking(btv,"avermedia");
4333 } else {
4334 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4335 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4336 return;
4337 }
4338}
4339
4340/* Lifetec 9415 handling */
4341static void
4342lt9415_audio(struct bttv *btv, struct video_audio *v, int set)
4343{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004344 int val = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004345
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004346 if (gpio_read() & 0x4000) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004347 v->mode = VIDEO_SOUND_MONO;
4348 return;
4349 }
4350
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004351 if (set) {
4352 if (v->mode & VIDEO_SOUND_LANG2) /* A2 SAP */
4353 val = 0x0080;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004354 if (v->mode & VIDEO_SOUND_STEREO) /* A2 stereo */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004355 val = 0x0880;
4356 if ((v->mode & VIDEO_SOUND_LANG1) ||
Linus Torvalds1da177e2005-04-16 15:20:36 -07004357 (v->mode & VIDEO_SOUND_MONO))
4358 val = 0;
4359 gpio_bits(0x0880, val);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004360 if (bttv_gpio)
4361 bttv_gpio_tracking(btv,"lt9415");
4362 } else {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004363 /* autodetect doesn't work with this card :-( */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004364 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
Linus Torvalds1da177e2005-04-16 15:20:36 -07004365 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004366 return;
4367 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004368}
4369
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004370/* TDA9821 on TerraTV+ Bt848, Bt878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004371static void
4372terratv_audio(struct bttv *btv, struct video_audio *v, int set)
4373{
4374 unsigned int con = 0;
4375
4376 if (set) {
4377 gpio_inout(0x180000,0x180000);
4378 if (v->mode & VIDEO_SOUND_LANG2)
4379 con = 0x080000;
4380 if (v->mode & VIDEO_SOUND_STEREO)
4381 con = 0x180000;
4382 gpio_bits(0x180000, con);
4383 if (bttv_gpio)
4384 bttv_gpio_tracking(btv,"terratv");
4385 } else {
4386 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4387 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4388 }
4389}
4390
4391static void
4392winfast2000_audio(struct bttv *btv, struct video_audio *v, int set)
4393{
4394 unsigned long val = 0;
4395
4396 if (set) {
4397 /*btor (0xc32000, BT848_GPIO_OUT_EN);*/
4398 if (v->mode & VIDEO_SOUND_MONO) /* Mono */
4399 val = 0x420000;
4400 if (v->mode & VIDEO_SOUND_LANG1) /* Mono */
4401 val = 0x420000;
4402 if (v->mode & VIDEO_SOUND_LANG2) /* SAP */
4403 val = 0x410000;
4404 if (v->mode & VIDEO_SOUND_STEREO) /* Stereo */
4405 val = 0x020000;
4406 if (val) {
4407 gpio_bits(0x430000, val);
4408 if (bttv_gpio)
4409 bttv_gpio_tracking(btv,"winfast2000");
4410 }
4411 } else {
4412 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4413 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4414 }
4415}
4416
4417/*
4418 * Dariusz Kowalewski <darekk@automex.pl>
4419 * sound control for Prolink PV-BT878P+9B (PixelView PlayTV Pro FM+NICAM
4420 * revision 9B has on-board TDA9874A sound decoder).
4421 *
4422 * Note: There are card variants without tda9874a. Forcing the "stereo sound route"
4423 * will mute this cards.
4424 */
4425static void
4426pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set)
4427{
4428 unsigned int val = 0;
4429
Linus Torvalds1da177e2005-04-16 15:20:36 -07004430 if (btv->radio_user)
4431 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004432
4433 if (set) {
4434 if (v->mode & VIDEO_SOUND_MONO) {
4435 val = 0x01;
4436 }
4437 if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2))
4438 || (v->mode & VIDEO_SOUND_STEREO)) {
4439 val = 0x02;
4440 }
4441 if (val) {
4442 gpio_bits(0x03,val);
4443 if (bttv_gpio)
4444 bttv_gpio_tracking(btv,"pvbt878p9b");
4445 }
4446 } else {
4447 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4448 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4449 }
4450}
4451
4452/*
4453 * Dariusz Kowalewski <darekk@automex.pl>
4454 * sound control for FlyVideo 2000S (with tda9874 decoder)
4455 * based on pvbt878p9b_audio() - this is not tested, please fix!!!
4456 */
4457static void
4458fv2000s_audio(struct bttv *btv, struct video_audio *v, int set)
4459{
4460 unsigned int val = 0xffff;
4461
Linus Torvalds1da177e2005-04-16 15:20:36 -07004462 if (btv->radio_user)
4463 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004464 if (set) {
4465 if (v->mode & VIDEO_SOUND_MONO) {
4466 val = 0x0000;
4467 }
4468 if ((v->mode & (VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2))
4469 || (v->mode & VIDEO_SOUND_STEREO)) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004470 val = 0x1080; /*-dk-???: 0x0880, 0x0080, 0x1800 ... */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004471 }
4472 if (val != 0xffff) {
4473 gpio_bits(0x1800, val);
4474 if (bttv_gpio)
4475 bttv_gpio_tracking(btv,"fv2000s");
4476 }
4477 } else {
4478 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4479 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4480 }
4481}
4482
4483/*
4484 * sound control for Canopus WinDVR PCI
4485 * Masaki Suzuki <masaki@btree.org>
4486 */
4487static void
4488windvr_audio(struct bttv *btv, struct video_audio *v, int set)
4489{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004490 unsigned long val = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004491
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004492 if (set) {
4493 if (v->mode & VIDEO_SOUND_MONO)
4494 val = 0x040000;
4495 if (v->mode & VIDEO_SOUND_LANG1)
4496 val = 0;
4497 if (v->mode & VIDEO_SOUND_LANG2)
4498 val = 0x100000;
4499 if (v->mode & VIDEO_SOUND_STEREO)
4500 val = 0;
4501 if (val) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004502 gpio_bits(0x140000, val);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004503 if (bttv_gpio)
Mauro Carvalho Chehabf2421ca2005-11-08 21:37:45 -08004504 bttv_gpio_tracking(btv,"windvr");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004505 }
4506 } else {
4507 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4508 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4509 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004510}
4511
4512/*
4513 * sound control for AD-TVK503
4514 * Hiroshi Takekawa <sian@big.or.jp>
4515 */
4516static void
4517adtvk503_audio(struct bttv *btv, struct video_audio *v, int set)
4518{
4519 unsigned int con = 0xffffff;
4520
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004521 /* btaor(0x1e0000, ~0x1e0000, BT848_GPIO_OUT_EN); */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004522
4523 if (set) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004524 /* btor(***, BT848_GPIO_OUT_EN); */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004525 if (v->mode & VIDEO_SOUND_LANG1)
4526 con = 0x00000000;
4527 if (v->mode & VIDEO_SOUND_LANG2)
4528 con = 0x00180000;
4529 if (v->mode & VIDEO_SOUND_STEREO)
4530 con = 0x00000000;
4531 if (v->mode & VIDEO_SOUND_MONO)
4532 con = 0x00060000;
4533 if (con != 0xffffff) {
4534 gpio_bits(0x1e0000,con);
4535 if (bttv_gpio)
4536 bttv_gpio_tracking(btv, "adtvk503");
4537 }
4538 } else {
4539 v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
4540 VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
4541 }
4542}
4543
4544/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4545 *
4546 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4547 * switch instead (CD22M3494E). This IC can have multiple active connections
4548 * between Xn (input) and Yn (output) pins. We need to clear any existing
4549 * connection prior to establish a new one, pulsing the STROBE pin.
4550 *
4551 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4552 * GPIO pins are wired as:
4553 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler)
4554 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler)
4555 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler)
4556 * GPIO[8] - - P3[5] (microcontroler)
4557 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler)
4558 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler)
4559 * GPINTR - - P3[4] (microcontroler)
4560 *
4561 * The microcontroler is a 80C32 like. It should be possible to change xpoint
4562 * configuration either directly (as we are doing) or using the microcontroler
4563 * which is also wired to I2C interface. I have no further info on the
4564 * microcontroler features, one would need to disassembly the firmware.
4565 * note: the vendor refused to give any information on this product, all
4566 * that stuff was found using a multimeter! :)
4567 */
4568static void rv605_muxsel(struct bttv *btv, unsigned int input)
4569{
4570 /* reset all conections */
4571 gpio_bits(0x200,0x200);
4572 mdelay(1);
4573 gpio_bits(0x200,0x000);
4574 mdelay(1);
4575
4576 /* create a new conection */
4577 gpio_bits(0x480,0x080);
4578 gpio_bits(0x480,0x480);
4579 mdelay(1);
4580 gpio_bits(0x480,0x080);
4581 mdelay(1);
4582}
4583
4584/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4585 *
4586 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4587 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4588 * chips, ten eight input analog multiplexors, a not chip and a few
4589 * other components.
4590 *
4591 * 16 inputs on a secondary bracket are provided and can be selected
4592 * from each of the four capture chips. Two of the eight input
4593 * multiplexors are used to select from any of the 16 input signals.
4594 *
4595 * Unsupported hardware capabilities:
4596 * . A video output monitor on the secondary bracket can be selected from
4597 * one of the 878A chips.
4598 * . Another passthrough but I haven't spent any time investigating it.
4599 * . Digital I/O (logic level connected to GPIO) is available from an
4600 * onboard header.
4601 *
4602 * The on chip input mux should always be set to 2.
4603 * GPIO[16:19] - Video input selection
4604 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4605 * GPIO[?:?] - Digital I/O.
4606 *
4607 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4608 * determined what function (if any) it provides. With the microcontroller
4609 * and sync seperator chips a guess is that it might have to do with video
4610 * switching and maybe some digital I/O.
4611 */
4612static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4613{
4614 /* video mux */
4615 gpio_bits(0x0f0000, input << 16);
4616}
4617
4618static void tibetCS16_init(struct bttv *btv)
4619{
4620 /* enable gpio bits, mask obtained via btSpy */
4621 gpio_inout(0xffffff, 0x0f7fff);
4622 gpio_write(0x0f7fff);
4623}
4624
4625/*
4626 * The following routines for the Kodicom-4400r get a little mind-twisting.
4627 * There is a "master" controller and three "slave" controllers, together
4628 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4629 * The analog switch is controlled by the "master", but the detection order
4630 * of the four BT878A chips is in an order which I just don't understand.
4631 * The "master" is actually the second controller to be detected. The
4632 * logic on the board uses logical numbers for the 4 controlers, but
4633 * those numbers are different from the detection sequence. When working
4634 * with the analog switch, we need to "map" from the detection sequence
4635 * over to the board's logical controller number. This mapping sequence
4636 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4637 * unit 3, the second (which is the master) is logical unit 0, etc.
4638 * We need to maintain the status of the analog switch (which of the 16
4639 * cameras is connected to which of the 4 controllers). Rather than
4640 * add to the bttv structure for this, we use the data reserved for
4641 * the mbox (unused for this card type).
4642 */
4643
4644/*
4645 * First a routine to set the analog switch, which controls which camera
4646 * is routed to which controller. The switch comprises an X-address
4647 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4648 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4649 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4650 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4651 * specified address. The idea is to set the address and data, then bring
4652 * STROBE high, and finally bring STROBE back to low.
4653 */
4654static void kodicom4400r_write(struct bttv *btv,
4655 unsigned char xaddr,
4656 unsigned char yaddr,
4657 unsigned char data) {
4658 unsigned int udata;
4659
4660 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4661 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4662 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4663 gpio_bits(0x1ff, udata); /* strobe low */
4664}
4665
4666/*
4667 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4668 * use this routine. The routine finds the "master" for the card, maps
4669 * the controller number from the detected position over to the logical
4670 * number, writes the appropriate data to the analog switch, and housekeeps
4671 * the local copy of the switch information. The parameter 'input' is the
4672 * requested camera number (0 - 15).
4673 */
4674static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4675{
4676 char *sw_status;
4677 int xaddr, yaddr;
4678 struct bttv *mctlr;
4679 static unsigned char map[4] = {3, 0, 2, 1};
4680
4681 mctlr = master[btv->c.nr];
4682 if (mctlr == NULL) { /* ignore if master not yet detected */
4683 return;
4684 }
4685 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4686 yaddr = map[yaddr];
4687 sw_status = (char *)(&mctlr->mbox_we);
4688 xaddr = input & 0xf;
4689 /* Check if the controller/camera pair has changed, else ignore */
4690 if (sw_status[yaddr] != xaddr)
4691 {
4692 /* "open" the old switch, "close" the new one, save the new */
4693 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4694 sw_status[yaddr] = xaddr;
4695 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4696 }
4697}
4698
4699/*
4700 * During initialisation, we need to reset the analog switch. We
4701 * also preset the switch to map the 4 connectors on the card to the
4702 * *user's* (see above description of kodicom4400r_muxsel) channels
4703 * 0 through 3
4704 */
4705static void kodicom4400r_init(struct bttv *btv)
4706{
4707 char *sw_status = (char *)(&btv->mbox_we);
4708 int ix;
4709
4710 gpio_inout(0x0003ff, 0x0003ff);
4711 gpio_write(1 << 9); /* reset MUX */
4712 gpio_write(0);
4713 /* Preset camera 0 to the 4 controllers */
4714 for (ix=0; ix<4; ix++) {
4715 sw_status[ix] = ix;
4716 kodicom4400r_write(btv, ix, ix, 1);
4717 }
4718 /*
4719 * Since this is the "master", we need to set up the
4720 * other three controller chips' pointers to this structure
4721 * for later use in the muxsel routine.
4722 */
4723 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4724 return;
4725 master[btv->c.nr-1] = btv;
4726 master[btv->c.nr] = btv;
4727 master[btv->c.nr+1] = btv;
4728 master[btv->c.nr+2] = btv;
4729}
4730
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004731/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4732 * video multiplexers to provide up to 16 video inputs. These
4733 * multiplexers are controlled by the lower 8 GPIO pins of the
4734 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004735
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004736 * xxx0 is pin xxx of multiplexer U5,
4737 * yyy1 is pin yyy of multiplexer U2
4738 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004739#define ENA0 0x01
4740#define ENB0 0x02
4741#define ENA1 0x04
4742#define ENB1 0x08
4743
4744#define IN10 0x10
4745#define IN00 0x20
4746#define IN11 0x40
4747#define IN01 0x80
4748
4749static void xguard_muxsel(struct bttv *btv, unsigned int input)
4750{
4751 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004752 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4753 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4754 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4755 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004756 };
4757 gpio_write(masks[input%16]);
4758}
4759static void picolo_tetra_init(struct bttv *btv)
4760{
4761 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4762 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4763 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4764}
4765static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4766{
4767
4768 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4769 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4770 /*GPIO[20]&GPIO[21] used to choose the right input*/
4771 btwrite (input<<20,BT848_GPIO_DATA);
4772
4773}
4774
4775/*
4776 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4777 *
4778 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4779 * swichers to provide 16 channels to MUX0. The TDA8540's have
4780 * 4 indepedant outputs and as such the IVC120G also has the
4781 * optional "Monitor Out" bus. This allows the card to be looking
4782 * at one input while the monitor is looking at another.
4783 *
4784 * Since I've couldn't be bothered figuring out how to add an
4785 * independant muxsel for the monitor bus, I've just set it to
4786 * whatever the card is looking at.
4787 *
4788 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4789 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4790 *
4791 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4792 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4793 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4794 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4795 *
4796 */
4797
4798/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4799#define I2C_TDA8540 0x90
4800#define I2C_TDA8540_ALT1 0x92
4801#define I2C_TDA8540_ALT2 0x94
4802#define I2C_TDA8540_ALT3 0x96
4803#define I2C_TDA8540_ALT4 0x98
4804#define I2C_TDA8540_ALT5 0x9a
4805#define I2C_TDA8540_ALT6 0x9c
4806
4807static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4808{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004809 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004810 int key = input % 4;
4811 int matrix = input / 4;
4812
4813 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4814 btv->c.nr, input, matrix, key);
4815
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004816 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004817 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4818 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4819 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4820 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4821 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4822 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4823 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4824 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4825
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004826 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004827 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004828 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004829 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004830 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004831 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004832 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004833 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004834 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004835
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004836 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004837 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4838}
4839
4840
4841/* PXC200 muxsel helper
4842 * luke@syseng.anu.edu.au
4843 * another transplant
4844 * from Alessandro Rubini (rubini@linux.it)
4845 *
4846 * There are 4 kinds of cards:
4847 * PXC200L which is bt848
4848 * PXC200F which is bt848 with PIC controlling mux
4849 * PXC200AL which is bt878
4850 * PXC200AF which is bt878 with PIC controlling mux
4851 */
4852#define PX_CFG_PXC200F 0x01
4853#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4854#define PX_I2C_PIC 0x0f
4855#define PX_PXC200A_CARDID 0x200a1295
4856#define PX_I2C_CMD_CFG 0x00
4857
4858static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4859{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004860 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004861 long mux;
4862 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004863 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004864
4865 /* Read PIC config to determine if this is a PXC200F */
4866 /* PX_I2C_CMD_CFG*/
4867 buf[0]=0;
4868 buf[1]=0;
4869 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4870 if (rc) {
4871 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4872 /* not PXC ? do nothing */
4873 return;
4874 }
4875
4876 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4877 if (!(rc & PX_CFG_PXC200F)) {
4878 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4879 return;
4880 }
4881
4882
4883 /* The multiplexer in the 200F is handled by the GPIO port */
4884 /* get correct mapping between inputs */
4885 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4886 /* ** not needed!? */
4887 mux = input;
4888
4889 /* make sure output pins are enabled */
4890 /* bitmask=0x30f; */
4891 bitmask=0x302;
4892 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004893 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004894 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4895 bitmask |= 7<<4; /* the DAC */
4896 }
4897 btwrite(bitmask, BT848_GPIO_OUT_EN);
4898
4899 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004900 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004901 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4902 else /* older device */
4903 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4904 btwrite(bitmask,BT848_GPIO_DATA);
4905
4906 /*
4907 * Was "to be safe, set the bt848 to input 0"
4908 * Actually, since it's ok at load time, better not messing
4909 * with these bits (on PXC200AF you need to set mux 2 here)
4910 *
4911 * needed because bttv-driver sets mux before calling this function
4912 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004913 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004914 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4915 else /* older device */
4916 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4917
4918 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4919}
4920
4921/* ----------------------------------------------------------------------- */
4922/* motherboard chipset specific stuff */
4923
4924void __devinit bttv_check_chipset(void)
4925{
4926 int pcipci_fail = 0;
4927 struct pci_dev *dev = NULL;
4928
4929 if (pci_pci_problems & PCIPCI_FAIL)
4930 pcipci_fail = 1;
4931 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4932 triton1 = 1;
4933 if (pci_pci_problems & PCIPCI_VSFX)
4934 vsfx = 1;
4935#ifdef PCIPCI_ALIMAGIK
4936 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4937 latency = 0x0A;
4938#endif
4939
Linus Torvalds1da177e2005-04-16 15:20:36 -07004940
4941 /* print warnings about any quirks found */
4942 if (triton1)
4943 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4944 if (vsfx)
4945 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4946 if (pcipci_fail) {
4947 printk(KERN_WARNING "bttv: BT848 and your chipset may not work together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004948 if (!no_overlay) {
4949 printk(KERN_WARNING "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004950 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004951 } else {
4952 printk(KERN_WARNING "bttv: overlay forced. Use this option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004953 }
4954 }
4955 if (UNSET != latency)
4956 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004957 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004958 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004959 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004960 pci_read_config_byte(dev, 0x53, &b);
4961 if (bttv_debug)
4962 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4963 "bufcon=0x%02x\n",b);
4964 }
4965}
4966
4967int __devinit bttv_handle_chipset(struct bttv *btv)
4968{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004969 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004970
4971 if (!triton1 && !vsfx && UNSET == latency)
4972 return 0;
4973
4974 if (bttv_verbose) {
4975 if (triton1)
4976 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4977 if (vsfx && btv->id >= 878)
4978 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4979 if (UNSET != latency)
4980 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4981 btv->c.nr,latency);
4982 }
4983
4984 if (btv->id < 878) {
4985 /* bt848 (mis)uses a bit in the irq mask for etbf */
4986 if (triton1)
4987 btv->triton1 = BT848_INT_ETBF;
4988 } else {
4989 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004990 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004991 if (triton1)
4992 command |= BT878_EN_TBFX;
4993 if (vsfx)
4994 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004995 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4996 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004997 if (UNSET != latency)
4998 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4999 return 0;
5000}
5001
5002
5003/*
5004 * Local variables:
5005 * c-basic-offset: 8
5006 * End:
5007 */