blob: 8ef0424c26c4dc405eed8097ee3c2662309bfe21 [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);
47static void boot_bt832(struct bttv *btv);
48static void hauppauge_eeprom(struct bttv *btv);
49static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030050static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070051static void modtec_eeprom(struct bttv *btv);
52static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070053static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070054
Linus Torvalds1da177e2005-04-16 15:20:36 -070055static void rv605_muxsel(struct bttv *btv, unsigned int input);
56static void eagle_muxsel(struct bttv *btv, unsigned int input);
57static void xguard_muxsel(struct bttv *btv, unsigned int input);
58static void ivc120_muxsel(struct bttv *btv, unsigned int input);
59static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
60
61static void PXC200_muxsel(struct bttv *btv, unsigned int input);
62
63static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
64static void picolo_tetra_init(struct bttv *btv);
65
66static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
67static void tibetCS16_init(struct bttv *btv);
68
69static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
70static void kodicom4400r_init(struct bttv *btv);
71
72static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
73static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
74
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030075static void geovision_muxsel(struct bttv *btv, unsigned int input);
76
Linus Torvalds1da177e2005-04-16 15:20:36 -070077static int terratec_active_radio_upgrade(struct bttv *btv);
78static int tea5757_read(struct bttv *btv);
79static int tea5757_write(struct bttv *btv, int value);
80static void identify_by_eeprom(struct bttv *btv,
81 unsigned char eeprom_data[256]);
82static int __devinit pvr_boot(struct bttv *btv);
83
84/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020085static unsigned int triton1;
86static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070087static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070088int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
90static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
94static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
95static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
96#ifdef MODULE
97static unsigned int autoload = 1;
98#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020099static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700100#endif
101static unsigned int gpiomask = UNSET;
102static unsigned int audioall = UNSET;
103static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
104
105/* insmod options */
106module_param(triton1, int, 0444);
107module_param(vsfx, int, 0444);
108module_param(no_overlay, int, 0444);
109module_param(latency, int, 0444);
110module_param(gpiomask, int, 0444);
111module_param(audioall, int, 0444);
112module_param(autoload, int, 0444);
113
114module_param_array(card, int, NULL, 0444);
115module_param_array(pll, int, NULL, 0444);
116module_param_array(tuner, int, NULL, 0444);
117module_param_array(svhs, int, NULL, 0444);
118module_param_array(remote, int, NULL, 0444);
119module_param_array(audiomux, int, NULL, 0444);
120
121MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
122 "[enable bug compatibility for triton1 + others]");
123MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
124 "[yet another chipset flaw workaround]");
125MODULE_PARM_DESC(latency,"pci latency timer");
126MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
127MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
128MODULE_PARM_DESC(tuner,"specify installed tuner type");
129MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300130MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
131 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700132
133/* ----------------------------------------------------------------------- */
134/* list of card IDs for bt878+ cards */
135
136static struct CARD {
137 unsigned id;
138 int cardnr;
139 char *name;
140} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800141 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
142 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
143 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
144 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
145 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
146 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
147 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
148 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800149 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800151 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
152 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700153
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800154 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
155 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
156 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
157 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
158 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800159 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800160 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
161 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800162 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700163
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800164 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700165 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800166 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
167 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700168 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800169 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700170
Wade Berrier434b2522007-06-25 13:02:16 -0300171 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
172 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800173 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700174
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800175 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
176 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
177 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
178 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
179 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
180 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
181 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800183 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
184 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
185 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
186 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
187 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800189 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
190 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
191 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
192 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700193
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800194 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
195 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700196 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800197 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
198 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
199 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
200 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
201 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800203 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
204 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
205 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
206 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
207 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700208
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800209 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
210 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
211 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
212 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
213 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800215 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
216 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
217 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
218 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700219
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800220 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
221 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
222 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
223 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700224
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800225 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
226 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
227 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
228 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
229 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
230 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
231 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
232 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
233 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
234 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
235 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700250
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800251 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
252 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700253
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800254 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
255 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
256 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
257 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
258 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
259 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700260
Trent Piepho657de3c2006-06-20 00:30:57 -0300261 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800262 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700263
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800264 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
265 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
266 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
267 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
268 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
269 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800270 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
271 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800272 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800274 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
275 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800277 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
278 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
279 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
280 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800282 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283
Scott Alfter1ebba672007-04-02 14:22:39 -0300284 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
285 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
286
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700287 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800288 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700289
Steven Tothcd1257d2006-01-09 15:25:01 -0200290 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
291 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
292
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700293 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800294 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200295 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
296 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800297 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
298 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
299 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
300 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200301 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800302 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300303 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800304 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300305 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300306 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300307 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700308
309 { 0, -1, NULL }
310};
311
312/* ----------------------------------------------------------------------- */
313/* array with description for bt848 / bt878 tv/grabber cards */
314
315struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800316 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800317 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800318 .name = " *** UNKNOWN/GENERIC *** ",
319 .video_inputs = 4,
320 .audio_inputs = 1,
321 .tuner = 0,
322 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200323 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300324 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800325 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800326 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800327 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800328 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800329 .name = "MIRO PCTV",
330 .video_inputs = 4,
331 .audio_inputs = 1,
332 .tuner = 0,
333 .svhs = 2,
334 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200335 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300336 .gpiomux = { 2, 0, 0, 0 },
337 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800338 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300339 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800340 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800341 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800342 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800343 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800344 .name = "Hauppauge (bt848)",
345 .video_inputs = 4,
346 .audio_inputs = 1,
347 .tuner = 0,
348 .svhs = 2,
349 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200350 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300351 .gpiomux = { 0, 1, 2, 3 },
352 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800353 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300354 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800355 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800356 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800357 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800358 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800359 .name = "STB, Gateway P/N 6000699 (bt848)",
360 .video_inputs = 3,
361 .audio_inputs = 1,
362 .tuner = 0,
363 .svhs = 2,
364 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200365 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300366 .gpiomux = { 4, 0, 2, 3 },
367 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800368 .no_msp34xx = 1,
369 .needs_tvaudio = 1,
370 .tuner_type = TUNER_PHILIPS_NTSC,
371 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800372 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800373 .pll = PLL_28,
374 .has_radio = 1,
375 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800377 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800378 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800379 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
380 .video_inputs = 4,
381 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300382 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800383 .svhs = 2,
384 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200385 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300386 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300388 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800390 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800391 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800392 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800393 .name = "Diamond DTV2000",
394 .video_inputs = 4,
395 .audio_inputs = 1,
396 .tuner = 0,
397 .svhs = 2,
398 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200399 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300400 .gpiomux = { 0, 1, 0, 1 },
401 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800402 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300403 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800404 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800405 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800406 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800407 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800408 .name = "AVerMedia TVPhone",
409 .video_inputs = 3,
410 .audio_inputs = 1,
411 .tuner = 0,
412 .svhs = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200413 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800414 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300415 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800416 /* 0x04 for some cards ?? */
417 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300418 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800420 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300421 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .has_remote = 1,
423 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800424 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800425 .name = "MATRIX-Vision MV-Delta",
426 .video_inputs = 5,
427 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300428 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800429 .svhs = 3,
430 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200431 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300432 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800433 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300434 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800435 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800436 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800437 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700438
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800439 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800440 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800441 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
442 .video_inputs = 4,
443 .audio_inputs = 1,
444 .tuner = 0,
445 .svhs = 2,
446 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200447 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300448 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
449 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800450 .needs_tvaudio = 1,
451 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300452 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800454 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800455 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800456 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800457 .name = "IMS/IXmicro TurboTV",
458 .video_inputs = 3,
459 .audio_inputs = 1,
460 .tuner = 0,
461 .svhs = 2,
462 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200463 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300464 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800465 .needs_tvaudio = 0,
466 .pll = PLL_28,
467 .tuner_type = TUNER_TEMIC_PAL,
468 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800469 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800470 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800471 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800472 .name = "Hauppauge (bt878)",
473 .video_inputs = 4,
474 .audio_inputs = 1,
475 .tuner = 0,
476 .svhs = 2,
477 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -0200478 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300479 .gpiomux = { 0, 1, 2, 3 },
480 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800481 .needs_tvaudio = 1,
482 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300483 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800484 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800485 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800486 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800487 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800488 .name = "MIRO PCTV pro",
489 .video_inputs = 3,
490 .audio_inputs = 1,
491 .tuner = 0,
492 .svhs = 2,
493 .gpiomask = 0x3014f,
Michael Krufkybc286362006-01-11 19:40:17 -0200494 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300495 .gpiomux = { 0x20001,0x10001, 0, 0 },
496 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800497 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300498 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800500 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800501 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700502
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800503 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800504 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800505 .name = "ADS Technologies Channel Surfer TV (bt848)",
506 .video_inputs = 3,
507 .audio_inputs = 1,
508 .tuner = 0,
509 .svhs = 2,
510 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200511 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300512 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300514 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800515 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800516 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800517 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800518 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800519 .name = "AVerMedia TVCapture 98",
520 .video_inputs = 3,
521 .audio_inputs = 4,
522 .tuner = 0,
523 .svhs = 2,
524 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200525 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300526 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800527 .needs_tvaudio = 1,
528 .msp34xx_alt = 1,
529 .pll = PLL_28,
530 .tuner_type = TUNER_PHILIPS_PAL,
531 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800532 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300533 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800534 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800535 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800536 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800537 .name = "Aimslab Video Highway Xtreme (VHX)",
538 .video_inputs = 3,
539 .audio_inputs = 1,
540 .tuner = 0,
541 .svhs = 2,
542 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200543 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300544 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
545 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800546 .needs_tvaudio = 1,
547 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300548 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800549 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800550 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800551 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800552 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800553 .name = "Zoltrix TV-Max",
554 .video_inputs = 3,
555 .audio_inputs = 1,
556 .tuner = 0,
557 .svhs = 2,
558 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200559 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300560 .gpiomux = { 0, 0, 1, 0 },
561 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300563 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800564 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800565 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800566 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800568 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800569 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800570 .name = "Prolink Pixelview PlayTV (bt878)",
571 .video_inputs = 3,
572 .audio_inputs = 1,
573 .tuner = 0,
574 .svhs = 2,
575 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200576 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800577 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300578 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
579 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800580 .needs_tvaudio = 1,
581 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300582 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300583 .tuner_addr = ADDR_UNSET,
584 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800585 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800586 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800587 .name = "Leadtek WinView 601",
588 .video_inputs = 3,
589 .audio_inputs = 1,
590 .tuner = 0,
591 .svhs = 2,
592 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200593 .muxsel = { 2, 3, 1, 1,0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300594 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
595 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800596 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300597 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800599 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300600 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800601 .has_radio = 1,
602 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800603 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800604 .name = "AVEC Intercapture",
605 .video_inputs = 3,
606 .audio_inputs = 2,
607 .tuner = 0,
608 .svhs = 2,
609 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200610 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300611 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800612 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300613 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800614 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800615 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800616 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800617 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800618 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
619 .video_inputs = 4,
620 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300621 .tuner = UNSET,
622 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800623 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200624 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300625 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800626 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300627 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800629 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800630 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700631
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800632 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800633 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800634 .name = "CEI Raffles Card",
635 .video_inputs = 3,
636 .audio_inputs = 3,
637 .tuner = 0,
638 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200639 .muxsel = { 2, 3, 1, 1 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300640 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800641 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800642 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800643 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800644 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800645 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
646 .video_inputs = 4,
647 .audio_inputs = 2, /* tuner, line in */
648 .tuner = 0,
649 .svhs = 2,
650 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200651 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300652 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
653 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800654 .pll = PLL_28,
655 .tuner_type = TUNER_PHILIPS_PAL_I,
656 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800657 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800658 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800659 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800660 .name = "Askey CPH050/ Phoebe Tv Master + FM",
661 .video_inputs = 3,
662 .audio_inputs = 1,
663 .tuner = 0,
664 .svhs = 2,
665 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200666 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300667 .gpiomux = { 0, 1, 0x800, 0x400 },
668 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800669 .needs_tvaudio = 1,
670 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300671 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800672 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800673 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800674 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800675 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800676 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
677 .video_inputs = 3,
678 .audio_inputs = 1,
679 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300680 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800681 .gpiomask = 7,
682 .muxsel = { 2, 3, -1 },
683 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300684 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800685 .no_msp34xx = 1,
686 .pll = PLL_28,
687 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
688 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800689 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700691
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800692 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800693 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800694 .name = "Askey CPH05X/06X (bt878) [many vendors]",
695 .video_inputs = 3,
696 .audio_inputs = 1,
697 .tuner = 0,
698 .svhs = 2,
699 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200700 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300701 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
702 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800703 .needs_tvaudio = 1,
704 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300705 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800706 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800707 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800708 .has_remote = 1,
709 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800710 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800711 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
712 .video_inputs = 3,
713 .audio_inputs = 1,
714 .tuner = 0,
715 .svhs = 2,
716 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200717 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300718 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
719 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800720 .needs_tvaudio = 0,
721 .tuner_type = TUNER_PHILIPS_PAL,
722 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800723 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300724 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800725 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800726 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800727 .name = "Hauppauge WinCam newer (bt878)",
728 .video_inputs = 4,
729 .audio_inputs = 1,
730 .tuner = 0,
731 .svhs = 3,
732 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200733 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300734 .gpiomux = { 0, 1, 2, 3 },
735 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800736 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300737 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800738 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800739 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800740 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800741 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800742 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
743 .video_inputs = 4,
744 .audio_inputs = 2,
745 .tuner = 0,
746 .svhs = 2,
747 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200748 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300749 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
750 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 .pll = PLL_28,
752 .tuner_type = TUNER_PHILIPS_SECAM,
753 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800754 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800755 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700756
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800757 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800758 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800759 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
760 .video_inputs = 3,
761 .audio_inputs = 1,
762 .tuner = 0,
763 .svhs = 2,
764 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200765 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300766 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
767 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800768 .needs_tvaudio = 0,
769 .tuner_type = TUNER_PHILIPS_PAL,
770 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800771 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300772 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800773 /* GPIO wiring:
774 External 20 pin connector (for Active Radio Upgrade board)
775 gpio00: i2c-sda
776 gpio01: i2c-scl
777 gpio02: om5610-data
778 gpio03: om5610-clk
779 gpio04: om5610-wre
780 gpio05: om5610-stereo
781 gpio06: rds6588-davn
782 gpio07: Pin 7 n.c.
783 gpio08: nIOW
784 gpio09+10: nIOR, nSEL ?? (bt878)
785 gpio09: nIOR (bt848)
786 gpio10: nSEL (bt848)
787 Sound Routing:
788 gpio16: u2-A0 (1st 4052bt)
789 gpio17: u2-A1
790 gpio18: u2-nEN
791 gpio19: u4-A0 (2nd 4052)
792 gpio20: u4-A1
793 u4-nEN - GND
794 Btspy:
795 00000 : Cdrom (internal audio input)
796 10000 : ext. Video audio input
797 20000 : TV Mono
798 a0000 : TV Mono/2
799 1a0000 : TV Stereo
800 30000 : Radio
801 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700802 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700803
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800804 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800805 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800806 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
807 .name = "Imagenation PXC200",
808 .video_inputs = 5,
809 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300810 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .svhs = 1, /* was: 4 */
812 .gpiomask = 0,
813 .muxsel = { 2, 3, 1, 0, 0},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300814 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300816 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800817 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800818 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800819 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700820
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800821 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800822 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800823 .name = "Lifeview FlyVideo 98 LR50",
824 .video_inputs = 4,
825 .audio_inputs = 1,
826 .tuner = 0,
827 .svhs = 2,
828 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200829 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300830 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
831 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800832 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300833 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800834 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800835 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800836 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800837 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800838 .name = "Formac iProTV, Formac ProTV I (bt848)",
839 .video_inputs = 4,
840 .audio_inputs = 1,
841 .tuner = 0,
842 .svhs = 3,
843 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200844 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300845 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 .pll = PLL_28,
847 .tuner_type = TUNER_PHILIPS_PAL,
848 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800849 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800850 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700851
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800852 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800853 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800854 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
855 .video_inputs = 4,
856 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300857 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800858 .svhs = 2,
859 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200860 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300861 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800862 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300863 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800864 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800865 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800866 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800867 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800868 .name = "Terratec TerraTValue Version Bt878",
869 .video_inputs = 3,
870 .audio_inputs = 1,
871 .tuner = 0,
872 .svhs = 2,
873 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200874 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300875 .gpiomux = { 0x500, 0, 0x300, 0x900 },
876 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800877 .needs_tvaudio = 1,
878 .pll = PLL_28,
879 .tuner_type = TUNER_PHILIPS_PAL,
880 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800881 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800882 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800883 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800884 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
885 .video_inputs = 4,
886 .audio_inputs = 1,
887 .tuner = 0,
888 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200889 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800890 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
891 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300892 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
893 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800894 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
895 gpio23 -- hef4052:nEnable (0x800000)
896 gpio12 -- hef4052:A1
897 gpio13 -- hef4052:A0
898 0x0000: external audio
899 0x1000: FM
900 0x2000: TV
901 0x3000: n.c.
902 Note: There exists another variant "Winfast 2000" with tv stereo !?
903 Note: eeprom only contains FF and pci subsystem id 107d:6606
904 */
905 .needs_tvaudio = 0,
906 .pll = PLL_28,
907 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300908 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800909 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800910 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300911 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800912 .has_remote = 1,
913 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800914 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800915 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
916 .video_inputs = 4,
917 .audio_inputs = 3,
918 .tuner = 0,
919 .svhs = 2,
920 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200921 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300922 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
923 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800924 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300925 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800927 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800928 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700929
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800930 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800931 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800932 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
933 .video_inputs = 4,
934 .audio_inputs = 3,
935 .tuner = 0,
936 .svhs = 2,
937 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200938 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300939 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
940 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800941 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300942 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800943 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800944 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800945 .has_radio = 1,
946 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800947 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800948 .name = "Prolink PixelView PlayTV pro",
949 .video_inputs = 3,
950 .audio_inputs = 1,
951 .tuner = 0,
952 .svhs = 2,
953 .gpiomask = 0xff,
954 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300955 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
956 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800957 .no_msp34xx = 1,
958 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300959 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800961 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800962 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800963 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800964 .name = "Askey CPH06X TView99",
965 .video_inputs = 4,
966 .audio_inputs = 1,
967 .tuner = 0,
968 .svhs = 2,
969 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200970 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300971 .gpiomux = { 0x551400, 0x551200, 0, 0 },
972 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800973 .needs_tvaudio = 1,
974 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300975 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800976 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800977 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800978 .has_remote = 1,
979 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800980 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800981 .name = "Pinnacle PCTV Studio/Rave",
982 .video_inputs = 3,
983 .audio_inputs = 1,
984 .tuner = 0,
985 .svhs = 2,
986 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200987 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300988 .gpiomux = { 2, 0xd0001, 0, 0 },
989 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800990 .needs_tvaudio = 0,
991 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300992 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800993 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800994 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800995 },
996
997 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800998 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800999 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
1000 .video_inputs = 3,
1001 .audio_inputs = 1,
1002 .tuner = 0,
1003 .svhs = 2,
1004 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001005 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001006 .gpiomux = { 4, 0, 2, 3 },
1007 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001008 .no_msp34xx = 1,
1009 .needs_tvaudio = 1,
1010 .tuner_type = TUNER_PHILIPS_NTSC,
1011 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001012 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001013 .pll = PLL_28,
1014 .has_radio = 1,
1015 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001016 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001017 .name = "AVerMedia TVPhone 98",
1018 .video_inputs = 3,
1019 .audio_inputs = 4,
1020 .tuner = 0,
1021 .svhs = 2,
1022 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001023 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001024 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001025 .needs_tvaudio = 1,
1026 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001027 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001029 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001031 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001032 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001033 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001034 .name = "ProVideo PV951", /* pic16c54 */
1035 .video_inputs = 3,
1036 .audio_inputs = 1,
1037 .tuner = 0,
1038 .svhs = 2,
1039 .gpiomask = 0,
1040 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001041 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001042 .needs_tvaudio = 1,
1043 .no_msp34xx = 1,
1044 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001045 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001046 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001047 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001048 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001049 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001050 .name = "Little OnAir TV",
1051 .video_inputs = 3,
1052 .audio_inputs = 1,
1053 .tuner = 0,
1054 .svhs = 2,
1055 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001056 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001057 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1058 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001059 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001060 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001062 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001063 },
1064
1065 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001066 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001067 .name = "Sigma TVII-FM",
1068 .video_inputs = 2,
1069 .audio_inputs = 1,
1070 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001071 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001072 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001073 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001074 .gpiomux = { 1, 1, 0, 2 },
1075 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001076 .no_msp34xx = 1,
1077 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001078 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001080 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001081 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001082 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001083 .name = "MATRIX-Vision MV-Delta 2",
1084 .video_inputs = 5,
1085 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001086 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001087 .svhs = 3,
1088 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001089 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001090 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001091 .no_msp34xx = 1,
1092 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001093 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001094 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001095 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001096 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001097 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001098 .name = "Zoltrix Genie TV/FM",
1099 .video_inputs = 3,
1100 .audio_inputs = 1,
1101 .tuner = 0,
1102 .svhs = 2,
1103 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001104 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001105 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1106 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001107 .no_msp34xx = 1,
1108 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001109 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001111 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001112 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001113 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001114 .name = "Terratec TV/Radio+",
1115 .video_inputs = 3,
1116 .audio_inputs = 1,
1117 .tuner = 0,
1118 .svhs = 2,
1119 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001120 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001121 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1122 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001123 .needs_tvaudio = 1,
1124 .no_msp34xx = 1,
1125 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001126 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001127 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001128 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001129 .has_radio = 1,
1130 },
1131
1132 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001133 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001134 .name = "Askey CPH03x/ Dynalink Magic TView",
1135 .video_inputs = 3,
1136 .audio_inputs = 1,
1137 .tuner = 0,
1138 .svhs = 2,
1139 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001140 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001141 .gpiomux = {2,0,0,0 },
1142 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001143 .needs_tvaudio = 1,
1144 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001145 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001146 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001147 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001148 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001149 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001150 .name = "IODATA GV-BCTV3/PCI",
1151 .video_inputs = 3,
1152 .audio_inputs = 1,
1153 .tuner = 0,
1154 .svhs = 2,
1155 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001156 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001157 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001158 .no_msp34xx = 1,
1159 .pll = PLL_28,
1160 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1161 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001162 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001163 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001164 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001165 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001166 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1167 .video_inputs = 5,
1168 .audio_inputs = 1,
1169 .tuner = 0,
1170 .svhs = 3,
1171 .gpiomask = 0xAA0000,
1172 .muxsel = { 2,3,1,1,-1 },
1173 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001174 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1175 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001176 .no_msp34xx = 1,
1177 .pll = PLL_28,
1178 .tuner_type = TUNER_PHILIPS_PAL_I,
1179 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001180 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001181 .has_remote = 1,
1182 /* GPIO wiring: (different from Rev.4C !)
1183 GPIO17: U4.A0 (first hef4052bt)
1184 GPIO19: U4.A1
1185 GPIO20: U5.A1 (second hef4052bt)
1186 GPIO21: U4.nEN
1187 GPIO22: BT832 Reset Line
1188 GPIO23: A5,A0, U5,nEN
1189 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1190 */
1191 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001192 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001193 .name = "Eagle Wireless Capricorn2 (bt878A)",
1194 .video_inputs = 4,
1195 .audio_inputs = 1,
1196 .tuner = 0,
1197 .svhs = 2,
1198 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001199 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001200 .gpiomux = { 0, 1, 2, 3 },
1201 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001202 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001203 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001204 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001205 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001206 },
1207
1208 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001209 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001210 /* David Härdeman <david@2gen.com> */
1211 .name = "Pinnacle PCTV Studio Pro",
1212 .video_inputs = 4,
1213 .audio_inputs = 1,
1214 .tuner = 0,
1215 .svhs = 3,
1216 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001217 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001218 .gpiomux = { 1, 0xd0001, 0, 0 },
1219 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001220 /* sound path (5 sources):
1221 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1222 0= ext. Audio IN
1223 1= from MUX2
1224 2= Mono TV sound from Tuner
1225 3= not connected
1226 MUX2 (mask 0x30000):
1227 0,2,3= from MSP34xx
1228 1= FM stereo Radio from Tuner */
1229 .needs_tvaudio = 0,
1230 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001231 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001232 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001233 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001234 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001235 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001236 /* Claas Langbehn <claas@bigfoot.com>,
1237 Sven Grothklags <sven@upb.de> */
1238 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1239 .video_inputs = 4,
1240 .audio_inputs = 3,
1241 .tuner = 0,
1242 .svhs = 2,
1243 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001244 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001245 .gpiomux = { 0, 0, 0x10, 8 },
1246 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001247 .needs_tvaudio = 1,
1248 .pll = PLL_28,
1249 .tuner_type = TUNER_PHILIPS_PAL,
1250 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001251 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001252 .has_radio = 1,
1253 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001254 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001255 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001256 in de.comp.os.unix.linux.hardware:
1257 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001258 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001259 options tuner type=5 */
1260 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1261 .video_inputs = 4,
1262 .audio_inputs = 1,
1263 .tuner = 0,
1264 .svhs = 2,
1265 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001266 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001267 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1268 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001269 /* For cards with tda9820/tda9821:
1270 0x0000: Tuner normal stereo
1271 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1272 0x0880: Tuner A2 stereo */
1273 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001274 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001275 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001276 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001277 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001278 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001279 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1280 old Easy TV BT848 version (model CPH031) */
1281 .name = "Askey CPH031/ BESTBUY Easy TV",
1282 .video_inputs = 4,
1283 .audio_inputs = 1,
1284 .tuner = 0,
1285 .svhs = 2,
1286 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001287 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001288 .gpiomux = { 2, 0, 0, 0 },
1289 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001290 .needs_tvaudio = 0,
1291 .pll = PLL_28,
1292 .tuner_type = TUNER_TEMIC_PAL,
1293 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001294 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001295 },
1296
1297 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001298 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001299 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1300 .name = "Lifeview FlyVideo 98FM LR50",
1301 .video_inputs = 4,
1302 .audio_inputs = 3,
1303 .tuner = 0,
1304 .svhs = 2,
1305 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001306 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001307 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1308 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001309 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001310 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001311 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001312 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001313 },
1314 /* This is the ultimate cheapo capture card
1315 * just a BT848A on a small PCB!
1316 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001317 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1319 .video_inputs = 2,
1320 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001321 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001322 .svhs = 1,
1323 .gpiomask = 0,
1324 .muxsel = { 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001325 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001326 .needs_tvaudio = 0,
1327 .no_msp34xx = 1,
1328 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001329 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001330 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001331 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001332 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001333 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001334 /* Daniel Herrington <daniel.herrington@home.com> */
1335 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1336 .video_inputs = 3,
1337 .audio_inputs = 1,
1338 .tuner = 0,
1339 .svhs = 2,
1340 .gpiomask = 0xe00,
1341 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001342 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1343 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001344 .needs_tvaudio = 1,
1345 .pll = PLL_28,
1346 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1347 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001348 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001349 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001350 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001351 /* Matti Mottus <mottus@physic.ut.ee> */
1352 .name = "Askey CPH03x TV Capturer",
1353 .video_inputs = 4,
1354 .audio_inputs = 1,
1355 .tuner = 0,
1356 .svhs = 2,
1357 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001358 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001359 .gpiomux = { 2, 0, 0, 0 },
1360 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001361 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001362 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001363 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001364 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001365 },
1366
1367 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001368 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001369 /* Philip Blundell <philb@gnu.org> */
1370 .name = "Modular Technology MM100PCTV",
1371 .video_inputs = 2,
1372 .audio_inputs = 2,
1373 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001374 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001375 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001376 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001377 .gpiomux = { 2, 0, 0, 1 },
1378 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001379 .pll = PLL_35,
1380 .tuner_type = TUNER_TEMIC_PAL,
1381 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001382 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001383 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001384 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001386 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001387 .video_inputs = 2,
1388 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001389 .tuner = UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001390 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001391 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001392 .muxsel = { 2, 2 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001393 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001394 .no_msp34xx = 1,
1395 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001396 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001397 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001398 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001399 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001400 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001401 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001402 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1403 new Easy TV BT878 version (model CPH061)
1404 special thanks to Informatica Mieres for providing the card */
1405 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1406 .video_inputs = 3,
1407 .audio_inputs = 2,
1408 .tuner = 0,
1409 .svhs = 2,
1410 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001411 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001412 .gpiomux = { 1, 0, 4, 4 },
1413 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001414 .needs_tvaudio = 0,
1415 .pll = PLL_28,
1416 .tuner_type = TUNER_PHILIPS_PAL,
1417 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001418 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001419 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001420 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001421 /* Lukas Gebauer <geby@volny.cz> */
1422 .name = "ATI TV-Wonder",
1423 .video_inputs = 3,
1424 .audio_inputs = 1,
1425 .tuner = 0,
1426 .svhs = 2,
1427 .gpiomask = 0xf03f,
1428 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001429 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1430 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001431 .pll = PLL_28,
1432 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1433 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001434 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001435 },
1436
1437 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001438 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001439 /* Lukas Gebauer <geby@volny.cz> */
1440 .name = "ATI TV-Wonder VE",
1441 .video_inputs = 2,
1442 .audio_inputs = 1,
1443 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001444 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001445 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001446 .muxsel = { 2, 3, 0, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001447 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001448 .no_msp34xx = 1,
1449 .pll = PLL_28,
1450 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1451 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001452 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001453 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001454 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001455 /* DeeJay <deejay@westel900.net (2000S) */
1456 .name = "Lifeview FlyVideo 2000S LR90",
1457 .video_inputs = 3,
1458 .audio_inputs = 3,
1459 .tuner = 0,
1460 .svhs = 2,
1461 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001462 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001463 /* Radio changed from 1e80 to 0x800 to make
1464 FlyVideo2000S in .hu happy (gm)*/
1465 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001466 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1467 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001468 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001469 .no_msp34xx = 1,
1470 .no_tda9875 = 1,
1471 .needs_tvaudio = 1,
1472 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001473 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001474 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001475 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001476 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001477 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001478 .name = "Terratec TValueRadio",
1479 .video_inputs = 3,
1480 .audio_inputs = 1,
1481 .tuner = 0,
1482 .svhs = 2,
1483 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001484 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001485 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1486 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001487 .needs_tvaudio = 1,
1488 .pll = PLL_28,
1489 .tuner_type = TUNER_PHILIPS_PAL,
1490 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001491 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001492 .has_radio = 1,
1493 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001494 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001495 /* TANAKA Kei <peg00625@nifty.com> */
1496 .name = "IODATA GV-BCTV4/PCI",
1497 .video_inputs = 3,
1498 .audio_inputs = 1,
1499 .tuner = 0,
1500 .svhs = 2,
1501 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001502 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001503 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001504 .no_msp34xx = 1,
1505 .pll = PLL_28,
1506 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1507 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001508 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001509 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001510 },
1511
1512 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001513 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001514 .name = "3Dfx VoodooTV FM (Euro)",
1515 /* try "insmod msp3400 simple=0" if you have
1516 * sound problems with this card. */
1517 .video_inputs = 4,
1518 .audio_inputs = 1,
1519 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001520 .svhs = UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001521 .gpiomask = 0x4f8a00,
1522 /* 0x100000: 1=MSP enabled (0=disable again)
1523 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1524 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1525 .gpiomute = 0x947fff,
1526 /* tvtuner, radio, external,internal, mute, stereo
1527 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1528 .muxsel = { 2, 3 ,0 ,1 },
1529 .tuner_type = TUNER_MT2032,
1530 .tuner_addr = ADDR_UNSET,
1531 .radio_addr = ADDR_UNSET,
1532 .pll = PLL_28,
1533 .has_radio = 1,
1534 },
1535 [BTTV_BOARD_VOODOOTV_200] = {
1536 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001537 /* try "insmod msp3400 simple=0" if you have
1538 * sound problems with this card. */
1539 .video_inputs = 4,
1540 .audio_inputs = 1,
1541 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001542 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001543 .gpiomask = 0x4f8a00,
1544 /* 0x100000: 1=MSP enabled (0=disable again)
1545 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001546 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1547 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001548 /* tvtuner, radio, external,internal, mute, stereo
1549 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001550 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001551 .tuner_type = TUNER_MT2032,
1552 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001553 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001554 .pll = PLL_28,
1555 .has_radio = 1,
1556 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001557 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001558 /* Philip Blundell <pb@nexus.co.uk> */
1559 .name = "Active Imaging AIMMS",
1560 .video_inputs = 1,
1561 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001562 .tuner = UNSET,
1563 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001564 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001565 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001566 .pll = PLL_28,
1567 .muxsel = { 2 },
1568 .gpiomask = 0
1569 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001570 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001571 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1572 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1573 .video_inputs = 3,
1574 .audio_inputs = 4,
1575 .tuner = 0,
1576 .svhs = 2,
1577 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001578 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001579 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1580 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001581 .needs_tvaudio = 1,
1582 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001583 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001584 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001585 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001586 .has_remote = 1,
1587 /* GPIO wiring:
1588 GPIO0: U4.A0 (hef4052bt)
1589 GPIO1: U4.A1
1590 GPIO2: U4.A1 (second hef4052bt)
1591 GPIO3: U4.nEN, U5.A0, A5.nEN
1592 GPIO8-15: vrd866b ?
1593 */
1594 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001595 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001596 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1597 .video_inputs = 4,
1598 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001599 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001600 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001601 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001602 .pll = PLL_28,
1603 .no_msp34xx = 1,
1604 .tuner_type = UNSET,
1605 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001606 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001607 },
1608
1609 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001610 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001611 /* Dariusz Kowalewski <darekk@automex.pl> */
1612 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1613 .video_inputs = 4,
1614 .audio_inputs = 1,
1615 .tuner = 0,
1616 .svhs = 2,
1617 .gpiomask = 0x3f,
1618 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001619 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1620 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001621 .needs_tvaudio = 1,
1622 .no_msp34xx = 1,
1623 .no_tda9875 = 1,
1624 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001625 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001626 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001627 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001628 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001629 .has_radio = 1, /* Note: not all cards have radio */
1630 .has_remote = 1,
1631 /* GPIO wiring:
1632 GPIO0: A0 hef4052
1633 GPIO1: A1 hef4052
1634 GPIO3: nEN hef4052
1635 GPIO8-15: vrd866b
1636 GPIO20,22,23: R30,R29,R28
1637 */
1638 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001639 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001640 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1641 /* you must jumper JP5 for the card to work */
1642 .name = "Sensoray 311",
1643 .video_inputs = 5,
1644 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001645 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .svhs = 4,
1647 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001648 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001649 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001650 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001651 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001652 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001653 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001654 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001655 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001656 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1657 .name = "RemoteVision MX (RV605)",
1658 .video_inputs = 16,
1659 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001660 .tuner = UNSET,
1661 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001662 .gpiomask = 0x00,
1663 .gpiomask2 = 0x07ff,
1664 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1665 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1666 .no_msp34xx = 1,
1667 .no_tda9875 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001668 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001669 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001670 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001671 .muxsel_hook = rv605_muxsel,
1672 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001673 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001674 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1675 .video_inputs = 3,
1676 .audio_inputs = 2,
1677 .tuner = 0,
1678 .svhs = 2,
1679 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1680 .muxsel = { 2, 1, 1, },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001681 .gpiomux = { 0, 1, 2, 2 },
1682 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001683 .needs_tvaudio = 0,
1684 .tuner_type = TUNER_PHILIPS_PAL,
1685 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001686 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001687 .pll = PLL_28,
1688 .has_radio = 1,
1689 },
1690
1691 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001692 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001693 /* Masaki Suzuki <masaki@btree.org> */
1694 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1695 .video_inputs = 3,
1696 .audio_inputs = 1,
1697 .tuner = 0,
1698 .svhs = 2,
1699 .gpiomask = 0x140007,
1700 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001701 .gpiomux = { 0, 1, 2, 3 },
1702 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001703 .tuner_type = TUNER_PHILIPS_NTSC,
1704 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001705 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001706 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001707 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001708 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001709 .name = "GrandTec Multi Capture Card (Bt878)",
1710 .video_inputs = 4,
1711 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001712 .tuner = UNSET,
1713 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001714 .gpiomask = 0,
1715 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001716 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .needs_tvaudio = 0,
1718 .no_msp34xx = 1,
1719 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001720 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001721 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001722 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001723 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001724 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001725 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1726 .video_inputs = 4,
1727 .audio_inputs = 3,
1728 .tuner = 0,
1729 .svhs = 2,
1730 .gpiomask = 7,
1731 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001732 .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 -08001733 * This card lacks external Audio In, so we mute it on Ext. & Int.
1734 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1735 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001736 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001737 * btwincap uses 0x80000/0x80003
1738 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001739 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001740 .needs_tvaudio = 0,
1741 .no_msp34xx = 1,
1742 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001743 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001744 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001745 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1747 radio signal strength indicators work fine. */
1748 .has_radio = 1,
1749 /* GPIO Info:
1750 GPIO0,1: HEF4052 A0,A1
1751 GPIO2: HEF4052 nENABLE
1752 GPIO3-7: n.c.
1753 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1754 GPIO14,15: ??
1755 GPIO16-21: n.c.
1756 GPIO22,23: ??
1757 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1758 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001759 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001760 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1761 .name = "DSP Design TCVIDEO",
1762 .video_inputs = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001763 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02001764 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001765 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001766 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001767 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001768 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001769 },
1770
1771 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001772 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001773 .name = "Hauppauge WinTV PVR",
1774 .video_inputs = 4,
1775 .audio_inputs = 1,
1776 .tuner = 0,
1777 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001778 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001779 .needs_tvaudio = 1,
1780 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001781 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001782 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001783 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001784
1785 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001786 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001788 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001789 .name = "IODATA GV-BCTV5/PCI",
1790 .video_inputs = 3,
1791 .audio_inputs = 1,
1792 .tuner = 0,
1793 .svhs = 2,
1794 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001795 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001796 .gpiomux = {0x030000, 0x010000, 0, 0 },
1797 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .no_msp34xx = 1,
1799 .pll = PLL_28,
1800 .tuner_type = TUNER_PHILIPS_NTSC_M,
1801 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001802 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001803 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001804 .has_radio = 1,
1805 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001806 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001807 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1808 .video_inputs = 4, /* id-inputs-clock */
1809 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001810 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .svhs = 3,
1812 .muxsel = { 3, 2, 0, 1 },
1813 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001814 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001815 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001816 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001817 .no_msp34xx = 1,
1818 .no_tda9875 = 1,
1819 .no_tda7432 = 1,
1820 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001821 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001822 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1823 .video_inputs = 3,
1824 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001825 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .svhs = 2,
1827 .muxsel = { 2, 3, 1 },
1828 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001829 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001830 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001831 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001832 .no_msp34xx = 1,
1833 .no_tda9875 = 1,
1834 .no_tda7432 = 1,
1835 },
1836
1837 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001838 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001839 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1840 .video_inputs = 2,
1841 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001842 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001843 .svhs = 1,
1844 .muxsel = { 3, 1 },
1845 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001846 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001847 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001848 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001849 .no_msp34xx = 1,
1850 .no_tda9875 = 1,
1851 .no_tda7432 = 1,
1852 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001853 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001854 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1855 .video_inputs = 1,
1856 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001857 .tuner = UNSET,
1858 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001859 .muxsel = { 0 },
1860 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001861 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001862 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001863 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001864 .no_msp34xx = 1,
1865 .no_tda9875 = 1,
1866 .no_tda7432 = 1,
1867 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001868 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001869 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1870 .video_inputs = 2,
1871 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001872 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001873 .svhs = 1,
1874 .muxsel = { 0, 1 },
1875 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001876 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001877 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001878 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001879 .no_msp34xx = 1,
1880 .no_tda9875 = 1,
1881 .no_tda7432 = 1,
1882 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001883 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001884 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1885 .video_inputs = 1,
1886 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001887 .tuner = UNSET,
1888 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001889 .muxsel = { 0 },
1890 .pll = PLL_28,
1891 .tuner_type = UNSET,
1892 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001893 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001894 .no_msp34xx = 1,
1895 .no_tda9875 = 1,
1896 .no_tda7432 = 1,
1897 },
1898
1899 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001900 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001901 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1902 .video_inputs = 2,
1903 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001904 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .svhs = 1,
1906 .muxsel = { 0, 1 },
1907 .pll = PLL_28,
1908 .tuner_type = UNSET,
1909 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001910 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001911 .no_msp34xx = 1,
1912 .no_tda9875 = 1,
1913 .no_tda7432 = 1,
1914 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001915 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001916 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 .video_inputs = 2,
1918 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001919 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 .svhs = 1,
1921 .muxsel = { 2, 3 },
1922 .pll = PLL_28,
1923 .tuner_type = UNSET,
1924 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001925 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001926 .no_msp34xx = 1,
1927 .no_tda9875 = 1,
1928 .no_tda7432 = 1,
1929 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001930 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001931 .name = "Osprey 500", /* 500 */
1932 .video_inputs = 2,
1933 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001934 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001935 .svhs = 1,
1936 .muxsel = { 2, 3 },
1937 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001938 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001939 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001940 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001941 .no_msp34xx = 1,
1942 .no_tda9875 = 1,
1943 .no_tda7432 = 1,
1944 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001945 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001946 .name = "Osprey 540", /* 540 */
1947 .video_inputs = 4,
1948 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001949 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001950 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001951 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001952 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001953 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001954 .no_msp34xx = 1,
1955 .no_tda9875 = 1,
1956 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001957 },
1958
1959 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001960 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .name = "Osprey 2000", /* 2000 */
1962 .video_inputs = 2,
1963 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001964 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001965 .svhs = 1,
1966 .muxsel = { 2, 3 },
1967 .pll = PLL_28,
1968 .tuner_type = UNSET,
1969 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001970 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001971 .no_msp34xx = 1,
1972 .no_tda9875 = 1,
1973 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1974 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001975 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001976 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1977 .name = "IDS Eagle",
1978 .video_inputs = 4,
1979 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001980 .tuner = UNSET,
1981 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001982 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001983 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001984 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001985 .gpiomask = 0,
1986 .muxsel = { 0, 1, 2, 3 },
1987 .muxsel_hook = eagle_muxsel,
1988 .no_msp34xx = 1,
1989 .no_tda9875 = 1,
1990 .pll = PLL_28,
1991 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001992 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001993 .name = "Pinnacle PCTV Sat",
1994 .video_inputs = 2,
1995 .audio_inputs = 0,
1996 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001997 .tuner = UNSET,
1998 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001999 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002000 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002001 .no_msp34xx = 1,
2002 .no_tda9875 = 1,
2003 .no_tda7432 = 1,
Mauro Carvalho Chehabd2be8932006-10-02 23:52:48 -03002004 .muxsel = { 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002005 .pll = PLL_28,
2006 .no_gpioirq = 1,
2007 .has_dvb = 1,
2008 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002009 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002010 .name = "Formac ProTV II (bt878)",
2011 .video_inputs = 4,
2012 .audio_inputs = 1,
2013 .tuner = 0,
2014 .svhs = 3,
2015 .gpiomask = 2,
2016 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02002017 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002018 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002019 .pll = PLL_28,
2020 .has_radio = 1,
2021 .tuner_type = TUNER_PHILIPS_PAL,
2022 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002023 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002024 /* sound routing:
2025 GPIO=0x00,0x01,0x03: mute (?)
2026 0x02: both TV and radio (tuner: FM1216/I)
2027 The card has onboard audio connectors labeled "cdrom" and "board",
2028 not soldered here, though unknown wiring.
2029 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002030 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002031 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002032
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002033 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002034 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002035 .name = "MachTV",
2036 .video_inputs = 3,
2037 .audio_inputs = 1,
2038 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002039 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002040 .gpiomask = 7,
2041 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002042 .gpiomux = { 0, 1, 2, 3},
2043 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002044 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002045 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002046 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002047 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08002048 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002049 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002050 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002051 .name = "Euresys Picolo",
2052 .video_inputs = 3,
2053 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002054 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002055 .svhs = 2,
2056 .gpiomask = 0,
2057 .no_msp34xx = 1,
2058 .no_tda9875 = 1,
2059 .no_tda7432 = 1,
2060 .muxsel = { 2, 0, 1},
2061 .pll = PLL_28,
2062 .tuner_type = UNSET,
2063 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002064 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002065 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002066 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002067 /* Luc Van Hoeylandt <luc@e-magic.be> */
2068 .name = "ProVideo PV150", /* 0x4f */
2069 .video_inputs = 2,
2070 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002071 .tuner = UNSET,
2072 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002073 .gpiomask = 0,
2074 .muxsel = { 2, 3 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002075 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 .needs_tvaudio = 0,
2077 .no_msp34xx = 1,
2078 .pll = PLL_28,
2079 .tuner_type = UNSET,
2080 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002081 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002082 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002083 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002084 /* Hiroshi Takekawa <sian@big.or.jp> */
2085 /* This card lacks subsystem ID */
2086 .name = "AD-TVK503", /* 0x63 */
2087 .video_inputs = 4,
2088 .audio_inputs = 1,
2089 .tuner = 0,
2090 .svhs = 2,
2091 .gpiomask = 0x001e8007,
2092 .muxsel = { 2, 3, 1, 0 },
2093 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002094 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2095 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002096 .needs_tvaudio = 0,
2097 .no_msp34xx = 1,
2098 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002099 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002100 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002101 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03002102 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002104
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002105 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002106 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002107 .name = "Hercules Smart TV Stereo",
2108 .video_inputs = 4,
2109 .audio_inputs = 1,
2110 .tuner = 0,
2111 .svhs = 2,
2112 .gpiomask = 0x00,
2113 .muxsel = { 2, 3, 1, 1 },
2114 .needs_tvaudio = 1,
2115 .no_msp34xx = 1,
2116 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002117 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002118 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002119 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002120 /* Notes:
2121 - card lacks subsystem ID
2122 - stereo variant w/ daughter board with tda9874a @0xb0
2123 - Audio Routing:
2124 always from tda9874 independent of GPIO (?)
2125 external line in: unknown
2126 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2127 hef4053 (instead 4052) for unknown function
2128 */
2129 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002130 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002131 .name = "Pace TV & Radio Card",
2132 .video_inputs = 4,
2133 .audio_inputs = 1,
2134 .tuner = 0,
2135 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002136 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002137 .gpiomask = 0,
2138 .no_tda9875 = 1,
2139 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002140 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002141 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002142 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002143 .has_radio = 1,
2144 .pll = PLL_28,
2145 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2146 only internal line out: (4pin header) RGGL
2147 Radio must be decoded by msp3410d (not routed through)*/
2148 /*
2149 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2150 */
2151 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002152 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002153 /* Chris Willing <chris@vislab.usyd.edu.au> */
2154 .name = "IVC-200",
2155 .video_inputs = 1,
2156 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002157 .tuner = UNSET,
2158 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002159 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002160 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002161 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002162 .gpiomask = 0xdf,
2163 .muxsel = { 2 },
2164 .pll = PLL_28,
2165 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002166 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .name = "Grand X-Guard / Trust 814PCI",
2168 .video_inputs = 16,
2169 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002170 .tuner = UNSET,
2171 .svhs = UNSET,
2172 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002173 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002174 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002175 .gpiomask2 = 0xff,
2176 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2177 .muxsel_hook = xguard_muxsel,
2178 .no_msp34xx = 1,
2179 .no_tda9875 = 1,
2180 .no_tda7432 = 1,
2181 .pll = PLL_28,
2182 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002183
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002184 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002185 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002186 .name = "Nebula Electronics DigiTV",
2187 .video_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002188 .tuner = UNSET,
2189 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002190 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002191 .no_msp34xx = 1,
2192 .no_tda9875 = 1,
2193 .no_tda7432 = 1,
2194 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002195 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002196 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002197 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002198 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002199 .has_remote = 1,
2200 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002201 .no_gpioirq = 1,
2202 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002203 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002204 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2205 .name = "ProVideo PV143",
2206 .video_inputs = 4,
2207 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002208 .tuner = UNSET,
2209 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002210 .gpiomask = 0,
2211 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002212 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002213 .needs_tvaudio = 0,
2214 .no_msp34xx = 1,
2215 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002216 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002217 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002218 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002219 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002220 [BTTV_BOARD_VD009X1_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002221 /* M.Klahr@phytec.de */
2222 .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
2223 .video_inputs = 4,
2224 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002225 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002226 .svhs = 3,
2227 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002228 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002229 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002230 .needs_tvaudio = 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 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002236 [BTTV_BOARD_VD009X1_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002237 .name = "PHYTEC VD-009-X1 Combi (bt878)",
2238 .video_inputs = 4,
2239 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002240 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002241 .svhs = 3,
2242 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002243 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002244 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002245 .needs_tvaudio = 1,
2246 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002247 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002248 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002249 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002250 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002251
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002252 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002253 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002254 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2255 .video_inputs = 10,
2256 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002257 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002258 .svhs = 9,
2259 .gpiomask = 0x00,
2260 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2261 via the upper nibble of muxsel. here: used for
2262 xternal video-mux */
2263 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002264 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002265 .needs_tvaudio = 1,
2266 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002267 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002268 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002269 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002270 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002271 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002272 .name = "PHYTEC VD-009 Combi (bt878)",
2273 .video_inputs = 10,
2274 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002275 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002276 .svhs = 9,
2277 .gpiomask = 0x00,
2278 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2279 via the upper nibble of muxsel. here: used for
2280 xternal video-mux */
2281 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002282 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002283 .needs_tvaudio = 1,
2284 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002285 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002286 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002287 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002288 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002289 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002290 .name = "IVC-100",
2291 .video_inputs = 4,
2292 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002293 .tuner = UNSET,
2294 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002295 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002296 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002297 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002298 .gpiomask = 0xdf,
2299 .muxsel = { 2, 3, 1, 0 },
2300 .pll = PLL_28,
2301 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002302 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002303 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2304 .name = "IVC-120G",
2305 .video_inputs = 16,
2306 .audio_inputs = 0, /* card has no audio */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002307 .tuner = UNSET, /* card has no tuner */
2308 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002309 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002310 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002311 .svhs = UNSET, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002312 .needs_tvaudio = 0,
2313 .no_msp34xx = 1,
2314 .no_tda9875 = 1,
2315 .no_tda7432 = 1,
2316 .gpiomask = 0x00,
2317 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2318 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2319 .muxsel_hook = ivc120_muxsel,
2320 .pll = PLL_28,
2321 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002322
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002323 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002324 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002325 .name = "pcHDTV HD-2000 TV",
2326 .video_inputs = 4,
2327 .audio_inputs = 1,
2328 .tuner = 0,
2329 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002330 .muxsel = { 2, 3, 1, 0 },
Michael Krufkyab8b8702008-04-22 14:46:05 -03002331 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002332 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002333 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002334 .has_dvb = 1,
2335 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002336 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002337 .name = "Twinhan DST + clones",
2338 .no_msp34xx = 1,
2339 .no_tda9875 = 1,
2340 .no_tda7432 = 1,
2341 .tuner_type = TUNER_ABSENT,
2342 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002343 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002344 .no_video = 1,
2345 .has_dvb = 1,
2346 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002347 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002348 .name = "Winfast VC100",
2349 .video_inputs = 3,
2350 .audio_inputs = 0,
2351 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002352 .tuner = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002353 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002354 .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 .pll = PLL_28,
2361 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002362 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002363 .name = "Teppro TEV-560/InterVision IV-560",
2364 .video_inputs = 3,
2365 .audio_inputs = 1,
2366 .tuner = 0,
2367 .svhs = 2,
2368 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002369 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002370 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002371 .needs_tvaudio = 1,
2372 .tuner_type = TUNER_PHILIPS_PAL,
2373 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002374 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002375 .pll = PLL_35,
2376 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002377
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002378 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002379 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002380 .name = "SIMUS GVC1100",
2381 .video_inputs = 4,
2382 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002383 .tuner = UNSET,
2384 .svhs = UNSET,
2385 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002386 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002387 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002388 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002389 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002390 .gpiomask = 0x3F,
2391 .muxsel_hook = gvc1100_muxsel,
2392 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002393 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002394 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2395 .name = "NGS NGSTV+",
2396 .video_inputs = 3,
2397 .tuner = 0,
2398 .svhs = 2,
2399 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002400 .muxsel = { 2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002401 .gpiomux = { 0, 0, 0, 0 },
2402 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002403 .pll = PLL_28,
2404 .tuner_type = TUNER_PHILIPS_PAL,
2405 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002406 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002407 .has_remote = 1,
2408 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002409 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002410 /* http://linuxmedialabs.com */
2411 .name = "LMLBT4",
2412 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2413 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002414 .tuner = UNSET,
2415 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002416 .muxsel = { 2, 3, 1, 0 },
2417 .no_msp34xx = 1,
2418 .no_tda9875 = 1,
2419 .no_tda7432 = 1,
2420 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002421 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002422 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002423 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002424 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002425 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002426 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2427 .name = "Tekram M205 PRO",
2428 .video_inputs = 3,
2429 .audio_inputs = 1,
2430 .tuner = 0,
2431 .tuner_type = TUNER_PHILIPS_PAL,
2432 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002433 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002434 .svhs = 2,
2435 .needs_tvaudio = 0,
2436 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002437 .muxsel = { 2, 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002438 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002439 .pll = PLL_28,
2440 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002441
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002442 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002443 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002444 /* Javier Cendan Ares <jcendan@lycos.es> */
2445 /* bt878 TV + FM without subsystem ID */
2446 .name = "Conceptronic CONTVFMi",
2447 .video_inputs = 3,
2448 .audio_inputs = 1,
2449 .tuner = 0,
2450 .svhs = 2,
2451 .gpiomask = 0x008007,
2452 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002453 .gpiomux = { 0, 1, 2, 2 },
2454 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002455 .needs_tvaudio = 0,
2456 .pll = PLL_28,
2457 .tuner_type = TUNER_PHILIPS_PAL,
2458 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002459 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002460 .has_remote = 1,
2461 .has_radio = 1,
2462 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002463 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002464 /*Eric DEBIEF <debief@telemsa.com>*/
2465 /*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 -08002466 /* 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 -08002467 /*0x79 in bttv.h*/
2468 .name = "Euresys Picolo Tetra",
2469 .video_inputs = 4,
2470 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002471 .tuner = UNSET,
2472 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002473 .gpiomask = 0,
2474 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2475 .no_msp34xx = 1,
2476 .no_tda9875 = 1,
2477 .no_tda7432 = 1,
2478 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002479 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002480 .pll = PLL_28,
2481 .needs_tvaudio = 0,
2482 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002483 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002484 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002485 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002486 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002487 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002488 /* Spirit TV Tuner from http://spiritmodems.com.au */
2489 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2490 .name = "Spirit TV Tuner",
2491 .video_inputs = 3,
2492 .audio_inputs = 1,
2493 .tuner = 0,
2494 .svhs = 2,
2495 .gpiomask = 0x0000000f,
2496 .muxsel = { 2, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002497 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 .tuner_type = TUNER_TEMIC_PAL,
2499 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002500 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002501 .no_msp34xx = 1,
2502 .no_tda9875 = 1,
2503 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002504 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002505 /* Wolfram Joost <wojo@frokaschwei.de> */
2506 .name = "AVerMedia AVerTV DVB-T 771",
2507 .video_inputs = 2,
2508 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002509 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002510 .tuner_type = TUNER_ABSENT,
2511 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002512 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002513 .muxsel = { 3 , 3 },
2514 .no_msp34xx = 1,
2515 .no_tda9875 = 1,
2516 .no_tda7432 = 1,
2517 .pll = PLL_28,
2518 .has_dvb = 1,
2519 .no_gpioirq = 1,
2520 .has_remote = 1,
2521 },
2522 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002523 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002524 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002525 /* 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 -08002526 .name = "AverMedia AverTV DVB-T 761",
2527 .video_inputs = 2,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002528 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002529 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002530 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002531 .no_msp34xx = 1,
2532 .no_tda9875 = 1,
2533 .no_tda7432 = 1,
2534 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002535 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002536 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002537 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002538 .has_dvb = 1,
2539 .no_gpioirq = 1,
2540 .has_remote = 1,
2541 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002542 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002543 /* andre.schwarz@matrix-vision.de */
2544 .name = "MATRIX Vision Sigma-SQ",
2545 .video_inputs = 16,
2546 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002547 .tuner = UNSET,
2548 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002549 .gpiomask = 0x0,
2550 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2551 3, 3, 3, 3, 3, 3, 3, 3 },
2552 .muxsel_hook = sigmaSQ_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002553 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002554 .no_msp34xx = 1,
2555 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002556 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002557 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002558 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002559 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002560 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002561 /* andre.schwarz@matrix-vision.de */
2562 .name = "MATRIX Vision Sigma-SLC",
2563 .video_inputs = 4,
2564 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002565 .tuner = UNSET,
2566 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002567 .gpiomask = 0x0,
2568 .muxsel = { 2, 2, 2, 2 },
2569 .muxsel_hook = sigmaSLC_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002570 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002571 .no_msp34xx = 1,
2572 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002573 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002574 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002575 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002576 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002577 /* BTTV_BOARD_APAC_VIEWCOMP */
2578 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002579 /* Attila Kondoros <attila.kondoros@chello.hu> */
2580 /* bt878 TV + FM 0x00000000 subsystem ID */
2581 .name = "APAC Viewcomp 878(AMAX)",
2582 .video_inputs = 2,
2583 .audio_inputs = 1,
2584 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002585 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002586 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002587 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002588 .gpiomux = { 2, 0, 0, 0 },
2589 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002590 .needs_tvaudio = 0,
2591 .pll = PLL_28,
2592 .tuner_type = TUNER_PHILIPS_PAL,
2593 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002594 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002595 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2596 .has_radio = 1, /* not every card has radio */
2597 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002598
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002599 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002600 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002601 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2602 .name = "DViCO FusionHDTV DVB-T Lite",
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002603 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002604 .no_msp34xx = 1,
2605 .no_tda9875 = 1,
2606 .no_tda7432 = 1,
2607 .pll = PLL_28,
2608 .no_video = 1,
2609 .has_dvb = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002610 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002611 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002612 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002613 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002614 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002615 /* Steven <photon38@pchome.com.tw> */
2616 .name = "V-Gear MyVCD",
2617 .video_inputs = 3,
2618 .audio_inputs = 1,
2619 .tuner = 0,
2620 .svhs = 2,
2621 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002622 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002623 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2624 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002625 .no_msp34xx = 1,
2626 .pll = PLL_28,
2627 .tuner_type = TUNER_PHILIPS_NTSC_M,
2628 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002629 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002630 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002631 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002632 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002633 /* Rick C <cryptdragoon@gmail.com> */
2634 .name = "Super TV Tuner",
2635 .video_inputs = 4,
2636 .audio_inputs = 1,
2637 .tuner = 0,
2638 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002639 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002640 .tuner_type = TUNER_PHILIPS_NTSC,
2641 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002642 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002643 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002644 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002645 .needs_tvaudio = 1,
2646 .has_radio = 1,
2647 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002648 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002649 /* Chris Fanning <video4linux@haydon.net> */
2650 .name = "Tibet Systems 'Progress DVR' CS16",
2651 .video_inputs = 16,
2652 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002653 .tuner = UNSET,
2654 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002655 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2656 .pll = PLL_28,
2657 .no_msp34xx = 1,
2658 .no_tda9875 = 1,
2659 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002660 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002661 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002662 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002663 .muxsel_hook = tibetCS16_muxsel,
2664 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002665 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002666 /* Bill Brack <wbrack@mmm.com.hk> */
2667 /*
2668 * Note that, because of the card's wiring, the "master"
2669 * BT878A chip (i.e. the one which controls the analog switch
2670 * and must use this card type) is the 2nd one detected. The
2671 * other 3 chips should use card type 0x85, whose description
2672 * follows this one. There is a EEPROM on the card (which is
2673 * connected to the I2C of one of those other chips), but is
2674 * not currently handled. There is also a facility for a
2675 * "monitor", which is also not currently implemented.
2676 */
2677 .name = "Kodicom 4400R (master)",
2678 .video_inputs = 16,
2679 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002680 .tuner = UNSET,
2681 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002682 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002683 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002684 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002685 /* GPIO bits 0-9 used for analog switch:
2686 * 00 - 03: camera selector
2687 * 04 - 06: channel (controller) selector
2688 * 07: data (1->on, 0->off)
2689 * 08: strobe
2690 * 09: reset
2691 * bit 16 is input from sync separator for the channel
2692 */
2693 .gpiomask = 0x0003ff,
2694 .no_gpioirq = 1,
2695 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2696 .pll = PLL_28,
2697 .no_msp34xx = 1,
2698 .no_tda7432 = 1,
2699 .no_tda9875 = 1,
2700 .muxsel_hook = kodicom4400r_muxsel,
2701 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002702 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002703 /* Bill Brack <wbrack@mmm.com.hk> */
2704 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2705 * one which controls the analog switch, and must use the card type)
2706 * is the 2nd one detected. The other 3 chips should use this card
2707 * type
2708 */
2709 .name = "Kodicom 4400R (slave)",
2710 .video_inputs = 16,
2711 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002712 .tuner = UNSET,
2713 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002714 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002715 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002716 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002717 .gpiomask = 0x010000,
2718 .no_gpioirq = 1,
2719 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2720 .pll = PLL_28,
2721 .no_msp34xx = 1,
2722 .no_tda7432 = 1,
2723 .no_tda9875 = 1,
2724 .muxsel_hook = kodicom4400r_muxsel,
2725 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002726 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002727 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002728 /* Michael Henson <mhenson@clarityvi.com> */
2729 /* Adlink RTV24 with special unlock codes */
2730 .name = "Adlink RTV24",
2731 .video_inputs = 4,
2732 .audio_inputs = 1,
2733 .tuner = 0,
2734 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002735 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002736 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002737 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002738 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002739 .pll = PLL_28,
2740 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002741 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002742 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002743 /* Michael Krufky <mkrufky@m1k.net> */
2744 .name = "DViCO FusionHDTV 5 Lite",
2745 .tuner = 0,
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002746 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002747 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002748 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002749 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002750 .audio_inputs = 1,
2751 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002752 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002753 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002754 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2755 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002756 .no_msp34xx = 1,
2757 .no_tda9875 = 1,
2758 .no_tda7432 = 1,
2759 .has_dvb = 1,
2760 },
2761 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002762 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002763 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002764 .name = "Acorp Y878F",
2765 .video_inputs = 3,
2766 .audio_inputs = 1,
2767 .tuner = 0,
2768 .svhs = 2,
2769 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002770 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002771 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2772 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002773 .needs_tvaudio = 1,
2774 .pll = PLL_28,
2775 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2776 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002777 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002778 .has_radio = 1,
2779 },
2780 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002781 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002782 .name = "Conceptronic CTVFMi v2",
2783 .video_inputs = 3,
2784 .audio_inputs = 1,
2785 .tuner = 0,
2786 .svhs = 2,
2787 .gpiomask = 0x001c0007,
2788 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002789 .gpiomux = { 0, 1, 2, 2 },
2790 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002791 .needs_tvaudio = 0,
2792 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002793 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002794 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002795 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002796 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002797 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002798 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002799 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002800 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002801 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2802 .video_inputs = 5,
2803 .audio_inputs = 1,
2804 .tuner = 0,
2805 .svhs = 3,
2806 .gpiomask = 0x01fe00,
2807 .muxsel = { 2,3,1,1,-1 },
2808 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002809 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2810 .gpiomute = 0x12400,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002811 .no_msp34xx = 1,
2812 .pll = PLL_28,
2813 .tuner_type = TUNER_LG_PAL_FM,
2814 .tuner_addr = ADDR_UNSET,
2815 .radio_addr = ADDR_UNSET,
2816 .has_remote = 1,
2817 },
2818 /* ---- card 0x8b ---------------------------------- */
2819 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002820 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002821 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2822 .video_inputs = 3,
2823 .audio_inputs = 1,
2824 .tuner = 0,
2825 .svhs = 2,
2826 .gpiomask = 0x3f,
2827 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002828 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2829 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002830 .no_msp34xx = 1,
2831 .pll = PLL_28,
2832 .tuner_type = TUNER_YMEC_TVF_5533MF,
2833 .tuner_addr = ADDR_UNSET,
2834 .radio_addr = ADDR_UNSET,
2835 .has_radio = 1,
2836 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002837 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002838 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002839 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2840 one external BNC composite input (mux 2)
2841 three internal composite inputs (unknown muxes)
2842 an 18-bit stereo A/D (CS5331A), which has:
2843 one external stereo unblanced (RCA) audio connection
2844 one (or 3?) internal stereo balanced (XLR) audio connection
2845 input is selected via gpio to a 14052B mux
2846 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2847 gain is controlled via an X9221A chip on the I2C bus @0x28
2848 sample rate is controlled via gpio to an MK1413S
2849 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2850 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002851 [BTTV_BOARD_OSPREY440] = {
2852 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002853 .video_inputs = 4,
2854 .audio_inputs = 2, /* this is meaningless */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002855 .tuner = UNSET,
Trent Piephocf784d52007-07-21 21:26:40 -03002856 .svhs = UNSET,
2857 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2858 .gpiomask = 0x303,
2859 .gpiomute = 0x000, /* int + 32kHz */
2860 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002861 .pll = PLL_28,
2862 .tuner_type = UNSET,
2863 .tuner_addr = ADDR_UNSET,
2864 .radio_addr = ADDR_UNSET,
2865 .no_msp34xx = 1,
2866 .no_tda9875 = 1,
2867 .no_tda7432 = 1,
2868 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002869 /* ---- card 0x8d ---------------------------------- */
2870 [BTTV_BOARD_ASOUND_SKYEYE] = {
2871 .name = "Asound Skyeye PCTV",
2872 .video_inputs = 3,
2873 .audio_inputs = 1,
2874 .tuner = 0,
2875 .svhs = 2,
2876 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002877 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002878 .gpiomux = { 2, 0, 0, 0 },
2879 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002880 .needs_tvaudio = 1,
2881 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002882 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002883 .tuner_addr = ADDR_UNSET,
2884 .radio_addr = ADDR_UNSET,
2885 },
Bill Pechter633323f2005-11-13 16:07:50 -08002886 /* ---- card 0x8e ---------------------------------- */
2887 [BTTV_BOARD_SABRENT_TVFM] = {
2888 .name = "Sabrent TV-FM (bttv version)",
2889 .video_inputs = 3,
2890 .audio_inputs = 1,
2891 .tuner = 0,
2892 .svhs = 2,
2893 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002894 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002895 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002896 .no_msp34xx = 1,
2897 .no_tda9875 = 1,
2898 .no_tda7432 = 1,
2899 .pll = PLL_28,
2900 .tuner_type = TUNER_TNF_5335MF,
2901 .tuner_addr = ADDR_UNSET,
2902 .has_radio = 1,
2903 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002904 /* ---- card 0x8f ---------------------------------- */
2905 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2906 .name = "Hauppauge ImpactVCB (bt878)",
2907 .video_inputs = 4,
2908 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002909 .tuner = UNSET,
2910 .svhs = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002911 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002912 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002913 .no_msp34xx = 1,
2914 .no_tda9875 = 1,
2915 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002916 .tuner_type = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002917 .tuner_addr = ADDR_UNSET,
2918 .radio_addr = ADDR_UNSET,
2919 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002920 [BTTV_BOARD_MACHTV_MAGICTV] = {
2921 /* Julian Calaby <julian.calaby@gmail.com>
2922 * Slightly different from original MachTV definition (0x60)
2923
2924 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2925 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2926 * properly (methinks) causing no keyup bits being set */
2927
2928 .name = "MagicTV", /* rebranded MachTV */
2929 .video_inputs = 3,
2930 .audio_inputs = 1,
2931 .tuner = 0,
2932 .svhs = 2,
2933 .gpiomask = 7,
2934 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002935 .gpiomux = { 0, 1, 2, 3 },
2936 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002937 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2938 .tuner_addr = ADDR_UNSET,
2939 .radio_addr = ADDR_UNSET,
2940 .pll = PLL_28,
2941 .has_radio = 1,
2942 .has_remote = 1,
2943 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002944 [BTTV_BOARD_SSAI_SECURITY] = {
2945 .name = "SSAI Security Video Interface",
2946 .video_inputs = 4,
2947 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002948 .tuner = UNSET,
2949 .svhs = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002950 .muxsel = { 0, 1, 2, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002951 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002952 .tuner_addr = ADDR_UNSET,
2953 .radio_addr = ADDR_UNSET,
2954 },
2955 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2956 .name = "SSAI Ultrasound Video Interface",
2957 .video_inputs = 2,
2958 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002959 .tuner = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002960 .svhs = 1,
2961 .muxsel = { 2, 0, 1, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002962 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002963 .tuner_addr = ADDR_UNSET,
2964 .radio_addr = ADDR_UNSET,
2965 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002966 /* ---- card 0x94---------------------------------- */
2967 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2968 .name = "DViCO FusionHDTV 2",
2969 .tuner = 0,
Michael Krufkyab8b8702008-04-22 14:46:05 -03002970 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002971 .tuner_addr = ADDR_UNSET,
2972 .radio_addr = ADDR_UNSET,
2973 .video_inputs = 3,
2974 .audio_inputs = 1,
2975 .svhs = 2,
2976 .muxsel = { 2, 3, 1 },
2977 .gpiomask = 0x00e00007,
2978 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2979 .gpiomute = 0x00c00007,
2980 .no_msp34xx = 1,
2981 .no_tda9875 = 1,
2982 .no_tda7432 = 1,
2983 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002984 /* ---- card 0x95---------------------------------- */
2985 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2986 .name = "Typhoon TV-Tuner PCI (50684)",
2987 .video_inputs = 3,
2988 .audio_inputs = 1,
2989 .tuner = 0,
2990 .svhs = 2,
2991 .gpiomask = 0x3014f,
2992 .muxsel = { 2, 3, 1, 1 },
2993 .gpiomux = { 0x20001,0x10001, 0, 0 },
2994 .gpiomute = 10,
2995 .needs_tvaudio = 1,
2996 .pll = PLL_28,
2997 .tuner_type = TUNER_PHILIPS_PAL_I,
2998 .tuner_addr = ADDR_UNSET,
2999 .radio_addr = ADDR_UNSET,
3000 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003001 [BTTV_BOARD_GEOVISION_GV600] = {
3002 /* emhn@usb.ve */
3003 .name = "Geovision GV-600",
3004 .video_inputs = 16,
3005 .audio_inputs = 0,
3006 .tuner = UNSET,
3007 .svhs = UNSET,
3008 .gpiomask = 0x0,
3009 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
3010 2, 2, 2, 2, 2, 2, 2, 2 },
3011 .muxsel_hook = geovision_muxsel,
3012 .gpiomux = { 0 },
3013 .no_msp34xx = 1,
3014 .pll = PLL_28,
3015 .tuner_type = UNSET,
3016 .tuner_addr = ADDR_UNSET,
3017 .radio_addr = ADDR_UNSET,
3018 },
Mauro Lacye80faad2008-04-22 14:45:58 -03003019 [BTTV_BOARD_KOZUMI_KTV_01C] = {
3020 /* Mauro Lacy <mauro@lacy.com.ar>
3021 * Based on MagicTV and Conceptronic CONTVFMi */
3022
3023 .name = "Kozumi KTV-01C",
3024 .video_inputs = 3,
3025 .audio_inputs = 1,
3026 .tuner = 0,
3027 .svhs = 2,
3028 .gpiomask = 0x008007,
3029 .muxsel = { 2, 3, 1, 1 },
3030 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03003031 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03003032 .needs_tvaudio = 0,
3033 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
3034 .tuner_addr = ADDR_UNSET,
3035 .radio_addr = ADDR_UNSET,
3036 .pll = PLL_28,
3037 .has_radio = 1,
3038 .has_remote = 1,
3039 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08003040};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003041
3042static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
3043
3044/* ----------------------------------------------------------------------- */
3045
3046static unsigned char eeprom_data[256];
3047
3048/*
3049 * identify card
3050 */
3051void __devinit bttv_idcard(struct bttv *btv)
3052{
3053 unsigned int gpiobits;
3054 int i,type;
3055 unsigned short tmp;
3056
3057 /* read PCI subsystem ID */
3058 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3059 btv->cardid = tmp << 16;
3060 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3061 btv->cardid |= tmp;
3062
3063 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3064 /* look for the card */
3065 for (type = -1, i = 0; cards[i].id != 0; i++)
3066 if (cards[i].id == btv->cardid)
3067 type = i;
3068
3069 if (type != -1) {
3070 /* found it */
3071 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3072 "PCI subsystem ID is %04x:%04x\n",
3073 btv->c.nr,cards[type].name,cards[type].cardnr,
3074 btv->cardid & 0xffff,
3075 (btv->cardid >> 16) & 0xffff);
3076 btv->c.type = cards[type].cardnr;
3077 } else {
3078 /* 404 */
3079 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3080 btv->c.nr, btv->cardid & 0xffff,
3081 (btv->cardid >> 16) & 0xffff);
3082 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08003083 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003084 }
3085 }
3086
3087 /* let the user override the autodetected type */
3088 if (card[btv->c.nr] < bttv_num_tvcards)
3089 btv->c.type=card[btv->c.nr];
3090
3091 /* print which card config we are using */
3092 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3093 bttv_tvcards[btv->c.type].name, btv->c.type,
3094 card[btv->c.nr] < bttv_num_tvcards
3095 ? "insmod option" : "autodetected");
3096
3097 /* overwrite gpio stuff ?? */
3098 if (UNSET == audioall && UNSET == audiomux[0])
3099 return;
3100
3101 if (UNSET != audiomux[0]) {
3102 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003103 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003104 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003105 gpiobits |= audiomux[i];
3106 }
3107 } else {
3108 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003109 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003110 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003111 }
3112 }
3113 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3114 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3115 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003116 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003117 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003118 }
3119 printk("\n");
3120}
3121
3122/*
3123 * (most) board specific initialisations goes here
3124 */
3125
3126/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08003127static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003128{
3129 int type = -1;
3130
3131 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003132 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003133 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003134 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003135 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003136 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003137
3138 if (-1 != type) {
3139 btv->c.type = type;
3140 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3141 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3142 }
3143}
3144
3145static void flyvideo_gpio(struct bttv *btv)
3146{
3147 int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003148 int tuner=UNSET,ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003149
3150 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003151 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003152 gpio = gpio_read();
3153 /* FIXME: must restore OUR_EN ??? */
3154
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003155 /* all cards provide GPIO info, some have an additional eeprom
3156 * LR50: GPIO coding can be found lower right CP1 .. CP9
3157 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3158 * GPIO14-12: n.c.
3159 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003160
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003161 * lowest 3 bytes are remote control codes (no handshake needed)
3162 * xxxFFF: No remote control chip soldered
3163 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3164 * Note: Some bits are Audio_Mask !
3165 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003166 ttype=(gpio&0x0f0000)>>16;
3167 switch(ttype) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003168 case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003169 break;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003170 case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003171 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003172 case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003173 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003174 case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003175 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003176 case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003177 break;
3178 default:
3179 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3180 }
3181
3182 has_remote = gpio & 0x800000;
3183 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003184 /* unknown 0x200000;
3185 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003186 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003187 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003188 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3189 /*
3190 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003191
3192 if(is_capture_only)
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003193 tuner = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003194
3195 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3196 btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
3197 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3198 btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
3199 is_capture_only?"yes":"no ");
3200
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003201 if (tuner != UNSET) /* only set if known tuner autodetected, else let insmod option through */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003202 btv->tuner_type = tuner;
3203 btv->has_radio = has_radio;
3204
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003205 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3206 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3207 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003208 if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
3209 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003210}
3211
3212static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3213 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3214static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3215 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3216
3217static void miro_pinnacle_gpio(struct bttv *btv)
3218{
3219 int id,msp,gpio;
3220 char *info;
3221
3222 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003223 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003224 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003225 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003226 if (id < 32) {
3227 btv->tuner_type = miro_tunermap[id];
3228 if (0 == (gpio & 0x20)) {
3229 btv->has_radio = 1;
3230 if (!miro_fmtuner[id]) {
3231 btv->has_matchbox = 1;
3232 btv->mbox_we = (1<<6);
3233 btv->mbox_most = (1<<7);
3234 btv->mbox_clk = (1<<8);
3235 btv->mbox_data = (1<<9);
3236 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3237 }
3238 } else {
3239 btv->has_radio = 0;
3240 }
3241 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003242 if (btv->c.type == BTTV_BOARD_MIRO)
3243 btv->c.type = BTTV_BOARD_MIROPRO;
3244 if (btv->c.type == BTTV_BOARD_PINNACLE)
3245 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003246 }
3247 printk(KERN_INFO
3248 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3249 btv->c.nr, id+1, btv->tuner_type,
3250 !btv->has_radio ? "no" :
3251 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3252 (-1 == msp) ? "no" : "yes");
3253 } else {
3254 /* new cards with microtune tuner */
3255 id = 63 - id;
3256 btv->has_radio = 0;
3257 switch (id) {
3258 case 1:
3259 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003260 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003261 break;
3262 case 2:
3263 info = "PAL+SECAM / stereo";
3264 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003265 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003266 break;
3267 case 3:
3268 info = "NTSC / stereo";
3269 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003270 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003271 break;
3272 case 4:
3273 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003274 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003275 break;
3276 case 5:
3277 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003278 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003279 break;
3280 case 6:
3281 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003282 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003283 break;
3284 case 7:
3285 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003286 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003287 break;
3288 default:
3289 info = "oops: unknown card";
3290 break;
3291 }
3292 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003293 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003294 printk(KERN_INFO
3295 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3296 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003297 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298 }
3299}
3300
3301/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3302#define LM1882_SYNC_DRIVE 0x200000L
3303
3304static void init_ids_eagle(struct bttv *btv)
3305{
3306 gpio_inout(0xffffff,0xFFFF37);
3307 gpio_write(0x200020);
3308
3309 /* flash strobe inverter ?! */
3310 gpio_write(0x200024);
3311
3312 /* switch sync drive off */
3313 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3314
3315 /* set BT848 muxel to 2 */
3316 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3317}
3318
3319/* Muxsel helper for the IDS Eagle.
3320 * the eagles does not use the standard muxsel-bits but
3321 * has its own multiplexer */
3322static void eagle_muxsel(struct bttv *btv, unsigned int input)
3323{
3324 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3325 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3326
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003327 /* composite */
3328 /* set chroma ADC to sleep */
3329 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3330 /* set to composite video */
3331 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3332 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003333
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003334 /* switch sync drive off */
3335 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003336}
3337
3338static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3339{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003340 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003341 gpio_write(masks[input%4]);
3342}
3343
3344/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3345 alarms output
3346
3347 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3348 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3349
3350 IN - sensor inputs, INx - sensor inputs and TI XORed together
3351 O1,O2,O3 - alarm outputs (relays)
3352
3353 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3354
3355*/
3356
3357static void init_lmlbt4x(struct bttv *btv)
3358{
3359 printk(KERN_DEBUG "LMLBT4x init\n");
3360 btwrite(0x000000, BT848_GPIO_REG_INP);
3361 gpio_inout(0xffffff, 0x0006C0);
3362 gpio_write(0x000000);
3363}
3364
3365static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3366{
3367 unsigned int inmux = input % 8;
3368 gpio_inout( 0xf, 0xf );
3369 gpio_bits( 0xf, inmux );
3370}
3371
3372static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3373{
3374 unsigned int inmux = input % 4;
3375 gpio_inout( 3<<9, 3<<9 );
3376 gpio_bits( 3<<9, inmux<<9 );
3377}
3378
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003379static void geovision_muxsel(struct bttv *btv, unsigned int input)
3380{
3381 unsigned int inmux = input % 16;
3382 gpio_inout(0xf, 0xf);
3383 gpio_bits(0xf, inmux);
3384}
3385
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386/* ----------------------------------------------------------------------- */
3387
3388static void bttv_reset_audio(struct bttv *btv)
3389{
3390 /*
3391 * BT878A has a audio-reset register.
3392 * 1. This register is an audio reset function but it is in
3393 * function-0 (video capture) address space.
3394 * 2. It is enough to do this once per power-up of the card.
3395 * 3. There is a typo in the Conexant doc -- it is not at
3396 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3397 * --//Shrikumar 030609
3398 */
3399 if (btv->id != 878)
3400 return;
3401
3402 if (bttv_debug)
3403 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3404 btwrite((1<<7), 0x058);
3405 udelay(10);
3406 btwrite( 0, 0x058);
3407}
3408
3409/* initialization part one -- before registering i2c bus */
3410void __devinit bttv_init_card1(struct bttv *btv)
3411{
3412 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003413 case BTTV_BOARD_HAUPPAUGE:
3414 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003415 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003416 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003417 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003418 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003419 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003421 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003422 boot_msp34xx(btv,11);
3423 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003424 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003425 pvr_boot(btv);
3426 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003427 case BTTV_BOARD_TWINHAN_DST:
3428 case BTTV_BOARD_AVDVBT_771:
3429 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003430 btv->use_i2c_hw = 1;
3431 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003432 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003433 init_RTV24( btv );
3434 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003435
Linus Torvalds1da177e2005-04-16 15:20:36 -07003436 }
3437 if (!bttv_tvcards[btv->c.type].has_dvb)
3438 bttv_reset_audio(btv);
3439}
3440
3441/* initialization part two -- after registering i2c bus */
3442void __devinit bttv_init_card2(struct bttv *btv)
3443{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003444 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003445
Trent Piephoac7dc842007-06-28 17:51:08 -03003446 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003447
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003448 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003449 bttv_readee(btv,eeprom_data,0xa0);
3450 identify_by_eeprom(btv,eeprom_data);
3451 }
3452
3453 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003454 case BTTV_BOARD_MIRO:
3455 case BTTV_BOARD_MIROPRO:
3456 case BTTV_BOARD_PINNACLE:
3457 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003458 /* miro/pinnacle */
3459 miro_pinnacle_gpio(btv);
3460 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003461 case BTTV_BOARD_FLYVIDEO_98:
3462 case BTTV_BOARD_MAXI:
3463 case BTTV_BOARD_LIFE_FLYKIT:
3464 case BTTV_BOARD_FLYVIDEO:
3465 case BTTV_BOARD_TYPHOON_TVIEW:
3466 case BTTV_BOARD_CHRONOS_VS2:
3467 case BTTV_BOARD_FLYVIDEO_98FM:
3468 case BTTV_BOARD_FLYVIDEO2000:
3469 case BTTV_BOARD_FLYVIDEO98EZ:
3470 case BTTV_BOARD_CONFERENCETV:
3471 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003472 flyvideo_gpio(btv);
3473 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003474 case BTTV_BOARD_HAUPPAUGE:
3475 case BTTV_BOARD_HAUPPAUGE878:
3476 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003477 /* pick up some config infos from the eeprom */
3478 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003479 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003480 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003481 case BTTV_BOARD_AVERMEDIA98:
3482 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003483 bttv_readee(btv,eeprom_data,0xa0);
3484 avermedia_eeprom(btv);
3485 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003486 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003487 init_PXC200(btv);
3488 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003489 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003490 picolo_tetra_init(btv);
3491 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003492 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003493 btv->has_radio = 1;
3494 btv->has_matchbox = 1;
3495 btv->mbox_we = 0x20;
3496 btv->mbox_most = 0;
3497 btv->mbox_clk = 0x08;
3498 btv->mbox_data = 0x10;
3499 btv->mbox_mask = 0x38;
3500 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003501 case BTTV_BOARD_VOBIS_BOOSTAR:
3502 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003503 terratec_active_radio_upgrade(btv);
3504 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003505 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003506 if (btv->cardid == 0x3002144f) {
3507 btv->has_radio=1;
3508 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3509 }
3510 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003511 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003512 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003513 /* Fix up entry for 3DFX VoodooTV 100,
3514 which is an OEM STB card variant. */
3515 btv->has_radio=0;
3516 btv->tuner_type=TUNER_TEMIC_NTSC;
3517 }
3518 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003519 case BTTV_BOARD_OSPREY1x0:
3520 case BTTV_BOARD_OSPREY1x0_848:
3521 case BTTV_BOARD_OSPREY101_848:
3522 case BTTV_BOARD_OSPREY1x1:
3523 case BTTV_BOARD_OSPREY1x1_SVID:
3524 case BTTV_BOARD_OSPREY2xx:
3525 case BTTV_BOARD_OSPREY2x0_SVID:
3526 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003527 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003528 case BTTV_BOARD_OSPREY500:
3529 case BTTV_BOARD_OSPREY540:
3530 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003531 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003532 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003533 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003534 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003535 init_ids_eagle(btv);
3536 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003537 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003538 bttv_readee(btv,eeprom_data,0xa0);
3539 modtec_eeprom(btv);
3540 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003541 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003542 init_lmlbt4x(btv);
3543 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003544 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003545 tibetCS16_init(btv);
3546 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003547 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003548 kodicom4400r_init(btv);
3549 break;
3550 }
3551
3552 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003553 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003554 /* defaults from card list */
3555 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3556 btv->pll.pll_ifreq=28636363;
3557 btv->pll.pll_crystal=BT848_IFORM_XT0;
3558 }
3559 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3560 btv->pll.pll_ifreq=35468950;
3561 btv->pll.pll_crystal=BT848_IFORM_XT1;
3562 }
3563 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003564 switch (pll[btv->c.nr]) {
3565 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003566 btv->pll.pll_crystal = 0;
3567 btv->pll.pll_ifreq = 0;
3568 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003569 break;
3570 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003571 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003572 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003573 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003574 btv->pll.pll_crystal = BT848_IFORM_XT0;
3575 break;
3576 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003577 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003578 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003579 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003580 btv->pll.pll_crystal = BT848_IFORM_XT1;
3581 break;
3582 }
3583 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003584 btv->pll.pll_current = -1;
3585
Linus Torvalds1da177e2005-04-16 15:20:36 -07003586 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003587 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3588 addr = bttv_tvcards[btv->c.type].tuner_addr;
3589
3590 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003591 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003592 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003593 if (UNSET != tuner[btv->c.nr])
3594 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003595
3596 if (btv->tuner_type == TUNER_ABSENT ||
3597 bttv_tvcards[btv->c.type].tuner == UNSET)
3598 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3599 else if(btv->tuner_type == UNSET)
3600 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3601 else
3602 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3603 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003604
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003605 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003606 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003607
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003608 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003609 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003610 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003611
3612 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3613 }
3614
Hans Verkuil39e8f402006-01-09 15:25:16 -02003615 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003616 struct v4l2_priv_tun_config tda9887_cfg;
3617
3618 tda9887_cfg.tuner = TUNER_TDA9887;
3619 tda9887_cfg.priv = &btv->tda9887_conf;
3620
3621 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003622 }
3623
Linus Torvalds1da177e2005-04-16 15:20:36 -07003624 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3625 if (svhs[btv->c.nr] != UNSET)
3626 btv->svhs = svhs[btv->c.nr];
3627 if (remote[btv->c.nr] != UNSET)
3628 btv->has_remote = remote[btv->c.nr];
3629
3630 if (bttv_tvcards[btv->c.type].has_radio)
3631 btv->has_radio=1;
3632 if (bttv_tvcards[btv->c.type].has_remote)
3633 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003634 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3635 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003636 if (bttv_tvcards[btv->c.type].volume_gpio)
3637 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3638 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3639 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003640
3641 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3642 /* detect Bt832 chip for quartzsight digital camera */
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003643 if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
3644 (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
Linus Torvalds1da177e2005-04-16 15:20:36 -07003645 boot_bt832(btv);
3646 }
3647
3648 if (!autoload)
3649 return;
3650
Trent Piephoac7dc842007-06-28 17:51:08 -03003651 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3652 return; /* no tuner or related drivers to load */
3653
Linus Torvalds1da177e2005-04-16 15:20:36 -07003654 /* try to detect audio/fader chips */
3655 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003656 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003657 request_module("msp3400");
3658
3659 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003660 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003661 request_module("msp3400");
3662
3663 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003664 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003665 request_module("tda9875");
3666
3667 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003668 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003669 request_module("tda7432");
3670
3671 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3672 request_module("tvaudio");
3673
Trent Piephoac7dc842007-06-28 17:51:08 -03003674 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003675 request_module("tuner");
3676}
3677
3678
3679/* ----------------------------------------------------------------------- */
3680
3681static void modtec_eeprom(struct bttv *btv)
3682{
3683 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3684 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3685 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3686 btv->c.nr,&eeprom_data[0x1e]);
3687 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3688 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3689 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003690 btv->c.nr,&eeprom_data[0x1e]);
3691 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3692 btv->tuner_type=TUNER_PHILIPS_NTSC;
3693 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3694 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003695 } else {
3696 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3697 btv->c.nr,&eeprom_data[0x1e]);
3698 }
3699}
3700
3701static void __devinit hauppauge_eeprom(struct bttv *btv)
3702{
3703 struct tveeprom tv;
3704
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003705 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003706 btv->tuner_type = tv.tuner_type;
3707 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003708
3709 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3710 btv->c.nr, tv.model);
3711
3712 /*
3713 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3714 * type based on model #.
3715 */
3716 if(tv.model == 64900) {
3717 printk("bttv%d: Switching board type from %s to %s\n",
3718 btv->c.nr,
3719 bttv_tvcards[btv->c.type].name,
3720 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3721 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3722 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003723}
3724
3725static int terratec_active_radio_upgrade(struct bttv *btv)
3726{
3727 int freq;
3728
3729 btv->has_radio = 1;
3730 btv->has_matchbox = 1;
3731 btv->mbox_we = 0x10;
3732 btv->mbox_most = 0x20;
3733 btv->mbox_clk = 0x08;
3734 btv->mbox_data = 0x04;
3735 btv->mbox_mask = 0x3c;
3736
3737 btv->mbox_iow = 1 << 8;
3738 btv->mbox_ior = 1 << 9;
3739 btv->mbox_csel = 1 << 10;
3740
3741 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003742 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003743 if (0x1ed8 == tea5757_read(btv)) {
3744 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3745 btv->c.nr);
3746 btv->has_radio = 1;
3747 btv->has_matchbox = 1;
3748 } else {
3749 btv->has_radio = 0;
3750 btv->has_matchbox = 0;
3751 }
3752 return 0;
3753}
3754
3755
3756/* ----------------------------------------------------------------------- */
3757
3758/*
3759 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3760 *
3761 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3762 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3763 * unpacked with unzip).
3764 */
3765#define PVR_GPIO_DELAY 10
3766
3767#define BTTV_ALT_DATA 0x000001
3768#define BTTV_ALT_DCLK 0x100000
3769#define BTTV_ALT_NCONFIG 0x800000
3770
3771static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3772{
3773 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003774 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003775 int i;
3776
3777 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3778 gpio_write(0);
3779 udelay(PVR_GPIO_DELAY);
3780
3781 gpio_write(BTTV_ALT_NCONFIG);
3782 udelay(PVR_GPIO_DELAY);
3783
3784 for (n = 0; n < microlen; n++) {
3785 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003786 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003787 gpio_bits(BTTV_ALT_DCLK,0);
3788 if (bits & 0x01)
3789 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3790 else
3791 gpio_bits(BTTV_ALT_DATA,0);
3792 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3793 bits >>= 1;
3794 }
3795 }
3796 gpio_bits(BTTV_ALT_DCLK,0);
3797 udelay(PVR_GPIO_DELAY);
3798
3799 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3800 for (i = 0 ; i < 30 ; i++) {
3801 gpio_bits(BTTV_ALT_DCLK,0);
3802 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3803 }
3804 gpio_bits(BTTV_ALT_DCLK,0);
3805 return 0;
3806}
3807
3808static int __devinit pvr_boot(struct bttv *btv)
3809{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003810 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003811 int rc;
3812
3813 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3814 if (rc != 0) {
3815 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3816 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003817 return rc;
3818 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003819 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3820 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3821 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003822 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003823 return rc;
3824}
3825
3826/* ----------------------------------------------------------------------- */
3827/* some osprey specific stuff */
3828
Trent Piephocf784d52007-07-21 21:26:40 -03003829static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003830{
Trent Piephocf784d52007-07-21 21:26:40 -03003831 int i;
3832 u32 serial = 0;
3833 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003834
Trent Piephocf784d52007-07-21 21:26:40 -03003835 /* This code will nevery actually get called in this case.... */
3836 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3837 /* this might be an antique... check for MMAC label in eeprom */
3838 if (!strncmp(ee, "MMAC", 4)) {
3839 u8 checksum = 0;
3840 for (i = 0; i < 21; i++)
3841 checksum += ee[i];
3842 if (checksum != ee[21])
3843 return;
3844 cardid = BTTV_BOARD_OSPREY1x0_848;
3845 for (i = 12; i < 21; i++)
3846 serial *= 10, serial += ee[i] - '0';
3847 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003848 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003849 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003850
Trent Piephocf784d52007-07-21 21:26:40 -03003851 for (i = 4*16; i < 8*16; i += 16) {
3852 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003853
Trent Piephocf784d52007-07-21 21:26:40 -03003854 if ((checksum&0xff) + (checksum>>8) == 0xff)
3855 break;
3856 }
3857 if (i >= 8*16)
3858 return;
3859 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003860
Trent Piephocf784d52007-07-21 21:26:40 -03003861 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003862 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003863
Trent Piephocf784d52007-07-21 21:26:40 -03003864 switch(type) {
3865 /* 848 based */
3866 case 0x0004:
3867 cardid = BTTV_BOARD_OSPREY1x0_848;
3868 break;
3869 case 0x0005:
3870 cardid = BTTV_BOARD_OSPREY101_848;
3871 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003872
Trent Piephocf784d52007-07-21 21:26:40 -03003873 /* 878 based */
3874 case 0x0012:
3875 case 0x0013:
3876 cardid = BTTV_BOARD_OSPREY1x0;
3877 break;
3878 case 0x0014:
3879 case 0x0015:
3880 cardid = BTTV_BOARD_OSPREY1x1;
3881 break;
3882 case 0x0016:
3883 case 0x0017:
3884 case 0x0020:
3885 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3886 break;
3887 case 0x0018:
3888 case 0x0019:
3889 case 0x001E:
3890 case 0x001F:
3891 cardid = BTTV_BOARD_OSPREY2xx;
3892 break;
3893 case 0x001A:
3894 case 0x001B:
3895 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3896 break;
3897 case 0x0040:
3898 cardid = BTTV_BOARD_OSPREY500;
3899 break;
3900 case 0x0050:
3901 case 0x0056:
3902 cardid = BTTV_BOARD_OSPREY540;
3903 /* bttv_osprey_540_init(btv); */
3904 break;
3905 case 0x0060:
3906 case 0x0070:
3907 case 0x00A0:
3908 cardid = BTTV_BOARD_OSPREY2x0;
3909 /* enable output on select control lines */
3910 gpio_inout(0xffffff,0x000303);
3911 break;
3912 case 0x00D8:
3913 cardid = BTTV_BOARD_OSPREY440;
3914 break;
3915 default:
3916 /* unknown...leave generic, but get serial # */
3917 printk(KERN_INFO "bttv%d: "
3918 "osprey eeprom: unknown card type 0x%04x\n",
3919 btv->c.nr, type);
3920 break;
3921 }
Al Viroc1c36f32008-05-21 00:32:21 -03003922 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003923 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003924
Trent Piephocf784d52007-07-21 21:26:40 -03003925 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3926 btv->c.nr, cardid,
3927 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3928
3929 if (cardid<0 || btv->c.type == cardid)
3930 return;
3931
3932 /* card type isn't set correctly */
3933 if (card[btv->c.nr] < bttv_num_tvcards) {
3934 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3935 "Not overriding user specified card type\n", btv->c.nr);
3936 } else {
3937 printk(KERN_INFO "bttv%d: osprey eeprom: "
3938 "Changing card type from %d to %d\n", btv->c.nr,
3939 btv->c.type, cardid);
3940 btv->c.type = cardid;
3941 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003942}
3943
3944/* ----------------------------------------------------------------------- */
3945/* AVermedia specific stuff, from bktr_card.c */
3946
3947static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003948 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3949 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3950 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3951 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3952 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003953 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003954
3955static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003956 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003957 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3958 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003959 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3960 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003961
3962static void __devinit avermedia_eeprom(struct bttv *btv)
3963{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003964 int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003965
3966 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003967 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3968 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003969 btv->has_remote = (eeprom_data[0x42] & 0x01);
3970
3971 if (tuner_make == 0 || tuner_make == 2)
3972 if(tuner_format <=0x0a)
3973 tuner = tuner_0_table[tuner_format];
3974 if (tuner_make == 1)
3975 if(tuner_format <=9)
3976 tuner = tuner_1_table[tuner_format];
3977
3978 if (tuner_make == 4)
3979 if(tuner_format == 0x09)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003980 tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003981
3982 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3983 btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
3984 if(tuner) {
3985 btv->tuner_type=tuner;
3986 printk("%d",tuner);
3987 } else
3988 printk("Unknown type");
3989 printk(" radio:%s remote control:%s\n",
3990 tuner_tv_fm ? "yes" : "no",
3991 btv->has_remote ? "yes" : "no");
3992}
3993
3994/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3995void bttv_tda9880_setnorm(struct bttv *btv, int norm)
3996{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003997 /* fix up our card entry */
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -03003998 if(norm==V4L2_STD_NTSC) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003999 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4000 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004001 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4002 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004003 dprintk("bttv_tda9880_setnorm to NTSC\n");
4004 }
4005 else {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004006 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4007 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004008 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4009 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004010 dprintk("bttv_tda9880_setnorm to PAL\n");
4011 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004012 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004013 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004014 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004015}
4016
4017
4018/*
4019 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08004020 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07004021 *
4022 * Hauppauge: pin 5
4023 * Voodoo: pin 20
4024 */
4025static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4026{
4027 int mask = (1 << pin);
4028
4029 gpio_inout(mask,mask);
4030 gpio_bits(mask,0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004031 udelay(2500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004032 gpio_bits(mask,mask);
4033
4034 if (bttv_gpio)
4035 bttv_gpio_tracking(btv,"msp34xx");
4036 if (bttv_verbose)
4037 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
4038 "init [%d]\n", btv->c.nr, pin);
4039}
4040
4041static void __devinit boot_bt832(struct bttv *btv)
4042{
Linus Torvalds1da177e2005-04-16 15:20:36 -07004043}
4044
4045/* ----------------------------------------------------------------------- */
4046/* Imagenation L-Model PXC200 Framegrabber */
4047/* This is basically the same procedure as
4048 * used by Alessandro Rubini in his pxc200
4049 * driver, but using BTTV functions */
4050
4051static void __devinit init_PXC200(struct bttv *btv)
4052{
4053 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4054 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4055 0x00 };
4056 unsigned int i;
4057 int tmp;
4058 u32 val;
4059
4060 /* Initialise GPIO-connevted stuff */
4061 gpio_inout(0xffffff, (1<<13));
4062 gpio_write(0);
4063 udelay(3);
4064 gpio_write(1<<13);
4065 /* GPIO inputs are pulled up, so no need to drive
4066 * reset pin any longer */
4067 gpio_bits(0xffffff, 0);
4068 if (bttv_gpio)
4069 bttv_gpio_tracking(btv,"pxc200");
4070
4071 /* we could/should try and reset/control the AD pots? but
4072 right now we simply turned off the crushing. Without
4073 this the AGC drifts drifts
4074 remember the EN is reverse logic -->
4075 setting BT848_ADC_AGC_EN disable the AGC
4076 tboult@eecs.lehigh.edu
4077 */
4078
4079 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4080
4081 /* Initialise MAX517 DAC */
4082 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4083 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4084
4085 /* Initialise 12C508 PIC */
4086 /* The I2CWrite and I2CRead commmands are actually to the
4087 * same chips - but the R/W bit is included in the address
4088 * argument so the numbers are different */
4089
4090
4091 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4092
4093 /* First of all, enable the clock line. This is used in the PXC200-F */
4094 val = btread(BT848_GPIO_DMA_CTL);
4095 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4096 btwrite(val, BT848_GPIO_DMA_CTL);
4097
4098 /* Then, push to 0 the reset pin long enough to reset the *
4099 * device same as above for the reset line, but not the same
4100 * value sent to the GPIO-connected stuff
4101 * which one is the good one? */
4102 gpio_inout(0xffffff,(1<<2));
4103 gpio_write(0);
4104 udelay(10);
4105 gpio_write(1<<2);
4106
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004107 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004108 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4109 if (tmp != -1) {
4110 printk(KERN_INFO
4111 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4112 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4113 }
4114 }
4115
4116 printk(KERN_INFO "PXC200 Initialised.\n");
4117}
4118
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004119
4120
Peter Skipworth93b43f12005-06-23 22:04:45 -07004121/* ----------------------------------------------------------------------- */
4122/*
4123 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4124 * it. This apparently involves the following procedure for each 878 chip:
4125 *
4126 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4127 *
4128 * 2) write to GPIO_DATA
4129 * - 0x0E
4130 * - sleep 1ms
4131 * - 0x10 + 0x0E
4132 * - sleep 10ms
4133 * - 0x0E
4134 * read from GPIO_DATA into buf (uint_32)
4135 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4136 * error. ERROR_CPLD_Check_Failed stop.
4137 *
4138 * 3) write to GPIO_DATA
4139 * - write 0x4400 + 0x0E
4140 * - sleep 10ms
4141 * - write 0x4410 + 0x0E
4142 * - sleep 1ms
4143 * - write 0x0E
4144 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004145 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004146 * error. ERROR_CPLD_Check_Failed.
4147 */
4148/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004149static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004150init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004151{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004152 uint32_t dataRead = 0;
4153 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004154
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004155 printk (KERN_INFO
4156 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004157 btv->c.nr);
4158
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004159 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004160
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004161 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4162 msleep (1);
4163 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4164 msleep (10);
4165 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004166
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004167 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004168
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004169 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4170 printk (KERN_INFO
4171 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4172 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004173 }
4174
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004175 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4176 msleep (10);
4177 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4178 msleep (1);
4179 btwrite (watchdog_value, BT848_GPIO_DATA);
4180 msleep (1);
4181 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004182
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004183 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4184 printk (KERN_INFO
4185 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4186 btv->c.nr, dataRead);
4187
Peter Skipworth93b43f12005-06-23 22:04:45 -07004188 return;
4189 }
4190
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004191 printk (KERN_INFO
4192 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004193}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004194
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004195
4196
Linus Torvalds1da177e2005-04-16 15:20:36 -07004197/* ----------------------------------------------------------------------- */
4198/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4199/*
4200 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4201 * This code is placed under the terms of the GNU General Public License
4202 *
4203 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4204 */
4205
4206static void bus_low(struct bttv *btv, int bit)
4207{
4208 if (btv->mbox_ior) {
4209 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4210 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4211 udelay(5);
4212 }
4213
4214 gpio_bits(bit,0);
4215 udelay(5);
4216
4217 if (btv->mbox_ior) {
4218 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4219 udelay(5);
4220 }
4221}
4222
4223static void bus_high(struct bttv *btv, int bit)
4224{
4225 if (btv->mbox_ior) {
4226 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4227 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4228 udelay(5);
4229 }
4230
4231 gpio_bits(bit,bit);
4232 udelay(5);
4233
4234 if (btv->mbox_ior) {
4235 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4236 udelay(5);
4237 }
4238}
4239
4240static int bus_in(struct bttv *btv, int bit)
4241{
4242 if (btv->mbox_ior) {
4243 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4244 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4245 udelay(5);
4246
4247 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4248 udelay(5);
4249 }
4250 return gpio_read() & (bit);
4251}
4252
4253/* TEA5757 register bits */
4254#define TEA_FREQ 0:14
4255#define TEA_BUFFER 15:15
4256
4257#define TEA_SIGNAL_STRENGTH 16:17
4258
4259#define TEA_PORT1 18:18
4260#define TEA_PORT0 19:19
4261
4262#define TEA_BAND 20:21
4263#define TEA_BAND_FM 0
4264#define TEA_BAND_MW 1
4265#define TEA_BAND_LW 2
4266#define TEA_BAND_SW 3
4267
4268#define TEA_MONO 22:22
4269#define TEA_ALLOW_STEREO 0
4270#define TEA_FORCE_MONO 1
4271
4272#define TEA_SEARCH_DIRECTION 23:23
4273#define TEA_SEARCH_DOWN 0
4274#define TEA_SEARCH_UP 1
4275
4276#define TEA_STATUS 24:24
4277#define TEA_STATUS_TUNED 0
4278#define TEA_STATUS_SEARCHING 1
4279
4280/* Low-level stuff */
4281static int tea5757_read(struct bttv *btv)
4282{
4283 unsigned long timeout;
4284 int value = 0;
4285 int i;
4286
4287 /* better safe than sorry */
4288 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4289
4290 if (btv->mbox_ior) {
4291 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4292 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4293 udelay(5);
4294 }
4295
4296 if (bttv_gpio)
4297 bttv_gpio_tracking(btv,"tea5757 read");
4298
4299 bus_low(btv,btv->mbox_we);
4300 bus_low(btv,btv->mbox_clk);
4301
4302 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004303 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004304
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004305 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004306 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4307 schedule();
4308 if (bus_in(btv,btv->mbox_data)) {
4309 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4310 return -1;
4311 }
4312
4313 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004314 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004315 udelay(5);
4316 bus_high(btv,btv->mbox_clk);
4317 udelay(5);
4318 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4319 bus_low(btv,btv->mbox_clk);
4320 value <<= 1;
4321 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4322 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4323 }
4324 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4325 return value;
4326}
4327
4328static int tea5757_write(struct bttv *btv, int value)
4329{
4330 int i;
4331 int reg = value;
4332
4333 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4334
4335 if (btv->mbox_ior) {
4336 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4337 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4338 udelay(5);
4339 }
4340 if (bttv_gpio)
4341 bttv_gpio_tracking(btv,"tea5757 write");
4342
4343 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4344 bus_low(btv,btv->mbox_clk);
4345 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004346 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004347 if (reg & 0x1000000)
4348 bus_high(btv,btv->mbox_data);
4349 else
4350 bus_low(btv,btv->mbox_data);
4351 reg <<= 1;
4352 bus_high(btv,btv->mbox_clk);
4353 udelay(10);
4354 bus_low(btv,btv->mbox_clk);
4355 udelay(10);
4356 }
4357 bus_low(btv,btv->mbox_we); /* unmute !!! */
4358 return 0;
4359}
4360
4361void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4362{
4363 dprintk("tea5757_set_freq %d\n",freq);
4364 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004365}
4366
Linus Torvalds1da177e2005-04-16 15:20:36 -07004367/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4368 *
4369 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4370 * switch instead (CD22M3494E). This IC can have multiple active connections
4371 * between Xn (input) and Yn (output) pins. We need to clear any existing
4372 * connection prior to establish a new one, pulsing the STROBE pin.
4373 *
4374 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4375 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004376 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4377 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4378 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4379 * GPIO[8] - - P3[5] (microcontroller)
4380 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4381 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4382 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004383 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004384 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4385 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004386 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004387 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004388 * note: the vendor refused to give any information on this product, all
4389 * that stuff was found using a multimeter! :)
4390 */
4391static void rv605_muxsel(struct bttv *btv, unsigned int input)
4392{
4393 /* reset all conections */
4394 gpio_bits(0x200,0x200);
4395 mdelay(1);
4396 gpio_bits(0x200,0x000);
4397 mdelay(1);
4398
Joe Perchesc84e6032008-02-03 17:18:59 +02004399 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004400 gpio_bits(0x480,0x080);
4401 gpio_bits(0x480,0x480);
4402 mdelay(1);
4403 gpio_bits(0x480,0x080);
4404 mdelay(1);
4405}
4406
4407/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4408 *
4409 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4410 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4411 * chips, ten eight input analog multiplexors, a not chip and a few
4412 * other components.
4413 *
4414 * 16 inputs on a secondary bracket are provided and can be selected
4415 * from each of the four capture chips. Two of the eight input
4416 * multiplexors are used to select from any of the 16 input signals.
4417 *
4418 * Unsupported hardware capabilities:
4419 * . A video output monitor on the secondary bracket can be selected from
4420 * one of the 878A chips.
4421 * . Another passthrough but I haven't spent any time investigating it.
4422 * . Digital I/O (logic level connected to GPIO) is available from an
4423 * onboard header.
4424 *
4425 * The on chip input mux should always be set to 2.
4426 * GPIO[16:19] - Video input selection
4427 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4428 * GPIO[?:?] - Digital I/O.
4429 *
4430 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4431 * determined what function (if any) it provides. With the microcontroller
4432 * and sync seperator chips a guess is that it might have to do with video
4433 * switching and maybe some digital I/O.
4434 */
4435static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4436{
4437 /* video mux */
4438 gpio_bits(0x0f0000, input << 16);
4439}
4440
4441static void tibetCS16_init(struct bttv *btv)
4442{
4443 /* enable gpio bits, mask obtained via btSpy */
4444 gpio_inout(0xffffff, 0x0f7fff);
4445 gpio_write(0x0f7fff);
4446}
4447
4448/*
4449 * The following routines for the Kodicom-4400r get a little mind-twisting.
4450 * There is a "master" controller and three "slave" controllers, together
4451 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4452 * The analog switch is controlled by the "master", but the detection order
4453 * of the four BT878A chips is in an order which I just don't understand.
4454 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004455 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004456 * those numbers are different from the detection sequence. When working
4457 * with the analog switch, we need to "map" from the detection sequence
4458 * over to the board's logical controller number. This mapping sequence
4459 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4460 * unit 3, the second (which is the master) is logical unit 0, etc.
4461 * We need to maintain the status of the analog switch (which of the 16
4462 * cameras is connected to which of the 4 controllers). Rather than
4463 * add to the bttv structure for this, we use the data reserved for
4464 * the mbox (unused for this card type).
4465 */
4466
4467/*
4468 * First a routine to set the analog switch, which controls which camera
4469 * is routed to which controller. The switch comprises an X-address
4470 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4471 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4472 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4473 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4474 * specified address. The idea is to set the address and data, then bring
4475 * STROBE high, and finally bring STROBE back to low.
4476 */
4477static void kodicom4400r_write(struct bttv *btv,
4478 unsigned char xaddr,
4479 unsigned char yaddr,
4480 unsigned char data) {
4481 unsigned int udata;
4482
4483 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4484 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4485 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4486 gpio_bits(0x1ff, udata); /* strobe low */
4487}
4488
4489/*
4490 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4491 * use this routine. The routine finds the "master" for the card, maps
4492 * the controller number from the detected position over to the logical
4493 * number, writes the appropriate data to the analog switch, and housekeeps
4494 * the local copy of the switch information. The parameter 'input' is the
4495 * requested camera number (0 - 15).
4496 */
4497static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4498{
4499 char *sw_status;
4500 int xaddr, yaddr;
4501 struct bttv *mctlr;
4502 static unsigned char map[4] = {3, 0, 2, 1};
4503
4504 mctlr = master[btv->c.nr];
4505 if (mctlr == NULL) { /* ignore if master not yet detected */
4506 return;
4507 }
4508 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4509 yaddr = map[yaddr];
4510 sw_status = (char *)(&mctlr->mbox_we);
4511 xaddr = input & 0xf;
4512 /* Check if the controller/camera pair has changed, else ignore */
4513 if (sw_status[yaddr] != xaddr)
4514 {
4515 /* "open" the old switch, "close" the new one, save the new */
4516 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4517 sw_status[yaddr] = xaddr;
4518 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4519 }
4520}
4521
4522/*
4523 * During initialisation, we need to reset the analog switch. We
4524 * also preset the switch to map the 4 connectors on the card to the
4525 * *user's* (see above description of kodicom4400r_muxsel) channels
4526 * 0 through 3
4527 */
4528static void kodicom4400r_init(struct bttv *btv)
4529{
4530 char *sw_status = (char *)(&btv->mbox_we);
4531 int ix;
4532
4533 gpio_inout(0x0003ff, 0x0003ff);
4534 gpio_write(1 << 9); /* reset MUX */
4535 gpio_write(0);
4536 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004537 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004538 sw_status[ix] = ix;
4539 kodicom4400r_write(btv, ix, ix, 1);
4540 }
4541 /*
4542 * Since this is the "master", we need to set up the
4543 * other three controller chips' pointers to this structure
4544 * for later use in the muxsel routine.
4545 */
4546 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4547 return;
4548 master[btv->c.nr-1] = btv;
4549 master[btv->c.nr] = btv;
4550 master[btv->c.nr+1] = btv;
4551 master[btv->c.nr+2] = btv;
4552}
4553
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004554/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4555 * video multiplexers to provide up to 16 video inputs. These
4556 * multiplexers are controlled by the lower 8 GPIO pins of the
4557 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004558
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004559 * xxx0 is pin xxx of multiplexer U5,
4560 * yyy1 is pin yyy of multiplexer U2
4561 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004562#define ENA0 0x01
4563#define ENB0 0x02
4564#define ENA1 0x04
4565#define ENB1 0x08
4566
4567#define IN10 0x10
4568#define IN00 0x20
4569#define IN11 0x40
4570#define IN01 0x80
4571
4572static void xguard_muxsel(struct bttv *btv, unsigned int input)
4573{
4574 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004575 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4576 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4577 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4578 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004579 };
4580 gpio_write(masks[input%16]);
4581}
4582static void picolo_tetra_init(struct bttv *btv)
4583{
4584 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4585 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4586 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4587}
4588static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4589{
4590
4591 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4592 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4593 /*GPIO[20]&GPIO[21] used to choose the right input*/
4594 btwrite (input<<20,BT848_GPIO_DATA);
4595
4596}
4597
4598/*
4599 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4600 *
4601 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4602 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004603 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004604 * optional "Monitor Out" bus. This allows the card to be looking
4605 * at one input while the monitor is looking at another.
4606 *
4607 * Since I've couldn't be bothered figuring out how to add an
4608 * independant muxsel for the monitor bus, I've just set it to
4609 * whatever the card is looking at.
4610 *
4611 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4612 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4613 *
4614 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4615 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4616 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4617 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4618 *
4619 */
4620
4621/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4622#define I2C_TDA8540 0x90
4623#define I2C_TDA8540_ALT1 0x92
4624#define I2C_TDA8540_ALT2 0x94
4625#define I2C_TDA8540_ALT3 0x96
4626#define I2C_TDA8540_ALT4 0x98
4627#define I2C_TDA8540_ALT5 0x9a
4628#define I2C_TDA8540_ALT6 0x9c
4629
4630static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4631{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004632 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004633 int key = input % 4;
4634 int matrix = input / 4;
4635
4636 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4637 btv->c.nr, input, matrix, key);
4638
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004639 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004640 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4641 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4642 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4643 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4644 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4645 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4646 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4647 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4648
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004649 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004650 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004651 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004652 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004653 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004654 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004655 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004656 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004657 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004658
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004659 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004660 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4661}
4662
4663
4664/* PXC200 muxsel helper
4665 * luke@syseng.anu.edu.au
4666 * another transplant
4667 * from Alessandro Rubini (rubini@linux.it)
4668 *
4669 * There are 4 kinds of cards:
4670 * PXC200L which is bt848
4671 * PXC200F which is bt848 with PIC controlling mux
4672 * PXC200AL which is bt878
4673 * PXC200AF which is bt878 with PIC controlling mux
4674 */
4675#define PX_CFG_PXC200F 0x01
4676#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4677#define PX_I2C_PIC 0x0f
4678#define PX_PXC200A_CARDID 0x200a1295
4679#define PX_I2C_CMD_CFG 0x00
4680
4681static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4682{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004683 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004684 long mux;
4685 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004686 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004687
4688 /* Read PIC config to determine if this is a PXC200F */
4689 /* PX_I2C_CMD_CFG*/
4690 buf[0]=0;
4691 buf[1]=0;
4692 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4693 if (rc) {
4694 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4695 /* not PXC ? do nothing */
4696 return;
4697 }
4698
4699 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4700 if (!(rc & PX_CFG_PXC200F)) {
4701 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4702 return;
4703 }
4704
4705
4706 /* The multiplexer in the 200F is handled by the GPIO port */
4707 /* get correct mapping between inputs */
4708 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4709 /* ** not needed!? */
4710 mux = input;
4711
4712 /* make sure output pins are enabled */
4713 /* bitmask=0x30f; */
4714 bitmask=0x302;
4715 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004716 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004717 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4718 bitmask |= 7<<4; /* the DAC */
4719 }
4720 btwrite(bitmask, BT848_GPIO_OUT_EN);
4721
4722 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004723 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004724 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4725 else /* older device */
4726 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4727 btwrite(bitmask,BT848_GPIO_DATA);
4728
4729 /*
4730 * Was "to be safe, set the bt848 to input 0"
4731 * Actually, since it's ok at load time, better not messing
4732 * with these bits (on PXC200AF you need to set mux 2 here)
4733 *
4734 * needed because bttv-driver sets mux before calling this function
4735 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004736 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004737 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4738 else /* older device */
4739 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4740
4741 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4742}
4743
4744/* ----------------------------------------------------------------------- */
4745/* motherboard chipset specific stuff */
4746
Adrian Bunk7d44e892007-12-11 19:23:43 -03004747void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004748{
4749 int pcipci_fail = 0;
4750 struct pci_dev *dev = NULL;
4751
Alan Cox3d265c92006-09-14 11:53:16 -03004752 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004753 pcipci_fail = 1;
4754 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4755 triton1 = 1;
4756 if (pci_pci_problems & PCIPCI_VSFX)
4757 vsfx = 1;
4758#ifdef PCIPCI_ALIMAGIK
4759 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4760 latency = 0x0A;
4761#endif
4762
Linus Torvalds1da177e2005-04-16 15:20:36 -07004763
4764 /* print warnings about any quirks found */
4765 if (triton1)
4766 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4767 if (vsfx)
4768 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4769 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004770 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4771 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004772 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004773 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004774 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004775 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004776 printk(KERN_INFO "bttv: overlay forced. Use this "
4777 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004778 }
4779 }
4780 if (UNSET != latency)
4781 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004782 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004783 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004784 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004785 pci_read_config_byte(dev, 0x53, &b);
4786 if (bttv_debug)
4787 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4788 "bufcon=0x%02x\n",b);
4789 }
4790}
4791
4792int __devinit bttv_handle_chipset(struct bttv *btv)
4793{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004794 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004795
4796 if (!triton1 && !vsfx && UNSET == latency)
4797 return 0;
4798
4799 if (bttv_verbose) {
4800 if (triton1)
4801 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4802 if (vsfx && btv->id >= 878)
4803 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4804 if (UNSET != latency)
4805 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4806 btv->c.nr,latency);
4807 }
4808
4809 if (btv->id < 878) {
4810 /* bt848 (mis)uses a bit in the irq mask for etbf */
4811 if (triton1)
4812 btv->triton1 = BT848_INT_ETBF;
4813 } else {
4814 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004815 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004816 if (triton1)
4817 command |= BT878_EN_TBFX;
4818 if (vsfx)
4819 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004820 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4821 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004822 if (UNSET != latency)
4823 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4824 return 0;
4825}
4826
4827
4828/*
4829 * Local variables:
4830 * c-basic-offset: 8
4831 * End:
4832 */