blob: b963bde97412094a7b7eaf6379ad54290d2d8a43 [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
74static int terratec_active_radio_upgrade(struct bttv *btv);
75static int tea5757_read(struct bttv *btv);
76static int tea5757_write(struct bttv *btv, int value);
77static void identify_by_eeprom(struct bttv *btv,
78 unsigned char eeprom_data[256]);
79static int __devinit pvr_boot(struct bttv *btv);
80
81/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020082static unsigned int triton1;
83static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070084static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070085int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070086
87static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
88static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
89static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
93#ifdef MODULE
94static unsigned int autoload = 1;
95#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020096static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -070097#endif
98static unsigned int gpiomask = UNSET;
99static unsigned int audioall = UNSET;
100static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
101
102/* insmod options */
103module_param(triton1, int, 0444);
104module_param(vsfx, int, 0444);
105module_param(no_overlay, int, 0444);
106module_param(latency, int, 0444);
107module_param(gpiomask, int, 0444);
108module_param(audioall, int, 0444);
109module_param(autoload, int, 0444);
110
111module_param_array(card, int, NULL, 0444);
112module_param_array(pll, int, NULL, 0444);
113module_param_array(tuner, int, NULL, 0444);
114module_param_array(svhs, int, NULL, 0444);
115module_param_array(remote, int, NULL, 0444);
116module_param_array(audiomux, int, NULL, 0444);
117
118MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
119 "[enable bug compatibility for triton1 + others]");
120MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
121 "[yet another chipset flaw workaround]");
122MODULE_PARM_DESC(latency,"pci latency timer");
123MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
124MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
125MODULE_PARM_DESC(tuner,"specify installed tuner type");
126MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300127MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
128 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700129
130/* ----------------------------------------------------------------------- */
131/* list of card IDs for bt878+ cards */
132
133static struct CARD {
134 unsigned id;
135 int cardnr;
136 char *name;
137} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800138 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
139 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
140 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
141 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
142 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
143 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
144 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
145 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800146 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800148 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
149 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800151 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
152 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
153 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
154 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
155 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800156 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800157 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
158 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800159 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800161 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700162 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800163 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
164 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700165 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800166 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
Wade Berrier434b2522007-06-25 13:02:16 -0300168 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
169 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800170 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800172 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
173 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
174 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
175 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
176 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
177 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
178 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700179
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800180 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
181 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
182 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
183 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
184 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800186 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
187 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
188 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
189 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700190
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800191 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
192 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700193 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800194 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
195 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
196 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
197 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
198 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800200 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
201 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
202 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
203 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
204 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800206 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
207 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
208 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
209 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
210 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700211
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800212 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
213 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
214 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
215 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800217 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
218 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
219 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
220 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700221
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800222 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
223 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
224 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
225 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
226 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
227 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
228 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
229 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
230 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
231 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
232 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
233 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
234 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
235 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700247
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800248 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
249 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700250
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800251 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
252 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
253 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
254 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
255 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
256 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700257
Trent Piepho657de3c2006-06-20 00:30:57 -0300258 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800259 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700260
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800261 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
262 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
263 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
264 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
265 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
266 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800267 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
268 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800269 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700270
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800271 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
272 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800274 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
275 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
276 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
277 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800279 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280
Scott Alfter1ebba672007-04-02 14:22:39 -0300281 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
282 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
283
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700284 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800285 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700286
Steven Tothcd1257d2006-01-09 15:25:01 -0200287 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
288 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
289
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700290 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800291 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200292 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
293 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800294 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
295 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
296 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
297 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200298 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800299 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300300 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800301 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300302 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300303 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
305 { 0, -1, NULL }
306};
307
308/* ----------------------------------------------------------------------- */
309/* array with description for bt848 / bt878 tv/grabber cards */
310
311struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800312 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800313 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800314 .name = " *** UNKNOWN/GENERIC *** ",
315 .video_inputs = 4,
316 .audio_inputs = 1,
317 .tuner = 0,
318 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200319 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300320 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800321 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800322 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800323 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800324 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800325 .name = "MIRO PCTV",
326 .video_inputs = 4,
327 .audio_inputs = 1,
328 .tuner = 0,
329 .svhs = 2,
330 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200331 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300332 .gpiomux = { 2, 0, 0, 0 },
333 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800334 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300335 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800336 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800337 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800338 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800339 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800340 .name = "Hauppauge (bt848)",
341 .video_inputs = 4,
342 .audio_inputs = 1,
343 .tuner = 0,
344 .svhs = 2,
345 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200346 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300347 .gpiomux = { 0, 1, 2, 3 },
348 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800349 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300350 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800351 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800352 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800353 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800354 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800355 .name = "STB, Gateway P/N 6000699 (bt848)",
356 .video_inputs = 3,
357 .audio_inputs = 1,
358 .tuner = 0,
359 .svhs = 2,
360 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200361 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300362 .gpiomux = { 4, 0, 2, 3 },
363 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800364 .no_msp34xx = 1,
365 .needs_tvaudio = 1,
366 .tuner_type = TUNER_PHILIPS_NTSC,
367 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800368 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800369 .pll = PLL_28,
370 .has_radio = 1,
371 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800373 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800374 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800375 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
376 .video_inputs = 4,
377 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300378 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800379 .svhs = 2,
380 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200381 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300382 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800383 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300384 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800385 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800386 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800388 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 .name = "Diamond DTV2000",
390 .video_inputs = 4,
391 .audio_inputs = 1,
392 .tuner = 0,
393 .svhs = 2,
394 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200395 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300396 .gpiomux = { 0, 1, 0, 1 },
397 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800398 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300399 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800400 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800401 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800402 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800403 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800404 .name = "AVerMedia TVPhone",
405 .video_inputs = 3,
406 .audio_inputs = 1,
407 .tuner = 0,
408 .svhs = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200409 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300411 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800412 /* 0x04 for some cards ?? */
413 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300414 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800415 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800416 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300417 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800418 .has_remote = 1,
419 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800420 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800421 .name = "MATRIX-Vision MV-Delta",
422 .video_inputs = 5,
423 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300424 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800425 .svhs = 3,
426 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200427 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300428 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800429 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300430 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800431 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800432 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800433 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700434
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800435 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800436 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800437 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
438 .video_inputs = 4,
439 .audio_inputs = 1,
440 .tuner = 0,
441 .svhs = 2,
442 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200443 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300444 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
445 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800446 .needs_tvaudio = 1,
447 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300448 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800449 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800450 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800451 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800452 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .name = "IMS/IXmicro TurboTV",
454 .video_inputs = 3,
455 .audio_inputs = 1,
456 .tuner = 0,
457 .svhs = 2,
458 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -0200459 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300460 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800461 .needs_tvaudio = 0,
462 .pll = PLL_28,
463 .tuner_type = TUNER_TEMIC_PAL,
464 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800465 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800466 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800467 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800468 .name = "Hauppauge (bt878)",
469 .video_inputs = 4,
470 .audio_inputs = 1,
471 .tuner = 0,
472 .svhs = 2,
473 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -0200474 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300475 .gpiomux = { 0, 1, 2, 3 },
476 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800477 .needs_tvaudio = 1,
478 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300479 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800480 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800481 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800482 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800483 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800484 .name = "MIRO PCTV pro",
485 .video_inputs = 3,
486 .audio_inputs = 1,
487 .tuner = 0,
488 .svhs = 2,
489 .gpiomask = 0x3014f,
Michael Krufkybc286362006-01-11 19:40:17 -0200490 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300491 .gpiomux = { 0x20001,0x10001, 0, 0 },
492 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800493 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300494 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800495 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800496 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800497 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700498
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800500 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800501 .name = "ADS Technologies Channel Surfer TV (bt848)",
502 .video_inputs = 3,
503 .audio_inputs = 1,
504 .tuner = 0,
505 .svhs = 2,
506 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200507 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300508 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800509 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300510 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800511 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800512 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800514 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800515 .name = "AVerMedia TVCapture 98",
516 .video_inputs = 3,
517 .audio_inputs = 4,
518 .tuner = 0,
519 .svhs = 2,
520 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200521 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300522 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800523 .needs_tvaudio = 1,
524 .msp34xx_alt = 1,
525 .pll = PLL_28,
526 .tuner_type = TUNER_PHILIPS_PAL,
527 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800528 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300529 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800530 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800531 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800532 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800533 .name = "Aimslab Video Highway Xtreme (VHX)",
534 .video_inputs = 3,
535 .audio_inputs = 1,
536 .tuner = 0,
537 .svhs = 2,
538 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200539 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300540 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
541 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800542 .needs_tvaudio = 1,
543 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300544 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800545 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800546 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800547 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800548 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800549 .name = "Zoltrix TV-Max",
550 .video_inputs = 3,
551 .audio_inputs = 1,
552 .tuner = 0,
553 .svhs = 2,
554 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -0200555 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300556 .gpiomux = { 0, 0, 1, 0 },
557 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800558 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300559 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800560 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800561 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800564 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800565 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800566 .name = "Prolink Pixelview PlayTV (bt878)",
567 .video_inputs = 3,
568 .audio_inputs = 1,
569 .tuner = 0,
570 .svhs = 2,
571 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200572 .muxsel = { 2, 3, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800573 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300574 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
575 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 .needs_tvaudio = 1,
577 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300578 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300579 .tuner_addr = ADDR_UNSET,
580 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800581 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800582 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800583 .name = "Leadtek WinView 601",
584 .video_inputs = 3,
585 .audio_inputs = 1,
586 .tuner = 0,
587 .svhs = 2,
588 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200589 .muxsel = { 2, 3, 1, 1,0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300590 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
591 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800592 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300593 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800594 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800595 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300596 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800597 .has_radio = 1,
598 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800599 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .name = "AVEC Intercapture",
601 .video_inputs = 3,
602 .audio_inputs = 2,
603 .tuner = 0,
604 .svhs = 2,
605 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200606 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300607 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800608 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300609 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800611 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800612 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800613 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800614 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
615 .video_inputs = 4,
616 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300617 .tuner = UNSET,
618 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800619 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200620 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300621 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800622 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300623 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800624 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800625 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800626 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800629 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800630 .name = "CEI Raffles Card",
631 .video_inputs = 3,
632 .audio_inputs = 3,
633 .tuner = 0,
634 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200635 .muxsel = { 2, 3, 1, 1 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300636 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800637 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800638 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800639 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800640 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800641 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
642 .video_inputs = 4,
643 .audio_inputs = 2, /* tuner, line in */
644 .tuner = 0,
645 .svhs = 2,
646 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200647 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300648 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
649 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800650 .pll = PLL_28,
651 .tuner_type = TUNER_PHILIPS_PAL_I,
652 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800653 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800654 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800655 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800656 .name = "Askey CPH050/ Phoebe Tv Master + FM",
657 .video_inputs = 3,
658 .audio_inputs = 1,
659 .tuner = 0,
660 .svhs = 2,
661 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200662 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300663 .gpiomux = { 0, 1, 0x800, 0x400 },
664 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800665 .needs_tvaudio = 1,
666 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300667 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800668 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800669 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800670 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800671 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800672 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
673 .video_inputs = 3,
674 .audio_inputs = 1,
675 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300676 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800677 .gpiomask = 7,
678 .muxsel = { 2, 3, -1 },
679 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300680 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800681 .no_msp34xx = 1,
682 .pll = PLL_28,
683 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
684 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800685 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800686 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700687
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800688 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800689 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 .name = "Askey CPH05X/06X (bt878) [many vendors]",
691 .video_inputs = 3,
692 .audio_inputs = 1,
693 .tuner = 0,
694 .svhs = 2,
695 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200696 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300697 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
698 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800699 .needs_tvaudio = 1,
700 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300701 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800702 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800703 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800704 .has_remote = 1,
705 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800706 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800707 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
708 .video_inputs = 3,
709 .audio_inputs = 1,
710 .tuner = 0,
711 .svhs = 2,
712 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200713 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300714 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
715 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800716 .needs_tvaudio = 0,
717 .tuner_type = TUNER_PHILIPS_PAL,
718 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800719 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300720 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800721 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800722 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800723 .name = "Hauppauge WinCam newer (bt878)",
724 .video_inputs = 4,
725 .audio_inputs = 1,
726 .tuner = 0,
727 .svhs = 3,
728 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200729 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300730 .gpiomux = { 0, 1, 2, 3 },
731 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800732 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300733 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800734 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800735 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800736 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800737 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800738 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
739 .video_inputs = 4,
740 .audio_inputs = 2,
741 .tuner = 0,
742 .svhs = 2,
743 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200744 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300745 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
746 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800747 .pll = PLL_28,
748 .tuner_type = TUNER_PHILIPS_SECAM,
749 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800750 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700752
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800753 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800754 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800755 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
756 .video_inputs = 3,
757 .audio_inputs = 1,
758 .tuner = 0,
759 .svhs = 2,
760 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200761 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300762 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
763 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800764 .needs_tvaudio = 0,
765 .tuner_type = TUNER_PHILIPS_PAL,
766 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800767 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300768 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800769 /* GPIO wiring:
770 External 20 pin connector (for Active Radio Upgrade board)
771 gpio00: i2c-sda
772 gpio01: i2c-scl
773 gpio02: om5610-data
774 gpio03: om5610-clk
775 gpio04: om5610-wre
776 gpio05: om5610-stereo
777 gpio06: rds6588-davn
778 gpio07: Pin 7 n.c.
779 gpio08: nIOW
780 gpio09+10: nIOR, nSEL ?? (bt878)
781 gpio09: nIOR (bt848)
782 gpio10: nSEL (bt848)
783 Sound Routing:
784 gpio16: u2-A0 (1st 4052bt)
785 gpio17: u2-A1
786 gpio18: u2-nEN
787 gpio19: u4-A0 (2nd 4052)
788 gpio20: u4-A1
789 u4-nEN - GND
790 Btspy:
791 00000 : Cdrom (internal audio input)
792 10000 : ext. Video audio input
793 20000 : TV Mono
794 a0000 : TV Mono/2
795 1a0000 : TV Stereo
796 30000 : Radio
797 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700798 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800800 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800801 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800802 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
803 .name = "Imagenation PXC200",
804 .video_inputs = 5,
805 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300806 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 .svhs = 1, /* was: 4 */
808 .gpiomask = 0,
809 .muxsel = { 2, 3, 1, 0, 0},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300810 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300812 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800813 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800814 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700816
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800817 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800818 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800819 .name = "Lifeview FlyVideo 98 LR50",
820 .video_inputs = 4,
821 .audio_inputs = 1,
822 .tuner = 0,
823 .svhs = 2,
824 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200825 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300826 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
827 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800828 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300829 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800831 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800832 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800833 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800834 .name = "Formac iProTV, Formac ProTV I (bt848)",
835 .video_inputs = 4,
836 .audio_inputs = 1,
837 .tuner = 0,
838 .svhs = 3,
839 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200840 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300841 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800842 .pll = PLL_28,
843 .tuner_type = TUNER_PHILIPS_PAL,
844 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800845 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700847
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800848 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800849 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800850 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
851 .video_inputs = 4,
852 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300853 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800854 .svhs = 2,
855 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200856 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300857 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800858 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300859 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800860 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800861 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800862 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800863 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800864 .name = "Terratec TerraTValue Version Bt878",
865 .video_inputs = 3,
866 .audio_inputs = 1,
867 .tuner = 0,
868 .svhs = 2,
869 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200870 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300871 .gpiomux = { 0x500, 0, 0x300, 0x900 },
872 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800873 .needs_tvaudio = 1,
874 .pll = PLL_28,
875 .tuner_type = TUNER_PHILIPS_PAL,
876 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800877 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800878 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800879 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800880 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
881 .video_inputs = 4,
882 .audio_inputs = 1,
883 .tuner = 0,
884 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200885 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800886 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
887 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300888 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
889 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800890 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
891 gpio23 -- hef4052:nEnable (0x800000)
892 gpio12 -- hef4052:A1
893 gpio13 -- hef4052:A0
894 0x0000: external audio
895 0x1000: FM
896 0x2000: TV
897 0x3000: n.c.
898 Note: There exists another variant "Winfast 2000" with tv stereo !?
899 Note: eeprom only contains FF and pci subsystem id 107d:6606
900 */
901 .needs_tvaudio = 0,
902 .pll = PLL_28,
903 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300904 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800905 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800906 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300907 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800908 .has_remote = 1,
909 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800910 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
912 .video_inputs = 4,
913 .audio_inputs = 3,
914 .tuner = 0,
915 .svhs = 2,
916 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200917 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300918 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
919 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800920 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300921 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800922 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800923 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800924 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800927 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800928 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
929 .video_inputs = 4,
930 .audio_inputs = 3,
931 .tuner = 0,
932 .svhs = 2,
933 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200934 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300935 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
936 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800937 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300938 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800939 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800940 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800941 .has_radio = 1,
942 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800943 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .name = "Prolink PixelView PlayTV pro",
945 .video_inputs = 3,
946 .audio_inputs = 1,
947 .tuner = 0,
948 .svhs = 2,
949 .gpiomask = 0xff,
950 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300951 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
952 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800953 .no_msp34xx = 1,
954 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300955 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800957 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800958 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800959 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .name = "Askey CPH06X TView99",
961 .video_inputs = 4,
962 .audio_inputs = 1,
963 .tuner = 0,
964 .svhs = 2,
965 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200966 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300967 .gpiomux = { 0x551400, 0x551200, 0, 0 },
968 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800969 .needs_tvaudio = 1,
970 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300971 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800972 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800973 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800974 .has_remote = 1,
975 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800976 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800977 .name = "Pinnacle PCTV Studio/Rave",
978 .video_inputs = 3,
979 .audio_inputs = 1,
980 .tuner = 0,
981 .svhs = 2,
982 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200983 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300984 .gpiomux = { 2, 0xd0001, 0, 0 },
985 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800986 .needs_tvaudio = 0,
987 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300988 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800990 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800991 },
992
993 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800994 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800995 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
996 .video_inputs = 3,
997 .audio_inputs = 1,
998 .tuner = 0,
999 .svhs = 2,
1000 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001001 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001002 .gpiomux = { 4, 0, 2, 3 },
1003 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001004 .no_msp34xx = 1,
1005 .needs_tvaudio = 1,
1006 .tuner_type = TUNER_PHILIPS_NTSC,
1007 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001008 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001009 .pll = PLL_28,
1010 .has_radio = 1,
1011 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001012 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001013 .name = "AVerMedia TVPhone 98",
1014 .video_inputs = 3,
1015 .audio_inputs = 4,
1016 .tuner = 0,
1017 .svhs = 2,
1018 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001019 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001020 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001021 .needs_tvaudio = 1,
1022 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001023 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001025 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001026 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001027 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001029 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 .name = "ProVideo PV951", /* pic16c54 */
1031 .video_inputs = 3,
1032 .audio_inputs = 1,
1033 .tuner = 0,
1034 .svhs = 2,
1035 .gpiomask = 0,
1036 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001037 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001038 .needs_tvaudio = 1,
1039 .no_msp34xx = 1,
1040 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001041 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001042 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001043 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001045 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001046 .name = "Little OnAir TV",
1047 .video_inputs = 3,
1048 .audio_inputs = 1,
1049 .tuner = 0,
1050 .svhs = 2,
1051 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001052 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001053 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1054 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001056 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001057 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001058 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001059 },
1060
1061 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001062 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001063 .name = "Sigma TVII-FM",
1064 .video_inputs = 2,
1065 .audio_inputs = 1,
1066 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001067 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001068 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001069 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001070 .gpiomux = { 1, 1, 0, 2 },
1071 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001072 .no_msp34xx = 1,
1073 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001074 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001076 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001077 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001078 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .name = "MATRIX-Vision MV-Delta 2",
1080 .video_inputs = 5,
1081 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001082 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001083 .svhs = 3,
1084 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001085 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001086 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001087 .no_msp34xx = 1,
1088 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001089 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001091 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001092 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001093 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001094 .name = "Zoltrix Genie TV/FM",
1095 .video_inputs = 3,
1096 .audio_inputs = 1,
1097 .tuner = 0,
1098 .svhs = 2,
1099 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001100 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001101 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1102 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001103 .no_msp34xx = 1,
1104 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001105 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001106 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001107 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001109 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .name = "Terratec TV/Radio+",
1111 .video_inputs = 3,
1112 .audio_inputs = 1,
1113 .tuner = 0,
1114 .svhs = 2,
1115 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001116 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001117 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1118 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001119 .needs_tvaudio = 1,
1120 .no_msp34xx = 1,
1121 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001122 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001123 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001124 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001125 .has_radio = 1,
1126 },
1127
1128 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001129 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001130 .name = "Askey CPH03x/ Dynalink Magic TView",
1131 .video_inputs = 3,
1132 .audio_inputs = 1,
1133 .tuner = 0,
1134 .svhs = 2,
1135 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001136 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001137 .gpiomux = {2,0,0,0 },
1138 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001139 .needs_tvaudio = 1,
1140 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001141 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001142 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001143 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001144 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001145 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001146 .name = "IODATA GV-BCTV3/PCI",
1147 .video_inputs = 3,
1148 .audio_inputs = 1,
1149 .tuner = 0,
1150 .svhs = 2,
1151 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001152 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001153 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001154 .no_msp34xx = 1,
1155 .pll = PLL_28,
1156 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1157 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001158 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001159 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001160 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001161 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001162 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1163 .video_inputs = 5,
1164 .audio_inputs = 1,
1165 .tuner = 0,
1166 .svhs = 3,
1167 .gpiomask = 0xAA0000,
1168 .muxsel = { 2,3,1,1,-1 },
1169 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001170 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1171 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001172 .no_msp34xx = 1,
1173 .pll = PLL_28,
1174 .tuner_type = TUNER_PHILIPS_PAL_I,
1175 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001176 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001177 .has_remote = 1,
1178 /* GPIO wiring: (different from Rev.4C !)
1179 GPIO17: U4.A0 (first hef4052bt)
1180 GPIO19: U4.A1
1181 GPIO20: U5.A1 (second hef4052bt)
1182 GPIO21: U4.nEN
1183 GPIO22: BT832 Reset Line
1184 GPIO23: A5,A0, U5,nEN
1185 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1186 */
1187 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001188 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001189 .name = "Eagle Wireless Capricorn2 (bt878A)",
1190 .video_inputs = 4,
1191 .audio_inputs = 1,
1192 .tuner = 0,
1193 .svhs = 2,
1194 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001195 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001196 .gpiomux = { 0, 1, 2, 3 },
1197 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001198 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001199 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001200 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001201 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001202 },
1203
1204 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001205 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001206 /* David Härdeman <david@2gen.com> */
1207 .name = "Pinnacle PCTV Studio Pro",
1208 .video_inputs = 4,
1209 .audio_inputs = 1,
1210 .tuner = 0,
1211 .svhs = 3,
1212 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001213 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001214 .gpiomux = { 1, 0xd0001, 0, 0 },
1215 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001216 /* sound path (5 sources):
1217 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1218 0= ext. Audio IN
1219 1= from MUX2
1220 2= Mono TV sound from Tuner
1221 3= not connected
1222 MUX2 (mask 0x30000):
1223 0,2,3= from MSP34xx
1224 1= FM stereo Radio from Tuner */
1225 .needs_tvaudio = 0,
1226 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001227 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001228 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001229 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001230 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001231 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001232 /* Claas Langbehn <claas@bigfoot.com>,
1233 Sven Grothklags <sven@upb.de> */
1234 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1235 .video_inputs = 4,
1236 .audio_inputs = 3,
1237 .tuner = 0,
1238 .svhs = 2,
1239 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001240 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001241 .gpiomux = { 0, 0, 0x10, 8 },
1242 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001243 .needs_tvaudio = 1,
1244 .pll = PLL_28,
1245 .tuner_type = TUNER_PHILIPS_PAL,
1246 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001247 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001248 .has_radio = 1,
1249 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001250 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001251 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001252 in de.comp.os.unix.linux.hardware:
1253 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001254 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001255 options tuner type=5 */
1256 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1257 .video_inputs = 4,
1258 .audio_inputs = 1,
1259 .tuner = 0,
1260 .svhs = 2,
1261 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001262 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001263 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1264 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001265 /* For cards with tda9820/tda9821:
1266 0x0000: Tuner normal stereo
1267 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1268 0x0880: Tuner A2 stereo */
1269 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001270 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001271 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001272 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001273 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001274 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001275 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1276 old Easy TV BT848 version (model CPH031) */
1277 .name = "Askey CPH031/ BESTBUY Easy TV",
1278 .video_inputs = 4,
1279 .audio_inputs = 1,
1280 .tuner = 0,
1281 .svhs = 2,
1282 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001283 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001284 .gpiomux = { 2, 0, 0, 0 },
1285 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001286 .needs_tvaudio = 0,
1287 .pll = PLL_28,
1288 .tuner_type = TUNER_TEMIC_PAL,
1289 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001290 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001291 },
1292
1293 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001294 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001295 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1296 .name = "Lifeview FlyVideo 98FM LR50",
1297 .video_inputs = 4,
1298 .audio_inputs = 3,
1299 .tuner = 0,
1300 .svhs = 2,
1301 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001302 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001303 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1304 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001305 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001306 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001307 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001308 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001309 },
1310 /* This is the ultimate cheapo capture card
1311 * just a BT848A on a small PCB!
1312 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001313 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001314 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1315 .video_inputs = 2,
1316 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001317 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 .svhs = 1,
1319 .gpiomask = 0,
1320 .muxsel = { 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001321 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001322 .needs_tvaudio = 0,
1323 .no_msp34xx = 1,
1324 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001325 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001326 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001327 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001328 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001329 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001330 /* Daniel Herrington <daniel.herrington@home.com> */
1331 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1332 .video_inputs = 3,
1333 .audio_inputs = 1,
1334 .tuner = 0,
1335 .svhs = 2,
1336 .gpiomask = 0xe00,
1337 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001338 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1339 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001340 .needs_tvaudio = 1,
1341 .pll = PLL_28,
1342 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1343 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001344 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001345 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001346 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001347 /* Matti Mottus <mottus@physic.ut.ee> */
1348 .name = "Askey CPH03x TV Capturer",
1349 .video_inputs = 4,
1350 .audio_inputs = 1,
1351 .tuner = 0,
1352 .svhs = 2,
1353 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001354 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001355 .gpiomux = { 2, 0, 0, 0 },
1356 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001357 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001358 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001359 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001360 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001361 },
1362
1363 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001364 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001365 /* Philip Blundell <philb@gnu.org> */
1366 .name = "Modular Technology MM100PCTV",
1367 .video_inputs = 2,
1368 .audio_inputs = 2,
1369 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001370 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001371 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001372 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001373 .gpiomux = { 2, 0, 0, 1 },
1374 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001375 .pll = PLL_35,
1376 .tuner_type = TUNER_TEMIC_PAL,
1377 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001378 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001379 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001380 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001382 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001383 .video_inputs = 2,
1384 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001385 .tuner = UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001386 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001387 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001388 .muxsel = { 2, 2 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001389 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001390 .no_msp34xx = 1,
1391 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001392 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001393 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001394 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001395 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001396 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001397 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001398 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1399 new Easy TV BT878 version (model CPH061)
1400 special thanks to Informatica Mieres for providing the card */
1401 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1402 .video_inputs = 3,
1403 .audio_inputs = 2,
1404 .tuner = 0,
1405 .svhs = 2,
1406 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001407 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001408 .gpiomux = { 1, 0, 4, 4 },
1409 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001410 .needs_tvaudio = 0,
1411 .pll = PLL_28,
1412 .tuner_type = TUNER_PHILIPS_PAL,
1413 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001414 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001415 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001416 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001417 /* Lukas Gebauer <geby@volny.cz> */
1418 .name = "ATI TV-Wonder",
1419 .video_inputs = 3,
1420 .audio_inputs = 1,
1421 .tuner = 0,
1422 .svhs = 2,
1423 .gpiomask = 0xf03f,
1424 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001425 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1426 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001427 .pll = PLL_28,
1428 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1429 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001430 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001431 },
1432
1433 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001434 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001435 /* Lukas Gebauer <geby@volny.cz> */
1436 .name = "ATI TV-Wonder VE",
1437 .video_inputs = 2,
1438 .audio_inputs = 1,
1439 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001440 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001441 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001442 .muxsel = { 2, 3, 0, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001443 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001444 .no_msp34xx = 1,
1445 .pll = PLL_28,
1446 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1447 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001448 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001449 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001450 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001451 /* DeeJay <deejay@westel900.net (2000S) */
1452 .name = "Lifeview FlyVideo 2000S LR90",
1453 .video_inputs = 3,
1454 .audio_inputs = 3,
1455 .tuner = 0,
1456 .svhs = 2,
1457 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001458 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001459 /* Radio changed from 1e80 to 0x800 to make
1460 FlyVideo2000S in .hu happy (gm)*/
1461 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001462 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1463 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001464 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001465 .no_msp34xx = 1,
1466 .no_tda9875 = 1,
1467 .needs_tvaudio = 1,
1468 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001469 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001470 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001471 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001473 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001474 .name = "Terratec TValueRadio",
1475 .video_inputs = 3,
1476 .audio_inputs = 1,
1477 .tuner = 0,
1478 .svhs = 2,
1479 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001480 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001481 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1482 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001483 .needs_tvaudio = 1,
1484 .pll = PLL_28,
1485 .tuner_type = TUNER_PHILIPS_PAL,
1486 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001487 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001488 .has_radio = 1,
1489 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001490 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001491 /* TANAKA Kei <peg00625@nifty.com> */
1492 .name = "IODATA GV-BCTV4/PCI",
1493 .video_inputs = 3,
1494 .audio_inputs = 1,
1495 .tuner = 0,
1496 .svhs = 2,
1497 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001498 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001499 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001500 .no_msp34xx = 1,
1501 .pll = PLL_28,
1502 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1503 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001504 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001505 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001506 },
1507
1508 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001509 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001510 .name = "3Dfx VoodooTV FM (Euro)",
1511 /* try "insmod msp3400 simple=0" if you have
1512 * sound problems with this card. */
1513 .video_inputs = 4,
1514 .audio_inputs = 1,
1515 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001516 .svhs = UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001517 .gpiomask = 0x4f8a00,
1518 /* 0x100000: 1=MSP enabled (0=disable again)
1519 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1520 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1521 .gpiomute = 0x947fff,
1522 /* tvtuner, radio, external,internal, mute, stereo
1523 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1524 .muxsel = { 2, 3 ,0 ,1 },
1525 .tuner_type = TUNER_MT2032,
1526 .tuner_addr = ADDR_UNSET,
1527 .radio_addr = ADDR_UNSET,
1528 .pll = PLL_28,
1529 .has_radio = 1,
1530 },
1531 [BTTV_BOARD_VOODOOTV_200] = {
1532 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001533 /* try "insmod msp3400 simple=0" if you have
1534 * sound problems with this card. */
1535 .video_inputs = 4,
1536 .audio_inputs = 1,
1537 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001538 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001539 .gpiomask = 0x4f8a00,
1540 /* 0x100000: 1=MSP enabled (0=disable again)
1541 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001542 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1543 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001544 /* tvtuner, radio, external,internal, mute, stereo
1545 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001546 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001547 .tuner_type = TUNER_MT2032,
1548 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001549 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001550 .pll = PLL_28,
1551 .has_radio = 1,
1552 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001553 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001554 /* Philip Blundell <pb@nexus.co.uk> */
1555 .name = "Active Imaging AIMMS",
1556 .video_inputs = 1,
1557 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001558 .tuner = UNSET,
1559 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001560 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001561 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001562 .pll = PLL_28,
1563 .muxsel = { 2 },
1564 .gpiomask = 0
1565 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001566 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1568 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1569 .video_inputs = 3,
1570 .audio_inputs = 4,
1571 .tuner = 0,
1572 .svhs = 2,
1573 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001574 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001575 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1576 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001577 .needs_tvaudio = 1,
1578 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001579 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001580 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001581 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001582 .has_remote = 1,
1583 /* GPIO wiring:
1584 GPIO0: U4.A0 (hef4052bt)
1585 GPIO1: U4.A1
1586 GPIO2: U4.A1 (second hef4052bt)
1587 GPIO3: U4.nEN, U5.A0, A5.nEN
1588 GPIO8-15: vrd866b ?
1589 */
1590 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001591 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001592 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1593 .video_inputs = 4,
1594 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001595 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001596 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001597 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001598 .pll = PLL_28,
1599 .no_msp34xx = 1,
1600 .tuner_type = UNSET,
1601 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001602 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001603 },
1604
1605 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001606 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001607 /* Dariusz Kowalewski <darekk@automex.pl> */
1608 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1609 .video_inputs = 4,
1610 .audio_inputs = 1,
1611 .tuner = 0,
1612 .svhs = 2,
1613 .gpiomask = 0x3f,
1614 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001615 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1616 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001617 .needs_tvaudio = 1,
1618 .no_msp34xx = 1,
1619 .no_tda9875 = 1,
1620 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001621 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001622 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001623 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001624 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001625 .has_radio = 1, /* Note: not all cards have radio */
1626 .has_remote = 1,
1627 /* GPIO wiring:
1628 GPIO0: A0 hef4052
1629 GPIO1: A1 hef4052
1630 GPIO3: nEN hef4052
1631 GPIO8-15: vrd866b
1632 GPIO20,22,23: R30,R29,R28
1633 */
1634 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001635 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001636 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1637 /* you must jumper JP5 for the card to work */
1638 .name = "Sensoray 311",
1639 .video_inputs = 5,
1640 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001641 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001642 .svhs = 4,
1643 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001644 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001645 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001647 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001648 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001649 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001650 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001651 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001652 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1653 .name = "RemoteVision MX (RV605)",
1654 .video_inputs = 16,
1655 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001656 .tuner = UNSET,
1657 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001658 .gpiomask = 0x00,
1659 .gpiomask2 = 0x07ff,
1660 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1661 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1662 .no_msp34xx = 1,
1663 .no_tda9875 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001664 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001665 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001666 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001667 .muxsel_hook = rv605_muxsel,
1668 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001669 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001670 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1671 .video_inputs = 3,
1672 .audio_inputs = 2,
1673 .tuner = 0,
1674 .svhs = 2,
1675 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1676 .muxsel = { 2, 1, 1, },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001677 .gpiomux = { 0, 1, 2, 2 },
1678 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001679 .needs_tvaudio = 0,
1680 .tuner_type = TUNER_PHILIPS_PAL,
1681 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001682 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001683 .pll = PLL_28,
1684 .has_radio = 1,
1685 },
1686
1687 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001688 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001689 /* Masaki Suzuki <masaki@btree.org> */
1690 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1691 .video_inputs = 3,
1692 .audio_inputs = 1,
1693 .tuner = 0,
1694 .svhs = 2,
1695 .gpiomask = 0x140007,
1696 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001697 .gpiomux = { 0, 1, 2, 3 },
1698 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001699 .tuner_type = TUNER_PHILIPS_NTSC,
1700 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001701 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001702 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001703 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001704 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001705 .name = "GrandTec Multi Capture Card (Bt878)",
1706 .video_inputs = 4,
1707 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001708 .tuner = UNSET,
1709 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001710 .gpiomask = 0,
1711 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001712 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001713 .needs_tvaudio = 0,
1714 .no_msp34xx = 1,
1715 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001716 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001718 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001719 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001720 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001721 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1722 .video_inputs = 4,
1723 .audio_inputs = 3,
1724 .tuner = 0,
1725 .svhs = 2,
1726 .gpiomask = 7,
1727 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001728 .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 -08001729 * This card lacks external Audio In, so we mute it on Ext. & Int.
1730 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1731 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001732 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001733 * btwincap uses 0x80000/0x80003
1734 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001735 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001736 .needs_tvaudio = 0,
1737 .no_msp34xx = 1,
1738 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001739 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001740 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001741 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001742 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1743 radio signal strength indicators work fine. */
1744 .has_radio = 1,
1745 /* GPIO Info:
1746 GPIO0,1: HEF4052 A0,A1
1747 GPIO2: HEF4052 nENABLE
1748 GPIO3-7: n.c.
1749 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1750 GPIO14,15: ??
1751 GPIO16-21: n.c.
1752 GPIO22,23: ??
1753 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1754 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001755 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001756 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1757 .name = "DSP Design TCVIDEO",
1758 .video_inputs = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001759 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02001760 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001761 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001762 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001763 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001764 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001765 },
1766
1767 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001768 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001769 .name = "Hauppauge WinTV PVR",
1770 .video_inputs = 4,
1771 .audio_inputs = 1,
1772 .tuner = 0,
1773 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001774 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001775 .needs_tvaudio = 1,
1776 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001777 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001778 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001779 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001780
1781 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001782 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001784 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001785 .name = "IODATA GV-BCTV5/PCI",
1786 .video_inputs = 3,
1787 .audio_inputs = 1,
1788 .tuner = 0,
1789 .svhs = 2,
1790 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001791 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001792 .gpiomux = {0x030000, 0x010000, 0, 0 },
1793 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001794 .no_msp34xx = 1,
1795 .pll = PLL_28,
1796 .tuner_type = TUNER_PHILIPS_NTSC_M,
1797 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001798 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001799 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001800 .has_radio = 1,
1801 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001802 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001803 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1804 .video_inputs = 4, /* id-inputs-clock */
1805 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001806 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001807 .svhs = 3,
1808 .muxsel = { 3, 2, 0, 1 },
1809 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001810 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001812 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001813 .no_msp34xx = 1,
1814 .no_tda9875 = 1,
1815 .no_tda7432 = 1,
1816 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001817 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001818 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1819 .video_inputs = 3,
1820 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001821 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001822 .svhs = 2,
1823 .muxsel = { 2, 3, 1 },
1824 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001825 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001827 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001828 .no_msp34xx = 1,
1829 .no_tda9875 = 1,
1830 .no_tda7432 = 1,
1831 },
1832
1833 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001834 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001835 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1836 .video_inputs = 2,
1837 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001838 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001839 .svhs = 1,
1840 .muxsel = { 3, 1 },
1841 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001842 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001843 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001844 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001845 .no_msp34xx = 1,
1846 .no_tda9875 = 1,
1847 .no_tda7432 = 1,
1848 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001849 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001850 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1851 .video_inputs = 1,
1852 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001853 .tuner = UNSET,
1854 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001855 .muxsel = { 0 },
1856 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001857 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001858 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001859 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001860 .no_msp34xx = 1,
1861 .no_tda9875 = 1,
1862 .no_tda7432 = 1,
1863 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001864 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001865 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1866 .video_inputs = 2,
1867 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001868 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001869 .svhs = 1,
1870 .muxsel = { 0, 1 },
1871 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001872 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001873 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001874 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001875 .no_msp34xx = 1,
1876 .no_tda9875 = 1,
1877 .no_tda7432 = 1,
1878 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001879 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1881 .video_inputs = 1,
1882 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001883 .tuner = UNSET,
1884 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001885 .muxsel = { 0 },
1886 .pll = PLL_28,
1887 .tuner_type = UNSET,
1888 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001889 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .no_msp34xx = 1,
1891 .no_tda9875 = 1,
1892 .no_tda7432 = 1,
1893 },
1894
1895 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001896 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001897 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1898 .video_inputs = 2,
1899 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001900 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001901 .svhs = 1,
1902 .muxsel = { 0, 1 },
1903 .pll = PLL_28,
1904 .tuner_type = UNSET,
1905 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001906 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001907 .no_msp34xx = 1,
1908 .no_tda9875 = 1,
1909 .no_tda7432 = 1,
1910 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001911 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001912 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001913 .video_inputs = 2,
1914 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001915 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001916 .svhs = 1,
1917 .muxsel = { 2, 3 },
1918 .pll = PLL_28,
1919 .tuner_type = UNSET,
1920 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001921 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001922 .no_msp34xx = 1,
1923 .no_tda9875 = 1,
1924 .no_tda7432 = 1,
1925 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001926 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 .name = "Osprey 500", /* 500 */
1928 .video_inputs = 2,
1929 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001930 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001931 .svhs = 1,
1932 .muxsel = { 2, 3 },
1933 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001934 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001935 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001936 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001937 .no_msp34xx = 1,
1938 .no_tda9875 = 1,
1939 .no_tda7432 = 1,
1940 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001941 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001942 .name = "Osprey 540", /* 540 */
1943 .video_inputs = 4,
1944 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001945 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001946 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001947 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001948 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001949 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001950 .no_msp34xx = 1,
1951 .no_tda9875 = 1,
1952 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001953 },
1954
1955 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001956 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001957 .name = "Osprey 2000", /* 2000 */
1958 .video_inputs = 2,
1959 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001960 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .svhs = 1,
1962 .muxsel = { 2, 3 },
1963 .pll = PLL_28,
1964 .tuner_type = UNSET,
1965 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001966 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001967 .no_msp34xx = 1,
1968 .no_tda9875 = 1,
1969 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1970 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001971 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001972 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1973 .name = "IDS Eagle",
1974 .video_inputs = 4,
1975 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001976 .tuner = UNSET,
1977 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001978 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001979 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001980 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001981 .gpiomask = 0,
1982 .muxsel = { 0, 1, 2, 3 },
1983 .muxsel_hook = eagle_muxsel,
1984 .no_msp34xx = 1,
1985 .no_tda9875 = 1,
1986 .pll = PLL_28,
1987 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001988 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001989 .name = "Pinnacle PCTV Sat",
1990 .video_inputs = 2,
1991 .audio_inputs = 0,
1992 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001993 .tuner = UNSET,
1994 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001995 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001996 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001997 .no_msp34xx = 1,
1998 .no_tda9875 = 1,
1999 .no_tda7432 = 1,
Mauro Carvalho Chehabd2be8932006-10-02 23:52:48 -03002000 .muxsel = { 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002001 .pll = PLL_28,
2002 .no_gpioirq = 1,
2003 .has_dvb = 1,
2004 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002005 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002006 .name = "Formac ProTV II (bt878)",
2007 .video_inputs = 4,
2008 .audio_inputs = 1,
2009 .tuner = 0,
2010 .svhs = 3,
2011 .gpiomask = 2,
2012 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02002013 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002014 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002015 .pll = PLL_28,
2016 .has_radio = 1,
2017 .tuner_type = TUNER_PHILIPS_PAL,
2018 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002019 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002020 /* sound routing:
2021 GPIO=0x00,0x01,0x03: mute (?)
2022 0x02: both TV and radio (tuner: FM1216/I)
2023 The card has onboard audio connectors labeled "cdrom" and "board",
2024 not soldered here, though unknown wiring.
2025 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002026 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002027 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002028
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002029 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002030 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002031 .name = "MachTV",
2032 .video_inputs = 3,
2033 .audio_inputs = 1,
2034 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002035 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002036 .gpiomask = 7,
2037 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002038 .gpiomux = { 0, 1, 2, 3},
2039 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002040 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002041 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002042 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002043 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08002044 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002046 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002047 .name = "Euresys Picolo",
2048 .video_inputs = 3,
2049 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002050 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002051 .svhs = 2,
2052 .gpiomask = 0,
2053 .no_msp34xx = 1,
2054 .no_tda9875 = 1,
2055 .no_tda7432 = 1,
2056 .muxsel = { 2, 0, 1},
2057 .pll = PLL_28,
2058 .tuner_type = UNSET,
2059 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002060 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002062 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002063 /* Luc Van Hoeylandt <luc@e-magic.be> */
2064 .name = "ProVideo PV150", /* 0x4f */
2065 .video_inputs = 2,
2066 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002067 .tuner = UNSET,
2068 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002069 .gpiomask = 0,
2070 .muxsel = { 2, 3 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002071 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002072 .needs_tvaudio = 0,
2073 .no_msp34xx = 1,
2074 .pll = PLL_28,
2075 .tuner_type = UNSET,
2076 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002077 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002078 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002079 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002080 /* Hiroshi Takekawa <sian@big.or.jp> */
2081 /* This card lacks subsystem ID */
2082 .name = "AD-TVK503", /* 0x63 */
2083 .video_inputs = 4,
2084 .audio_inputs = 1,
2085 .tuner = 0,
2086 .svhs = 2,
2087 .gpiomask = 0x001e8007,
2088 .muxsel = { 2, 3, 1, 0 },
2089 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002090 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2091 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002092 .needs_tvaudio = 0,
2093 .no_msp34xx = 1,
2094 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002095 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002096 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002097 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03002098 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002100
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002101 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002102 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 .name = "Hercules Smart TV Stereo",
2104 .video_inputs = 4,
2105 .audio_inputs = 1,
2106 .tuner = 0,
2107 .svhs = 2,
2108 .gpiomask = 0x00,
2109 .muxsel = { 2, 3, 1, 1 },
2110 .needs_tvaudio = 1,
2111 .no_msp34xx = 1,
2112 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002113 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002114 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002115 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002116 /* Notes:
2117 - card lacks subsystem ID
2118 - stereo variant w/ daughter board with tda9874a @0xb0
2119 - Audio Routing:
2120 always from tda9874 independent of GPIO (?)
2121 external line in: unknown
2122 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2123 hef4053 (instead 4052) for unknown function
2124 */
2125 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002126 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 .name = "Pace TV & Radio Card",
2128 .video_inputs = 4,
2129 .audio_inputs = 1,
2130 .tuner = 0,
2131 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002132 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002133 .gpiomask = 0,
2134 .no_tda9875 = 1,
2135 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002136 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002137 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002138 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002139 .has_radio = 1,
2140 .pll = PLL_28,
2141 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2142 only internal line out: (4pin header) RGGL
2143 Radio must be decoded by msp3410d (not routed through)*/
2144 /*
2145 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2146 */
2147 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002148 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002149 /* Chris Willing <chris@vislab.usyd.edu.au> */
2150 .name = "IVC-200",
2151 .video_inputs = 1,
2152 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002153 .tuner = UNSET,
2154 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002155 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002156 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002157 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002158 .gpiomask = 0xdf,
2159 .muxsel = { 2 },
2160 .pll = PLL_28,
2161 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002162 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002163 .name = "Grand X-Guard / Trust 814PCI",
2164 .video_inputs = 16,
2165 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002166 .tuner = UNSET,
2167 .svhs = UNSET,
2168 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002169 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002170 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002171 .gpiomask2 = 0xff,
2172 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2173 .muxsel_hook = xguard_muxsel,
2174 .no_msp34xx = 1,
2175 .no_tda9875 = 1,
2176 .no_tda7432 = 1,
2177 .pll = PLL_28,
2178 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002179
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002180 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002181 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002182 .name = "Nebula Electronics DigiTV",
2183 .video_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002184 .tuner = UNSET,
2185 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002186 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002187 .no_msp34xx = 1,
2188 .no_tda9875 = 1,
2189 .no_tda7432 = 1,
2190 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002191 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002192 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002193 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002194 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002195 .has_remote = 1,
2196 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002197 .no_gpioirq = 1,
2198 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002199 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002200 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2201 .name = "ProVideo PV143",
2202 .video_inputs = 4,
2203 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002204 .tuner = UNSET,
2205 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002206 .gpiomask = 0,
2207 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002208 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002209 .needs_tvaudio = 0,
2210 .no_msp34xx = 1,
2211 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002212 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002213 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002214 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002216 [BTTV_BOARD_VD009X1_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002217 /* M.Klahr@phytec.de */
2218 .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
2219 .video_inputs = 4,
2220 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002221 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002222 .svhs = 3,
2223 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002224 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002225 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002226 .needs_tvaudio = 1,
2227 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002228 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002230 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002232 [BTTV_BOARD_VD009X1_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002233 .name = "PHYTEC VD-009-X1 Combi (bt878)",
2234 .video_inputs = 4,
2235 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002236 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002237 .svhs = 3,
2238 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002239 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002240 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002241 .needs_tvaudio = 1,
2242 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002243 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002245 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002246 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002247
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002248 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002249 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002250 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2251 .video_inputs = 10,
2252 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002253 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002254 .svhs = 9,
2255 .gpiomask = 0x00,
2256 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2257 via the upper nibble of muxsel. here: used for
2258 xternal video-mux */
2259 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002260 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002261 .needs_tvaudio = 1,
2262 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002263 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002265 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002266 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002267 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002268 .name = "PHYTEC VD-009 Combi (bt878)",
2269 .video_inputs = 10,
2270 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002271 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002272 .svhs = 9,
2273 .gpiomask = 0x00,
2274 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2275 via the upper nibble of muxsel. here: used for
2276 xternal video-mux */
2277 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002278 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002279 .needs_tvaudio = 1,
2280 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002281 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002282 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002283 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002284 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002285 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002286 .name = "IVC-100",
2287 .video_inputs = 4,
2288 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002289 .tuner = UNSET,
2290 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002291 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002292 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002293 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002294 .gpiomask = 0xdf,
2295 .muxsel = { 2, 3, 1, 0 },
2296 .pll = PLL_28,
2297 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002298 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002299 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2300 .name = "IVC-120G",
2301 .video_inputs = 16,
2302 .audio_inputs = 0, /* card has no audio */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002303 .tuner = UNSET, /* card has no tuner */
2304 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002305 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002306 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002307 .svhs = UNSET, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .needs_tvaudio = 0,
2309 .no_msp34xx = 1,
2310 .no_tda9875 = 1,
2311 .no_tda7432 = 1,
2312 .gpiomask = 0x00,
2313 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2314 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2315 .muxsel_hook = ivc120_muxsel,
2316 .pll = PLL_28,
2317 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002318
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002319 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002320 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002321 .name = "pcHDTV HD-2000 TV",
2322 .video_inputs = 4,
2323 .audio_inputs = 1,
2324 .tuner = 0,
2325 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002326 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002327 .tuner_type = TUNER_PHILIPS_ATSC,
2328 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002329 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002330 .has_dvb = 1,
2331 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002332 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002333 .name = "Twinhan DST + clones",
2334 .no_msp34xx = 1,
2335 .no_tda9875 = 1,
2336 .no_tda7432 = 1,
2337 .tuner_type = TUNER_ABSENT,
2338 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002339 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002340 .no_video = 1,
2341 .has_dvb = 1,
2342 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002343 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002344 .name = "Winfast VC100",
2345 .video_inputs = 3,
2346 .audio_inputs = 0,
2347 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002348 .tuner = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002349 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002350 .no_msp34xx = 1,
2351 .no_tda9875 = 1,
2352 .no_tda7432 = 1,
2353 .tuner_type = TUNER_ABSENT,
2354 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002355 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002356 .pll = PLL_28,
2357 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002358 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002359 .name = "Teppro TEV-560/InterVision IV-560",
2360 .video_inputs = 3,
2361 .audio_inputs = 1,
2362 .tuner = 0,
2363 .svhs = 2,
2364 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002365 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002366 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002367 .needs_tvaudio = 1,
2368 .tuner_type = TUNER_PHILIPS_PAL,
2369 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002370 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002371 .pll = PLL_35,
2372 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002373
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002375 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002376 .name = "SIMUS GVC1100",
2377 .video_inputs = 4,
2378 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002379 .tuner = UNSET,
2380 .svhs = UNSET,
2381 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002383 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002384 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002385 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002386 .gpiomask = 0x3F,
2387 .muxsel_hook = gvc1100_muxsel,
2388 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002389 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002390 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2391 .name = "NGS NGSTV+",
2392 .video_inputs = 3,
2393 .tuner = 0,
2394 .svhs = 2,
2395 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002396 .muxsel = { 2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002397 .gpiomux = { 0, 0, 0, 0 },
2398 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002399 .pll = PLL_28,
2400 .tuner_type = TUNER_PHILIPS_PAL,
2401 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002402 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002403 .has_remote = 1,
2404 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002405 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 /* http://linuxmedialabs.com */
2407 .name = "LMLBT4",
2408 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2409 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002410 .tuner = UNSET,
2411 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002412 .muxsel = { 2, 3, 1, 0 },
2413 .no_msp34xx = 1,
2414 .no_tda9875 = 1,
2415 .no_tda7432 = 1,
2416 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002417 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002418 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002419 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002420 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002421 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002422 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2423 .name = "Tekram M205 PRO",
2424 .video_inputs = 3,
2425 .audio_inputs = 1,
2426 .tuner = 0,
2427 .tuner_type = TUNER_PHILIPS_PAL,
2428 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002429 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002430 .svhs = 2,
2431 .needs_tvaudio = 0,
2432 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002433 .muxsel = { 2, 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002434 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002435 .pll = PLL_28,
2436 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002437
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002438 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002439 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002440 /* Javier Cendan Ares <jcendan@lycos.es> */
2441 /* bt878 TV + FM without subsystem ID */
2442 .name = "Conceptronic CONTVFMi",
2443 .video_inputs = 3,
2444 .audio_inputs = 1,
2445 .tuner = 0,
2446 .svhs = 2,
2447 .gpiomask = 0x008007,
2448 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002449 .gpiomux = { 0, 1, 2, 2 },
2450 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002451 .needs_tvaudio = 0,
2452 .pll = PLL_28,
2453 .tuner_type = TUNER_PHILIPS_PAL,
2454 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002455 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002456 .has_remote = 1,
2457 .has_radio = 1,
2458 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002459 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002460 /*Eric DEBIEF <debief@telemsa.com>*/
2461 /*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 -08002462 /* 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 -08002463 /*0x79 in bttv.h*/
2464 .name = "Euresys Picolo Tetra",
2465 .video_inputs = 4,
2466 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002467 .tuner = UNSET,
2468 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002469 .gpiomask = 0,
2470 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2471 .no_msp34xx = 1,
2472 .no_tda9875 = 1,
2473 .no_tda7432 = 1,
2474 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002475 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002476 .pll = PLL_28,
2477 .needs_tvaudio = 0,
2478 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002479 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002480 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002481 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002482 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002483 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002484 /* Spirit TV Tuner from http://spiritmodems.com.au */
2485 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2486 .name = "Spirit TV Tuner",
2487 .video_inputs = 3,
2488 .audio_inputs = 1,
2489 .tuner = 0,
2490 .svhs = 2,
2491 .gpiomask = 0x0000000f,
2492 .muxsel = { 2, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002493 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002494 .tuner_type = TUNER_TEMIC_PAL,
2495 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002496 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002497 .no_msp34xx = 1,
2498 .no_tda9875 = 1,
2499 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002500 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002501 /* Wolfram Joost <wojo@frokaschwei.de> */
2502 .name = "AVerMedia AVerTV DVB-T 771",
2503 .video_inputs = 2,
2504 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002505 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002506 .tuner_type = TUNER_ABSENT,
2507 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002508 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002509 .muxsel = { 3 , 3 },
2510 .no_msp34xx = 1,
2511 .no_tda9875 = 1,
2512 .no_tda7432 = 1,
2513 .pll = PLL_28,
2514 .has_dvb = 1,
2515 .no_gpioirq = 1,
2516 .has_remote = 1,
2517 },
2518 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002519 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002520 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002521 /* 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 -08002522 .name = "AverMedia AverTV DVB-T 761",
2523 .video_inputs = 2,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002524 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002525 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002526 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002527 .no_msp34xx = 1,
2528 .no_tda9875 = 1,
2529 .no_tda7432 = 1,
2530 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002531 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002532 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002533 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002534 .has_dvb = 1,
2535 .no_gpioirq = 1,
2536 .has_remote = 1,
2537 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002538 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002539 /* andre.schwarz@matrix-vision.de */
2540 .name = "MATRIX Vision Sigma-SQ",
2541 .video_inputs = 16,
2542 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002543 .tuner = UNSET,
2544 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002545 .gpiomask = 0x0,
2546 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2547 3, 3, 3, 3, 3, 3, 3, 3 },
2548 .muxsel_hook = sigmaSQ_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002549 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002550 .no_msp34xx = 1,
2551 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002552 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002553 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002554 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002555 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002556 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002557 /* andre.schwarz@matrix-vision.de */
2558 .name = "MATRIX Vision Sigma-SLC",
2559 .video_inputs = 4,
2560 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002561 .tuner = UNSET,
2562 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002563 .gpiomask = 0x0,
2564 .muxsel = { 2, 2, 2, 2 },
2565 .muxsel_hook = sigmaSLC_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002566 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002567 .no_msp34xx = 1,
2568 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002569 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002570 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002571 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002572 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002573 /* BTTV_BOARD_APAC_VIEWCOMP */
2574 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002575 /* Attila Kondoros <attila.kondoros@chello.hu> */
2576 /* bt878 TV + FM 0x00000000 subsystem ID */
2577 .name = "APAC Viewcomp 878(AMAX)",
2578 .video_inputs = 2,
2579 .audio_inputs = 1,
2580 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002581 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002582 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002583 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002584 .gpiomux = { 2, 0, 0, 0 },
2585 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002586 .needs_tvaudio = 0,
2587 .pll = PLL_28,
2588 .tuner_type = TUNER_PHILIPS_PAL,
2589 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002590 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002591 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2592 .has_radio = 1, /* not every card has radio */
2593 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002594
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002595 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002596 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002597 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2598 .name = "DViCO FusionHDTV DVB-T Lite",
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002599 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002600 .no_msp34xx = 1,
2601 .no_tda9875 = 1,
2602 .no_tda7432 = 1,
2603 .pll = PLL_28,
2604 .no_video = 1,
2605 .has_dvb = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002606 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002607 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002608 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002609 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002610 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002611 /* Steven <photon38@pchome.com.tw> */
2612 .name = "V-Gear MyVCD",
2613 .video_inputs = 3,
2614 .audio_inputs = 1,
2615 .tuner = 0,
2616 .svhs = 2,
2617 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002618 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002619 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2620 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002621 .no_msp34xx = 1,
2622 .pll = PLL_28,
2623 .tuner_type = TUNER_PHILIPS_NTSC_M,
2624 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002625 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002626 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002627 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002628 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002629 /* Rick C <cryptdragoon@gmail.com> */
2630 .name = "Super TV Tuner",
2631 .video_inputs = 4,
2632 .audio_inputs = 1,
2633 .tuner = 0,
2634 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002635 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002636 .tuner_type = TUNER_PHILIPS_NTSC,
2637 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002638 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002639 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002640 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002641 .needs_tvaudio = 1,
2642 .has_radio = 1,
2643 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002644 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002645 /* Chris Fanning <video4linux@haydon.net> */
2646 .name = "Tibet Systems 'Progress DVR' CS16",
2647 .video_inputs = 16,
2648 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002649 .tuner = UNSET,
2650 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002651 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2652 .pll = PLL_28,
2653 .no_msp34xx = 1,
2654 .no_tda9875 = 1,
2655 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002656 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002657 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002658 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002659 .muxsel_hook = tibetCS16_muxsel,
2660 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002661 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002662 /* Bill Brack <wbrack@mmm.com.hk> */
2663 /*
2664 * Note that, because of the card's wiring, the "master"
2665 * BT878A chip (i.e. the one which controls the analog switch
2666 * and must use this card type) is the 2nd one detected. The
2667 * other 3 chips should use card type 0x85, whose description
2668 * follows this one. There is a EEPROM on the card (which is
2669 * connected to the I2C of one of those other chips), but is
2670 * not currently handled. There is also a facility for a
2671 * "monitor", which is also not currently implemented.
2672 */
2673 .name = "Kodicom 4400R (master)",
2674 .video_inputs = 16,
2675 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002676 .tuner = UNSET,
2677 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002678 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002679 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002680 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002681 /* GPIO bits 0-9 used for analog switch:
2682 * 00 - 03: camera selector
2683 * 04 - 06: channel (controller) selector
2684 * 07: data (1->on, 0->off)
2685 * 08: strobe
2686 * 09: reset
2687 * bit 16 is input from sync separator for the channel
2688 */
2689 .gpiomask = 0x0003ff,
2690 .no_gpioirq = 1,
2691 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2692 .pll = PLL_28,
2693 .no_msp34xx = 1,
2694 .no_tda7432 = 1,
2695 .no_tda9875 = 1,
2696 .muxsel_hook = kodicom4400r_muxsel,
2697 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002698 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002699 /* Bill Brack <wbrack@mmm.com.hk> */
2700 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2701 * one which controls the analog switch, and must use the card type)
2702 * is the 2nd one detected. The other 3 chips should use this card
2703 * type
2704 */
2705 .name = "Kodicom 4400R (slave)",
2706 .video_inputs = 16,
2707 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002708 .tuner = UNSET,
2709 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002710 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002711 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002712 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002713 .gpiomask = 0x010000,
2714 .no_gpioirq = 1,
2715 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2716 .pll = PLL_28,
2717 .no_msp34xx = 1,
2718 .no_tda7432 = 1,
2719 .no_tda9875 = 1,
2720 .muxsel_hook = kodicom4400r_muxsel,
2721 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002722 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002723 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002724 /* Michael Henson <mhenson@clarityvi.com> */
2725 /* Adlink RTV24 with special unlock codes */
2726 .name = "Adlink RTV24",
2727 .video_inputs = 4,
2728 .audio_inputs = 1,
2729 .tuner = 0,
2730 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002731 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002732 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002733 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002734 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002735 .pll = PLL_28,
2736 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002737 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002738 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002739 /* Michael Krufky <mkrufky@m1k.net> */
2740 .name = "DViCO FusionHDTV 5 Lite",
2741 .tuner = 0,
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002742 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002743 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002744 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002745 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002746 .audio_inputs = 1,
2747 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002748 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002749 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002750 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2751 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002752 .no_msp34xx = 1,
2753 .no_tda9875 = 1,
2754 .no_tda7432 = 1,
2755 .has_dvb = 1,
2756 },
2757 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002758 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002759 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002760 .name = "Acorp Y878F",
2761 .video_inputs = 3,
2762 .audio_inputs = 1,
2763 .tuner = 0,
2764 .svhs = 2,
2765 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002766 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002767 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2768 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002769 .needs_tvaudio = 1,
2770 .pll = PLL_28,
2771 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2772 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002773 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002774 .has_radio = 1,
2775 },
2776 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002777 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002778 .name = "Conceptronic CTVFMi v2",
2779 .video_inputs = 3,
2780 .audio_inputs = 1,
2781 .tuner = 0,
2782 .svhs = 2,
2783 .gpiomask = 0x001c0007,
2784 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002785 .gpiomux = { 0, 1, 2, 2 },
2786 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002787 .needs_tvaudio = 0,
2788 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002789 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002790 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002791 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002792 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002793 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002794 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002795 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002796 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002797 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2798 .video_inputs = 5,
2799 .audio_inputs = 1,
2800 .tuner = 0,
2801 .svhs = 3,
2802 .gpiomask = 0x01fe00,
2803 .muxsel = { 2,3,1,1,-1 },
2804 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002805 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2806 .gpiomute = 0x12400,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002807 .no_msp34xx = 1,
2808 .pll = PLL_28,
2809 .tuner_type = TUNER_LG_PAL_FM,
2810 .tuner_addr = ADDR_UNSET,
2811 .radio_addr = ADDR_UNSET,
2812 .has_remote = 1,
2813 },
2814 /* ---- card 0x8b ---------------------------------- */
2815 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002816 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002817 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2818 .video_inputs = 3,
2819 .audio_inputs = 1,
2820 .tuner = 0,
2821 .svhs = 2,
2822 .gpiomask = 0x3f,
2823 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002824 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2825 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002826 .no_msp34xx = 1,
2827 .pll = PLL_28,
2828 .tuner_type = TUNER_YMEC_TVF_5533MF,
2829 .tuner_addr = ADDR_UNSET,
2830 .radio_addr = ADDR_UNSET,
2831 .has_radio = 1,
2832 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002833 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002834 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002835 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2836 one external BNC composite input (mux 2)
2837 three internal composite inputs (unknown muxes)
2838 an 18-bit stereo A/D (CS5331A), which has:
2839 one external stereo unblanced (RCA) audio connection
2840 one (or 3?) internal stereo balanced (XLR) audio connection
2841 input is selected via gpio to a 14052B mux
2842 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2843 gain is controlled via an X9221A chip on the I2C bus @0x28
2844 sample rate is controlled via gpio to an MK1413S
2845 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2846 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002847 [BTTV_BOARD_OSPREY440] = {
2848 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002849 .video_inputs = 4,
2850 .audio_inputs = 2, /* this is meaningless */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002851 .tuner = UNSET,
Trent Piephocf784d52007-07-21 21:26:40 -03002852 .svhs = UNSET,
2853 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2854 .gpiomask = 0x303,
2855 .gpiomute = 0x000, /* int + 32kHz */
2856 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002857 .pll = PLL_28,
2858 .tuner_type = UNSET,
2859 .tuner_addr = ADDR_UNSET,
2860 .radio_addr = ADDR_UNSET,
2861 .no_msp34xx = 1,
2862 .no_tda9875 = 1,
2863 .no_tda7432 = 1,
2864 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002865 /* ---- card 0x8d ---------------------------------- */
2866 [BTTV_BOARD_ASOUND_SKYEYE] = {
2867 .name = "Asound Skyeye PCTV",
2868 .video_inputs = 3,
2869 .audio_inputs = 1,
2870 .tuner = 0,
2871 .svhs = 2,
2872 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002873 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002874 .gpiomux = { 2, 0, 0, 0 },
2875 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002876 .needs_tvaudio = 1,
2877 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002878 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002879 .tuner_addr = ADDR_UNSET,
2880 .radio_addr = ADDR_UNSET,
2881 },
Bill Pechter633323f2005-11-13 16:07:50 -08002882 /* ---- card 0x8e ---------------------------------- */
2883 [BTTV_BOARD_SABRENT_TVFM] = {
2884 .name = "Sabrent TV-FM (bttv version)",
2885 .video_inputs = 3,
2886 .audio_inputs = 1,
2887 .tuner = 0,
2888 .svhs = 2,
2889 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002890 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002891 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002892 .no_msp34xx = 1,
2893 .no_tda9875 = 1,
2894 .no_tda7432 = 1,
2895 .pll = PLL_28,
2896 .tuner_type = TUNER_TNF_5335MF,
2897 .tuner_addr = ADDR_UNSET,
2898 .has_radio = 1,
2899 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002900 /* ---- card 0x8f ---------------------------------- */
2901 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2902 .name = "Hauppauge ImpactVCB (bt878)",
2903 .video_inputs = 4,
2904 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002905 .tuner = UNSET,
2906 .svhs = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002907 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002908 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002909 .no_msp34xx = 1,
2910 .no_tda9875 = 1,
2911 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002912 .tuner_type = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002913 .tuner_addr = ADDR_UNSET,
2914 .radio_addr = ADDR_UNSET,
2915 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002916 [BTTV_BOARD_MACHTV_MAGICTV] = {
2917 /* Julian Calaby <julian.calaby@gmail.com>
2918 * Slightly different from original MachTV definition (0x60)
2919
2920 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2921 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2922 * properly (methinks) causing no keyup bits being set */
2923
2924 .name = "MagicTV", /* rebranded MachTV */
2925 .video_inputs = 3,
2926 .audio_inputs = 1,
2927 .tuner = 0,
2928 .svhs = 2,
2929 .gpiomask = 7,
2930 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002931 .gpiomux = { 0, 1, 2, 3 },
2932 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002933 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2934 .tuner_addr = ADDR_UNSET,
2935 .radio_addr = ADDR_UNSET,
2936 .pll = PLL_28,
2937 .has_radio = 1,
2938 .has_remote = 1,
2939 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002940 [BTTV_BOARD_SSAI_SECURITY] = {
2941 .name = "SSAI Security Video Interface",
2942 .video_inputs = 4,
2943 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002944 .tuner = UNSET,
2945 .svhs = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002946 .muxsel = { 0, 1, 2, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002947 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002948 .tuner_addr = ADDR_UNSET,
2949 .radio_addr = ADDR_UNSET,
2950 },
2951 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2952 .name = "SSAI Ultrasound Video Interface",
2953 .video_inputs = 2,
2954 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002955 .tuner = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002956 .svhs = 1,
2957 .muxsel = { 2, 0, 1, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002958 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002959 .tuner_addr = ADDR_UNSET,
2960 .radio_addr = ADDR_UNSET,
2961 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002962 /* ---- card 0x94---------------------------------- */
2963 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2964 .name = "DViCO FusionHDTV 2",
2965 .tuner = 0,
2966 .tuner_type = TUNER_PHILIPS_ATSC, /* FCV1236D */
2967 .tuner_addr = ADDR_UNSET,
2968 .radio_addr = ADDR_UNSET,
2969 .video_inputs = 3,
2970 .audio_inputs = 1,
2971 .svhs = 2,
2972 .muxsel = { 2, 3, 1 },
2973 .gpiomask = 0x00e00007,
2974 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2975 .gpiomute = 0x00c00007,
2976 .no_msp34xx = 1,
2977 .no_tda9875 = 1,
2978 .no_tda7432 = 1,
2979 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002980 /* ---- card 0x95---------------------------------- */
2981 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2982 .name = "Typhoon TV-Tuner PCI (50684)",
2983 .video_inputs = 3,
2984 .audio_inputs = 1,
2985 .tuner = 0,
2986 .svhs = 2,
2987 .gpiomask = 0x3014f,
2988 .muxsel = { 2, 3, 1, 1 },
2989 .gpiomux = { 0x20001,0x10001, 0, 0 },
2990 .gpiomute = 10,
2991 .needs_tvaudio = 1,
2992 .pll = PLL_28,
2993 .tuner_type = TUNER_PHILIPS_PAL_I,
2994 .tuner_addr = ADDR_UNSET,
2995 .radio_addr = ADDR_UNSET,
2996 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002997};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002998
2999static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
3000
3001/* ----------------------------------------------------------------------- */
3002
3003static unsigned char eeprom_data[256];
3004
3005/*
3006 * identify card
3007 */
3008void __devinit bttv_idcard(struct bttv *btv)
3009{
3010 unsigned int gpiobits;
3011 int i,type;
3012 unsigned short tmp;
3013
3014 /* read PCI subsystem ID */
3015 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3016 btv->cardid = tmp << 16;
3017 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3018 btv->cardid |= tmp;
3019
3020 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3021 /* look for the card */
3022 for (type = -1, i = 0; cards[i].id != 0; i++)
3023 if (cards[i].id == btv->cardid)
3024 type = i;
3025
3026 if (type != -1) {
3027 /* found it */
3028 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3029 "PCI subsystem ID is %04x:%04x\n",
3030 btv->c.nr,cards[type].name,cards[type].cardnr,
3031 btv->cardid & 0xffff,
3032 (btv->cardid >> 16) & 0xffff);
3033 btv->c.type = cards[type].cardnr;
3034 } else {
3035 /* 404 */
3036 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3037 btv->c.nr, btv->cardid & 0xffff,
3038 (btv->cardid >> 16) & 0xffff);
3039 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08003040 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003041 }
3042 }
3043
3044 /* let the user override the autodetected type */
3045 if (card[btv->c.nr] < bttv_num_tvcards)
3046 btv->c.type=card[btv->c.nr];
3047
3048 /* print which card config we are using */
3049 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3050 bttv_tvcards[btv->c.type].name, btv->c.type,
3051 card[btv->c.nr] < bttv_num_tvcards
3052 ? "insmod option" : "autodetected");
3053
3054 /* overwrite gpio stuff ?? */
3055 if (UNSET == audioall && UNSET == audiomux[0])
3056 return;
3057
3058 if (UNSET != audiomux[0]) {
3059 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003060 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003061 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003062 gpiobits |= audiomux[i];
3063 }
3064 } else {
3065 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003066 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003067 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003068 }
3069 }
3070 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3071 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3072 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003073 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003074 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003075 }
3076 printk("\n");
3077}
3078
3079/*
3080 * (most) board specific initialisations goes here
3081 */
3082
3083/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08003084static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003085{
3086 int type = -1;
3087
3088 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003089 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003090 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003091 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003092 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003093 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003094
3095 if (-1 != type) {
3096 btv->c.type = type;
3097 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3098 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3099 }
3100}
3101
3102static void flyvideo_gpio(struct bttv *btv)
3103{
3104 int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003105 int tuner=UNSET,ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003106
3107 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003108 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003109 gpio = gpio_read();
3110 /* FIXME: must restore OUR_EN ??? */
3111
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003112 /* all cards provide GPIO info, some have an additional eeprom
3113 * LR50: GPIO coding can be found lower right CP1 .. CP9
3114 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3115 * GPIO14-12: n.c.
3116 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003117
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003118 * lowest 3 bytes are remote control codes (no handshake needed)
3119 * xxxFFF: No remote control chip soldered
3120 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3121 * Note: Some bits are Audio_Mask !
3122 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003123 ttype=(gpio&0x0f0000)>>16;
3124 switch(ttype) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003125 case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003126 break;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003127 case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003128 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003129 case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003130 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003131 case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003132 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003133 case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003134 break;
3135 default:
3136 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3137 }
3138
3139 has_remote = gpio & 0x800000;
3140 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003141 /* unknown 0x200000;
3142 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003143 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003144 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003145 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3146 /*
3147 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003148
3149 if(is_capture_only)
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003150 tuner = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003151
3152 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3153 btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
3154 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3155 btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
3156 is_capture_only?"yes":"no ");
3157
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003158 if (tuner != UNSET) /* only set if known tuner autodetected, else let insmod option through */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003159 btv->tuner_type = tuner;
3160 btv->has_radio = has_radio;
3161
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003162 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3163 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3164 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003165 if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
3166 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003167}
3168
3169static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3170 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3171static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3172 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3173
3174static void miro_pinnacle_gpio(struct bttv *btv)
3175{
3176 int id,msp,gpio;
3177 char *info;
3178
3179 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003180 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003181 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003182 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003183 if (id < 32) {
3184 btv->tuner_type = miro_tunermap[id];
3185 if (0 == (gpio & 0x20)) {
3186 btv->has_radio = 1;
3187 if (!miro_fmtuner[id]) {
3188 btv->has_matchbox = 1;
3189 btv->mbox_we = (1<<6);
3190 btv->mbox_most = (1<<7);
3191 btv->mbox_clk = (1<<8);
3192 btv->mbox_data = (1<<9);
3193 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3194 }
3195 } else {
3196 btv->has_radio = 0;
3197 }
3198 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003199 if (btv->c.type == BTTV_BOARD_MIRO)
3200 btv->c.type = BTTV_BOARD_MIROPRO;
3201 if (btv->c.type == BTTV_BOARD_PINNACLE)
3202 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003203 }
3204 printk(KERN_INFO
3205 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3206 btv->c.nr, id+1, btv->tuner_type,
3207 !btv->has_radio ? "no" :
3208 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3209 (-1 == msp) ? "no" : "yes");
3210 } else {
3211 /* new cards with microtune tuner */
3212 id = 63 - id;
3213 btv->has_radio = 0;
3214 switch (id) {
3215 case 1:
3216 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003217 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003218 break;
3219 case 2:
3220 info = "PAL+SECAM / stereo";
3221 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003222 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003223 break;
3224 case 3:
3225 info = "NTSC / stereo";
3226 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003227 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003228 break;
3229 case 4:
3230 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003231 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003232 break;
3233 case 5:
3234 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003235 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003236 break;
3237 case 6:
3238 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003239 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003240 break;
3241 case 7:
3242 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003243 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003244 break;
3245 default:
3246 info = "oops: unknown card";
3247 break;
3248 }
3249 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003250 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003251 printk(KERN_INFO
3252 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3253 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003254 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003255 }
3256}
3257
3258/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3259#define LM1882_SYNC_DRIVE 0x200000L
3260
3261static void init_ids_eagle(struct bttv *btv)
3262{
3263 gpio_inout(0xffffff,0xFFFF37);
3264 gpio_write(0x200020);
3265
3266 /* flash strobe inverter ?! */
3267 gpio_write(0x200024);
3268
3269 /* switch sync drive off */
3270 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3271
3272 /* set BT848 muxel to 2 */
3273 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3274}
3275
3276/* Muxsel helper for the IDS Eagle.
3277 * the eagles does not use the standard muxsel-bits but
3278 * has its own multiplexer */
3279static void eagle_muxsel(struct bttv *btv, unsigned int input)
3280{
3281 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3282 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3283
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003284 /* composite */
3285 /* set chroma ADC to sleep */
3286 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3287 /* set to composite video */
3288 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3289 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003290
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003291 /* switch sync drive off */
3292 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003293}
3294
3295static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3296{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003297 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298 gpio_write(masks[input%4]);
3299}
3300
3301/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3302 alarms output
3303
3304 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3305 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3306
3307 IN - sensor inputs, INx - sensor inputs and TI XORed together
3308 O1,O2,O3 - alarm outputs (relays)
3309
3310 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3311
3312*/
3313
3314static void init_lmlbt4x(struct bttv *btv)
3315{
3316 printk(KERN_DEBUG "LMLBT4x init\n");
3317 btwrite(0x000000, BT848_GPIO_REG_INP);
3318 gpio_inout(0xffffff, 0x0006C0);
3319 gpio_write(0x000000);
3320}
3321
3322static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3323{
3324 unsigned int inmux = input % 8;
3325 gpio_inout( 0xf, 0xf );
3326 gpio_bits( 0xf, inmux );
3327}
3328
3329static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3330{
3331 unsigned int inmux = input % 4;
3332 gpio_inout( 3<<9, 3<<9 );
3333 gpio_bits( 3<<9, inmux<<9 );
3334}
3335
3336/* ----------------------------------------------------------------------- */
3337
3338static void bttv_reset_audio(struct bttv *btv)
3339{
3340 /*
3341 * BT878A has a audio-reset register.
3342 * 1. This register is an audio reset function but it is in
3343 * function-0 (video capture) address space.
3344 * 2. It is enough to do this once per power-up of the card.
3345 * 3. There is a typo in the Conexant doc -- it is not at
3346 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3347 * --//Shrikumar 030609
3348 */
3349 if (btv->id != 878)
3350 return;
3351
3352 if (bttv_debug)
3353 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3354 btwrite((1<<7), 0x058);
3355 udelay(10);
3356 btwrite( 0, 0x058);
3357}
3358
3359/* initialization part one -- before registering i2c bus */
3360void __devinit bttv_init_card1(struct bttv *btv)
3361{
3362 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003363 case BTTV_BOARD_HAUPPAUGE:
3364 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003365 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003366 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003367 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003368 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003369 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003370 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003371 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003372 boot_msp34xx(btv,11);
3373 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003374 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003375 pvr_boot(btv);
3376 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003377 case BTTV_BOARD_TWINHAN_DST:
3378 case BTTV_BOARD_AVDVBT_771:
3379 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003380 btv->use_i2c_hw = 1;
3381 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003382 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003383 init_RTV24( btv );
3384 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003385
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 }
3387 if (!bttv_tvcards[btv->c.type].has_dvb)
3388 bttv_reset_audio(btv);
3389}
3390
3391/* initialization part two -- after registering i2c bus */
3392void __devinit bttv_init_card2(struct bttv *btv)
3393{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003394 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003395
Trent Piephoac7dc842007-06-28 17:51:08 -03003396 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003397
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003398 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003399 bttv_readee(btv,eeprom_data,0xa0);
3400 identify_by_eeprom(btv,eeprom_data);
3401 }
3402
3403 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003404 case BTTV_BOARD_MIRO:
3405 case BTTV_BOARD_MIROPRO:
3406 case BTTV_BOARD_PINNACLE:
3407 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003408 /* miro/pinnacle */
3409 miro_pinnacle_gpio(btv);
3410 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003411 case BTTV_BOARD_FLYVIDEO_98:
3412 case BTTV_BOARD_MAXI:
3413 case BTTV_BOARD_LIFE_FLYKIT:
3414 case BTTV_BOARD_FLYVIDEO:
3415 case BTTV_BOARD_TYPHOON_TVIEW:
3416 case BTTV_BOARD_CHRONOS_VS2:
3417 case BTTV_BOARD_FLYVIDEO_98FM:
3418 case BTTV_BOARD_FLYVIDEO2000:
3419 case BTTV_BOARD_FLYVIDEO98EZ:
3420 case BTTV_BOARD_CONFERENCETV:
3421 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003422 flyvideo_gpio(btv);
3423 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003424 case BTTV_BOARD_HAUPPAUGE:
3425 case BTTV_BOARD_HAUPPAUGE878:
3426 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 /* pick up some config infos from the eeprom */
3428 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003429 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003430 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003431 case BTTV_BOARD_AVERMEDIA98:
3432 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003433 bttv_readee(btv,eeprom_data,0xa0);
3434 avermedia_eeprom(btv);
3435 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003436 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003437 init_PXC200(btv);
3438 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003439 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003440 picolo_tetra_init(btv);
3441 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003442 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003443 btv->has_radio = 1;
3444 btv->has_matchbox = 1;
3445 btv->mbox_we = 0x20;
3446 btv->mbox_most = 0;
3447 btv->mbox_clk = 0x08;
3448 btv->mbox_data = 0x10;
3449 btv->mbox_mask = 0x38;
3450 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003451 case BTTV_BOARD_VOBIS_BOOSTAR:
3452 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003453 terratec_active_radio_upgrade(btv);
3454 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003455 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003456 if (btv->cardid == 0x3002144f) {
3457 btv->has_radio=1;
3458 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3459 }
3460 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003461 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003462 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003463 /* Fix up entry for 3DFX VoodooTV 100,
3464 which is an OEM STB card variant. */
3465 btv->has_radio=0;
3466 btv->tuner_type=TUNER_TEMIC_NTSC;
3467 }
3468 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003469 case BTTV_BOARD_OSPREY1x0:
3470 case BTTV_BOARD_OSPREY1x0_848:
3471 case BTTV_BOARD_OSPREY101_848:
3472 case BTTV_BOARD_OSPREY1x1:
3473 case BTTV_BOARD_OSPREY1x1_SVID:
3474 case BTTV_BOARD_OSPREY2xx:
3475 case BTTV_BOARD_OSPREY2x0_SVID:
3476 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003477 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003478 case BTTV_BOARD_OSPREY500:
3479 case BTTV_BOARD_OSPREY540:
3480 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003481 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003482 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003483 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003484 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003485 init_ids_eagle(btv);
3486 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003487 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003488 bttv_readee(btv,eeprom_data,0xa0);
3489 modtec_eeprom(btv);
3490 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003491 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003492 init_lmlbt4x(btv);
3493 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003494 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003495 tibetCS16_init(btv);
3496 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003497 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003498 kodicom4400r_init(btv);
3499 break;
3500 }
3501
3502 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003503 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003504 /* defaults from card list */
3505 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3506 btv->pll.pll_ifreq=28636363;
3507 btv->pll.pll_crystal=BT848_IFORM_XT0;
3508 }
3509 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3510 btv->pll.pll_ifreq=35468950;
3511 btv->pll.pll_crystal=BT848_IFORM_XT1;
3512 }
3513 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003514 switch (pll[btv->c.nr]) {
3515 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003516 btv->pll.pll_crystal = 0;
3517 btv->pll.pll_ifreq = 0;
3518 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003519 break;
3520 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003521 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003522 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003523 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003524 btv->pll.pll_crystal = BT848_IFORM_XT0;
3525 break;
3526 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003527 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003528 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003529 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003530 btv->pll.pll_crystal = BT848_IFORM_XT1;
3531 break;
3532 }
3533 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003534 btv->pll.pll_current = -1;
3535
Linus Torvalds1da177e2005-04-16 15:20:36 -07003536 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003537 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3538 addr = bttv_tvcards[btv->c.type].tuner_addr;
3539
3540 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003541 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003542 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003543 if (UNSET != tuner[btv->c.nr])
3544 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003545
3546 if (btv->tuner_type == TUNER_ABSENT ||
3547 bttv_tvcards[btv->c.type].tuner == UNSET)
3548 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3549 else if(btv->tuner_type == UNSET)
3550 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3551 else
3552 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3553 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003554
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003555 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003556 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003557
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003558 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003559 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003560 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003561
3562 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3563 }
3564
Hans Verkuil39e8f402006-01-09 15:25:16 -02003565 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003566 struct v4l2_priv_tun_config tda9887_cfg;
3567
3568 tda9887_cfg.tuner = TUNER_TDA9887;
3569 tda9887_cfg.priv = &btv->tda9887_conf;
3570
3571 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003572 }
3573
Linus Torvalds1da177e2005-04-16 15:20:36 -07003574 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3575 if (svhs[btv->c.nr] != UNSET)
3576 btv->svhs = svhs[btv->c.nr];
3577 if (remote[btv->c.nr] != UNSET)
3578 btv->has_remote = remote[btv->c.nr];
3579
3580 if (bttv_tvcards[btv->c.type].has_radio)
3581 btv->has_radio=1;
3582 if (bttv_tvcards[btv->c.type].has_remote)
3583 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003584 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3585 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003586 if (bttv_tvcards[btv->c.type].volume_gpio)
3587 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3588 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3589 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003590
3591 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3592 /* detect Bt832 chip for quartzsight digital camera */
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003593 if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
3594 (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
Linus Torvalds1da177e2005-04-16 15:20:36 -07003595 boot_bt832(btv);
3596 }
3597
3598 if (!autoload)
3599 return;
3600
Trent Piephoac7dc842007-06-28 17:51:08 -03003601 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3602 return; /* no tuner or related drivers to load */
3603
Linus Torvalds1da177e2005-04-16 15:20:36 -07003604 /* try to detect audio/fader chips */
3605 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003606 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003607 request_module("msp3400");
3608
3609 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003610 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003611 request_module("msp3400");
3612
3613 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003614 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003615 request_module("tda9875");
3616
3617 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003618 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003619 request_module("tda7432");
3620
3621 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3622 request_module("tvaudio");
3623
Trent Piephoac7dc842007-06-28 17:51:08 -03003624 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003625 request_module("tuner");
3626}
3627
3628
3629/* ----------------------------------------------------------------------- */
3630
3631static void modtec_eeprom(struct bttv *btv)
3632{
3633 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3634 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3635 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3636 btv->c.nr,&eeprom_data[0x1e]);
3637 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3638 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3639 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003640 btv->c.nr,&eeprom_data[0x1e]);
3641 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3642 btv->tuner_type=TUNER_PHILIPS_NTSC;
3643 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3644 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003645 } else {
3646 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3647 btv->c.nr,&eeprom_data[0x1e]);
3648 }
3649}
3650
3651static void __devinit hauppauge_eeprom(struct bttv *btv)
3652{
3653 struct tveeprom tv;
3654
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003655 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003656 btv->tuner_type = tv.tuner_type;
3657 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003658
3659 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3660 btv->c.nr, tv.model);
3661
3662 /*
3663 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3664 * type based on model #.
3665 */
3666 if(tv.model == 64900) {
3667 printk("bttv%d: Switching board type from %s to %s\n",
3668 btv->c.nr,
3669 bttv_tvcards[btv->c.type].name,
3670 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3671 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3672 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003673}
3674
3675static int terratec_active_radio_upgrade(struct bttv *btv)
3676{
3677 int freq;
3678
3679 btv->has_radio = 1;
3680 btv->has_matchbox = 1;
3681 btv->mbox_we = 0x10;
3682 btv->mbox_most = 0x20;
3683 btv->mbox_clk = 0x08;
3684 btv->mbox_data = 0x04;
3685 btv->mbox_mask = 0x3c;
3686
3687 btv->mbox_iow = 1 << 8;
3688 btv->mbox_ior = 1 << 9;
3689 btv->mbox_csel = 1 << 10;
3690
3691 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003692 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003693 if (0x1ed8 == tea5757_read(btv)) {
3694 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3695 btv->c.nr);
3696 btv->has_radio = 1;
3697 btv->has_matchbox = 1;
3698 } else {
3699 btv->has_radio = 0;
3700 btv->has_matchbox = 0;
3701 }
3702 return 0;
3703}
3704
3705
3706/* ----------------------------------------------------------------------- */
3707
3708/*
3709 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3710 *
3711 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3712 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3713 * unpacked with unzip).
3714 */
3715#define PVR_GPIO_DELAY 10
3716
3717#define BTTV_ALT_DATA 0x000001
3718#define BTTV_ALT_DCLK 0x100000
3719#define BTTV_ALT_NCONFIG 0x800000
3720
3721static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3722{
3723 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003724 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003725 int i;
3726
3727 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3728 gpio_write(0);
3729 udelay(PVR_GPIO_DELAY);
3730
3731 gpio_write(BTTV_ALT_NCONFIG);
3732 udelay(PVR_GPIO_DELAY);
3733
3734 for (n = 0; n < microlen; n++) {
3735 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003736 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003737 gpio_bits(BTTV_ALT_DCLK,0);
3738 if (bits & 0x01)
3739 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3740 else
3741 gpio_bits(BTTV_ALT_DATA,0);
3742 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3743 bits >>= 1;
3744 }
3745 }
3746 gpio_bits(BTTV_ALT_DCLK,0);
3747 udelay(PVR_GPIO_DELAY);
3748
3749 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3750 for (i = 0 ; i < 30 ; i++) {
3751 gpio_bits(BTTV_ALT_DCLK,0);
3752 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3753 }
3754 gpio_bits(BTTV_ALT_DCLK,0);
3755 return 0;
3756}
3757
3758static int __devinit pvr_boot(struct bttv *btv)
3759{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003760 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003761 int rc;
3762
3763 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3764 if (rc != 0) {
3765 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3766 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003767 return rc;
3768 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003769 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3770 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3771 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003772 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003773 return rc;
3774}
3775
3776/* ----------------------------------------------------------------------- */
3777/* some osprey specific stuff */
3778
Trent Piephocf784d52007-07-21 21:26:40 -03003779static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003780{
Trent Piephocf784d52007-07-21 21:26:40 -03003781 int i;
3782 u32 serial = 0;
3783 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003784
Trent Piephocf784d52007-07-21 21:26:40 -03003785 /* This code will nevery actually get called in this case.... */
3786 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3787 /* this might be an antique... check for MMAC label in eeprom */
3788 if (!strncmp(ee, "MMAC", 4)) {
3789 u8 checksum = 0;
3790 for (i = 0; i < 21; i++)
3791 checksum += ee[i];
3792 if (checksum != ee[21])
3793 return;
3794 cardid = BTTV_BOARD_OSPREY1x0_848;
3795 for (i = 12; i < 21; i++)
3796 serial *= 10, serial += ee[i] - '0';
3797 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003798 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003799 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003800
Trent Piephocf784d52007-07-21 21:26:40 -03003801 for (i = 4*16; i < 8*16; i += 16) {
3802 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003803
Trent Piephocf784d52007-07-21 21:26:40 -03003804 if ((checksum&0xff) + (checksum>>8) == 0xff)
3805 break;
3806 }
3807 if (i >= 8*16)
3808 return;
3809 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003810
Trent Piephocf784d52007-07-21 21:26:40 -03003811 /* found a valid descriptor */
3812 type = be16_to_cpup((u16*)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003813
Trent Piephocf784d52007-07-21 21:26:40 -03003814 switch(type) {
3815 /* 848 based */
3816 case 0x0004:
3817 cardid = BTTV_BOARD_OSPREY1x0_848;
3818 break;
3819 case 0x0005:
3820 cardid = BTTV_BOARD_OSPREY101_848;
3821 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003822
Trent Piephocf784d52007-07-21 21:26:40 -03003823 /* 878 based */
3824 case 0x0012:
3825 case 0x0013:
3826 cardid = BTTV_BOARD_OSPREY1x0;
3827 break;
3828 case 0x0014:
3829 case 0x0015:
3830 cardid = BTTV_BOARD_OSPREY1x1;
3831 break;
3832 case 0x0016:
3833 case 0x0017:
3834 case 0x0020:
3835 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3836 break;
3837 case 0x0018:
3838 case 0x0019:
3839 case 0x001E:
3840 case 0x001F:
3841 cardid = BTTV_BOARD_OSPREY2xx;
3842 break;
3843 case 0x001A:
3844 case 0x001B:
3845 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3846 break;
3847 case 0x0040:
3848 cardid = BTTV_BOARD_OSPREY500;
3849 break;
3850 case 0x0050:
3851 case 0x0056:
3852 cardid = BTTV_BOARD_OSPREY540;
3853 /* bttv_osprey_540_init(btv); */
3854 break;
3855 case 0x0060:
3856 case 0x0070:
3857 case 0x00A0:
3858 cardid = BTTV_BOARD_OSPREY2x0;
3859 /* enable output on select control lines */
3860 gpio_inout(0xffffff,0x000303);
3861 break;
3862 case 0x00D8:
3863 cardid = BTTV_BOARD_OSPREY440;
3864 break;
3865 default:
3866 /* unknown...leave generic, but get serial # */
3867 printk(KERN_INFO "bttv%d: "
3868 "osprey eeprom: unknown card type 0x%04x\n",
3869 btv->c.nr, type);
3870 break;
3871 }
3872 serial = be32_to_cpup((u32*)(ee+6));
3873 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003874
Trent Piephocf784d52007-07-21 21:26:40 -03003875 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3876 btv->c.nr, cardid,
3877 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3878
3879 if (cardid<0 || btv->c.type == cardid)
3880 return;
3881
3882 /* card type isn't set correctly */
3883 if (card[btv->c.nr] < bttv_num_tvcards) {
3884 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3885 "Not overriding user specified card type\n", btv->c.nr);
3886 } else {
3887 printk(KERN_INFO "bttv%d: osprey eeprom: "
3888 "Changing card type from %d to %d\n", btv->c.nr,
3889 btv->c.type, cardid);
3890 btv->c.type = cardid;
3891 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003892}
3893
3894/* ----------------------------------------------------------------------- */
3895/* AVermedia specific stuff, from bktr_card.c */
3896
3897static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003898 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3899 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3900 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3901 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3902 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003903 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003904
3905static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003906 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003907 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3908 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003909 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3910 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003911
3912static void __devinit avermedia_eeprom(struct bttv *btv)
3913{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003914 int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003915
3916 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003917 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3918 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003919 btv->has_remote = (eeprom_data[0x42] & 0x01);
3920
3921 if (tuner_make == 0 || tuner_make == 2)
3922 if(tuner_format <=0x0a)
3923 tuner = tuner_0_table[tuner_format];
3924 if (tuner_make == 1)
3925 if(tuner_format <=9)
3926 tuner = tuner_1_table[tuner_format];
3927
3928 if (tuner_make == 4)
3929 if(tuner_format == 0x09)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003930 tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003931
3932 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3933 btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
3934 if(tuner) {
3935 btv->tuner_type=tuner;
3936 printk("%d",tuner);
3937 } else
3938 printk("Unknown type");
3939 printk(" radio:%s remote control:%s\n",
3940 tuner_tv_fm ? "yes" : "no",
3941 btv->has_remote ? "yes" : "no");
3942}
3943
3944/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3945void bttv_tda9880_setnorm(struct bttv *btv, int norm)
3946{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003947 /* fix up our card entry */
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -03003948 if(norm==V4L2_STD_NTSC) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003949 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
3950 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
Wade Berrier434b2522007-06-25 13:02:16 -03003951 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
3952 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003953 dprintk("bttv_tda9880_setnorm to NTSC\n");
3954 }
3955 else {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003956 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
3957 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
Wade Berrier434b2522007-06-25 13:02:16 -03003958 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
3959 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003960 dprintk("bttv_tda9880_setnorm to PAL\n");
3961 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003962 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003963 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003964 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003965}
3966
3967
3968/*
3969 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003970 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003971 *
3972 * Hauppauge: pin 5
3973 * Voodoo: pin 20
3974 */
3975static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3976{
3977 int mask = (1 << pin);
3978
3979 gpio_inout(mask,mask);
3980 gpio_bits(mask,0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003981 udelay(2500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003982 gpio_bits(mask,mask);
3983
3984 if (bttv_gpio)
3985 bttv_gpio_tracking(btv,"msp34xx");
3986 if (bttv_verbose)
3987 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3988 "init [%d]\n", btv->c.nr, pin);
3989}
3990
3991static void __devinit boot_bt832(struct bttv *btv)
3992{
Linus Torvalds1da177e2005-04-16 15:20:36 -07003993}
3994
3995/* ----------------------------------------------------------------------- */
3996/* Imagenation L-Model PXC200 Framegrabber */
3997/* This is basically the same procedure as
3998 * used by Alessandro Rubini in his pxc200
3999 * driver, but using BTTV functions */
4000
4001static void __devinit init_PXC200(struct bttv *btv)
4002{
4003 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4004 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4005 0x00 };
4006 unsigned int i;
4007 int tmp;
4008 u32 val;
4009
4010 /* Initialise GPIO-connevted stuff */
4011 gpio_inout(0xffffff, (1<<13));
4012 gpio_write(0);
4013 udelay(3);
4014 gpio_write(1<<13);
4015 /* GPIO inputs are pulled up, so no need to drive
4016 * reset pin any longer */
4017 gpio_bits(0xffffff, 0);
4018 if (bttv_gpio)
4019 bttv_gpio_tracking(btv,"pxc200");
4020
4021 /* we could/should try and reset/control the AD pots? but
4022 right now we simply turned off the crushing. Without
4023 this the AGC drifts drifts
4024 remember the EN is reverse logic -->
4025 setting BT848_ADC_AGC_EN disable the AGC
4026 tboult@eecs.lehigh.edu
4027 */
4028
4029 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4030
4031 /* Initialise MAX517 DAC */
4032 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4033 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4034
4035 /* Initialise 12C508 PIC */
4036 /* The I2CWrite and I2CRead commmands are actually to the
4037 * same chips - but the R/W bit is included in the address
4038 * argument so the numbers are different */
4039
4040
4041 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4042
4043 /* First of all, enable the clock line. This is used in the PXC200-F */
4044 val = btread(BT848_GPIO_DMA_CTL);
4045 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4046 btwrite(val, BT848_GPIO_DMA_CTL);
4047
4048 /* Then, push to 0 the reset pin long enough to reset the *
4049 * device same as above for the reset line, but not the same
4050 * value sent to the GPIO-connected stuff
4051 * which one is the good one? */
4052 gpio_inout(0xffffff,(1<<2));
4053 gpio_write(0);
4054 udelay(10);
4055 gpio_write(1<<2);
4056
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004057 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004058 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4059 if (tmp != -1) {
4060 printk(KERN_INFO
4061 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4062 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4063 }
4064 }
4065
4066 printk(KERN_INFO "PXC200 Initialised.\n");
4067}
4068
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004069
4070
Peter Skipworth93b43f12005-06-23 22:04:45 -07004071/* ----------------------------------------------------------------------- */
4072/*
4073 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4074 * it. This apparently involves the following procedure for each 878 chip:
4075 *
4076 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4077 *
4078 * 2) write to GPIO_DATA
4079 * - 0x0E
4080 * - sleep 1ms
4081 * - 0x10 + 0x0E
4082 * - sleep 10ms
4083 * - 0x0E
4084 * read from GPIO_DATA into buf (uint_32)
4085 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4086 * error. ERROR_CPLD_Check_Failed stop.
4087 *
4088 * 3) write to GPIO_DATA
4089 * - write 0x4400 + 0x0E
4090 * - sleep 10ms
4091 * - write 0x4410 + 0x0E
4092 * - sleep 1ms
4093 * - write 0x0E
4094 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004095 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004096 * error. ERROR_CPLD_Check_Failed.
4097 */
4098/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004099static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004100init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004101{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004102 uint32_t dataRead = 0;
4103 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004104
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004105 printk (KERN_INFO
4106 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004107 btv->c.nr);
4108
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004109 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004110
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004111 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4112 msleep (1);
4113 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4114 msleep (10);
4115 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004116
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004117 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004118
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004119 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4120 printk (KERN_INFO
4121 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4122 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004123 }
4124
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004125 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4126 msleep (10);
4127 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4128 msleep (1);
4129 btwrite (watchdog_value, BT848_GPIO_DATA);
4130 msleep (1);
4131 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004132
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004133 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4134 printk (KERN_INFO
4135 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4136 btv->c.nr, dataRead);
4137
Peter Skipworth93b43f12005-06-23 22:04:45 -07004138 return;
4139 }
4140
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004141 printk (KERN_INFO
4142 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004143}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004144
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004145
4146
Linus Torvalds1da177e2005-04-16 15:20:36 -07004147/* ----------------------------------------------------------------------- */
4148/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4149/*
4150 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4151 * This code is placed under the terms of the GNU General Public License
4152 *
4153 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4154 */
4155
4156static void bus_low(struct bttv *btv, int bit)
4157{
4158 if (btv->mbox_ior) {
4159 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4160 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4161 udelay(5);
4162 }
4163
4164 gpio_bits(bit,0);
4165 udelay(5);
4166
4167 if (btv->mbox_ior) {
4168 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4169 udelay(5);
4170 }
4171}
4172
4173static void bus_high(struct bttv *btv, int bit)
4174{
4175 if (btv->mbox_ior) {
4176 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4177 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4178 udelay(5);
4179 }
4180
4181 gpio_bits(bit,bit);
4182 udelay(5);
4183
4184 if (btv->mbox_ior) {
4185 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4186 udelay(5);
4187 }
4188}
4189
4190static int bus_in(struct bttv *btv, int bit)
4191{
4192 if (btv->mbox_ior) {
4193 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4194 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4195 udelay(5);
4196
4197 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4198 udelay(5);
4199 }
4200 return gpio_read() & (bit);
4201}
4202
4203/* TEA5757 register bits */
4204#define TEA_FREQ 0:14
4205#define TEA_BUFFER 15:15
4206
4207#define TEA_SIGNAL_STRENGTH 16:17
4208
4209#define TEA_PORT1 18:18
4210#define TEA_PORT0 19:19
4211
4212#define TEA_BAND 20:21
4213#define TEA_BAND_FM 0
4214#define TEA_BAND_MW 1
4215#define TEA_BAND_LW 2
4216#define TEA_BAND_SW 3
4217
4218#define TEA_MONO 22:22
4219#define TEA_ALLOW_STEREO 0
4220#define TEA_FORCE_MONO 1
4221
4222#define TEA_SEARCH_DIRECTION 23:23
4223#define TEA_SEARCH_DOWN 0
4224#define TEA_SEARCH_UP 1
4225
4226#define TEA_STATUS 24:24
4227#define TEA_STATUS_TUNED 0
4228#define TEA_STATUS_SEARCHING 1
4229
4230/* Low-level stuff */
4231static int tea5757_read(struct bttv *btv)
4232{
4233 unsigned long timeout;
4234 int value = 0;
4235 int i;
4236
4237 /* better safe than sorry */
4238 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4239
4240 if (btv->mbox_ior) {
4241 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4242 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4243 udelay(5);
4244 }
4245
4246 if (bttv_gpio)
4247 bttv_gpio_tracking(btv,"tea5757 read");
4248
4249 bus_low(btv,btv->mbox_we);
4250 bus_low(btv,btv->mbox_clk);
4251
4252 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004253 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004254
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004255 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004256 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4257 schedule();
4258 if (bus_in(btv,btv->mbox_data)) {
4259 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4260 return -1;
4261 }
4262
4263 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004264 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004265 udelay(5);
4266 bus_high(btv,btv->mbox_clk);
4267 udelay(5);
4268 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4269 bus_low(btv,btv->mbox_clk);
4270 value <<= 1;
4271 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4272 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4273 }
4274 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4275 return value;
4276}
4277
4278static int tea5757_write(struct bttv *btv, int value)
4279{
4280 int i;
4281 int reg = value;
4282
4283 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4284
4285 if (btv->mbox_ior) {
4286 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4287 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4288 udelay(5);
4289 }
4290 if (bttv_gpio)
4291 bttv_gpio_tracking(btv,"tea5757 write");
4292
4293 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4294 bus_low(btv,btv->mbox_clk);
4295 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004296 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004297 if (reg & 0x1000000)
4298 bus_high(btv,btv->mbox_data);
4299 else
4300 bus_low(btv,btv->mbox_data);
4301 reg <<= 1;
4302 bus_high(btv,btv->mbox_clk);
4303 udelay(10);
4304 bus_low(btv,btv->mbox_clk);
4305 udelay(10);
4306 }
4307 bus_low(btv,btv->mbox_we); /* unmute !!! */
4308 return 0;
4309}
4310
4311void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4312{
4313 dprintk("tea5757_set_freq %d\n",freq);
4314 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004315}
4316
Linus Torvalds1da177e2005-04-16 15:20:36 -07004317/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4318 *
4319 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4320 * switch instead (CD22M3494E). This IC can have multiple active connections
4321 * between Xn (input) and Yn (output) pins. We need to clear any existing
4322 * connection prior to establish a new one, pulsing the STROBE pin.
4323 *
4324 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4325 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004326 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4327 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4328 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4329 * GPIO[8] - - P3[5] (microcontroller)
4330 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4331 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4332 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004333 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004334 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4335 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004336 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004337 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004338 * note: the vendor refused to give any information on this product, all
4339 * that stuff was found using a multimeter! :)
4340 */
4341static void rv605_muxsel(struct bttv *btv, unsigned int input)
4342{
4343 /* reset all conections */
4344 gpio_bits(0x200,0x200);
4345 mdelay(1);
4346 gpio_bits(0x200,0x000);
4347 mdelay(1);
4348
Joe Perchesc84e6032008-02-03 17:18:59 +02004349 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004350 gpio_bits(0x480,0x080);
4351 gpio_bits(0x480,0x480);
4352 mdelay(1);
4353 gpio_bits(0x480,0x080);
4354 mdelay(1);
4355}
4356
4357/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4358 *
4359 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4360 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4361 * chips, ten eight input analog multiplexors, a not chip and a few
4362 * other components.
4363 *
4364 * 16 inputs on a secondary bracket are provided and can be selected
4365 * from each of the four capture chips. Two of the eight input
4366 * multiplexors are used to select from any of the 16 input signals.
4367 *
4368 * Unsupported hardware capabilities:
4369 * . A video output monitor on the secondary bracket can be selected from
4370 * one of the 878A chips.
4371 * . Another passthrough but I haven't spent any time investigating it.
4372 * . Digital I/O (logic level connected to GPIO) is available from an
4373 * onboard header.
4374 *
4375 * The on chip input mux should always be set to 2.
4376 * GPIO[16:19] - Video input selection
4377 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4378 * GPIO[?:?] - Digital I/O.
4379 *
4380 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4381 * determined what function (if any) it provides. With the microcontroller
4382 * and sync seperator chips a guess is that it might have to do with video
4383 * switching and maybe some digital I/O.
4384 */
4385static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4386{
4387 /* video mux */
4388 gpio_bits(0x0f0000, input << 16);
4389}
4390
4391static void tibetCS16_init(struct bttv *btv)
4392{
4393 /* enable gpio bits, mask obtained via btSpy */
4394 gpio_inout(0xffffff, 0x0f7fff);
4395 gpio_write(0x0f7fff);
4396}
4397
4398/*
4399 * The following routines for the Kodicom-4400r get a little mind-twisting.
4400 * There is a "master" controller and three "slave" controllers, together
4401 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4402 * The analog switch is controlled by the "master", but the detection order
4403 * of the four BT878A chips is in an order which I just don't understand.
4404 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004405 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004406 * those numbers are different from the detection sequence. When working
4407 * with the analog switch, we need to "map" from the detection sequence
4408 * over to the board's logical controller number. This mapping sequence
4409 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4410 * unit 3, the second (which is the master) is logical unit 0, etc.
4411 * We need to maintain the status of the analog switch (which of the 16
4412 * cameras is connected to which of the 4 controllers). Rather than
4413 * add to the bttv structure for this, we use the data reserved for
4414 * the mbox (unused for this card type).
4415 */
4416
4417/*
4418 * First a routine to set the analog switch, which controls which camera
4419 * is routed to which controller. The switch comprises an X-address
4420 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4421 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4422 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4423 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4424 * specified address. The idea is to set the address and data, then bring
4425 * STROBE high, and finally bring STROBE back to low.
4426 */
4427static void kodicom4400r_write(struct bttv *btv,
4428 unsigned char xaddr,
4429 unsigned char yaddr,
4430 unsigned char data) {
4431 unsigned int udata;
4432
4433 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4434 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4435 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4436 gpio_bits(0x1ff, udata); /* strobe low */
4437}
4438
4439/*
4440 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4441 * use this routine. The routine finds the "master" for the card, maps
4442 * the controller number from the detected position over to the logical
4443 * number, writes the appropriate data to the analog switch, and housekeeps
4444 * the local copy of the switch information. The parameter 'input' is the
4445 * requested camera number (0 - 15).
4446 */
4447static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4448{
4449 char *sw_status;
4450 int xaddr, yaddr;
4451 struct bttv *mctlr;
4452 static unsigned char map[4] = {3, 0, 2, 1};
4453
4454 mctlr = master[btv->c.nr];
4455 if (mctlr == NULL) { /* ignore if master not yet detected */
4456 return;
4457 }
4458 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4459 yaddr = map[yaddr];
4460 sw_status = (char *)(&mctlr->mbox_we);
4461 xaddr = input & 0xf;
4462 /* Check if the controller/camera pair has changed, else ignore */
4463 if (sw_status[yaddr] != xaddr)
4464 {
4465 /* "open" the old switch, "close" the new one, save the new */
4466 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4467 sw_status[yaddr] = xaddr;
4468 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4469 }
4470}
4471
4472/*
4473 * During initialisation, we need to reset the analog switch. We
4474 * also preset the switch to map the 4 connectors on the card to the
4475 * *user's* (see above description of kodicom4400r_muxsel) channels
4476 * 0 through 3
4477 */
4478static void kodicom4400r_init(struct bttv *btv)
4479{
4480 char *sw_status = (char *)(&btv->mbox_we);
4481 int ix;
4482
4483 gpio_inout(0x0003ff, 0x0003ff);
4484 gpio_write(1 << 9); /* reset MUX */
4485 gpio_write(0);
4486 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004487 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004488 sw_status[ix] = ix;
4489 kodicom4400r_write(btv, ix, ix, 1);
4490 }
4491 /*
4492 * Since this is the "master", we need to set up the
4493 * other three controller chips' pointers to this structure
4494 * for later use in the muxsel routine.
4495 */
4496 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4497 return;
4498 master[btv->c.nr-1] = btv;
4499 master[btv->c.nr] = btv;
4500 master[btv->c.nr+1] = btv;
4501 master[btv->c.nr+2] = btv;
4502}
4503
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004504/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4505 * video multiplexers to provide up to 16 video inputs. These
4506 * multiplexers are controlled by the lower 8 GPIO pins of the
4507 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004508
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004509 * xxx0 is pin xxx of multiplexer U5,
4510 * yyy1 is pin yyy of multiplexer U2
4511 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004512#define ENA0 0x01
4513#define ENB0 0x02
4514#define ENA1 0x04
4515#define ENB1 0x08
4516
4517#define IN10 0x10
4518#define IN00 0x20
4519#define IN11 0x40
4520#define IN01 0x80
4521
4522static void xguard_muxsel(struct bttv *btv, unsigned int input)
4523{
4524 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004525 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4526 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4527 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4528 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004529 };
4530 gpio_write(masks[input%16]);
4531}
4532static void picolo_tetra_init(struct bttv *btv)
4533{
4534 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4535 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4536 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4537}
4538static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4539{
4540
4541 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4542 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4543 /*GPIO[20]&GPIO[21] used to choose the right input*/
4544 btwrite (input<<20,BT848_GPIO_DATA);
4545
4546}
4547
4548/*
4549 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4550 *
4551 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4552 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004553 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004554 * optional "Monitor Out" bus. This allows the card to be looking
4555 * at one input while the monitor is looking at another.
4556 *
4557 * Since I've couldn't be bothered figuring out how to add an
4558 * independant muxsel for the monitor bus, I've just set it to
4559 * whatever the card is looking at.
4560 *
4561 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4562 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4563 *
4564 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4565 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4566 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4567 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4568 *
4569 */
4570
4571/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4572#define I2C_TDA8540 0x90
4573#define I2C_TDA8540_ALT1 0x92
4574#define I2C_TDA8540_ALT2 0x94
4575#define I2C_TDA8540_ALT3 0x96
4576#define I2C_TDA8540_ALT4 0x98
4577#define I2C_TDA8540_ALT5 0x9a
4578#define I2C_TDA8540_ALT6 0x9c
4579
4580static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4581{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004582 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004583 int key = input % 4;
4584 int matrix = input / 4;
4585
4586 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4587 btv->c.nr, input, matrix, key);
4588
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004589 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004590 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4591 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4592 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4593 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4594 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4595 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4596 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4597 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4598
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004599 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004600 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004601 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004602 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004603 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004604 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004605 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004606 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004607 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004608
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004609 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004610 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4611}
4612
4613
4614/* PXC200 muxsel helper
4615 * luke@syseng.anu.edu.au
4616 * another transplant
4617 * from Alessandro Rubini (rubini@linux.it)
4618 *
4619 * There are 4 kinds of cards:
4620 * PXC200L which is bt848
4621 * PXC200F which is bt848 with PIC controlling mux
4622 * PXC200AL which is bt878
4623 * PXC200AF which is bt878 with PIC controlling mux
4624 */
4625#define PX_CFG_PXC200F 0x01
4626#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4627#define PX_I2C_PIC 0x0f
4628#define PX_PXC200A_CARDID 0x200a1295
4629#define PX_I2C_CMD_CFG 0x00
4630
4631static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4632{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004633 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004634 long mux;
4635 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004636 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004637
4638 /* Read PIC config to determine if this is a PXC200F */
4639 /* PX_I2C_CMD_CFG*/
4640 buf[0]=0;
4641 buf[1]=0;
4642 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4643 if (rc) {
4644 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4645 /* not PXC ? do nothing */
4646 return;
4647 }
4648
4649 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4650 if (!(rc & PX_CFG_PXC200F)) {
4651 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4652 return;
4653 }
4654
4655
4656 /* The multiplexer in the 200F is handled by the GPIO port */
4657 /* get correct mapping between inputs */
4658 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4659 /* ** not needed!? */
4660 mux = input;
4661
4662 /* make sure output pins are enabled */
4663 /* bitmask=0x30f; */
4664 bitmask=0x302;
4665 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004666 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004667 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4668 bitmask |= 7<<4; /* the DAC */
4669 }
4670 btwrite(bitmask, BT848_GPIO_OUT_EN);
4671
4672 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004673 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004674 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4675 else /* older device */
4676 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4677 btwrite(bitmask,BT848_GPIO_DATA);
4678
4679 /*
4680 * Was "to be safe, set the bt848 to input 0"
4681 * Actually, since it's ok at load time, better not messing
4682 * with these bits (on PXC200AF you need to set mux 2 here)
4683 *
4684 * needed because bttv-driver sets mux before calling this function
4685 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004686 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004687 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4688 else /* older device */
4689 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4690
4691 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4692}
4693
4694/* ----------------------------------------------------------------------- */
4695/* motherboard chipset specific stuff */
4696
Adrian Bunk7d44e892007-12-11 19:23:43 -03004697void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004698{
4699 int pcipci_fail = 0;
4700 struct pci_dev *dev = NULL;
4701
Alan Cox3d265c92006-09-14 11:53:16 -03004702 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004703 pcipci_fail = 1;
4704 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4705 triton1 = 1;
4706 if (pci_pci_problems & PCIPCI_VSFX)
4707 vsfx = 1;
4708#ifdef PCIPCI_ALIMAGIK
4709 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4710 latency = 0x0A;
4711#endif
4712
Linus Torvalds1da177e2005-04-16 15:20:36 -07004713
4714 /* print warnings about any quirks found */
4715 if (triton1)
4716 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4717 if (vsfx)
4718 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4719 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004720 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4721 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004722 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004723 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004724 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004725 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004726 printk(KERN_INFO "bttv: overlay forced. Use this "
4727 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004728 }
4729 }
4730 if (UNSET != latency)
4731 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004732 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004733 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004734 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004735 pci_read_config_byte(dev, 0x53, &b);
4736 if (bttv_debug)
4737 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4738 "bufcon=0x%02x\n",b);
4739 }
4740}
4741
4742int __devinit bttv_handle_chipset(struct bttv *btv)
4743{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004744 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004745
4746 if (!triton1 && !vsfx && UNSET == latency)
4747 return 0;
4748
4749 if (bttv_verbose) {
4750 if (triton1)
4751 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4752 if (vsfx && btv->id >= 878)
4753 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4754 if (UNSET != latency)
4755 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4756 btv->c.nr,latency);
4757 }
4758
4759 if (btv->id < 878) {
4760 /* bt848 (mis)uses a bit in the irq mask for etbf */
4761 if (triton1)
4762 btv->triton1 = BT848_INT_ETBF;
4763 } else {
4764 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004765 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004766 if (triton1)
4767 command |= BT878_EN_TBFX;
4768 if (vsfx)
4769 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004770 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4771 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004772 if (UNSET != latency)
4773 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4774 return 0;
4775}
4776
4777
4778/*
4779 * Local variables:
4780 * c-basic-offset: 8
4781 * End:
4782 */