blob: 9dfd8c70e4fb058e2b162f5893fb59f2164d730f [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
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#include <linux/delay.h>
29#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/kmod.h>
31#include <linux/init.h>
32#include <linux/pci.h>
33#include <linux/vmalloc.h>
34#include <linux/firmware.h>
Trent Piephocf784d52007-07-21 21:26:40 -030035#include <net/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Al Viroc1c36f32008-05-21 00:32:21 -030037#include <asm/unaligned.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#include <asm/io.h>
39
40#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020041#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030042#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030043#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45/* fwd decl */
46static void boot_msp34xx(struct bttv *btv, int pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047static void hauppauge_eeprom(struct bttv *btv);
48static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030049static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050static void modtec_eeprom(struct bttv *btv);
51static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070052static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054static void rv605_muxsel(struct bttv *btv, unsigned int input);
55static void eagle_muxsel(struct bttv *btv, unsigned int input);
56static void xguard_muxsel(struct bttv *btv, unsigned int input);
57static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
59
60static void PXC200_muxsel(struct bttv *btv, unsigned int input);
61
62static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63static void picolo_tetra_init(struct bttv *btv);
64
65static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66static void tibetCS16_init(struct bttv *btv);
67
68static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69static void kodicom4400r_init(struct bttv *btv);
70
71static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
73
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030074static void geovision_muxsel(struct bttv *btv, unsigned int input);
75
Linus Torvalds1da177e2005-04-16 15:20:36 -070076static int terratec_active_radio_upgrade(struct bttv *btv);
77static int tea5757_read(struct bttv *btv);
78static int tea5757_write(struct bttv *btv, int value);
79static void identify_by_eeprom(struct bttv *btv,
80 unsigned char eeprom_data[256]);
81static int __devinit pvr_boot(struct bttv *btv);
82
83/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020084static unsigned int triton1;
85static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070086static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070087int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
89static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
94static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
95#ifdef MODULE
96static unsigned int autoload = 1;
97#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020098static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -070099#endif
100static unsigned int gpiomask = UNSET;
101static unsigned int audioall = UNSET;
102static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
103
104/* insmod options */
105module_param(triton1, int, 0444);
106module_param(vsfx, int, 0444);
107module_param(no_overlay, int, 0444);
108module_param(latency, int, 0444);
109module_param(gpiomask, int, 0444);
110module_param(audioall, int, 0444);
111module_param(autoload, int, 0444);
112
113module_param_array(card, int, NULL, 0444);
114module_param_array(pll, int, NULL, 0444);
115module_param_array(tuner, int, NULL, 0444);
116module_param_array(svhs, int, NULL, 0444);
117module_param_array(remote, int, NULL, 0444);
118module_param_array(audiomux, int, NULL, 0444);
119
120MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
121 "[enable bug compatibility for triton1 + others]");
122MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
123 "[yet another chipset flaw workaround]");
124MODULE_PARM_DESC(latency,"pci latency timer");
125MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
126MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
127MODULE_PARM_DESC(tuner,"specify installed tuner type");
128MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300129MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
130 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131
132/* ----------------------------------------------------------------------- */
133/* list of card IDs for bt878+ cards */
134
135static struct CARD {
136 unsigned id;
137 int cardnr;
138 char *name;
139} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800140 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
141 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
142 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
143 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
144 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
145 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
146 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
147 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800148 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800150 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
151 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800153 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
154 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
155 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
156 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
157 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800158 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800159 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
160 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800161 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800163 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700164 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800165 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
166 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700167 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169
Wade Berrier434b2522007-06-25 13:02:16 -0300170 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
171 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800172 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
175 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
176 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
177 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
178 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
179 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
180 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700181
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800182 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
183 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
184 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
185 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
186 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800188 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
189 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
190 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
191 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800193 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
194 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700195 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800196 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
197 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
198 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
199 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
200 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800202 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
203 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
204 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
205 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
206 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800208 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
209 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
210 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
211 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
212 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800214 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
215 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
216 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
217 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700218
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800219 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
220 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
221 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
222 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800224 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
225 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
226 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
227 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
228 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
229 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
230 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
231 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
232 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
233 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
234 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
235 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300249 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
250 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
251 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
252 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800254 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
255 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800257 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
258 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
259 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
260 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
261 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
262 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700263
Trent Piepho657de3c2006-06-20 00:30:57 -0300264 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800265 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800267 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
268 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
269 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
270 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
271 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
272 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800273 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
274 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800275 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800277 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
278 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700279
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800280 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
281 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
282 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
283 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800285 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286
Scott Alfter1ebba672007-04-02 14:22:39 -0300287 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
288 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
289
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700290 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800291 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700292
Steven Tothcd1257d2006-01-09 15:25:01 -0200293 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
294 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
295
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700296 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800297 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200298 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
299 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800300 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
301 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
302 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
303 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200304 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800305 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300306 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800307 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300308 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300309 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300310 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300311 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312 { 0, -1, NULL }
313};
314
315/* ----------------------------------------------------------------------- */
316/* array with description for bt848 / bt878 tv/grabber cards */
317
318struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800319 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800320 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800321 .name = " *** UNKNOWN/GENERIC *** ",
322 .video_inputs = 4,
323 .audio_inputs = 1,
324 .tuner = 0,
325 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200326 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300327 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800328 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800329 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800330 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800331 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800332 .name = "MIRO PCTV",
333 .video_inputs = 4,
334 .audio_inputs = 1,
335 .tuner = 0,
336 .svhs = 2,
337 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200338 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300339 .gpiomux = { 2, 0, 0, 0 },
340 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800341 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300342 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800343 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800344 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800345 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800346 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800347 .name = "Hauppauge (bt848)",
348 .video_inputs = 4,
349 .audio_inputs = 1,
350 .tuner = 0,
351 .svhs = 2,
352 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200353 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300354 .gpiomux = { 0, 1, 2, 3 },
355 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300357 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800358 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800359 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800360 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800361 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800362 .name = "STB, Gateway P/N 6000699 (bt848)",
363 .video_inputs = 3,
364 .audio_inputs = 1,
365 .tuner = 0,
366 .svhs = 2,
367 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200368 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300369 .gpiomux = { 4, 0, 2, 3 },
370 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800371 .no_msp34xx = 1,
372 .needs_tvaudio = 1,
373 .tuner_type = TUNER_PHILIPS_NTSC,
374 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800375 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800376 .pll = PLL_28,
377 .has_radio = 1,
378 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800380 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800381 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
383 .video_inputs = 4,
384 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300385 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800386 .svhs = 2,
387 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200388 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300389 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800390 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300391 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800392 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800393 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800394 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800395 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800396 .name = "Diamond DTV2000",
397 .video_inputs = 4,
398 .audio_inputs = 1,
399 .tuner = 0,
400 .svhs = 2,
401 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200402 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300403 .gpiomux = { 0, 1, 0, 1 },
404 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300406 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800408 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800409 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800410 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800411 .name = "AVerMedia TVPhone",
412 .video_inputs = 3,
413 .audio_inputs = 1,
414 .tuner = 0,
415 .svhs = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200416 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800417 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300418 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 /* 0x04 for some cards ?? */
420 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300421 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800423 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300424 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800425 .has_remote = 1,
426 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800427 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800428 .name = "MATRIX-Vision MV-Delta",
429 .video_inputs = 5,
430 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300431 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800432 .svhs = 3,
433 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200434 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300435 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300437 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800439 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800440 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800442 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800443 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800444 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
445 .video_inputs = 4,
446 .audio_inputs = 1,
447 .tuner = 0,
448 .svhs = 2,
449 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200450 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300451 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
452 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .needs_tvaudio = 1,
454 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300455 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800456 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800457 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800458 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800459 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800460 .name = "IMS/IXmicro TurboTV",
461 .video_inputs = 3,
462 .audio_inputs = 1,
463 .tuner = 0,
464 .svhs = 2,
465 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200466 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300467 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800468 .needs_tvaudio = 0,
469 .pll = PLL_28,
470 .tuner_type = TUNER_TEMIC_PAL,
471 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800472 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800473 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800474 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800475 .name = "Hauppauge (bt878)",
476 .video_inputs = 4,
477 .audio_inputs = 1,
478 .tuner = 0,
479 .svhs = 2,
480 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -0200481 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300482 .gpiomux = { 0, 1, 2, 3 },
483 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800484 .needs_tvaudio = 1,
485 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300486 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800487 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800488 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800489 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800490 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800491 .name = "MIRO PCTV pro",
492 .video_inputs = 3,
493 .audio_inputs = 1,
494 .tuner = 0,
495 .svhs = 2,
496 .gpiomask = 0x3014f,
Michael Krufkybc286362006-01-11 19:40:17 -0200497 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300498 .gpiomux = { 0x20001,0x10001, 0, 0 },
499 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800500 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300501 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800502 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800503 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700505
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800506 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800507 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800508 .name = "ADS Technologies Channel Surfer TV (bt848)",
509 .video_inputs = 3,
510 .audio_inputs = 1,
511 .tuner = 0,
512 .svhs = 2,
513 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200514 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300515 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800516 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300517 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800518 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800519 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800521 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800522 .name = "AVerMedia TVCapture 98",
523 .video_inputs = 3,
524 .audio_inputs = 4,
525 .tuner = 0,
526 .svhs = 2,
527 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200528 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300529 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800530 .needs_tvaudio = 1,
531 .msp34xx_alt = 1,
532 .pll = PLL_28,
533 .tuner_type = TUNER_PHILIPS_PAL,
534 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800535 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300536 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800537 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800538 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800539 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800540 .name = "Aimslab Video Highway Xtreme (VHX)",
541 .video_inputs = 3,
542 .audio_inputs = 1,
543 .tuner = 0,
544 .svhs = 2,
545 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200546 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300547 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
548 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800549 .needs_tvaudio = 1,
550 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300551 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800552 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800553 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800554 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800555 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800556 .name = "Zoltrix TV-Max",
557 .video_inputs = 3,
558 .audio_inputs = 1,
559 .tuner = 0,
560 .svhs = 2,
561 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200562 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300563 .gpiomux = { 0, 0, 1, 0 },
564 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800565 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300566 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800567 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800568 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800571 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800572 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800573 .name = "Prolink Pixelview PlayTV (bt878)",
574 .video_inputs = 3,
575 .audio_inputs = 1,
576 .tuner = 0,
577 .svhs = 2,
578 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200579 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800580 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300581 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
582 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800583 .needs_tvaudio = 1,
584 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300585 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300586 .tuner_addr = ADDR_UNSET,
587 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800588 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800589 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800590 .name = "Leadtek WinView 601",
591 .video_inputs = 3,
592 .audio_inputs = 1,
593 .tuner = 0,
594 .svhs = 2,
595 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200596 .muxsel = { 2, 3, 1, 1,0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300597 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
598 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800599 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300600 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800601 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800602 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300603 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800604 .has_radio = 1,
605 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800606 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800607 .name = "AVEC Intercapture",
608 .video_inputs = 3,
609 .audio_inputs = 2,
610 .tuner = 0,
611 .svhs = 2,
612 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200613 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300614 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800615 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300616 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800617 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800618 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800619 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800620 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800621 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
622 .video_inputs = 4,
623 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300624 .tuner = UNSET,
625 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800626 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200627 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300628 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800629 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300630 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800631 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800632 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800633 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800635 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800636 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800637 .name = "CEI Raffles Card",
638 .video_inputs = 3,
639 .audio_inputs = 3,
640 .tuner = 0,
641 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200642 .muxsel = { 2, 3, 1, 1 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300643 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800644 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800645 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800646 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800647 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800648 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
649 .video_inputs = 4,
650 .audio_inputs = 2, /* tuner, line in */
651 .tuner = 0,
652 .svhs = 2,
653 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200654 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300655 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
656 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800657 .pll = PLL_28,
658 .tuner_type = TUNER_PHILIPS_PAL_I,
659 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800660 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800661 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800662 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800663 .name = "Askey CPH050/ Phoebe Tv Master + FM",
664 .video_inputs = 3,
665 .audio_inputs = 1,
666 .tuner = 0,
667 .svhs = 2,
668 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200669 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300670 .gpiomux = { 0, 1, 0x800, 0x400 },
671 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800672 .needs_tvaudio = 1,
673 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300674 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800676 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800677 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800678 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800679 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
680 .video_inputs = 3,
681 .audio_inputs = 1,
682 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300683 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800684 .gpiomask = 7,
685 .muxsel = { 2, 3, -1 },
686 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300687 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800688 .no_msp34xx = 1,
689 .pll = PLL_28,
690 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
691 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800692 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800695 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800696 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .name = "Askey CPH05X/06X (bt878) [many vendors]",
698 .video_inputs = 3,
699 .audio_inputs = 1,
700 .tuner = 0,
701 .svhs = 2,
702 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200703 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300704 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
705 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800706 .needs_tvaudio = 1,
707 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300708 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800709 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800710 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800711 .has_remote = 1,
712 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800713 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800714 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
715 .video_inputs = 3,
716 .audio_inputs = 1,
717 .tuner = 0,
718 .svhs = 2,
719 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200720 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300721 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
722 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800723 .needs_tvaudio = 0,
724 .tuner_type = TUNER_PHILIPS_PAL,
725 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800726 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300727 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800728 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800729 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800730 .name = "Hauppauge WinCam newer (bt878)",
731 .video_inputs = 4,
732 .audio_inputs = 1,
733 .tuner = 0,
734 .svhs = 3,
735 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200736 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300737 .gpiomux = { 0, 1, 2, 3 },
738 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800739 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300740 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800741 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800742 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800743 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800744 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800745 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
746 .video_inputs = 4,
747 .audio_inputs = 2,
748 .tuner = 0,
749 .svhs = 2,
750 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200751 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300752 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
753 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800754 .pll = PLL_28,
755 .tuner_type = TUNER_PHILIPS_SECAM,
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 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700759
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800760 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800761 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800762 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
763 .video_inputs = 3,
764 .audio_inputs = 1,
765 .tuner = 0,
766 .svhs = 2,
767 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200768 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300769 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
770 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800771 .needs_tvaudio = 0,
772 .tuner_type = TUNER_PHILIPS_PAL,
773 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800774 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300775 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800776 /* GPIO wiring:
777 External 20 pin connector (for Active Radio Upgrade board)
778 gpio00: i2c-sda
779 gpio01: i2c-scl
780 gpio02: om5610-data
781 gpio03: om5610-clk
782 gpio04: om5610-wre
783 gpio05: om5610-stereo
784 gpio06: rds6588-davn
785 gpio07: Pin 7 n.c.
786 gpio08: nIOW
787 gpio09+10: nIOR, nSEL ?? (bt878)
788 gpio09: nIOR (bt848)
789 gpio10: nSEL (bt848)
790 Sound Routing:
791 gpio16: u2-A0 (1st 4052bt)
792 gpio17: u2-A1
793 gpio18: u2-nEN
794 gpio19: u4-A0 (2nd 4052)
795 gpio20: u4-A1
796 u4-nEN - GND
797 Btspy:
798 00000 : Cdrom (internal audio input)
799 10000 : ext. Video audio input
800 20000 : TV Mono
801 a0000 : TV Mono/2
802 1a0000 : TV Stereo
803 30000 : Radio
804 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700805 */
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_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800809 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
810 .name = "Imagenation PXC200",
811 .video_inputs = 5,
812 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300813 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800814 .svhs = 1, /* was: 4 */
815 .gpiomask = 0,
816 .muxsel = { 2, 3, 1, 0, 0},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300817 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800818 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300819 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800820 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800821 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800822 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800824 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800825 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800826 .name = "Lifeview FlyVideo 98 LR50",
827 .video_inputs = 4,
828 .audio_inputs = 1,
829 .tuner = 0,
830 .svhs = 2,
831 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200832 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300833 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
834 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800835 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300836 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800837 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800838 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800839 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800840 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800841 .name = "Formac iProTV, Formac ProTV I (bt848)",
842 .video_inputs = 4,
843 .audio_inputs = 1,
844 .tuner = 0,
845 .svhs = 3,
846 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200847 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300848 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800849 .pll = PLL_28,
850 .tuner_type = TUNER_PHILIPS_PAL,
851 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800852 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800853 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700854
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800855 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800856 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800857 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
858 .video_inputs = 4,
859 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300860 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800861 .svhs = 2,
862 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200863 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300864 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800865 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300866 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800867 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800868 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800869 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800870 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800871 .name = "Terratec TerraTValue Version Bt878",
872 .video_inputs = 3,
873 .audio_inputs = 1,
874 .tuner = 0,
875 .svhs = 2,
876 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200877 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300878 .gpiomux = { 0x500, 0, 0x300, 0x900 },
879 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800880 .needs_tvaudio = 1,
881 .pll = PLL_28,
882 .tuner_type = TUNER_PHILIPS_PAL,
883 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800884 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800885 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800886 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800887 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
888 .video_inputs = 4,
889 .audio_inputs = 1,
890 .tuner = 0,
891 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200892 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800893 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
894 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300895 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
896 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800897 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
898 gpio23 -- hef4052:nEnable (0x800000)
899 gpio12 -- hef4052:A1
900 gpio13 -- hef4052:A0
901 0x0000: external audio
902 0x1000: FM
903 0x2000: TV
904 0x3000: n.c.
905 Note: There exists another variant "Winfast 2000" with tv stereo !?
906 Note: eeprom only contains FF and pci subsystem id 107d:6606
907 */
908 .needs_tvaudio = 0,
909 .pll = PLL_28,
910 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300911 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800912 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800913 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300914 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800915 .has_remote = 1,
916 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800917 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800918 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
919 .video_inputs = 4,
920 .audio_inputs = 3,
921 .tuner = 0,
922 .svhs = 2,
923 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200924 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300925 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
926 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800927 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300928 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800929 .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 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700932
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800933 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800934 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800935 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
936 .video_inputs = 4,
937 .audio_inputs = 3,
938 .tuner = 0,
939 .svhs = 2,
940 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200941 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300942 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
943 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300945 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800946 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800947 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800948 .has_radio = 1,
949 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800950 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800951 .name = "Prolink PixelView PlayTV pro",
952 .video_inputs = 3,
953 .audio_inputs = 1,
954 .tuner = 0,
955 .svhs = 2,
956 .gpiomask = 0xff,
957 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300958 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
959 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .no_msp34xx = 1,
961 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300962 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800964 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800965 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800966 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800967 .name = "Askey CPH06X TView99",
968 .video_inputs = 4,
969 .audio_inputs = 1,
970 .tuner = 0,
971 .svhs = 2,
972 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200973 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300974 .gpiomux = { 0x551400, 0x551200, 0, 0 },
975 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800976 .needs_tvaudio = 1,
977 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300978 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800979 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800980 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800981 .has_remote = 1,
982 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800983 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800984 .name = "Pinnacle PCTV Studio/Rave",
985 .video_inputs = 3,
986 .audio_inputs = 1,
987 .tuner = 0,
988 .svhs = 2,
989 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200990 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300991 .gpiomux = { 2, 0xd0001, 0, 0 },
992 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800993 .needs_tvaudio = 0,
994 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300995 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800996 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800997 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800998 },
999
1000 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001001 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
1003 .video_inputs = 3,
1004 .audio_inputs = 1,
1005 .tuner = 0,
1006 .svhs = 2,
1007 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001008 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001009 .gpiomux = { 4, 0, 2, 3 },
1010 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001011 .no_msp34xx = 1,
1012 .needs_tvaudio = 1,
1013 .tuner_type = TUNER_PHILIPS_NTSC,
1014 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001015 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .pll = PLL_28,
1017 .has_radio = 1,
1018 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001019 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001020 .name = "AVerMedia TVPhone 98",
1021 .video_inputs = 3,
1022 .audio_inputs = 4,
1023 .tuner = 0,
1024 .svhs = 2,
1025 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001026 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001027 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 .needs_tvaudio = 1,
1029 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001030 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001031 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001032 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001033 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001034 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001035 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001036 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001037 .name = "ProVideo PV951", /* pic16c54 */
1038 .video_inputs = 3,
1039 .audio_inputs = 1,
1040 .tuner = 0,
1041 .svhs = 2,
1042 .gpiomask = 0,
1043 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001044 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001045 .needs_tvaudio = 1,
1046 .no_msp34xx = 1,
1047 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001048 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001049 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001050 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001051 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001052 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001053 .name = "Little OnAir TV",
1054 .video_inputs = 3,
1055 .audio_inputs = 1,
1056 .tuner = 0,
1057 .svhs = 2,
1058 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001059 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001060 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1061 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001062 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001063 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001064 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001065 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001066 },
1067
1068 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001069 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001070 .name = "Sigma TVII-FM",
1071 .video_inputs = 2,
1072 .audio_inputs = 1,
1073 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001074 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001076 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001077 .gpiomux = { 1, 1, 0, 2 },
1078 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .no_msp34xx = 1,
1080 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001081 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001082 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001083 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001084 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001085 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001086 .name = "MATRIX-Vision MV-Delta 2",
1087 .video_inputs = 5,
1088 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001089 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 .svhs = 3,
1091 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001092 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001093 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001094 .no_msp34xx = 1,
1095 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001096 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001097 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001098 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001099 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001100 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001101 .name = "Zoltrix Genie TV/FM",
1102 .video_inputs = 3,
1103 .audio_inputs = 1,
1104 .tuner = 0,
1105 .svhs = 2,
1106 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001107 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001108 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1109 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .no_msp34xx = 1,
1111 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001112 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001113 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001114 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001115 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001116 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001117 .name = "Terratec TV/Radio+",
1118 .video_inputs = 3,
1119 .audio_inputs = 1,
1120 .tuner = 0,
1121 .svhs = 2,
1122 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001123 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001124 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1125 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001126 .needs_tvaudio = 1,
1127 .no_msp34xx = 1,
1128 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001129 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001130 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001131 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001132 .has_radio = 1,
1133 },
1134
1135 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001136 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001137 .name = "Askey CPH03x/ Dynalink Magic TView",
1138 .video_inputs = 3,
1139 .audio_inputs = 1,
1140 .tuner = 0,
1141 .svhs = 2,
1142 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001143 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001144 .gpiomux = {2,0,0,0 },
1145 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001146 .needs_tvaudio = 1,
1147 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001148 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001149 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001150 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001151 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001152 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001153 .name = "IODATA GV-BCTV3/PCI",
1154 .video_inputs = 3,
1155 .audio_inputs = 1,
1156 .tuner = 0,
1157 .svhs = 2,
1158 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001159 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001160 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001161 .no_msp34xx = 1,
1162 .pll = PLL_28,
1163 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1164 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001165 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001166 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001167 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001168 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001169 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1170 .video_inputs = 5,
1171 .audio_inputs = 1,
1172 .tuner = 0,
1173 .svhs = 3,
1174 .gpiomask = 0xAA0000,
1175 .muxsel = { 2,3,1,1,-1 },
1176 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001177 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1178 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001179 .no_msp34xx = 1,
1180 .pll = PLL_28,
1181 .tuner_type = TUNER_PHILIPS_PAL_I,
1182 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001183 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001184 .has_remote = 1,
1185 /* GPIO wiring: (different from Rev.4C !)
1186 GPIO17: U4.A0 (first hef4052bt)
1187 GPIO19: U4.A1
1188 GPIO20: U5.A1 (second hef4052bt)
1189 GPIO21: U4.nEN
1190 GPIO22: BT832 Reset Line
1191 GPIO23: A5,A0, U5,nEN
1192 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1193 */
1194 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001195 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001196 .name = "Eagle Wireless Capricorn2 (bt878A)",
1197 .video_inputs = 4,
1198 .audio_inputs = 1,
1199 .tuner = 0,
1200 .svhs = 2,
1201 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001202 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001203 .gpiomux = { 0, 1, 2, 3 },
1204 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001205 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001206 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001207 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001208 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001209 },
1210
1211 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001212 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001213 /* David Härdeman <david@2gen.com> */
1214 .name = "Pinnacle PCTV Studio Pro",
1215 .video_inputs = 4,
1216 .audio_inputs = 1,
1217 .tuner = 0,
1218 .svhs = 3,
1219 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001220 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001221 .gpiomux = { 1, 0xd0001, 0, 0 },
1222 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001223 /* sound path (5 sources):
1224 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1225 0= ext. Audio IN
1226 1= from MUX2
1227 2= Mono TV sound from Tuner
1228 3= not connected
1229 MUX2 (mask 0x30000):
1230 0,2,3= from MSP34xx
1231 1= FM stereo Radio from Tuner */
1232 .needs_tvaudio = 0,
1233 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001234 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001235 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001236 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001237 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001238 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001239 /* Claas Langbehn <claas@bigfoot.com>,
1240 Sven Grothklags <sven@upb.de> */
1241 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1242 .video_inputs = 4,
1243 .audio_inputs = 3,
1244 .tuner = 0,
1245 .svhs = 2,
1246 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001247 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001248 .gpiomux = { 0, 0, 0x10, 8 },
1249 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001250 .needs_tvaudio = 1,
1251 .pll = PLL_28,
1252 .tuner_type = TUNER_PHILIPS_PAL,
1253 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001254 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001255 .has_radio = 1,
1256 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001257 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001258 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001259 in de.comp.os.unix.linux.hardware:
1260 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001261 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001262 options tuner type=5 */
1263 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1264 .video_inputs = 4,
1265 .audio_inputs = 1,
1266 .tuner = 0,
1267 .svhs = 2,
1268 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001269 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001270 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1271 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001272 /* For cards with tda9820/tda9821:
1273 0x0000: Tuner normal stereo
1274 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1275 0x0880: Tuner A2 stereo */
1276 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001277 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001278 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001279 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001280 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001281 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001282 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1283 old Easy TV BT848 version (model CPH031) */
1284 .name = "Askey CPH031/ BESTBUY Easy TV",
1285 .video_inputs = 4,
1286 .audio_inputs = 1,
1287 .tuner = 0,
1288 .svhs = 2,
1289 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001290 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001291 .gpiomux = { 2, 0, 0, 0 },
1292 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001293 .needs_tvaudio = 0,
1294 .pll = PLL_28,
1295 .tuner_type = TUNER_TEMIC_PAL,
1296 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001297 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001298 },
1299
1300 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001301 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001302 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1303 .name = "Lifeview FlyVideo 98FM LR50",
1304 .video_inputs = 4,
1305 .audio_inputs = 3,
1306 .tuner = 0,
1307 .svhs = 2,
1308 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001309 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001310 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1311 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001312 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001313 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001314 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001315 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001316 },
1317 /* This is the ultimate cheapo capture card
1318 * just a BT848A on a small PCB!
1319 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001320 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001321 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1322 .video_inputs = 2,
1323 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001324 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001325 .svhs = 1,
1326 .gpiomask = 0,
1327 .muxsel = { 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001328 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001329 .needs_tvaudio = 0,
1330 .no_msp34xx = 1,
1331 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001332 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001333 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001334 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001335 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001336 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001337 /* Daniel Herrington <daniel.herrington@home.com> */
1338 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1339 .video_inputs = 3,
1340 .audio_inputs = 1,
1341 .tuner = 0,
1342 .svhs = 2,
1343 .gpiomask = 0xe00,
1344 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001345 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1346 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001347 .needs_tvaudio = 1,
1348 .pll = PLL_28,
1349 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1350 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001351 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001352 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001353 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001354 /* Matti Mottus <mottus@physic.ut.ee> */
1355 .name = "Askey CPH03x TV Capturer",
1356 .video_inputs = 4,
1357 .audio_inputs = 1,
1358 .tuner = 0,
1359 .svhs = 2,
1360 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001361 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001362 .gpiomux = { 2, 0, 0, 0 },
1363 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001364 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001365 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001366 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001367 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 },
1369
1370 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001371 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001372 /* Philip Blundell <philb@gnu.org> */
1373 .name = "Modular Technology MM100PCTV",
1374 .video_inputs = 2,
1375 .audio_inputs = 2,
1376 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001377 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001378 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001379 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001380 .gpiomux = { 2, 0, 0, 1 },
1381 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001382 .pll = PLL_35,
1383 .tuner_type = TUNER_TEMIC_PAL,
1384 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001385 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001386 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001387 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001388 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001389 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001390 .video_inputs = 2,
1391 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001392 .tuner = UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001393 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001394 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001395 .muxsel = { 2, 2 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001396 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001397 .no_msp34xx = 1,
1398 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001399 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001400 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001401 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001402 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001403 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001404 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001405 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1406 new Easy TV BT878 version (model CPH061)
1407 special thanks to Informatica Mieres for providing the card */
1408 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1409 .video_inputs = 3,
1410 .audio_inputs = 2,
1411 .tuner = 0,
1412 .svhs = 2,
1413 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001414 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001415 .gpiomux = { 1, 0, 4, 4 },
1416 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001417 .needs_tvaudio = 0,
1418 .pll = PLL_28,
1419 .tuner_type = TUNER_PHILIPS_PAL,
1420 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001421 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001422 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001423 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001424 /* Lukas Gebauer <geby@volny.cz> */
1425 .name = "ATI TV-Wonder",
1426 .video_inputs = 3,
1427 .audio_inputs = 1,
1428 .tuner = 0,
1429 .svhs = 2,
1430 .gpiomask = 0xf03f,
1431 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001432 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1433 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001434 .pll = PLL_28,
1435 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1436 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001437 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001438 },
1439
1440 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001441 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001442 /* Lukas Gebauer <geby@volny.cz> */
1443 .name = "ATI TV-Wonder VE",
1444 .video_inputs = 2,
1445 .audio_inputs = 1,
1446 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001447 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001448 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001449 .muxsel = { 2, 3, 0, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001450 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001451 .no_msp34xx = 1,
1452 .pll = PLL_28,
1453 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1454 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001455 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001456 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001457 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001458 /* DeeJay <deejay@westel900.net (2000S) */
1459 .name = "Lifeview FlyVideo 2000S LR90",
1460 .video_inputs = 3,
1461 .audio_inputs = 3,
1462 .tuner = 0,
1463 .svhs = 2,
1464 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001465 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001466 /* Radio changed from 1e80 to 0x800 to make
1467 FlyVideo2000S in .hu happy (gm)*/
1468 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001469 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1470 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001471 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 .no_msp34xx = 1,
1473 .no_tda9875 = 1,
1474 .needs_tvaudio = 1,
1475 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001476 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001478 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001479 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001480 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001481 .name = "Terratec TValueRadio",
1482 .video_inputs = 3,
1483 .audio_inputs = 1,
1484 .tuner = 0,
1485 .svhs = 2,
1486 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001487 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001488 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1489 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001490 .needs_tvaudio = 1,
1491 .pll = PLL_28,
1492 .tuner_type = TUNER_PHILIPS_PAL,
1493 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001494 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001495 .has_radio = 1,
1496 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001497 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001498 /* TANAKA Kei <peg00625@nifty.com> */
1499 .name = "IODATA GV-BCTV4/PCI",
1500 .video_inputs = 3,
1501 .audio_inputs = 1,
1502 .tuner = 0,
1503 .svhs = 2,
1504 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001505 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001506 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001507 .no_msp34xx = 1,
1508 .pll = PLL_28,
1509 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1510 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001511 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001512 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001513 },
1514
1515 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001516 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001517 .name = "3Dfx VoodooTV FM (Euro)",
1518 /* try "insmod msp3400 simple=0" if you have
1519 * sound problems with this card. */
1520 .video_inputs = 4,
1521 .audio_inputs = 1,
1522 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001523 .svhs = UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001524 .gpiomask = 0x4f8a00,
1525 /* 0x100000: 1=MSP enabled (0=disable again)
1526 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1527 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1528 .gpiomute = 0x947fff,
1529 /* tvtuner, radio, external,internal, mute, stereo
1530 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1531 .muxsel = { 2, 3 ,0 ,1 },
1532 .tuner_type = TUNER_MT2032,
1533 .tuner_addr = ADDR_UNSET,
1534 .radio_addr = ADDR_UNSET,
1535 .pll = PLL_28,
1536 .has_radio = 1,
1537 },
1538 [BTTV_BOARD_VOODOOTV_200] = {
1539 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001540 /* try "insmod msp3400 simple=0" if you have
1541 * sound problems with this card. */
1542 .video_inputs = 4,
1543 .audio_inputs = 1,
1544 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001545 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001546 .gpiomask = 0x4f8a00,
1547 /* 0x100000: 1=MSP enabled (0=disable again)
1548 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001549 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1550 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001551 /* tvtuner, radio, external,internal, mute, stereo
1552 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001553 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001554 .tuner_type = TUNER_MT2032,
1555 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001556 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001557 .pll = PLL_28,
1558 .has_radio = 1,
1559 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001560 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001561 /* Philip Blundell <pb@nexus.co.uk> */
1562 .name = "Active Imaging AIMMS",
1563 .video_inputs = 1,
1564 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001565 .tuner = UNSET,
1566 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001568 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001569 .pll = PLL_28,
1570 .muxsel = { 2 },
1571 .gpiomask = 0
1572 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001573 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001574 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1575 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1576 .video_inputs = 3,
1577 .audio_inputs = 4,
1578 .tuner = 0,
1579 .svhs = 2,
1580 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001581 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001582 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1583 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001584 .needs_tvaudio = 1,
1585 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001586 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001587 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001588 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001589 .has_remote = 1,
1590 /* GPIO wiring:
1591 GPIO0: U4.A0 (hef4052bt)
1592 GPIO1: U4.A1
1593 GPIO2: U4.A1 (second hef4052bt)
1594 GPIO3: U4.nEN, U5.A0, A5.nEN
1595 GPIO8-15: vrd866b ?
1596 */
1597 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001598 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001599 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1600 .video_inputs = 4,
1601 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001602 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001603 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001604 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001605 .pll = PLL_28,
1606 .no_msp34xx = 1,
1607 .tuner_type = UNSET,
1608 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001609 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001610 },
1611
1612 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001613 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001614 /* Dariusz Kowalewski <darekk@automex.pl> */
1615 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1616 .video_inputs = 4,
1617 .audio_inputs = 1,
1618 .tuner = 0,
1619 .svhs = 2,
1620 .gpiomask = 0x3f,
1621 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001622 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1623 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001624 .needs_tvaudio = 1,
1625 .no_msp34xx = 1,
1626 .no_tda9875 = 1,
1627 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001628 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001629 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001630 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001631 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001632 .has_radio = 1, /* Note: not all cards have radio */
1633 .has_remote = 1,
1634 /* GPIO wiring:
1635 GPIO0: A0 hef4052
1636 GPIO1: A1 hef4052
1637 GPIO3: nEN hef4052
1638 GPIO8-15: vrd866b
1639 GPIO20,22,23: R30,R29,R28
1640 */
1641 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001642 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001643 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1644 /* you must jumper JP5 for the card to work */
1645 .name = "Sensoray 311",
1646 .video_inputs = 5,
1647 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001648 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001649 .svhs = 4,
1650 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001651 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001652 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001654 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001655 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001656 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001657 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001658 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001659 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1660 .name = "RemoteVision MX (RV605)",
1661 .video_inputs = 16,
1662 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001663 .tuner = UNSET,
1664 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001665 .gpiomask = 0x00,
1666 .gpiomask2 = 0x07ff,
1667 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1668 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1669 .no_msp34xx = 1,
1670 .no_tda9875 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001671 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001672 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001673 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001674 .muxsel_hook = rv605_muxsel,
1675 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001676 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1678 .video_inputs = 3,
1679 .audio_inputs = 2,
1680 .tuner = 0,
1681 .svhs = 2,
1682 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1683 .muxsel = { 2, 1, 1, },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001684 .gpiomux = { 0, 1, 2, 2 },
1685 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001686 .needs_tvaudio = 0,
1687 .tuner_type = TUNER_PHILIPS_PAL,
1688 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001689 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001690 .pll = PLL_28,
1691 .has_radio = 1,
1692 },
1693
1694 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001695 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001696 /* Masaki Suzuki <masaki@btree.org> */
1697 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1698 .video_inputs = 3,
1699 .audio_inputs = 1,
1700 .tuner = 0,
1701 .svhs = 2,
1702 .gpiomask = 0x140007,
1703 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001704 .gpiomux = { 0, 1, 2, 3 },
1705 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001706 .tuner_type = TUNER_PHILIPS_NTSC,
1707 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001708 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001709 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001710 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001711 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001712 .name = "GrandTec Multi Capture Card (Bt878)",
1713 .video_inputs = 4,
1714 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001715 .tuner = UNSET,
1716 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .gpiomask = 0,
1718 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001719 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001720 .needs_tvaudio = 0,
1721 .no_msp34xx = 1,
1722 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001723 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001725 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001726 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001727 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001728 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1729 .video_inputs = 4,
1730 .audio_inputs = 3,
1731 .tuner = 0,
1732 .svhs = 2,
1733 .gpiomask = 7,
1734 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001735 .gpiomux = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001736 * This card lacks external Audio In, so we mute it on Ext. & Int.
1737 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1738 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001739 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001740 * btwincap uses 0x80000/0x80003
1741 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001742 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001743 .needs_tvaudio = 0,
1744 .no_msp34xx = 1,
1745 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001746 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001747 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001748 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001749 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1750 radio signal strength indicators work fine. */
1751 .has_radio = 1,
1752 /* GPIO Info:
1753 GPIO0,1: HEF4052 A0,A1
1754 GPIO2: HEF4052 nENABLE
1755 GPIO3-7: n.c.
1756 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1757 GPIO14,15: ??
1758 GPIO16-21: n.c.
1759 GPIO22,23: ??
1760 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1761 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001762 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001763 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1764 .name = "DSP Design TCVIDEO",
1765 .video_inputs = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001766 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02001767 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001768 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001769 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001770 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001771 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 },
1773
1774 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001775 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001776 .name = "Hauppauge WinTV PVR",
1777 .video_inputs = 4,
1778 .audio_inputs = 1,
1779 .tuner = 0,
1780 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001781 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001782 .needs_tvaudio = 1,
1783 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001784 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001785 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001786 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787
1788 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001789 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001790 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001791 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001792 .name = "IODATA GV-BCTV5/PCI",
1793 .video_inputs = 3,
1794 .audio_inputs = 1,
1795 .tuner = 0,
1796 .svhs = 2,
1797 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001798 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001799 .gpiomux = {0x030000, 0x010000, 0, 0 },
1800 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001801 .no_msp34xx = 1,
1802 .pll = PLL_28,
1803 .tuner_type = TUNER_PHILIPS_NTSC_M,
1804 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001805 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001806 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001807 .has_radio = 1,
1808 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001809 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001810 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1811 .video_inputs = 4, /* id-inputs-clock */
1812 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001813 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001814 .svhs = 3,
1815 .muxsel = { 3, 2, 0, 1 },
1816 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001817 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001818 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001819 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001820 .no_msp34xx = 1,
1821 .no_tda9875 = 1,
1822 .no_tda7432 = 1,
1823 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001824 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001825 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1826 .video_inputs = 3,
1827 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001828 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001829 .svhs = 2,
1830 .muxsel = { 2, 3, 1 },
1831 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001832 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001833 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001834 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001835 .no_msp34xx = 1,
1836 .no_tda9875 = 1,
1837 .no_tda7432 = 1,
1838 },
1839
1840 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001841 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001842 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1843 .video_inputs = 2,
1844 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001845 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001846 .svhs = 1,
1847 .muxsel = { 3, 1 },
1848 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001849 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001850 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001851 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001852 .no_msp34xx = 1,
1853 .no_tda9875 = 1,
1854 .no_tda7432 = 1,
1855 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001856 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001857 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1858 .video_inputs = 1,
1859 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001860 .tuner = UNSET,
1861 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001862 .muxsel = { 0 },
1863 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001864 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001865 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001866 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .no_msp34xx = 1,
1868 .no_tda9875 = 1,
1869 .no_tda7432 = 1,
1870 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001871 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001872 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1873 .video_inputs = 2,
1874 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001875 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001876 .svhs = 1,
1877 .muxsel = { 0, 1 },
1878 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001879 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001881 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001882 .no_msp34xx = 1,
1883 .no_tda9875 = 1,
1884 .no_tda7432 = 1,
1885 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001886 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001887 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1888 .video_inputs = 1,
1889 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001890 .tuner = UNSET,
1891 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001892 .muxsel = { 0 },
1893 .pll = PLL_28,
1894 .tuner_type = UNSET,
1895 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001896 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001897 .no_msp34xx = 1,
1898 .no_tda9875 = 1,
1899 .no_tda7432 = 1,
1900 },
1901
1902 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001903 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001904 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1905 .video_inputs = 2,
1906 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001907 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001908 .svhs = 1,
1909 .muxsel = { 0, 1 },
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,
1917 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001918 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001919 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 .video_inputs = 2,
1921 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001922 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001923 .svhs = 1,
1924 .muxsel = { 2, 3 },
1925 .pll = PLL_28,
1926 .tuner_type = UNSET,
1927 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001928 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 .no_msp34xx = 1,
1930 .no_tda9875 = 1,
1931 .no_tda7432 = 1,
1932 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001933 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001934 .name = "Osprey 500", /* 500 */
1935 .video_inputs = 2,
1936 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001937 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001938 .svhs = 1,
1939 .muxsel = { 2, 3 },
1940 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001941 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001942 .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,
1947 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001948 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001949 .name = "Osprey 540", /* 540 */
1950 .video_inputs = 4,
1951 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001952 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001953 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001954 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001956 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001957 .no_msp34xx = 1,
1958 .no_tda9875 = 1,
1959 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001960 },
1961
1962 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001963 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001964 .name = "Osprey 2000", /* 2000 */
1965 .video_inputs = 2,
1966 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001967 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001968 .svhs = 1,
1969 .muxsel = { 2, 3 },
1970 .pll = PLL_28,
1971 .tuner_type = UNSET,
1972 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001973 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001974 .no_msp34xx = 1,
1975 .no_tda9875 = 1,
1976 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1977 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001978 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001979 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1980 .name = "IDS Eagle",
1981 .video_inputs = 4,
1982 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001983 .tuner = UNSET,
1984 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001985 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001986 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001987 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001988 .gpiomask = 0,
1989 .muxsel = { 0, 1, 2, 3 },
1990 .muxsel_hook = eagle_muxsel,
1991 .no_msp34xx = 1,
1992 .no_tda9875 = 1,
1993 .pll = PLL_28,
1994 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001995 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001996 .name = "Pinnacle PCTV Sat",
1997 .video_inputs = 2,
1998 .audio_inputs = 0,
1999 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002000 .tuner = UNSET,
2001 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002002 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002003 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .no_msp34xx = 1,
2005 .no_tda9875 = 1,
2006 .no_tda7432 = 1,
Mauro Carvalho Chehabd2be8932006-10-02 23:52:48 -03002007 .muxsel = { 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002008 .pll = PLL_28,
2009 .no_gpioirq = 1,
2010 .has_dvb = 1,
2011 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002012 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002013 .name = "Formac ProTV II (bt878)",
2014 .video_inputs = 4,
2015 .audio_inputs = 1,
2016 .tuner = 0,
2017 .svhs = 3,
2018 .gpiomask = 2,
2019 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02002020 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002021 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002022 .pll = PLL_28,
2023 .has_radio = 1,
2024 .tuner_type = TUNER_PHILIPS_PAL,
2025 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002026 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002027 /* sound routing:
2028 GPIO=0x00,0x01,0x03: mute (?)
2029 0x02: both TV and radio (tuner: FM1216/I)
2030 The card has onboard audio connectors labeled "cdrom" and "board",
2031 not soldered here, though unknown wiring.
2032 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002033 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002035
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002036 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002037 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002038 .name = "MachTV",
2039 .video_inputs = 3,
2040 .audio_inputs = 1,
2041 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002042 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 .gpiomask = 7,
2044 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002045 .gpiomux = { 0, 1, 2, 3},
2046 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002047 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002048 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002049 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002050 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08002051 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002052 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002053 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002054 .name = "Euresys Picolo",
2055 .video_inputs = 3,
2056 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002057 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002058 .svhs = 2,
2059 .gpiomask = 0,
2060 .no_msp34xx = 1,
2061 .no_tda9875 = 1,
2062 .no_tda7432 = 1,
2063 .muxsel = { 2, 0, 1},
2064 .pll = PLL_28,
2065 .tuner_type = UNSET,
2066 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002067 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002068 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002069 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002070 /* Luc Van Hoeylandt <luc@e-magic.be> */
2071 .name = "ProVideo PV150", /* 0x4f */
2072 .video_inputs = 2,
2073 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002074 .tuner = UNSET,
2075 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 .gpiomask = 0,
2077 .muxsel = { 2, 3 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002078 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002079 .needs_tvaudio = 0,
2080 .no_msp34xx = 1,
2081 .pll = PLL_28,
2082 .tuner_type = UNSET,
2083 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002084 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002085 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002086 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002087 /* Hiroshi Takekawa <sian@big.or.jp> */
2088 /* This card lacks subsystem ID */
2089 .name = "AD-TVK503", /* 0x63 */
2090 .video_inputs = 4,
2091 .audio_inputs = 1,
2092 .tuner = 0,
2093 .svhs = 2,
2094 .gpiomask = 0x001e8007,
2095 .muxsel = { 2, 3, 1, 0 },
2096 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002097 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2098 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 .needs_tvaudio = 0,
2100 .no_msp34xx = 1,
2101 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002102 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002104 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03002105 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002106 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002107
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002108 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002109 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002110 .name = "Hercules Smart TV Stereo",
2111 .video_inputs = 4,
2112 .audio_inputs = 1,
2113 .tuner = 0,
2114 .svhs = 2,
2115 .gpiomask = 0x00,
2116 .muxsel = { 2, 3, 1, 1 },
2117 .needs_tvaudio = 1,
2118 .no_msp34xx = 1,
2119 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002120 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002121 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002122 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002123 /* Notes:
2124 - card lacks subsystem ID
2125 - stereo variant w/ daughter board with tda9874a @0xb0
2126 - Audio Routing:
2127 always from tda9874 independent of GPIO (?)
2128 external line in: unknown
2129 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2130 hef4053 (instead 4052) for unknown function
2131 */
2132 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002133 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002134 .name = "Pace TV & Radio Card",
2135 .video_inputs = 4,
2136 .audio_inputs = 1,
2137 .tuner = 0,
2138 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002139 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002140 .gpiomask = 0,
2141 .no_tda9875 = 1,
2142 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002143 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002144 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002145 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002146 .has_radio = 1,
2147 .pll = PLL_28,
2148 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2149 only internal line out: (4pin header) RGGL
2150 Radio must be decoded by msp3410d (not routed through)*/
2151 /*
2152 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2153 */
2154 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002155 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002156 /* Chris Willing <chris@vislab.usyd.edu.au> */
2157 .name = "IVC-200",
2158 .video_inputs = 1,
2159 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002160 .tuner = UNSET,
2161 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002162 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002163 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002164 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002165 .gpiomask = 0xdf,
2166 .muxsel = { 2 },
2167 .pll = PLL_28,
2168 },
Douglas Kosovicade08152009-01-22 23:07:26 -03002169 [BTTV_BOARD_IVCE8784] = {
2170 .name = "IVCE-8784",
2171 .video_inputs = 1,
2172 .audio_inputs = 0,
2173 .tuner = UNSET,
2174 .tuner_type = UNSET,
2175 .tuner_addr = ADDR_UNSET,
2176 .radio_addr = ADDR_UNSET,
2177 .svhs = UNSET,
2178 .gpiomask = 0xdf,
2179 .muxsel = { 2 },
2180 .pll = PLL_28,
2181 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002182 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002183 .name = "Grand X-Guard / Trust 814PCI",
2184 .video_inputs = 16,
2185 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002186 .tuner = UNSET,
2187 .svhs = UNSET,
2188 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002189 .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 .gpiomask2 = 0xff,
2192 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2193 .muxsel_hook = xguard_muxsel,
2194 .no_msp34xx = 1,
2195 .no_tda9875 = 1,
2196 .no_tda7432 = 1,
2197 .pll = PLL_28,
2198 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002199
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002200 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002201 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002202 .name = "Nebula Electronics DigiTV",
2203 .video_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002204 .tuner = UNSET,
2205 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002206 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002207 .no_msp34xx = 1,
2208 .no_tda9875 = 1,
2209 .no_tda7432 = 1,
2210 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002211 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002212 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002213 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002214 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002215 .has_remote = 1,
2216 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002217 .no_gpioirq = 1,
2218 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002219 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002220 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2221 .name = "ProVideo PV143",
2222 .video_inputs = 4,
2223 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002224 .tuner = UNSET,
2225 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002226 .gpiomask = 0,
2227 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002228 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 .needs_tvaudio = 0,
2230 .no_msp34xx = 1,
2231 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002232 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002233 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002234 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002235 },
Dirk Heer05583622008-11-21 19:00:55 -03002236 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002237 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002238 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002239 .video_inputs = 4,
2240 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002241 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002242 .svhs = 3,
2243 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002244 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002245 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002246 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002247 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002248 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002249 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002250 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002251 },
Dirk Heer05583622008-11-21 19:00:55 -03002252 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2253 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002254 .video_inputs = 4,
2255 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002256 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002257 .svhs = 3,
2258 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002259 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002260 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002261 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002262 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002263 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002265 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002266 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002267
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002268 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002269 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002270 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2271 .video_inputs = 10,
2272 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002273 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002274 .svhs = 9,
2275 .gpiomask = 0x00,
2276 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2277 via the upper nibble of muxsel. here: used for
2278 xternal video-mux */
2279 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002280 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002281 .needs_tvaudio = 1,
2282 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002283 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002284 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002285 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002286 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002287 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002288 .name = "PHYTEC VD-009 Combi (bt878)",
2289 .video_inputs = 10,
2290 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002291 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .svhs = 9,
2293 .gpiomask = 0x00,
2294 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2295 via the upper nibble of muxsel. here: used for
2296 xternal video-mux */
2297 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002298 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002299 .needs_tvaudio = 1,
2300 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002301 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002302 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002303 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002304 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002305 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 .name = "IVC-100",
2307 .video_inputs = 4,
2308 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002309 .tuner = UNSET,
2310 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002311 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002312 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002313 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002314 .gpiomask = 0xdf,
2315 .muxsel = { 2, 3, 1, 0 },
2316 .pll = PLL_28,
2317 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002318 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002319 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2320 .name = "IVC-120G",
2321 .video_inputs = 16,
2322 .audio_inputs = 0, /* card has no audio */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002323 .tuner = UNSET, /* card has no tuner */
2324 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002325 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002326 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002327 .svhs = UNSET, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002328 .needs_tvaudio = 0,
2329 .no_msp34xx = 1,
2330 .no_tda9875 = 1,
2331 .no_tda7432 = 1,
2332 .gpiomask = 0x00,
2333 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2334 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2335 .muxsel_hook = ivc120_muxsel,
2336 .pll = PLL_28,
2337 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002338
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002339 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002340 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002341 .name = "pcHDTV HD-2000 TV",
2342 .video_inputs = 4,
2343 .audio_inputs = 1,
2344 .tuner = 0,
2345 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002346 .muxsel = { 2, 3, 1, 0 },
Michael Krufkyab8b8702008-04-22 14:46:05 -03002347 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002348 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002349 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002350 .has_dvb = 1,
2351 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002352 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002353 .name = "Twinhan DST + clones",
2354 .no_msp34xx = 1,
2355 .no_tda9875 = 1,
2356 .no_tda7432 = 1,
2357 .tuner_type = TUNER_ABSENT,
2358 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002359 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002360 .no_video = 1,
2361 .has_dvb = 1,
2362 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002363 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002364 .name = "Winfast VC100",
2365 .video_inputs = 3,
2366 .audio_inputs = 0,
2367 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002368 .tuner = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002369 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 .no_msp34xx = 1,
2371 .no_tda9875 = 1,
2372 .no_tda7432 = 1,
2373 .tuner_type = TUNER_ABSENT,
2374 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002375 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002376 .pll = PLL_28,
2377 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002378 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 .name = "Teppro TEV-560/InterVision IV-560",
2380 .video_inputs = 3,
2381 .audio_inputs = 1,
2382 .tuner = 0,
2383 .svhs = 2,
2384 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002385 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002386 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002387 .needs_tvaudio = 1,
2388 .tuner_type = TUNER_PHILIPS_PAL,
2389 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002390 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002391 .pll = PLL_35,
2392 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002393
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002394 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002395 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002396 .name = "SIMUS GVC1100",
2397 .video_inputs = 4,
2398 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002399 .tuner = UNSET,
2400 .svhs = UNSET,
2401 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002402 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002403 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002405 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 .gpiomask = 0x3F,
2407 .muxsel_hook = gvc1100_muxsel,
2408 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002409 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002410 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2411 .name = "NGS NGSTV+",
2412 .video_inputs = 3,
2413 .tuner = 0,
2414 .svhs = 2,
2415 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002416 .muxsel = { 2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002417 .gpiomux = { 0, 0, 0, 0 },
2418 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002419 .pll = PLL_28,
2420 .tuner_type = TUNER_PHILIPS_PAL,
2421 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002422 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002423 .has_remote = 1,
2424 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002425 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002426 /* http://linuxmedialabs.com */
2427 .name = "LMLBT4",
2428 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2429 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002430 .tuner = UNSET,
2431 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002432 .muxsel = { 2, 3, 1, 0 },
2433 .no_msp34xx = 1,
2434 .no_tda9875 = 1,
2435 .no_tda7432 = 1,
2436 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002437 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002438 .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 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002441 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002442 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2443 .name = "Tekram M205 PRO",
2444 .video_inputs = 3,
2445 .audio_inputs = 1,
2446 .tuner = 0,
2447 .tuner_type = TUNER_PHILIPS_PAL,
2448 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002449 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002450 .svhs = 2,
2451 .needs_tvaudio = 0,
2452 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002453 .muxsel = { 2, 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002454 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002455 .pll = PLL_28,
2456 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002457
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002458 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002459 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002460 /* Javier Cendan Ares <jcendan@lycos.es> */
2461 /* bt878 TV + FM without subsystem ID */
2462 .name = "Conceptronic CONTVFMi",
2463 .video_inputs = 3,
2464 .audio_inputs = 1,
2465 .tuner = 0,
2466 .svhs = 2,
2467 .gpiomask = 0x008007,
2468 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002469 .gpiomux = { 0, 1, 2, 2 },
2470 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002471 .needs_tvaudio = 0,
2472 .pll = PLL_28,
2473 .tuner_type = TUNER_PHILIPS_PAL,
2474 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002475 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002476 .has_remote = 1,
2477 .has_radio = 1,
2478 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002479 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002480 /*Eric DEBIEF <debief@telemsa.com>*/
2481 /*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 -08002482 /* 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 -08002483 /*0x79 in bttv.h*/
2484 .name = "Euresys Picolo Tetra",
2485 .video_inputs = 4,
2486 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002487 .tuner = UNSET,
2488 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002489 .gpiomask = 0,
2490 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2491 .no_msp34xx = 1,
2492 .no_tda9875 = 1,
2493 .no_tda7432 = 1,
2494 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002495 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002496 .pll = PLL_28,
2497 .needs_tvaudio = 0,
2498 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002499 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002500 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002501 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002502 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002503 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002504 /* Spirit TV Tuner from http://spiritmodems.com.au */
2505 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2506 .name = "Spirit TV Tuner",
2507 .video_inputs = 3,
2508 .audio_inputs = 1,
2509 .tuner = 0,
2510 .svhs = 2,
2511 .gpiomask = 0x0000000f,
2512 .muxsel = { 2, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002513 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002514 .tuner_type = TUNER_TEMIC_PAL,
2515 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002516 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002517 .no_msp34xx = 1,
2518 .no_tda9875 = 1,
2519 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002520 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002521 /* Wolfram Joost <wojo@frokaschwei.de> */
2522 .name = "AVerMedia AVerTV DVB-T 771",
2523 .video_inputs = 2,
2524 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002525 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002526 .tuner_type = TUNER_ABSENT,
2527 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002528 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002529 .muxsel = { 3 , 3 },
2530 .no_msp34xx = 1,
2531 .no_tda9875 = 1,
2532 .no_tda7432 = 1,
2533 .pll = PLL_28,
2534 .has_dvb = 1,
2535 .no_gpioirq = 1,
2536 .has_remote = 1,
2537 },
2538 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002539 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002540 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002541 /* 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 -08002542 .name = "AverMedia AverTV DVB-T 761",
2543 .video_inputs = 2,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002544 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002545 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002546 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002547 .no_msp34xx = 1,
2548 .no_tda9875 = 1,
2549 .no_tda7432 = 1,
2550 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002551 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002552 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002553 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002554 .has_dvb = 1,
2555 .no_gpioirq = 1,
2556 .has_remote = 1,
2557 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002558 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002559 /* andre.schwarz@matrix-vision.de */
2560 .name = "MATRIX Vision Sigma-SQ",
2561 .video_inputs = 16,
2562 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002563 .tuner = UNSET,
2564 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002565 .gpiomask = 0x0,
2566 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2567 3, 3, 3, 3, 3, 3, 3, 3 },
2568 .muxsel_hook = sigmaSQ_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002569 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002570 .no_msp34xx = 1,
2571 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002572 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002573 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002574 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002575 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002576 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002577 /* andre.schwarz@matrix-vision.de */
2578 .name = "MATRIX Vision Sigma-SLC",
2579 .video_inputs = 4,
2580 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002581 .tuner = UNSET,
2582 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002583 .gpiomask = 0x0,
2584 .muxsel = { 2, 2, 2, 2 },
2585 .muxsel_hook = sigmaSLC_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002586 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002587 .no_msp34xx = 1,
2588 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002589 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002590 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002591 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002592 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002593 /* BTTV_BOARD_APAC_VIEWCOMP */
2594 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002595 /* Attila Kondoros <attila.kondoros@chello.hu> */
2596 /* bt878 TV + FM 0x00000000 subsystem ID */
2597 .name = "APAC Viewcomp 878(AMAX)",
2598 .video_inputs = 2,
2599 .audio_inputs = 1,
2600 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002601 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002602 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002603 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002604 .gpiomux = { 2, 0, 0, 0 },
2605 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002606 .needs_tvaudio = 0,
2607 .pll = PLL_28,
2608 .tuner_type = TUNER_PHILIPS_PAL,
2609 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002610 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002611 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2612 .has_radio = 1, /* not every card has radio */
2613 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002614
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002615 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002616 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002617 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2618 .name = "DViCO FusionHDTV DVB-T Lite",
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002619 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002620 .no_msp34xx = 1,
2621 .no_tda9875 = 1,
2622 .no_tda7432 = 1,
2623 .pll = PLL_28,
2624 .no_video = 1,
2625 .has_dvb = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002626 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002627 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002628 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002629 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002630 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002631 /* Steven <photon38@pchome.com.tw> */
2632 .name = "V-Gear MyVCD",
2633 .video_inputs = 3,
2634 .audio_inputs = 1,
2635 .tuner = 0,
2636 .svhs = 2,
2637 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002638 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002639 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2640 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002641 .no_msp34xx = 1,
2642 .pll = PLL_28,
2643 .tuner_type = TUNER_PHILIPS_NTSC_M,
2644 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002645 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002646 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002647 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002648 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002649 /* Rick C <cryptdragoon@gmail.com> */
2650 .name = "Super TV Tuner",
2651 .video_inputs = 4,
2652 .audio_inputs = 1,
2653 .tuner = 0,
2654 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002655 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002656 .tuner_type = TUNER_PHILIPS_NTSC,
2657 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002658 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002659 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002660 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002661 .needs_tvaudio = 1,
2662 .has_radio = 1,
2663 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002664 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002665 /* Chris Fanning <video4linux@haydon.net> */
2666 .name = "Tibet Systems 'Progress DVR' CS16",
2667 .video_inputs = 16,
2668 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002669 .tuner = UNSET,
2670 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002671 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2672 .pll = PLL_28,
2673 .no_msp34xx = 1,
2674 .no_tda9875 = 1,
2675 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002676 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002677 .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 .muxsel_hook = tibetCS16_muxsel,
2680 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002681 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002682 /* Bill Brack <wbrack@mmm.com.hk> */
2683 /*
2684 * Note that, because of the card's wiring, the "master"
2685 * BT878A chip (i.e. the one which controls the analog switch
2686 * and must use this card type) is the 2nd one detected. The
2687 * other 3 chips should use card type 0x85, whose description
2688 * follows this one. There is a EEPROM on the card (which is
2689 * connected to the I2C of one of those other chips), but is
2690 * not currently handled. There is also a facility for a
2691 * "monitor", which is also not currently implemented.
2692 */
2693 .name = "Kodicom 4400R (master)",
2694 .video_inputs = 16,
2695 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002696 .tuner = UNSET,
2697 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002698 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002699 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002700 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002701 /* GPIO bits 0-9 used for analog switch:
2702 * 00 - 03: camera selector
2703 * 04 - 06: channel (controller) selector
2704 * 07: data (1->on, 0->off)
2705 * 08: strobe
2706 * 09: reset
2707 * bit 16 is input from sync separator for the channel
2708 */
2709 .gpiomask = 0x0003ff,
2710 .no_gpioirq = 1,
2711 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2712 .pll = PLL_28,
2713 .no_msp34xx = 1,
2714 .no_tda7432 = 1,
2715 .no_tda9875 = 1,
2716 .muxsel_hook = kodicom4400r_muxsel,
2717 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002718 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002719 /* Bill Brack <wbrack@mmm.com.hk> */
2720 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2721 * one which controls the analog switch, and must use the card type)
2722 * is the 2nd one detected. The other 3 chips should use this card
2723 * type
2724 */
2725 .name = "Kodicom 4400R (slave)",
2726 .video_inputs = 16,
2727 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002728 .tuner = UNSET,
2729 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002730 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002731 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002732 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002733 .gpiomask = 0x010000,
2734 .no_gpioirq = 1,
2735 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2736 .pll = PLL_28,
2737 .no_msp34xx = 1,
2738 .no_tda7432 = 1,
2739 .no_tda9875 = 1,
2740 .muxsel_hook = kodicom4400r_muxsel,
2741 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002742 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002743 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002744 /* Michael Henson <mhenson@clarityvi.com> */
2745 /* Adlink RTV24 with special unlock codes */
2746 .name = "Adlink RTV24",
2747 .video_inputs = 4,
2748 .audio_inputs = 1,
2749 .tuner = 0,
2750 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002751 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002752 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002753 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002754 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002755 .pll = PLL_28,
2756 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002757 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002758 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002759 /* Michael Krufky <mkrufky@m1k.net> */
2760 .name = "DViCO FusionHDTV 5 Lite",
2761 .tuner = 0,
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002762 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002763 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002764 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002765 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002766 .audio_inputs = 1,
2767 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002768 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002769 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002770 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2771 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002772 .no_msp34xx = 1,
2773 .no_tda9875 = 1,
2774 .no_tda7432 = 1,
2775 .has_dvb = 1,
2776 },
2777 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002778 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002779 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002780 .name = "Acorp Y878F",
2781 .video_inputs = 3,
2782 .audio_inputs = 1,
2783 .tuner = 0,
2784 .svhs = 2,
2785 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002786 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002787 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2788 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002789 .needs_tvaudio = 1,
2790 .pll = PLL_28,
2791 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2792 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002793 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002794 .has_radio = 1,
2795 },
2796 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002797 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002798 .name = "Conceptronic CTVFMi v2",
2799 .video_inputs = 3,
2800 .audio_inputs = 1,
2801 .tuner = 0,
2802 .svhs = 2,
2803 .gpiomask = 0x001c0007,
2804 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002805 .gpiomux = { 0, 1, 2, 2 },
2806 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002807 .needs_tvaudio = 0,
2808 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002809 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002810 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002811 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002812 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002813 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002814 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002815 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002816 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002817 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2818 .video_inputs = 5,
2819 .audio_inputs = 1,
2820 .tuner = 0,
2821 .svhs = 3,
2822 .gpiomask = 0x01fe00,
2823 .muxsel = { 2,3,1,1,-1 },
2824 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002825 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2826 .gpiomute = 0x12400,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002827 .no_msp34xx = 1,
2828 .pll = PLL_28,
2829 .tuner_type = TUNER_LG_PAL_FM,
2830 .tuner_addr = ADDR_UNSET,
2831 .radio_addr = ADDR_UNSET,
2832 .has_remote = 1,
2833 },
2834 /* ---- card 0x8b ---------------------------------- */
2835 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002836 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002837 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2838 .video_inputs = 3,
2839 .audio_inputs = 1,
2840 .tuner = 0,
2841 .svhs = 2,
2842 .gpiomask = 0x3f,
2843 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002844 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2845 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002846 .no_msp34xx = 1,
2847 .pll = PLL_28,
2848 .tuner_type = TUNER_YMEC_TVF_5533MF,
2849 .tuner_addr = ADDR_UNSET,
2850 .radio_addr = ADDR_UNSET,
2851 .has_radio = 1,
2852 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002853 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002854 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002855 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2856 one external BNC composite input (mux 2)
2857 three internal composite inputs (unknown muxes)
2858 an 18-bit stereo A/D (CS5331A), which has:
2859 one external stereo unblanced (RCA) audio connection
2860 one (or 3?) internal stereo balanced (XLR) audio connection
2861 input is selected via gpio to a 14052B mux
2862 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2863 gain is controlled via an X9221A chip on the I2C bus @0x28
2864 sample rate is controlled via gpio to an MK1413S
2865 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2866 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002867 [BTTV_BOARD_OSPREY440] = {
2868 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002869 .video_inputs = 4,
2870 .audio_inputs = 2, /* this is meaningless */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002871 .tuner = UNSET,
Trent Piephocf784d52007-07-21 21:26:40 -03002872 .svhs = UNSET,
2873 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2874 .gpiomask = 0x303,
2875 .gpiomute = 0x000, /* int + 32kHz */
2876 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002877 .pll = PLL_28,
2878 .tuner_type = UNSET,
2879 .tuner_addr = ADDR_UNSET,
2880 .radio_addr = ADDR_UNSET,
2881 .no_msp34xx = 1,
2882 .no_tda9875 = 1,
2883 .no_tda7432 = 1,
2884 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002885 /* ---- card 0x8d ---------------------------------- */
2886 [BTTV_BOARD_ASOUND_SKYEYE] = {
2887 .name = "Asound Skyeye PCTV",
2888 .video_inputs = 3,
2889 .audio_inputs = 1,
2890 .tuner = 0,
2891 .svhs = 2,
2892 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002893 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002894 .gpiomux = { 2, 0, 0, 0 },
2895 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002896 .needs_tvaudio = 1,
2897 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002898 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002899 .tuner_addr = ADDR_UNSET,
2900 .radio_addr = ADDR_UNSET,
2901 },
Bill Pechter633323f2005-11-13 16:07:50 -08002902 /* ---- card 0x8e ---------------------------------- */
2903 [BTTV_BOARD_SABRENT_TVFM] = {
2904 .name = "Sabrent TV-FM (bttv version)",
2905 .video_inputs = 3,
2906 .audio_inputs = 1,
2907 .tuner = 0,
2908 .svhs = 2,
2909 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002910 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002911 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002912 .no_msp34xx = 1,
2913 .no_tda9875 = 1,
2914 .no_tda7432 = 1,
2915 .pll = PLL_28,
2916 .tuner_type = TUNER_TNF_5335MF,
2917 .tuner_addr = ADDR_UNSET,
2918 .has_radio = 1,
2919 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002920 /* ---- card 0x8f ---------------------------------- */
2921 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2922 .name = "Hauppauge ImpactVCB (bt878)",
2923 .video_inputs = 4,
2924 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002925 .tuner = UNSET,
2926 .svhs = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002927 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002928 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002929 .no_msp34xx = 1,
2930 .no_tda9875 = 1,
2931 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002932 .tuner_type = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002933 .tuner_addr = ADDR_UNSET,
2934 .radio_addr = ADDR_UNSET,
2935 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002936 [BTTV_BOARD_MACHTV_MAGICTV] = {
2937 /* Julian Calaby <julian.calaby@gmail.com>
2938 * Slightly different from original MachTV definition (0x60)
2939
2940 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2941 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2942 * properly (methinks) causing no keyup bits being set */
2943
2944 .name = "MagicTV", /* rebranded MachTV */
2945 .video_inputs = 3,
2946 .audio_inputs = 1,
2947 .tuner = 0,
2948 .svhs = 2,
2949 .gpiomask = 7,
2950 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002951 .gpiomux = { 0, 1, 2, 3 },
2952 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002953 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2954 .tuner_addr = ADDR_UNSET,
2955 .radio_addr = ADDR_UNSET,
2956 .pll = PLL_28,
2957 .has_radio = 1,
2958 .has_remote = 1,
2959 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002960 [BTTV_BOARD_SSAI_SECURITY] = {
2961 .name = "SSAI Security Video Interface",
2962 .video_inputs = 4,
2963 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002964 .tuner = UNSET,
2965 .svhs = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002966 .muxsel = { 0, 1, 2, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002967 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002968 .tuner_addr = ADDR_UNSET,
2969 .radio_addr = ADDR_UNSET,
2970 },
2971 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2972 .name = "SSAI Ultrasound Video Interface",
2973 .video_inputs = 2,
2974 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002975 .tuner = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002976 .svhs = 1,
2977 .muxsel = { 2, 0, 1, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002978 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002979 .tuner_addr = ADDR_UNSET,
2980 .radio_addr = ADDR_UNSET,
2981 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002982 /* ---- card 0x94---------------------------------- */
2983 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2984 .name = "DViCO FusionHDTV 2",
2985 .tuner = 0,
Michael Krufkyab8b8702008-04-22 14:46:05 -03002986 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002987 .tuner_addr = ADDR_UNSET,
2988 .radio_addr = ADDR_UNSET,
2989 .video_inputs = 3,
2990 .audio_inputs = 1,
2991 .svhs = 2,
2992 .muxsel = { 2, 3, 1 },
2993 .gpiomask = 0x00e00007,
2994 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2995 .gpiomute = 0x00c00007,
2996 .no_msp34xx = 1,
2997 .no_tda9875 = 1,
2998 .no_tda7432 = 1,
2999 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03003000 /* ---- card 0x95---------------------------------- */
3001 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
3002 .name = "Typhoon TV-Tuner PCI (50684)",
3003 .video_inputs = 3,
3004 .audio_inputs = 1,
3005 .tuner = 0,
3006 .svhs = 2,
3007 .gpiomask = 0x3014f,
3008 .muxsel = { 2, 3, 1, 1 },
3009 .gpiomux = { 0x20001,0x10001, 0, 0 },
3010 .gpiomute = 10,
3011 .needs_tvaudio = 1,
3012 .pll = PLL_28,
3013 .tuner_type = TUNER_PHILIPS_PAL_I,
3014 .tuner_addr = ADDR_UNSET,
3015 .radio_addr = ADDR_UNSET,
3016 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003017 [BTTV_BOARD_GEOVISION_GV600] = {
3018 /* emhn@usb.ve */
3019 .name = "Geovision GV-600",
3020 .video_inputs = 16,
3021 .audio_inputs = 0,
3022 .tuner = UNSET,
3023 .svhs = UNSET,
3024 .gpiomask = 0x0,
3025 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
3026 2, 2, 2, 2, 2, 2, 2, 2 },
3027 .muxsel_hook = geovision_muxsel,
3028 .gpiomux = { 0 },
3029 .no_msp34xx = 1,
3030 .pll = PLL_28,
3031 .tuner_type = UNSET,
3032 .tuner_addr = ADDR_UNSET,
3033 .radio_addr = ADDR_UNSET,
3034 },
Mauro Lacye80faad2008-04-22 14:45:58 -03003035 [BTTV_BOARD_KOZUMI_KTV_01C] = {
3036 /* Mauro Lacy <mauro@lacy.com.ar>
3037 * Based on MagicTV and Conceptronic CONTVFMi */
3038
3039 .name = "Kozumi KTV-01C",
3040 .video_inputs = 3,
3041 .audio_inputs = 1,
3042 .tuner = 0,
3043 .svhs = 2,
3044 .gpiomask = 0x008007,
3045 .muxsel = { 2, 3, 1, 1 },
3046 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03003047 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03003048 .needs_tvaudio = 0,
3049 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
3050 .tuner_addr = ADDR_UNSET,
3051 .radio_addr = ADDR_UNSET,
3052 .pll = PLL_28,
3053 .has_radio = 1,
3054 .has_remote = 1,
3055 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03003056 [BTTV_BOARD_ENLTV_FM_2] = {
3057 /* Encore TV Tuner Pro ENL TV-FM-2
3058 Mauro Carvalho Chehab <mchehab@infradead.org */
3059 .name = "Encore ENL TV-FM-2",
3060 .video_inputs = 3,
3061 .audio_inputs = 1,
3062 .tuner = 0,
3063 .svhs = 2,
3064 /* bit 6 -> IR disabled
3065 bit 18/17 = 00 -> mute
3066 01 -> enable external audio input
3067 10 -> internal audio input (mono?)
3068 11 -> internal audio input
3069 */
3070 .gpiomask = 0x060040,
3071 .muxsel = { 2, 3, 3 },
3072 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
3073 .gpiomute = 0,
3074 .tuner_type = TUNER_TCL_MF02GIP_5N,
3075 .tuner_addr = ADDR_UNSET,
3076 .radio_addr = ADDR_UNSET,
3077 .pll = PLL_28,
3078 .has_radio = 1,
3079 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03003080 },
3081 [BTTV_BOARD_VD012] = {
3082 /* D.Heer@Phytec.de */
3083 .name = "PHYTEC VD-012 (bt878)",
3084 .video_inputs = 4,
3085 .audio_inputs = 0,
3086 .tuner = UNSET, /* card has no tuner */
3087 .svhs = UNSET, /* card has no s-video */
3088 .gpiomask = 0x00,
3089 .muxsel = { 0, 2, 3, 1 },
3090 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3091 .needs_tvaudio = 0,
3092 .pll = PLL_28,
3093 .tuner_type = UNSET,
3094 .tuner_addr = ADDR_UNSET,
3095 .radio_addr = ADDR_UNSET,
3096 },
3097 [BTTV_BOARD_VD012_X1] = {
3098 /* D.Heer@Phytec.de */
3099 .name = "PHYTEC VD-012-X1 (bt878)",
3100 .video_inputs = 4,
3101 .audio_inputs = 0,
3102 .tuner = UNSET, /* card has no tuner */
3103 .svhs = 3,
3104 .gpiomask = 0x00,
3105 .muxsel = { 2, 3, 1 },
3106 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3107 .needs_tvaudio = 0,
3108 .pll = PLL_28,
3109 .tuner_type = UNSET,
3110 .tuner_addr = ADDR_UNSET,
3111 .radio_addr = ADDR_UNSET,
3112 },
3113 [BTTV_BOARD_VD012_X2] = {
3114 /* D.Heer@Phytec.de */
3115 .name = "PHYTEC VD-012-X2 (bt878)",
3116 .video_inputs = 4,
3117 .audio_inputs = 0,
3118 .tuner = UNSET, /* card has no tuner */
3119 .svhs = 3,
3120 .gpiomask = 0x00,
3121 .muxsel = { 3, 2, 1 },
3122 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
3123 .needs_tvaudio = 0,
3124 .pll = PLL_28,
3125 .tuner_type = UNSET,
3126 .tuner_addr = ADDR_UNSET,
3127 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03003128 }
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08003129};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003130
3131static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
3132
3133/* ----------------------------------------------------------------------- */
3134
3135static unsigned char eeprom_data[256];
3136
3137/*
3138 * identify card
3139 */
3140void __devinit bttv_idcard(struct bttv *btv)
3141{
3142 unsigned int gpiobits;
3143 int i,type;
3144 unsigned short tmp;
3145
3146 /* read PCI subsystem ID */
3147 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3148 btv->cardid = tmp << 16;
3149 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3150 btv->cardid |= tmp;
3151
3152 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3153 /* look for the card */
3154 for (type = -1, i = 0; cards[i].id != 0; i++)
3155 if (cards[i].id == btv->cardid)
3156 type = i;
3157
3158 if (type != -1) {
3159 /* found it */
3160 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3161 "PCI subsystem ID is %04x:%04x\n",
3162 btv->c.nr,cards[type].name,cards[type].cardnr,
3163 btv->cardid & 0xffff,
3164 (btv->cardid >> 16) & 0xffff);
3165 btv->c.type = cards[type].cardnr;
3166 } else {
3167 /* 404 */
3168 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3169 btv->c.nr, btv->cardid & 0xffff,
3170 (btv->cardid >> 16) & 0xffff);
3171 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08003172 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003173 }
3174 }
3175
3176 /* let the user override the autodetected type */
3177 if (card[btv->c.nr] < bttv_num_tvcards)
3178 btv->c.type=card[btv->c.nr];
3179
3180 /* print which card config we are using */
3181 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3182 bttv_tvcards[btv->c.type].name, btv->c.type,
3183 card[btv->c.nr] < bttv_num_tvcards
3184 ? "insmod option" : "autodetected");
3185
3186 /* overwrite gpio stuff ?? */
3187 if (UNSET == audioall && UNSET == audiomux[0])
3188 return;
3189
3190 if (UNSET != audiomux[0]) {
3191 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003192 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003193 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003194 gpiobits |= audiomux[i];
3195 }
3196 } else {
3197 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003198 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003199 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003200 }
3201 }
3202 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3203 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3204 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003205 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003206 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003207 }
3208 printk("\n");
3209}
3210
3211/*
3212 * (most) board specific initialisations goes here
3213 */
3214
3215/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08003216static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003217{
3218 int type = -1;
3219
3220 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003221 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003222 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003223 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003224 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003225 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003226
3227 if (-1 != type) {
3228 btv->c.type = type;
3229 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3230 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3231 }
3232}
3233
3234static void flyvideo_gpio(struct bttv *btv)
3235{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003236 int gpio, has_remote, has_radio, is_capture_only;
3237 int is_lr90, has_tda9820_tda9821;
3238 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003239
3240 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003241 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003242 gpio = gpio_read();
3243 /* FIXME: must restore OUR_EN ??? */
3244
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003245 /* all cards provide GPIO info, some have an additional eeprom
3246 * LR50: GPIO coding can be found lower right CP1 .. CP9
3247 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3248 * GPIO14-12: n.c.
3249 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003250
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003251 * lowest 3 bytes are remote control codes (no handshake needed)
3252 * xxxFFF: No remote control chip soldered
3253 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3254 * Note: Some bits are Audio_Mask !
3255 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003256 ttype = (gpio & 0x0f0000) >> 16;
3257 switch (ttype) {
3258 case 0x0:
3259 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003260 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003261 case 0x2:
3262 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003263 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003264 case 0x4:
3265 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003266 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003267 case 0x6:
3268 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003269 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003270 case 0xC:
3271 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003272 break;
3273 default:
3274 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003275 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003276 }
3277
3278 has_remote = gpio & 0x800000;
3279 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003280 /* unknown 0x200000;
3281 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003282 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003283 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003284 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3285 /*
3286 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003287
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003288 if (is_capture_only)
3289 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003290
3291 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003292 btv->c.nr, has_radio ? "yes" : "no ",
3293 has_remote ? "yes" : "no ", tuner_type, gpio);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003294 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003295 btv->c.nr, is_lr90 ? "yes" : "no ",
3296 has_tda9820_tda9821 ? "yes" : "no ",
3297 is_capture_only ? "yes" : "no ");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003299 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3300 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003301 btv->has_radio = has_radio;
3302
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003303 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3304 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3305 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003306 if (has_tda9820_tda9821)
3307 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003308 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003309}
3310
3311static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3312 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3313static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3314 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3315
3316static void miro_pinnacle_gpio(struct bttv *btv)
3317{
3318 int id,msp,gpio;
3319 char *info;
3320
3321 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003322 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003323 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003324 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003325 if (id < 32) {
3326 btv->tuner_type = miro_tunermap[id];
3327 if (0 == (gpio & 0x20)) {
3328 btv->has_radio = 1;
3329 if (!miro_fmtuner[id]) {
3330 btv->has_matchbox = 1;
3331 btv->mbox_we = (1<<6);
3332 btv->mbox_most = (1<<7);
3333 btv->mbox_clk = (1<<8);
3334 btv->mbox_data = (1<<9);
3335 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3336 }
3337 } else {
3338 btv->has_radio = 0;
3339 }
3340 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003341 if (btv->c.type == BTTV_BOARD_MIRO)
3342 btv->c.type = BTTV_BOARD_MIROPRO;
3343 if (btv->c.type == BTTV_BOARD_PINNACLE)
3344 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003345 }
3346 printk(KERN_INFO
3347 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3348 btv->c.nr, id+1, btv->tuner_type,
3349 !btv->has_radio ? "no" :
3350 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3351 (-1 == msp) ? "no" : "yes");
3352 } else {
3353 /* new cards with microtune tuner */
3354 id = 63 - id;
3355 btv->has_radio = 0;
3356 switch (id) {
3357 case 1:
3358 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003359 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003360 break;
3361 case 2:
3362 info = "PAL+SECAM / stereo";
3363 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003364 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003365 break;
3366 case 3:
3367 info = "NTSC / stereo";
3368 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003369 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003370 break;
3371 case 4:
3372 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003373 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003374 break;
3375 case 5:
3376 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003377 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003378 break;
3379 case 6:
3380 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003381 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003382 break;
3383 case 7:
3384 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003385 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 break;
3387 default:
3388 info = "oops: unknown card";
3389 break;
3390 }
3391 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003392 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003393 printk(KERN_INFO
3394 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3395 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003396 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003397 }
3398}
3399
3400/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3401#define LM1882_SYNC_DRIVE 0x200000L
3402
3403static void init_ids_eagle(struct bttv *btv)
3404{
3405 gpio_inout(0xffffff,0xFFFF37);
3406 gpio_write(0x200020);
3407
3408 /* flash strobe inverter ?! */
3409 gpio_write(0x200024);
3410
3411 /* switch sync drive off */
3412 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3413
3414 /* set BT848 muxel to 2 */
3415 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3416}
3417
3418/* Muxsel helper for the IDS Eagle.
3419 * the eagles does not use the standard muxsel-bits but
3420 * has its own multiplexer */
3421static void eagle_muxsel(struct bttv *btv, unsigned int input)
3422{
3423 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3424 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3425
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003426 /* composite */
3427 /* set chroma ADC to sleep */
3428 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3429 /* set to composite video */
3430 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3431 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003432
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003433 /* switch sync drive off */
3434 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003435}
3436
3437static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3438{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003439 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003440 gpio_write(masks[input%4]);
3441}
3442
3443/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3444 alarms output
3445
3446 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3447 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3448
3449 IN - sensor inputs, INx - sensor inputs and TI XORed together
3450 O1,O2,O3 - alarm outputs (relays)
3451
3452 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3453
3454*/
3455
3456static void init_lmlbt4x(struct bttv *btv)
3457{
3458 printk(KERN_DEBUG "LMLBT4x init\n");
3459 btwrite(0x000000, BT848_GPIO_REG_INP);
3460 gpio_inout(0xffffff, 0x0006C0);
3461 gpio_write(0x000000);
3462}
3463
3464static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3465{
3466 unsigned int inmux = input % 8;
3467 gpio_inout( 0xf, 0xf );
3468 gpio_bits( 0xf, inmux );
3469}
3470
3471static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3472{
3473 unsigned int inmux = input % 4;
3474 gpio_inout( 3<<9, 3<<9 );
3475 gpio_bits( 3<<9, inmux<<9 );
3476}
3477
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003478static void geovision_muxsel(struct bttv *btv, unsigned int input)
3479{
3480 unsigned int inmux = input % 16;
3481 gpio_inout(0xf, 0xf);
3482 gpio_bits(0xf, inmux);
3483}
3484
Linus Torvalds1da177e2005-04-16 15:20:36 -07003485/* ----------------------------------------------------------------------- */
3486
3487static void bttv_reset_audio(struct bttv *btv)
3488{
3489 /*
3490 * BT878A has a audio-reset register.
3491 * 1. This register is an audio reset function but it is in
3492 * function-0 (video capture) address space.
3493 * 2. It is enough to do this once per power-up of the card.
3494 * 3. There is a typo in the Conexant doc -- it is not at
3495 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3496 * --//Shrikumar 030609
3497 */
3498 if (btv->id != 878)
3499 return;
3500
3501 if (bttv_debug)
3502 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3503 btwrite((1<<7), 0x058);
3504 udelay(10);
3505 btwrite( 0, 0x058);
3506}
3507
3508/* initialization part one -- before registering i2c bus */
3509void __devinit bttv_init_card1(struct bttv *btv)
3510{
3511 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003512 case BTTV_BOARD_HAUPPAUGE:
3513 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003514 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003515 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003516 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003517 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003518 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003519 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003520 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003521 boot_msp34xx(btv,11);
3522 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003523 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003524 pvr_boot(btv);
3525 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003526 case BTTV_BOARD_TWINHAN_DST:
3527 case BTTV_BOARD_AVDVBT_771:
3528 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003529 btv->use_i2c_hw = 1;
3530 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003531 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003532 init_RTV24( btv );
3533 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003534
Linus Torvalds1da177e2005-04-16 15:20:36 -07003535 }
3536 if (!bttv_tvcards[btv->c.type].has_dvb)
3537 bttv_reset_audio(btv);
3538}
3539
3540/* initialization part two -- after registering i2c bus */
3541void __devinit bttv_init_card2(struct bttv *btv)
3542{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003543 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003544
Trent Piephoac7dc842007-06-28 17:51:08 -03003545 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003546
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003547 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003548 bttv_readee(btv,eeprom_data,0xa0);
3549 identify_by_eeprom(btv,eeprom_data);
3550 }
3551
3552 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003553 case BTTV_BOARD_MIRO:
3554 case BTTV_BOARD_MIROPRO:
3555 case BTTV_BOARD_PINNACLE:
3556 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003557 /* miro/pinnacle */
3558 miro_pinnacle_gpio(btv);
3559 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003560 case BTTV_BOARD_FLYVIDEO_98:
3561 case BTTV_BOARD_MAXI:
3562 case BTTV_BOARD_LIFE_FLYKIT:
3563 case BTTV_BOARD_FLYVIDEO:
3564 case BTTV_BOARD_TYPHOON_TVIEW:
3565 case BTTV_BOARD_CHRONOS_VS2:
3566 case BTTV_BOARD_FLYVIDEO_98FM:
3567 case BTTV_BOARD_FLYVIDEO2000:
3568 case BTTV_BOARD_FLYVIDEO98EZ:
3569 case BTTV_BOARD_CONFERENCETV:
3570 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003571 flyvideo_gpio(btv);
3572 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003573 case BTTV_BOARD_HAUPPAUGE:
3574 case BTTV_BOARD_HAUPPAUGE878:
3575 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003576 /* pick up some config infos from the eeprom */
3577 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003578 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003579 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003580 case BTTV_BOARD_AVERMEDIA98:
3581 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003582 bttv_readee(btv,eeprom_data,0xa0);
3583 avermedia_eeprom(btv);
3584 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003585 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003586 init_PXC200(btv);
3587 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003588 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003589 picolo_tetra_init(btv);
3590 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003591 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003592 btv->has_radio = 1;
3593 btv->has_matchbox = 1;
3594 btv->mbox_we = 0x20;
3595 btv->mbox_most = 0;
3596 btv->mbox_clk = 0x08;
3597 btv->mbox_data = 0x10;
3598 btv->mbox_mask = 0x38;
3599 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003600 case BTTV_BOARD_VOBIS_BOOSTAR:
3601 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003602 terratec_active_radio_upgrade(btv);
3603 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003604 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003605 if (btv->cardid == 0x3002144f) {
3606 btv->has_radio=1;
3607 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3608 }
3609 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003610 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003611 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003612 /* Fix up entry for 3DFX VoodooTV 100,
3613 which is an OEM STB card variant. */
3614 btv->has_radio=0;
3615 btv->tuner_type=TUNER_TEMIC_NTSC;
3616 }
3617 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003618 case BTTV_BOARD_OSPREY1x0:
3619 case BTTV_BOARD_OSPREY1x0_848:
3620 case BTTV_BOARD_OSPREY101_848:
3621 case BTTV_BOARD_OSPREY1x1:
3622 case BTTV_BOARD_OSPREY1x1_SVID:
3623 case BTTV_BOARD_OSPREY2xx:
3624 case BTTV_BOARD_OSPREY2x0_SVID:
3625 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003626 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003627 case BTTV_BOARD_OSPREY500:
3628 case BTTV_BOARD_OSPREY540:
3629 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003630 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003631 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003632 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003633 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003634 init_ids_eagle(btv);
3635 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003636 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003637 bttv_readee(btv,eeprom_data,0xa0);
3638 modtec_eeprom(btv);
3639 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003640 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003641 init_lmlbt4x(btv);
3642 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003643 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003644 tibetCS16_init(btv);
3645 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003646 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003647 kodicom4400r_init(btv);
3648 break;
3649 }
3650
3651 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003652 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003653 /* defaults from card list */
3654 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3655 btv->pll.pll_ifreq=28636363;
3656 btv->pll.pll_crystal=BT848_IFORM_XT0;
3657 }
3658 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3659 btv->pll.pll_ifreq=35468950;
3660 btv->pll.pll_crystal=BT848_IFORM_XT1;
3661 }
3662 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003663 switch (pll[btv->c.nr]) {
3664 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003665 btv->pll.pll_crystal = 0;
3666 btv->pll.pll_ifreq = 0;
3667 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003668 break;
3669 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003670 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003671 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003672 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003673 btv->pll.pll_crystal = BT848_IFORM_XT0;
3674 break;
3675 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003676 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003677 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003678 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003679 btv->pll.pll_crystal = BT848_IFORM_XT1;
3680 break;
3681 }
3682 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003683 btv->pll.pll_current = -1;
3684
Linus Torvalds1da177e2005-04-16 15:20:36 -07003685 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003686 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3687 addr = bttv_tvcards[btv->c.type].tuner_addr;
3688
3689 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003690 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003691 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003692 if (UNSET != tuner[btv->c.nr])
3693 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003694
3695 if (btv->tuner_type == TUNER_ABSENT ||
3696 bttv_tvcards[btv->c.type].tuner == UNSET)
3697 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3698 else if(btv->tuner_type == UNSET)
3699 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3700 else
3701 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3702 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003703
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003704 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003705 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003706
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003707 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003708 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003709 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003710
3711 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3712 }
3713
Hans Verkuil39e8f402006-01-09 15:25:16 -02003714 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003715 struct v4l2_priv_tun_config tda9887_cfg;
3716
3717 tda9887_cfg.tuner = TUNER_TDA9887;
3718 tda9887_cfg.priv = &btv->tda9887_conf;
3719
3720 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003721 }
3722
Linus Torvalds1da177e2005-04-16 15:20:36 -07003723 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3724 if (svhs[btv->c.nr] != UNSET)
3725 btv->svhs = svhs[btv->c.nr];
3726 if (remote[btv->c.nr] != UNSET)
3727 btv->has_remote = remote[btv->c.nr];
3728
3729 if (bttv_tvcards[btv->c.type].has_radio)
3730 btv->has_radio=1;
3731 if (bttv_tvcards[btv->c.type].has_remote)
3732 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003733 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3734 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003735 if (bttv_tvcards[btv->c.type].volume_gpio)
3736 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3737 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3738 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003739
Linus Torvalds1da177e2005-04-16 15:20:36 -07003740 if (!autoload)
3741 return;
3742
Trent Piephoac7dc842007-06-28 17:51:08 -03003743 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3744 return; /* no tuner or related drivers to load */
3745
Linus Torvalds1da177e2005-04-16 15:20:36 -07003746 /* try to detect audio/fader chips */
3747 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003748 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003749 request_module("msp3400");
3750
3751 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003752 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003753 request_module("msp3400");
3754
3755 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003756 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003757 request_module("tda9875");
3758
3759 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003760 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003761 request_module("tda7432");
3762
3763 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3764 request_module("tvaudio");
3765
Trent Piephoac7dc842007-06-28 17:51:08 -03003766 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003767 request_module("tuner");
3768}
3769
3770
3771/* ----------------------------------------------------------------------- */
3772
3773static void modtec_eeprom(struct bttv *btv)
3774{
3775 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3776 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3777 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3778 btv->c.nr,&eeprom_data[0x1e]);
3779 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3780 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3781 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003782 btv->c.nr,&eeprom_data[0x1e]);
3783 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3784 btv->tuner_type=TUNER_PHILIPS_NTSC;
3785 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3786 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003787 } else {
3788 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3789 btv->c.nr,&eeprom_data[0x1e]);
3790 }
3791}
3792
3793static void __devinit hauppauge_eeprom(struct bttv *btv)
3794{
3795 struct tveeprom tv;
3796
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003797 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003798 btv->tuner_type = tv.tuner_type;
3799 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003800
3801 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3802 btv->c.nr, tv.model);
3803
3804 /*
3805 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3806 * type based on model #.
3807 */
3808 if(tv.model == 64900) {
3809 printk("bttv%d: Switching board type from %s to %s\n",
3810 btv->c.nr,
3811 bttv_tvcards[btv->c.type].name,
3812 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3813 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3814 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003815}
3816
3817static int terratec_active_radio_upgrade(struct bttv *btv)
3818{
3819 int freq;
3820
3821 btv->has_radio = 1;
3822 btv->has_matchbox = 1;
3823 btv->mbox_we = 0x10;
3824 btv->mbox_most = 0x20;
3825 btv->mbox_clk = 0x08;
3826 btv->mbox_data = 0x04;
3827 btv->mbox_mask = 0x3c;
3828
3829 btv->mbox_iow = 1 << 8;
3830 btv->mbox_ior = 1 << 9;
3831 btv->mbox_csel = 1 << 10;
3832
3833 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003834 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003835 if (0x1ed8 == tea5757_read(btv)) {
3836 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3837 btv->c.nr);
3838 btv->has_radio = 1;
3839 btv->has_matchbox = 1;
3840 } else {
3841 btv->has_radio = 0;
3842 btv->has_matchbox = 0;
3843 }
3844 return 0;
3845}
3846
3847
3848/* ----------------------------------------------------------------------- */
3849
3850/*
3851 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3852 *
3853 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3854 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3855 * unpacked with unzip).
3856 */
3857#define PVR_GPIO_DELAY 10
3858
3859#define BTTV_ALT_DATA 0x000001
3860#define BTTV_ALT_DCLK 0x100000
3861#define BTTV_ALT_NCONFIG 0x800000
3862
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003863static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3864 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003865{
3866 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003867 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003868 int i;
3869
3870 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3871 gpio_write(0);
3872 udelay(PVR_GPIO_DELAY);
3873
3874 gpio_write(BTTV_ALT_NCONFIG);
3875 udelay(PVR_GPIO_DELAY);
3876
3877 for (n = 0; n < microlen; n++) {
3878 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003879 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003880 gpio_bits(BTTV_ALT_DCLK,0);
3881 if (bits & 0x01)
3882 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3883 else
3884 gpio_bits(BTTV_ALT_DATA,0);
3885 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3886 bits >>= 1;
3887 }
3888 }
3889 gpio_bits(BTTV_ALT_DCLK,0);
3890 udelay(PVR_GPIO_DELAY);
3891
3892 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3893 for (i = 0 ; i < 30 ; i++) {
3894 gpio_bits(BTTV_ALT_DCLK,0);
3895 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3896 }
3897 gpio_bits(BTTV_ALT_DCLK,0);
3898 return 0;
3899}
3900
3901static int __devinit pvr_boot(struct bttv *btv)
3902{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003903 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003904 int rc;
3905
3906 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3907 if (rc != 0) {
3908 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3909 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003910 return rc;
3911 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003912 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3913 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3914 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003915 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003916 return rc;
3917}
3918
3919/* ----------------------------------------------------------------------- */
3920/* some osprey specific stuff */
3921
Trent Piephocf784d52007-07-21 21:26:40 -03003922static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003923{
Trent Piephocf784d52007-07-21 21:26:40 -03003924 int i;
3925 u32 serial = 0;
3926 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003927
Trent Piephocf784d52007-07-21 21:26:40 -03003928 /* This code will nevery actually get called in this case.... */
3929 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3930 /* this might be an antique... check for MMAC label in eeprom */
3931 if (!strncmp(ee, "MMAC", 4)) {
3932 u8 checksum = 0;
3933 for (i = 0; i < 21; i++)
3934 checksum += ee[i];
3935 if (checksum != ee[21])
3936 return;
3937 cardid = BTTV_BOARD_OSPREY1x0_848;
3938 for (i = 12; i < 21; i++)
3939 serial *= 10, serial += ee[i] - '0';
3940 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003941 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003942 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003943
Trent Piephocf784d52007-07-21 21:26:40 -03003944 for (i = 4*16; i < 8*16; i += 16) {
3945 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003946
Trent Piephocf784d52007-07-21 21:26:40 -03003947 if ((checksum&0xff) + (checksum>>8) == 0xff)
3948 break;
3949 }
3950 if (i >= 8*16)
3951 return;
3952 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003953
Trent Piephocf784d52007-07-21 21:26:40 -03003954 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003955 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003956
Trent Piephocf784d52007-07-21 21:26:40 -03003957 switch(type) {
3958 /* 848 based */
3959 case 0x0004:
3960 cardid = BTTV_BOARD_OSPREY1x0_848;
3961 break;
3962 case 0x0005:
3963 cardid = BTTV_BOARD_OSPREY101_848;
3964 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003965
Trent Piephocf784d52007-07-21 21:26:40 -03003966 /* 878 based */
3967 case 0x0012:
3968 case 0x0013:
3969 cardid = BTTV_BOARD_OSPREY1x0;
3970 break;
3971 case 0x0014:
3972 case 0x0015:
3973 cardid = BTTV_BOARD_OSPREY1x1;
3974 break;
3975 case 0x0016:
3976 case 0x0017:
3977 case 0x0020:
3978 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3979 break;
3980 case 0x0018:
3981 case 0x0019:
3982 case 0x001E:
3983 case 0x001F:
3984 cardid = BTTV_BOARD_OSPREY2xx;
3985 break;
3986 case 0x001A:
3987 case 0x001B:
3988 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3989 break;
3990 case 0x0040:
3991 cardid = BTTV_BOARD_OSPREY500;
3992 break;
3993 case 0x0050:
3994 case 0x0056:
3995 cardid = BTTV_BOARD_OSPREY540;
3996 /* bttv_osprey_540_init(btv); */
3997 break;
3998 case 0x0060:
3999 case 0x0070:
4000 case 0x00A0:
4001 cardid = BTTV_BOARD_OSPREY2x0;
4002 /* enable output on select control lines */
4003 gpio_inout(0xffffff,0x000303);
4004 break;
4005 case 0x00D8:
4006 cardid = BTTV_BOARD_OSPREY440;
4007 break;
4008 default:
4009 /* unknown...leave generic, but get serial # */
4010 printk(KERN_INFO "bttv%d: "
4011 "osprey eeprom: unknown card type 0x%04x\n",
4012 btv->c.nr, type);
4013 break;
4014 }
Al Viroc1c36f32008-05-21 00:32:21 -03004015 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03004016 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004017
Trent Piephocf784d52007-07-21 21:26:40 -03004018 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
4019 btv->c.nr, cardid,
4020 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
4021
4022 if (cardid<0 || btv->c.type == cardid)
4023 return;
4024
4025 /* card type isn't set correctly */
4026 if (card[btv->c.nr] < bttv_num_tvcards) {
4027 printk(KERN_WARNING "bttv%d: osprey eeprom: "
4028 "Not overriding user specified card type\n", btv->c.nr);
4029 } else {
4030 printk(KERN_INFO "bttv%d: osprey eeprom: "
4031 "Changing card type from %d to %d\n", btv->c.nr,
4032 btv->c.type, cardid);
4033 btv->c.type = cardid;
4034 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004035}
4036
4037/* ----------------------------------------------------------------------- */
4038/* AVermedia specific stuff, from bktr_card.c */
4039
4040static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004041 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
4042 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
4043 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
4044 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
4045 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004046 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07004047
4048static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004049 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004050 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
4051 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004052 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
4053 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07004054
4055static void __devinit avermedia_eeprom(struct bttv *btv)
4056{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004057 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004058
4059 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004060 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
4061 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004062 btv->has_remote = (eeprom_data[0x42] & 0x01);
4063
4064 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004065 if (tuner_format <= 0x0a)
4066 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004067 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004068 if (tuner_format <= 9)
4069 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004070
4071 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004072 if (tuner_format == 0x09)
4073 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004074
4075 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004076 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
4077 if (tuner_type) {
4078 btv->tuner_type = tuner_type;
4079 printk(KERN_CONT "%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004080 } else
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03004081 printk(KERN_CONT "Unknown type");
4082 printk(KERN_CONT " radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004083 tuner_tv_fm ? "yes" : "no",
4084 btv->has_remote ? "yes" : "no");
4085}
4086
4087/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
4088void bttv_tda9880_setnorm(struct bttv *btv, int norm)
4089{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004090 /* fix up our card entry */
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -03004091 if(norm==V4L2_STD_NTSC) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004092 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4093 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004094 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4095 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004096 dprintk("bttv_tda9880_setnorm to NTSC\n");
4097 }
4098 else {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004099 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4100 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004101 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4102 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004103 dprintk("bttv_tda9880_setnorm to PAL\n");
4104 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004105 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004106 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004107 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004108}
4109
4110
4111/*
4112 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08004113 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07004114 *
4115 * Hauppauge: pin 5
4116 * Voodoo: pin 20
4117 */
4118static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4119{
4120 int mask = (1 << pin);
4121
4122 gpio_inout(mask,mask);
4123 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03004124 mdelay(2);
4125 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004126 gpio_bits(mask,mask);
4127
4128 if (bttv_gpio)
4129 bttv_gpio_tracking(btv,"msp34xx");
4130 if (bttv_verbose)
4131 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
4132 "init [%d]\n", btv->c.nr, pin);
4133}
4134
Linus Torvalds1da177e2005-04-16 15:20:36 -07004135/* ----------------------------------------------------------------------- */
4136/* Imagenation L-Model PXC200 Framegrabber */
4137/* This is basically the same procedure as
4138 * used by Alessandro Rubini in his pxc200
4139 * driver, but using BTTV functions */
4140
4141static void __devinit init_PXC200(struct bttv *btv)
4142{
4143 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4144 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4145 0x00 };
4146 unsigned int i;
4147 int tmp;
4148 u32 val;
4149
4150 /* Initialise GPIO-connevted stuff */
4151 gpio_inout(0xffffff, (1<<13));
4152 gpio_write(0);
4153 udelay(3);
4154 gpio_write(1<<13);
4155 /* GPIO inputs are pulled up, so no need to drive
4156 * reset pin any longer */
4157 gpio_bits(0xffffff, 0);
4158 if (bttv_gpio)
4159 bttv_gpio_tracking(btv,"pxc200");
4160
4161 /* we could/should try and reset/control the AD pots? but
4162 right now we simply turned off the crushing. Without
4163 this the AGC drifts drifts
4164 remember the EN is reverse logic -->
4165 setting BT848_ADC_AGC_EN disable the AGC
4166 tboult@eecs.lehigh.edu
4167 */
4168
4169 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4170
4171 /* Initialise MAX517 DAC */
4172 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4173 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4174
4175 /* Initialise 12C508 PIC */
4176 /* The I2CWrite and I2CRead commmands are actually to the
4177 * same chips - but the R/W bit is included in the address
4178 * argument so the numbers are different */
4179
4180
4181 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4182
4183 /* First of all, enable the clock line. This is used in the PXC200-F */
4184 val = btread(BT848_GPIO_DMA_CTL);
4185 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4186 btwrite(val, BT848_GPIO_DMA_CTL);
4187
4188 /* Then, push to 0 the reset pin long enough to reset the *
4189 * device same as above for the reset line, but not the same
4190 * value sent to the GPIO-connected stuff
4191 * which one is the good one? */
4192 gpio_inout(0xffffff,(1<<2));
4193 gpio_write(0);
4194 udelay(10);
4195 gpio_write(1<<2);
4196
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004197 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004198 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4199 if (tmp != -1) {
4200 printk(KERN_INFO
4201 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4202 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4203 }
4204 }
4205
4206 printk(KERN_INFO "PXC200 Initialised.\n");
4207}
4208
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004209
4210
Peter Skipworth93b43f12005-06-23 22:04:45 -07004211/* ----------------------------------------------------------------------- */
4212/*
4213 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4214 * it. This apparently involves the following procedure for each 878 chip:
4215 *
4216 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4217 *
4218 * 2) write to GPIO_DATA
4219 * - 0x0E
4220 * - sleep 1ms
4221 * - 0x10 + 0x0E
4222 * - sleep 10ms
4223 * - 0x0E
4224 * read from GPIO_DATA into buf (uint_32)
4225 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4226 * error. ERROR_CPLD_Check_Failed stop.
4227 *
4228 * 3) write to GPIO_DATA
4229 * - write 0x4400 + 0x0E
4230 * - sleep 10ms
4231 * - write 0x4410 + 0x0E
4232 * - sleep 1ms
4233 * - write 0x0E
4234 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004235 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004236 * error. ERROR_CPLD_Check_Failed.
4237 */
4238/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004239static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004240init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004241{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004242 uint32_t dataRead = 0;
4243 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004244
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004245 printk (KERN_INFO
4246 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004247 btv->c.nr);
4248
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004249 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004250
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004251 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4252 msleep (1);
4253 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4254 msleep (10);
4255 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004256
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004257 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004258
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004259 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4260 printk (KERN_INFO
4261 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4262 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004263 }
4264
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004265 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4266 msleep (10);
4267 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4268 msleep (1);
4269 btwrite (watchdog_value, BT848_GPIO_DATA);
4270 msleep (1);
4271 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004272
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004273 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4274 printk (KERN_INFO
4275 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4276 btv->c.nr, dataRead);
4277
Peter Skipworth93b43f12005-06-23 22:04:45 -07004278 return;
4279 }
4280
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004281 printk (KERN_INFO
4282 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004283}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004284
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004285
4286
Linus Torvalds1da177e2005-04-16 15:20:36 -07004287/* ----------------------------------------------------------------------- */
4288/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4289/*
4290 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4291 * This code is placed under the terms of the GNU General Public License
4292 *
4293 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4294 */
4295
4296static void bus_low(struct bttv *btv, int bit)
4297{
4298 if (btv->mbox_ior) {
4299 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4300 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4301 udelay(5);
4302 }
4303
4304 gpio_bits(bit,0);
4305 udelay(5);
4306
4307 if (btv->mbox_ior) {
4308 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4309 udelay(5);
4310 }
4311}
4312
4313static void bus_high(struct bttv *btv, int bit)
4314{
4315 if (btv->mbox_ior) {
4316 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4317 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4318 udelay(5);
4319 }
4320
4321 gpio_bits(bit,bit);
4322 udelay(5);
4323
4324 if (btv->mbox_ior) {
4325 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4326 udelay(5);
4327 }
4328}
4329
4330static int bus_in(struct bttv *btv, int bit)
4331{
4332 if (btv->mbox_ior) {
4333 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4334 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4335 udelay(5);
4336
4337 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4338 udelay(5);
4339 }
4340 return gpio_read() & (bit);
4341}
4342
4343/* TEA5757 register bits */
4344#define TEA_FREQ 0:14
4345#define TEA_BUFFER 15:15
4346
4347#define TEA_SIGNAL_STRENGTH 16:17
4348
4349#define TEA_PORT1 18:18
4350#define TEA_PORT0 19:19
4351
4352#define TEA_BAND 20:21
4353#define TEA_BAND_FM 0
4354#define TEA_BAND_MW 1
4355#define TEA_BAND_LW 2
4356#define TEA_BAND_SW 3
4357
4358#define TEA_MONO 22:22
4359#define TEA_ALLOW_STEREO 0
4360#define TEA_FORCE_MONO 1
4361
4362#define TEA_SEARCH_DIRECTION 23:23
4363#define TEA_SEARCH_DOWN 0
4364#define TEA_SEARCH_UP 1
4365
4366#define TEA_STATUS 24:24
4367#define TEA_STATUS_TUNED 0
4368#define TEA_STATUS_SEARCHING 1
4369
4370/* Low-level stuff */
4371static int tea5757_read(struct bttv *btv)
4372{
4373 unsigned long timeout;
4374 int value = 0;
4375 int i;
4376
4377 /* better safe than sorry */
4378 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4379
4380 if (btv->mbox_ior) {
4381 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4382 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4383 udelay(5);
4384 }
4385
4386 if (bttv_gpio)
4387 bttv_gpio_tracking(btv,"tea5757 read");
4388
4389 bus_low(btv,btv->mbox_we);
4390 bus_low(btv,btv->mbox_clk);
4391
4392 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004393 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004394
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004395 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004396 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4397 schedule();
4398 if (bus_in(btv,btv->mbox_data)) {
4399 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4400 return -1;
4401 }
4402
4403 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004404 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004405 udelay(5);
4406 bus_high(btv,btv->mbox_clk);
4407 udelay(5);
4408 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4409 bus_low(btv,btv->mbox_clk);
4410 value <<= 1;
4411 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4412 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4413 }
4414 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4415 return value;
4416}
4417
4418static int tea5757_write(struct bttv *btv, int value)
4419{
4420 int i;
4421 int reg = value;
4422
4423 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4424
4425 if (btv->mbox_ior) {
4426 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4427 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4428 udelay(5);
4429 }
4430 if (bttv_gpio)
4431 bttv_gpio_tracking(btv,"tea5757 write");
4432
4433 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4434 bus_low(btv,btv->mbox_clk);
4435 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004436 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004437 if (reg & 0x1000000)
4438 bus_high(btv,btv->mbox_data);
4439 else
4440 bus_low(btv,btv->mbox_data);
4441 reg <<= 1;
4442 bus_high(btv,btv->mbox_clk);
4443 udelay(10);
4444 bus_low(btv,btv->mbox_clk);
4445 udelay(10);
4446 }
4447 bus_low(btv,btv->mbox_we); /* unmute !!! */
4448 return 0;
4449}
4450
4451void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4452{
4453 dprintk("tea5757_set_freq %d\n",freq);
4454 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004455}
4456
Linus Torvalds1da177e2005-04-16 15:20:36 -07004457/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4458 *
4459 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4460 * switch instead (CD22M3494E). This IC can have multiple active connections
4461 * between Xn (input) and Yn (output) pins. We need to clear any existing
4462 * connection prior to establish a new one, pulsing the STROBE pin.
4463 *
4464 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4465 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004466 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4467 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4468 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4469 * GPIO[8] - - P3[5] (microcontroller)
4470 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4471 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4472 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004473 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004474 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4475 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004476 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004477 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004478 * note: the vendor refused to give any information on this product, all
4479 * that stuff was found using a multimeter! :)
4480 */
4481static void rv605_muxsel(struct bttv *btv, unsigned int input)
4482{
4483 /* reset all conections */
4484 gpio_bits(0x200,0x200);
4485 mdelay(1);
4486 gpio_bits(0x200,0x000);
4487 mdelay(1);
4488
Joe Perchesc84e6032008-02-03 17:18:59 +02004489 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004490 gpio_bits(0x480,0x080);
4491 gpio_bits(0x480,0x480);
4492 mdelay(1);
4493 gpio_bits(0x480,0x080);
4494 mdelay(1);
4495}
4496
4497/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4498 *
4499 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4500 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4501 * chips, ten eight input analog multiplexors, a not chip and a few
4502 * other components.
4503 *
4504 * 16 inputs on a secondary bracket are provided and can be selected
4505 * from each of the four capture chips. Two of the eight input
4506 * multiplexors are used to select from any of the 16 input signals.
4507 *
4508 * Unsupported hardware capabilities:
4509 * . A video output monitor on the secondary bracket can be selected from
4510 * one of the 878A chips.
4511 * . Another passthrough but I haven't spent any time investigating it.
4512 * . Digital I/O (logic level connected to GPIO) is available from an
4513 * onboard header.
4514 *
4515 * The on chip input mux should always be set to 2.
4516 * GPIO[16:19] - Video input selection
4517 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4518 * GPIO[?:?] - Digital I/O.
4519 *
4520 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4521 * determined what function (if any) it provides. With the microcontroller
4522 * and sync seperator chips a guess is that it might have to do with video
4523 * switching and maybe some digital I/O.
4524 */
4525static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4526{
4527 /* video mux */
4528 gpio_bits(0x0f0000, input << 16);
4529}
4530
4531static void tibetCS16_init(struct bttv *btv)
4532{
4533 /* enable gpio bits, mask obtained via btSpy */
4534 gpio_inout(0xffffff, 0x0f7fff);
4535 gpio_write(0x0f7fff);
4536}
4537
4538/*
4539 * The following routines for the Kodicom-4400r get a little mind-twisting.
4540 * There is a "master" controller and three "slave" controllers, together
4541 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4542 * The analog switch is controlled by the "master", but the detection order
4543 * of the four BT878A chips is in an order which I just don't understand.
4544 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004545 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004546 * those numbers are different from the detection sequence. When working
4547 * with the analog switch, we need to "map" from the detection sequence
4548 * over to the board's logical controller number. This mapping sequence
4549 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4550 * unit 3, the second (which is the master) is logical unit 0, etc.
4551 * We need to maintain the status of the analog switch (which of the 16
4552 * cameras is connected to which of the 4 controllers). Rather than
4553 * add to the bttv structure for this, we use the data reserved for
4554 * the mbox (unused for this card type).
4555 */
4556
4557/*
4558 * First a routine to set the analog switch, which controls which camera
4559 * is routed to which controller. The switch comprises an X-address
4560 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4561 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4562 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4563 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4564 * specified address. The idea is to set the address and data, then bring
4565 * STROBE high, and finally bring STROBE back to low.
4566 */
4567static void kodicom4400r_write(struct bttv *btv,
4568 unsigned char xaddr,
4569 unsigned char yaddr,
4570 unsigned char data) {
4571 unsigned int udata;
4572
4573 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4574 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4575 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4576 gpio_bits(0x1ff, udata); /* strobe low */
4577}
4578
4579/*
4580 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4581 * use this routine. The routine finds the "master" for the card, maps
4582 * the controller number from the detected position over to the logical
4583 * number, writes the appropriate data to the analog switch, and housekeeps
4584 * the local copy of the switch information. The parameter 'input' is the
4585 * requested camera number (0 - 15).
4586 */
4587static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4588{
4589 char *sw_status;
4590 int xaddr, yaddr;
4591 struct bttv *mctlr;
4592 static unsigned char map[4] = {3, 0, 2, 1};
4593
4594 mctlr = master[btv->c.nr];
4595 if (mctlr == NULL) { /* ignore if master not yet detected */
4596 return;
4597 }
4598 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4599 yaddr = map[yaddr];
4600 sw_status = (char *)(&mctlr->mbox_we);
4601 xaddr = input & 0xf;
4602 /* Check if the controller/camera pair has changed, else ignore */
4603 if (sw_status[yaddr] != xaddr)
4604 {
4605 /* "open" the old switch, "close" the new one, save the new */
4606 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4607 sw_status[yaddr] = xaddr;
4608 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4609 }
4610}
4611
4612/*
4613 * During initialisation, we need to reset the analog switch. We
4614 * also preset the switch to map the 4 connectors on the card to the
4615 * *user's* (see above description of kodicom4400r_muxsel) channels
4616 * 0 through 3
4617 */
4618static void kodicom4400r_init(struct bttv *btv)
4619{
4620 char *sw_status = (char *)(&btv->mbox_we);
4621 int ix;
4622
4623 gpio_inout(0x0003ff, 0x0003ff);
4624 gpio_write(1 << 9); /* reset MUX */
4625 gpio_write(0);
4626 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004627 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004628 sw_status[ix] = ix;
4629 kodicom4400r_write(btv, ix, ix, 1);
4630 }
4631 /*
4632 * Since this is the "master", we need to set up the
4633 * other three controller chips' pointers to this structure
4634 * for later use in the muxsel routine.
4635 */
4636 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4637 return;
4638 master[btv->c.nr-1] = btv;
4639 master[btv->c.nr] = btv;
4640 master[btv->c.nr+1] = btv;
4641 master[btv->c.nr+2] = btv;
4642}
4643
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004644/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4645 * video multiplexers to provide up to 16 video inputs. These
4646 * multiplexers are controlled by the lower 8 GPIO pins of the
4647 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004648
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004649 * xxx0 is pin xxx of multiplexer U5,
4650 * yyy1 is pin yyy of multiplexer U2
4651 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004652#define ENA0 0x01
4653#define ENB0 0x02
4654#define ENA1 0x04
4655#define ENB1 0x08
4656
4657#define IN10 0x10
4658#define IN00 0x20
4659#define IN11 0x40
4660#define IN01 0x80
4661
4662static void xguard_muxsel(struct bttv *btv, unsigned int input)
4663{
4664 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004665 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4666 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4667 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4668 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004669 };
4670 gpio_write(masks[input%16]);
4671}
4672static void picolo_tetra_init(struct bttv *btv)
4673{
4674 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4675 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4676 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4677}
4678static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4679{
4680
4681 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4682 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4683 /*GPIO[20]&GPIO[21] used to choose the right input*/
4684 btwrite (input<<20,BT848_GPIO_DATA);
4685
4686}
4687
4688/*
4689 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4690 *
4691 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4692 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004693 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004694 * optional "Monitor Out" bus. This allows the card to be looking
4695 * at one input while the monitor is looking at another.
4696 *
4697 * Since I've couldn't be bothered figuring out how to add an
4698 * independant muxsel for the monitor bus, I've just set it to
4699 * whatever the card is looking at.
4700 *
4701 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4702 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4703 *
4704 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4705 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4706 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4707 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4708 *
4709 */
4710
4711/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4712#define I2C_TDA8540 0x90
4713#define I2C_TDA8540_ALT1 0x92
4714#define I2C_TDA8540_ALT2 0x94
4715#define I2C_TDA8540_ALT3 0x96
4716#define I2C_TDA8540_ALT4 0x98
4717#define I2C_TDA8540_ALT5 0x9a
4718#define I2C_TDA8540_ALT6 0x9c
4719
4720static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4721{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004722 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004723 int key = input % 4;
4724 int matrix = input / 4;
4725
4726 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4727 btv->c.nr, input, matrix, key);
4728
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004729 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004730 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4731 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4732 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4733 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4734 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4735 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4736 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4737 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4738
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004739 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004740 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004741 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004742 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004743 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004744 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004745 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004746 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004747 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004748
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004749 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004750 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4751}
4752
4753
4754/* PXC200 muxsel helper
4755 * luke@syseng.anu.edu.au
4756 * another transplant
4757 * from Alessandro Rubini (rubini@linux.it)
4758 *
4759 * There are 4 kinds of cards:
4760 * PXC200L which is bt848
4761 * PXC200F which is bt848 with PIC controlling mux
4762 * PXC200AL which is bt878
4763 * PXC200AF which is bt878 with PIC controlling mux
4764 */
4765#define PX_CFG_PXC200F 0x01
4766#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4767#define PX_I2C_PIC 0x0f
4768#define PX_PXC200A_CARDID 0x200a1295
4769#define PX_I2C_CMD_CFG 0x00
4770
4771static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4772{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004773 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004774 long mux;
4775 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004776 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004777
4778 /* Read PIC config to determine if this is a PXC200F */
4779 /* PX_I2C_CMD_CFG*/
4780 buf[0]=0;
4781 buf[1]=0;
4782 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4783 if (rc) {
4784 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4785 /* not PXC ? do nothing */
4786 return;
4787 }
4788
4789 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4790 if (!(rc & PX_CFG_PXC200F)) {
4791 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4792 return;
4793 }
4794
4795
4796 /* The multiplexer in the 200F is handled by the GPIO port */
4797 /* get correct mapping between inputs */
4798 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4799 /* ** not needed!? */
4800 mux = input;
4801
4802 /* make sure output pins are enabled */
4803 /* bitmask=0x30f; */
4804 bitmask=0x302;
4805 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004806 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004807 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4808 bitmask |= 7<<4; /* the DAC */
4809 }
4810 btwrite(bitmask, BT848_GPIO_OUT_EN);
4811
4812 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004813 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004814 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4815 else /* older device */
4816 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4817 btwrite(bitmask,BT848_GPIO_DATA);
4818
4819 /*
4820 * Was "to be safe, set the bt848 to input 0"
4821 * Actually, since it's ok at load time, better not messing
4822 * with these bits (on PXC200AF you need to set mux 2 here)
4823 *
4824 * needed because bttv-driver sets mux before calling this function
4825 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004826 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004827 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4828 else /* older device */
4829 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4830
4831 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4832}
4833
4834/* ----------------------------------------------------------------------- */
4835/* motherboard chipset specific stuff */
4836
Adrian Bunk7d44e892007-12-11 19:23:43 -03004837void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004838{
4839 int pcipci_fail = 0;
4840 struct pci_dev *dev = NULL;
4841
Alan Cox3d265c92006-09-14 11:53:16 -03004842 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004843 pcipci_fail = 1;
4844 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4845 triton1 = 1;
4846 if (pci_pci_problems & PCIPCI_VSFX)
4847 vsfx = 1;
4848#ifdef PCIPCI_ALIMAGIK
4849 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4850 latency = 0x0A;
4851#endif
4852
Linus Torvalds1da177e2005-04-16 15:20:36 -07004853
4854 /* print warnings about any quirks found */
4855 if (triton1)
4856 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4857 if (vsfx)
4858 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4859 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004860 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4861 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004862 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004863 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004864 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004865 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004866 printk(KERN_INFO "bttv: overlay forced. Use this "
4867 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004868 }
4869 }
4870 if (UNSET != latency)
4871 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004872 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004873 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004874 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004875 pci_read_config_byte(dev, 0x53, &b);
4876 if (bttv_debug)
4877 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4878 "bufcon=0x%02x\n",b);
4879 }
4880}
4881
4882int __devinit bttv_handle_chipset(struct bttv *btv)
4883{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004884 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004885
4886 if (!triton1 && !vsfx && UNSET == latency)
4887 return 0;
4888
4889 if (bttv_verbose) {
4890 if (triton1)
4891 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4892 if (vsfx && btv->id >= 878)
4893 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4894 if (UNSET != latency)
4895 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4896 btv->c.nr,latency);
4897 }
4898
4899 if (btv->id < 878) {
4900 /* bt848 (mis)uses a bit in the irq mask for etbf */
4901 if (triton1)
4902 btv->triton1 = BT848_INT_ETBF;
4903 } else {
4904 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004905 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004906 if (triton1)
4907 command |= BT878_EN_TBFX;
4908 if (vsfx)
4909 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004910 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4911 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004912 if (UNSET != latency)
4913 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4914 return 0;
4915}
4916
4917
4918/*
4919 * Local variables:
4920 * c-basic-offset: 8
4921 * End:
4922 */