blob: 63a47cd4c161110796503cfc3a83fa5412e9ba7a [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,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800580 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800581 .name = "Leadtek WinView 601",
582 .video_inputs = 3,
583 .audio_inputs = 1,
584 .tuner = 0,
585 .svhs = 2,
586 .gpiomask = 0x8300f8,
Michael Krufkybc286362006-01-11 19:40:17 -0200587 .muxsel = { 2, 3, 1, 1,0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300588 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
589 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800590 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300591 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800592 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800593 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300594 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800595 .has_radio = 1,
596 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800597 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .name = "AVEC Intercapture",
599 .video_inputs = 3,
600 .audio_inputs = 2,
601 .tuner = 0,
602 .svhs = 2,
603 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200604 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300605 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800606 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300607 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800608 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800609 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800611 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800612 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
613 .video_inputs = 4,
614 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300615 .tuner = UNSET,
616 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800617 .gpiomask = 0x8dff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200618 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300619 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800620 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300621 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800622 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800623 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800624 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700625
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800626 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800627 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 .name = "CEI Raffles Card",
629 .video_inputs = 3,
630 .audio_inputs = 3,
631 .tuner = 0,
632 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200633 .muxsel = { 2, 3, 1, 1 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300634 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800635 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800636 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800637 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800638 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800639 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
640 .video_inputs = 4,
641 .audio_inputs = 2, /* tuner, line in */
642 .tuner = 0,
643 .svhs = 2,
644 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200645 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300646 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
647 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800648 .pll = PLL_28,
649 .tuner_type = TUNER_PHILIPS_PAL_I,
650 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800651 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800652 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800653 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800654 .name = "Askey CPH050/ Phoebe Tv Master + FM",
655 .video_inputs = 3,
656 .audio_inputs = 1,
657 .tuner = 0,
658 .svhs = 2,
659 .gpiomask = 0xc00,
Michael Krufkybc286362006-01-11 19:40:17 -0200660 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300661 .gpiomux = { 0, 1, 0x800, 0x400 },
662 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800663 .needs_tvaudio = 1,
664 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300665 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800666 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800667 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800668 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800669 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800670 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
671 .video_inputs = 3,
672 .audio_inputs = 1,
673 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300674 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .gpiomask = 7,
676 .muxsel = { 2, 3, -1 },
677 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300678 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800679 .no_msp34xx = 1,
680 .pll = PLL_28,
681 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
682 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800683 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800684 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700685
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800686 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800687 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800688 .name = "Askey CPH05X/06X (bt878) [many vendors]",
689 .video_inputs = 3,
690 .audio_inputs = 1,
691 .tuner = 0,
692 .svhs = 2,
693 .gpiomask = 0xe00,
Michael Krufkybc286362006-01-11 19:40:17 -0200694 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300695 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
696 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .needs_tvaudio = 1,
698 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300699 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800700 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800701 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800702 .has_remote = 1,
703 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800704 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800705 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
706 .video_inputs = 3,
707 .audio_inputs = 1,
708 .tuner = 0,
709 .svhs = 2,
710 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200711 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300712 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
713 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800714 .needs_tvaudio = 0,
715 .tuner_type = TUNER_PHILIPS_PAL,
716 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800717 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300718 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800719 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800720 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800721 .name = "Hauppauge WinCam newer (bt878)",
722 .video_inputs = 4,
723 .audio_inputs = 1,
724 .tuner = 0,
725 .svhs = 3,
726 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200727 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300728 .gpiomux = { 0, 1, 2, 3 },
729 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800730 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300731 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800732 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800733 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800734 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800735 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800736 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
737 .video_inputs = 4,
738 .audio_inputs = 2,
739 .tuner = 0,
740 .svhs = 2,
741 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200742 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300743 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
744 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800745 .pll = PLL_28,
746 .tuner_type = TUNER_PHILIPS_SECAM,
747 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800748 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800749 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700750
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800752 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800753 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
754 .video_inputs = 3,
755 .audio_inputs = 1,
756 .tuner = 0,
757 .svhs = 2,
758 .gpiomask = 0x1f0fff,
Michael Krufkybc286362006-01-11 19:40:17 -0200759 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300760 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
761 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800762 .needs_tvaudio = 0,
763 .tuner_type = TUNER_PHILIPS_PAL,
764 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800765 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300766 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800767 /* GPIO wiring:
768 External 20 pin connector (for Active Radio Upgrade board)
769 gpio00: i2c-sda
770 gpio01: i2c-scl
771 gpio02: om5610-data
772 gpio03: om5610-clk
773 gpio04: om5610-wre
774 gpio05: om5610-stereo
775 gpio06: rds6588-davn
776 gpio07: Pin 7 n.c.
777 gpio08: nIOW
778 gpio09+10: nIOR, nSEL ?? (bt878)
779 gpio09: nIOR (bt848)
780 gpio10: nSEL (bt848)
781 Sound Routing:
782 gpio16: u2-A0 (1st 4052bt)
783 gpio17: u2-A1
784 gpio18: u2-nEN
785 gpio19: u4-A0 (2nd 4052)
786 gpio20: u4-A1
787 u4-nEN - GND
788 Btspy:
789 00000 : Cdrom (internal audio input)
790 10000 : ext. Video audio input
791 20000 : TV Mono
792 a0000 : TV Mono/2
793 1a0000 : TV Stereo
794 30000 : Radio
795 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700796 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800798 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800799 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800800 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
801 .name = "Imagenation PXC200",
802 .video_inputs = 5,
803 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300804 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800805 .svhs = 1, /* was: 4 */
806 .gpiomask = 0,
807 .muxsel = { 2, 3, 1, 0, 0},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300808 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800809 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300810 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800812 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800813 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700814
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800816 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800817 .name = "Lifeview FlyVideo 98 LR50",
818 .video_inputs = 4,
819 .audio_inputs = 1,
820 .tuner = 0,
821 .svhs = 2,
822 .gpiomask = 0x1800, /* 0x8dfe00 */
Michael Krufkybc286362006-01-11 19:40:17 -0200823 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300824 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
825 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800826 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300827 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800828 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800829 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800831 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800832 .name = "Formac iProTV, Formac ProTV I (bt848)",
833 .video_inputs = 4,
834 .audio_inputs = 1,
835 .tuner = 0,
836 .svhs = 3,
837 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -0200838 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300839 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800840 .pll = PLL_28,
841 .tuner_type = TUNER_PHILIPS_PAL,
842 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800843 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800844 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700845
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800847 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800848 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
849 .video_inputs = 4,
850 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300851 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800852 .svhs = 2,
853 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -0200854 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300855 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800856 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300857 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800858 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800859 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800860 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800861 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800862 .name = "Terratec TerraTValue Version Bt878",
863 .video_inputs = 3,
864 .audio_inputs = 1,
865 .tuner = 0,
866 .svhs = 2,
867 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -0200868 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300869 .gpiomux = { 0x500, 0, 0x300, 0x900 },
870 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800871 .needs_tvaudio = 1,
872 .pll = PLL_28,
873 .tuner_type = TUNER_PHILIPS_PAL,
874 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800875 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800876 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800877 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800878 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
879 .video_inputs = 4,
880 .audio_inputs = 1,
881 .tuner = 0,
882 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -0200883 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800884 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
885 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300886 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
887 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800888 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
889 gpio23 -- hef4052:nEnable (0x800000)
890 gpio12 -- hef4052:A1
891 gpio13 -- hef4052:A0
892 0x0000: external audio
893 0x1000: FM
894 0x2000: TV
895 0x3000: n.c.
896 Note: There exists another variant "Winfast 2000" with tv stereo !?
897 Note: eeprom only contains FF and pci subsystem id 107d:6606
898 */
899 .needs_tvaudio = 0,
900 .pll = PLL_28,
901 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300902 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800903 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800904 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300905 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800906 .has_remote = 1,
907 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800908 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800909 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
910 .video_inputs = 4,
911 .audio_inputs = 3,
912 .tuner = 0,
913 .svhs = 2,
914 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200915 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300916 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
917 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800918 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300919 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800920 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800921 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800922 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700923
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800924 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800925 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
927 .video_inputs = 4,
928 .audio_inputs = 3,
929 .tuner = 0,
930 .svhs = 2,
931 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -0200932 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300933 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
934 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800935 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300936 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800937 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800938 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800939 .has_radio = 1,
940 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800941 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800942 .name = "Prolink PixelView PlayTV pro",
943 .video_inputs = 3,
944 .audio_inputs = 1,
945 .tuner = 0,
946 .svhs = 2,
947 .gpiomask = 0xff,
948 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300949 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
950 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800951 .no_msp34xx = 1,
952 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300953 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800954 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800955 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800957 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800958 .name = "Askey CPH06X TView99",
959 .video_inputs = 4,
960 .audio_inputs = 1,
961 .tuner = 0,
962 .svhs = 2,
963 .gpiomask = 0x551e00,
Michael Krufkybc286362006-01-11 19:40:17 -0200964 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300965 .gpiomux = { 0x551400, 0x551200, 0, 0 },
966 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800967 .needs_tvaudio = 1,
968 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300969 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800970 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800971 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800972 .has_remote = 1,
973 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800974 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800975 .name = "Pinnacle PCTV Studio/Rave",
976 .video_inputs = 3,
977 .audio_inputs = 1,
978 .tuner = 0,
979 .svhs = 2,
980 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -0200981 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300982 .gpiomux = { 2, 0xd0001, 0, 0 },
983 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800984 .needs_tvaudio = 0,
985 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300986 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800987 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -0800988 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 },
990
991 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800992 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800993 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
994 .video_inputs = 3,
995 .audio_inputs = 1,
996 .tuner = 0,
997 .svhs = 2,
998 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -0200999 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001000 .gpiomux = { 4, 0, 2, 3 },
1001 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .no_msp34xx = 1,
1003 .needs_tvaudio = 1,
1004 .tuner_type = TUNER_PHILIPS_NTSC,
1005 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001006 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001007 .pll = PLL_28,
1008 .has_radio = 1,
1009 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001010 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001011 .name = "AVerMedia TVPhone 98",
1012 .video_inputs = 3,
1013 .audio_inputs = 4,
1014 .tuner = 0,
1015 .svhs = 2,
1016 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001017 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001018 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001019 .needs_tvaudio = 1,
1020 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001021 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001022 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001023 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001025 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001026 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001027 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 .name = "ProVideo PV951", /* pic16c54 */
1029 .video_inputs = 3,
1030 .audio_inputs = 1,
1031 .tuner = 0,
1032 .svhs = 2,
1033 .gpiomask = 0,
1034 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001035 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001036 .needs_tvaudio = 1,
1037 .no_msp34xx = 1,
1038 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001039 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001040 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001041 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001042 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001043 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 .name = "Little OnAir TV",
1045 .video_inputs = 3,
1046 .audio_inputs = 1,
1047 .tuner = 0,
1048 .svhs = 2,
1049 .gpiomask = 0xe00b,
Michael Krufkybc286362006-01-11 19:40:17 -02001050 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001051 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1052 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001053 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001054 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001056 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001057 },
1058
1059 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001060 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .name = "Sigma TVII-FM",
1062 .video_inputs = 2,
1063 .audio_inputs = 1,
1064 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001065 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001066 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02001067 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001068 .gpiomux = { 1, 1, 0, 2 },
1069 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001070 .no_msp34xx = 1,
1071 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001072 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001073 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001074 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001076 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001077 .name = "MATRIX-Vision MV-Delta 2",
1078 .video_inputs = 5,
1079 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001080 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001081 .svhs = 3,
1082 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001083 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001084 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001085 .no_msp34xx = 1,
1086 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001087 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001088 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001089 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001091 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001092 .name = "Zoltrix Genie TV/FM",
1093 .video_inputs = 3,
1094 .audio_inputs = 1,
1095 .tuner = 0,
1096 .svhs = 2,
1097 .gpiomask = 0xbcf03f,
Michael Krufkybc286362006-01-11 19:40:17 -02001098 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001099 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1100 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001101 .no_msp34xx = 1,
1102 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001103 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001104 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001105 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001106 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001107 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 .name = "Terratec TV/Radio+",
1109 .video_inputs = 3,
1110 .audio_inputs = 1,
1111 .tuner = 0,
1112 .svhs = 2,
1113 .gpiomask = 0x70000,
Michael Krufkybc286362006-01-11 19:40:17 -02001114 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001115 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1116 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001117 .needs_tvaudio = 1,
1118 .no_msp34xx = 1,
1119 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001120 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001121 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001122 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001123 .has_radio = 1,
1124 },
1125
1126 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001127 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001128 .name = "Askey CPH03x/ Dynalink Magic TView",
1129 .video_inputs = 3,
1130 .audio_inputs = 1,
1131 .tuner = 0,
1132 .svhs = 2,
1133 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001134 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001135 .gpiomux = {2,0,0,0 },
1136 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001137 .needs_tvaudio = 1,
1138 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001139 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001140 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001141 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001142 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001143 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001144 .name = "IODATA GV-BCTV3/PCI",
1145 .video_inputs = 3,
1146 .audio_inputs = 1,
1147 .tuner = 0,
1148 .svhs = 2,
1149 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001150 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001151 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001152 .no_msp34xx = 1,
1153 .pll = PLL_28,
1154 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1155 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001156 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001157 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001158 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001159 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001160 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1161 .video_inputs = 5,
1162 .audio_inputs = 1,
1163 .tuner = 0,
1164 .svhs = 3,
1165 .gpiomask = 0xAA0000,
1166 .muxsel = { 2,3,1,1,-1 },
1167 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001168 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1169 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001170 .no_msp34xx = 1,
1171 .pll = PLL_28,
1172 .tuner_type = TUNER_PHILIPS_PAL_I,
1173 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001174 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001175 .has_remote = 1,
1176 /* GPIO wiring: (different from Rev.4C !)
1177 GPIO17: U4.A0 (first hef4052bt)
1178 GPIO19: U4.A1
1179 GPIO20: U5.A1 (second hef4052bt)
1180 GPIO21: U4.nEN
1181 GPIO22: BT832 Reset Line
1182 GPIO23: A5,A0, U5,nEN
1183 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1184 */
1185 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001186 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001187 .name = "Eagle Wireless Capricorn2 (bt878A)",
1188 .video_inputs = 4,
1189 .audio_inputs = 1,
1190 .tuner = 0,
1191 .svhs = 2,
1192 .gpiomask = 7,
Michael Krufkybc286362006-01-11 19:40:17 -02001193 .muxsel = { 2, 0, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001194 .gpiomux = { 0, 1, 2, 3 },
1195 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001196 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001197 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001198 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001199 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001200 },
1201
1202 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001203 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001204 /* David Härdeman <david@2gen.com> */
1205 .name = "Pinnacle PCTV Studio Pro",
1206 .video_inputs = 4,
1207 .audio_inputs = 1,
1208 .tuner = 0,
1209 .svhs = 3,
1210 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001211 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001212 .gpiomux = { 1, 0xd0001, 0, 0 },
1213 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001214 /* sound path (5 sources):
1215 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1216 0= ext. Audio IN
1217 1= from MUX2
1218 2= Mono TV sound from Tuner
1219 3= not connected
1220 MUX2 (mask 0x30000):
1221 0,2,3= from MSP34xx
1222 1= FM stereo Radio from Tuner */
1223 .needs_tvaudio = 0,
1224 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001225 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001226 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001227 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001228 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001229 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001230 /* Claas Langbehn <claas@bigfoot.com>,
1231 Sven Grothklags <sven@upb.de> */
1232 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1233 .video_inputs = 4,
1234 .audio_inputs = 3,
1235 .tuner = 0,
1236 .svhs = 2,
1237 .gpiomask = 0x1c,
Michael Krufkybc286362006-01-11 19:40:17 -02001238 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001239 .gpiomux = { 0, 0, 0x10, 8 },
1240 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001241 .needs_tvaudio = 1,
1242 .pll = PLL_28,
1243 .tuner_type = TUNER_PHILIPS_PAL,
1244 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001245 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001246 .has_radio = 1,
1247 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001248 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001249 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001250 in de.comp.os.unix.linux.hardware:
1251 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001252 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001253 options tuner type=5 */
1254 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1255 .video_inputs = 4,
1256 .audio_inputs = 1,
1257 .tuner = 0,
1258 .svhs = 2,
1259 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001260 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001261 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1262 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001263 /* For cards with tda9820/tda9821:
1264 0x0000: Tuner normal stereo
1265 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1266 0x0880: Tuner A2 stereo */
1267 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001268 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001269 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001270 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001271 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001272 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001273 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1274 old Easy TV BT848 version (model CPH031) */
1275 .name = "Askey CPH031/ BESTBUY Easy TV",
1276 .video_inputs = 4,
1277 .audio_inputs = 1,
1278 .tuner = 0,
1279 .svhs = 2,
1280 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001281 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001282 .gpiomux = { 2, 0, 0, 0 },
1283 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001284 .needs_tvaudio = 0,
1285 .pll = PLL_28,
1286 .tuner_type = TUNER_TEMIC_PAL,
1287 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001288 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001289 },
1290
1291 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001292 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001293 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1294 .name = "Lifeview FlyVideo 98FM LR50",
1295 .video_inputs = 4,
1296 .audio_inputs = 3,
1297 .tuner = 0,
1298 .svhs = 2,
1299 .gpiomask = 0x1800,
Michael Krufkybc286362006-01-11 19:40:17 -02001300 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001301 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1302 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001303 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001304 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001305 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001306 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001307 },
1308 /* This is the ultimate cheapo capture card
1309 * just a BT848A on a small PCB!
1310 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001311 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001312 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1313 .video_inputs = 2,
1314 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001315 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001316 .svhs = 1,
1317 .gpiomask = 0,
1318 .muxsel = { 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001319 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001320 .needs_tvaudio = 0,
1321 .no_msp34xx = 1,
1322 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001323 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001324 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001325 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001326 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001327 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001328 /* Daniel Herrington <daniel.herrington@home.com> */
1329 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1330 .video_inputs = 3,
1331 .audio_inputs = 1,
1332 .tuner = 0,
1333 .svhs = 2,
1334 .gpiomask = 0xe00,
1335 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001336 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1337 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001338 .needs_tvaudio = 1,
1339 .pll = PLL_28,
1340 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1341 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001342 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001343 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001344 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001345 /* Matti Mottus <mottus@physic.ut.ee> */
1346 .name = "Askey CPH03x TV Capturer",
1347 .video_inputs = 4,
1348 .audio_inputs = 1,
1349 .tuner = 0,
1350 .svhs = 2,
1351 .gpiomask = 0x03000F,
Michael Krufkybc286362006-01-11 19:40:17 -02001352 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001353 .gpiomux = { 2, 0, 0, 0 },
1354 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001355 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001356 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001357 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001358 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001359 },
1360
1361 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001362 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001363 /* Philip Blundell <philb@gnu.org> */
1364 .name = "Modular Technology MM100PCTV",
1365 .video_inputs = 2,
1366 .audio_inputs = 2,
1367 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001368 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001369 .gpiomask = 11,
Michael Krufkybc286362006-01-11 19:40:17 -02001370 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001371 .gpiomux = { 2, 0, 0, 1 },
1372 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001373 .pll = PLL_35,
1374 .tuner_type = TUNER_TEMIC_PAL,
1375 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001376 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001377 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001378 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001379 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001380 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 .video_inputs = 2,
1382 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001383 .tuner = UNSET,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001384 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 .gpiomask = 0xF,
Michael Krufkybc286362006-01-11 19:40:17 -02001386 .muxsel = { 2, 2 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001387 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001388 .no_msp34xx = 1,
1389 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001390 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001391 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001392 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001393 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001394 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001395 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001396 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1397 new Easy TV BT878 version (model CPH061)
1398 special thanks to Informatica Mieres for providing the card */
1399 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1400 .video_inputs = 3,
1401 .audio_inputs = 2,
1402 .tuner = 0,
1403 .svhs = 2,
1404 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02001405 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001406 .gpiomux = { 1, 0, 4, 4 },
1407 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001408 .needs_tvaudio = 0,
1409 .pll = PLL_28,
1410 .tuner_type = TUNER_PHILIPS_PAL,
1411 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001412 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001413 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001414 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001415 /* Lukas Gebauer <geby@volny.cz> */
1416 .name = "ATI TV-Wonder",
1417 .video_inputs = 3,
1418 .audio_inputs = 1,
1419 .tuner = 0,
1420 .svhs = 2,
1421 .gpiomask = 0xf03f,
1422 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001423 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1424 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001425 .pll = PLL_28,
1426 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1427 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001428 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001429 },
1430
1431 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001432 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001433 /* Lukas Gebauer <geby@volny.cz> */
1434 .name = "ATI TV-Wonder VE",
1435 .video_inputs = 2,
1436 .audio_inputs = 1,
1437 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001438 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001439 .gpiomask = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02001440 .muxsel = { 2, 3, 0, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001441 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001442 .no_msp34xx = 1,
1443 .pll = PLL_28,
1444 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1445 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001446 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001447 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001448 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001449 /* DeeJay <deejay@westel900.net (2000S) */
1450 .name = "Lifeview FlyVideo 2000S LR90",
1451 .video_inputs = 3,
1452 .audio_inputs = 3,
1453 .tuner = 0,
1454 .svhs = 2,
1455 .gpiomask = 0x18e0,
Michael Krufkybc286362006-01-11 19:40:17 -02001456 .muxsel = { 2, 3, 0, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001457 /* Radio changed from 1e80 to 0x800 to make
1458 FlyVideo2000S in .hu happy (gm)*/
1459 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001460 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1461 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001462 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001463 .no_msp34xx = 1,
1464 .no_tda9875 = 1,
1465 .needs_tvaudio = 1,
1466 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001467 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001469 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001470 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001471 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 .name = "Terratec TValueRadio",
1473 .video_inputs = 3,
1474 .audio_inputs = 1,
1475 .tuner = 0,
1476 .svhs = 2,
1477 .gpiomask = 0xffff00,
Michael Krufkybc286362006-01-11 19:40:17 -02001478 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001479 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1480 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001481 .needs_tvaudio = 1,
1482 .pll = PLL_28,
1483 .tuner_type = TUNER_PHILIPS_PAL,
1484 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001485 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001486 .has_radio = 1,
1487 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001488 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001489 /* TANAKA Kei <peg00625@nifty.com> */
1490 .name = "IODATA GV-BCTV4/PCI",
1491 .video_inputs = 3,
1492 .audio_inputs = 1,
1493 .tuner = 0,
1494 .svhs = 2,
1495 .gpiomask = 0x010f00,
Michael Krufkybc286362006-01-11 19:40:17 -02001496 .muxsel = {2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001497 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001498 .no_msp34xx = 1,
1499 .pll = PLL_28,
1500 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1501 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001502 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001503 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001504 },
1505
1506 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001507 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001508 .name = "3Dfx VoodooTV FM (Euro)",
1509 /* try "insmod msp3400 simple=0" if you have
1510 * sound problems with this card. */
1511 .video_inputs = 4,
1512 .audio_inputs = 1,
1513 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001514 .svhs = UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001515 .gpiomask = 0x4f8a00,
1516 /* 0x100000: 1=MSP enabled (0=disable again)
1517 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1518 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1519 .gpiomute = 0x947fff,
1520 /* tvtuner, radio, external,internal, mute, stereo
1521 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1522 .muxsel = { 2, 3 ,0 ,1 },
1523 .tuner_type = TUNER_MT2032,
1524 .tuner_addr = ADDR_UNSET,
1525 .radio_addr = ADDR_UNSET,
1526 .pll = PLL_28,
1527 .has_radio = 1,
1528 },
1529 [BTTV_BOARD_VOODOOTV_200] = {
1530 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001531 /* try "insmod msp3400 simple=0" if you have
1532 * sound problems with this card. */
1533 .video_inputs = 4,
1534 .audio_inputs = 1,
1535 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001536 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001537 .gpiomask = 0x4f8a00,
1538 /* 0x100000: 1=MSP enabled (0=disable again)
1539 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001540 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1541 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001542 /* tvtuner, radio, external,internal, mute, stereo
1543 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Michael Krufkybc286362006-01-11 19:40:17 -02001544 .muxsel = { 2, 3 ,0 ,1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001545 .tuner_type = TUNER_MT2032,
1546 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001547 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001548 .pll = PLL_28,
1549 .has_radio = 1,
1550 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001551 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001552 /* Philip Blundell <pb@nexus.co.uk> */
1553 .name = "Active Imaging AIMMS",
1554 .video_inputs = 1,
1555 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001556 .tuner = UNSET,
1557 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001558 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001559 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001560 .pll = PLL_28,
1561 .muxsel = { 2 },
1562 .gpiomask = 0
1563 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001564 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001565 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1566 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1567 .video_inputs = 3,
1568 .audio_inputs = 4,
1569 .tuner = 0,
1570 .svhs = 2,
1571 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02001572 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001573 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1574 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001575 .needs_tvaudio = 1,
1576 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001577 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001578 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001579 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001580 .has_remote = 1,
1581 /* GPIO wiring:
1582 GPIO0: U4.A0 (hef4052bt)
1583 GPIO1: U4.A1
1584 GPIO2: U4.A1 (second hef4052bt)
1585 GPIO3: U4.nEN, U5.A0, A5.nEN
1586 GPIO8-15: vrd866b ?
1587 */
1588 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001589 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001590 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1591 .video_inputs = 4,
1592 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001593 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001594 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001595 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001596 .pll = PLL_28,
1597 .no_msp34xx = 1,
1598 .tuner_type = UNSET,
1599 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001600 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001601 },
1602
1603 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001604 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001605 /* Dariusz Kowalewski <darekk@automex.pl> */
1606 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1607 .video_inputs = 4,
1608 .audio_inputs = 1,
1609 .tuner = 0,
1610 .svhs = 2,
1611 .gpiomask = 0x3f,
1612 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001613 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1614 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001615 .needs_tvaudio = 1,
1616 .no_msp34xx = 1,
1617 .no_tda9875 = 1,
1618 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001619 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001620 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001621 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001622 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001623 .has_radio = 1, /* Note: not all cards have radio */
1624 .has_remote = 1,
1625 /* GPIO wiring:
1626 GPIO0: A0 hef4052
1627 GPIO1: A1 hef4052
1628 GPIO3: nEN hef4052
1629 GPIO8-15: vrd866b
1630 GPIO20,22,23: R30,R29,R28
1631 */
1632 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001633 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001634 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1635 /* you must jumper JP5 for the card to work */
1636 .name = "Sensoray 311",
1637 .video_inputs = 5,
1638 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001639 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001640 .svhs = 4,
1641 .gpiomask = 0,
Michael Krufkybc286362006-01-11 19:40:17 -02001642 .muxsel = { 2, 3, 1, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001643 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001644 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001645 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001647 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001648 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001649 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001650 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1651 .name = "RemoteVision MX (RV605)",
1652 .video_inputs = 16,
1653 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001654 .tuner = UNSET,
1655 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001656 .gpiomask = 0x00,
1657 .gpiomask2 = 0x07ff,
1658 .muxsel = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
1659 0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
1660 .no_msp34xx = 1,
1661 .no_tda9875 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001662 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001663 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001664 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001665 .muxsel_hook = rv605_muxsel,
1666 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001667 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001668 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1669 .video_inputs = 3,
1670 .audio_inputs = 2,
1671 .tuner = 0,
1672 .svhs = 2,
1673 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1674 .muxsel = { 2, 1, 1, },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001675 .gpiomux = { 0, 1, 2, 2 },
1676 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .needs_tvaudio = 0,
1678 .tuner_type = TUNER_PHILIPS_PAL,
1679 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001680 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001681 .pll = PLL_28,
1682 .has_radio = 1,
1683 },
1684
1685 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001686 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001687 /* Masaki Suzuki <masaki@btree.org> */
1688 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1689 .video_inputs = 3,
1690 .audio_inputs = 1,
1691 .tuner = 0,
1692 .svhs = 2,
1693 .gpiomask = 0x140007,
1694 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001695 .gpiomux = { 0, 1, 2, 3 },
1696 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001697 .tuner_type = TUNER_PHILIPS_NTSC,
1698 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001699 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001700 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001701 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001702 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001703 .name = "GrandTec Multi Capture Card (Bt878)",
1704 .video_inputs = 4,
1705 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001706 .tuner = UNSET,
1707 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001708 .gpiomask = 0,
1709 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001710 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001711 .needs_tvaudio = 0,
1712 .no_msp34xx = 1,
1713 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001714 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001715 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001716 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001718 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001719 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1720 .video_inputs = 4,
1721 .audio_inputs = 3,
1722 .tuner = 0,
1723 .svhs = 2,
1724 .gpiomask = 7,
1725 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001726 .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 -08001727 * This card lacks external Audio In, so we mute it on Ext. & Int.
1728 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1729 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001730 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001731 * btwincap uses 0x80000/0x80003
1732 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001733 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001734 .needs_tvaudio = 0,
1735 .no_msp34xx = 1,
1736 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001737 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001738 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001739 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001740 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1741 radio signal strength indicators work fine. */
1742 .has_radio = 1,
1743 /* GPIO Info:
1744 GPIO0,1: HEF4052 A0,A1
1745 GPIO2: HEF4052 nENABLE
1746 GPIO3-7: n.c.
1747 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1748 GPIO14,15: ??
1749 GPIO16-21: n.c.
1750 GPIO22,23: ??
1751 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1752 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001753 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001754 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1755 .name = "DSP Design TCVIDEO",
1756 .video_inputs = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001757 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02001758 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001760 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001761 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001762 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001763 },
1764
1765 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001766 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001767 .name = "Hauppauge WinTV PVR",
1768 .video_inputs = 4,
1769 .audio_inputs = 1,
1770 .tuner = 0,
1771 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02001772 .muxsel = { 2, 0, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001773 .needs_tvaudio = 1,
1774 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001775 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001776 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001777 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001778
1779 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001780 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001781 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001782 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .name = "IODATA GV-BCTV5/PCI",
1784 .video_inputs = 3,
1785 .audio_inputs = 1,
1786 .tuner = 0,
1787 .svhs = 2,
1788 .gpiomask = 0x0f0f80,
Michael Krufkybc286362006-01-11 19:40:17 -02001789 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001790 .gpiomux = {0x030000, 0x010000, 0, 0 },
1791 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001792 .no_msp34xx = 1,
1793 .pll = PLL_28,
1794 .tuner_type = TUNER_PHILIPS_NTSC_M,
1795 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001796 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001797 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .has_radio = 1,
1799 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001800 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001801 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1802 .video_inputs = 4, /* id-inputs-clock */
1803 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001804 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001805 .svhs = 3,
1806 .muxsel = { 3, 2, 0, 1 },
1807 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001808 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001809 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001810 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .no_msp34xx = 1,
1812 .no_tda9875 = 1,
1813 .no_tda7432 = 1,
1814 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001815 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001816 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1817 .video_inputs = 3,
1818 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001819 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001820 .svhs = 2,
1821 .muxsel = { 2, 3, 1 },
1822 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001823 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001824 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001825 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .no_msp34xx = 1,
1827 .no_tda9875 = 1,
1828 .no_tda7432 = 1,
1829 },
1830
1831 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001832 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001833 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1834 .video_inputs = 2,
1835 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001836 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001837 .svhs = 1,
1838 .muxsel = { 3, 1 },
1839 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001840 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001841 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001842 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001843 .no_msp34xx = 1,
1844 .no_tda9875 = 1,
1845 .no_tda7432 = 1,
1846 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001847 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001848 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1849 .video_inputs = 1,
1850 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001851 .tuner = UNSET,
1852 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001853 .muxsel = { 0 },
1854 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001855 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001856 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001857 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001858 .no_msp34xx = 1,
1859 .no_tda9875 = 1,
1860 .no_tda7432 = 1,
1861 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001862 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001863 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1864 .video_inputs = 2,
1865 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001866 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .svhs = 1,
1868 .muxsel = { 0, 1 },
1869 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001870 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001871 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001872 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001873 .no_msp34xx = 1,
1874 .no_tda9875 = 1,
1875 .no_tda7432 = 1,
1876 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001877 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001878 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1879 .video_inputs = 1,
1880 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001881 .tuner = UNSET,
1882 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001883 .muxsel = { 0 },
1884 .pll = PLL_28,
1885 .tuner_type = UNSET,
1886 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001887 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001888 .no_msp34xx = 1,
1889 .no_tda9875 = 1,
1890 .no_tda7432 = 1,
1891 },
1892
1893 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001894 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001895 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1896 .video_inputs = 2,
1897 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001898 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001899 .svhs = 1,
1900 .muxsel = { 0, 1 },
1901 .pll = PLL_28,
1902 .tuner_type = UNSET,
1903 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001904 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .no_msp34xx = 1,
1906 .no_tda9875 = 1,
1907 .no_tda7432 = 1,
1908 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001909 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001910 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001911 .video_inputs = 2,
1912 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001913 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001914 .svhs = 1,
1915 .muxsel = { 2, 3 },
1916 .pll = PLL_28,
1917 .tuner_type = UNSET,
1918 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001919 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 .no_msp34xx = 1,
1921 .no_tda9875 = 1,
1922 .no_tda7432 = 1,
1923 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001924 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001925 .name = "Osprey 500", /* 500 */
1926 .video_inputs = 2,
1927 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001928 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 .svhs = 1,
1930 .muxsel = { 2, 3 },
1931 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001932 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001933 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001934 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001935 .no_msp34xx = 1,
1936 .no_tda9875 = 1,
1937 .no_tda7432 = 1,
1938 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001939 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001940 .name = "Osprey 540", /* 540 */
1941 .video_inputs = 4,
1942 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001943 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001944 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001945 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001946 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001947 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001948 .no_msp34xx = 1,
1949 .no_tda9875 = 1,
1950 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001951 },
1952
1953 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001954 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .name = "Osprey 2000", /* 2000 */
1956 .video_inputs = 2,
1957 .audio_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001958 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001959 .svhs = 1,
1960 .muxsel = { 2, 3 },
1961 .pll = PLL_28,
1962 .tuner_type = UNSET,
1963 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001964 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001965 .no_msp34xx = 1,
1966 .no_tda9875 = 1,
1967 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1968 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001969 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001970 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1971 .name = "IDS Eagle",
1972 .video_inputs = 4,
1973 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001974 .tuner = UNSET,
1975 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001976 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001977 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001978 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001979 .gpiomask = 0,
1980 .muxsel = { 0, 1, 2, 3 },
1981 .muxsel_hook = eagle_muxsel,
1982 .no_msp34xx = 1,
1983 .no_tda9875 = 1,
1984 .pll = PLL_28,
1985 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001986 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001987 .name = "Pinnacle PCTV Sat",
1988 .video_inputs = 2,
1989 .audio_inputs = 0,
1990 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001991 .tuner = UNSET,
1992 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001993 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08001994 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001995 .no_msp34xx = 1,
1996 .no_tda9875 = 1,
1997 .no_tda7432 = 1,
Mauro Carvalho Chehabd2be8932006-10-02 23:52:48 -03001998 .muxsel = { 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001999 .pll = PLL_28,
2000 .no_gpioirq = 1,
2001 .has_dvb = 1,
2002 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002003 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .name = "Formac ProTV II (bt878)",
2005 .video_inputs = 4,
2006 .audio_inputs = 1,
2007 .tuner = 0,
2008 .svhs = 3,
2009 .gpiomask = 2,
2010 /* TV, Comp1, Composite over SVID con, SVID */
Michael Krufkybc286362006-01-11 19:40:17 -02002011 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002012 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002013 .pll = PLL_28,
2014 .has_radio = 1,
2015 .tuner_type = TUNER_PHILIPS_PAL,
2016 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002017 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002018 /* sound routing:
2019 GPIO=0x00,0x01,0x03: mute (?)
2020 0x02: both TV and radio (tuner: FM1216/I)
2021 The card has onboard audio connectors labeled "cdrom" and "board",
2022 not soldered here, though unknown wiring.
2023 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002024 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002025 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002026
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002027 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002028 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002029 .name = "MachTV",
2030 .video_inputs = 3,
2031 .audio_inputs = 1,
2032 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002033 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .gpiomask = 7,
2035 .muxsel = { 2, 3, 1, 1},
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002036 .gpiomux = { 0, 1, 2, 3},
2037 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002038 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002039 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002040 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002041 .radio_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08002042 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002044 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 .name = "Euresys Picolo",
2046 .video_inputs = 3,
2047 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002048 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002049 .svhs = 2,
2050 .gpiomask = 0,
2051 .no_msp34xx = 1,
2052 .no_tda9875 = 1,
2053 .no_tda7432 = 1,
2054 .muxsel = { 2, 0, 1},
2055 .pll = PLL_28,
2056 .tuner_type = UNSET,
2057 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002058 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002059 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002060 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 /* Luc Van Hoeylandt <luc@e-magic.be> */
2062 .name = "ProVideo PV150", /* 0x4f */
2063 .video_inputs = 2,
2064 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002065 .tuner = UNSET,
2066 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002067 .gpiomask = 0,
2068 .muxsel = { 2, 3 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002069 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002070 .needs_tvaudio = 0,
2071 .no_msp34xx = 1,
2072 .pll = PLL_28,
2073 .tuner_type = UNSET,
2074 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002075 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002077 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002078 /* Hiroshi Takekawa <sian@big.or.jp> */
2079 /* This card lacks subsystem ID */
2080 .name = "AD-TVK503", /* 0x63 */
2081 .video_inputs = 4,
2082 .audio_inputs = 1,
2083 .tuner = 0,
2084 .svhs = 2,
2085 .gpiomask = 0x001e8007,
2086 .muxsel = { 2, 3, 1, 0 },
2087 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002088 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
2089 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002090 .needs_tvaudio = 0,
2091 .no_msp34xx = 1,
2092 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002093 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002094 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002095 .radio_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03002096 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002097 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002098
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002100 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002101 .name = "Hercules Smart TV Stereo",
2102 .video_inputs = 4,
2103 .audio_inputs = 1,
2104 .tuner = 0,
2105 .svhs = 2,
2106 .gpiomask = 0x00,
2107 .muxsel = { 2, 3, 1, 1 },
2108 .needs_tvaudio = 1,
2109 .no_msp34xx = 1,
2110 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002111 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002112 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002113 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002114 /* Notes:
2115 - card lacks subsystem ID
2116 - stereo variant w/ daughter board with tda9874a @0xb0
2117 - Audio Routing:
2118 always from tda9874 independent of GPIO (?)
2119 external line in: unknown
2120 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
2121 hef4053 (instead 4052) for unknown function
2122 */
2123 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002124 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002125 .name = "Pace TV & Radio Card",
2126 .video_inputs = 4,
2127 .audio_inputs = 1,
2128 .tuner = 0,
2129 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002130 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002131 .gpiomask = 0,
2132 .no_tda9875 = 1,
2133 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002134 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002135 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002136 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002137 .has_radio = 1,
2138 .pll = PLL_28,
2139 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
2140 only internal line out: (4pin header) RGGL
2141 Radio must be decoded by msp3410d (not routed through)*/
2142 /*
2143 .digital_mode = DIGITAL_MODE_CAMERA, todo!
2144 */
2145 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002146 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002147 /* Chris Willing <chris@vislab.usyd.edu.au> */
2148 .name = "IVC-200",
2149 .video_inputs = 1,
2150 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002151 .tuner = UNSET,
2152 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002153 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002154 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002155 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002156 .gpiomask = 0xdf,
2157 .muxsel = { 2 },
2158 .pll = PLL_28,
2159 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002160 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002161 .name = "Grand X-Guard / Trust 814PCI",
2162 .video_inputs = 16,
2163 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002164 .tuner = UNSET,
2165 .svhs = UNSET,
2166 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002168 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002169 .gpiomask2 = 0xff,
2170 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
2171 .muxsel_hook = xguard_muxsel,
2172 .no_msp34xx = 1,
2173 .no_tda9875 = 1,
2174 .no_tda7432 = 1,
2175 .pll = PLL_28,
2176 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002177
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002178 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002179 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002180 .name = "Nebula Electronics DigiTV",
2181 .video_inputs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002182 .tuner = UNSET,
2183 .svhs = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002184 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002185 .no_msp34xx = 1,
2186 .no_tda9875 = 1,
2187 .no_tda7432 = 1,
2188 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002189 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002190 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002191 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002192 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002193 .has_remote = 1,
2194 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002195 .no_gpioirq = 1,
2196 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002197 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002198 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2199 .name = "ProVideo PV143",
2200 .video_inputs = 4,
2201 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002202 .tuner = UNSET,
2203 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002204 .gpiomask = 0,
2205 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002206 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002207 .needs_tvaudio = 0,
2208 .no_msp34xx = 1,
2209 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002210 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002211 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002212 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002213 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002214 [BTTV_BOARD_VD009X1_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 /* M.Klahr@phytec.de */
2216 .name = "PHYTEC VD-009-X1 MiniDIN (bt878)",
2217 .video_inputs = 4,
2218 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002219 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002220 .svhs = 3,
2221 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002222 .muxsel = { 2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002223 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002224 .needs_tvaudio = 1,
2225 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002226 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002227 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002228 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002230 [BTTV_BOARD_VD009X1_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 .name = "PHYTEC VD-009-X1 Combi (bt878)",
2232 .video_inputs = 4,
2233 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002234 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002235 .svhs = 3,
2236 .gpiomask = 0x00,
Michael Krufkybc286362006-01-11 19:40:17 -02002237 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002238 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002239 .needs_tvaudio = 1,
2240 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002241 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002242 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002243 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002245
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002246 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002247 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002248 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2249 .video_inputs = 10,
2250 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002251 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002252 .svhs = 9,
2253 .gpiomask = 0x00,
2254 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2255 via the upper nibble of muxsel. here: used for
2256 xternal video-mux */
2257 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002258 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002259 .needs_tvaudio = 1,
2260 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002261 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002262 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002263 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002265 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002266 .name = "PHYTEC VD-009 Combi (bt878)",
2267 .video_inputs = 10,
2268 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002269 .tuner = UNSET, /* card has no tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002270 .svhs = 9,
2271 .gpiomask = 0x00,
2272 .gpiomask2 = 0x03, /* gpiomask2 defines the bits used to switch audio
2273 via the upper nibble of muxsel. here: used for
2274 xternal video-mux */
2275 .muxsel = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002276 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002277 .needs_tvaudio = 1,
2278 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002279 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002280 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002281 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002282 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002283 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002284 .name = "IVC-100",
2285 .video_inputs = 4,
2286 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002287 .tuner = UNSET,
2288 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002289 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002290 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002291 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .gpiomask = 0xdf,
2293 .muxsel = { 2, 3, 1, 0 },
2294 .pll = PLL_28,
2295 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002296 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002297 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2298 .name = "IVC-120G",
2299 .video_inputs = 16,
2300 .audio_inputs = 0, /* card has no audio */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002301 .tuner = UNSET, /* card has no tuner */
2302 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002303 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002304 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002305 .svhs = UNSET, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 .needs_tvaudio = 0,
2307 .no_msp34xx = 1,
2308 .no_tda9875 = 1,
2309 .no_tda7432 = 1,
2310 .gpiomask = 0x00,
2311 .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
2312 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
2313 .muxsel_hook = ivc120_muxsel,
2314 .pll = PLL_28,
2315 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002316
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002317 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002318 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002319 .name = "pcHDTV HD-2000 TV",
2320 .video_inputs = 4,
2321 .audio_inputs = 1,
2322 .tuner = 0,
2323 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002324 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002325 .tuner_type = TUNER_PHILIPS_ATSC,
2326 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002327 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002328 .has_dvb = 1,
2329 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002330 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002331 .name = "Twinhan DST + clones",
2332 .no_msp34xx = 1,
2333 .no_tda9875 = 1,
2334 .no_tda7432 = 1,
2335 .tuner_type = TUNER_ABSENT,
2336 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002337 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002338 .no_video = 1,
2339 .has_dvb = 1,
2340 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002341 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002342 .name = "Winfast VC100",
2343 .video_inputs = 3,
2344 .audio_inputs = 0,
2345 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002346 .tuner = UNSET,
Michael Krufkybc286362006-01-11 19:40:17 -02002347 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002348 .no_msp34xx = 1,
2349 .no_tda9875 = 1,
2350 .no_tda7432 = 1,
2351 .tuner_type = TUNER_ABSENT,
2352 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002353 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002354 .pll = PLL_28,
2355 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002356 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002357 .name = "Teppro TEV-560/InterVision IV-560",
2358 .video_inputs = 3,
2359 .audio_inputs = 1,
2360 .tuner = 0,
2361 .svhs = 2,
2362 .gpiomask = 3,
Michael Krufkybc286362006-01-11 19:40:17 -02002363 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002364 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002365 .needs_tvaudio = 1,
2366 .tuner_type = TUNER_PHILIPS_PAL,
2367 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002368 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002369 .pll = PLL_35,
2370 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002371
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002372 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002373 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 .name = "SIMUS GVC1100",
2375 .video_inputs = 4,
2376 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002377 .tuner = UNSET,
2378 .svhs = UNSET,
2379 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002380 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002381 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 .pll = PLL_28,
Michael Krufkybc286362006-01-11 19:40:17 -02002383 .muxsel = { 2, 2, 2, 2 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002384 .gpiomask = 0x3F,
2385 .muxsel_hook = gvc1100_muxsel,
2386 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002387 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002388 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2389 .name = "NGS NGSTV+",
2390 .video_inputs = 3,
2391 .tuner = 0,
2392 .svhs = 2,
2393 .gpiomask = 0x008007,
Michael Krufkybc286362006-01-11 19:40:17 -02002394 .muxsel = { 2, 3, 0, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002395 .gpiomux = { 0, 0, 0, 0 },
2396 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002397 .pll = PLL_28,
2398 .tuner_type = TUNER_PHILIPS_PAL,
2399 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002400 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002401 .has_remote = 1,
2402 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002403 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 /* http://linuxmedialabs.com */
2405 .name = "LMLBT4",
2406 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2407 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002408 .tuner = UNSET,
2409 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002410 .muxsel = { 2, 3, 1, 0 },
2411 .no_msp34xx = 1,
2412 .no_tda9875 = 1,
2413 .no_tda7432 = 1,
2414 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002415 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002416 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002417 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002418 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002419 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002420 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2421 .name = "Tekram M205 PRO",
2422 .video_inputs = 3,
2423 .audio_inputs = 1,
2424 .tuner = 0,
2425 .tuner_type = TUNER_PHILIPS_PAL,
2426 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002427 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002428 .svhs = 2,
2429 .needs_tvaudio = 0,
2430 .gpiomask = 0x68,
Michael Krufkybc286362006-01-11 19:40:17 -02002431 .muxsel = { 2, 3, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002432 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002433 .pll = PLL_28,
2434 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002435
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002436 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002437 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002438 /* Javier Cendan Ares <jcendan@lycos.es> */
2439 /* bt878 TV + FM without subsystem ID */
2440 .name = "Conceptronic CONTVFMi",
2441 .video_inputs = 3,
2442 .audio_inputs = 1,
2443 .tuner = 0,
2444 .svhs = 2,
2445 .gpiomask = 0x008007,
2446 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002447 .gpiomux = { 0, 1, 2, 2 },
2448 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002449 .needs_tvaudio = 0,
2450 .pll = PLL_28,
2451 .tuner_type = TUNER_PHILIPS_PAL,
2452 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002453 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002454 .has_remote = 1,
2455 .has_radio = 1,
2456 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002457 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002458 /*Eric DEBIEF <debief@telemsa.com>*/
2459 /*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 -08002460 /* 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 -08002461 /*0x79 in bttv.h*/
2462 .name = "Euresys Picolo Tetra",
2463 .video_inputs = 4,
2464 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002465 .tuner = UNSET,
2466 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002467 .gpiomask = 0,
2468 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2469 .no_msp34xx = 1,
2470 .no_tda9875 = 1,
2471 .no_tda7432 = 1,
2472 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002473 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002474 .pll = PLL_28,
2475 .needs_tvaudio = 0,
2476 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002477 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002478 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002479 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002480 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002481 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002482 /* Spirit TV Tuner from http://spiritmodems.com.au */
2483 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2484 .name = "Spirit TV Tuner",
2485 .video_inputs = 3,
2486 .audio_inputs = 1,
2487 .tuner = 0,
2488 .svhs = 2,
2489 .gpiomask = 0x0000000f,
2490 .muxsel = { 2, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002491 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002492 .tuner_type = TUNER_TEMIC_PAL,
2493 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002494 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002495 .no_msp34xx = 1,
2496 .no_tda9875 = 1,
2497 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002498 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002499 /* Wolfram Joost <wojo@frokaschwei.de> */
2500 .name = "AVerMedia AVerTV DVB-T 771",
2501 .video_inputs = 2,
2502 .svhs = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002503 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002504 .tuner_type = TUNER_ABSENT,
2505 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002506 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002507 .muxsel = { 3 , 3 },
2508 .no_msp34xx = 1,
2509 .no_tda9875 = 1,
2510 .no_tda7432 = 1,
2511 .pll = PLL_28,
2512 .has_dvb = 1,
2513 .no_gpioirq = 1,
2514 .has_remote = 1,
2515 },
2516 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002517 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002518 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002519 /* 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 -08002520 .name = "AverMedia AverTV DVB-T 761",
2521 .video_inputs = 2,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002522 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002523 .svhs = 1,
Michael Krufkybc286362006-01-11 19:40:17 -02002524 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002525 .no_msp34xx = 1,
2526 .no_tda9875 = 1,
2527 .no_tda7432 = 1,
2528 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002529 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002530 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002531 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002532 .has_dvb = 1,
2533 .no_gpioirq = 1,
2534 .has_remote = 1,
2535 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002536 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 /* andre.schwarz@matrix-vision.de */
2538 .name = "MATRIX Vision Sigma-SQ",
2539 .video_inputs = 16,
2540 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002541 .tuner = UNSET,
2542 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002543 .gpiomask = 0x0,
2544 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2,
2545 3, 3, 3, 3, 3, 3, 3, 3 },
2546 .muxsel_hook = sigmaSQ_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002547 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002548 .no_msp34xx = 1,
2549 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002550 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002551 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002552 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002553 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002554 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002555 /* andre.schwarz@matrix-vision.de */
2556 .name = "MATRIX Vision Sigma-SLC",
2557 .video_inputs = 4,
2558 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002559 .tuner = UNSET,
2560 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002561 .gpiomask = 0x0,
2562 .muxsel = { 2, 2, 2, 2 },
2563 .muxsel_hook = sigmaSLC_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002564 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002565 .no_msp34xx = 1,
2566 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002567 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002568 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002569 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002570 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002571 /* BTTV_BOARD_APAC_VIEWCOMP */
2572 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002573 /* Attila Kondoros <attila.kondoros@chello.hu> */
2574 /* bt878 TV + FM 0x00000000 subsystem ID */
2575 .name = "APAC Viewcomp 878(AMAX)",
2576 .video_inputs = 2,
2577 .audio_inputs = 1,
2578 .tuner = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002579 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002580 .gpiomask = 0xFF,
Michael Krufkybc286362006-01-11 19:40:17 -02002581 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002582 .gpiomux = { 2, 0, 0, 0 },
2583 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002584 .needs_tvaudio = 0,
2585 .pll = PLL_28,
2586 .tuner_type = TUNER_PHILIPS_PAL,
2587 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002588 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002589 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2590 .has_radio = 1, /* not every card has radio */
2591 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002592
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002593 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002594 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002595 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2596 .name = "DViCO FusionHDTV DVB-T Lite",
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002597 .tuner = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002598 .no_msp34xx = 1,
2599 .no_tda9875 = 1,
2600 .no_tda7432 = 1,
2601 .pll = PLL_28,
2602 .no_video = 1,
2603 .has_dvb = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002604 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002605 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002606 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002607 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002608 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002609 /* Steven <photon38@pchome.com.tw> */
2610 .name = "V-Gear MyVCD",
2611 .video_inputs = 3,
2612 .audio_inputs = 1,
2613 .tuner = 0,
2614 .svhs = 2,
2615 .gpiomask = 0x3f,
Michael Krufkybc286362006-01-11 19:40:17 -02002616 .muxsel = {2, 3, 1, 0 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002617 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2618 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002619 .no_msp34xx = 1,
2620 .pll = PLL_28,
2621 .tuner_type = TUNER_PHILIPS_NTSC_M,
2622 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002623 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002624 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002625 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002626 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002627 /* Rick C <cryptdragoon@gmail.com> */
2628 .name = "Super TV Tuner",
2629 .video_inputs = 4,
2630 .audio_inputs = 1,
2631 .tuner = 0,
2632 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002633 .muxsel = { 2, 3, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002634 .tuner_type = TUNER_PHILIPS_NTSC,
2635 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002636 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002637 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002638 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002639 .needs_tvaudio = 1,
2640 .has_radio = 1,
2641 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002642 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002643 /* Chris Fanning <video4linux@haydon.net> */
2644 .name = "Tibet Systems 'Progress DVR' CS16",
2645 .video_inputs = 16,
2646 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002647 .tuner = UNSET,
2648 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002649 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
2650 .pll = PLL_28,
2651 .no_msp34xx = 1,
2652 .no_tda9875 = 1,
2653 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002654 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002655 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002656 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002657 .muxsel_hook = tibetCS16_muxsel,
2658 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002659 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002660 /* Bill Brack <wbrack@mmm.com.hk> */
2661 /*
2662 * Note that, because of the card's wiring, the "master"
2663 * BT878A chip (i.e. the one which controls the analog switch
2664 * and must use this card type) is the 2nd one detected. The
2665 * other 3 chips should use card type 0x85, whose description
2666 * follows this one. There is a EEPROM on the card (which is
2667 * connected to the I2C of one of those other chips), but is
2668 * not currently handled. There is also a facility for a
2669 * "monitor", which is also not currently implemented.
2670 */
2671 .name = "Kodicom 4400R (master)",
2672 .video_inputs = 16,
2673 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002674 .tuner = UNSET,
2675 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002676 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002677 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002678 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002679 /* GPIO bits 0-9 used for analog switch:
2680 * 00 - 03: camera selector
2681 * 04 - 06: channel (controller) selector
2682 * 07: data (1->on, 0->off)
2683 * 08: strobe
2684 * 09: reset
2685 * bit 16 is input from sync separator for the channel
2686 */
2687 .gpiomask = 0x0003ff,
2688 .no_gpioirq = 1,
2689 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2690 .pll = PLL_28,
2691 .no_msp34xx = 1,
2692 .no_tda7432 = 1,
2693 .no_tda9875 = 1,
2694 .muxsel_hook = kodicom4400r_muxsel,
2695 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002696 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002697 /* Bill Brack <wbrack@mmm.com.hk> */
2698 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2699 * one which controls the analog switch, and must use the card type)
2700 * is the 2nd one detected. The other 3 chips should use this card
2701 * type
2702 */
2703 .name = "Kodicom 4400R (slave)",
2704 .video_inputs = 16,
2705 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002706 .tuner = UNSET,
2707 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002708 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002709 .radio_addr = ADDR_UNSET,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002710 .svhs = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002711 .gpiomask = 0x010000,
2712 .no_gpioirq = 1,
2713 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
2714 .pll = PLL_28,
2715 .no_msp34xx = 1,
2716 .no_tda7432 = 1,
2717 .no_tda9875 = 1,
2718 .muxsel_hook = kodicom4400r_muxsel,
2719 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002720 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002721 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002722 /* Michael Henson <mhenson@clarityvi.com> */
2723 /* Adlink RTV24 with special unlock codes */
2724 .name = "Adlink RTV24",
2725 .video_inputs = 4,
2726 .audio_inputs = 1,
2727 .tuner = 0,
2728 .svhs = 2,
Michael Krufkybc286362006-01-11 19:40:17 -02002729 .muxsel = { 2, 3, 1, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002730 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002731 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002732 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002733 .pll = PLL_28,
2734 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002735 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002736 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002737 /* Michael Krufky <mkrufky@m1k.net> */
2738 .name = "DViCO FusionHDTV 5 Lite",
2739 .tuner = 0,
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002740 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002741 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002742 .radio_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002743 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002744 .audio_inputs = 1,
2745 .svhs = 2,
Michael Krufky4b017412005-11-08 21:37:06 -08002746 .muxsel = { 2, 3, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002747 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002748 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2749 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002750 .no_msp34xx = 1,
2751 .no_tda9875 = 1,
2752 .no_tda7432 = 1,
2753 .has_dvb = 1,
2754 },
2755 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002756 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002757 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002758 .name = "Acorp Y878F",
2759 .video_inputs = 3,
2760 .audio_inputs = 1,
2761 .tuner = 0,
2762 .svhs = 2,
2763 .gpiomask = 0x01fe00,
Michael Krufkybc286362006-01-11 19:40:17 -02002764 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002765 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2766 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002767 .needs_tvaudio = 1,
2768 .pll = PLL_28,
2769 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2770 .tuner_addr = 0xc1 >>1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002771 .radio_addr = 0xc1 >>1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002772 .has_radio = 1,
2773 },
2774 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002775 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002776 .name = "Conceptronic CTVFMi v2",
2777 .video_inputs = 3,
2778 .audio_inputs = 1,
2779 .tuner = 0,
2780 .svhs = 2,
2781 .gpiomask = 0x001c0007,
2782 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002783 .gpiomux = { 0, 1, 2, 2 },
2784 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002785 .needs_tvaudio = 0,
2786 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002787 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002788 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002789 .radio_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002790 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002791 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002792 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002793 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002794 [BTTV_BOARD_PV_BT878P_2E] = {
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002795 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2796 .video_inputs = 5,
2797 .audio_inputs = 1,
2798 .tuner = 0,
2799 .svhs = 3,
2800 .gpiomask = 0x01fe00,
2801 .muxsel = { 2,3,1,1,-1 },
2802 .digital_mode = DIGITAL_MODE_CAMERA,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002803 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2804 .gpiomute = 0x12400,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002805 .no_msp34xx = 1,
2806 .pll = PLL_28,
2807 .tuner_type = TUNER_LG_PAL_FM,
2808 .tuner_addr = ADDR_UNSET,
2809 .radio_addr = ADDR_UNSET,
2810 .has_remote = 1,
2811 },
2812 /* ---- card 0x8b ---------------------------------- */
2813 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002814 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002815 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2816 .video_inputs = 3,
2817 .audio_inputs = 1,
2818 .tuner = 0,
2819 .svhs = 2,
2820 .gpiomask = 0x3f,
2821 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002822 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2823 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002824 .no_msp34xx = 1,
2825 .pll = PLL_28,
2826 .tuner_type = TUNER_YMEC_TVF_5533MF,
2827 .tuner_addr = ADDR_UNSET,
2828 .radio_addr = ADDR_UNSET,
2829 .has_radio = 1,
2830 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002831 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002832 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002833 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2834 one external BNC composite input (mux 2)
2835 three internal composite inputs (unknown muxes)
2836 an 18-bit stereo A/D (CS5331A), which has:
2837 one external stereo unblanced (RCA) audio connection
2838 one (or 3?) internal stereo balanced (XLR) audio connection
2839 input is selected via gpio to a 14052B mux
2840 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2841 gain is controlled via an X9221A chip on the I2C bus @0x28
2842 sample rate is controlled via gpio to an MK1413S
2843 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2844 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002845 [BTTV_BOARD_OSPREY440] = {
2846 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002847 .video_inputs = 4,
2848 .audio_inputs = 2, /* this is meaningless */
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002849 .tuner = UNSET,
Trent Piephocf784d52007-07-21 21:26:40 -03002850 .svhs = UNSET,
2851 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
2852 .gpiomask = 0x303,
2853 .gpiomute = 0x000, /* int + 32kHz */
2854 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002855 .pll = PLL_28,
2856 .tuner_type = UNSET,
2857 .tuner_addr = ADDR_UNSET,
2858 .radio_addr = ADDR_UNSET,
2859 .no_msp34xx = 1,
2860 .no_tda9875 = 1,
2861 .no_tda7432 = 1,
2862 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002863 /* ---- card 0x8d ---------------------------------- */
2864 [BTTV_BOARD_ASOUND_SKYEYE] = {
2865 .name = "Asound Skyeye PCTV",
2866 .video_inputs = 3,
2867 .audio_inputs = 1,
2868 .tuner = 0,
2869 .svhs = 2,
2870 .gpiomask = 15,
Michael Krufkybc286362006-01-11 19:40:17 -02002871 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002872 .gpiomux = { 2, 0, 0, 0 },
2873 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002874 .needs_tvaudio = 1,
2875 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002876 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002877 .tuner_addr = ADDR_UNSET,
2878 .radio_addr = ADDR_UNSET,
2879 },
Bill Pechter633323f2005-11-13 16:07:50 -08002880 /* ---- card 0x8e ---------------------------------- */
2881 [BTTV_BOARD_SABRENT_TVFM] = {
2882 .name = "Sabrent TV-FM (bttv version)",
2883 .video_inputs = 3,
2884 .audio_inputs = 1,
2885 .tuner = 0,
2886 .svhs = 2,
2887 .gpiomask = 0x108007,
Michael Krufkybc286362006-01-11 19:40:17 -02002888 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002889 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002890 .no_msp34xx = 1,
2891 .no_tda9875 = 1,
2892 .no_tda7432 = 1,
2893 .pll = PLL_28,
2894 .tuner_type = TUNER_TNF_5335MF,
2895 .tuner_addr = ADDR_UNSET,
2896 .has_radio = 1,
2897 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002898 /* ---- card 0x8f ---------------------------------- */
2899 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2900 .name = "Hauppauge ImpactVCB (bt878)",
2901 .video_inputs = 4,
2902 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002903 .tuner = UNSET,
2904 .svhs = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002905 .gpiomask = 0x0f, /* old: 7 */
Michael Krufkybc286362006-01-11 19:40:17 -02002906 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002907 .no_msp34xx = 1,
2908 .no_tda9875 = 1,
2909 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002910 .tuner_type = UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002911 .tuner_addr = ADDR_UNSET,
2912 .radio_addr = ADDR_UNSET,
2913 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002914 [BTTV_BOARD_MACHTV_MAGICTV] = {
2915 /* Julian Calaby <julian.calaby@gmail.com>
2916 * Slightly different from original MachTV definition (0x60)
2917
2918 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2919 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2920 * properly (methinks) causing no keyup bits being set */
2921
2922 .name = "MagicTV", /* rebranded MachTV */
2923 .video_inputs = 3,
2924 .audio_inputs = 1,
2925 .tuner = 0,
2926 .svhs = 2,
2927 .gpiomask = 7,
2928 .muxsel = { 2, 3, 1, 1 },
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002929 .gpiomux = { 0, 1, 2, 3 },
2930 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002931 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2932 .tuner_addr = ADDR_UNSET,
2933 .radio_addr = ADDR_UNSET,
2934 .pll = PLL_28,
2935 .has_radio = 1,
2936 .has_remote = 1,
2937 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002938 [BTTV_BOARD_SSAI_SECURITY] = {
2939 .name = "SSAI Security Video Interface",
2940 .video_inputs = 4,
2941 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002942 .tuner = UNSET,
2943 .svhs = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002944 .muxsel = { 0, 1, 2, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002945 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002946 .tuner_addr = ADDR_UNSET,
2947 .radio_addr = ADDR_UNSET,
2948 },
2949 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2950 .name = "SSAI Ultrasound Video Interface",
2951 .video_inputs = 2,
2952 .audio_inputs = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002953 .tuner = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002954 .svhs = 1,
2955 .muxsel = { 2, 0, 1, 3 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002956 .tuner_type = UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002957 .tuner_addr = ADDR_UNSET,
2958 .radio_addr = ADDR_UNSET,
2959 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002960 /* ---- card 0x94---------------------------------- */
2961 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2962 .name = "DViCO FusionHDTV 2",
2963 .tuner = 0,
2964 .tuner_type = TUNER_PHILIPS_ATSC, /* FCV1236D */
2965 .tuner_addr = ADDR_UNSET,
2966 .radio_addr = ADDR_UNSET,
2967 .video_inputs = 3,
2968 .audio_inputs = 1,
2969 .svhs = 2,
2970 .muxsel = { 2, 3, 1 },
2971 .gpiomask = 0x00e00007,
2972 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2973 .gpiomute = 0x00c00007,
2974 .no_msp34xx = 1,
2975 .no_tda9875 = 1,
2976 .no_tda7432 = 1,
2977 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002978 /* ---- card 0x95---------------------------------- */
2979 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2980 .name = "Typhoon TV-Tuner PCI (50684)",
2981 .video_inputs = 3,
2982 .audio_inputs = 1,
2983 .tuner = 0,
2984 .svhs = 2,
2985 .gpiomask = 0x3014f,
2986 .muxsel = { 2, 3, 1, 1 },
2987 .gpiomux = { 0x20001,0x10001, 0, 0 },
2988 .gpiomute = 10,
2989 .needs_tvaudio = 1,
2990 .pll = PLL_28,
2991 .tuner_type = TUNER_PHILIPS_PAL_I,
2992 .tuner_addr = ADDR_UNSET,
2993 .radio_addr = ADDR_UNSET,
2994 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002995};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002996
2997static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2998
2999/* ----------------------------------------------------------------------- */
3000
3001static unsigned char eeprom_data[256];
3002
3003/*
3004 * identify card
3005 */
3006void __devinit bttv_idcard(struct bttv *btv)
3007{
3008 unsigned int gpiobits;
3009 int i,type;
3010 unsigned short tmp;
3011
3012 /* read PCI subsystem ID */
3013 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
3014 btv->cardid = tmp << 16;
3015 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
3016 btv->cardid |= tmp;
3017
3018 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
3019 /* look for the card */
3020 for (type = -1, i = 0; cards[i].id != 0; i++)
3021 if (cards[i].id == btv->cardid)
3022 type = i;
3023
3024 if (type != -1) {
3025 /* found it */
3026 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
3027 "PCI subsystem ID is %04x:%04x\n",
3028 btv->c.nr,cards[type].name,cards[type].cardnr,
3029 btv->cardid & 0xffff,
3030 (btv->cardid >> 16) & 0xffff);
3031 btv->c.type = cards[type].cardnr;
3032 } else {
3033 /* 404 */
3034 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
3035 btv->c.nr, btv->cardid & 0xffff,
3036 (btv->cardid >> 16) & 0xffff);
3037 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08003038 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003039 }
3040 }
3041
3042 /* let the user override the autodetected type */
3043 if (card[btv->c.nr] < bttv_num_tvcards)
3044 btv->c.type=card[btv->c.nr];
3045
3046 /* print which card config we are using */
3047 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
3048 bttv_tvcards[btv->c.type].name, btv->c.type,
3049 card[btv->c.nr] < bttv_num_tvcards
3050 ? "insmod option" : "autodetected");
3051
3052 /* overwrite gpio stuff ?? */
3053 if (UNSET == audioall && UNSET == audiomux[0])
3054 return;
3055
3056 if (UNSET != audiomux[0]) {
3057 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003058 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003059 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003060 gpiobits |= audiomux[i];
3061 }
3062 } else {
3063 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003064 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003065 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003066 }
3067 }
3068 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
3069 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
3070 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03003071 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003072 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003073 }
3074 printk("\n");
3075}
3076
3077/*
3078 * (most) board specific initialisations goes here
3079 */
3080
3081/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08003082static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003083{
3084 int type = -1;
3085
3086 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003087 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003088 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003089 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003090 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003091 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003092
3093 if (-1 != type) {
3094 btv->c.type = type;
3095 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
3096 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3097 }
3098}
3099
3100static void flyvideo_gpio(struct bttv *btv)
3101{
3102 int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003103 int tuner=UNSET,ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003104
3105 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003106 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003107 gpio = gpio_read();
3108 /* FIXME: must restore OUR_EN ??? */
3109
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003110 /* all cards provide GPIO info, some have an additional eeprom
3111 * LR50: GPIO coding can be found lower right CP1 .. CP9
3112 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3113 * GPIO14-12: n.c.
3114 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003115
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003116 * lowest 3 bytes are remote control codes (no handshake needed)
3117 * xxxFFF: No remote control chip soldered
3118 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3119 * Note: Some bits are Audio_Mask !
3120 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003121 ttype=(gpio&0x0f0000)>>16;
3122 switch(ttype) {
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003123 case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003124 break;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003125 case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003126 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003127 case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003128 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003129 case 0x6: tuner=37;/* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003130 break;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003131 case 0xC: tuner=3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003132 break;
3133 default:
3134 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3135 }
3136
3137 has_remote = gpio & 0x800000;
3138 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003139 /* unknown 0x200000;
3140 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003141 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003142 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003143 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3144 /*
3145 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003146
3147 if(is_capture_only)
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003148 tuner = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003149
3150 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3151 btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
3152 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3153 btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
3154 is_capture_only?"yes":"no ");
3155
Trent Piepho8c2c0df2007-06-28 18:30:36 -03003156 if (tuner != UNSET) /* only set if known tuner autodetected, else let insmod option through */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003157 btv->tuner_type = tuner;
3158 btv->has_radio = has_radio;
3159
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003160 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3161 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3162 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003163 if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
3164 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003165}
3166
3167static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3168 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3169static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3170 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3171
3172static void miro_pinnacle_gpio(struct bttv *btv)
3173{
3174 int id,msp,gpio;
3175 char *info;
3176
3177 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003178 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003179 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003180 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003181 if (id < 32) {
3182 btv->tuner_type = miro_tunermap[id];
3183 if (0 == (gpio & 0x20)) {
3184 btv->has_radio = 1;
3185 if (!miro_fmtuner[id]) {
3186 btv->has_matchbox = 1;
3187 btv->mbox_we = (1<<6);
3188 btv->mbox_most = (1<<7);
3189 btv->mbox_clk = (1<<8);
3190 btv->mbox_data = (1<<9);
3191 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3192 }
3193 } else {
3194 btv->has_radio = 0;
3195 }
3196 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003197 if (btv->c.type == BTTV_BOARD_MIRO)
3198 btv->c.type = BTTV_BOARD_MIROPRO;
3199 if (btv->c.type == BTTV_BOARD_PINNACLE)
3200 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003201 }
3202 printk(KERN_INFO
3203 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3204 btv->c.nr, id+1, btv->tuner_type,
3205 !btv->has_radio ? "no" :
3206 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3207 (-1 == msp) ? "no" : "yes");
3208 } else {
3209 /* new cards with microtune tuner */
3210 id = 63 - id;
3211 btv->has_radio = 0;
3212 switch (id) {
3213 case 1:
3214 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003215 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003216 break;
3217 case 2:
3218 info = "PAL+SECAM / stereo";
3219 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003220 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003221 break;
3222 case 3:
3223 info = "NTSC / stereo";
3224 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003225 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003226 break;
3227 case 4:
3228 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003229 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003230 break;
3231 case 5:
3232 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003233 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003234 break;
3235 case 6:
3236 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003237 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003238 break;
3239 case 7:
3240 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003241 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003242 break;
3243 default:
3244 info = "oops: unknown card";
3245 break;
3246 }
3247 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003248 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003249 printk(KERN_INFO
3250 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3251 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003252 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003253 }
3254}
3255
3256/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3257#define LM1882_SYNC_DRIVE 0x200000L
3258
3259static void init_ids_eagle(struct bttv *btv)
3260{
3261 gpio_inout(0xffffff,0xFFFF37);
3262 gpio_write(0x200020);
3263
3264 /* flash strobe inverter ?! */
3265 gpio_write(0x200024);
3266
3267 /* switch sync drive off */
3268 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3269
3270 /* set BT848 muxel to 2 */
3271 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3272}
3273
3274/* Muxsel helper for the IDS Eagle.
3275 * the eagles does not use the standard muxsel-bits but
3276 * has its own multiplexer */
3277static void eagle_muxsel(struct bttv *btv, unsigned int input)
3278{
3279 btaor((2)<<5, ~(3<<5), BT848_IFORM);
3280 gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
3281
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003282 /* composite */
3283 /* set chroma ADC to sleep */
3284 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3285 /* set to composite video */
3286 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3287 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003288
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003289 /* switch sync drive off */
3290 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003291}
3292
3293static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3294{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003295 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003296 gpio_write(masks[input%4]);
3297}
3298
3299/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3300 alarms output
3301
3302 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3303 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3304
3305 IN - sensor inputs, INx - sensor inputs and TI XORed together
3306 O1,O2,O3 - alarm outputs (relays)
3307
3308 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3309
3310*/
3311
3312static void init_lmlbt4x(struct bttv *btv)
3313{
3314 printk(KERN_DEBUG "LMLBT4x init\n");
3315 btwrite(0x000000, BT848_GPIO_REG_INP);
3316 gpio_inout(0xffffff, 0x0006C0);
3317 gpio_write(0x000000);
3318}
3319
3320static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3321{
3322 unsigned int inmux = input % 8;
3323 gpio_inout( 0xf, 0xf );
3324 gpio_bits( 0xf, inmux );
3325}
3326
3327static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3328{
3329 unsigned int inmux = input % 4;
3330 gpio_inout( 3<<9, 3<<9 );
3331 gpio_bits( 3<<9, inmux<<9 );
3332}
3333
3334/* ----------------------------------------------------------------------- */
3335
3336static void bttv_reset_audio(struct bttv *btv)
3337{
3338 /*
3339 * BT878A has a audio-reset register.
3340 * 1. This register is an audio reset function but it is in
3341 * function-0 (video capture) address space.
3342 * 2. It is enough to do this once per power-up of the card.
3343 * 3. There is a typo in the Conexant doc -- it is not at
3344 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3345 * --//Shrikumar 030609
3346 */
3347 if (btv->id != 878)
3348 return;
3349
3350 if (bttv_debug)
3351 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3352 btwrite((1<<7), 0x058);
3353 udelay(10);
3354 btwrite( 0, 0x058);
3355}
3356
3357/* initialization part one -- before registering i2c bus */
3358void __devinit bttv_init_card1(struct bttv *btv)
3359{
3360 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003361 case BTTV_BOARD_HAUPPAUGE:
3362 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003363 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003364 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003365 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003366 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003367 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003368 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003369 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003370 boot_msp34xx(btv,11);
3371 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003372 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003373 pvr_boot(btv);
3374 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003375 case BTTV_BOARD_TWINHAN_DST:
3376 case BTTV_BOARD_AVDVBT_771:
3377 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003378 btv->use_i2c_hw = 1;
3379 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003380 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003381 init_RTV24( btv );
3382 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003383
Linus Torvalds1da177e2005-04-16 15:20:36 -07003384 }
3385 if (!bttv_tvcards[btv->c.type].has_dvb)
3386 bttv_reset_audio(btv);
3387}
3388
3389/* initialization part two -- after registering i2c bus */
3390void __devinit bttv_init_card2(struct bttv *btv)
3391{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003392 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003393
Trent Piephoac7dc842007-06-28 17:51:08 -03003394 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003395
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003396 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003397 bttv_readee(btv,eeprom_data,0xa0);
3398 identify_by_eeprom(btv,eeprom_data);
3399 }
3400
3401 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003402 case BTTV_BOARD_MIRO:
3403 case BTTV_BOARD_MIROPRO:
3404 case BTTV_BOARD_PINNACLE:
3405 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003406 /* miro/pinnacle */
3407 miro_pinnacle_gpio(btv);
3408 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003409 case BTTV_BOARD_FLYVIDEO_98:
3410 case BTTV_BOARD_MAXI:
3411 case BTTV_BOARD_LIFE_FLYKIT:
3412 case BTTV_BOARD_FLYVIDEO:
3413 case BTTV_BOARD_TYPHOON_TVIEW:
3414 case BTTV_BOARD_CHRONOS_VS2:
3415 case BTTV_BOARD_FLYVIDEO_98FM:
3416 case BTTV_BOARD_FLYVIDEO2000:
3417 case BTTV_BOARD_FLYVIDEO98EZ:
3418 case BTTV_BOARD_CONFERENCETV:
3419 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 flyvideo_gpio(btv);
3421 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003422 case BTTV_BOARD_HAUPPAUGE:
3423 case BTTV_BOARD_HAUPPAUGE878:
3424 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003425 /* pick up some config infos from the eeprom */
3426 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003427 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003428 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003429 case BTTV_BOARD_AVERMEDIA98:
3430 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003431 bttv_readee(btv,eeprom_data,0xa0);
3432 avermedia_eeprom(btv);
3433 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003434 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003435 init_PXC200(btv);
3436 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003437 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003438 picolo_tetra_init(btv);
3439 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003440 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003441 btv->has_radio = 1;
3442 btv->has_matchbox = 1;
3443 btv->mbox_we = 0x20;
3444 btv->mbox_most = 0;
3445 btv->mbox_clk = 0x08;
3446 btv->mbox_data = 0x10;
3447 btv->mbox_mask = 0x38;
3448 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003449 case BTTV_BOARD_VOBIS_BOOSTAR:
3450 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003451 terratec_active_radio_upgrade(btv);
3452 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003453 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003454 if (btv->cardid == 0x3002144f) {
3455 btv->has_radio=1;
3456 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3457 }
3458 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003459 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003460 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003461 /* Fix up entry for 3DFX VoodooTV 100,
3462 which is an OEM STB card variant. */
3463 btv->has_radio=0;
3464 btv->tuner_type=TUNER_TEMIC_NTSC;
3465 }
3466 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003467 case BTTV_BOARD_OSPREY1x0:
3468 case BTTV_BOARD_OSPREY1x0_848:
3469 case BTTV_BOARD_OSPREY101_848:
3470 case BTTV_BOARD_OSPREY1x1:
3471 case BTTV_BOARD_OSPREY1x1_SVID:
3472 case BTTV_BOARD_OSPREY2xx:
3473 case BTTV_BOARD_OSPREY2x0_SVID:
3474 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003475 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003476 case BTTV_BOARD_OSPREY500:
3477 case BTTV_BOARD_OSPREY540:
3478 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003479 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003480 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003481 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003482 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003483 init_ids_eagle(btv);
3484 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003485 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003486 bttv_readee(btv,eeprom_data,0xa0);
3487 modtec_eeprom(btv);
3488 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003489 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003490 init_lmlbt4x(btv);
3491 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003492 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003493 tibetCS16_init(btv);
3494 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003495 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003496 kodicom4400r_init(btv);
3497 break;
3498 }
3499
3500 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003501 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003502 /* defaults from card list */
3503 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3504 btv->pll.pll_ifreq=28636363;
3505 btv->pll.pll_crystal=BT848_IFORM_XT0;
3506 }
3507 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3508 btv->pll.pll_ifreq=35468950;
3509 btv->pll.pll_crystal=BT848_IFORM_XT1;
3510 }
3511 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003512 switch (pll[btv->c.nr]) {
3513 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003514 btv->pll.pll_crystal = 0;
3515 btv->pll.pll_ifreq = 0;
3516 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003517 break;
3518 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003519 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003520 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003521 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003522 btv->pll.pll_crystal = BT848_IFORM_XT0;
3523 break;
3524 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003525 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003526 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003527 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003528 btv->pll.pll_crystal = BT848_IFORM_XT1;
3529 break;
3530 }
3531 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003532 btv->pll.pll_current = -1;
3533
Linus Torvalds1da177e2005-04-16 15:20:36 -07003534 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003535 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3536 addr = bttv_tvcards[btv->c.type].tuner_addr;
3537
3538 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003539 if(UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003540 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003541 if (UNSET != tuner[btv->c.nr])
3542 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003543
3544 if (btv->tuner_type == TUNER_ABSENT ||
3545 bttv_tvcards[btv->c.type].tuner == UNSET)
3546 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3547 else if(btv->tuner_type == UNSET)
3548 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3549 else
3550 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3551 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003552
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003553 if (btv->tuner_type != UNSET) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003554 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003555
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003556 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003557 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003558 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003559
3560 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3561 }
3562
Hans Verkuil39e8f402006-01-09 15:25:16 -02003563 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003564 struct v4l2_priv_tun_config tda9887_cfg;
3565
3566 tda9887_cfg.tuner = TUNER_TDA9887;
3567 tda9887_cfg.priv = &btv->tda9887_conf;
3568
3569 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003570 }
3571
Linus Torvalds1da177e2005-04-16 15:20:36 -07003572 btv->svhs = bttv_tvcards[btv->c.type].svhs;
3573 if (svhs[btv->c.nr] != UNSET)
3574 btv->svhs = svhs[btv->c.nr];
3575 if (remote[btv->c.nr] != UNSET)
3576 btv->has_remote = remote[btv->c.nr];
3577
3578 if (bttv_tvcards[btv->c.type].has_radio)
3579 btv->has_radio=1;
3580 if (bttv_tvcards[btv->c.type].has_remote)
3581 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003582 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3583 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003584 if (bttv_tvcards[btv->c.type].volume_gpio)
3585 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3586 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3587 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003588
3589 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3590 /* detect Bt832 chip for quartzsight digital camera */
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003591 if ((bttv_I2CRead(btv, I2C_ADDR_BT832_ALT1, "Bt832") >=0) ||
3592 (bttv_I2CRead(btv, I2C_ADDR_BT832_ALT2, "Bt832") >=0))
Linus Torvalds1da177e2005-04-16 15:20:36 -07003593 boot_bt832(btv);
3594 }
3595
3596 if (!autoload)
3597 return;
3598
Trent Piephoac7dc842007-06-28 17:51:08 -03003599 if (bttv_tvcards[btv->c.type].tuner == UNSET)
3600 return; /* no tuner or related drivers to load */
3601
Linus Torvalds1da177e2005-04-16 15:20:36 -07003602 /* try to detect audio/fader chips */
3603 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003604 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003605 request_module("msp3400");
3606
3607 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003608 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003609 request_module("msp3400");
3610
3611 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003612 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003613 request_module("tda9875");
3614
3615 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003616 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003617 request_module("tda7432");
3618
3619 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3620 request_module("tvaudio");
3621
Trent Piephoac7dc842007-06-28 17:51:08 -03003622 if (btv->tuner_type != UNSET && btv->tuner_type != TUNER_ABSENT)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003623 request_module("tuner");
3624}
3625
3626
3627/* ----------------------------------------------------------------------- */
3628
3629static void modtec_eeprom(struct bttv *btv)
3630{
3631 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3632 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3633 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3634 btv->c.nr,&eeprom_data[0x1e]);
3635 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3636 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3637 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003638 btv->c.nr,&eeprom_data[0x1e]);
3639 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3640 btv->tuner_type=TUNER_PHILIPS_NTSC;
3641 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3642 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003643 } else {
3644 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3645 btv->c.nr,&eeprom_data[0x1e]);
3646 }
3647}
3648
3649static void __devinit hauppauge_eeprom(struct bttv *btv)
3650{
3651 struct tveeprom tv;
3652
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003653 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003654 btv->tuner_type = tv.tuner_type;
3655 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003656
3657 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3658 btv->c.nr, tv.model);
3659
3660 /*
3661 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3662 * type based on model #.
3663 */
3664 if(tv.model == 64900) {
3665 printk("bttv%d: Switching board type from %s to %s\n",
3666 btv->c.nr,
3667 bttv_tvcards[btv->c.type].name,
3668 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3669 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3670 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003671}
3672
3673static int terratec_active_radio_upgrade(struct bttv *btv)
3674{
3675 int freq;
3676
3677 btv->has_radio = 1;
3678 btv->has_matchbox = 1;
3679 btv->mbox_we = 0x10;
3680 btv->mbox_most = 0x20;
3681 btv->mbox_clk = 0x08;
3682 btv->mbox_data = 0x04;
3683 btv->mbox_mask = 0x3c;
3684
3685 btv->mbox_iow = 1 << 8;
3686 btv->mbox_ior = 1 << 9;
3687 btv->mbox_csel = 1 << 10;
3688
3689 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003690 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003691 if (0x1ed8 == tea5757_read(btv)) {
3692 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3693 btv->c.nr);
3694 btv->has_radio = 1;
3695 btv->has_matchbox = 1;
3696 } else {
3697 btv->has_radio = 0;
3698 btv->has_matchbox = 0;
3699 }
3700 return 0;
3701}
3702
3703
3704/* ----------------------------------------------------------------------- */
3705
3706/*
3707 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3708 *
3709 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3710 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3711 * unpacked with unzip).
3712 */
3713#define PVR_GPIO_DELAY 10
3714
3715#define BTTV_ALT_DATA 0x000001
3716#define BTTV_ALT_DCLK 0x100000
3717#define BTTV_ALT_NCONFIG 0x800000
3718
3719static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
3720{
3721 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003722 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003723 int i;
3724
3725 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3726 gpio_write(0);
3727 udelay(PVR_GPIO_DELAY);
3728
3729 gpio_write(BTTV_ALT_NCONFIG);
3730 udelay(PVR_GPIO_DELAY);
3731
3732 for (n = 0; n < microlen; n++) {
3733 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003734 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003735 gpio_bits(BTTV_ALT_DCLK,0);
3736 if (bits & 0x01)
3737 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3738 else
3739 gpio_bits(BTTV_ALT_DATA,0);
3740 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3741 bits >>= 1;
3742 }
3743 }
3744 gpio_bits(BTTV_ALT_DCLK,0);
3745 udelay(PVR_GPIO_DELAY);
3746
3747 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3748 for (i = 0 ; i < 30 ; i++) {
3749 gpio_bits(BTTV_ALT_DCLK,0);
3750 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3751 }
3752 gpio_bits(BTTV_ALT_DCLK,0);
3753 return 0;
3754}
3755
3756static int __devinit pvr_boot(struct bttv *btv)
3757{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003758 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003759 int rc;
3760
3761 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3762 if (rc != 0) {
3763 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3764 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003765 return rc;
3766 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003767 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3768 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3769 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003770 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003771 return rc;
3772}
3773
3774/* ----------------------------------------------------------------------- */
3775/* some osprey specific stuff */
3776
Trent Piephocf784d52007-07-21 21:26:40 -03003777static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003778{
Trent Piephocf784d52007-07-21 21:26:40 -03003779 int i;
3780 u32 serial = 0;
3781 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003782
Trent Piephocf784d52007-07-21 21:26:40 -03003783 /* This code will nevery actually get called in this case.... */
3784 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3785 /* this might be an antique... check for MMAC label in eeprom */
3786 if (!strncmp(ee, "MMAC", 4)) {
3787 u8 checksum = 0;
3788 for (i = 0; i < 21; i++)
3789 checksum += ee[i];
3790 if (checksum != ee[21])
3791 return;
3792 cardid = BTTV_BOARD_OSPREY1x0_848;
3793 for (i = 12; i < 21; i++)
3794 serial *= 10, serial += ee[i] - '0';
3795 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003796 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003797 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003798
Trent Piephocf784d52007-07-21 21:26:40 -03003799 for (i = 4*16; i < 8*16; i += 16) {
3800 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003801
Trent Piephocf784d52007-07-21 21:26:40 -03003802 if ((checksum&0xff) + (checksum>>8) == 0xff)
3803 break;
3804 }
3805 if (i >= 8*16)
3806 return;
3807 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003808
Trent Piephocf784d52007-07-21 21:26:40 -03003809 /* found a valid descriptor */
3810 type = be16_to_cpup((u16*)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003811
Trent Piephocf784d52007-07-21 21:26:40 -03003812 switch(type) {
3813 /* 848 based */
3814 case 0x0004:
3815 cardid = BTTV_BOARD_OSPREY1x0_848;
3816 break;
3817 case 0x0005:
3818 cardid = BTTV_BOARD_OSPREY101_848;
3819 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003820
Trent Piephocf784d52007-07-21 21:26:40 -03003821 /* 878 based */
3822 case 0x0012:
3823 case 0x0013:
3824 cardid = BTTV_BOARD_OSPREY1x0;
3825 break;
3826 case 0x0014:
3827 case 0x0015:
3828 cardid = BTTV_BOARD_OSPREY1x1;
3829 break;
3830 case 0x0016:
3831 case 0x0017:
3832 case 0x0020:
3833 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3834 break;
3835 case 0x0018:
3836 case 0x0019:
3837 case 0x001E:
3838 case 0x001F:
3839 cardid = BTTV_BOARD_OSPREY2xx;
3840 break;
3841 case 0x001A:
3842 case 0x001B:
3843 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3844 break;
3845 case 0x0040:
3846 cardid = BTTV_BOARD_OSPREY500;
3847 break;
3848 case 0x0050:
3849 case 0x0056:
3850 cardid = BTTV_BOARD_OSPREY540;
3851 /* bttv_osprey_540_init(btv); */
3852 break;
3853 case 0x0060:
3854 case 0x0070:
3855 case 0x00A0:
3856 cardid = BTTV_BOARD_OSPREY2x0;
3857 /* enable output on select control lines */
3858 gpio_inout(0xffffff,0x000303);
3859 break;
3860 case 0x00D8:
3861 cardid = BTTV_BOARD_OSPREY440;
3862 break;
3863 default:
3864 /* unknown...leave generic, but get serial # */
3865 printk(KERN_INFO "bttv%d: "
3866 "osprey eeprom: unknown card type 0x%04x\n",
3867 btv->c.nr, type);
3868 break;
3869 }
3870 serial = be32_to_cpup((u32*)(ee+6));
3871 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003872
Trent Piephocf784d52007-07-21 21:26:40 -03003873 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3874 btv->c.nr, cardid,
3875 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3876
3877 if (cardid<0 || btv->c.type == cardid)
3878 return;
3879
3880 /* card type isn't set correctly */
3881 if (card[btv->c.nr] < bttv_num_tvcards) {
3882 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3883 "Not overriding user specified card type\n", btv->c.nr);
3884 } else {
3885 printk(KERN_INFO "bttv%d: osprey eeprom: "
3886 "Changing card type from %d to %d\n", btv->c.nr,
3887 btv->c.type, cardid);
3888 btv->c.type = cardid;
3889 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003890}
3891
3892/* ----------------------------------------------------------------------- */
3893/* AVermedia specific stuff, from bktr_card.c */
3894
3895static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003896 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3897 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3898 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3899 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3900 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003901 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003902
3903static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003904 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003905 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3906 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003907 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3908 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003909
3910static void __devinit avermedia_eeprom(struct bttv *btv)
3911{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003912 int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003913
3914 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003915 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3916 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003917 btv->has_remote = (eeprom_data[0x42] & 0x01);
3918
3919 if (tuner_make == 0 || tuner_make == 2)
3920 if(tuner_format <=0x0a)
3921 tuner = tuner_0_table[tuner_format];
3922 if (tuner_make == 1)
3923 if(tuner_format <=9)
3924 tuner = tuner_1_table[tuner_format];
3925
3926 if (tuner_make == 4)
3927 if(tuner_format == 0x09)
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003928 tuner = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003929
3930 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
3931 btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
3932 if(tuner) {
3933 btv->tuner_type=tuner;
3934 printk("%d",tuner);
3935 } else
3936 printk("Unknown type");
3937 printk(" radio:%s remote control:%s\n",
3938 tuner_tv_fm ? "yes" : "no",
3939 btv->has_remote ? "yes" : "no");
3940}
3941
3942/* used on Voodoo TV/FM (Voodoo 200), S0 wired to 0x10000 */
3943void bttv_tda9880_setnorm(struct bttv *btv, int norm)
3944{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003945 /* fix up our card entry */
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -03003946 if(norm==V4L2_STD_NTSC) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003947 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
3948 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x957fff;
Wade Berrier434b2522007-06-25 13:02:16 -03003949 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x957fff;
3950 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x957fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003951 dprintk("bttv_tda9880_setnorm to NTSC\n");
3952 }
3953 else {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003954 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
3955 bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].gpiomute=0x947fff;
Wade Berrier434b2522007-06-25 13:02:16 -03003956 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomux[TVAUDIO_INPUT_TUNER]=0x947fff;
3957 bttv_tvcards[BTTV_BOARD_VOODOOTV_200].gpiomute=0x947fff;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003958 dprintk("bttv_tda9880_setnorm to PAL\n");
3959 }
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003960 /* set GPIO according */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003961 gpio_bits(bttv_tvcards[btv->c.type].gpiomask,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03003962 bttv_tvcards[btv->c.type].gpiomux[btv->audio]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003963}
3964
3965
3966/*
3967 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003968 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003969 *
3970 * Hauppauge: pin 5
3971 * Voodoo: pin 20
3972 */
3973static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3974{
3975 int mask = (1 << pin);
3976
3977 gpio_inout(mask,mask);
3978 gpio_bits(mask,0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003979 udelay(2500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003980 gpio_bits(mask,mask);
3981
3982 if (bttv_gpio)
3983 bttv_gpio_tracking(btv,"msp34xx");
3984 if (bttv_verbose)
3985 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3986 "init [%d]\n", btv->c.nr, pin);
3987}
3988
3989static void __devinit boot_bt832(struct bttv *btv)
3990{
Linus Torvalds1da177e2005-04-16 15:20:36 -07003991}
3992
3993/* ----------------------------------------------------------------------- */
3994/* Imagenation L-Model PXC200 Framegrabber */
3995/* This is basically the same procedure as
3996 * used by Alessandro Rubini in his pxc200
3997 * driver, but using BTTV functions */
3998
3999static void __devinit init_PXC200(struct bttv *btv)
4000{
4001 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4002 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4003 0x00 };
4004 unsigned int i;
4005 int tmp;
4006 u32 val;
4007
4008 /* Initialise GPIO-connevted stuff */
4009 gpio_inout(0xffffff, (1<<13));
4010 gpio_write(0);
4011 udelay(3);
4012 gpio_write(1<<13);
4013 /* GPIO inputs are pulled up, so no need to drive
4014 * reset pin any longer */
4015 gpio_bits(0xffffff, 0);
4016 if (bttv_gpio)
4017 bttv_gpio_tracking(btv,"pxc200");
4018
4019 /* we could/should try and reset/control the AD pots? but
4020 right now we simply turned off the crushing. Without
4021 this the AGC drifts drifts
4022 remember the EN is reverse logic -->
4023 setting BT848_ADC_AGC_EN disable the AGC
4024 tboult@eecs.lehigh.edu
4025 */
4026
4027 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4028
4029 /* Initialise MAX517 DAC */
4030 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
4031 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4032
4033 /* Initialise 12C508 PIC */
4034 /* The I2CWrite and I2CRead commmands are actually to the
4035 * same chips - but the R/W bit is included in the address
4036 * argument so the numbers are different */
4037
4038
4039 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
4040
4041 /* First of all, enable the clock line. This is used in the PXC200-F */
4042 val = btread(BT848_GPIO_DMA_CTL);
4043 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4044 btwrite(val, BT848_GPIO_DMA_CTL);
4045
4046 /* Then, push to 0 the reset pin long enough to reset the *
4047 * device same as above for the reset line, but not the same
4048 * value sent to the GPIO-connected stuff
4049 * which one is the good one? */
4050 gpio_inout(0xffffff,(1<<2));
4051 gpio_write(0);
4052 udelay(10);
4053 gpio_write(1<<2);
4054
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004055 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004056 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4057 if (tmp != -1) {
4058 printk(KERN_INFO
4059 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
4060 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4061 }
4062 }
4063
4064 printk(KERN_INFO "PXC200 Initialised.\n");
4065}
4066
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004067
4068
Peter Skipworth93b43f12005-06-23 22:04:45 -07004069/* ----------------------------------------------------------------------- */
4070/*
4071 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4072 * it. This apparently involves the following procedure for each 878 chip:
4073 *
4074 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4075 *
4076 * 2) write to GPIO_DATA
4077 * - 0x0E
4078 * - sleep 1ms
4079 * - 0x10 + 0x0E
4080 * - sleep 10ms
4081 * - 0x0E
4082 * read from GPIO_DATA into buf (uint_32)
4083 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4084 * error. ERROR_CPLD_Check_Failed stop.
4085 *
4086 * 3) write to GPIO_DATA
4087 * - write 0x4400 + 0x0E
4088 * - sleep 10ms
4089 * - write 0x4410 + 0x0E
4090 * - sleep 1ms
4091 * - write 0x0E
4092 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004093 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004094 * error. ERROR_CPLD_Check_Failed.
4095 */
4096/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004097static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004098init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004099{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004100 uint32_t dataRead = 0;
4101 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004102
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004103 printk (KERN_INFO
4104 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004105 btv->c.nr);
4106
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004107 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004108
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004109 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4110 msleep (1);
4111 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4112 msleep (10);
4113 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004114
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004115 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004116
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004117 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4118 printk (KERN_INFO
4119 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4120 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004121 }
4122
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004123 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4124 msleep (10);
4125 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4126 msleep (1);
4127 btwrite (watchdog_value, BT848_GPIO_DATA);
4128 msleep (1);
4129 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004130
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004131 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4132 printk (KERN_INFO
4133 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4134 btv->c.nr, dataRead);
4135
Peter Skipworth93b43f12005-06-23 22:04:45 -07004136 return;
4137 }
4138
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004139 printk (KERN_INFO
4140 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004141}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004142
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004143
4144
Linus Torvalds1da177e2005-04-16 15:20:36 -07004145/* ----------------------------------------------------------------------- */
4146/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4147/*
4148 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4149 * This code is placed under the terms of the GNU General Public License
4150 *
4151 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4152 */
4153
4154static void bus_low(struct bttv *btv, int bit)
4155{
4156 if (btv->mbox_ior) {
4157 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4158 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4159 udelay(5);
4160 }
4161
4162 gpio_bits(bit,0);
4163 udelay(5);
4164
4165 if (btv->mbox_ior) {
4166 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4167 udelay(5);
4168 }
4169}
4170
4171static void bus_high(struct bttv *btv, int bit)
4172{
4173 if (btv->mbox_ior) {
4174 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4175 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4176 udelay(5);
4177 }
4178
4179 gpio_bits(bit,bit);
4180 udelay(5);
4181
4182 if (btv->mbox_ior) {
4183 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4184 udelay(5);
4185 }
4186}
4187
4188static int bus_in(struct bttv *btv, int bit)
4189{
4190 if (btv->mbox_ior) {
4191 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4192 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4193 udelay(5);
4194
4195 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4196 udelay(5);
4197 }
4198 return gpio_read() & (bit);
4199}
4200
4201/* TEA5757 register bits */
4202#define TEA_FREQ 0:14
4203#define TEA_BUFFER 15:15
4204
4205#define TEA_SIGNAL_STRENGTH 16:17
4206
4207#define TEA_PORT1 18:18
4208#define TEA_PORT0 19:19
4209
4210#define TEA_BAND 20:21
4211#define TEA_BAND_FM 0
4212#define TEA_BAND_MW 1
4213#define TEA_BAND_LW 2
4214#define TEA_BAND_SW 3
4215
4216#define TEA_MONO 22:22
4217#define TEA_ALLOW_STEREO 0
4218#define TEA_FORCE_MONO 1
4219
4220#define TEA_SEARCH_DIRECTION 23:23
4221#define TEA_SEARCH_DOWN 0
4222#define TEA_SEARCH_UP 1
4223
4224#define TEA_STATUS 24:24
4225#define TEA_STATUS_TUNED 0
4226#define TEA_STATUS_SEARCHING 1
4227
4228/* Low-level stuff */
4229static int tea5757_read(struct bttv *btv)
4230{
4231 unsigned long timeout;
4232 int value = 0;
4233 int i;
4234
4235 /* better safe than sorry */
4236 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4237
4238 if (btv->mbox_ior) {
4239 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4240 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4241 udelay(5);
4242 }
4243
4244 if (bttv_gpio)
4245 bttv_gpio_tracking(btv,"tea5757 read");
4246
4247 bus_low(btv,btv->mbox_we);
4248 bus_low(btv,btv->mbox_clk);
4249
4250 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004251 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004252
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004253 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004254 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4255 schedule();
4256 if (bus_in(btv,btv->mbox_data)) {
4257 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4258 return -1;
4259 }
4260
4261 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004262 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004263 udelay(5);
4264 bus_high(btv,btv->mbox_clk);
4265 udelay(5);
4266 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4267 bus_low(btv,btv->mbox_clk);
4268 value <<= 1;
4269 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4270 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4271 }
4272 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4273 return value;
4274}
4275
4276static int tea5757_write(struct bttv *btv, int value)
4277{
4278 int i;
4279 int reg = value;
4280
4281 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4282
4283 if (btv->mbox_ior) {
4284 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4285 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4286 udelay(5);
4287 }
4288 if (bttv_gpio)
4289 bttv_gpio_tracking(btv,"tea5757 write");
4290
4291 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4292 bus_low(btv,btv->mbox_clk);
4293 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004294 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004295 if (reg & 0x1000000)
4296 bus_high(btv,btv->mbox_data);
4297 else
4298 bus_low(btv,btv->mbox_data);
4299 reg <<= 1;
4300 bus_high(btv,btv->mbox_clk);
4301 udelay(10);
4302 bus_low(btv,btv->mbox_clk);
4303 udelay(10);
4304 }
4305 bus_low(btv,btv->mbox_we); /* unmute !!! */
4306 return 0;
4307}
4308
4309void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4310{
4311 dprintk("tea5757_set_freq %d\n",freq);
4312 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004313}
4314
Linus Torvalds1da177e2005-04-16 15:20:36 -07004315/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4316 *
4317 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4318 * switch instead (CD22M3494E). This IC can have multiple active connections
4319 * between Xn (input) and Yn (output) pins. We need to clear any existing
4320 * connection prior to establish a new one, pulsing the STROBE pin.
4321 *
4322 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4323 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004324 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4325 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4326 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4327 * GPIO[8] - - P3[5] (microcontroller)
4328 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4329 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4330 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004331 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004332 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4333 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004334 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004335 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004336 * note: the vendor refused to give any information on this product, all
4337 * that stuff was found using a multimeter! :)
4338 */
4339static void rv605_muxsel(struct bttv *btv, unsigned int input)
4340{
4341 /* reset all conections */
4342 gpio_bits(0x200,0x200);
4343 mdelay(1);
4344 gpio_bits(0x200,0x000);
4345 mdelay(1);
4346
4347 /* create a new conection */
4348 gpio_bits(0x480,0x080);
4349 gpio_bits(0x480,0x480);
4350 mdelay(1);
4351 gpio_bits(0x480,0x080);
4352 mdelay(1);
4353}
4354
4355/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4356 *
4357 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4358 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4359 * chips, ten eight input analog multiplexors, a not chip and a few
4360 * other components.
4361 *
4362 * 16 inputs on a secondary bracket are provided and can be selected
4363 * from each of the four capture chips. Two of the eight input
4364 * multiplexors are used to select from any of the 16 input signals.
4365 *
4366 * Unsupported hardware capabilities:
4367 * . A video output monitor on the secondary bracket can be selected from
4368 * one of the 878A chips.
4369 * . Another passthrough but I haven't spent any time investigating it.
4370 * . Digital I/O (logic level connected to GPIO) is available from an
4371 * onboard header.
4372 *
4373 * The on chip input mux should always be set to 2.
4374 * GPIO[16:19] - Video input selection
4375 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4376 * GPIO[?:?] - Digital I/O.
4377 *
4378 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4379 * determined what function (if any) it provides. With the microcontroller
4380 * and sync seperator chips a guess is that it might have to do with video
4381 * switching and maybe some digital I/O.
4382 */
4383static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4384{
4385 /* video mux */
4386 gpio_bits(0x0f0000, input << 16);
4387}
4388
4389static void tibetCS16_init(struct bttv *btv)
4390{
4391 /* enable gpio bits, mask obtained via btSpy */
4392 gpio_inout(0xffffff, 0x0f7fff);
4393 gpio_write(0x0f7fff);
4394}
4395
4396/*
4397 * The following routines for the Kodicom-4400r get a little mind-twisting.
4398 * There is a "master" controller and three "slave" controllers, together
4399 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4400 * The analog switch is controlled by the "master", but the detection order
4401 * of the four BT878A chips is in an order which I just don't understand.
4402 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004403 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004404 * those numbers are different from the detection sequence. When working
4405 * with the analog switch, we need to "map" from the detection sequence
4406 * over to the board's logical controller number. This mapping sequence
4407 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4408 * unit 3, the second (which is the master) is logical unit 0, etc.
4409 * We need to maintain the status of the analog switch (which of the 16
4410 * cameras is connected to which of the 4 controllers). Rather than
4411 * add to the bttv structure for this, we use the data reserved for
4412 * the mbox (unused for this card type).
4413 */
4414
4415/*
4416 * First a routine to set the analog switch, which controls which camera
4417 * is routed to which controller. The switch comprises an X-address
4418 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4419 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4420 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4421 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4422 * specified address. The idea is to set the address and data, then bring
4423 * STROBE high, and finally bring STROBE back to low.
4424 */
4425static void kodicom4400r_write(struct bttv *btv,
4426 unsigned char xaddr,
4427 unsigned char yaddr,
4428 unsigned char data) {
4429 unsigned int udata;
4430
4431 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4432 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4433 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4434 gpio_bits(0x1ff, udata); /* strobe low */
4435}
4436
4437/*
4438 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4439 * use this routine. The routine finds the "master" for the card, maps
4440 * the controller number from the detected position over to the logical
4441 * number, writes the appropriate data to the analog switch, and housekeeps
4442 * the local copy of the switch information. The parameter 'input' is the
4443 * requested camera number (0 - 15).
4444 */
4445static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4446{
4447 char *sw_status;
4448 int xaddr, yaddr;
4449 struct bttv *mctlr;
4450 static unsigned char map[4] = {3, 0, 2, 1};
4451
4452 mctlr = master[btv->c.nr];
4453 if (mctlr == NULL) { /* ignore if master not yet detected */
4454 return;
4455 }
4456 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4457 yaddr = map[yaddr];
4458 sw_status = (char *)(&mctlr->mbox_we);
4459 xaddr = input & 0xf;
4460 /* Check if the controller/camera pair has changed, else ignore */
4461 if (sw_status[yaddr] != xaddr)
4462 {
4463 /* "open" the old switch, "close" the new one, save the new */
4464 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4465 sw_status[yaddr] = xaddr;
4466 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4467 }
4468}
4469
4470/*
4471 * During initialisation, we need to reset the analog switch. We
4472 * also preset the switch to map the 4 connectors on the card to the
4473 * *user's* (see above description of kodicom4400r_muxsel) channels
4474 * 0 through 3
4475 */
4476static void kodicom4400r_init(struct bttv *btv)
4477{
4478 char *sw_status = (char *)(&btv->mbox_we);
4479 int ix;
4480
4481 gpio_inout(0x0003ff, 0x0003ff);
4482 gpio_write(1 << 9); /* reset MUX */
4483 gpio_write(0);
4484 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004485 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004486 sw_status[ix] = ix;
4487 kodicom4400r_write(btv, ix, ix, 1);
4488 }
4489 /*
4490 * Since this is the "master", we need to set up the
4491 * other three controller chips' pointers to this structure
4492 * for later use in the muxsel routine.
4493 */
4494 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4495 return;
4496 master[btv->c.nr-1] = btv;
4497 master[btv->c.nr] = btv;
4498 master[btv->c.nr+1] = btv;
4499 master[btv->c.nr+2] = btv;
4500}
4501
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004502/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4503 * video multiplexers to provide up to 16 video inputs. These
4504 * multiplexers are controlled by the lower 8 GPIO pins of the
4505 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004506
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004507 * xxx0 is pin xxx of multiplexer U5,
4508 * yyy1 is pin yyy of multiplexer U2
4509 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004510#define ENA0 0x01
4511#define ENB0 0x02
4512#define ENA1 0x04
4513#define ENB1 0x08
4514
4515#define IN10 0x10
4516#define IN00 0x20
4517#define IN11 0x40
4518#define IN01 0x80
4519
4520static void xguard_muxsel(struct bttv *btv, unsigned int input)
4521{
4522 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004523 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4524 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4525 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4526 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004527 };
4528 gpio_write(masks[input%16]);
4529}
4530static void picolo_tetra_init(struct bttv *btv)
4531{
4532 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4533 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4534 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4535}
4536static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4537{
4538
4539 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4540 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4541 /*GPIO[20]&GPIO[21] used to choose the right input*/
4542 btwrite (input<<20,BT848_GPIO_DATA);
4543
4544}
4545
4546/*
4547 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4548 *
4549 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4550 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004551 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004552 * optional "Monitor Out" bus. This allows the card to be looking
4553 * at one input while the monitor is looking at another.
4554 *
4555 * Since I've couldn't be bothered figuring out how to add an
4556 * independant muxsel for the monitor bus, I've just set it to
4557 * whatever the card is looking at.
4558 *
4559 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4560 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4561 *
4562 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4563 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4564 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4565 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4566 *
4567 */
4568
4569/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4570#define I2C_TDA8540 0x90
4571#define I2C_TDA8540_ALT1 0x92
4572#define I2C_TDA8540_ALT2 0x94
4573#define I2C_TDA8540_ALT3 0x96
4574#define I2C_TDA8540_ALT4 0x98
4575#define I2C_TDA8540_ALT5 0x9a
4576#define I2C_TDA8540_ALT6 0x9c
4577
4578static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4579{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004580 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004581 int key = input % 4;
4582 int matrix = input / 4;
4583
4584 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4585 btv->c.nr, input, matrix, key);
4586
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004587 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004588 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4589 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4590 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4591 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4592 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4593 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4594 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4595 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4596
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004597 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004598 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004599 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004600 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004601 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004602 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004603 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004604 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004605 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004606
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004607 /* Selects MUX0 for input on the 878 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004608 btaor((0)<<5, ~(3<<5), BT848_IFORM);
4609}
4610
4611
4612/* PXC200 muxsel helper
4613 * luke@syseng.anu.edu.au
4614 * another transplant
4615 * from Alessandro Rubini (rubini@linux.it)
4616 *
4617 * There are 4 kinds of cards:
4618 * PXC200L which is bt848
4619 * PXC200F which is bt848 with PIC controlling mux
4620 * PXC200AL which is bt878
4621 * PXC200AF which is bt878 with PIC controlling mux
4622 */
4623#define PX_CFG_PXC200F 0x01
4624#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4625#define PX_I2C_PIC 0x0f
4626#define PX_PXC200A_CARDID 0x200a1295
4627#define PX_I2C_CMD_CFG 0x00
4628
4629static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4630{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004631 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004632 long mux;
4633 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004634 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004635
4636 /* Read PIC config to determine if this is a PXC200F */
4637 /* PX_I2C_CMD_CFG*/
4638 buf[0]=0;
4639 buf[1]=0;
4640 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4641 if (rc) {
4642 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4643 /* not PXC ? do nothing */
4644 return;
4645 }
4646
4647 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4648 if (!(rc & PX_CFG_PXC200F)) {
4649 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4650 return;
4651 }
4652
4653
4654 /* The multiplexer in the 200F is handled by the GPIO port */
4655 /* get correct mapping between inputs */
4656 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4657 /* ** not needed!? */
4658 mux = input;
4659
4660 /* make sure output pins are enabled */
4661 /* bitmask=0x30f; */
4662 bitmask=0x302;
4663 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004664 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004665 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4666 bitmask |= 7<<4; /* the DAC */
4667 }
4668 btwrite(bitmask, BT848_GPIO_OUT_EN);
4669
4670 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004671 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004672 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4673 else /* older device */
4674 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4675 btwrite(bitmask,BT848_GPIO_DATA);
4676
4677 /*
4678 * Was "to be safe, set the bt848 to input 0"
4679 * Actually, since it's ok at load time, better not messing
4680 * with these bits (on PXC200AF you need to set mux 2 here)
4681 *
4682 * needed because bttv-driver sets mux before calling this function
4683 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004684 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004685 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4686 else /* older device */
4687 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4688
4689 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4690}
4691
4692/* ----------------------------------------------------------------------- */
4693/* motherboard chipset specific stuff */
4694
Adrian Bunk7d44e892007-12-11 19:23:43 -03004695void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004696{
4697 int pcipci_fail = 0;
4698 struct pci_dev *dev = NULL;
4699
Alan Cox3d265c92006-09-14 11:53:16 -03004700 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004701 pcipci_fail = 1;
4702 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4703 triton1 = 1;
4704 if (pci_pci_problems & PCIPCI_VSFX)
4705 vsfx = 1;
4706#ifdef PCIPCI_ALIMAGIK
4707 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4708 latency = 0x0A;
4709#endif
4710
Linus Torvalds1da177e2005-04-16 15:20:36 -07004711
4712 /* print warnings about any quirks found */
4713 if (triton1)
4714 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4715 if (vsfx)
4716 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4717 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004718 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4719 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004720 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004721 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004722 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004723 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004724 printk(KERN_INFO "bttv: overlay forced. Use this "
4725 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004726 }
4727 }
4728 if (UNSET != latency)
4729 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004730 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004731 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004732 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004733 pci_read_config_byte(dev, 0x53, &b);
4734 if (bttv_debug)
4735 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4736 "bufcon=0x%02x\n",b);
4737 }
4738}
4739
4740int __devinit bttv_handle_chipset(struct bttv *btv)
4741{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004742 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004743
4744 if (!triton1 && !vsfx && UNSET == latency)
4745 return 0;
4746
4747 if (bttv_verbose) {
4748 if (triton1)
4749 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4750 if (vsfx && btv->id >= 878)
4751 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4752 if (UNSET != latency)
4753 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4754 btv->c.nr,latency);
4755 }
4756
4757 if (btv->id < 878) {
4758 /* bt848 (mis)uses a bit in the irq mask for etbf */
4759 if (triton1)
4760 btv->triton1 = BT848_INT_ETBF;
4761 } else {
4762 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004763 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004764 if (triton1)
4765 command |= BT878_EN_TBFX;
4766 if (vsfx)
4767 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004768 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4769 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004770 if (UNSET != latency)
4771 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4772 return 0;
4773}
4774
4775
4776/*
4777 * Local variables:
4778 * c-basic-offset: 8
4779 * End:
4780 */