blob: 4a82cd2dd66a67dea6d9affa3cb13b97ca33aa59 [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
37#include <asm/io.h>
38
39#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020040#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030041#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030042#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
44/* fwd decl */
45static void boot_msp34xx(struct bttv *btv, int pin);
46static void boot_bt832(struct bttv *btv);
47static void hauppauge_eeprom(struct bttv *btv);
48static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030049static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050static void modtec_eeprom(struct bttv *btv);
51static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070052static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054static void rv605_muxsel(struct bttv *btv, unsigned int input);
55static void eagle_muxsel(struct bttv *btv, unsigned int input);
56static void xguard_muxsel(struct bttv *btv, unsigned int input);
57static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
59
60static void PXC200_muxsel(struct bttv *btv, unsigned int input);
61
62static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63static void picolo_tetra_init(struct bttv *btv);
64
65static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66static void tibetCS16_init(struct bttv *btv);
67
68static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69static void kodicom4400r_init(struct bttv *btv);
70
71static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
73
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030074static void geovision_muxsel(struct bttv *btv, unsigned int input);
75
Linus Torvalds1da177e2005-04-16 15:20:36 -070076static int terratec_active_radio_upgrade(struct bttv *btv);
77static int tea5757_read(struct bttv *btv);
78static int tea5757_write(struct bttv *btv, int value);
79static void identify_by_eeprom(struct bttv *btv,
80 unsigned char eeprom_data[256]);
81static int __devinit pvr_boot(struct bttv *btv);
82
83/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020084static unsigned int triton1;
85static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070086static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070087int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070088
89static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
94static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
95#ifdef MODULE
96static unsigned int autoload = 1;
97#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020098static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -070099#endif
100static unsigned int gpiomask = UNSET;
101static unsigned int audioall = UNSET;
102static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
103
104/* insmod options */
105module_param(triton1, int, 0444);
106module_param(vsfx, int, 0444);
107module_param(no_overlay, int, 0444);
108module_param(latency, int, 0444);
109module_param(gpiomask, int, 0444);
110module_param(audioall, int, 0444);
111module_param(autoload, int, 0444);
112
113module_param_array(card, int, NULL, 0444);
114module_param_array(pll, int, NULL, 0444);
115module_param_array(tuner, int, NULL, 0444);
116module_param_array(svhs, int, NULL, 0444);
117module_param_array(remote, int, NULL, 0444);
118module_param_array(audiomux, int, NULL, 0444);
119
120MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
121 "[enable bug compatibility for triton1 + others]");
122MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
123 "[yet another chipset flaw workaround]");
124MODULE_PARM_DESC(latency,"pci latency timer");
125MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
126MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
127MODULE_PARM_DESC(tuner,"specify installed tuner type");
128MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300129MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
130 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131
132/* ----------------------------------------------------------------------- */
133/* list of card IDs for bt878+ cards */
134
135static struct CARD {
136 unsigned id;
137 int cardnr;
138 char *name;
139} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800140 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
141 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
142 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
143 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
144 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
145 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
146 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
147 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800148 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800150 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
151 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800153 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
154 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
155 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
156 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
157 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800158 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800159 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
160 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800161 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800163 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700164 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800165 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
166 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700167 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169
Wade Berrier434b2522007-06-25 13:02:16 -0300170 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
171 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800172 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
175 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
176 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
177 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
178 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
179 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
180 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700181
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800182 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
183 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
184 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
185 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
186 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700187
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800188 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
189 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
190 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
191 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800193 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
194 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700195 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800196 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
197 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
198 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
199 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
200 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800202 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
203 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
204 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
205 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
206 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800208 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
209 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
210 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
211 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
212 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700213
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800214 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
215 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
216 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
217 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700218
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800219 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
220 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
221 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
222 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800224 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
225 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
226 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
227 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
228 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
229 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
230 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
231 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
232 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
233 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
234 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
235 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700249
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800250 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
251 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800253 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
254 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
255 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
256 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
257 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
258 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700259
Trent Piepho657de3c2006-06-20 00:30:57 -0300260 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800261 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700262
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800263 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
264 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
265 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
266 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
267 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
268 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800269 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
270 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800271 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800273 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
274 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800276 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
277 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
278 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
279 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800281 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282
Scott Alfter1ebba672007-04-02 14:22:39 -0300283 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
284 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
285
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700286 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800287 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700288
Steven Tothcd1257d2006-01-09 15:25:01 -0200289 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
290 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
291
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700292 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800293 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200294 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
295 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800296 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
297 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
298 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
299 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200300 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800301 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300302 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800303 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300304 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300305 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300306 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307
308 { 0, -1, NULL }
309};
310
311/* ----------------------------------------------------------------------- */
312/* array with description for bt848 / bt878 tv/grabber cards */
313
314struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800315 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800316 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800317 .name = " *** UNKNOWN/GENERIC *** ",
318 .video_inputs = 4,
319 .audio_inputs = 1,
320 .tuner = 0,
321 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200322 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300323 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800324 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800325 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800326 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800327 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800328 .name = "MIRO PCTV",
329 .video_inputs = 4,
330 .audio_inputs = 1,
331 .tuner = 0,
332 .svhs = 2,
333 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200334 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300335 .gpiomux = { 2, 0, 0, 0 },
336 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800337 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300338 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800339 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800340 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800341 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800342 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800343 .name = "Hauppauge (bt848)",
344 .video_inputs = 4,
345 .audio_inputs = 1,
346 .tuner = 0,
347 .svhs = 2,
348 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200349 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300350 .gpiomux = { 0, 1, 2, 3 },
351 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800352 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300353 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800354 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800355 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800357 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800358 .name = "STB, Gateway P/N 6000699 (bt848)",
359 .video_inputs = 3,
360 .audio_inputs = 1,
361 .tuner = 0,
362 .svhs = 2,
363 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200364 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300365 .gpiomux = { 4, 0, 2, 3 },
366 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800367 .no_msp34xx = 1,
368 .needs_tvaudio = 1,
369 .tuner_type = TUNER_PHILIPS_NTSC,
370 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800371 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800372 .pll = PLL_28,
373 .has_radio = 1,
374 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700375
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800376 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800377 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800378 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
379 .video_inputs = 4,
380 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300381 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 .svhs = 2,
383 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200384 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300385 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800386 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300387 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800388 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800389 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800390 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800391 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800392 .name = "Diamond DTV2000",
393 .video_inputs = 4,
394 .audio_inputs = 1,
395 .tuner = 0,
396 .svhs = 2,
397 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200398 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300399 .gpiomux = { 0, 1, 0, 1 },
400 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800401 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300402 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800403 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800404 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800406 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 .name = "AVerMedia TVPhone",
408 .video_inputs = 3,
409 .audio_inputs = 1,
410 .tuner = 0,
411 .svhs = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200412 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800413 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300414 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800415 /* 0x04 for some cards ?? */
416 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300417 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800418 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800419 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300420 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800421 .has_remote = 1,
422 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800423 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800424 .name = "MATRIX-Vision MV-Delta",
425 .video_inputs = 5,
426 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300427 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800428 .svhs = 3,
429 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200430 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300431 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800432 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300433 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800434 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800435 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700437
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800439 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800440 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
441 .video_inputs = 4,
442 .audio_inputs = 1,
443 .tuner = 0,
444 .svhs = 2,
445 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200446 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300447 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
448 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800449 .needs_tvaudio = 1,
450 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300451 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800452 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800453 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800454 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800455 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800456 .name = "IMS/IXmicro TurboTV",
457 .video_inputs = 3,
458 .audio_inputs = 1,
459 .tuner = 0,
460 .svhs = 2,
461 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200462 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300463 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800464 .needs_tvaudio = 0,
465 .pll = PLL_28,
466 .tuner_type = TUNER_TEMIC_PAL,
467 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800468 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800469 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800470 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800471 .name = "Hauppauge (bt878)",
472 .video_inputs = 4,
473 .audio_inputs = 1,
474 .tuner = 0,
475 .svhs = 2,
476 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -0200477 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300478 .gpiomux = { 0, 1, 2, 3 },
479 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800480 .needs_tvaudio = 1,
481 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300482 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800483 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800484 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800485 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800486 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800487 .name = "MIRO PCTV pro",
488 .video_inputs = 3,
489 .audio_inputs = 1,
490 .tuner = 0,
491 .svhs = 2,
492 .gpiomask = 0x3014f,
Michael Krufkybc286362006-01-11 19:40:17 -0200493 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300494 .gpiomux = { 0x20001,0x10001, 0, 0 },
495 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800496 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300497 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800498 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800499 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800500 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700501
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800502 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800503 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 .name = "ADS Technologies Channel Surfer TV (bt848)",
505 .video_inputs = 3,
506 .audio_inputs = 1,
507 .tuner = 0,
508 .svhs = 2,
509 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200510 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300511 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800512 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300513 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800514 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800515 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800516 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800517 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800518 .name = "AVerMedia TVCapture 98",
519 .video_inputs = 3,
520 .audio_inputs = 4,
521 .tuner = 0,
522 .svhs = 2,
523 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200524 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300525 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800526 .needs_tvaudio = 1,
527 .msp34xx_alt = 1,
528 .pll = PLL_28,
529 .tuner_type = TUNER_PHILIPS_PAL,
530 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800531 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300532 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800533 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800534 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800535 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800536 .name = "Aimslab Video Highway Xtreme (VHX)",
537 .video_inputs = 3,
538 .audio_inputs = 1,
539 .tuner = 0,
540 .svhs = 2,
541 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200542 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300543 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
544 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800545 .needs_tvaudio = 1,
546 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300547 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800548 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800549 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800550 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800551 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800552 .name = "Zoltrix TV-Max",
553 .video_inputs = 3,
554 .audio_inputs = 1,
555 .tuner = 0,
556 .svhs = 2,
557 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200558 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300559 .gpiomux = { 0, 0, 1, 0 },
560 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800561 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300562 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800563 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800564 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800565 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700566
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800567 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800568 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 .name = "Prolink Pixelview PlayTV (bt878)",
570 .video_inputs = 3,
571 .audio_inputs = 1,
572 .tuner = 0,
573 .svhs = 2,
574 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200575 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300577 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
578 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 .needs_tvaudio = 1,
580 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300581 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300582 .tuner_addr = ADDR_UNSET,
583 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800584 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800585 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800586 .name = "Leadtek WinView 601",
587 .video_inputs = 3,
588 .audio_inputs = 1,
589 .tuner = 0,
590 .svhs = 2,
591 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200592 .muxsel = { 2, 3, 1, 1,0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300593 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
594 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800595 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300596 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800597 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800598 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300599 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .has_radio = 1,
601 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800602 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800603 .name = "AVEC Intercapture",
604 .video_inputs = 3,
605 .audio_inputs = 2,
606 .tuner = 0,
607 .svhs = 2,
608 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200609 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300610 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800611 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300612 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800613 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800614 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800615 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800616 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800617 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
618 .video_inputs = 4,
619 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300620 .tuner = UNSET,
621 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800622 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200623 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300624 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800625 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300626 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800627 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800628 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800629 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800631 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800632 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800633 .name = "CEI Raffles Card",
634 .video_inputs = 3,
635 .audio_inputs = 3,
636 .tuner = 0,
637 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200638 .muxsel = { 2, 3, 1, 1 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300639 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800640 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800641 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800642 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800643 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800644 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
645 .video_inputs = 4,
646 .audio_inputs = 2, /* tuner, line in */
647 .tuner = 0,
648 .svhs = 2,
649 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200650 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300651 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
652 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800653 .pll = PLL_28,
654 .tuner_type = TUNER_PHILIPS_PAL_I,
655 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800656 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800657 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800658 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800659 .name = "Askey CPH050/ Phoebe Tv Master + FM",
660 .video_inputs = 3,
661 .audio_inputs = 1,
662 .tuner = 0,
663 .svhs = 2,
664 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200665 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300666 .gpiomux = { 0, 1, 0x800, 0x400 },
667 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800668 .needs_tvaudio = 1,
669 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300670 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800671 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800672 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800673 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800674 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
676 .video_inputs = 3,
677 .audio_inputs = 1,
678 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300679 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800680 .gpiomask = 7,
681 .muxsel = { 2, 3, -1 },
682 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300683 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800684 .no_msp34xx = 1,
685 .pll = PLL_28,
686 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
687 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800688 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800689 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700690
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800691 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800692 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 .name = "Askey CPH05X/06X (bt878) [many vendors]",
694 .video_inputs = 3,
695 .audio_inputs = 1,
696 .tuner = 0,
697 .svhs = 2,
698 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200699 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300700 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
701 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800702 .needs_tvaudio = 1,
703 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300704 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800705 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800706 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800707 .has_remote = 1,
708 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800709 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800710 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
711 .video_inputs = 3,
712 .audio_inputs = 1,
713 .tuner = 0,
714 .svhs = 2,
715 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200716 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300717 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
718 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800719 .needs_tvaudio = 0,
720 .tuner_type = TUNER_PHILIPS_PAL,
721 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800722 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300723 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800724 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800725 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800726 .name = "Hauppauge WinCam newer (bt878)",
727 .video_inputs = 4,
728 .audio_inputs = 1,
729 .tuner = 0,
730 .svhs = 3,
731 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200732 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300733 .gpiomux = { 0, 1, 2, 3 },
734 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800735 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300736 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800737 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800738 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800739 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800740 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800741 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
742 .video_inputs = 4,
743 .audio_inputs = 2,
744 .tuner = 0,
745 .svhs = 2,
746 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200747 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300748 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
749 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800750 .pll = PLL_28,
751 .tuner_type = TUNER_PHILIPS_SECAM,
752 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800753 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800754 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700755
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800756 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800757 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800758 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
759 .video_inputs = 3,
760 .audio_inputs = 1,
761 .tuner = 0,
762 .svhs = 2,
763 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200764 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300765 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
766 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800767 .needs_tvaudio = 0,
768 .tuner_type = TUNER_PHILIPS_PAL,
769 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800770 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300771 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800772 /* GPIO wiring:
773 External 20 pin connector (for Active Radio Upgrade board)
774 gpio00: i2c-sda
775 gpio01: i2c-scl
776 gpio02: om5610-data
777 gpio03: om5610-clk
778 gpio04: om5610-wre
779 gpio05: om5610-stereo
780 gpio06: rds6588-davn
781 gpio07: Pin 7 n.c.
782 gpio08: nIOW
783 gpio09+10: nIOR, nSEL ?? (bt878)
784 gpio09: nIOR (bt848)
785 gpio10: nSEL (bt848)
786 Sound Routing:
787 gpio16: u2-A0 (1st 4052bt)
788 gpio17: u2-A1
789 gpio18: u2-nEN
790 gpio19: u4-A0 (2nd 4052)
791 gpio20: u4-A1
792 u4-nEN - GND
793 Btspy:
794 00000 : Cdrom (internal audio input)
795 10000 : ext. Video audio input
796 20000 : TV Mono
797 a0000 : TV Mono/2
798 1a0000 : TV Stereo
799 30000 : Radio
800 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700801 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800803 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800804 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800805 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
806 .name = "Imagenation PXC200",
807 .video_inputs = 5,
808 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300809 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800810 .svhs = 1, /* was: 4 */
811 .gpiomask = 0,
812 .muxsel = { 2, 3, 1, 0, 0},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300813 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800814 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300815 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800816 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800817 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800818 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700819
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800820 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800821 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800822 .name = "Lifeview FlyVideo 98 LR50",
823 .video_inputs = 4,
824 .audio_inputs = 1,
825 .tuner = 0,
826 .svhs = 2,
827 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200828 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300829 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
830 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800831 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300832 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800833 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800834 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800835 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800836 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800837 .name = "Formac iProTV, Formac ProTV I (bt848)",
838 .video_inputs = 4,
839 .audio_inputs = 1,
840 .tuner = 0,
841 .svhs = 3,
842 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200843 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300844 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800845 .pll = PLL_28,
846 .tuner_type = TUNER_PHILIPS_PAL,
847 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800848 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800849 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800851 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800852 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800853 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
854 .video_inputs = 4,
855 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300856 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800857 .svhs = 2,
858 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200859 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300860 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800861 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300862 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800863 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800864 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800865 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800866 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800867 .name = "Terratec TerraTValue Version Bt878",
868 .video_inputs = 3,
869 .audio_inputs = 1,
870 .tuner = 0,
871 .svhs = 2,
872 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200873 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300874 .gpiomux = { 0x500, 0, 0x300, 0x900 },
875 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800876 .needs_tvaudio = 1,
877 .pll = PLL_28,
878 .tuner_type = TUNER_PHILIPS_PAL,
879 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800880 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800881 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800882 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
884 .video_inputs = 4,
885 .audio_inputs = 1,
886 .tuner = 0,
887 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200888 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800889 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
890 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300891 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
892 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800893 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
894 gpio23 -- hef4052:nEnable (0x800000)
895 gpio12 -- hef4052:A1
896 gpio13 -- hef4052:A0
897 0x0000: external audio
898 0x1000: FM
899 0x2000: TV
900 0x3000: n.c.
901 Note: There exists another variant "Winfast 2000" with tv stereo !?
902 Note: eeprom only contains FF and pci subsystem id 107d:6606
903 */
904 .needs_tvaudio = 0,
905 .pll = PLL_28,
906 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300907 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800908 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800909 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300910 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .has_remote = 1,
912 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800913 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800914 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
915 .video_inputs = 4,
916 .audio_inputs = 3,
917 .tuner = 0,
918 .svhs = 2,
919 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200920 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300921 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
922 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800923 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300924 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800925 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800926 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800927 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800929 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800930 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800931 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
932 .video_inputs = 4,
933 .audio_inputs = 3,
934 .tuner = 0,
935 .svhs = 2,
936 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200937 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300938 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
939 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800940 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300941 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800942 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800943 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .has_radio = 1,
945 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800946 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800947 .name = "Prolink PixelView PlayTV pro",
948 .video_inputs = 3,
949 .audio_inputs = 1,
950 .tuner = 0,
951 .svhs = 2,
952 .gpiomask = 0xff,
953 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300954 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
955 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .no_msp34xx = 1,
957 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300958 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800959 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800960 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800961 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800962 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 .name = "Askey CPH06X TView99",
964 .video_inputs = 4,
965 .audio_inputs = 1,
966 .tuner = 0,
967 .svhs = 2,
968 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200969 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300970 .gpiomux = { 0x551400, 0x551200, 0, 0 },
971 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800972 .needs_tvaudio = 1,
973 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300974 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800975 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800976 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800977 .has_remote = 1,
978 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800979 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800980 .name = "Pinnacle PCTV Studio/Rave",
981 .video_inputs = 3,
982 .audio_inputs = 1,
983 .tuner = 0,
984 .svhs = 2,
985 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200986 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300987 .gpiomux = { 2, 0xd0001, 0, 0 },
988 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 .needs_tvaudio = 0,
990 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300991 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800992 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800993 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800994 },
995
996 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800997 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800998 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
999 .video_inputs = 3,
1000 .audio_inputs = 1,
1001 .tuner = 0,
1002 .svhs = 2,
1003 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001004 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001005 .gpiomux = { 4, 0, 2, 3 },
1006 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001007 .no_msp34xx = 1,
1008 .needs_tvaudio = 1,
1009 .tuner_type = TUNER_PHILIPS_NTSC,
1010 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001011 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001012 .pll = PLL_28,
1013 .has_radio = 1,
1014 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001015 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .name = "AVerMedia TVPhone 98",
1017 .video_inputs = 3,
1018 .audio_inputs = 4,
1019 .tuner = 0,
1020 .svhs = 2,
1021 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001022 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001023 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .needs_tvaudio = 1,
1025 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001026 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001027 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001028 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001029 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001030 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001031 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001032 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001033 .name = "ProVideo PV951", /* pic16c54 */
1034 .video_inputs = 3,
1035 .audio_inputs = 1,
1036 .tuner = 0,
1037 .svhs = 2,
1038 .gpiomask = 0,
1039 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001040 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001041 .needs_tvaudio = 1,
1042 .no_msp34xx = 1,
1043 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001044 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001045 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001046 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001048 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001049 .name = "Little OnAir TV",
1050 .video_inputs = 3,
1051 .audio_inputs = 1,
1052 .tuner = 0,
1053 .svhs = 2,
1054 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001055 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001056 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1057 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001058 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001059 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001060 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001061 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001062 },
1063
1064 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001065 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001066 .name = "Sigma TVII-FM",
1067 .video_inputs = 2,
1068 .audio_inputs = 1,
1069 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001070 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001071 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001072 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001073 .gpiomux = { 1, 1, 0, 2 },
1074 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 .no_msp34xx = 1,
1076 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001077 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001078 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001079 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001080 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001081 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001082 .name = "MATRIX-Vision MV-Delta 2",
1083 .video_inputs = 5,
1084 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001085 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001086 .svhs = 3,
1087 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001088 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001089 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 .no_msp34xx = 1,
1091 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001092 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001093 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001094 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001095 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001096 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001097 .name = "Zoltrix Genie TV/FM",
1098 .video_inputs = 3,
1099 .audio_inputs = 1,
1100 .tuner = 0,
1101 .svhs = 2,
1102 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001103 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001104 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1105 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001106 .no_msp34xx = 1,
1107 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001108 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001109 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001110 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001111 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001112 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001113 .name = "Terratec TV/Radio+",
1114 .video_inputs = 3,
1115 .audio_inputs = 1,
1116 .tuner = 0,
1117 .svhs = 2,
1118 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001119 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001120 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1121 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001122 .needs_tvaudio = 1,
1123 .no_msp34xx = 1,
1124 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001125 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001126 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001127 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001128 .has_radio = 1,
1129 },
1130
1131 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001132 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001133 .name = "Askey CPH03x/ Dynalink Magic TView",
1134 .video_inputs = 3,
1135 .audio_inputs = 1,
1136 .tuner = 0,
1137 .svhs = 2,
1138 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001139 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001140 .gpiomux = {2,0,0,0 },
1141 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001142 .needs_tvaudio = 1,
1143 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001144 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001145 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001146 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001147 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001148 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001149 .name = "IODATA GV-BCTV3/PCI",
1150 .video_inputs = 3,
1151 .audio_inputs = 1,
1152 .tuner = 0,
1153 .svhs = 2,
1154 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001155 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001156 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001157 .no_msp34xx = 1,
1158 .pll = PLL_28,
1159 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1160 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001161 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001162 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001163 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001164 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001165 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1166 .video_inputs = 5,
1167 .audio_inputs = 1,
1168 .tuner = 0,
1169 .svhs = 3,
1170 .gpiomask = 0xAA0000,
1171 .muxsel = { 2,3,1,1,-1 },
1172 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001173 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1174 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001175 .no_msp34xx = 1,
1176 .pll = PLL_28,
1177 .tuner_type = TUNER_PHILIPS_PAL_I,
1178 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001179 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001180 .has_remote = 1,
1181 /* GPIO wiring: (different from Rev.4C !)
1182 GPIO17: U4.A0 (first hef4052bt)
1183 GPIO19: U4.A1
1184 GPIO20: U5.A1 (second hef4052bt)
1185 GPIO21: U4.nEN
1186 GPIO22: BT832 Reset Line
1187 GPIO23: A5,A0, U5,nEN
1188 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1189 */
1190 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001191 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001192 .name = "Eagle Wireless Capricorn2 (bt878A)",
1193 .video_inputs = 4,
1194 .audio_inputs = 1,
1195 .tuner = 0,
1196 .svhs = 2,
1197 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001198 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001199 .gpiomux = { 0, 1, 2, 3 },
1200 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001201 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001202 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001203 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001204 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001205 },
1206
1207 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001208 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001209 /* David Härdeman <david@2gen.com> */
1210 .name = "Pinnacle PCTV Studio Pro",
1211 .video_inputs = 4,
1212 .audio_inputs = 1,
1213 .tuner = 0,
1214 .svhs = 3,
1215 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001216 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001217 .gpiomux = { 1, 0xd0001, 0, 0 },
1218 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001219 /* sound path (5 sources):
1220 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1221 0= ext. Audio IN
1222 1= from MUX2
1223 2= Mono TV sound from Tuner
1224 3= not connected
1225 MUX2 (mask 0x30000):
1226 0,2,3= from MSP34xx
1227 1= FM stereo Radio from Tuner */
1228 .needs_tvaudio = 0,
1229 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001230 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001231 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001232 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001233 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001234 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001235 /* Claas Langbehn <claas@bigfoot.com>,
1236 Sven Grothklags <sven@upb.de> */
1237 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1238 .video_inputs = 4,
1239 .audio_inputs = 3,
1240 .tuner = 0,
1241 .svhs = 2,
1242 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001243 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001244 .gpiomux = { 0, 0, 0x10, 8 },
1245 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001246 .needs_tvaudio = 1,
1247 .pll = PLL_28,
1248 .tuner_type = TUNER_PHILIPS_PAL,
1249 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001250 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001251 .has_radio = 1,
1252 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001253 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001254 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001255 in de.comp.os.unix.linux.hardware:
1256 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001257 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001258 options tuner type=5 */
1259 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1260 .video_inputs = 4,
1261 .audio_inputs = 1,
1262 .tuner = 0,
1263 .svhs = 2,
1264 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001265 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001266 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1267 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001268 /* For cards with tda9820/tda9821:
1269 0x0000: Tuner normal stereo
1270 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1271 0x0880: Tuner A2 stereo */
1272 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001273 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001274 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001275 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001276 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001277 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001278 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1279 old Easy TV BT848 version (model CPH031) */
1280 .name = "Askey CPH031/ BESTBUY Easy TV",
1281 .video_inputs = 4,
1282 .audio_inputs = 1,
1283 .tuner = 0,
1284 .svhs = 2,
1285 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001286 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001287 .gpiomux = { 2, 0, 0, 0 },
1288 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001289 .needs_tvaudio = 0,
1290 .pll = PLL_28,
1291 .tuner_type = TUNER_TEMIC_PAL,
1292 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001293 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001294 },
1295
1296 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001297 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001298 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1299 .name = "Lifeview FlyVideo 98FM LR50",
1300 .video_inputs = 4,
1301 .audio_inputs = 3,
1302 .tuner = 0,
1303 .svhs = 2,
1304 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001305 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001306 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1307 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001308 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001309 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001310 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001311 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001312 },
1313 /* This is the ultimate cheapo capture card
1314 * just a BT848A on a small PCB!
1315 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001316 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001317 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1318 .video_inputs = 2,
1319 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001320 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001321 .svhs = 1,
1322 .gpiomask = 0,
1323 .muxsel = { 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001324 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001325 .needs_tvaudio = 0,
1326 .no_msp34xx = 1,
1327 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001328 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001329 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001330 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001331 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001332 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001333 /* Daniel Herrington <daniel.herrington@home.com> */
1334 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1335 .video_inputs = 3,
1336 .audio_inputs = 1,
1337 .tuner = 0,
1338 .svhs = 2,
1339 .gpiomask = 0xe00,
1340 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001341 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1342 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001343 .needs_tvaudio = 1,
1344 .pll = PLL_28,
1345 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1346 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001347 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001348 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001349 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001350 /* Matti Mottus <mottus@physic.ut.ee> */
1351 .name = "Askey CPH03x TV Capturer",
1352 .video_inputs = 4,
1353 .audio_inputs = 1,
1354 .tuner = 0,
1355 .svhs = 2,
1356 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001357 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001358 .gpiomux = { 2, 0, 0, 0 },
1359 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001360 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001361 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001362 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001363 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001364 },
1365
1366 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001367 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 /* Philip Blundell <philb@gnu.org> */
1369 .name = "Modular Technology MM100PCTV",
1370 .video_inputs = 2,
1371 .audio_inputs = 2,
1372 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001373 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001374 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001375 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001376 .gpiomux = { 2, 0, 0, 1 },
1377 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001378 .pll = PLL_35,
1379 .tuner_type = TUNER_TEMIC_PAL,
1380 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001381 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001382 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001383 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001384 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001385 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001386 .video_inputs = 2,
1387 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001388 .tuner = UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001389 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001390 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001391 .muxsel = { 2, 2 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001392 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001393 .no_msp34xx = 1,
1394 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001395 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001396 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001397 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001398 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001399 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001400 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001401 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1402 new Easy TV BT878 version (model CPH061)
1403 special thanks to Informatica Mieres for providing the card */
1404 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1405 .video_inputs = 3,
1406 .audio_inputs = 2,
1407 .tuner = 0,
1408 .svhs = 2,
1409 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001410 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001411 .gpiomux = { 1, 0, 4, 4 },
1412 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001413 .needs_tvaudio = 0,
1414 .pll = PLL_28,
1415 .tuner_type = TUNER_PHILIPS_PAL,
1416 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001417 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001418 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001419 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001420 /* Lukas Gebauer <geby@volny.cz> */
1421 .name = "ATI TV-Wonder",
1422 .video_inputs = 3,
1423 .audio_inputs = 1,
1424 .tuner = 0,
1425 .svhs = 2,
1426 .gpiomask = 0xf03f,
1427 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001428 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1429 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001430 .pll = PLL_28,
1431 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1432 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001433 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001434 },
1435
1436 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001437 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001438 /* Lukas Gebauer <geby@volny.cz> */
1439 .name = "ATI TV-Wonder VE",
1440 .video_inputs = 2,
1441 .audio_inputs = 1,
1442 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001443 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001444 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001445 .muxsel = { 2, 3, 0, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001446 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001447 .no_msp34xx = 1,
1448 .pll = PLL_28,
1449 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1450 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001451 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001452 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001453 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001454 /* DeeJay <deejay@westel900.net (2000S) */
1455 .name = "Lifeview FlyVideo 2000S LR90",
1456 .video_inputs = 3,
1457 .audio_inputs = 3,
1458 .tuner = 0,
1459 .svhs = 2,
1460 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001461 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001462 /* Radio changed from 1e80 to 0x800 to make
1463 FlyVideo2000S in .hu happy (gm)*/
1464 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001465 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1466 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001467 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 .no_msp34xx = 1,
1469 .no_tda9875 = 1,
1470 .needs_tvaudio = 1,
1471 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001472 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001473 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001474 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001475 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001476 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .name = "Terratec TValueRadio",
1478 .video_inputs = 3,
1479 .audio_inputs = 1,
1480 .tuner = 0,
1481 .svhs = 2,
1482 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001483 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001484 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1485 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001486 .needs_tvaudio = 1,
1487 .pll = PLL_28,
1488 .tuner_type = TUNER_PHILIPS_PAL,
1489 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001490 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001491 .has_radio = 1,
1492 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001493 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001494 /* TANAKA Kei <peg00625@nifty.com> */
1495 .name = "IODATA GV-BCTV4/PCI",
1496 .video_inputs = 3,
1497 .audio_inputs = 1,
1498 .tuner = 0,
1499 .svhs = 2,
1500 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001501 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001502 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001503 .no_msp34xx = 1,
1504 .pll = PLL_28,
1505 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1506 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001507 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001508 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001509 },
1510
1511 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001512 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001513 .name = "3Dfx VoodooTV FM (Euro)",
1514 /* try "insmod msp3400 simple=0" if you have
1515 * sound problems with this card. */
1516 .video_inputs = 4,
1517 .audio_inputs = 1,
1518 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001519 .svhs = UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001520 .gpiomask = 0x4f8a00,
1521 /* 0x100000: 1=MSP enabled (0=disable again)
1522 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1523 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1524 .gpiomute = 0x947fff,
1525 /* tvtuner, radio, external,internal, mute, stereo
1526 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1527 .muxsel = { 2, 3 ,0 ,1 },
1528 .tuner_type = TUNER_MT2032,
1529 .tuner_addr = ADDR_UNSET,
1530 .radio_addr = ADDR_UNSET,
1531 .pll = PLL_28,
1532 .has_radio = 1,
1533 },
1534 [BTTV_BOARD_VOODOOTV_200] = {
1535 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001536 /* try "insmod msp3400 simple=0" if you have
1537 * sound problems with this card. */
1538 .video_inputs = 4,
1539 .audio_inputs = 1,
1540 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001541 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001542 .gpiomask = 0x4f8a00,
1543 /* 0x100000: 1=MSP enabled (0=disable again)
1544 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001545 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1546 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001547 /* tvtuner, radio, external,internal, mute, stereo
1548 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001549 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001550 .tuner_type = TUNER_MT2032,
1551 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001552 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001553 .pll = PLL_28,
1554 .has_radio = 1,
1555 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001556 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001557 /* Philip Blundell <pb@nexus.co.uk> */
1558 .name = "Active Imaging AIMMS",
1559 .video_inputs = 1,
1560 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001561 .tuner = UNSET,
1562 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001563 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001564 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001565 .pll = PLL_28,
1566 .muxsel = { 2 },
1567 .gpiomask = 0
1568 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001569 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001570 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1571 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1572 .video_inputs = 3,
1573 .audio_inputs = 4,
1574 .tuner = 0,
1575 .svhs = 2,
1576 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001577 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001578 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1579 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001580 .needs_tvaudio = 1,
1581 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001582 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001583 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001584 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001585 .has_remote = 1,
1586 /* GPIO wiring:
1587 GPIO0: U4.A0 (hef4052bt)
1588 GPIO1: U4.A1
1589 GPIO2: U4.A1 (second hef4052bt)
1590 GPIO3: U4.nEN, U5.A0, A5.nEN
1591 GPIO8-15: vrd866b ?
1592 */
1593 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001594 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001595 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1596 .video_inputs = 4,
1597 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001598 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001599 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001600 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001601 .pll = PLL_28,
1602 .no_msp34xx = 1,
1603 .tuner_type = UNSET,
1604 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001605 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001606 },
1607
1608 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001609 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001610 /* Dariusz Kowalewski <darekk@automex.pl> */
1611 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1612 .video_inputs = 4,
1613 .audio_inputs = 1,
1614 .tuner = 0,
1615 .svhs = 2,
1616 .gpiomask = 0x3f,
1617 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001618 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1619 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001620 .needs_tvaudio = 1,
1621 .no_msp34xx = 1,
1622 .no_tda9875 = 1,
1623 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001624 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001625 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001626 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001627 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001628 .has_radio = 1, /* Note: not all cards have radio */
1629 .has_remote = 1,
1630 /* GPIO wiring:
1631 GPIO0: A0 hef4052
1632 GPIO1: A1 hef4052
1633 GPIO3: nEN hef4052
1634 GPIO8-15: vrd866b
1635 GPIO20,22,23: R30,R29,R28
1636 */
1637 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001638 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001639 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1640 /* you must jumper JP5 for the card to work */
1641 .name = "Sensoray 311",
1642 .video_inputs = 5,
1643 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001644 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001645 .svhs = 4,
1646 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001647 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001648 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001649 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001650 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001651 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001652 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001654 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001655 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1656 .name = "RemoteVision MX (RV605)",
1657 .video_inputs = 16,
1658 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001659 .tuner = UNSET,
1660 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001661 .gpiomask = 0x00,
1662 .gpiomask2 = 0x07ff,
1663 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1664 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1665 .no_msp34xx = 1,
1666 .no_tda9875 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001667 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001668 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001669 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001670 .muxsel_hook = rv605_muxsel,
1671 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001672 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001673 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1674 .video_inputs = 3,
1675 .audio_inputs = 2,
1676 .tuner = 0,
1677 .svhs = 2,
1678 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1679 .muxsel = { 2, 1, 1, },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001680 .gpiomux = { 0, 1, 2, 2 },
1681 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001682 .needs_tvaudio = 0,
1683 .tuner_type = TUNER_PHILIPS_PAL,
1684 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001685 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001686 .pll = PLL_28,
1687 .has_radio = 1,
1688 },
1689
1690 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001691 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001692 /* Masaki Suzuki <masaki@btree.org> */
1693 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1694 .video_inputs = 3,
1695 .audio_inputs = 1,
1696 .tuner = 0,
1697 .svhs = 2,
1698 .gpiomask = 0x140007,
1699 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001700 .gpiomux = { 0, 1, 2, 3 },
1701 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001702 .tuner_type = TUNER_PHILIPS_NTSC,
1703 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001704 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001705 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001706 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001707 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001708 .name = "GrandTec Multi Capture Card (Bt878)",
1709 .video_inputs = 4,
1710 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001711 .tuner = UNSET,
1712 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001713 .gpiomask = 0,
1714 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001715 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001716 .needs_tvaudio = 0,
1717 .no_msp34xx = 1,
1718 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001719 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001720 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001721 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001722 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001723 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1725 .video_inputs = 4,
1726 .audio_inputs = 3,
1727 .tuner = 0,
1728 .svhs = 2,
1729 .gpiomask = 7,
1730 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001731 .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 -08001732 * This card lacks external Audio In, so we mute it on Ext. & Int.
1733 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1734 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001735 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001736 * btwincap uses 0x80000/0x80003
1737 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001738 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001739 .needs_tvaudio = 0,
1740 .no_msp34xx = 1,
1741 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001742 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001743 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001744 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001745 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1746 radio signal strength indicators work fine. */
1747 .has_radio = 1,
1748 /* GPIO Info:
1749 GPIO0,1: HEF4052 A0,A1
1750 GPIO2: HEF4052 nENABLE
1751 GPIO3-7: n.c.
1752 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1753 GPIO14,15: ??
1754 GPIO16-21: n.c.
1755 GPIO22,23: ??
1756 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1757 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001758 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1760 .name = "DSP Design TCVIDEO",
1761 .video_inputs = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001762 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02001763 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001764 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001765 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001766 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001767 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001768 },
1769
1770 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001771 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 .name = "Hauppauge WinTV PVR",
1773 .video_inputs = 4,
1774 .audio_inputs = 1,
1775 .tuner = 0,
1776 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001777 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001778 .needs_tvaudio = 1,
1779 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001780 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001781 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001782 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783
1784 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001785 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001786 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001787 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001788 .name = "IODATA GV-BCTV5/PCI",
1789 .video_inputs = 3,
1790 .audio_inputs = 1,
1791 .tuner = 0,
1792 .svhs = 2,
1793 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001794 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001795 .gpiomux = {0x030000, 0x010000, 0, 0 },
1796 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001797 .no_msp34xx = 1,
1798 .pll = PLL_28,
1799 .tuner_type = TUNER_PHILIPS_NTSC_M,
1800 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001801 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001802 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001803 .has_radio = 1,
1804 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001805 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001806 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1807 .video_inputs = 4, /* id-inputs-clock */
1808 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001809 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001810 .svhs = 3,
1811 .muxsel = { 3, 2, 0, 1 },
1812 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001813 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001814 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001815 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001816 .no_msp34xx = 1,
1817 .no_tda9875 = 1,
1818 .no_tda7432 = 1,
1819 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001820 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001821 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1822 .video_inputs = 3,
1823 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001824 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001825 .svhs = 2,
1826 .muxsel = { 2, 3, 1 },
1827 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001828 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001829 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001830 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001831 .no_msp34xx = 1,
1832 .no_tda9875 = 1,
1833 .no_tda7432 = 1,
1834 },
1835
1836 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001837 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001838 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1839 .video_inputs = 2,
1840 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001841 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001842 .svhs = 1,
1843 .muxsel = { 3, 1 },
1844 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001845 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001846 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001847 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001848 .no_msp34xx = 1,
1849 .no_tda9875 = 1,
1850 .no_tda7432 = 1,
1851 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001852 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001853 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1854 .video_inputs = 1,
1855 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001856 .tuner = UNSET,
1857 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001858 .muxsel = { 0 },
1859 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001860 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001861 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001862 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001863 .no_msp34xx = 1,
1864 .no_tda9875 = 1,
1865 .no_tda7432 = 1,
1866 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001867 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001868 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1869 .video_inputs = 2,
1870 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001871 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001872 .svhs = 1,
1873 .muxsel = { 0, 1 },
1874 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001875 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001876 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001877 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001878 .no_msp34xx = 1,
1879 .no_tda9875 = 1,
1880 .no_tda7432 = 1,
1881 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001882 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001883 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1884 .video_inputs = 1,
1885 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001886 .tuner = UNSET,
1887 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001888 .muxsel = { 0 },
1889 .pll = PLL_28,
1890 .tuner_type = UNSET,
1891 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001892 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001893 .no_msp34xx = 1,
1894 .no_tda9875 = 1,
1895 .no_tda7432 = 1,
1896 },
1897
1898 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001899 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001900 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1901 .video_inputs = 2,
1902 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001903 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001904 .svhs = 1,
1905 .muxsel = { 0, 1 },
1906 .pll = PLL_28,
1907 .tuner_type = UNSET,
1908 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001909 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001910 .no_msp34xx = 1,
1911 .no_tda9875 = 1,
1912 .no_tda7432 = 1,
1913 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001914 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001915 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001916 .video_inputs = 2,
1917 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001918 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001919 .svhs = 1,
1920 .muxsel = { 2, 3 },
1921 .pll = PLL_28,
1922 .tuner_type = UNSET,
1923 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001924 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001925 .no_msp34xx = 1,
1926 .no_tda9875 = 1,
1927 .no_tda7432 = 1,
1928 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001929 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001930 .name = "Osprey 500", /* 500 */
1931 .video_inputs = 2,
1932 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001933 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001934 .svhs = 1,
1935 .muxsel = { 2, 3 },
1936 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001937 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001938 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001939 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001940 .no_msp34xx = 1,
1941 .no_tda9875 = 1,
1942 .no_tda7432 = 1,
1943 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001944 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001945 .name = "Osprey 540", /* 540 */
1946 .video_inputs = 4,
1947 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001948 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001949 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001950 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001951 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001952 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001953 .no_msp34xx = 1,
1954 .no_tda9875 = 1,
1955 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001956 },
1957
1958 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001959 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001960 .name = "Osprey 2000", /* 2000 */
1961 .video_inputs = 2,
1962 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001963 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001964 .svhs = 1,
1965 .muxsel = { 2, 3 },
1966 .pll = PLL_28,
1967 .tuner_type = UNSET,
1968 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001969 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001970 .no_msp34xx = 1,
1971 .no_tda9875 = 1,
1972 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1973 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001974 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001975 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1976 .name = "IDS Eagle",
1977 .video_inputs = 4,
1978 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001979 .tuner = UNSET,
1980 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001981 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001982 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001983 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001984 .gpiomask = 0,
1985 .muxsel = { 0, 1, 2, 3 },
1986 .muxsel_hook = eagle_muxsel,
1987 .no_msp34xx = 1,
1988 .no_tda9875 = 1,
1989 .pll = PLL_28,
1990 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001991 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001992 .name = "Pinnacle PCTV Sat",
1993 .video_inputs = 2,
1994 .audio_inputs = 0,
1995 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001996 .tuner = UNSET,
1997 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001998 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001999 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002000 .no_msp34xx = 1,
2001 .no_tda9875 = 1,
2002 .no_tda7432 = 1,
Mauro Carvalho Chehabd2be8932006-10-02 23:52:48 -03002003 .muxsel = { 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .pll = PLL_28,
2005 .no_gpioirq = 1,
2006 .has_dvb = 1,
2007 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002008 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002009 .name = "Formac ProTV II (bt878)",
2010 .video_inputs = 4,
2011 .audio_inputs = 1,
2012 .tuner = 0,
2013 .svhs = 3,
2014 .gpiomask = 2,
2015 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02002016 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002017 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002018 .pll = PLL_28,
2019 .has_radio = 1,
2020 .tuner_type = TUNER_PHILIPS_PAL,
2021 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002022 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002023 /* sound routing:
2024 GPIO=0x00,0x01,0x03: mute (?)
2025 0x02: both TV and radio (tuner: FM1216/I)
2026 The card has onboard audio connectors labeled "cdrom" and "board",
2027 not soldered here, though unknown wiring.
2028 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002029 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002030 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002031
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002032 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002033 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .name = "MachTV",
2035 .video_inputs = 3,
2036 .audio_inputs = 1,
2037 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002038 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002039 .gpiomask = 7,
2040 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002041 .gpiomux = { 0, 1, 2, 3},
2042 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002044 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002046 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08002047 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002048 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002049 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002050 .name = "Euresys Picolo",
2051 .video_inputs = 3,
2052 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002053 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002054 .svhs = 2,
2055 .gpiomask = 0,
2056 .no_msp34xx = 1,
2057 .no_tda9875 = 1,
2058 .no_tda7432 = 1,
2059 .muxsel = { 2, 0, 1},
2060 .pll = PLL_28,
2061 .tuner_type = UNSET,
2062 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002063 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002064 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002065 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002066 /* Luc Van Hoeylandt <luc@e-magic.be> */
2067 .name = "ProVideo PV150", /* 0x4f */
2068 .video_inputs = 2,
2069 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002070 .tuner = UNSET,
2071 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002072 .gpiomask = 0,
2073 .muxsel = { 2, 3 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002074 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002075 .needs_tvaudio = 0,
2076 .no_msp34xx = 1,
2077 .pll = PLL_28,
2078 .tuner_type = UNSET,
2079 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002080 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002081 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002082 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002083 /* Hiroshi Takekawa <sian@big.or.jp> */
2084 /* This card lacks subsystem ID */
2085 .name = "AD-TVK503", /* 0x63 */
2086 .video_inputs = 4,
2087 .audio_inputs = 1,
2088 .tuner = 0,
2089 .svhs = 2,
2090 .gpiomask = 0x001e8007,
2091 .muxsel = { 2, 3, 1, 0 },
2092 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002093 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2094 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002095 .needs_tvaudio = 0,
2096 .no_msp34xx = 1,
2097 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002098 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002100 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03002101 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002102 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002103
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002104 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002105 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002106 .name = "Hercules Smart TV Stereo",
2107 .video_inputs = 4,
2108 .audio_inputs = 1,
2109 .tuner = 0,
2110 .svhs = 2,
2111 .gpiomask = 0x00,
2112 .muxsel = { 2, 3, 1, 1 },
2113 .needs_tvaudio = 1,
2114 .no_msp34xx = 1,
2115 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002116 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002117 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002118 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002119 /* Notes:
2120 - card lacks subsystem ID
2121 - stereo variant w/ daughter board with tda9874a @0xb0
2122 - Audio Routing:
2123 always from tda9874 independent of GPIO (?)
2124 external line in: unknown
2125 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2126 hef4053 (instead 4052) for unknown function
2127 */
2128 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002129 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002130 .name = "Pace TV & Radio Card",
2131 .video_inputs = 4,
2132 .audio_inputs = 1,
2133 .tuner = 0,
2134 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002135 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002136 .gpiomask = 0,
2137 .no_tda9875 = 1,
2138 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002139 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002140 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002141 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002142 .has_radio = 1,
2143 .pll = PLL_28,
2144 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2145 only internal line out: (4pin header) RGGL
2146 Radio must be decoded by msp3410d (not routed through)*/
2147 /*
2148 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2149 */
2150 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002151 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002152 /* Chris Willing <chris@vislab.usyd.edu.au> */
2153 .name = "IVC-200",
2154 .video_inputs = 1,
2155 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002156 .tuner = UNSET,
2157 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002158 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002159 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002160 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002161 .gpiomask = 0xdf,
2162 .muxsel = { 2 },
2163 .pll = PLL_28,
2164 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002165 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002166 .name = "Grand X-Guard / Trust 814PCI",
2167 .video_inputs = 16,
2168 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002169 .tuner = UNSET,
2170 .svhs = UNSET,
2171 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002172 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002173 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002174 .gpiomask2 = 0xff,
2175 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2176 .muxsel_hook = xguard_muxsel,
2177 .no_msp34xx = 1,
2178 .no_tda9875 = 1,
2179 .no_tda7432 = 1,
2180 .pll = PLL_28,
2181 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002182
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002183 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002184 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002185 .name = "Nebula Electronics DigiTV",
2186 .video_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002187 .tuner = UNSET,
2188 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002189 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002190 .no_msp34xx = 1,
2191 .no_tda9875 = 1,
2192 .no_tda7432 = 1,
2193 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002194 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002195 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002196 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002197 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002198 .has_remote = 1,
2199 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002200 .no_gpioirq = 1,
2201 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002202 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002203 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2204 .name = "ProVideo PV143",
2205 .video_inputs = 4,
2206 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002207 .tuner = UNSET,
2208 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002209 .gpiomask = 0,
2210 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002211 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002212 .needs_tvaudio = 0,
2213 .no_msp34xx = 1,
2214 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002215 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002216 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002217 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002218 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002219 [BTTV_BOARD_VD009X1_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002220 /* M.Klahr@phytec.de */
2221 .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
2222 .video_inputs = 4,
2223 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002224 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002225 .svhs = 3,
2226 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002227 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002228 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 .needs_tvaudio = 1,
2230 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002231 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002232 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002233 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002234 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002235 [BTTV_BOARD_VD009X1_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002236 .name = "PHYTEC VD-009-X1 Combi (bt878)",
2237 .video_inputs = 4,
2238 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002239 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002240 .svhs = 3,
2241 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002242 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002243 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 .needs_tvaudio = 1,
2245 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002246 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002247 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002248 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002249 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002250
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002251 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002252 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002253 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2254 .video_inputs = 10,
2255 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002256 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002257 .svhs = 9,
2258 .gpiomask = 0x00,
2259 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2260 via the upper nibble of muxsel. here: used for
2261 xternal video-mux */
2262 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002263 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 .needs_tvaudio = 1,
2265 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002266 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002267 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002268 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002269 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002270 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002271 .name = "PHYTEC VD-009 Combi (bt878)",
2272 .video_inputs = 10,
2273 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002274 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002275 .svhs = 9,
2276 .gpiomask = 0x00,
2277 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2278 via the upper nibble of muxsel. here: used for
2279 xternal video-mux */
2280 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002281 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002282 .needs_tvaudio = 1,
2283 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002284 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002285 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002286 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002287 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002288 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002289 .name = "IVC-100",
2290 .video_inputs = 4,
2291 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002292 .tuner = UNSET,
2293 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002294 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002295 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002296 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002297 .gpiomask = 0xdf,
2298 .muxsel = { 2, 3, 1, 0 },
2299 .pll = PLL_28,
2300 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002301 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002302 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2303 .name = "IVC-120G",
2304 .video_inputs = 16,
2305 .audio_inputs = 0, /* card has no audio */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002306 .tuner = UNSET, /* card has no tuner */
2307 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002309 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002310 .svhs = UNSET, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002311 .needs_tvaudio = 0,
2312 .no_msp34xx = 1,
2313 .no_tda9875 = 1,
2314 .no_tda7432 = 1,
2315 .gpiomask = 0x00,
2316 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2317 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2318 .muxsel_hook = ivc120_muxsel,
2319 .pll = PLL_28,
2320 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002321
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002322 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002323 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002324 .name = "pcHDTV HD-2000 TV",
2325 .video_inputs = 4,
2326 .audio_inputs = 1,
2327 .tuner = 0,
2328 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002329 .muxsel = { 2, 3, 1, 0 },
Michael Krufkyab8b8702008-04-22 14:46:05 -03002330 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002331 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002332 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002333 .has_dvb = 1,
2334 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002335 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002336 .name = "Twinhan DST + clones",
2337 .no_msp34xx = 1,
2338 .no_tda9875 = 1,
2339 .no_tda7432 = 1,
2340 .tuner_type = TUNER_ABSENT,
2341 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002342 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002343 .no_video = 1,
2344 .has_dvb = 1,
2345 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002346 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002347 .name = "Winfast VC100",
2348 .video_inputs = 3,
2349 .audio_inputs = 0,
2350 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002351 .tuner = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002352 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002353 .no_msp34xx = 1,
2354 .no_tda9875 = 1,
2355 .no_tda7432 = 1,
2356 .tuner_type = TUNER_ABSENT,
2357 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002358 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002359 .pll = PLL_28,
2360 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002361 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002362 .name = "Teppro TEV-560/InterVision IV-560",
2363 .video_inputs = 3,
2364 .audio_inputs = 1,
2365 .tuner = 0,
2366 .svhs = 2,
2367 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002368 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002369 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 .needs_tvaudio = 1,
2371 .tuner_type = TUNER_PHILIPS_PAL,
2372 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002373 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 .pll = PLL_35,
2375 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002376
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002377 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002378 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 .name = "SIMUS GVC1100",
2380 .video_inputs = 4,
2381 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002382 .tuner = UNSET,
2383 .svhs = UNSET,
2384 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002385 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002386 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002387 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002388 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002389 .gpiomask = 0x3F,
2390 .muxsel_hook = gvc1100_muxsel,
2391 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002392 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002393 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2394 .name = "NGS NGSTV+",
2395 .video_inputs = 3,
2396 .tuner = 0,
2397 .svhs = 2,
2398 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002399 .muxsel = { 2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002400 .gpiomux = { 0, 0, 0, 0 },
2401 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002402 .pll = PLL_28,
2403 .tuner_type = TUNER_PHILIPS_PAL,
2404 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002405 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 .has_remote = 1,
2407 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002408 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002409 /* http://linuxmedialabs.com */
2410 .name = "LMLBT4",
2411 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2412 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002413 .tuner = UNSET,
2414 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002415 .muxsel = { 2, 3, 1, 0 },
2416 .no_msp34xx = 1,
2417 .no_tda9875 = 1,
2418 .no_tda7432 = 1,
2419 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002420 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002421 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002422 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002423 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002424 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002425 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2426 .name = "Tekram M205 PRO",
2427 .video_inputs = 3,
2428 .audio_inputs = 1,
2429 .tuner = 0,
2430 .tuner_type = TUNER_PHILIPS_PAL,
2431 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002432 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002433 .svhs = 2,
2434 .needs_tvaudio = 0,
2435 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002436 .muxsel = { 2, 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002437 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002438 .pll = PLL_28,
2439 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002440
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002441 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002442 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002443 /* Javier Cendan Ares <jcendan@lycos.es> */
2444 /* bt878 TV + FM without subsystem ID */
2445 .name = "Conceptronic CONTVFMi",
2446 .video_inputs = 3,
2447 .audio_inputs = 1,
2448 .tuner = 0,
2449 .svhs = 2,
2450 .gpiomask = 0x008007,
2451 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002452 .gpiomux = { 0, 1, 2, 2 },
2453 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002454 .needs_tvaudio = 0,
2455 .pll = PLL_28,
2456 .tuner_type = TUNER_PHILIPS_PAL,
2457 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002458 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002459 .has_remote = 1,
2460 .has_radio = 1,
2461 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002462 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002463 /*Eric DEBIEF <debief@telemsa.com>*/
2464 /*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 -08002465 /* 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 -08002466 /*0x79 in bttv.h*/
2467 .name = "Euresys Picolo Tetra",
2468 .video_inputs = 4,
2469 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002470 .tuner = UNSET,
2471 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002472 .gpiomask = 0,
2473 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2474 .no_msp34xx = 1,
2475 .no_tda9875 = 1,
2476 .no_tda7432 = 1,
2477 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002478 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002479 .pll = PLL_28,
2480 .needs_tvaudio = 0,
2481 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002482 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002483 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002484 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002485 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002486 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002487 /* Spirit TV Tuner from http://spiritmodems.com.au */
2488 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2489 .name = "Spirit TV Tuner",
2490 .video_inputs = 3,
2491 .audio_inputs = 1,
2492 .tuner = 0,
2493 .svhs = 2,
2494 .gpiomask = 0x0000000f,
2495 .muxsel = { 2, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002496 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002497 .tuner_type = TUNER_TEMIC_PAL,
2498 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002499 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002500 .no_msp34xx = 1,
2501 .no_tda9875 = 1,
2502 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002503 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002504 /* Wolfram Joost <wojo@frokaschwei.de> */
2505 .name = "AVerMedia AVerTV DVB-T 771",
2506 .video_inputs = 2,
2507 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002508 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002509 .tuner_type = TUNER_ABSENT,
2510 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002511 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002512 .muxsel = { 3 , 3 },
2513 .no_msp34xx = 1,
2514 .no_tda9875 = 1,
2515 .no_tda7432 = 1,
2516 .pll = PLL_28,
2517 .has_dvb = 1,
2518 .no_gpioirq = 1,
2519 .has_remote = 1,
2520 },
2521 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002522 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002523 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002524 /* 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 -08002525 .name = "AverMedia AverTV DVB-T 761",
2526 .video_inputs = 2,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002527 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002528 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002529 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002530 .no_msp34xx = 1,
2531 .no_tda9875 = 1,
2532 .no_tda7432 = 1,
2533 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002534 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002535 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002536 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 .has_dvb = 1,
2538 .no_gpioirq = 1,
2539 .has_remote = 1,
2540 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002541 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002542 /* andre.schwarz@matrix-vision.de */
2543 .name = "MATRIX Vision Sigma-SQ",
2544 .video_inputs = 16,
2545 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002546 .tuner = UNSET,
2547 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002548 .gpiomask = 0x0,
2549 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2550 3, 3, 3, 3, 3, 3, 3, 3 },
2551 .muxsel_hook = sigmaSQ_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002552 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002553 .no_msp34xx = 1,
2554 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002555 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002556 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002557 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002558 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002559 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002560 /* andre.schwarz@matrix-vision.de */
2561 .name = "MATRIX Vision Sigma-SLC",
2562 .video_inputs = 4,
2563 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002564 .tuner = UNSET,
2565 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002566 .gpiomask = 0x0,
2567 .muxsel = { 2, 2, 2, 2 },
2568 .muxsel_hook = sigmaSLC_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002569 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002570 .no_msp34xx = 1,
2571 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002572 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002573 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002574 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002575 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002576 /* BTTV_BOARD_APAC_VIEWCOMP */
2577 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002578 /* Attila Kondoros <attila.kondoros@chello.hu> */
2579 /* bt878 TV + FM 0x00000000 subsystem ID */
2580 .name = "APAC Viewcomp 878(AMAX)",
2581 .video_inputs = 2,
2582 .audio_inputs = 1,
2583 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002584 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002585 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002586 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002587 .gpiomux = { 2, 0, 0, 0 },
2588 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002589 .needs_tvaudio = 0,
2590 .pll = PLL_28,
2591 .tuner_type = TUNER_PHILIPS_PAL,
2592 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002593 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002594 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2595 .has_radio = 1, /* not every card has radio */
2596 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002597
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002598 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002599 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002600 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2601 .name = "DViCO FusionHDTV DVB-T Lite",
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002602 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002603 .no_msp34xx = 1,
2604 .no_tda9875 = 1,
2605 .no_tda7432 = 1,
2606 .pll = PLL_28,
2607 .no_video = 1,
2608 .has_dvb = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002609 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002610 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002611 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002612 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002613 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002614 /* Steven <photon38@pchome.com.tw> */
2615 .name = "V-Gear MyVCD",
2616 .video_inputs = 3,
2617 .audio_inputs = 1,
2618 .tuner = 0,
2619 .svhs = 2,
2620 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002621 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002622 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2623 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002624 .no_msp34xx = 1,
2625 .pll = PLL_28,
2626 .tuner_type = TUNER_PHILIPS_NTSC_M,
2627 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002628 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002629 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002630 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002631 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002632 /* Rick C <cryptdragoon@gmail.com> */
2633 .name = "Super TV Tuner",
2634 .video_inputs = 4,
2635 .audio_inputs = 1,
2636 .tuner = 0,
2637 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002638 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002639 .tuner_type = TUNER_PHILIPS_NTSC,
2640 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002641 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002642 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002643 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002644 .needs_tvaudio = 1,
2645 .has_radio = 1,
2646 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002647 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002648 /* Chris Fanning <video4linux@haydon.net> */
2649 .name = "Tibet Systems 'Progress DVR' CS16",
2650 .video_inputs = 16,
2651 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002652 .tuner = UNSET,
2653 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002654 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2655 .pll = PLL_28,
2656 .no_msp34xx = 1,
2657 .no_tda9875 = 1,
2658 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002659 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002660 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002661 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002662 .muxsel_hook = tibetCS16_muxsel,
2663 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002664 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002665 /* Bill Brack <wbrack@mmm.com.hk> */
2666 /*
2667 * Note that, because of the card's wiring, the "master"
2668 * BT878A chip (i.e. the one which controls the analog switch
2669 * and must use this card type) is the 2nd one detected. The
2670 * other 3 chips should use card type 0x85, whose description
2671 * follows this one. There is a EEPROM on the card (which is
2672 * connected to the I2C of one of those other chips), but is
2673 * not currently handled. There is also a facility for a
2674 * "monitor", which is also not currently implemented.
2675 */
2676 .name = "Kodicom 4400R (master)",
2677 .video_inputs = 16,
2678 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002679 .tuner = UNSET,
2680 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002681 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002682 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002683 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002684 /* GPIO bits 0-9 used for analog switch:
2685 * 00 - 03: camera selector
2686 * 04 - 06: channel (controller) selector
2687 * 07: data (1->on, 0->off)
2688 * 08: strobe
2689 * 09: reset
2690 * bit 16 is input from sync separator for the channel
2691 */
2692 .gpiomask = 0x0003ff,
2693 .no_gpioirq = 1,
2694 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2695 .pll = PLL_28,
2696 .no_msp34xx = 1,
2697 .no_tda7432 = 1,
2698 .no_tda9875 = 1,
2699 .muxsel_hook = kodicom4400r_muxsel,
2700 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002701 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002702 /* Bill Brack <wbrack@mmm.com.hk> */
2703 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2704 * one which controls the analog switch, and must use the card type)
2705 * is the 2nd one detected. The other 3 chips should use this card
2706 * type
2707 */
2708 .name = "Kodicom 4400R (slave)",
2709 .video_inputs = 16,
2710 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002711 .tuner = UNSET,
2712 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002713 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002714 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002715 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002716 .gpiomask = 0x010000,
2717 .no_gpioirq = 1,
2718 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2719 .pll = PLL_28,
2720 .no_msp34xx = 1,
2721 .no_tda7432 = 1,
2722 .no_tda9875 = 1,
2723 .muxsel_hook = kodicom4400r_muxsel,
2724 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002725 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002726 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002727 /* Michael Henson <mhenson@clarityvi.com> */
2728 /* Adlink RTV24 with special unlock codes */
2729 .name = "Adlink RTV24",
2730 .video_inputs = 4,
2731 .audio_inputs = 1,
2732 .tuner = 0,
2733 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002734 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002735 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002736 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002737 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002738 .pll = PLL_28,
2739 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002740 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002741 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002742 /* Michael Krufky <mkrufky@m1k.net> */
2743 .name = "DViCO FusionHDTV 5 Lite",
2744 .tuner = 0,
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002745 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002746 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002747 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002748 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002749 .audio_inputs = 1,
2750 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002751 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002752 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002753 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2754 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002755 .no_msp34xx = 1,
2756 .no_tda9875 = 1,
2757 .no_tda7432 = 1,
2758 .has_dvb = 1,
2759 },
2760 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002761 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002762 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002763 .name = "Acorp Y878F",
2764 .video_inputs = 3,
2765 .audio_inputs = 1,
2766 .tuner = 0,
2767 .svhs = 2,
2768 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002769 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002770 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2771 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002772 .needs_tvaudio = 1,
2773 .pll = PLL_28,
2774 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2775 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002776 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002777 .has_radio = 1,
2778 },
2779 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002780 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002781 .name = "Conceptronic CTVFMi v2",
2782 .video_inputs = 3,
2783 .audio_inputs = 1,
2784 .tuner = 0,
2785 .svhs = 2,
2786 .gpiomask = 0x001c0007,
2787 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002788 .gpiomux = { 0, 1, 2, 2 },
2789 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002790 .needs_tvaudio = 0,
2791 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002792 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002793 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002794 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002795 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002796 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002797 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002798 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002799 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002800 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2801 .video_inputs = 5,
2802 .audio_inputs = 1,
2803 .tuner = 0,
2804 .svhs = 3,
2805 .gpiomask = 0x01fe00,
2806 .muxsel = { 2,3,1,1,-1 },
2807 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002808 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2809 .gpiomute = 0x12400,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002810 .no_msp34xx = 1,
2811 .pll = PLL_28,
2812 .tuner_type = TUNER_LG_PAL_FM,
2813 .tuner_addr = ADDR_UNSET,
2814 .radio_addr = ADDR_UNSET,
2815 .has_remote = 1,
2816 },
2817 /* ---- card 0x8b ---------------------------------- */
2818 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002819 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002820 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2821 .video_inputs = 3,
2822 .audio_inputs = 1,
2823 .tuner = 0,
2824 .svhs = 2,
2825 .gpiomask = 0x3f,
2826 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002827 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2828 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002829 .no_msp34xx = 1,
2830 .pll = PLL_28,
2831 .tuner_type = TUNER_YMEC_TVF_5533MF,
2832 .tuner_addr = ADDR_UNSET,
2833 .radio_addr = ADDR_UNSET,
2834 .has_radio = 1,
2835 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002836 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002837 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002838 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2839 one external BNC composite input (mux 2)
2840 three internal composite inputs (unknown muxes)
2841 an 18-bit stereo A/D (CS5331A), which has:
2842 one external stereo unblanced (RCA) audio connection
2843 one (or 3?) internal stereo balanced (XLR) audio connection
2844 input is selected via gpio to a 14052B mux
2845 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2846 gain is controlled via an X9221A chip on the I2C bus @0x28
2847 sample rate is controlled via gpio to an MK1413S
2848 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2849 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002850 [BTTV_BOARD_OSPREY440] = {
2851 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002852 .video_inputs = 4,
2853 .audio_inputs = 2, /* this is meaningless */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002854 .tuner = UNSET,
Trent Piephocf784d52007-07-21 21:26:40 -03002855 .svhs = UNSET,
2856 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2857 .gpiomask = 0x303,
2858 .gpiomute = 0x000, /* int + 32kHz */
2859 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002860 .pll = PLL_28,
2861 .tuner_type = UNSET,
2862 .tuner_addr = ADDR_UNSET,
2863 .radio_addr = ADDR_UNSET,
2864 .no_msp34xx = 1,
2865 .no_tda9875 = 1,
2866 .no_tda7432 = 1,
2867 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002868 /* ---- card 0x8d ---------------------------------- */
2869 [BTTV_BOARD_ASOUND_SKYEYE] = {
2870 .name = "Asound Skyeye PCTV",
2871 .video_inputs = 3,
2872 .audio_inputs = 1,
2873 .tuner = 0,
2874 .svhs = 2,
2875 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002876 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002877 .gpiomux = { 2, 0, 0, 0 },
2878 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002879 .needs_tvaudio = 1,
2880 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002881 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002882 .tuner_addr = ADDR_UNSET,
2883 .radio_addr = ADDR_UNSET,
2884 },
Bill Pechter633323f2005-11-13 16:07:50 -08002885 /* ---- card 0x8e ---------------------------------- */
2886 [BTTV_BOARD_SABRENT_TVFM] = {
2887 .name = "Sabrent TV-FM (bttv version)",
2888 .video_inputs = 3,
2889 .audio_inputs = 1,
2890 .tuner = 0,
2891 .svhs = 2,
2892 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002893 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002894 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002895 .no_msp34xx = 1,
2896 .no_tda9875 = 1,
2897 .no_tda7432 = 1,
2898 .pll = PLL_28,
2899 .tuner_type = TUNER_TNF_5335MF,
2900 .tuner_addr = ADDR_UNSET,
2901 .has_radio = 1,
2902 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002903 /* ---- card 0x8f ---------------------------------- */
2904 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2905 .name = "Hauppauge ImpactVCB (bt878)",
2906 .video_inputs = 4,
2907 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002908 .tuner = UNSET,
2909 .svhs = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002910 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002911 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002912 .no_msp34xx = 1,
2913 .no_tda9875 = 1,
2914 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002915 .tuner_type = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002916 .tuner_addr = ADDR_UNSET,
2917 .radio_addr = ADDR_UNSET,
2918 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002919 [BTTV_BOARD_MACHTV_MAGICTV] = {
2920 /* Julian Calaby <julian.calaby@gmail.com>
2921 * Slightly different from original MachTV definition (0x60)
2922
2923 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2924 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2925 * properly (methinks) causing no keyup bits being set */
2926
2927 .name = "MagicTV", /* rebranded MachTV */
2928 .video_inputs = 3,
2929 .audio_inputs = 1,
2930 .tuner = 0,
2931 .svhs = 2,
2932 .gpiomask = 7,
2933 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002934 .gpiomux = { 0, 1, 2, 3 },
2935 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002936 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2937 .tuner_addr = ADDR_UNSET,
2938 .radio_addr = ADDR_UNSET,
2939 .pll = PLL_28,
2940 .has_radio = 1,
2941 .has_remote = 1,
2942 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002943 [BTTV_BOARD_SSAI_SECURITY] = {
2944 .name = "SSAI Security Video Interface",
2945 .video_inputs = 4,
2946 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002947 .tuner = UNSET,
2948 .svhs = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002949 .muxsel = { 0, 1, 2, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002950 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002951 .tuner_addr = ADDR_UNSET,
2952 .radio_addr = ADDR_UNSET,
2953 },
2954 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2955 .name = "SSAI Ultrasound Video Interface",
2956 .video_inputs = 2,
2957 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002958 .tuner = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002959 .svhs = 1,
2960 .muxsel = { 2, 0, 1, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002961 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002962 .tuner_addr = ADDR_UNSET,
2963 .radio_addr = ADDR_UNSET,
2964 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002965 /* ---- card 0x94---------------------------------- */
2966 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2967 .name = "DViCO FusionHDTV 2",
2968 .tuner = 0,
Michael Krufkyab8b8702008-04-22 14:46:05 -03002969 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002970 .tuner_addr = ADDR_UNSET,
2971 .radio_addr = ADDR_UNSET,
2972 .video_inputs = 3,
2973 .audio_inputs = 1,
2974 .svhs = 2,
2975 .muxsel = { 2, 3, 1 },
2976 .gpiomask = 0x00e00007,
2977 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2978 .gpiomute = 0x00c00007,
2979 .no_msp34xx = 1,
2980 .no_tda9875 = 1,
2981 .no_tda7432 = 1,
2982 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002983 /* ---- card 0x95---------------------------------- */
2984 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2985 .name = "Typhoon TV-Tuner PCI (50684)",
2986 .video_inputs = 3,
2987 .audio_inputs = 1,
2988 .tuner = 0,
2989 .svhs = 2,
2990 .gpiomask = 0x3014f,
2991 .muxsel = { 2, 3, 1, 1 },
2992 .gpiomux = { 0x20001,0x10001, 0, 0 },
2993 .gpiomute = 10,
2994 .needs_tvaudio = 1,
2995 .pll = PLL_28,
2996 .tuner_type = TUNER_PHILIPS_PAL_I,
2997 .tuner_addr = ADDR_UNSET,
2998 .radio_addr = ADDR_UNSET,
2999 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003000 [BTTV_BOARD_GEOVISION_GV600] = {
3001 /* emhn@usb.ve */
3002 .name = "Geovision GV-600",
3003 .video_inputs = 16,
3004 .audio_inputs = 0,
3005 .tuner = UNSET,
3006 .svhs = UNSET,
3007 .gpiomask = 0x0,
3008 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
3009 2, 2, 2, 2, 2, 2, 2, 2 },
3010 .muxsel_hook = geovision_muxsel,
3011 .gpiomux = { 0 },
3012 .no_msp34xx = 1,
3013 .pll = PLL_28,
3014 .tuner_type = UNSET,
3015 .tuner_addr = ADDR_UNSET,
3016 .radio_addr = ADDR_UNSET,
3017 },
Mauro Lacye80faad2008-04-22 14:45:58 -03003018 [BTTV_BOARD_KOZUMI_KTV_01C] = {
3019 /* Mauro Lacy <mauro@lacy.com.ar>
3020 * Based on MagicTV and Conceptronic CONTVFMi */
3021
3022 .name = "Kozumi KTV-01C",
3023 .video_inputs = 3,
3024 .audio_inputs = 1,
3025 .tuner = 0,
3026 .svhs = 2,
3027 .gpiomask = 0x008007,
3028 .muxsel = { 2, 3, 1, 1 },
3029 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
3030 /*gpiomux = { 0, 1, 2, 3 }, /* MagicTV */
3031 .gpiomute = 3, /* CONTVFMi */
3032 /*gpiomute = 4, /* MagicTV */
3033 .needs_tvaudio = 0,
3034 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
3035 .tuner_addr = ADDR_UNSET,
3036 .radio_addr = ADDR_UNSET,
3037 .pll = PLL_28,
3038 .has_radio = 1,
3039 .has_remote = 1,
3040 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08003041};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003042
3043static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
3044
3045/* ----------------------------------------------------------------------- */
3046
3047static unsigned char eeprom_data[256];
3048
3049/*
3050 * identify card
3051 */
3052void __devinit bttv_idcard(struct bttv *btv)
3053{
3054 unsigned int gpiobits;
3055 int i,type;
3056 unsigned short tmp;
3057
3058 /* read PCI subsystem ID */
3059 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3060 btv->cardid = tmp << 16;
3061 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3062 btv->cardid |= tmp;
3063
3064 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3065 /* look for the card */
3066 for (type = -1, i = 0; cards[i].id != 0; i++)
3067 if (cards[i].id == btv->cardid)
3068 type = i;
3069
3070 if (type != -1) {
3071 /* found it */
3072 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3073 "PCI subsystem ID is %04x:%04x\n",
3074 btv->c.nr,cards[type].name,cards[type].cardnr,
3075 btv->cardid & 0xffff,
3076 (btv->cardid >> 16) & 0xffff);
3077 btv->c.type = cards[type].cardnr;
3078 } else {
3079 /* 404 */
3080 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3081 btv->c.nr, btv->cardid & 0xffff,
3082 (btv->cardid >> 16) & 0xffff);
3083 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08003084 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003085 }
3086 }
3087
3088 /* let the user override the autodetected type */
3089 if (card[btv->c.nr] < bttv_num_tvcards)
3090 btv->c.type=card[btv->c.nr];
3091
3092 /* print which card config we are using */
3093 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3094 bttv_tvcards[btv->c.type].name, btv->c.type,
3095 card[btv->c.nr] < bttv_num_tvcards
3096 ? "insmod option" : "autodetected");
3097
3098 /* overwrite gpio stuff ?? */
3099 if (UNSET == audioall && UNSET == audiomux[0])
3100 return;
3101
3102 if (UNSET != audiomux[0]) {
3103 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003104 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003105 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003106 gpiobits |= audiomux[i];
3107 }
3108 } else {
3109 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003110 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003111 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003112 }
3113 }
3114 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3115 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3116 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003117 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003118 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003119 }
3120 printk("\n");
3121}
3122
3123/*
3124 * (most) board specific initialisations goes here
3125 */
3126
3127/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08003128static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003129{
3130 int type = -1;
3131
3132 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003133 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003134 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003135 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003136 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003137 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003138
3139 if (-1 != type) {
3140 btv->c.type = type;
3141 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3142 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3143 }
3144}
3145
3146static void flyvideo_gpio(struct bttv *btv)
3147{
3148 int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003149 int tuner=UNSET,ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003150
3151 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003152 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003153 gpio = gpio_read();
3154 /* FIXME: must restore OUR_EN ??? */
3155
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003156 /* all cards provide GPIO info, some have an additional eeprom
3157 * LR50: GPIO coding can be found lower right CP1 .. CP9
3158 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3159 * GPIO14-12: n.c.
3160 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003161
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003162 * lowest 3 bytes are remote control codes (no handshake needed)
3163 * xxxFFF: No remote control chip soldered
3164 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3165 * Note: Some bits are Audio_Mask !
3166 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003167 ttype=(gpio&0x0f0000)>>16;
3168 switch(ttype) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003169 case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003170 break;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003171 case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003172 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003173 case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003174 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003175 case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003176 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003177 case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003178 break;
3179 default:
3180 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3181 }
3182
3183 has_remote = gpio & 0x800000;
3184 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003185 /* unknown 0x200000;
3186 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003187 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003188 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003189 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3190 /*
3191 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003192
3193 if(is_capture_only)
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003194 tuner = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003195
3196 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3197 btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
3198 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3199 btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
3200 is_capture_only?"yes":"no ");
3201
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003202 if (tuner != UNSET) /* only set if known tuner autodetected, else let insmod option through */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003203 btv->tuner_type = tuner;
3204 btv->has_radio = has_radio;
3205
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003206 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3207 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3208 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003209 if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
3210 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003211}
3212
3213static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3214 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3215static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3216 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3217
3218static void miro_pinnacle_gpio(struct bttv *btv)
3219{
3220 int id,msp,gpio;
3221 char *info;
3222
3223 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003224 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003225 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003226 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003227 if (id < 32) {
3228 btv->tuner_type = miro_tunermap[id];
3229 if (0 == (gpio & 0x20)) {
3230 btv->has_radio = 1;
3231 if (!miro_fmtuner[id]) {
3232 btv->has_matchbox = 1;
3233 btv->mbox_we = (1<<6);
3234 btv->mbox_most = (1<<7);
3235 btv->mbox_clk = (1<<8);
3236 btv->mbox_data = (1<<9);
3237 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3238 }
3239 } else {
3240 btv->has_radio = 0;
3241 }
3242 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003243 if (btv->c.type == BTTV_BOARD_MIRO)
3244 btv->c.type = BTTV_BOARD_MIROPRO;
3245 if (btv->c.type == BTTV_BOARD_PINNACLE)
3246 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003247 }
3248 printk(KERN_INFO
3249 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3250 btv->c.nr, id+1, btv->tuner_type,
3251 !btv->has_radio ? "no" :
3252 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3253 (-1 == msp) ? "no" : "yes");
3254 } else {
3255 /* new cards with microtune tuner */
3256 id = 63 - id;
3257 btv->has_radio = 0;
3258 switch (id) {
3259 case 1:
3260 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003261 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003262 break;
3263 case 2:
3264 info = "PAL+SECAM / stereo";
3265 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003266 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003267 break;
3268 case 3:
3269 info = "NTSC / stereo";
3270 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003271 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003272 break;
3273 case 4:
3274 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003275 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003276 break;
3277 case 5:
3278 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003279 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003280 break;
3281 case 6:
3282 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003283 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003284 break;
3285 case 7:
3286 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003287 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003288 break;
3289 default:
3290 info = "oops: unknown card";
3291 break;
3292 }
3293 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003294 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003295 printk(KERN_INFO
3296 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3297 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003298 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003299 }
3300}
3301
3302/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3303#define LM1882_SYNC_DRIVE 0x200000L
3304
3305static void init_ids_eagle(struct bttv *btv)
3306{
3307 gpio_inout(0xffffff,0xFFFF37);
3308 gpio_write(0x200020);
3309
3310 /* flash strobe inverter ?! */
3311 gpio_write(0x200024);
3312
3313 /* switch sync drive off */
3314 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3315
3316 /* set BT848 muxel to 2 */
3317 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3318}
3319
3320/* Muxsel helper for the IDS Eagle.
3321 * the eagles does not use the standard muxsel-bits but
3322 * has its own multiplexer */
3323static void eagle_muxsel(struct bttv *btv, unsigned int input)
3324{
3325 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3326 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3327
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003328 /* composite */
3329 /* set chroma ADC to sleep */
3330 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3331 /* set to composite video */
3332 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3333 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003334
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003335 /* switch sync drive off */
3336 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003337}
3338
3339static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3340{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003341 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003342 gpio_write(masks[input%4]);
3343}
3344
3345/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3346 alarms output
3347
3348 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3349 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3350
3351 IN - sensor inputs, INx - sensor inputs and TI XORed together
3352 O1,O2,O3 - alarm outputs (relays)
3353
3354 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3355
3356*/
3357
3358static void init_lmlbt4x(struct bttv *btv)
3359{
3360 printk(KERN_DEBUG "LMLBT4x init\n");
3361 btwrite(0x000000, BT848_GPIO_REG_INP);
3362 gpio_inout(0xffffff, 0x0006C0);
3363 gpio_write(0x000000);
3364}
3365
3366static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3367{
3368 unsigned int inmux = input % 8;
3369 gpio_inout( 0xf, 0xf );
3370 gpio_bits( 0xf, inmux );
3371}
3372
3373static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3374{
3375 unsigned int inmux = input % 4;
3376 gpio_inout( 3<<9, 3<<9 );
3377 gpio_bits( 3<<9, inmux<<9 );
3378}
3379
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003380static void geovision_muxsel(struct bttv *btv, unsigned int input)
3381{
3382 unsigned int inmux = input % 16;
3383 gpio_inout(0xf, 0xf);
3384 gpio_bits(0xf, inmux);
3385}
3386
Linus Torvalds1da177e2005-04-16 15:20:36 -07003387/* ----------------------------------------------------------------------- */
3388
3389static void bttv_reset_audio(struct bttv *btv)
3390{
3391 /*
3392 * BT878A has a audio-reset register.
3393 * 1. This register is an audio reset function but it is in
3394 * function-0 (video capture) address space.
3395 * 2. It is enough to do this once per power-up of the card.
3396 * 3. There is a typo in the Conexant doc -- it is not at
3397 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3398 * --//Shrikumar 030609
3399 */
3400 if (btv->id != 878)
3401 return;
3402
3403 if (bttv_debug)
3404 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3405 btwrite((1<<7), 0x058);
3406 udelay(10);
3407 btwrite( 0, 0x058);
3408}
3409
3410/* initialization part one -- before registering i2c bus */
3411void __devinit bttv_init_card1(struct bttv *btv)
3412{
3413 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003414 case BTTV_BOARD_HAUPPAUGE:
3415 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003416 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003417 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003418 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003419 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003420 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003421 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003422 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003423 boot_msp34xx(btv,11);
3424 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003425 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003426 pvr_boot(btv);
3427 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003428 case BTTV_BOARD_TWINHAN_DST:
3429 case BTTV_BOARD_AVDVBT_771:
3430 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003431 btv->use_i2c_hw = 1;
3432 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003433 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003434 init_RTV24( btv );
3435 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003436
Linus Torvalds1da177e2005-04-16 15:20:36 -07003437 }
3438 if (!bttv_tvcards[btv->c.type].has_dvb)
3439 bttv_reset_audio(btv);
3440}
3441
3442/* initialization part two -- after registering i2c bus */
3443void __devinit bttv_init_card2(struct bttv *btv)
3444{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003445 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003446
Trent Piephoac7dc842007-06-28 17:51:08 -03003447 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003448
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003449 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003450 bttv_readee(btv,eeprom_data,0xa0);
3451 identify_by_eeprom(btv,eeprom_data);
3452 }
3453
3454 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003455 case BTTV_BOARD_MIRO:
3456 case BTTV_BOARD_MIROPRO:
3457 case BTTV_BOARD_PINNACLE:
3458 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003459 /* miro/pinnacle */
3460 miro_pinnacle_gpio(btv);
3461 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003462 case BTTV_BOARD_FLYVIDEO_98:
3463 case BTTV_BOARD_MAXI:
3464 case BTTV_BOARD_LIFE_FLYKIT:
3465 case BTTV_BOARD_FLYVIDEO:
3466 case BTTV_BOARD_TYPHOON_TVIEW:
3467 case BTTV_BOARD_CHRONOS_VS2:
3468 case BTTV_BOARD_FLYVIDEO_98FM:
3469 case BTTV_BOARD_FLYVIDEO2000:
3470 case BTTV_BOARD_FLYVIDEO98EZ:
3471 case BTTV_BOARD_CONFERENCETV:
3472 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003473 flyvideo_gpio(btv);
3474 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003475 case BTTV_BOARD_HAUPPAUGE:
3476 case BTTV_BOARD_HAUPPAUGE878:
3477 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003478 /* pick up some config infos from the eeprom */
3479 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003480 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003481 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003482 case BTTV_BOARD_AVERMEDIA98:
3483 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003484 bttv_readee(btv,eeprom_data,0xa0);
3485 avermedia_eeprom(btv);
3486 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003487 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003488 init_PXC200(btv);
3489 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003490 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003491 picolo_tetra_init(btv);
3492 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003493 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003494 btv->has_radio = 1;
3495 btv->has_matchbox = 1;
3496 btv->mbox_we = 0x20;
3497 btv->mbox_most = 0;
3498 btv->mbox_clk = 0x08;
3499 btv->mbox_data = 0x10;
3500 btv->mbox_mask = 0x38;
3501 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003502 case BTTV_BOARD_VOBIS_BOOSTAR:
3503 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003504 terratec_active_radio_upgrade(btv);
3505 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003506 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003507 if (btv->cardid == 0x3002144f) {
3508 btv->has_radio=1;
3509 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3510 }
3511 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003512 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003513 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003514 /* Fix up entry for 3DFX VoodooTV 100,
3515 which is an OEM STB card variant. */
3516 btv->has_radio=0;
3517 btv->tuner_type=TUNER_TEMIC_NTSC;
3518 }
3519 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003520 case BTTV_BOARD_OSPREY1x0:
3521 case BTTV_BOARD_OSPREY1x0_848:
3522 case BTTV_BOARD_OSPREY101_848:
3523 case BTTV_BOARD_OSPREY1x1:
3524 case BTTV_BOARD_OSPREY1x1_SVID:
3525 case BTTV_BOARD_OSPREY2xx:
3526 case BTTV_BOARD_OSPREY2x0_SVID:
3527 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003528 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003529 case BTTV_BOARD_OSPREY500:
3530 case BTTV_BOARD_OSPREY540:
3531 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003532 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003533 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003534 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003535 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003536 init_ids_eagle(btv);
3537 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003538 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003539 bttv_readee(btv,eeprom_data,0xa0);
3540 modtec_eeprom(btv);
3541 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003542 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003543 init_lmlbt4x(btv);
3544 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003545 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003546 tibetCS16_init(btv);
3547 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003548 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003549 kodicom4400r_init(btv);
3550 break;
3551 }
3552
3553 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003554 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003555 /* defaults from card list */
3556 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3557 btv->pll.pll_ifreq=28636363;
3558 btv->pll.pll_crystal=BT848_IFORM_XT0;
3559 }
3560 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3561 btv->pll.pll_ifreq=35468950;
3562 btv->pll.pll_crystal=BT848_IFORM_XT1;
3563 }
3564 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003565 switch (pll[btv->c.nr]) {
3566 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003567 btv->pll.pll_crystal = 0;
3568 btv->pll.pll_ifreq = 0;
3569 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003570 break;
3571 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003572 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003573 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003574 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003575 btv->pll.pll_crystal = BT848_IFORM_XT0;
3576 break;
3577 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003578 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003579 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003580 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003581 btv->pll.pll_crystal = BT848_IFORM_XT1;
3582 break;
3583 }
3584 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003585 btv->pll.pll_current = -1;
3586
Linus Torvalds1da177e2005-04-16 15:20:36 -07003587 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003588 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3589 addr = bttv_tvcards[btv->c.type].tuner_addr;
3590
3591 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003592 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003593 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003594 if (UNSET != tuner[btv->c.nr])
3595 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003596
3597 if (btv->tuner_type == TUNER_ABSENT ||
3598 bttv_tvcards[btv->c.type].tuner == UNSET)
3599 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3600 else if(btv->tuner_type == UNSET)
3601 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3602 else
3603 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3604 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003605
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003606 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003607 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003608
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003609 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003610 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003611 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003612
3613 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3614 }
3615
Hans Verkuil39e8f402006-01-09 15:25:16 -02003616 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003617 struct v4l2_priv_tun_config tda9887_cfg;
3618
3619 tda9887_cfg.tuner = TUNER_TDA9887;
3620 tda9887_cfg.priv = &btv->tda9887_conf;
3621
3622 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003623 }
3624
Linus Torvalds1da177e2005-04-16 15:20:36 -07003625 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3626 if (svhs[btv->c.nr] != UNSET)
3627 btv->svhs = svhs[btv->c.nr];
3628 if (remote[btv->c.nr] != UNSET)
3629 btv->has_remote = remote[btv->c.nr];
3630
3631 if (bttv_tvcards[btv->c.type].has_radio)
3632 btv->has_radio=1;
3633 if (bttv_tvcards[btv->c.type].has_remote)
3634 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003635 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3636 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003637 if (bttv_tvcards[btv->c.type].volume_gpio)
3638 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3639 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3640 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003641
3642 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3643 /* detect Bt832 chip for quartzsight digital camera */
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003644 if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
3645 (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
Linus Torvalds1da177e2005-04-16 15:20:36 -07003646 boot_bt832(btv);
3647 }
3648
3649 if (!autoload)
3650 return;
3651
Trent Piephoac7dc842007-06-28 17:51:08 -03003652 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3653 return; /* no tuner or related drivers to load */
3654
Linus Torvalds1da177e2005-04-16 15:20:36 -07003655 /* try to detect audio/fader chips */
3656 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003657 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003658 request_module("msp3400");
3659
3660 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003661 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003662 request_module("msp3400");
3663
3664 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003665 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003666 request_module("tda9875");
3667
3668 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003669 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003670 request_module("tda7432");
3671
3672 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3673 request_module("tvaudio");
3674
Trent Piephoac7dc842007-06-28 17:51:08 -03003675 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003676 request_module("tuner");
3677}
3678
3679
3680/* ----------------------------------------------------------------------- */
3681
3682static void modtec_eeprom(struct bttv *btv)
3683{
3684 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3685 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3686 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3687 btv->c.nr,&eeprom_data[0x1e]);
3688 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3689 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3690 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003691 btv->c.nr,&eeprom_data[0x1e]);
3692 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3693 btv->tuner_type=TUNER_PHILIPS_NTSC;
3694 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3695 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003696 } else {
3697 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3698 btv->c.nr,&eeprom_data[0x1e]);
3699 }
3700}
3701
3702static void __devinit hauppauge_eeprom(struct bttv *btv)
3703{
3704 struct tveeprom tv;
3705
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003706 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003707 btv->tuner_type = tv.tuner_type;
3708 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003709
3710 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3711 btv->c.nr, tv.model);
3712
3713 /*
3714 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3715 * type based on model #.
3716 */
3717 if(tv.model == 64900) {
3718 printk("bttv%d: Switching board type from %s to %s\n",
3719 btv->c.nr,
3720 bttv_tvcards[btv->c.type].name,
3721 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3722 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3723 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003724}
3725
3726static int terratec_active_radio_upgrade(struct bttv *btv)
3727{
3728 int freq;
3729
3730 btv->has_radio = 1;
3731 btv->has_matchbox = 1;
3732 btv->mbox_we = 0x10;
3733 btv->mbox_most = 0x20;
3734 btv->mbox_clk = 0x08;
3735 btv->mbox_data = 0x04;
3736 btv->mbox_mask = 0x3c;
3737
3738 btv->mbox_iow = 1 << 8;
3739 btv->mbox_ior = 1 << 9;
3740 btv->mbox_csel = 1 << 10;
3741
3742 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003743 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003744 if (0x1ed8 == tea5757_read(btv)) {
3745 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3746 btv->c.nr);
3747 btv->has_radio = 1;
3748 btv->has_matchbox = 1;
3749 } else {
3750 btv->has_radio = 0;
3751 btv->has_matchbox = 0;
3752 }
3753 return 0;
3754}
3755
3756
3757/* ----------------------------------------------------------------------- */
3758
3759/*
3760 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3761 *
3762 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3763 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3764 * unpacked with unzip).
3765 */
3766#define PVR_GPIO_DELAY 10
3767
3768#define BTTV_ALT_DATA 0x000001
3769#define BTTV_ALT_DCLK 0x100000
3770#define BTTV_ALT_NCONFIG 0x800000
3771
3772static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3773{
3774 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003775 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003776 int i;
3777
3778 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3779 gpio_write(0);
3780 udelay(PVR_GPIO_DELAY);
3781
3782 gpio_write(BTTV_ALT_NCONFIG);
3783 udelay(PVR_GPIO_DELAY);
3784
3785 for (n = 0; n < microlen; n++) {
3786 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003787 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003788 gpio_bits(BTTV_ALT_DCLK,0);
3789 if (bits & 0x01)
3790 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3791 else
3792 gpio_bits(BTTV_ALT_DATA,0);
3793 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3794 bits >>= 1;
3795 }
3796 }
3797 gpio_bits(BTTV_ALT_DCLK,0);
3798 udelay(PVR_GPIO_DELAY);
3799
3800 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3801 for (i = 0 ; i < 30 ; i++) {
3802 gpio_bits(BTTV_ALT_DCLK,0);
3803 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3804 }
3805 gpio_bits(BTTV_ALT_DCLK,0);
3806 return 0;
3807}
3808
3809static int __devinit pvr_boot(struct bttv *btv)
3810{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003811 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003812 int rc;
3813
3814 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3815 if (rc != 0) {
3816 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3817 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003818 return rc;
3819 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003820 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3821 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3822 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003823 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003824 return rc;
3825}
3826
3827/* ----------------------------------------------------------------------- */
3828/* some osprey specific stuff */
3829
Trent Piephocf784d52007-07-21 21:26:40 -03003830static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003831{
Trent Piephocf784d52007-07-21 21:26:40 -03003832 int i;
3833 u32 serial = 0;
3834 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003835
Trent Piephocf784d52007-07-21 21:26:40 -03003836 /* This code will nevery actually get called in this case.... */
3837 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3838 /* this might be an antique... check for MMAC label in eeprom */
3839 if (!strncmp(ee, "MMAC", 4)) {
3840 u8 checksum = 0;
3841 for (i = 0; i < 21; i++)
3842 checksum += ee[i];
3843 if (checksum != ee[21])
3844 return;
3845 cardid = BTTV_BOARD_OSPREY1x0_848;
3846 for (i = 12; i < 21; i++)
3847 serial *= 10, serial += ee[i] - '0';
3848 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003849 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003850 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003851
Trent Piephocf784d52007-07-21 21:26:40 -03003852 for (i = 4*16; i < 8*16; i += 16) {
3853 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003854
Trent Piephocf784d52007-07-21 21:26:40 -03003855 if ((checksum&0xff) + (checksum>>8) == 0xff)
3856 break;
3857 }
3858 if (i >= 8*16)
3859 return;
3860 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003861
Trent Piephocf784d52007-07-21 21:26:40 -03003862 /* found a valid descriptor */
3863 type = be16_to_cpup((u16*)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003864
Trent Piephocf784d52007-07-21 21:26:40 -03003865 switch(type) {
3866 /* 848 based */
3867 case 0x0004:
3868 cardid = BTTV_BOARD_OSPREY1x0_848;
3869 break;
3870 case 0x0005:
3871 cardid = BTTV_BOARD_OSPREY101_848;
3872 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003873
Trent Piephocf784d52007-07-21 21:26:40 -03003874 /* 878 based */
3875 case 0x0012:
3876 case 0x0013:
3877 cardid = BTTV_BOARD_OSPREY1x0;
3878 break;
3879 case 0x0014:
3880 case 0x0015:
3881 cardid = BTTV_BOARD_OSPREY1x1;
3882 break;
3883 case 0x0016:
3884 case 0x0017:
3885 case 0x0020:
3886 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3887 break;
3888 case 0x0018:
3889 case 0x0019:
3890 case 0x001E:
3891 case 0x001F:
3892 cardid = BTTV_BOARD_OSPREY2xx;
3893 break;
3894 case 0x001A:
3895 case 0x001B:
3896 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3897 break;
3898 case 0x0040:
3899 cardid = BTTV_BOARD_OSPREY500;
3900 break;
3901 case 0x0050:
3902 case 0x0056:
3903 cardid = BTTV_BOARD_OSPREY540;
3904 /* bttv_osprey_540_init(btv); */
3905 break;
3906 case 0x0060:
3907 case 0x0070:
3908 case 0x00A0:
3909 cardid = BTTV_BOARD_OSPREY2x0;
3910 /* enable output on select control lines */
3911 gpio_inout(0xffffff,0x000303);
3912 break;
3913 case 0x00D8:
3914 cardid = BTTV_BOARD_OSPREY440;
3915 break;
3916 default:
3917 /* unknown...leave generic, but get serial # */
3918 printk(KERN_INFO "bttv%d: "
3919 "osprey eeprom: unknown card type 0x%04x\n",
3920 btv->c.nr, type);
3921 break;
3922 }
3923 serial = be32_to_cpup((u32*)(ee+6));
3924 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003925
Trent Piephocf784d52007-07-21 21:26:40 -03003926 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3927 btv->c.nr, cardid,
3928 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3929
3930 if (cardid<0 || btv->c.type == cardid)
3931 return;
3932
3933 /* card type isn't set correctly */
3934 if (card[btv->c.nr] < bttv_num_tvcards) {
3935 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3936 "Not overriding user specified card type\n", btv->c.nr);
3937 } else {
3938 printk(KERN_INFO "bttv%d: osprey eeprom: "
3939 "Changing card type from %d to %d\n", btv->c.nr,
3940 btv->c.type, cardid);
3941 btv->c.type = cardid;
3942 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003943}
3944
3945/* ----------------------------------------------------------------------- */
3946/* AVermedia specific stuff, from bktr_card.c */
3947
3948static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003949 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3950 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3951 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3952 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3953 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003954 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003955
3956static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003957 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003958 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3959 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003960 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3961 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003962
3963static void __devinit avermedia_eeprom(struct bttv *btv)
3964{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003965 int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003966
3967 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003968 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3969 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003970 btv->has_remote = (eeprom_data[0x42] & 0x01);
3971
3972 if (tuner_make == 0 || tuner_make == 2)
3973 if(tuner_format <=0x0a)
3974 tuner = tuner_0_table[tuner_format];
3975 if (tuner_make == 1)
3976 if(tuner_format <=9)
3977 tuner = tuner_1_table[tuner_format];
3978
3979 if (tuner_make == 4)
3980 if(tuner_format == 0x09)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003981 tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003982
3983 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3984 btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
3985 if(tuner) {
3986 btv->tuner_type=tuner;
3987 printk("%d",tuner);
3988 } else
3989 printk("Unknown type");
3990 printk(" radio:%s remote control:%s\n",
3991 tuner_tv_fm ? "yes" : "no",
3992 btv->has_remote ? "yes" : "no");
3993}
3994
3995/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3996void bttv_tda9880_setnorm(struct bttv *btv, int norm)
3997{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003998 /* fix up our card entry */
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -03003999 if(norm==V4L2_STD_NTSC) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004000 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4001 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004002 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
4003 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004004 dprintk("bttv_tda9880_setnorm to NTSC\n");
4005 }
4006 else {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004007 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4008 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
Wade Berrier434b2522007-06-25 13:02:16 -03004009 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
4010 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004011 dprintk("bttv_tda9880_setnorm to PAL\n");
4012 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004013 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004014 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03004015 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004016}
4017
4018
4019/*
4020 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08004021 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07004022 *
4023 * Hauppauge: pin 5
4024 * Voodoo: pin 20
4025 */
4026static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4027{
4028 int mask = (1 << pin);
4029
4030 gpio_inout(mask,mask);
4031 gpio_bits(mask,0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004032 udelay(2500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004033 gpio_bits(mask,mask);
4034
4035 if (bttv_gpio)
4036 bttv_gpio_tracking(btv,"msp34xx");
4037 if (bttv_verbose)
4038 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
4039 "init [%d]\n", btv->c.nr, pin);
4040}
4041
4042static void __devinit boot_bt832(struct bttv *btv)
4043{
Linus Torvalds1da177e2005-04-16 15:20:36 -07004044}
4045
4046/* ----------------------------------------------------------------------- */
4047/* Imagenation L-Model PXC200 Framegrabber */
4048/* This is basically the same procedure as
4049 * used by Alessandro Rubini in his pxc200
4050 * driver, but using BTTV functions */
4051
4052static void __devinit init_PXC200(struct bttv *btv)
4053{
4054 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4055 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4056 0x00 };
4057 unsigned int i;
4058 int tmp;
4059 u32 val;
4060
4061 /* Initialise GPIO-connevted stuff */
4062 gpio_inout(0xffffff, (1<<13));
4063 gpio_write(0);
4064 udelay(3);
4065 gpio_write(1<<13);
4066 /* GPIO inputs are pulled up, so no need to drive
4067 * reset pin any longer */
4068 gpio_bits(0xffffff, 0);
4069 if (bttv_gpio)
4070 bttv_gpio_tracking(btv,"pxc200");
4071
4072 /* we could/should try and reset/control the AD pots? but
4073 right now we simply turned off the crushing. Without
4074 this the AGC drifts drifts
4075 remember the EN is reverse logic -->
4076 setting BT848_ADC_AGC_EN disable the AGC
4077 tboult@eecs.lehigh.edu
4078 */
4079
4080 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4081
4082 /* Initialise MAX517 DAC */
4083 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4084 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4085
4086 /* Initialise 12C508 PIC */
4087 /* The I2CWrite and I2CRead commmands are actually to the
4088 * same chips - but the R/W bit is included in the address
4089 * argument so the numbers are different */
4090
4091
4092 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4093
4094 /* First of all, enable the clock line. This is used in the PXC200-F */
4095 val = btread(BT848_GPIO_DMA_CTL);
4096 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4097 btwrite(val, BT848_GPIO_DMA_CTL);
4098
4099 /* Then, push to 0 the reset pin long enough to reset the *
4100 * device same as above for the reset line, but not the same
4101 * value sent to the GPIO-connected stuff
4102 * which one is the good one? */
4103 gpio_inout(0xffffff,(1<<2));
4104 gpio_write(0);
4105 udelay(10);
4106 gpio_write(1<<2);
4107
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004108 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004109 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4110 if (tmp != -1) {
4111 printk(KERN_INFO
4112 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4113 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4114 }
4115 }
4116
4117 printk(KERN_INFO "PXC200 Initialised.\n");
4118}
4119
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004120
4121
Peter Skipworth93b43f12005-06-23 22:04:45 -07004122/* ----------------------------------------------------------------------- */
4123/*
4124 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4125 * it. This apparently involves the following procedure for each 878 chip:
4126 *
4127 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4128 *
4129 * 2) write to GPIO_DATA
4130 * - 0x0E
4131 * - sleep 1ms
4132 * - 0x10 + 0x0E
4133 * - sleep 10ms
4134 * - 0x0E
4135 * read from GPIO_DATA into buf (uint_32)
4136 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4137 * error. ERROR_CPLD_Check_Failed stop.
4138 *
4139 * 3) write to GPIO_DATA
4140 * - write 0x4400 + 0x0E
4141 * - sleep 10ms
4142 * - write 0x4410 + 0x0E
4143 * - sleep 1ms
4144 * - write 0x0E
4145 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004146 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004147 * error. ERROR_CPLD_Check_Failed.
4148 */
4149/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004150static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004151init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004152{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004153 uint32_t dataRead = 0;
4154 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004155
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004156 printk (KERN_INFO
4157 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004158 btv->c.nr);
4159
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004160 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004161
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004162 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4163 msleep (1);
4164 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4165 msleep (10);
4166 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004167
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004168 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004169
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004170 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4171 printk (KERN_INFO
4172 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4173 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004174 }
4175
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004176 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4177 msleep (10);
4178 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4179 msleep (1);
4180 btwrite (watchdog_value, BT848_GPIO_DATA);
4181 msleep (1);
4182 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004183
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004184 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4185 printk (KERN_INFO
4186 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4187 btv->c.nr, dataRead);
4188
Peter Skipworth93b43f12005-06-23 22:04:45 -07004189 return;
4190 }
4191
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004192 printk (KERN_INFO
4193 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004194}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004195
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004196
4197
Linus Torvalds1da177e2005-04-16 15:20:36 -07004198/* ----------------------------------------------------------------------- */
4199/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4200/*
4201 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4202 * This code is placed under the terms of the GNU General Public License
4203 *
4204 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4205 */
4206
4207static void bus_low(struct bttv *btv, int bit)
4208{
4209 if (btv->mbox_ior) {
4210 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4211 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4212 udelay(5);
4213 }
4214
4215 gpio_bits(bit,0);
4216 udelay(5);
4217
4218 if (btv->mbox_ior) {
4219 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4220 udelay(5);
4221 }
4222}
4223
4224static void bus_high(struct bttv *btv, int bit)
4225{
4226 if (btv->mbox_ior) {
4227 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4228 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4229 udelay(5);
4230 }
4231
4232 gpio_bits(bit,bit);
4233 udelay(5);
4234
4235 if (btv->mbox_ior) {
4236 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4237 udelay(5);
4238 }
4239}
4240
4241static int bus_in(struct bttv *btv, int bit)
4242{
4243 if (btv->mbox_ior) {
4244 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4245 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4246 udelay(5);
4247
4248 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4249 udelay(5);
4250 }
4251 return gpio_read() & (bit);
4252}
4253
4254/* TEA5757 register bits */
4255#define TEA_FREQ 0:14
4256#define TEA_BUFFER 15:15
4257
4258#define TEA_SIGNAL_STRENGTH 16:17
4259
4260#define TEA_PORT1 18:18
4261#define TEA_PORT0 19:19
4262
4263#define TEA_BAND 20:21
4264#define TEA_BAND_FM 0
4265#define TEA_BAND_MW 1
4266#define TEA_BAND_LW 2
4267#define TEA_BAND_SW 3
4268
4269#define TEA_MONO 22:22
4270#define TEA_ALLOW_STEREO 0
4271#define TEA_FORCE_MONO 1
4272
4273#define TEA_SEARCH_DIRECTION 23:23
4274#define TEA_SEARCH_DOWN 0
4275#define TEA_SEARCH_UP 1
4276
4277#define TEA_STATUS 24:24
4278#define TEA_STATUS_TUNED 0
4279#define TEA_STATUS_SEARCHING 1
4280
4281/* Low-level stuff */
4282static int tea5757_read(struct bttv *btv)
4283{
4284 unsigned long timeout;
4285 int value = 0;
4286 int i;
4287
4288 /* better safe than sorry */
4289 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4290
4291 if (btv->mbox_ior) {
4292 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4293 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4294 udelay(5);
4295 }
4296
4297 if (bttv_gpio)
4298 bttv_gpio_tracking(btv,"tea5757 read");
4299
4300 bus_low(btv,btv->mbox_we);
4301 bus_low(btv,btv->mbox_clk);
4302
4303 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004304 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004305
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004306 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004307 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4308 schedule();
4309 if (bus_in(btv,btv->mbox_data)) {
4310 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4311 return -1;
4312 }
4313
4314 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004315 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004316 udelay(5);
4317 bus_high(btv,btv->mbox_clk);
4318 udelay(5);
4319 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4320 bus_low(btv,btv->mbox_clk);
4321 value <<= 1;
4322 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4323 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4324 }
4325 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4326 return value;
4327}
4328
4329static int tea5757_write(struct bttv *btv, int value)
4330{
4331 int i;
4332 int reg = value;
4333
4334 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4335
4336 if (btv->mbox_ior) {
4337 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4338 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4339 udelay(5);
4340 }
4341 if (bttv_gpio)
4342 bttv_gpio_tracking(btv,"tea5757 write");
4343
4344 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4345 bus_low(btv,btv->mbox_clk);
4346 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004347 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004348 if (reg & 0x1000000)
4349 bus_high(btv,btv->mbox_data);
4350 else
4351 bus_low(btv,btv->mbox_data);
4352 reg <<= 1;
4353 bus_high(btv,btv->mbox_clk);
4354 udelay(10);
4355 bus_low(btv,btv->mbox_clk);
4356 udelay(10);
4357 }
4358 bus_low(btv,btv->mbox_we); /* unmute !!! */
4359 return 0;
4360}
4361
4362void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4363{
4364 dprintk("tea5757_set_freq %d\n",freq);
4365 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004366}
4367
Linus Torvalds1da177e2005-04-16 15:20:36 -07004368/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4369 *
4370 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4371 * switch instead (CD22M3494E). This IC can have multiple active connections
4372 * between Xn (input) and Yn (output) pins. We need to clear any existing
4373 * connection prior to establish a new one, pulsing the STROBE pin.
4374 *
4375 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4376 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004377 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4378 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4379 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4380 * GPIO[8] - - P3[5] (microcontroller)
4381 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4382 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4383 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004384 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004385 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4386 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004387 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004388 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004389 * note: the vendor refused to give any information on this product, all
4390 * that stuff was found using a multimeter! :)
4391 */
4392static void rv605_muxsel(struct bttv *btv, unsigned int input)
4393{
4394 /* reset all conections */
4395 gpio_bits(0x200,0x200);
4396 mdelay(1);
4397 gpio_bits(0x200,0x000);
4398 mdelay(1);
4399
Joe Perchesc84e6032008-02-03 17:18:59 +02004400 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004401 gpio_bits(0x480,0x080);
4402 gpio_bits(0x480,0x480);
4403 mdelay(1);
4404 gpio_bits(0x480,0x080);
4405 mdelay(1);
4406}
4407
4408/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4409 *
4410 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4411 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4412 * chips, ten eight input analog multiplexors, a not chip and a few
4413 * other components.
4414 *
4415 * 16 inputs on a secondary bracket are provided and can be selected
4416 * from each of the four capture chips. Two of the eight input
4417 * multiplexors are used to select from any of the 16 input signals.
4418 *
4419 * Unsupported hardware capabilities:
4420 * . A video output monitor on the secondary bracket can be selected from
4421 * one of the 878A chips.
4422 * . Another passthrough but I haven't spent any time investigating it.
4423 * . Digital I/O (logic level connected to GPIO) is available from an
4424 * onboard header.
4425 *
4426 * The on chip input mux should always be set to 2.
4427 * GPIO[16:19] - Video input selection
4428 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4429 * GPIO[?:?] - Digital I/O.
4430 *
4431 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4432 * determined what function (if any) it provides. With the microcontroller
4433 * and sync seperator chips a guess is that it might have to do with video
4434 * switching and maybe some digital I/O.
4435 */
4436static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4437{
4438 /* video mux */
4439 gpio_bits(0x0f0000, input << 16);
4440}
4441
4442static void tibetCS16_init(struct bttv *btv)
4443{
4444 /* enable gpio bits, mask obtained via btSpy */
4445 gpio_inout(0xffffff, 0x0f7fff);
4446 gpio_write(0x0f7fff);
4447}
4448
4449/*
4450 * The following routines for the Kodicom-4400r get a little mind-twisting.
4451 * There is a "master" controller and three "slave" controllers, together
4452 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4453 * The analog switch is controlled by the "master", but the detection order
4454 * of the four BT878A chips is in an order which I just don't understand.
4455 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004456 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004457 * those numbers are different from the detection sequence. When working
4458 * with the analog switch, we need to "map" from the detection sequence
4459 * over to the board's logical controller number. This mapping sequence
4460 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4461 * unit 3, the second (which is the master) is logical unit 0, etc.
4462 * We need to maintain the status of the analog switch (which of the 16
4463 * cameras is connected to which of the 4 controllers). Rather than
4464 * add to the bttv structure for this, we use the data reserved for
4465 * the mbox (unused for this card type).
4466 */
4467
4468/*
4469 * First a routine to set the analog switch, which controls which camera
4470 * is routed to which controller. The switch comprises an X-address
4471 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4472 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4473 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4474 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4475 * specified address. The idea is to set the address and data, then bring
4476 * STROBE high, and finally bring STROBE back to low.
4477 */
4478static void kodicom4400r_write(struct bttv *btv,
4479 unsigned char xaddr,
4480 unsigned char yaddr,
4481 unsigned char data) {
4482 unsigned int udata;
4483
4484 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4485 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4486 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4487 gpio_bits(0x1ff, udata); /* strobe low */
4488}
4489
4490/*
4491 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4492 * use this routine. The routine finds the "master" for the card, maps
4493 * the controller number from the detected position over to the logical
4494 * number, writes the appropriate data to the analog switch, and housekeeps
4495 * the local copy of the switch information. The parameter 'input' is the
4496 * requested camera number (0 - 15).
4497 */
4498static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4499{
4500 char *sw_status;
4501 int xaddr, yaddr;
4502 struct bttv *mctlr;
4503 static unsigned char map[4] = {3, 0, 2, 1};
4504
4505 mctlr = master[btv->c.nr];
4506 if (mctlr == NULL) { /* ignore if master not yet detected */
4507 return;
4508 }
4509 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4510 yaddr = map[yaddr];
4511 sw_status = (char *)(&mctlr->mbox_we);
4512 xaddr = input & 0xf;
4513 /* Check if the controller/camera pair has changed, else ignore */
4514 if (sw_status[yaddr] != xaddr)
4515 {
4516 /* "open" the old switch, "close" the new one, save the new */
4517 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4518 sw_status[yaddr] = xaddr;
4519 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4520 }
4521}
4522
4523/*
4524 * During initialisation, we need to reset the analog switch. We
4525 * also preset the switch to map the 4 connectors on the card to the
4526 * *user's* (see above description of kodicom4400r_muxsel) channels
4527 * 0 through 3
4528 */
4529static void kodicom4400r_init(struct bttv *btv)
4530{
4531 char *sw_status = (char *)(&btv->mbox_we);
4532 int ix;
4533
4534 gpio_inout(0x0003ff, 0x0003ff);
4535 gpio_write(1 << 9); /* reset MUX */
4536 gpio_write(0);
4537 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004538 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004539 sw_status[ix] = ix;
4540 kodicom4400r_write(btv, ix, ix, 1);
4541 }
4542 /*
4543 * Since this is the "master", we need to set up the
4544 * other three controller chips' pointers to this structure
4545 * for later use in the muxsel routine.
4546 */
4547 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4548 return;
4549 master[btv->c.nr-1] = btv;
4550 master[btv->c.nr] = btv;
4551 master[btv->c.nr+1] = btv;
4552 master[btv->c.nr+2] = btv;
4553}
4554
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004555/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4556 * video multiplexers to provide up to 16 video inputs. These
4557 * multiplexers are controlled by the lower 8 GPIO pins of the
4558 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004559
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004560 * xxx0 is pin xxx of multiplexer U5,
4561 * yyy1 is pin yyy of multiplexer U2
4562 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004563#define ENA0 0x01
4564#define ENB0 0x02
4565#define ENA1 0x04
4566#define ENB1 0x08
4567
4568#define IN10 0x10
4569#define IN00 0x20
4570#define IN11 0x40
4571#define IN01 0x80
4572
4573static void xguard_muxsel(struct bttv *btv, unsigned int input)
4574{
4575 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004576 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4577 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4578 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4579 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004580 };
4581 gpio_write(masks[input%16]);
4582}
4583static void picolo_tetra_init(struct bttv *btv)
4584{
4585 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4586 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4587 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4588}
4589static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4590{
4591
4592 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4593 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4594 /*GPIO[20]&GPIO[21] used to choose the right input*/
4595 btwrite (input<<20,BT848_GPIO_DATA);
4596
4597}
4598
4599/*
4600 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4601 *
4602 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4603 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004604 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004605 * optional "Monitor Out" bus. This allows the card to be looking
4606 * at one input while the monitor is looking at another.
4607 *
4608 * Since I've couldn't be bothered figuring out how to add an
4609 * independant muxsel for the monitor bus, I've just set it to
4610 * whatever the card is looking at.
4611 *
4612 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4613 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4614 *
4615 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4616 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4617 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4618 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4619 *
4620 */
4621
4622/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4623#define I2C_TDA8540 0x90
4624#define I2C_TDA8540_ALT1 0x92
4625#define I2C_TDA8540_ALT2 0x94
4626#define I2C_TDA8540_ALT3 0x96
4627#define I2C_TDA8540_ALT4 0x98
4628#define I2C_TDA8540_ALT5 0x9a
4629#define I2C_TDA8540_ALT6 0x9c
4630
4631static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4632{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004633 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004634 int key = input % 4;
4635 int matrix = input / 4;
4636
4637 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4638 btv->c.nr, input, matrix, key);
4639
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004640 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004641 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4642 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4643 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4644 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4645 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4646 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4647 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4648 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4649
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004650 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004651 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004652 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004653 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004654 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004655 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004656 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004657 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004658 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004659
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004660 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004661 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4662}
4663
4664
4665/* PXC200 muxsel helper
4666 * luke@syseng.anu.edu.au
4667 * another transplant
4668 * from Alessandro Rubini (rubini@linux.it)
4669 *
4670 * There are 4 kinds of cards:
4671 * PXC200L which is bt848
4672 * PXC200F which is bt848 with PIC controlling mux
4673 * PXC200AL which is bt878
4674 * PXC200AF which is bt878 with PIC controlling mux
4675 */
4676#define PX_CFG_PXC200F 0x01
4677#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4678#define PX_I2C_PIC 0x0f
4679#define PX_PXC200A_CARDID 0x200a1295
4680#define PX_I2C_CMD_CFG 0x00
4681
4682static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4683{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004684 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004685 long mux;
4686 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004687 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004688
4689 /* Read PIC config to determine if this is a PXC200F */
4690 /* PX_I2C_CMD_CFG*/
4691 buf[0]=0;
4692 buf[1]=0;
4693 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4694 if (rc) {
4695 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4696 /* not PXC ? do nothing */
4697 return;
4698 }
4699
4700 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4701 if (!(rc & PX_CFG_PXC200F)) {
4702 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4703 return;
4704 }
4705
4706
4707 /* The multiplexer in the 200F is handled by the GPIO port */
4708 /* get correct mapping between inputs */
4709 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4710 /* ** not needed!? */
4711 mux = input;
4712
4713 /* make sure output pins are enabled */
4714 /* bitmask=0x30f; */
4715 bitmask=0x302;
4716 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004717 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004718 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4719 bitmask |= 7<<4; /* the DAC */
4720 }
4721 btwrite(bitmask, BT848_GPIO_OUT_EN);
4722
4723 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004724 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004725 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4726 else /* older device */
4727 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4728 btwrite(bitmask,BT848_GPIO_DATA);
4729
4730 /*
4731 * Was "to be safe, set the bt848 to input 0"
4732 * Actually, since it's ok at load time, better not messing
4733 * with these bits (on PXC200AF you need to set mux 2 here)
4734 *
4735 * needed because bttv-driver sets mux before calling this function
4736 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004737 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004738 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4739 else /* older device */
4740 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4741
4742 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4743}
4744
4745/* ----------------------------------------------------------------------- */
4746/* motherboard chipset specific stuff */
4747
Adrian Bunk7d44e892007-12-11 19:23:43 -03004748void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004749{
4750 int pcipci_fail = 0;
4751 struct pci_dev *dev = NULL;
4752
Alan Cox3d265c92006-09-14 11:53:16 -03004753 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004754 pcipci_fail = 1;
4755 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4756 triton1 = 1;
4757 if (pci_pci_problems & PCIPCI_VSFX)
4758 vsfx = 1;
4759#ifdef PCIPCI_ALIMAGIK
4760 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4761 latency = 0x0A;
4762#endif
4763
Linus Torvalds1da177e2005-04-16 15:20:36 -07004764
4765 /* print warnings about any quirks found */
4766 if (triton1)
4767 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4768 if (vsfx)
4769 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4770 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004771 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4772 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004773 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004774 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004775 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004776 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004777 printk(KERN_INFO "bttv: overlay forced. Use this "
4778 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004779 }
4780 }
4781 if (UNSET != latency)
4782 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004783 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004784 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004785 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004786 pci_read_config_byte(dev, 0x53, &b);
4787 if (bttv_debug)
4788 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4789 "bufcon=0x%02x\n",b);
4790 }
4791}
4792
4793int __devinit bttv_handle_chipset(struct bttv *btv)
4794{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004795 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004796
4797 if (!triton1 && !vsfx && UNSET == latency)
4798 return 0;
4799
4800 if (bttv_verbose) {
4801 if (triton1)
4802 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4803 if (vsfx && btv->id >= 878)
4804 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4805 if (UNSET != latency)
4806 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4807 btv->c.nr,latency);
4808 }
4809
4810 if (btv->id < 878) {
4811 /* bt848 (mis)uses a bit in the irq mask for etbf */
4812 if (triton1)
4813 btv->triton1 = BT848_INT_ETBF;
4814 } else {
4815 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004816 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004817 if (triton1)
4818 command |= BT878_EN_TBFX;
4819 if (vsfx)
4820 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004821 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4822 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004823 if (UNSET != latency)
4824 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4825 return 0;
4826}
4827
4828
4829/*
4830 * Local variables:
4831 * c-basic-offset: 8
4832 * End:
4833 */