blob: fbeb396dc1c53c142094e0e22e79c05ca2314763 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3 bttv-cards.c
4
5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
7
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08009 & Marcus Metzler (mocm@thp.uni-koeln.de)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26*/
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#include <linux/delay.h>
29#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/kmod.h>
31#include <linux/init.h>
32#include <linux/pci.h>
33#include <linux/vmalloc.h>
34#include <linux/firmware.h>
Trent Piephocf784d52007-07-21 21:26:40 -030035#include <net/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Al Viroc1c36f32008-05-21 00:32:21 -030037#include <asm/unaligned.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#include <asm/io.h>
39
40#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020041#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030042#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030043#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45/* fwd decl */
46static void boot_msp34xx(struct bttv *btv, int pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047static void hauppauge_eeprom(struct bttv *btv);
48static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030049static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050static void modtec_eeprom(struct bttv *btv);
51static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070052static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054static void rv605_muxsel(struct bttv *btv, unsigned int input);
55static void eagle_muxsel(struct bttv *btv, unsigned int input);
56static void xguard_muxsel(struct bttv *btv, unsigned int input);
57static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
59
60static void PXC200_muxsel(struct bttv *btv, unsigned int input);
61
62static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63static void picolo_tetra_init(struct bttv *btv);
64
65static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66static void tibetCS16_init(struct bttv *btv);
67
68static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69static void kodicom4400r_init(struct bttv *btv);
70
71static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
73
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030074static void geovision_muxsel(struct bttv *btv, unsigned int input);
75
Trent Piepho15f8eeb2009-01-28 21:32:59 -030076static void phytec_muxsel(struct bttv *btv, unsigned int input);
77
Bruno Christo0c5db422009-03-02 22:38:59 -030078static void gv800s_muxsel(struct bttv *btv, unsigned int input);
79static void gv800s_init(struct bttv *btv);
80
Linus Torvalds1da177e2005-04-16 15:20:36 -070081static int terratec_active_radio_upgrade(struct bttv *btv);
82static int tea5757_read(struct bttv *btv);
83static int tea5757_write(struct bttv *btv, int value);
84static void identify_by_eeprom(struct bttv *btv,
85 unsigned char eeprom_data[256]);
86static int __devinit pvr_boot(struct bttv *btv);
87
88/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020089static unsigned int triton1;
90static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070091static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070092int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070093
94static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
95static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
96static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
97static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
98static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
99static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
100#ifdef MODULE
101static unsigned int autoload = 1;
102#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -0200103static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104#endif
105static unsigned int gpiomask = UNSET;
106static unsigned int audioall = UNSET;
107static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
108
109/* insmod options */
110module_param(triton1, int, 0444);
111module_param(vsfx, int, 0444);
112module_param(no_overlay, int, 0444);
113module_param(latency, int, 0444);
114module_param(gpiomask, int, 0444);
115module_param(audioall, int, 0444);
116module_param(autoload, int, 0444);
117
118module_param_array(card, int, NULL, 0444);
119module_param_array(pll, int, NULL, 0444);
120module_param_array(tuner, int, NULL, 0444);
121module_param_array(svhs, int, NULL, 0444);
122module_param_array(remote, int, NULL, 0444);
123module_param_array(audiomux, int, NULL, 0444);
124
125MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
126 "[enable bug compatibility for triton1 + others]");
127MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
128 "[yet another chipset flaw workaround]");
129MODULE_PARM_DESC(latency,"pci latency timer");
130MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
131MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
132MODULE_PARM_DESC(tuner,"specify installed tuner type");
133MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300134MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
135 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136
137/* ----------------------------------------------------------------------- */
138/* list of card IDs for bt878+ cards */
139
140static struct CARD {
141 unsigned id;
142 int cardnr;
143 char *name;
144} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800145 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
146 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
147 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
148 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
149 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
150 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
151 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
152 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800153 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700154
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800155 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
156 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700157
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800158 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
159 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
160 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
161 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
162 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800163 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800164 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
165 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800166 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700169 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800170 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
171 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700172 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800173 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700174
Wade Berrier434b2522007-06-25 13:02:16 -0300175 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
176 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800177 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800179 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
180 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
181 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
182 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
183 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
184 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
185 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700186
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800187 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
188 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
189 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
190 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
191 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800193 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
194 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
195 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
196 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800198 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
199 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700200 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800201 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
202 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
203 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
204 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
205 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800207 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
208 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
209 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
210 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
211 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700212
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800213 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
214 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
215 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
216 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
217 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700218
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800219 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
220 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
221 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
222 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800224 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
225 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
226 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
227 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800229 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
230 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
231 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
232 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
233 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
234 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
235 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
236 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
237 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
238 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300254 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
255 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
256 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
257 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800259 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
260 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800262 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
263 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
264 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
265 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
266 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
267 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268
Trent Piepho657de3c2006-06-20 00:30:57 -0300269 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800270 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700271
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800272 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
273 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
274 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
275 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
276 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
277 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800278 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
279 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800280 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800282 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
283 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800285 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
286 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
287 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
288 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800290 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291
Scott Alfter1ebba672007-04-02 14:22:39 -0300292 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
293 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
294
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700295 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800296 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700297
Steven Tothcd1257d2006-01-09 15:25:01 -0200298 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
299 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
300
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700301 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800302 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200303 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
304 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800305 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
306 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
307 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
308 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200309 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800310 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300311 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800312 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300313 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300314 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300315 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300316 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300317 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
318 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
319 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
320 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321 { 0, -1, NULL }
322};
323
324/* ----------------------------------------------------------------------- */
325/* array with description for bt848 / bt878 tv/grabber cards */
326
327struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800328 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800329 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800330 .name = " *** UNKNOWN/GENERIC *** ",
331 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800332 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300333 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300334 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800335 .tuner_addr = ADDR_UNSET,
336 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800337 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800338 .name = "MIRO PCTV",
339 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300340 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800341 .svhs = 2,
342 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300343 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300344 .gpiomux = { 2, 0, 0, 0 },
345 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800346 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300347 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800348 .tuner_addr = ADDR_UNSET,
349 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800350 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800351 .name = "Hauppauge (bt848)",
352 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300353 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800354 .svhs = 2,
355 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300356 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300357 .gpiomux = { 0, 1, 2, 3 },
358 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800359 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300360 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800361 .tuner_addr = ADDR_UNSET,
362 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800363 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800364 .name = "STB, Gateway P/N 6000699 (bt848)",
365 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300366 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800367 .svhs = 2,
368 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300369 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300370 .gpiomux = { 4, 0, 2, 3 },
371 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800372 .no_msp34xx = 1,
373 .needs_tvaudio = 1,
374 .tuner_type = TUNER_PHILIPS_NTSC,
375 .tuner_addr = ADDR_UNSET,
376 .pll = PLL_28,
377 .has_radio = 1,
378 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700379
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800380 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800381 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
383 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300384 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800385 .svhs = 2,
386 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300387 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300388 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300390 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800391 .tuner_addr = ADDR_UNSET,
392 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800393 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800394 .name = "Diamond DTV2000",
395 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300396 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800397 .svhs = 2,
398 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300399 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300400 .gpiomux = { 0, 1, 0, 1 },
401 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800402 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300403 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800404 .tuner_addr = ADDR_UNSET,
405 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800406 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 .name = "AVerMedia TVPhone",
408 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300409 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300411 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800412 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300413 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800414 /* 0x04 for some cards ?? */
415 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300416 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800417 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300418 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 .has_remote = 1,
420 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800421 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .name = "MATRIX-Vision MV-Delta",
423 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300424 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800425 .svhs = 3,
426 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300427 .muxsel = 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 Piephoabb03622009-01-28 21:32:59 -0300430 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800431 .tuner_addr = ADDR_UNSET,
432 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800434 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800435 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
437 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300438 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800439 .svhs = 2,
440 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300441 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300442 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
443 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800444 .needs_tvaudio = 1,
445 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300446 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800447 .tuner_addr = ADDR_UNSET,
448 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800449 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800450 .name = "IMS/IXmicro TurboTV",
451 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300452 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .svhs = 2,
454 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300455 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300456 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800457 .needs_tvaudio = 0,
458 .pll = PLL_28,
459 .tuner_type = TUNER_TEMIC_PAL,
460 .tuner_addr = ADDR_UNSET,
461 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800462 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800463 .name = "Hauppauge (bt878)",
464 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300465 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800466 .svhs = 2,
467 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300468 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300469 .gpiomux = { 0, 1, 2, 3 },
470 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800471 .needs_tvaudio = 1,
472 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300473 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800474 .tuner_addr = ADDR_UNSET,
475 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800476 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800477 .name = "MIRO PCTV pro",
478 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300479 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800480 .svhs = 2,
481 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300482 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300483 .gpiomux = { 0x20001,0x10001, 0, 0 },
484 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800485 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300486 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800487 .tuner_addr = ADDR_UNSET,
488 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700489
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800490 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800491 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800492 .name = "ADS Technologies Channel Surfer TV (bt848)",
493 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300494 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800495 .svhs = 2,
496 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300497 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300498 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300500 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800501 .tuner_addr = ADDR_UNSET,
502 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800503 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 .name = "AVerMedia TVCapture 98",
505 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300506 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800507 .svhs = 2,
508 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300509 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300510 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800511 .needs_tvaudio = 1,
512 .msp34xx_alt = 1,
513 .pll = PLL_28,
514 .tuner_type = TUNER_PHILIPS_PAL,
515 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300516 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800517 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800518 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800519 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 .name = "Aimslab Video Highway Xtreme (VHX)",
521 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300522 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800523 .svhs = 2,
524 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300525 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300526 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
527 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800528 .needs_tvaudio = 1,
529 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300530 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800531 .tuner_addr = ADDR_UNSET,
532 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800533 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800534 .name = "Zoltrix TV-Max",
535 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300536 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800537 .svhs = 2,
538 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300539 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300540 .gpiomux = { 0, 0, 1, 0 },
541 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800542 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300543 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800544 .tuner_addr = ADDR_UNSET,
545 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700546
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800547 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800548 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800549 .name = "Prolink Pixelview PlayTV (bt878)",
550 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300551 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800552 .svhs = 2,
553 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300554 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800555 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300556 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
557 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800558 .needs_tvaudio = 1,
559 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300560 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300561 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800563 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800564 .name = "Leadtek WinView 601",
565 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300566 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800567 .svhs = 2,
568 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300569 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300570 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
571 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800572 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300573 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800574 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300575 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 .has_radio = 1,
577 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800578 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 .name = "AVEC Intercapture",
580 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300581 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800582 .svhs = 2,
583 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300584 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300585 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800586 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300587 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800588 .tuner_addr = ADDR_UNSET,
589 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800590 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800591 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
592 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300593 /* .audio_inputs= 1, */
594 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800595 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300596 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300597 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300599 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .tuner_addr = ADDR_UNSET,
601 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700602
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800603 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800604 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800605 .name = "CEI Raffles Card",
606 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300607 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800608 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300609 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300610 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800611 .tuner_addr = ADDR_UNSET,
612 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800613 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800614 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
615 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300616 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800617 .svhs = 2,
618 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300619 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300620 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
621 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800622 .pll = PLL_28,
623 .tuner_type = TUNER_PHILIPS_PAL_I,
624 .tuner_addr = ADDR_UNSET,
625 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800626 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800627 .name = "Askey CPH050/ Phoebe Tv Master + FM",
628 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300629 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800630 .svhs = 2,
631 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300632 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300633 .gpiomux = { 0, 1, 0x800, 0x400 },
634 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800635 .needs_tvaudio = 1,
636 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300637 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800638 .tuner_addr = ADDR_UNSET,
639 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800640 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800641 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
642 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300643 /* .audio_inputs= 1, */
644 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300645 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800646 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300647 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300648 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300649 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800650 .no_msp34xx = 1,
651 .pll = PLL_28,
652 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
653 .tuner_addr = ADDR_UNSET,
654 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700655
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800656 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800657 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800658 .name = "Askey CPH05X/06X (bt878) [many vendors]",
659 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300660 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800661 .svhs = 2,
662 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300663 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300664 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
665 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800666 .needs_tvaudio = 1,
667 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300668 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800669 .tuner_addr = ADDR_UNSET,
670 .has_remote = 1,
671 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800672 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800673 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
674 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300675 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800676 .svhs = 2,
677 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300678 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300679 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
680 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800681 .needs_tvaudio = 0,
682 .tuner_type = TUNER_PHILIPS_PAL,
683 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300684 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800685 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800686 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800687 .name = "Hauppauge WinCam newer (bt878)",
688 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300689 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 .svhs = 3,
691 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300692 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300693 .gpiomux = { 0, 1, 2, 3 },
694 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800695 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300696 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .tuner_addr = ADDR_UNSET,
698 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800699 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800700 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
701 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300702 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800703 .svhs = 2,
704 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300705 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300706 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
707 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800708 .pll = PLL_28,
709 .tuner_type = TUNER_PHILIPS_SECAM,
710 .tuner_addr = ADDR_UNSET,
711 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800713 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800714 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800715 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
716 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300717 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800718 .svhs = 2,
719 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300720 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300721 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
722 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800723 .needs_tvaudio = 0,
724 .tuner_type = TUNER_PHILIPS_PAL,
725 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300726 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800727 /* GPIO wiring:
728 External 20 pin connector (for Active Radio Upgrade board)
729 gpio00: i2c-sda
730 gpio01: i2c-scl
731 gpio02: om5610-data
732 gpio03: om5610-clk
733 gpio04: om5610-wre
734 gpio05: om5610-stereo
735 gpio06: rds6588-davn
736 gpio07: Pin 7 n.c.
737 gpio08: nIOW
738 gpio09+10: nIOR, nSEL ?? (bt878)
739 gpio09: nIOR (bt848)
740 gpio10: nSEL (bt848)
741 Sound Routing:
742 gpio16: u2-A0 (1st 4052bt)
743 gpio17: u2-A1
744 gpio18: u2-nEN
745 gpio19: u4-A0 (2nd 4052)
746 gpio20: u4-A1
747 u4-nEN - GND
748 Btspy:
749 00000 : Cdrom (internal audio input)
750 10000 : ext. Video audio input
751 20000 : TV Mono
752 a0000 : TV Mono/2
753 1a0000 : TV Stereo
754 30000 : Radio
755 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700756 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700757
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800758 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800759 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800760 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
761 .name = "Imagenation PXC200",
762 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300763 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800764 .svhs = 1, /* was: 4 */
765 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300766 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300767 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800768 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300769 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800770 .tuner_addr = ADDR_UNSET,
771 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800773 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800774 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800775 .name = "Lifeview FlyVideo 98 LR50",
776 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300777 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800778 .svhs = 2,
779 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300780 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300781 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
782 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800783 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300784 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800785 .tuner_addr = ADDR_UNSET,
786 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800787 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800788 .name = "Formac iProTV, Formac ProTV I (bt848)",
789 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300790 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800791 .svhs = 3,
792 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300793 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300794 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800795 .pll = PLL_28,
796 .tuner_type = TUNER_PHILIPS_PAL,
797 .tuner_addr = ADDR_UNSET,
798 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700799
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800800 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800801 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800802 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
803 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300804 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800805 .svhs = 2,
806 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300807 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300808 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800809 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300810 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .tuner_addr = ADDR_UNSET,
812 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800813 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800814 .name = "Terratec TerraTValue Version Bt878",
815 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300816 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800817 .svhs = 2,
818 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300819 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300820 .gpiomux = { 0x500, 0, 0x300, 0x900 },
821 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800822 .needs_tvaudio = 1,
823 .pll = PLL_28,
824 .tuner_type = TUNER_PHILIPS_PAL,
825 .tuner_addr = ADDR_UNSET,
826 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800827 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800828 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
829 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300830 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800831 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300832 /* TV, CVid, SVid, CVid over SVid connector */
833 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800834 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
835 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300836 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
837 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800838 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
839 gpio23 -- hef4052:nEnable (0x800000)
840 gpio12 -- hef4052:A1
841 gpio13 -- hef4052:A0
842 0x0000: external audio
843 0x1000: FM
844 0x2000: TV
845 0x3000: n.c.
846 Note: There exists another variant "Winfast 2000" with tv stereo !?
847 Note: eeprom only contains FF and pci subsystem id 107d:6606
848 */
849 .needs_tvaudio = 0,
850 .pll = PLL_28,
851 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300852 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800853 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300854 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800855 .has_remote = 1,
856 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800857 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800858 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
859 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300860 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800861 .svhs = 2,
862 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300863 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300864 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
865 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800866 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300867 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800868 .tuner_addr = ADDR_UNSET,
869 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700870
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800871 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800872 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800873 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
874 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300875 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800876 .svhs = 2,
877 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300878 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300879 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
880 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800881 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300882 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .tuner_addr = ADDR_UNSET,
884 .has_radio = 1,
885 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800886 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800887 .name = "Prolink PixelView PlayTV pro",
888 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300889 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800890 .svhs = 2,
891 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300892 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300893 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
894 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800895 .no_msp34xx = 1,
896 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300897 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800898 .tuner_addr = ADDR_UNSET,
899 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800900 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800901 .name = "Askey CPH06X TView99",
902 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300903 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800904 .svhs = 2,
905 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300906 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300907 .gpiomux = { 0x551400, 0x551200, 0, 0 },
908 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800909 .needs_tvaudio = 1,
910 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300911 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800912 .tuner_addr = ADDR_UNSET,
913 .has_remote = 1,
914 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800915 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800916 .name = "Pinnacle PCTV Studio/Rave",
917 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300918 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800919 .svhs = 2,
920 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300921 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300922 .gpiomux = { 2, 0xd0001, 0, 0 },
923 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800924 .needs_tvaudio = 0,
925 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300926 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800927 .tuner_addr = ADDR_UNSET,
928 },
929
930 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800931 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800932 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
933 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300934 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800935 .svhs = 2,
936 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300937 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300938 .gpiomux = { 4, 0, 2, 3 },
939 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800940 .no_msp34xx = 1,
941 .needs_tvaudio = 1,
942 .tuner_type = TUNER_PHILIPS_NTSC,
943 .tuner_addr = ADDR_UNSET,
944 .pll = PLL_28,
945 .has_radio = 1,
946 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800947 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800948 .name = "AVerMedia TVPhone 98",
949 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300950 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800951 .svhs = 2,
952 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300953 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300954 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800955 .needs_tvaudio = 1,
956 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300957 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800958 .tuner_addr = ADDR_UNSET,
959 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300960 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800961 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800962 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 .name = "ProVideo PV951", /* pic16c54 */
964 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300965 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800966 .svhs = 2,
967 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300968 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300969 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800970 .needs_tvaudio = 1,
971 .no_msp34xx = 1,
972 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300973 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800974 .tuner_addr = ADDR_UNSET,
975 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800976 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800977 .name = "Little OnAir TV",
978 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300979 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800980 .svhs = 2,
981 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -0300982 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300983 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
984 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800985 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300986 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800987 .tuner_addr = ADDR_UNSET,
988 },
989
990 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800991 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800992 .name = "Sigma TVII-FM",
993 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -0300994 /* .audio_inputs= 1, */
995 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800996 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300997 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300998 .gpiomux = { 1, 1, 0, 2 },
999 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001000 .no_msp34xx = 1,
1001 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001002 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001003 .tuner_addr = ADDR_UNSET,
1004 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001005 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001006 .name = "MATRIX-Vision MV-Delta 2",
1007 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001008 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001009 .svhs = 3,
1010 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001011 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001012 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001013 .no_msp34xx = 1,
1014 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001015 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .tuner_addr = ADDR_UNSET,
1017 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001018 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001019 .name = "Zoltrix Genie TV/FM",
1020 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001021 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001022 .svhs = 2,
1023 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001024 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001025 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1026 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001027 .no_msp34xx = 1,
1028 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001029 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 .tuner_addr = ADDR_UNSET,
1031 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001032 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001033 .name = "Terratec TV/Radio+",
1034 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001035 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001036 .svhs = 2,
1037 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001038 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001039 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1040 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001041 .needs_tvaudio = 1,
1042 .no_msp34xx = 1,
1043 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001044 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001045 .tuner_addr = ADDR_UNSET,
1046 .has_radio = 1,
1047 },
1048
1049 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001050 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001051 .name = "Askey CPH03x/ Dynalink Magic TView",
1052 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001053 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001054 .svhs = 2,
1055 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001056 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001057 .gpiomux = {2,0,0,0 },
1058 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001059 .needs_tvaudio = 1,
1060 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001061 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001062 .tuner_addr = ADDR_UNSET,
1063 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001064 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001065 .name = "IODATA GV-BCTV3/PCI",
1066 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001067 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001068 .svhs = 2,
1069 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001070 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001071 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001072 .no_msp34xx = 1,
1073 .pll = PLL_28,
1074 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1075 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001076 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001077 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001078 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1080 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001081 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001082 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001083 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001084 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001085 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001086 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001087 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1088 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001089 .no_msp34xx = 1,
1090 .pll = PLL_28,
1091 .tuner_type = TUNER_PHILIPS_PAL_I,
1092 .tuner_addr = ADDR_UNSET,
1093 .has_remote = 1,
1094 /* GPIO wiring: (different from Rev.4C !)
1095 GPIO17: U4.A0 (first hef4052bt)
1096 GPIO19: U4.A1
1097 GPIO20: U5.A1 (second hef4052bt)
1098 GPIO21: U4.nEN
1099 GPIO22: BT832 Reset Line
1100 GPIO23: A5,A0, U5,nEN
1101 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1102 */
1103 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001104 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001105 .name = "Eagle Wireless Capricorn2 (bt878A)",
1106 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001107 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 .svhs = 2,
1109 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001110 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001111 .gpiomux = { 0, 1, 2, 3 },
1112 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001113 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001114 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001115 .tuner_addr = ADDR_UNSET,
1116 },
1117
1118 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001119 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001120 /* David Härdeman <david@2gen.com> */
1121 .name = "Pinnacle PCTV Studio Pro",
1122 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001123 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001124 .svhs = 3,
1125 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001126 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001127 .gpiomux = { 1, 0xd0001, 0, 0 },
1128 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001129 /* sound path (5 sources):
1130 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1131 0= ext. Audio IN
1132 1= from MUX2
1133 2= Mono TV sound from Tuner
1134 3= not connected
1135 MUX2 (mask 0x30000):
1136 0,2,3= from MSP34xx
1137 1= FM stereo Radio from Tuner */
1138 .needs_tvaudio = 0,
1139 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001140 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001141 .tuner_addr = ADDR_UNSET,
1142 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001143 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001144 /* Claas Langbehn <claas@bigfoot.com>,
1145 Sven Grothklags <sven@upb.de> */
1146 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1147 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001148 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001149 .svhs = 2,
1150 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001151 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001152 .gpiomux = { 0, 0, 0x10, 8 },
1153 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001154 .needs_tvaudio = 1,
1155 .pll = PLL_28,
1156 .tuner_type = TUNER_PHILIPS_PAL,
1157 .tuner_addr = ADDR_UNSET,
1158 .has_radio = 1,
1159 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001160 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001161 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001162 in de.comp.os.unix.linux.hardware:
1163 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001164 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001165 options tuner type=5 */
1166 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1167 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001168 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001169 .svhs = 2,
1170 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001171 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001172 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1173 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001174 /* For cards with tda9820/tda9821:
1175 0x0000: Tuner normal stereo
1176 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1177 0x0880: Tuner A2 stereo */
1178 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001179 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001180 .tuner_addr = ADDR_UNSET,
1181 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001182 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001183 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1184 old Easy TV BT848 version (model CPH031) */
1185 .name = "Askey CPH031/ BESTBUY Easy TV",
1186 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001187 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001188 .svhs = 2,
1189 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001190 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001191 .gpiomux = { 2, 0, 0, 0 },
1192 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001193 .needs_tvaudio = 0,
1194 .pll = PLL_28,
1195 .tuner_type = TUNER_TEMIC_PAL,
1196 .tuner_addr = ADDR_UNSET,
1197 },
1198
1199 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001200 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001201 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1202 .name = "Lifeview FlyVideo 98FM LR50",
1203 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001204 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001205 .svhs = 2,
1206 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001207 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001208 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1209 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001210 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001211 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001212 .tuner_addr = ADDR_UNSET,
1213 },
1214 /* This is the ultimate cheapo capture card
1215 * just a BT848A on a small PCB!
1216 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001217 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001218 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1219 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001220 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001221 .svhs = 1,
1222 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001223 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001224 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001225 .needs_tvaudio = 0,
1226 .no_msp34xx = 1,
1227 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001228 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001229 .tuner_addr = ADDR_UNSET,
1230 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001231 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001232 /* Daniel Herrington <daniel.herrington@home.com> */
1233 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1234 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001235 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001236 .svhs = 2,
1237 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001238 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001239 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1240 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001241 .needs_tvaudio = 1,
1242 .pll = PLL_28,
1243 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1244 .tuner_addr = ADDR_UNSET,
1245 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001246 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001247 /* Matti Mottus <mottus@physic.ut.ee> */
1248 .name = "Askey CPH03x TV Capturer",
1249 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001250 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001251 .svhs = 2,
1252 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001253 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001254 .gpiomux = { 2, 0, 0, 0 },
1255 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001256 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001257 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001258 .tuner_addr = ADDR_UNSET,
1259 },
1260
1261 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001262 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001263 /* Philip Blundell <philb@gnu.org> */
1264 .name = "Modular Technology MM100PCTV",
1265 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001266 /* .audio_inputs= 2, */
1267 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001268 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001269 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001270 .gpiomux = { 2, 0, 0, 1 },
1271 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001272 .pll = PLL_35,
1273 .tuner_type = TUNER_TEMIC_PAL,
1274 .tuner_addr = ADDR_UNSET,
1275 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001276 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001277 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001278 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001279 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001280 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001281 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001282 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001283 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001284 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001285 .no_msp34xx = 1,
1286 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001287 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001288 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001289 .tuner_addr = ADDR_UNSET,
1290 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001291 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001292 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1293 new Easy TV BT878 version (model CPH061)
1294 special thanks to Informatica Mieres for providing the card */
1295 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1296 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001297 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001298 .svhs = 2,
1299 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001300 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001301 .gpiomux = { 1, 0, 4, 4 },
1302 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001303 .needs_tvaudio = 0,
1304 .pll = PLL_28,
1305 .tuner_type = TUNER_PHILIPS_PAL,
1306 .tuner_addr = ADDR_UNSET,
1307 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001308 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001309 /* Lukas Gebauer <geby@volny.cz> */
1310 .name = "ATI TV-Wonder",
1311 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001312 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001313 .svhs = 2,
1314 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001315 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001316 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1317 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 .pll = PLL_28,
1319 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1320 .tuner_addr = ADDR_UNSET,
1321 },
1322
1323 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001324 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001325 /* Lukas Gebauer <geby@volny.cz> */
1326 .name = "ATI TV-Wonder VE",
1327 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001328 /* .audio_inputs= 1, */
1329 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001330 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001331 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001332 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001333 .no_msp34xx = 1,
1334 .pll = PLL_28,
1335 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1336 .tuner_addr = ADDR_UNSET,
1337 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001338 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001339 /* DeeJay <deejay@westel900.net (2000S) */
1340 .name = "Lifeview FlyVideo 2000S LR90",
1341 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001342 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001343 .svhs = 2,
1344 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001345 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001346 /* Radio changed from 1e80 to 0x800 to make
1347 FlyVideo2000S in .hu happy (gm)*/
1348 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001349 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1350 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001351 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001352 .no_msp34xx = 1,
1353 .no_tda9875 = 1,
1354 .needs_tvaudio = 1,
1355 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001356 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001357 .tuner_addr = ADDR_UNSET,
1358 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001359 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001360 .name = "Terratec TValueRadio",
1361 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001362 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001363 .svhs = 2,
1364 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001365 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001366 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1367 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 .needs_tvaudio = 1,
1369 .pll = PLL_28,
1370 .tuner_type = TUNER_PHILIPS_PAL,
1371 .tuner_addr = ADDR_UNSET,
1372 .has_radio = 1,
1373 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001374 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001375 /* TANAKA Kei <peg00625@nifty.com> */
1376 .name = "IODATA GV-BCTV4/PCI",
1377 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001378 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001379 .svhs = 2,
1380 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001381 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001382 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001383 .no_msp34xx = 1,
1384 .pll = PLL_28,
1385 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1386 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001387 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001388 },
1389
1390 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001391 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001392 .name = "3Dfx VoodooTV FM (Euro)",
1393 /* try "insmod msp3400 simple=0" if you have
1394 * sound problems with this card. */
1395 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001396 /* .audio_inputs= 1, */
1397 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001398 .gpiomask = 0x4f8a00,
1399 /* 0x100000: 1=MSP enabled (0=disable again)
1400 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1401 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1402 .gpiomute = 0x947fff,
1403 /* tvtuner, radio, external,internal, mute, stereo
1404 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001405 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001406 .tuner_type = TUNER_MT2032,
1407 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001408 .pll = PLL_28,
1409 .has_radio = 1,
1410 },
1411 [BTTV_BOARD_VOODOOTV_200] = {
1412 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001413 /* try "insmod msp3400 simple=0" if you have
1414 * sound problems with this card. */
1415 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001416 /* .audio_inputs= 1, */
1417 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001418 .gpiomask = 0x4f8a00,
1419 /* 0x100000: 1=MSP enabled (0=disable again)
1420 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001421 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1422 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001423 /* tvtuner, radio, external,internal, mute, stereo
1424 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001425 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001426 .tuner_type = TUNER_MT2032,
1427 .tuner_addr = ADDR_UNSET,
1428 .pll = PLL_28,
1429 .has_radio = 1,
1430 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001431 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001432 /* Philip Blundell <pb@nexus.co.uk> */
1433 .name = "Active Imaging AIMMS",
1434 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001435 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001436 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001437 .tuner_addr = ADDR_UNSET,
1438 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001439 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001440 .gpiomask = 0
1441 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001442 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001443 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1444 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1445 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001446 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001447 .svhs = 2,
1448 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001449 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001450 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1451 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001452 .needs_tvaudio = 1,
1453 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001454 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001455 .tuner_addr = ADDR_UNSET,
1456 .has_remote = 1,
1457 /* GPIO wiring:
1458 GPIO0: U4.A0 (hef4052bt)
1459 GPIO1: U4.A1
1460 GPIO2: U4.A1 (second hef4052bt)
1461 GPIO3: U4.nEN, U5.A0, A5.nEN
1462 GPIO8-15: vrd866b ?
1463 */
1464 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001465 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001466 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1467 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001468 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001469 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001470 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1471 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 .pll = PLL_28,
1473 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001474 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001475 .tuner_addr = ADDR_UNSET,
1476 },
1477
1478 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001479 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001480 /* Dariusz Kowalewski <darekk@automex.pl> */
1481 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1482 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001483 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001484 .svhs = 2,
1485 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001486 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001487 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1488 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001489 .needs_tvaudio = 1,
1490 .no_msp34xx = 1,
1491 .no_tda9875 = 1,
1492 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001493 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001494 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001495 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001496 .has_radio = 1, /* Note: not all cards have radio */
1497 .has_remote = 1,
1498 /* GPIO wiring:
1499 GPIO0: A0 hef4052
1500 GPIO1: A1 hef4052
1501 GPIO3: nEN hef4052
1502 GPIO8-15: vrd866b
1503 GPIO20,22,23: R30,R29,R28
1504 */
1505 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001506 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001507 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1508 /* you must jumper JP5 for the card to work */
1509 .name = "Sensoray 311",
1510 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001511 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001512 .svhs = 4,
1513 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001514 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001515 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001516 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001517 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001518 .tuner_addr = ADDR_UNSET,
1519 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001520 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001521 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1522 .name = "RemoteVision MX (RV605)",
1523 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001524 /* .audio_inputs= 0, */
1525 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001526 .gpiomask = 0x00,
1527 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001528 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001529 .no_msp34xx = 1,
1530 .no_tda9875 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001531 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001532 .tuner_addr = ADDR_UNSET,
1533 .muxsel_hook = rv605_muxsel,
1534 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001535 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001536 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1537 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001538 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001539 .svhs = 2,
1540 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001541 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001542 .gpiomux = { 0, 1, 2, 2 },
1543 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001544 .needs_tvaudio = 0,
1545 .tuner_type = TUNER_PHILIPS_PAL,
1546 .tuner_addr = ADDR_UNSET,
1547 .pll = PLL_28,
1548 .has_radio = 1,
1549 },
1550
1551 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001552 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001553 /* Masaki Suzuki <masaki@btree.org> */
1554 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1555 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001556 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001557 .svhs = 2,
1558 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001559 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001560 .gpiomux = { 0, 1, 2, 3 },
1561 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001562 .tuner_type = TUNER_PHILIPS_NTSC,
1563 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001564 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001565 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001566 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 .name = "GrandTec Multi Capture Card (Bt878)",
1568 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001569 /* .audio_inputs= 0, */
1570 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001571 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001572 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001573 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001574 .needs_tvaudio = 0,
1575 .no_msp34xx = 1,
1576 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001577 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001578 .tuner_addr = ADDR_UNSET,
1579 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001580 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001581 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1582 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001583 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001584 .svhs = 2,
1585 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001586 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1587 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001588 .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 -08001589 * This card lacks external Audio In, so we mute it on Ext. & Int.
1590 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1591 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001592 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001593 * btwincap uses 0x80000/0x80003
1594 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001595 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001596 .needs_tvaudio = 0,
1597 .no_msp34xx = 1,
1598 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001599 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001600 .tuner_addr = ADDR_UNSET,
1601 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1602 radio signal strength indicators work fine. */
1603 .has_radio = 1,
1604 /* GPIO Info:
1605 GPIO0,1: HEF4052 A0,A1
1606 GPIO2: HEF4052 nENABLE
1607 GPIO3-7: n.c.
1608 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1609 GPIO14,15: ??
1610 GPIO16-21: n.c.
1611 GPIO22,23: ??
1612 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1613 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001614 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001615 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1616 .name = "DSP Design TCVIDEO",
1617 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001618 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001619 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001620 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001621 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001622 .tuner_addr = ADDR_UNSET,
1623 },
1624
1625 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001626 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001627 .name = "Hauppauge WinTV PVR",
1628 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001629 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001630 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001631 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001632 .needs_tvaudio = 1,
1633 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001634 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001635 .tuner_addr = ADDR_UNSET,
1636
1637 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001638 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001639 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001640 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001641 .name = "IODATA GV-BCTV5/PCI",
1642 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001643 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001644 .svhs = 2,
1645 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001646 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001647 .gpiomux = {0x030000, 0x010000, 0, 0 },
1648 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001649 .no_msp34xx = 1,
1650 .pll = PLL_28,
1651 .tuner_type = TUNER_PHILIPS_NTSC_M,
1652 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001653 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001654 .has_radio = 1,
1655 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001656 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001657 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1658 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001659 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001660 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001661 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001662 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001663 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001664 .tuner_addr = ADDR_UNSET,
1665 .no_msp34xx = 1,
1666 .no_tda9875 = 1,
1667 .no_tda7432 = 1,
1668 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001669 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001670 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1671 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001672 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001673 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001674 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001675 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001676 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .tuner_addr = ADDR_UNSET,
1678 .no_msp34xx = 1,
1679 .no_tda9875 = 1,
1680 .no_tda7432 = 1,
1681 },
1682
1683 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001684 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001685 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1686 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001687 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001688 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001689 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001690 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001691 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001692 .tuner_addr = ADDR_UNSET,
1693 .no_msp34xx = 1,
1694 .no_tda9875 = 1,
1695 .no_tda7432 = 1,
1696 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001697 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001698 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1699 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001700 /* .audio_inputs= 0, */
1701 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001702 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001703 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001704 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001705 .tuner_addr = ADDR_UNSET,
1706 .no_msp34xx = 1,
1707 .no_tda9875 = 1,
1708 .no_tda7432 = 1,
1709 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001710 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001711 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1712 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001713 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001714 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001715 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001716 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001717 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001718 .tuner_addr = ADDR_UNSET,
1719 .no_msp34xx = 1,
1720 .no_tda9875 = 1,
1721 .no_tda7432 = 1,
1722 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001723 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1725 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001726 /* .audio_inputs= 1, */
1727 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001728 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001729 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001730 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001731 .tuner_addr = ADDR_UNSET,
1732 .no_msp34xx = 1,
1733 .no_tda9875 = 1,
1734 .no_tda7432 = 1,
1735 },
1736
1737 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001738 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001739 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1740 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001741 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001742 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001743 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001744 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001745 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 .tuner_addr = ADDR_UNSET,
1747 .no_msp34xx = 1,
1748 .no_tda9875 = 1,
1749 .no_tda7432 = 1,
1750 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001751 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001752 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001753 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001754 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001755 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001756 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001757 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001758 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 .tuner_addr = ADDR_UNSET,
1760 .no_msp34xx = 1,
1761 .no_tda9875 = 1,
1762 .no_tda7432 = 1,
1763 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001764 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001765 .name = "Osprey 500", /* 500 */
1766 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001767 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001768 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001769 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001770 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001771 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 .tuner_addr = ADDR_UNSET,
1773 .no_msp34xx = 1,
1774 .no_tda9875 = 1,
1775 .no_tda7432 = 1,
1776 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001777 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001778 .name = "Osprey 540", /* 540 */
1779 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001780 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001781 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001782 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .tuner_addr = ADDR_UNSET,
1784 .no_msp34xx = 1,
1785 .no_tda9875 = 1,
1786 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787 },
1788
1789 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001790 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001791 .name = "Osprey 2000", /* 2000 */
1792 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001793 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001794 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001795 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001796 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001797 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .tuner_addr = ADDR_UNSET,
1799 .no_msp34xx = 1,
1800 .no_tda9875 = 1,
1801 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1802 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001803 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001804 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1805 .name = "IDS Eagle",
1806 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001807 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001808 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001809 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001810 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001812 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001813 .muxsel_hook = eagle_muxsel,
1814 .no_msp34xx = 1,
1815 .no_tda9875 = 1,
1816 .pll = PLL_28,
1817 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001818 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001819 .name = "Pinnacle PCTV Sat",
1820 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001821 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001822 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001823 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001824 .tuner_addr = ADDR_UNSET,
1825 .no_msp34xx = 1,
1826 .no_tda9875 = 1,
1827 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001828 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001829 .pll = PLL_28,
1830 .no_gpioirq = 1,
1831 .has_dvb = 1,
1832 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001833 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001834 .name = "Formac ProTV II (bt878)",
1835 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001836 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001837 .svhs = 3,
1838 .gpiomask = 2,
1839 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001840 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001841 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001842 .pll = PLL_28,
1843 .has_radio = 1,
1844 .tuner_type = TUNER_PHILIPS_PAL,
1845 .tuner_addr = ADDR_UNSET,
1846 /* sound routing:
1847 GPIO=0x00,0x01,0x03: mute (?)
1848 0x02: both TV and radio (tuner: FM1216/I)
1849 The card has onboard audio connectors labeled "cdrom" and "board",
1850 not soldered here, though unknown wiring.
1851 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001852 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001853 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001854
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001855 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001856 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001857 .name = "MachTV",
1858 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001859 /* .audio_inputs= 1, */
1860 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001861 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001862 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001863 .gpiomux = { 0, 1, 2, 3},
1864 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001865 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001866 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001868 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001869 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001870 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001871 .name = "Euresys Picolo",
1872 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001873 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001874 .svhs = 2,
1875 .gpiomask = 0,
1876 .no_msp34xx = 1,
1877 .no_tda9875 = 1,
1878 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001879 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001881 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001882 .tuner_addr = ADDR_UNSET,
1883 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001884 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001885 /* Luc Van Hoeylandt <luc@e-magic.be> */
1886 .name = "ProVideo PV150", /* 0x4f */
1887 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001888 /* .audio_inputs= 0, */
1889 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001891 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001892 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001893 .needs_tvaudio = 0,
1894 .no_msp34xx = 1,
1895 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001896 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001897 .tuner_addr = ADDR_UNSET,
1898 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001899 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001900 /* Hiroshi Takekawa <sian@big.or.jp> */
1901 /* This card lacks subsystem ID */
1902 .name = "AD-TVK503", /* 0x63 */
1903 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001904 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .svhs = 2,
1906 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001907 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001908 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001909 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1910 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001911 .needs_tvaudio = 0,
1912 .no_msp34xx = 1,
1913 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001914 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001915 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001916 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001918
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001919 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001920 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001921 .name = "Hercules Smart TV Stereo",
1922 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001923 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001924 .svhs = 2,
1925 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001926 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 .needs_tvaudio = 1,
1928 .no_msp34xx = 1,
1929 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001930 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001931 .tuner_addr = ADDR_UNSET,
1932 /* Notes:
1933 - card lacks subsystem ID
1934 - stereo variant w/ daughter board with tda9874a @0xb0
1935 - Audio Routing:
1936 always from tda9874 independent of GPIO (?)
1937 external line in: unknown
1938 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1939 hef4053 (instead 4052) for unknown function
1940 */
1941 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001942 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001943 .name = "Pace TV & Radio Card",
1944 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001945 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001946 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001947 /* Tuner, CVid, SVid, CVid over SVid connector */
1948 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001949 .gpiomask = 0,
1950 .no_tda9875 = 1,
1951 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001952 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001953 .tuner_addr = ADDR_UNSET,
1954 .has_radio = 1,
1955 .pll = PLL_28,
1956 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1957 only internal line out: (4pin header) RGGL
1958 Radio must be decoded by msp3410d (not routed through)*/
1959 /*
1960 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1961 */
1962 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001963 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001964 /* Chris Willing <chris@vislab.usyd.edu.au> */
1965 .name = "IVC-200",
1966 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001967 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001968 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001969 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001970 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001971 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001972 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001973 .pll = PLL_28,
1974 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001975 [BTTV_BOARD_IVCE8784] = {
1976 .name = "IVCE-8784",
1977 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001978 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001979 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001980 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001981 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001982 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001983 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001984 .pll = PLL_28,
1985 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001986 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001987 .name = "Grand X-Guard / Trust 814PCI",
1988 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001989 /* .audio_inputs= 0, */
1990 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001991 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001992 .tuner_addr = ADDR_UNSET,
1993 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03001994 .muxsel = MUXSEL(2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001995 .muxsel_hook = xguard_muxsel,
1996 .no_msp34xx = 1,
1997 .no_tda9875 = 1,
1998 .no_tda7432 = 1,
1999 .pll = PLL_28,
2000 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002001
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002002 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002003 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .name = "Nebula Electronics DigiTV",
2005 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002006 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002007 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002008 .no_msp34xx = 1,
2009 .no_tda9875 = 1,
2010 .no_tda7432 = 1,
2011 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002012 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002013 .tuner_addr = ADDR_UNSET,
2014 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002015 .has_remote = 1,
2016 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002017 .no_gpioirq = 1,
2018 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002019 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002020 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2021 .name = "ProVideo PV143",
2022 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002023 /* .audio_inputs= 0, */
2024 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002025 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002026 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002027 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002028 .needs_tvaudio = 0,
2029 .no_msp34xx = 1,
2030 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002031 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002032 .tuner_addr = ADDR_UNSET,
2033 },
Dirk Heer05583622008-11-21 19:00:55 -03002034 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002035 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002036 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002037 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002038 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002039 .svhs = 3,
2040 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002041 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002042 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002043 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002044 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002045 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002046 .tuner_addr = ADDR_UNSET,
2047 },
Dirk Heer05583622008-11-21 19:00:55 -03002048 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2049 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002050 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002051 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002052 .svhs = 3,
2053 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002054 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002055 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002056 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002057 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002058 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002059 .tuner_addr = ADDR_UNSET,
2060 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002061
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002062 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002063 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002064 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2065 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002066 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002067 .svhs = 9,
2068 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002069 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002070 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002071 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002072 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002073 .needs_tvaudio = 1,
2074 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002075 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 .tuner_addr = ADDR_UNSET,
2077 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002078 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002079 .name = "PHYTEC VD-009 Combi (bt878)",
2080 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002081 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002082 .svhs = 9,
2083 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002084 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002085 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002086 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002087 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002088 .needs_tvaudio = 1,
2089 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002090 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002091 .tuner_addr = ADDR_UNSET,
2092 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002093 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002094 .name = "IVC-100",
2095 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002096 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002097 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002098 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002099 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002100 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002101 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002102 .pll = PLL_28,
2103 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002104 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002105 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2106 .name = "IVC-120G",
2107 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002108 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002109 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002110 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002111 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002112 .needs_tvaudio = 0,
2113 .no_msp34xx = 1,
2114 .no_tda9875 = 1,
2115 .no_tda7432 = 1,
2116 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002117 .muxsel = MUXSEL(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002118 .muxsel_hook = ivc120_muxsel,
2119 .pll = PLL_28,
2120 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002121
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002122 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002123 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002124 .name = "pcHDTV HD-2000 TV",
2125 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002126 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002128 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002129 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002130 .tuner_addr = ADDR_UNSET,
2131 .has_dvb = 1,
2132 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002133 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002134 .name = "Twinhan DST + clones",
2135 .no_msp34xx = 1,
2136 .no_tda9875 = 1,
2137 .no_tda7432 = 1,
2138 .tuner_type = TUNER_ABSENT,
2139 .tuner_addr = ADDR_UNSET,
2140 .no_video = 1,
2141 .has_dvb = 1,
2142 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002143 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002144 .name = "Winfast VC100",
2145 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002146 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002147 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002148 /* Vid In, SVid In, Vid over SVid in connector */
2149 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002150 .no_msp34xx = 1,
2151 .no_tda9875 = 1,
2152 .no_tda7432 = 1,
2153 .tuner_type = TUNER_ABSENT,
2154 .tuner_addr = ADDR_UNSET,
2155 .pll = PLL_28,
2156 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002157 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002158 .name = "Teppro TEV-560/InterVision IV-560",
2159 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002160 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002161 .svhs = 2,
2162 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002163 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002164 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002165 .needs_tvaudio = 1,
2166 .tuner_type = TUNER_PHILIPS_PAL,
2167 .tuner_addr = ADDR_UNSET,
2168 .pll = PLL_35,
2169 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002170
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002171 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002172 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002173 .name = "SIMUS GVC1100",
2174 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002175 /* .audio_inputs= 0, */
2176 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002177 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002178 .tuner_addr = ADDR_UNSET,
2179 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002180 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002181 .gpiomask = 0x3F,
2182 .muxsel_hook = gvc1100_muxsel,
2183 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002184 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002185 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2186 .name = "NGS NGSTV+",
2187 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002188 .svhs = 2,
2189 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002190 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002191 .gpiomux = { 0, 0, 0, 0 },
2192 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002193 .pll = PLL_28,
2194 .tuner_type = TUNER_PHILIPS_PAL,
2195 .tuner_addr = ADDR_UNSET,
2196 .has_remote = 1,
2197 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002198 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002199 /* http://linuxmedialabs.com */
2200 .name = "LMLBT4",
2201 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002202 /* .audio_inputs= 0, */
2203 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002204 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002205 .no_msp34xx = 1,
2206 .no_tda9875 = 1,
2207 .no_tda7432 = 1,
2208 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002209 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002210 .tuner_addr = ADDR_UNSET,
2211 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002212 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002213 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2214 .name = "Tekram M205 PRO",
2215 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002216 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002217 .tuner_type = TUNER_PHILIPS_PAL,
2218 .tuner_addr = ADDR_UNSET,
2219 .svhs = 2,
2220 .needs_tvaudio = 0,
2221 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002222 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002223 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002224 .pll = PLL_28,
2225 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002226
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002227 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002228 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 /* Javier Cendan Ares <jcendan@lycos.es> */
2230 /* bt878 TV + FM without subsystem ID */
2231 .name = "Conceptronic CONTVFMi",
2232 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002233 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002234 .svhs = 2,
2235 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002236 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002237 .gpiomux = { 0, 1, 2, 2 },
2238 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002239 .needs_tvaudio = 0,
2240 .pll = PLL_28,
2241 .tuner_type = TUNER_PHILIPS_PAL,
2242 .tuner_addr = ADDR_UNSET,
2243 .has_remote = 1,
2244 .has_radio = 1,
2245 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002246 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002247 /*Eric DEBIEF <debief@telemsa.com>*/
2248 /*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 -08002249 /* 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 -08002250 /*0x79 in bttv.h*/
2251 .name = "Euresys Picolo Tetra",
2252 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002253 /* .audio_inputs= 0, */
2254 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002255 .gpiomask = 0,
2256 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2257 .no_msp34xx = 1,
2258 .no_tda9875 = 1,
2259 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002260 /*878A input is always MUX0, see above.*/
2261 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002262 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002263 .pll = PLL_28,
2264 .needs_tvaudio = 0,
2265 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002266 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002267 .tuner_addr = ADDR_UNSET,
2268 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002269 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002270 /* Spirit TV Tuner from http://spiritmodems.com.au */
2271 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2272 .name = "Spirit TV Tuner",
2273 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002274 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002275 .svhs = 2,
2276 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002277 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002278 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002279 .tuner_type = TUNER_TEMIC_PAL,
2280 .tuner_addr = ADDR_UNSET,
2281 .no_msp34xx = 1,
2282 .no_tda9875 = 1,
2283 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002284 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002285 /* Wolfram Joost <wojo@frokaschwei.de> */
2286 .name = "AVerMedia AVerTV DVB-T 771",
2287 .video_inputs = 2,
2288 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002289 .tuner_type = TUNER_ABSENT,
2290 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002291 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .no_msp34xx = 1,
2293 .no_tda9875 = 1,
2294 .no_tda7432 = 1,
2295 .pll = PLL_28,
2296 .has_dvb = 1,
2297 .no_gpioirq = 1,
2298 .has_remote = 1,
2299 },
2300 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002301 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002302 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002303 /* 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 -08002304 .name = "AverMedia AverTV DVB-T 761",
2305 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002307 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .no_msp34xx = 1,
2309 .no_tda9875 = 1,
2310 .no_tda7432 = 1,
2311 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002312 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002313 .tuner_addr = ADDR_UNSET,
2314 .has_dvb = 1,
2315 .no_gpioirq = 1,
2316 .has_remote = 1,
2317 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002318 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002319 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002320 .name = "MATRIX Vision Sigma-SQ",
2321 .video_inputs = 16,
2322 /* .audio_inputs= 0, */
2323 .svhs = NO_SVHS,
2324 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002325 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3),
Trent Piepho4c548d42009-01-28 21:32:59 -03002326 .muxsel_hook = sigmaSQ_muxsel,
2327 .gpiomux = { 0 },
2328 .no_msp34xx = 1,
2329 .pll = PLL_28,
2330 .tuner_type = TUNER_ABSENT,
2331 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002332 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002333 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002334 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002335 .name = "MATRIX Vision Sigma-SLC",
2336 .video_inputs = 4,
2337 /* .audio_inputs= 0, */
2338 .svhs = NO_SVHS,
2339 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002340 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002341 .muxsel_hook = sigmaSLC_muxsel,
2342 .gpiomux = { 0 },
2343 .no_msp34xx = 1,
2344 .pll = PLL_28,
2345 .tuner_type = TUNER_ABSENT,
2346 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002347 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002348 /* BTTV_BOARD_APAC_VIEWCOMP */
2349 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002350 /* Attila Kondoros <attila.kondoros@chello.hu> */
2351 /* bt878 TV + FM 0x00000000 subsystem ID */
2352 .name = "APAC Viewcomp 878(AMAX)",
2353 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002354 /* .audio_inputs= 1, */
2355 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002356 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002357 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002358 .gpiomux = { 2, 0, 0, 0 },
2359 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002360 .needs_tvaudio = 0,
2361 .pll = PLL_28,
2362 .tuner_type = TUNER_PHILIPS_PAL,
2363 .tuner_addr = ADDR_UNSET,
2364 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2365 .has_radio = 1, /* not every card has radio */
2366 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002367
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002368 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002369 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2371 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002372 .no_msp34xx = 1,
2373 .no_tda9875 = 1,
2374 .no_tda7432 = 1,
2375 .pll = PLL_28,
2376 .no_video = 1,
2377 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002378 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 .tuner_addr = ADDR_UNSET,
2380 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002381 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 /* Steven <photon38@pchome.com.tw> */
2383 .name = "V-Gear MyVCD",
2384 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002385 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002386 .svhs = 2,
2387 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002388 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002389 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2390 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002391 .no_msp34xx = 1,
2392 .pll = PLL_28,
2393 .tuner_type = TUNER_PHILIPS_NTSC_M,
2394 .tuner_addr = ADDR_UNSET,
2395 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002396 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002397 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002398 /* Rick C <cryptdragoon@gmail.com> */
2399 .name = "Super TV Tuner",
2400 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002401 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002402 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002403 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .tuner_type = TUNER_PHILIPS_NTSC,
2405 .tuner_addr = ADDR_UNSET,
2406 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002407 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002408 .needs_tvaudio = 1,
2409 .has_radio = 1,
2410 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002411 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002412 /* Chris Fanning <video4linux@haydon.net> */
2413 .name = "Tibet Systems 'Progress DVR' CS16",
2414 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002415 /* .audio_inputs= 0, */
2416 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002417 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002418 .pll = PLL_28,
2419 .no_msp34xx = 1,
2420 .no_tda9875 = 1,
2421 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002422 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002423 .tuner_addr = ADDR_UNSET,
2424 .muxsel_hook = tibetCS16_muxsel,
2425 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002426 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002427 /* Bill Brack <wbrack@mmm.com.hk> */
2428 /*
2429 * Note that, because of the card's wiring, the "master"
2430 * BT878A chip (i.e. the one which controls the analog switch
2431 * and must use this card type) is the 2nd one detected. The
2432 * other 3 chips should use card type 0x85, whose description
2433 * follows this one. There is a EEPROM on the card (which is
2434 * connected to the I2C of one of those other chips), but is
2435 * not currently handled. There is also a facility for a
2436 * "monitor", which is also not currently implemented.
2437 */
2438 .name = "Kodicom 4400R (master)",
2439 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002440 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002441 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002442 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002443 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002444 /* GPIO bits 0-9 used for analog switch:
2445 * 00 - 03: camera selector
2446 * 04 - 06: channel (controller) selector
2447 * 07: data (1->on, 0->off)
2448 * 08: strobe
2449 * 09: reset
2450 * bit 16 is input from sync separator for the channel
2451 */
2452 .gpiomask = 0x0003ff,
2453 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002454 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002455 .pll = PLL_28,
2456 .no_msp34xx = 1,
2457 .no_tda7432 = 1,
2458 .no_tda9875 = 1,
2459 .muxsel_hook = kodicom4400r_muxsel,
2460 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002461 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002462 /* Bill Brack <wbrack@mmm.com.hk> */
2463 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2464 * one which controls the analog switch, and must use the card type)
2465 * is the 2nd one detected. The other 3 chips should use this card
2466 * type
2467 */
2468 .name = "Kodicom 4400R (slave)",
2469 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002470 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002471 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002472 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002473 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002474 .gpiomask = 0x010000,
2475 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002476 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002477 .pll = PLL_28,
2478 .no_msp34xx = 1,
2479 .no_tda7432 = 1,
2480 .no_tda9875 = 1,
2481 .muxsel_hook = kodicom4400r_muxsel,
2482 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002483 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002484 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002485 /* Michael Henson <mhenson@clarityvi.com> */
2486 /* Adlink RTV24 with special unlock codes */
2487 .name = "Adlink RTV24",
2488 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002489 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002490 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002491 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002492 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002493 .tuner_addr = ADDR_UNSET,
2494 .pll = PLL_28,
2495 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002496 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002497 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 /* Michael Krufky <mkrufky@m1k.net> */
2499 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002500 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002501 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002502 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002503 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002504 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002505 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002506 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002507 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2508 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002509 .no_msp34xx = 1,
2510 .no_tda9875 = 1,
2511 .no_tda7432 = 1,
2512 .has_dvb = 1,
2513 },
2514 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002515 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002516 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002517 .name = "Acorp Y878F",
2518 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002519 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002520 .svhs = 2,
2521 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002522 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002523 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2524 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002525 .needs_tvaudio = 1,
2526 .pll = PLL_28,
2527 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2528 .tuner_addr = 0xc1 >>1,
2529 .has_radio = 1,
2530 },
2531 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002532 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002533 .name = "Conceptronic CTVFMi v2",
2534 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002535 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002536 .svhs = 2,
2537 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002538 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002539 .gpiomux = { 0, 1, 2, 2 },
2540 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002541 .needs_tvaudio = 0,
2542 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002543 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002544 .tuner_addr = ADDR_UNSET,
2545 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002546 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002547 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002548 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002549 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002550 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2551 .video_inputs = 5,
2552 /* .audio_inputs= 1, */
2553 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002554 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002555 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002556 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002557 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2558 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2559 .gpiomute = 0x12400,
2560 .no_msp34xx = 1,
2561 .pll = PLL_28,
2562 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002563 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002564 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002565 },
2566 /* ---- card 0x8b ---------------------------------- */
2567 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002568 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002569 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2570 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002571 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002572 .svhs = 2,
2573 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002574 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002575 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2576 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002577 .no_msp34xx = 1,
2578 .pll = PLL_28,
2579 .tuner_type = TUNER_YMEC_TVF_5533MF,
2580 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002581 .has_radio = 1,
2582 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002583 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002584 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002585 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2586 one external BNC composite input (mux 2)
2587 three internal composite inputs (unknown muxes)
2588 an 18-bit stereo A/D (CS5331A), which has:
2589 one external stereo unblanced (RCA) audio connection
2590 one (or 3?) internal stereo balanced (XLR) audio connection
2591 input is selected via gpio to a 14052B mux
2592 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2593 gain is controlled via an X9221A chip on the I2C bus @0x28
2594 sample rate is controlled via gpio to an MK1413S
2595 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2596 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002597 [BTTV_BOARD_OSPREY440] = {
2598 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002599 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002600 /* .audio_inputs= 2, */
2601 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002602 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002603 .gpiomask = 0x303,
2604 .gpiomute = 0x000, /* int + 32kHz */
2605 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002606 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002607 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002608 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002609 .no_msp34xx = 1,
2610 .no_tda9875 = 1,
2611 .no_tda7432 = 1,
2612 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002613 /* ---- card 0x8d ---------------------------------- */
2614 [BTTV_BOARD_ASOUND_SKYEYE] = {
2615 .name = "Asound Skyeye PCTV",
2616 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002617 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002618 .svhs = 2,
2619 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002620 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002621 .gpiomux = { 2, 0, 0, 0 },
2622 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002623 .needs_tvaudio = 1,
2624 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002625 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002626 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002627 },
Bill Pechter633323f2005-11-13 16:07:50 -08002628 /* ---- card 0x8e ---------------------------------- */
2629 [BTTV_BOARD_SABRENT_TVFM] = {
2630 .name = "Sabrent TV-FM (bttv version)",
2631 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002632 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002633 .svhs = 2,
2634 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002635 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002636 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002637 .no_msp34xx = 1,
2638 .no_tda9875 = 1,
2639 .no_tda7432 = 1,
2640 .pll = PLL_28,
2641 .tuner_type = TUNER_TNF_5335MF,
2642 .tuner_addr = ADDR_UNSET,
2643 .has_radio = 1,
2644 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002645 /* ---- card 0x8f ---------------------------------- */
2646 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2647 .name = "Hauppauge ImpactVCB (bt878)",
2648 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002649 /* .audio_inputs= 0, */
2650 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002651 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002652 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002653 .no_msp34xx = 1,
2654 .no_tda9875 = 1,
2655 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002656 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002657 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002658 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002659 [BTTV_BOARD_MACHTV_MAGICTV] = {
2660 /* Julian Calaby <julian.calaby@gmail.com>
2661 * Slightly different from original MachTV definition (0x60)
2662
2663 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2664 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2665 * properly (methinks) causing no keyup bits being set */
2666
2667 .name = "MagicTV", /* rebranded MachTV */
2668 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002669 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002670 .svhs = 2,
2671 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002672 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002673 .gpiomux = { 0, 1, 2, 3 },
2674 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002675 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2676 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002677 .pll = PLL_28,
2678 .has_radio = 1,
2679 .has_remote = 1,
2680 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002681 [BTTV_BOARD_SSAI_SECURITY] = {
2682 .name = "SSAI Security Video Interface",
2683 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002684 /* .audio_inputs= 0, */
2685 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002686 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002687 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002688 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002689 },
2690 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2691 .name = "SSAI Ultrasound Video Interface",
2692 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002693 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002694 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002695 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002696 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002697 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002698 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002699 /* ---- card 0x94---------------------------------- */
2700 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2701 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002702 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002703 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002704 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002705 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002706 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002707 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002708 .gpiomask = 0x00e00007,
2709 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2710 .gpiomute = 0x00c00007,
2711 .no_msp34xx = 1,
2712 .no_tda9875 = 1,
2713 .no_tda7432 = 1,
2714 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002715 /* ---- card 0x95---------------------------------- */
2716 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2717 .name = "Typhoon TV-Tuner PCI (50684)",
2718 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002719 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002720 .svhs = 2,
2721 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002722 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002723 .gpiomux = { 0x20001,0x10001, 0, 0 },
2724 .gpiomute = 10,
2725 .needs_tvaudio = 1,
2726 .pll = PLL_28,
2727 .tuner_type = TUNER_PHILIPS_PAL_I,
2728 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002729 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002730 [BTTV_BOARD_GEOVISION_GV600] = {
2731 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002732 .name = "Geovision GV-600",
2733 .video_inputs = 16,
2734 /* .audio_inputs= 0, */
2735 .svhs = NO_SVHS,
2736 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002737 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002738 .muxsel_hook = geovision_muxsel,
2739 .gpiomux = { 0 },
2740 .no_msp34xx = 1,
2741 .pll = PLL_28,
2742 .tuner_type = TUNER_ABSENT,
2743 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002744 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002745 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2746 /* Mauro Lacy <mauro@lacy.com.ar>
2747 * Based on MagicTV and Conceptronic CONTVFMi */
2748
2749 .name = "Kozumi KTV-01C",
2750 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002751 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002752 .svhs = 2,
2753 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002754 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002755 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002756 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002757 .needs_tvaudio = 0,
2758 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2759 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002760 .pll = PLL_28,
2761 .has_radio = 1,
2762 .has_remote = 1,
2763 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002764 [BTTV_BOARD_ENLTV_FM_2] = {
2765 /* Encore TV Tuner Pro ENL TV-FM-2
2766 Mauro Carvalho Chehab <mchehab@infradead.org */
2767 .name = "Encore ENL TV-FM-2",
2768 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002769 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002770 .svhs = 2,
2771 /* bit 6 -> IR disabled
2772 bit 18/17 = 00 -> mute
2773 01 -> enable external audio input
2774 10 -> internal audio input (mono?)
2775 11 -> internal audio input
2776 */
2777 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002778 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002779 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2780 .gpiomute = 0,
2781 .tuner_type = TUNER_TCL_MF02GIP_5N,
2782 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002783 .pll = PLL_28,
2784 .has_radio = 1,
2785 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002786 },
2787 [BTTV_BOARD_VD012] = {
2788 /* D.Heer@Phytec.de */
2789 .name = "PHYTEC VD-012 (bt878)",
2790 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002791 /* .audio_inputs= 0, */
2792 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002793 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002794 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002795 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2796 .needs_tvaudio = 0,
2797 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002798 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002799 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002800 },
2801 [BTTV_BOARD_VD012_X1] = {
2802 /* D.Heer@Phytec.de */
2803 .name = "PHYTEC VD-012-X1 (bt878)",
2804 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002805 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002806 .svhs = 3,
2807 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002808 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002809 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2810 .needs_tvaudio = 0,
2811 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002812 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002813 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002814 },
2815 [BTTV_BOARD_VD012_X2] = {
2816 /* D.Heer@Phytec.de */
2817 .name = "PHYTEC VD-012-X2 (bt878)",
2818 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002819 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002820 .svhs = 3,
2821 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002822 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002823 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2824 .needs_tvaudio = 0,
2825 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002826 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002827 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002828 },
2829 [BTTV_BOARD_GEOVISION_GV800S] = {
2830 /* Bruno Christo <bchristo@inf.ufsm.br>
2831 *
2832 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2833 * 1 audio input per BT878A = 4 audio inputs
2834 * 4 video inputs per BT878A = 16 video inputs
2835 * This is the first BT878A chip of the GV-800(S). It's the
2836 * "master" chip and it controls the video inputs through an
2837 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2838 * slaves should use card type 0x9e (following this one).
2839 * There is a EEPROM on the card which is currently not handled.
2840 * The audio input is not working yet.
2841 */
2842 .name = "Geovision GV-800(S) (master)",
2843 .video_inputs = 4,
2844 /* .audio_inputs= 1, */
2845 .tuner_type = TUNER_ABSENT,
2846 .tuner_addr = ADDR_UNSET,
2847 .svhs = NO_SVHS,
2848 .gpiomask = 0xf107f,
2849 .no_gpioirq = 1,
2850 .muxsel = MUXSEL(2, 2, 2, 2),
2851 .pll = PLL_28,
2852 .no_msp34xx = 1,
2853 .no_tda7432 = 1,
2854 .no_tda9875 = 1,
2855 .muxsel_hook = gv800s_muxsel,
2856 },
2857 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2858 /* Bruno Christo <bchristo@inf.ufsm.br>
2859 *
2860 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2861 * 1 audio input per BT878A = 4 audio inputs
2862 * 4 video inputs per BT878A = 16 video inputs
2863 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2864 * and should use this card type.
2865 * The audio input is not working yet.
2866 */
2867 .name = "Geovision GV-800(S) (slave)",
2868 .video_inputs = 4,
2869 /* .audio_inputs= 1, */
2870 .tuner_type = TUNER_ABSENT,
2871 .tuner_addr = ADDR_UNSET,
2872 .svhs = NO_SVHS,
2873 .gpiomask = 0x00,
2874 .no_gpioirq = 1,
2875 .muxsel = MUXSEL(2, 2, 2, 2),
2876 .pll = PLL_28,
2877 .no_msp34xx = 1,
2878 .no_tda7432 = 1,
2879 .no_tda9875 = 1,
2880 .muxsel_hook = gv800s_muxsel,
2881 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002882};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002883
2884static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2885
2886/* ----------------------------------------------------------------------- */
2887
2888static unsigned char eeprom_data[256];
2889
2890/*
2891 * identify card
2892 */
2893void __devinit bttv_idcard(struct bttv *btv)
2894{
2895 unsigned int gpiobits;
2896 int i,type;
2897 unsigned short tmp;
2898
2899 /* read PCI subsystem ID */
2900 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
2901 btv->cardid = tmp << 16;
2902 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2903 btv->cardid |= tmp;
2904
2905 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2906 /* look for the card */
2907 for (type = -1, i = 0; cards[i].id != 0; i++)
2908 if (cards[i].id == btv->cardid)
2909 type = i;
2910
2911 if (type != -1) {
2912 /* found it */
2913 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
2914 "PCI subsystem ID is %04x:%04x\n",
2915 btv->c.nr,cards[type].name,cards[type].cardnr,
2916 btv->cardid & 0xffff,
2917 (btv->cardid >> 16) & 0xffff);
2918 btv->c.type = cards[type].cardnr;
2919 } else {
2920 /* 404 */
2921 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2922 btv->c.nr, btv->cardid & 0xffff,
2923 (btv->cardid >> 16) & 0xffff);
2924 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08002925 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002926 }
2927 }
2928
2929 /* let the user override the autodetected type */
2930 if (card[btv->c.nr] < bttv_num_tvcards)
2931 btv->c.type=card[btv->c.nr];
2932
2933 /* print which card config we are using */
2934 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
2935 bttv_tvcards[btv->c.type].name, btv->c.type,
2936 card[btv->c.nr] < bttv_num_tvcards
2937 ? "insmod option" : "autodetected");
2938
2939 /* overwrite gpio stuff ?? */
2940 if (UNSET == audioall && UNSET == audiomux[0])
2941 return;
2942
2943 if (UNSET != audiomux[0]) {
2944 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002945 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002946 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002947 gpiobits |= audiomux[i];
2948 }
2949 } else {
2950 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002951 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002952 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002953 }
2954 }
2955 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
2956 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
2957 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002958 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002959 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002960 }
2961 printk("\n");
2962}
2963
2964/*
2965 * (most) board specific initialisations goes here
2966 */
2967
2968/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002969static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002970{
2971 int type = -1;
2972
2973 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002974 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002975 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002976 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002977 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002978 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002979
2980 if (-1 != type) {
2981 btv->c.type = type;
2982 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2983 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
2984 }
2985}
2986
2987static void flyvideo_gpio(struct bttv *btv)
2988{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002989 int gpio, has_remote, has_radio, is_capture_only;
2990 int is_lr90, has_tda9820_tda9821;
2991 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002992
2993 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002994 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002995 gpio = gpio_read();
2996 /* FIXME: must restore OUR_EN ??? */
2997
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002998 /* all cards provide GPIO info, some have an additional eeprom
2999 * LR50: GPIO coding can be found lower right CP1 .. CP9
3000 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3001 * GPIO14-12: n.c.
3002 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003003
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003004 * lowest 3 bytes are remote control codes (no handshake needed)
3005 * xxxFFF: No remote control chip soldered
3006 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3007 * Note: Some bits are Audio_Mask !
3008 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003009 ttype = (gpio & 0x0f0000) >> 16;
3010 switch (ttype) {
3011 case 0x0:
3012 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003013 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003014 case 0x2:
3015 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003016 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003017 case 0x4:
3018 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003019 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003020 case 0x6:
3021 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003022 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003023 case 0xC:
3024 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003025 break;
3026 default:
3027 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003028 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003029 }
3030
3031 has_remote = gpio & 0x800000;
3032 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003033 /* unknown 0x200000;
3034 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003035 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003036 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003037 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3038 /*
3039 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003040
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003041 if (is_capture_only)
3042 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003043
3044 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003045 btv->c.nr, has_radio ? "yes" : "no ",
3046 has_remote ? "yes" : "no ", tuner_type, gpio);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003047 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003048 btv->c.nr, is_lr90 ? "yes" : "no ",
3049 has_tda9820_tda9821 ? "yes" : "no ",
3050 is_capture_only ? "yes" : "no ");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003051
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003052 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3053 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003054 btv->has_radio = has_radio;
3055
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003056 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3057 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3058 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003059 if (has_tda9820_tda9821)
3060 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003061 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003062}
3063
3064static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3065 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3066static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3067 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3068
3069static void miro_pinnacle_gpio(struct bttv *btv)
3070{
3071 int id,msp,gpio;
3072 char *info;
3073
3074 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003075 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003076 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003077 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003078 if (id < 32) {
3079 btv->tuner_type = miro_tunermap[id];
3080 if (0 == (gpio & 0x20)) {
3081 btv->has_radio = 1;
3082 if (!miro_fmtuner[id]) {
3083 btv->has_matchbox = 1;
3084 btv->mbox_we = (1<<6);
3085 btv->mbox_most = (1<<7);
3086 btv->mbox_clk = (1<<8);
3087 btv->mbox_data = (1<<9);
3088 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3089 }
3090 } else {
3091 btv->has_radio = 0;
3092 }
3093 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003094 if (btv->c.type == BTTV_BOARD_MIRO)
3095 btv->c.type = BTTV_BOARD_MIROPRO;
3096 if (btv->c.type == BTTV_BOARD_PINNACLE)
3097 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003098 }
3099 printk(KERN_INFO
3100 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3101 btv->c.nr, id+1, btv->tuner_type,
3102 !btv->has_radio ? "no" :
3103 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3104 (-1 == msp) ? "no" : "yes");
3105 } else {
3106 /* new cards with microtune tuner */
3107 id = 63 - id;
3108 btv->has_radio = 0;
3109 switch (id) {
3110 case 1:
3111 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003112 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003113 break;
3114 case 2:
3115 info = "PAL+SECAM / stereo";
3116 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003117 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003118 break;
3119 case 3:
3120 info = "NTSC / stereo";
3121 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003122 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003123 break;
3124 case 4:
3125 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003126 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003127 break;
3128 case 5:
3129 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003130 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003131 break;
3132 case 6:
3133 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003134 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003135 break;
3136 case 7:
3137 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003138 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003139 break;
3140 default:
3141 info = "oops: unknown card";
3142 break;
3143 }
3144 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003145 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003146 printk(KERN_INFO
3147 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3148 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003149 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003150 }
3151}
3152
3153/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3154#define LM1882_SYNC_DRIVE 0x200000L
3155
3156static void init_ids_eagle(struct bttv *btv)
3157{
3158 gpio_inout(0xffffff,0xFFFF37);
3159 gpio_write(0x200020);
3160
3161 /* flash strobe inverter ?! */
3162 gpio_write(0x200024);
3163
3164 /* switch sync drive off */
3165 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3166
3167 /* set BT848 muxel to 2 */
3168 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3169}
3170
3171/* Muxsel helper for the IDS Eagle.
3172 * the eagles does not use the standard muxsel-bits but
3173 * has its own multiplexer */
3174static void eagle_muxsel(struct bttv *btv, unsigned int input)
3175{
Trent Piepho430390e2009-01-28 21:32:59 -03003176 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003177
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003178 /* composite */
3179 /* set chroma ADC to sleep */
3180 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3181 /* set to composite video */
3182 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3183 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003184
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003185 /* switch sync drive off */
3186 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003187}
3188
3189static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3190{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003191 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003192 gpio_write(masks[input%4]);
3193}
3194
3195/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3196 alarms output
3197
3198 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3199 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3200
3201 IN - sensor inputs, INx - sensor inputs and TI XORed together
3202 O1,O2,O3 - alarm outputs (relays)
3203
3204 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3205
3206*/
3207
3208static void init_lmlbt4x(struct bttv *btv)
3209{
3210 printk(KERN_DEBUG "LMLBT4x init\n");
3211 btwrite(0x000000, BT848_GPIO_REG_INP);
3212 gpio_inout(0xffffff, 0x0006C0);
3213 gpio_write(0x000000);
3214}
3215
3216static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3217{
3218 unsigned int inmux = input % 8;
3219 gpio_inout( 0xf, 0xf );
3220 gpio_bits( 0xf, inmux );
3221}
3222
3223static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3224{
3225 unsigned int inmux = input % 4;
3226 gpio_inout( 3<<9, 3<<9 );
3227 gpio_bits( 3<<9, inmux<<9 );
3228}
3229
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003230static void geovision_muxsel(struct bttv *btv, unsigned int input)
3231{
3232 unsigned int inmux = input % 16;
3233 gpio_inout(0xf, 0xf);
3234 gpio_bits(0xf, inmux);
3235}
3236
Linus Torvalds1da177e2005-04-16 15:20:36 -07003237/* ----------------------------------------------------------------------- */
3238
3239static void bttv_reset_audio(struct bttv *btv)
3240{
3241 /*
3242 * BT878A has a audio-reset register.
3243 * 1. This register is an audio reset function but it is in
3244 * function-0 (video capture) address space.
3245 * 2. It is enough to do this once per power-up of the card.
3246 * 3. There is a typo in the Conexant doc -- it is not at
3247 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3248 * --//Shrikumar 030609
3249 */
3250 if (btv->id != 878)
3251 return;
3252
3253 if (bttv_debug)
3254 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3255 btwrite((1<<7), 0x058);
3256 udelay(10);
3257 btwrite( 0, 0x058);
3258}
3259
3260/* initialization part one -- before registering i2c bus */
3261void __devinit bttv_init_card1(struct bttv *btv)
3262{
3263 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003264 case BTTV_BOARD_HAUPPAUGE:
3265 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003266 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003267 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003268 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003269 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003270 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003271 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003272 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003273 boot_msp34xx(btv,11);
3274 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003275 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003276 pvr_boot(btv);
3277 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003278 case BTTV_BOARD_TWINHAN_DST:
3279 case BTTV_BOARD_AVDVBT_771:
3280 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003281 btv->use_i2c_hw = 1;
3282 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003283 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003284 init_RTV24( btv );
3285 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003286
Linus Torvalds1da177e2005-04-16 15:20:36 -07003287 }
3288 if (!bttv_tvcards[btv->c.type].has_dvb)
3289 bttv_reset_audio(btv);
3290}
3291
3292/* initialization part two -- after registering i2c bus */
3293void __devinit bttv_init_card2(struct bttv *btv)
3294{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003295 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003296
Trent Piephoac7dc842007-06-28 17:51:08 -03003297 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003299 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003300 bttv_readee(btv,eeprom_data,0xa0);
3301 identify_by_eeprom(btv,eeprom_data);
3302 }
3303
3304 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003305 case BTTV_BOARD_MIRO:
3306 case BTTV_BOARD_MIROPRO:
3307 case BTTV_BOARD_PINNACLE:
3308 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003309 /* miro/pinnacle */
3310 miro_pinnacle_gpio(btv);
3311 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003312 case BTTV_BOARD_FLYVIDEO_98:
3313 case BTTV_BOARD_MAXI:
3314 case BTTV_BOARD_LIFE_FLYKIT:
3315 case BTTV_BOARD_FLYVIDEO:
3316 case BTTV_BOARD_TYPHOON_TVIEW:
3317 case BTTV_BOARD_CHRONOS_VS2:
3318 case BTTV_BOARD_FLYVIDEO_98FM:
3319 case BTTV_BOARD_FLYVIDEO2000:
3320 case BTTV_BOARD_FLYVIDEO98EZ:
3321 case BTTV_BOARD_CONFERENCETV:
3322 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003323 flyvideo_gpio(btv);
3324 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003325 case BTTV_BOARD_HAUPPAUGE:
3326 case BTTV_BOARD_HAUPPAUGE878:
3327 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003328 /* pick up some config infos from the eeprom */
3329 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003330 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003331 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003332 case BTTV_BOARD_AVERMEDIA98:
3333 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003334 bttv_readee(btv,eeprom_data,0xa0);
3335 avermedia_eeprom(btv);
3336 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003337 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003338 init_PXC200(btv);
3339 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003340 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003341 picolo_tetra_init(btv);
3342 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003343 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003344 btv->has_radio = 1;
3345 btv->has_matchbox = 1;
3346 btv->mbox_we = 0x20;
3347 btv->mbox_most = 0;
3348 btv->mbox_clk = 0x08;
3349 btv->mbox_data = 0x10;
3350 btv->mbox_mask = 0x38;
3351 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003352 case BTTV_BOARD_VOBIS_BOOSTAR:
3353 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003354 terratec_active_radio_upgrade(btv);
3355 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003356 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003357 if (btv->cardid == 0x3002144f) {
3358 btv->has_radio=1;
3359 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3360 }
3361 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003362 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003363 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003364 /* Fix up entry for 3DFX VoodooTV 100,
3365 which is an OEM STB card variant. */
3366 btv->has_radio=0;
3367 btv->tuner_type=TUNER_TEMIC_NTSC;
3368 }
3369 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003370 case BTTV_BOARD_OSPREY1x0:
3371 case BTTV_BOARD_OSPREY1x0_848:
3372 case BTTV_BOARD_OSPREY101_848:
3373 case BTTV_BOARD_OSPREY1x1:
3374 case BTTV_BOARD_OSPREY1x1_SVID:
3375 case BTTV_BOARD_OSPREY2xx:
3376 case BTTV_BOARD_OSPREY2x0_SVID:
3377 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003378 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003379 case BTTV_BOARD_OSPREY500:
3380 case BTTV_BOARD_OSPREY540:
3381 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003382 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003383 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003384 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003385 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 init_ids_eagle(btv);
3387 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003388 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003389 bttv_readee(btv,eeprom_data,0xa0);
3390 modtec_eeprom(btv);
3391 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003392 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003393 init_lmlbt4x(btv);
3394 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003395 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003396 tibetCS16_init(btv);
3397 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003398 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003399 kodicom4400r_init(btv);
3400 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003401 case BTTV_BOARD_GEOVISION_GV800S:
3402 gv800s_init(btv);
3403 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003404 }
3405
3406 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003407 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003408 /* defaults from card list */
3409 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3410 btv->pll.pll_ifreq=28636363;
3411 btv->pll.pll_crystal=BT848_IFORM_XT0;
3412 }
3413 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3414 btv->pll.pll_ifreq=35468950;
3415 btv->pll.pll_crystal=BT848_IFORM_XT1;
3416 }
3417 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003418 switch (pll[btv->c.nr]) {
3419 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 btv->pll.pll_crystal = 0;
3421 btv->pll.pll_ifreq = 0;
3422 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003423 break;
3424 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003425 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003426 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003428 btv->pll.pll_crystal = BT848_IFORM_XT0;
3429 break;
3430 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003431 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003432 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003433 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003434 btv->pll.pll_crystal = BT848_IFORM_XT1;
3435 break;
3436 }
3437 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003438 btv->pll.pll_current = -1;
3439
Linus Torvalds1da177e2005-04-16 15:20:36 -07003440 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003441 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3442 addr = bttv_tvcards[btv->c.type].tuner_addr;
3443
3444 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003445 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003446 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003447 if (UNSET != tuner[btv->c.nr])
3448 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003449
Trent Piephoabb03622009-01-28 21:32:59 -03003450 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003451 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3452 else if(btv->tuner_type == UNSET)
3453 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3454 else
3455 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3456 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003457
Trent Piephoabb03622009-01-28 21:32:59 -03003458 if (UNSET == btv->tuner_type)
3459 btv->tuner_type = TUNER_ABSENT;
3460
3461 if (btv->tuner_type != TUNER_ABSENT) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003462 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003463
Trent Piephoabb03622009-01-28 21:32:59 -03003464 /* Load tuner module before issuing tuner config call! */
3465 if (autoload)
3466 request_module("tuner");
3467
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003468 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003469 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003470 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003471
Trent Piephoabb03622009-01-28 21:32:59 -03003472 if (bttv_tvcards[btv->c.type].has_radio)
3473 tun_setup.mode_mask |= T_RADIO;
3474
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003475 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3476 }
3477
Hans Verkuil39e8f402006-01-09 15:25:16 -02003478 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003479 struct v4l2_priv_tun_config tda9887_cfg;
3480
3481 tda9887_cfg.tuner = TUNER_TDA9887;
3482 tda9887_cfg.priv = &btv->tda9887_conf;
3483
3484 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003485 }
3486
Trent Piepho5221e212009-01-28 21:32:59 -03003487 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3488 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003489 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3490 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003491 if (svhs[btv->c.nr] != UNSET)
3492 btv->svhs = svhs[btv->c.nr];
3493 if (remote[btv->c.nr] != UNSET)
3494 btv->has_remote = remote[btv->c.nr];
3495
3496 if (bttv_tvcards[btv->c.type].has_radio)
3497 btv->has_radio=1;
3498 if (bttv_tvcards[btv->c.type].has_remote)
3499 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003500 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3501 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003502 if (bttv_tvcards[btv->c.type].volume_gpio)
3503 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3504 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3505 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003506
Linus Torvalds1da177e2005-04-16 15:20:36 -07003507 if (!autoload)
3508 return;
3509
Trent Piephoabb03622009-01-28 21:32:59 -03003510 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003511 return; /* no tuner or related drivers to load */
3512
Linus Torvalds1da177e2005-04-16 15:20:36 -07003513 /* try to detect audio/fader chips */
3514 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003515 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003516 request_module("msp3400");
3517
3518 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003519 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003520 request_module("msp3400");
3521
3522 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003523 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003524 request_module("tda9875");
3525
3526 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003527 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003528 request_module("tda7432");
3529
3530 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3531 request_module("tvaudio");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003532}
3533
3534
3535/* ----------------------------------------------------------------------- */
3536
3537static void modtec_eeprom(struct bttv *btv)
3538{
3539 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3540 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3541 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3542 btv->c.nr,&eeprom_data[0x1e]);
3543 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3544 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3545 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003546 btv->c.nr,&eeprom_data[0x1e]);
3547 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3548 btv->tuner_type=TUNER_PHILIPS_NTSC;
3549 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3550 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003551 } else {
3552 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3553 btv->c.nr,&eeprom_data[0x1e]);
3554 }
3555}
3556
3557static void __devinit hauppauge_eeprom(struct bttv *btv)
3558{
3559 struct tveeprom tv;
3560
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003561 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003562 btv->tuner_type = tv.tuner_type;
3563 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003564
3565 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3566 btv->c.nr, tv.model);
3567
3568 /*
3569 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3570 * type based on model #.
3571 */
3572 if(tv.model == 64900) {
3573 printk("bttv%d: Switching board type from %s to %s\n",
3574 btv->c.nr,
3575 bttv_tvcards[btv->c.type].name,
3576 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3577 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3578 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003579}
3580
3581static int terratec_active_radio_upgrade(struct bttv *btv)
3582{
3583 int freq;
3584
3585 btv->has_radio = 1;
3586 btv->has_matchbox = 1;
3587 btv->mbox_we = 0x10;
3588 btv->mbox_most = 0x20;
3589 btv->mbox_clk = 0x08;
3590 btv->mbox_data = 0x04;
3591 btv->mbox_mask = 0x3c;
3592
3593 btv->mbox_iow = 1 << 8;
3594 btv->mbox_ior = 1 << 9;
3595 btv->mbox_csel = 1 << 10;
3596
3597 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003598 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003599 if (0x1ed8 == tea5757_read(btv)) {
3600 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3601 btv->c.nr);
3602 btv->has_radio = 1;
3603 btv->has_matchbox = 1;
3604 } else {
3605 btv->has_radio = 0;
3606 btv->has_matchbox = 0;
3607 }
3608 return 0;
3609}
3610
3611
3612/* ----------------------------------------------------------------------- */
3613
3614/*
3615 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3616 *
3617 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3618 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3619 * unpacked with unzip).
3620 */
3621#define PVR_GPIO_DELAY 10
3622
3623#define BTTV_ALT_DATA 0x000001
3624#define BTTV_ALT_DCLK 0x100000
3625#define BTTV_ALT_NCONFIG 0x800000
3626
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003627static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3628 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003629{
3630 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003631 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003632 int i;
3633
3634 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3635 gpio_write(0);
3636 udelay(PVR_GPIO_DELAY);
3637
3638 gpio_write(BTTV_ALT_NCONFIG);
3639 udelay(PVR_GPIO_DELAY);
3640
3641 for (n = 0; n < microlen; n++) {
3642 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003643 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003644 gpio_bits(BTTV_ALT_DCLK,0);
3645 if (bits & 0x01)
3646 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3647 else
3648 gpio_bits(BTTV_ALT_DATA,0);
3649 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3650 bits >>= 1;
3651 }
3652 }
3653 gpio_bits(BTTV_ALT_DCLK,0);
3654 udelay(PVR_GPIO_DELAY);
3655
3656 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3657 for (i = 0 ; i < 30 ; i++) {
3658 gpio_bits(BTTV_ALT_DCLK,0);
3659 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3660 }
3661 gpio_bits(BTTV_ALT_DCLK,0);
3662 return 0;
3663}
3664
3665static int __devinit pvr_boot(struct bttv *btv)
3666{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003667 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003668 int rc;
3669
3670 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3671 if (rc != 0) {
3672 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3673 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003674 return rc;
3675 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003676 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3677 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3678 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003679 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003680 return rc;
3681}
3682
3683/* ----------------------------------------------------------------------- */
3684/* some osprey specific stuff */
3685
Trent Piephocf784d52007-07-21 21:26:40 -03003686static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003687{
Trent Piephocf784d52007-07-21 21:26:40 -03003688 int i;
3689 u32 serial = 0;
3690 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003691
Trent Piephocf784d52007-07-21 21:26:40 -03003692 /* This code will nevery actually get called in this case.... */
3693 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3694 /* this might be an antique... check for MMAC label in eeprom */
3695 if (!strncmp(ee, "MMAC", 4)) {
3696 u8 checksum = 0;
3697 for (i = 0; i < 21; i++)
3698 checksum += ee[i];
3699 if (checksum != ee[21])
3700 return;
3701 cardid = BTTV_BOARD_OSPREY1x0_848;
3702 for (i = 12; i < 21; i++)
3703 serial *= 10, serial += ee[i] - '0';
3704 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003705 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003706 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003707
Trent Piephocf784d52007-07-21 21:26:40 -03003708 for (i = 4*16; i < 8*16; i += 16) {
3709 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003710
Trent Piephocf784d52007-07-21 21:26:40 -03003711 if ((checksum&0xff) + (checksum>>8) == 0xff)
3712 break;
3713 }
3714 if (i >= 8*16)
3715 return;
3716 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003717
Trent Piephocf784d52007-07-21 21:26:40 -03003718 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003719 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003720
Trent Piephocf784d52007-07-21 21:26:40 -03003721 switch(type) {
3722 /* 848 based */
3723 case 0x0004:
3724 cardid = BTTV_BOARD_OSPREY1x0_848;
3725 break;
3726 case 0x0005:
3727 cardid = BTTV_BOARD_OSPREY101_848;
3728 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003729
Trent Piephocf784d52007-07-21 21:26:40 -03003730 /* 878 based */
3731 case 0x0012:
3732 case 0x0013:
3733 cardid = BTTV_BOARD_OSPREY1x0;
3734 break;
3735 case 0x0014:
3736 case 0x0015:
3737 cardid = BTTV_BOARD_OSPREY1x1;
3738 break;
3739 case 0x0016:
3740 case 0x0017:
3741 case 0x0020:
3742 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3743 break;
3744 case 0x0018:
3745 case 0x0019:
3746 case 0x001E:
3747 case 0x001F:
3748 cardid = BTTV_BOARD_OSPREY2xx;
3749 break;
3750 case 0x001A:
3751 case 0x001B:
3752 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3753 break;
3754 case 0x0040:
3755 cardid = BTTV_BOARD_OSPREY500;
3756 break;
3757 case 0x0050:
3758 case 0x0056:
3759 cardid = BTTV_BOARD_OSPREY540;
3760 /* bttv_osprey_540_init(btv); */
3761 break;
3762 case 0x0060:
3763 case 0x0070:
3764 case 0x00A0:
3765 cardid = BTTV_BOARD_OSPREY2x0;
3766 /* enable output on select control lines */
3767 gpio_inout(0xffffff,0x000303);
3768 break;
3769 case 0x00D8:
3770 cardid = BTTV_BOARD_OSPREY440;
3771 break;
3772 default:
3773 /* unknown...leave generic, but get serial # */
3774 printk(KERN_INFO "bttv%d: "
3775 "osprey eeprom: unknown card type 0x%04x\n",
3776 btv->c.nr, type);
3777 break;
3778 }
Al Viroc1c36f32008-05-21 00:32:21 -03003779 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003780 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003781
Trent Piephocf784d52007-07-21 21:26:40 -03003782 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3783 btv->c.nr, cardid,
3784 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3785
3786 if (cardid<0 || btv->c.type == cardid)
3787 return;
3788
3789 /* card type isn't set correctly */
3790 if (card[btv->c.nr] < bttv_num_tvcards) {
3791 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3792 "Not overriding user specified card type\n", btv->c.nr);
3793 } else {
3794 printk(KERN_INFO "bttv%d: osprey eeprom: "
3795 "Changing card type from %d to %d\n", btv->c.nr,
3796 btv->c.type, cardid);
3797 btv->c.type = cardid;
3798 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003799}
3800
3801/* ----------------------------------------------------------------------- */
3802/* AVermedia specific stuff, from bktr_card.c */
3803
3804static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003805 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3806 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3807 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3808 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3809 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003810 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003811
3812static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003813 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003814 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3815 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003816 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3817 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003818
3819static void __devinit avermedia_eeprom(struct bttv *btv)
3820{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003821 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003822
3823 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003824 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3825 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003826 btv->has_remote = (eeprom_data[0x42] & 0x01);
3827
3828 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003829 if (tuner_format <= 0x0a)
3830 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003831 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003832 if (tuner_format <= 9)
3833 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003834
3835 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003836 if (tuner_format == 0x09)
3837 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003838
3839 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003840 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3841 if (tuner_type) {
3842 btv->tuner_type = tuner_type;
3843 printk(KERN_CONT "%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003844 } else
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003845 printk(KERN_CONT "Unknown type");
3846 printk(KERN_CONT " radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003847 tuner_tv_fm ? "yes" : "no",
3848 btv->has_remote ? "yes" : "no");
3849}
3850
Trent Piepho72134a62009-01-28 21:32:59 -03003851/*
3852 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3853 * analog demod, which is not I2C controlled like the newer and more common
3854 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3855 * that control the IF for the video and audio. Apparently, bttv GPIO
3856 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3857 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3858 */
3859u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003860{
Trent Piepho72134a62009-01-28 21:32:59 -03003861
3862 if (btv->audio == TVAUDIO_INPUT_TUNER) {
3863 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3864 gpiobits |= 0x10000;
3865 else
3866 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003867 }
Trent Piepho72134a62009-01-28 21:32:59 -03003868
3869 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3870 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003871}
3872
3873
3874/*
3875 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003876 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003877 *
3878 * Hauppauge: pin 5
3879 * Voodoo: pin 20
3880 */
3881static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3882{
3883 int mask = (1 << pin);
3884
3885 gpio_inout(mask,mask);
3886 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003887 mdelay(2);
3888 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003889 gpio_bits(mask,mask);
3890
3891 if (bttv_gpio)
3892 bttv_gpio_tracking(btv,"msp34xx");
3893 if (bttv_verbose)
3894 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3895 "init [%d]\n", btv->c.nr, pin);
3896}
3897
Linus Torvalds1da177e2005-04-16 15:20:36 -07003898/* ----------------------------------------------------------------------- */
3899/* Imagenation L-Model PXC200 Framegrabber */
3900/* This is basically the same procedure as
3901 * used by Alessandro Rubini in his pxc200
3902 * driver, but using BTTV functions */
3903
3904static void __devinit init_PXC200(struct bttv *btv)
3905{
3906 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3907 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3908 0x00 };
3909 unsigned int i;
3910 int tmp;
3911 u32 val;
3912
3913 /* Initialise GPIO-connevted stuff */
3914 gpio_inout(0xffffff, (1<<13));
3915 gpio_write(0);
3916 udelay(3);
3917 gpio_write(1<<13);
3918 /* GPIO inputs are pulled up, so no need to drive
3919 * reset pin any longer */
3920 gpio_bits(0xffffff, 0);
3921 if (bttv_gpio)
3922 bttv_gpio_tracking(btv,"pxc200");
3923
3924 /* we could/should try and reset/control the AD pots? but
3925 right now we simply turned off the crushing. Without
3926 this the AGC drifts drifts
3927 remember the EN is reverse logic -->
3928 setting BT848_ADC_AGC_EN disable the AGC
3929 tboult@eecs.lehigh.edu
3930 */
3931
3932 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
3933
3934 /* Initialise MAX517 DAC */
3935 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
3936 bttv_I2CWrite(btv,0x5E,0,0x80,1);
3937
3938 /* Initialise 12C508 PIC */
3939 /* The I2CWrite and I2CRead commmands are actually to the
3940 * same chips - but the R/W bit is included in the address
3941 * argument so the numbers are different */
3942
3943
3944 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
3945
3946 /* First of all, enable the clock line. This is used in the PXC200-F */
3947 val = btread(BT848_GPIO_DMA_CTL);
3948 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
3949 btwrite(val, BT848_GPIO_DMA_CTL);
3950
3951 /* Then, push to 0 the reset pin long enough to reset the *
3952 * device same as above for the reset line, but not the same
3953 * value sent to the GPIO-connected stuff
3954 * which one is the good one? */
3955 gpio_inout(0xffffff,(1<<2));
3956 gpio_write(0);
3957 udelay(10);
3958 gpio_write(1<<2);
3959
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003960 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003961 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
3962 if (tmp != -1) {
3963 printk(KERN_INFO
3964 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3965 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
3966 }
3967 }
3968
3969 printk(KERN_INFO "PXC200 Initialised.\n");
3970}
3971
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003972
3973
Peter Skipworth93b43f12005-06-23 22:04:45 -07003974/* ----------------------------------------------------------------------- */
3975/*
3976 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3977 * it. This apparently involves the following procedure for each 878 chip:
3978 *
3979 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3980 *
3981 * 2) write to GPIO_DATA
3982 * - 0x0E
3983 * - sleep 1ms
3984 * - 0x10 + 0x0E
3985 * - sleep 10ms
3986 * - 0x0E
3987 * read from GPIO_DATA into buf (uint_32)
3988 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3989 * error. ERROR_CPLD_Check_Failed stop.
3990 *
3991 * 3) write to GPIO_DATA
3992 * - write 0x4400 + 0x0E
3993 * - sleep 10ms
3994 * - write 0x4410 + 0x0E
3995 * - sleep 1ms
3996 * - write 0x0E
3997 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03003998 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07003999 * error. ERROR_CPLD_Check_Failed.
4000 */
4001/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004002static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004003init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004004{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004005 uint32_t dataRead = 0;
4006 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004007
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004008 printk (KERN_INFO
4009 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004010 btv->c.nr);
4011
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004012 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004013
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004014 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4015 msleep (1);
4016 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4017 msleep (10);
4018 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004019
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004020 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004021
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004022 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4023 printk (KERN_INFO
4024 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4025 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004026 }
4027
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004028 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4029 msleep (10);
4030 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4031 msleep (1);
4032 btwrite (watchdog_value, BT848_GPIO_DATA);
4033 msleep (1);
4034 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004035
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004036 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4037 printk (KERN_INFO
4038 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4039 btv->c.nr, dataRead);
4040
Peter Skipworth93b43f12005-06-23 22:04:45 -07004041 return;
4042 }
4043
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004044 printk (KERN_INFO
4045 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004046}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004047
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004048
4049
Linus Torvalds1da177e2005-04-16 15:20:36 -07004050/* ----------------------------------------------------------------------- */
4051/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4052/*
4053 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4054 * This code is placed under the terms of the GNU General Public License
4055 *
4056 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4057 */
4058
4059static void bus_low(struct bttv *btv, int bit)
4060{
4061 if (btv->mbox_ior) {
4062 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4063 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4064 udelay(5);
4065 }
4066
4067 gpio_bits(bit,0);
4068 udelay(5);
4069
4070 if (btv->mbox_ior) {
4071 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4072 udelay(5);
4073 }
4074}
4075
4076static void bus_high(struct bttv *btv, int bit)
4077{
4078 if (btv->mbox_ior) {
4079 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4080 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4081 udelay(5);
4082 }
4083
4084 gpio_bits(bit,bit);
4085 udelay(5);
4086
4087 if (btv->mbox_ior) {
4088 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4089 udelay(5);
4090 }
4091}
4092
4093static int bus_in(struct bttv *btv, int bit)
4094{
4095 if (btv->mbox_ior) {
4096 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4097 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4098 udelay(5);
4099
4100 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4101 udelay(5);
4102 }
4103 return gpio_read() & (bit);
4104}
4105
4106/* TEA5757 register bits */
4107#define TEA_FREQ 0:14
4108#define TEA_BUFFER 15:15
4109
4110#define TEA_SIGNAL_STRENGTH 16:17
4111
4112#define TEA_PORT1 18:18
4113#define TEA_PORT0 19:19
4114
4115#define TEA_BAND 20:21
4116#define TEA_BAND_FM 0
4117#define TEA_BAND_MW 1
4118#define TEA_BAND_LW 2
4119#define TEA_BAND_SW 3
4120
4121#define TEA_MONO 22:22
4122#define TEA_ALLOW_STEREO 0
4123#define TEA_FORCE_MONO 1
4124
4125#define TEA_SEARCH_DIRECTION 23:23
4126#define TEA_SEARCH_DOWN 0
4127#define TEA_SEARCH_UP 1
4128
4129#define TEA_STATUS 24:24
4130#define TEA_STATUS_TUNED 0
4131#define TEA_STATUS_SEARCHING 1
4132
4133/* Low-level stuff */
4134static int tea5757_read(struct bttv *btv)
4135{
4136 unsigned long timeout;
4137 int value = 0;
4138 int i;
4139
4140 /* better safe than sorry */
4141 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4142
4143 if (btv->mbox_ior) {
4144 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4145 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4146 udelay(5);
4147 }
4148
4149 if (bttv_gpio)
4150 bttv_gpio_tracking(btv,"tea5757 read");
4151
4152 bus_low(btv,btv->mbox_we);
4153 bus_low(btv,btv->mbox_clk);
4154
4155 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004156 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004157
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004158 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004159 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4160 schedule();
4161 if (bus_in(btv,btv->mbox_data)) {
4162 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4163 return -1;
4164 }
4165
4166 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004167 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004168 udelay(5);
4169 bus_high(btv,btv->mbox_clk);
4170 udelay(5);
4171 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4172 bus_low(btv,btv->mbox_clk);
4173 value <<= 1;
4174 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4175 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4176 }
4177 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4178 return value;
4179}
4180
4181static int tea5757_write(struct bttv *btv, int value)
4182{
4183 int i;
4184 int reg = value;
4185
4186 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4187
4188 if (btv->mbox_ior) {
4189 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4190 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4191 udelay(5);
4192 }
4193 if (bttv_gpio)
4194 bttv_gpio_tracking(btv,"tea5757 write");
4195
4196 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4197 bus_low(btv,btv->mbox_clk);
4198 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004199 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004200 if (reg & 0x1000000)
4201 bus_high(btv,btv->mbox_data);
4202 else
4203 bus_low(btv,btv->mbox_data);
4204 reg <<= 1;
4205 bus_high(btv,btv->mbox_clk);
4206 udelay(10);
4207 bus_low(btv,btv->mbox_clk);
4208 udelay(10);
4209 }
4210 bus_low(btv,btv->mbox_we); /* unmute !!! */
4211 return 0;
4212}
4213
4214void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4215{
4216 dprintk("tea5757_set_freq %d\n",freq);
4217 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004218}
4219
Linus Torvalds1da177e2005-04-16 15:20:36 -07004220/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4221 *
4222 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4223 * switch instead (CD22M3494E). This IC can have multiple active connections
4224 * between Xn (input) and Yn (output) pins. We need to clear any existing
4225 * connection prior to establish a new one, pulsing the STROBE pin.
4226 *
4227 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4228 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004229 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4230 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4231 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4232 * GPIO[8] - - P3[5] (microcontroller)
4233 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4234 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4235 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004236 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004237 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4238 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004239 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004240 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004241 * note: the vendor refused to give any information on this product, all
4242 * that stuff was found using a multimeter! :)
4243 */
4244static void rv605_muxsel(struct bttv *btv, unsigned int input)
4245{
Trent Piepho13afaef2009-01-28 21:32:59 -03004246 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4247 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4248
4249 gpio_bits(0x07f, muxgpio[input]);
4250
Linus Torvalds1da177e2005-04-16 15:20:36 -07004251 /* reset all conections */
4252 gpio_bits(0x200,0x200);
4253 mdelay(1);
4254 gpio_bits(0x200,0x000);
4255 mdelay(1);
4256
Joe Perchesc84e6032008-02-03 17:18:59 +02004257 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004258 gpio_bits(0x480,0x480);
4259 mdelay(1);
4260 gpio_bits(0x480,0x080);
4261 mdelay(1);
4262}
4263
4264/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4265 *
4266 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4267 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4268 * chips, ten eight input analog multiplexors, a not chip and a few
4269 * other components.
4270 *
4271 * 16 inputs on a secondary bracket are provided and can be selected
4272 * from each of the four capture chips. Two of the eight input
4273 * multiplexors are used to select from any of the 16 input signals.
4274 *
4275 * Unsupported hardware capabilities:
4276 * . A video output monitor on the secondary bracket can be selected from
4277 * one of the 878A chips.
4278 * . Another passthrough but I haven't spent any time investigating it.
4279 * . Digital I/O (logic level connected to GPIO) is available from an
4280 * onboard header.
4281 *
4282 * The on chip input mux should always be set to 2.
4283 * GPIO[16:19] - Video input selection
4284 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4285 * GPIO[?:?] - Digital I/O.
4286 *
4287 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4288 * determined what function (if any) it provides. With the microcontroller
4289 * and sync seperator chips a guess is that it might have to do with video
4290 * switching and maybe some digital I/O.
4291 */
4292static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4293{
4294 /* video mux */
4295 gpio_bits(0x0f0000, input << 16);
4296}
4297
4298static void tibetCS16_init(struct bttv *btv)
4299{
4300 /* enable gpio bits, mask obtained via btSpy */
4301 gpio_inout(0xffffff, 0x0f7fff);
4302 gpio_write(0x0f7fff);
4303}
4304
4305/*
4306 * The following routines for the Kodicom-4400r get a little mind-twisting.
4307 * There is a "master" controller and three "slave" controllers, together
4308 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4309 * The analog switch is controlled by the "master", but the detection order
4310 * of the four BT878A chips is in an order which I just don't understand.
4311 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004312 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004313 * those numbers are different from the detection sequence. When working
4314 * with the analog switch, we need to "map" from the detection sequence
4315 * over to the board's logical controller number. This mapping sequence
4316 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4317 * unit 3, the second (which is the master) is logical unit 0, etc.
4318 * We need to maintain the status of the analog switch (which of the 16
4319 * cameras is connected to which of the 4 controllers). Rather than
4320 * add to the bttv structure for this, we use the data reserved for
4321 * the mbox (unused for this card type).
4322 */
4323
4324/*
4325 * First a routine to set the analog switch, which controls which camera
4326 * is routed to which controller. The switch comprises an X-address
4327 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4328 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4329 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4330 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4331 * specified address. The idea is to set the address and data, then bring
4332 * STROBE high, and finally bring STROBE back to low.
4333 */
4334static void kodicom4400r_write(struct bttv *btv,
4335 unsigned char xaddr,
4336 unsigned char yaddr,
4337 unsigned char data) {
4338 unsigned int udata;
4339
4340 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4341 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4342 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4343 gpio_bits(0x1ff, udata); /* strobe low */
4344}
4345
4346/*
4347 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4348 * use this routine. The routine finds the "master" for the card, maps
4349 * the controller number from the detected position over to the logical
4350 * number, writes the appropriate data to the analog switch, and housekeeps
4351 * the local copy of the switch information. The parameter 'input' is the
4352 * requested camera number (0 - 15).
4353 */
4354static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4355{
4356 char *sw_status;
4357 int xaddr, yaddr;
4358 struct bttv *mctlr;
4359 static unsigned char map[4] = {3, 0, 2, 1};
4360
4361 mctlr = master[btv->c.nr];
4362 if (mctlr == NULL) { /* ignore if master not yet detected */
4363 return;
4364 }
4365 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4366 yaddr = map[yaddr];
4367 sw_status = (char *)(&mctlr->mbox_we);
4368 xaddr = input & 0xf;
4369 /* Check if the controller/camera pair has changed, else ignore */
4370 if (sw_status[yaddr] != xaddr)
4371 {
4372 /* "open" the old switch, "close" the new one, save the new */
4373 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4374 sw_status[yaddr] = xaddr;
4375 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4376 }
4377}
4378
4379/*
4380 * During initialisation, we need to reset the analog switch. We
4381 * also preset the switch to map the 4 connectors on the card to the
4382 * *user's* (see above description of kodicom4400r_muxsel) channels
4383 * 0 through 3
4384 */
4385static void kodicom4400r_init(struct bttv *btv)
4386{
4387 char *sw_status = (char *)(&btv->mbox_we);
4388 int ix;
4389
4390 gpio_inout(0x0003ff, 0x0003ff);
4391 gpio_write(1 << 9); /* reset MUX */
4392 gpio_write(0);
4393 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004394 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004395 sw_status[ix] = ix;
4396 kodicom4400r_write(btv, ix, ix, 1);
4397 }
4398 /*
4399 * Since this is the "master", we need to set up the
4400 * other three controller chips' pointers to this structure
4401 * for later use in the muxsel routine.
4402 */
4403 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4404 return;
4405 master[btv->c.nr-1] = btv;
4406 master[btv->c.nr] = btv;
4407 master[btv->c.nr+1] = btv;
4408 master[btv->c.nr+2] = btv;
4409}
4410
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004411/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4412 * video multiplexers to provide up to 16 video inputs. These
4413 * multiplexers are controlled by the lower 8 GPIO pins of the
4414 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004415
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004416 * xxx0 is pin xxx of multiplexer U5,
4417 * yyy1 is pin yyy of multiplexer U2
4418 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004419#define ENA0 0x01
4420#define ENB0 0x02
4421#define ENA1 0x04
4422#define ENB1 0x08
4423
4424#define IN10 0x10
4425#define IN00 0x20
4426#define IN11 0x40
4427#define IN01 0x80
4428
4429static void xguard_muxsel(struct bttv *btv, unsigned int input)
4430{
4431 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004432 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4433 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4434 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4435 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004436 };
4437 gpio_write(masks[input%16]);
4438}
4439static void picolo_tetra_init(struct bttv *btv)
4440{
4441 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4442 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4443 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4444}
4445static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4446{
4447
4448 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4449 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4450 /*GPIO[20]&GPIO[21] used to choose the right input*/
4451 btwrite (input<<20,BT848_GPIO_DATA);
4452
4453}
4454
4455/*
4456 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4457 *
4458 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4459 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004460 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004461 * optional "Monitor Out" bus. This allows the card to be looking
4462 * at one input while the monitor is looking at another.
4463 *
4464 * Since I've couldn't be bothered figuring out how to add an
4465 * independant muxsel for the monitor bus, I've just set it to
4466 * whatever the card is looking at.
4467 *
4468 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4469 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4470 *
4471 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4472 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4473 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4474 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4475 *
4476 */
4477
4478/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4479#define I2C_TDA8540 0x90
4480#define I2C_TDA8540_ALT1 0x92
4481#define I2C_TDA8540_ALT2 0x94
4482#define I2C_TDA8540_ALT3 0x96
4483#define I2C_TDA8540_ALT4 0x98
4484#define I2C_TDA8540_ALT5 0x9a
4485#define I2C_TDA8540_ALT6 0x9c
4486
4487static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4488{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004489 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004490 int key = input % 4;
4491 int matrix = input / 4;
4492
4493 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4494 btv->c.nr, input, matrix, key);
4495
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004496 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004497 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4498 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4499 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4500 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4501 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4502 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4503 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4504 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4505
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004506 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004507 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004508 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004509 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004510 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004511 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004512 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004513 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004514 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004515
Trent Piephofb5deb12009-01-28 21:32:59 -03004516 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004517}
4518
4519
4520/* PXC200 muxsel helper
4521 * luke@syseng.anu.edu.au
4522 * another transplant
4523 * from Alessandro Rubini (rubini@linux.it)
4524 *
4525 * There are 4 kinds of cards:
4526 * PXC200L which is bt848
4527 * PXC200F which is bt848 with PIC controlling mux
4528 * PXC200AL which is bt878
4529 * PXC200AF which is bt878 with PIC controlling mux
4530 */
4531#define PX_CFG_PXC200F 0x01
4532#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4533#define PX_I2C_PIC 0x0f
4534#define PX_PXC200A_CARDID 0x200a1295
4535#define PX_I2C_CMD_CFG 0x00
4536
4537static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4538{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004539 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004540 long mux;
4541 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004542 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004543
4544 /* Read PIC config to determine if this is a PXC200F */
4545 /* PX_I2C_CMD_CFG*/
4546 buf[0]=0;
4547 buf[1]=0;
4548 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4549 if (rc) {
4550 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4551 /* not PXC ? do nothing */
4552 return;
4553 }
4554
4555 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4556 if (!(rc & PX_CFG_PXC200F)) {
4557 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4558 return;
4559 }
4560
4561
4562 /* The multiplexer in the 200F is handled by the GPIO port */
4563 /* get correct mapping between inputs */
4564 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4565 /* ** not needed!? */
4566 mux = input;
4567
4568 /* make sure output pins are enabled */
4569 /* bitmask=0x30f; */
4570 bitmask=0x302;
4571 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004572 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004573 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4574 bitmask |= 7<<4; /* the DAC */
4575 }
4576 btwrite(bitmask, BT848_GPIO_OUT_EN);
4577
4578 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004579 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004580 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4581 else /* older device */
4582 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4583 btwrite(bitmask,BT848_GPIO_DATA);
4584
4585 /*
4586 * Was "to be safe, set the bt848 to input 0"
4587 * Actually, since it's ok at load time, better not messing
4588 * with these bits (on PXC200AF you need to set mux 2 here)
4589 *
4590 * needed because bttv-driver sets mux before calling this function
4591 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004592 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004593 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4594 else /* older device */
4595 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4596
4597 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4598}
4599
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004600static void phytec_muxsel(struct bttv *btv, unsigned int input)
4601{
4602 unsigned int mux = input % 4;
4603
4604 if (input == btv->svhs)
4605 mux = 0;
4606
4607 gpio_bits(0x3, mux);
4608}
4609
Bruno Christo0c5db422009-03-02 22:38:59 -03004610/*
4611 * GeoVision GV-800(S) functions
4612 * Bruno Christo <bchristo@inf.ufsm.br>
4613*/
4614
4615/* This is a function to control the analog switch, which determines which
4616 * camera is routed to which controller. The switch comprises an X-address
4617 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4618 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4619 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4620 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4621 * specified address. There is also a chip select (gpio bit 16).
4622 * The idea is to set the address and chip select together, bring
4623 * STROBE high, write the data, and finally bring STROBE back to low.
4624 */
4625static void gv800s_write(struct bttv *btv,
4626 unsigned char xaddr,
4627 unsigned char yaddr,
4628 unsigned char data) {
4629 /* On the "master" 878A:
4630 * GPIO bits 0-9 are used for the analog switch:
4631 * 00 - 03: camera selector
4632 * 04 - 06: 878A (controller) selector
4633 * 16: cselect
4634 * 17: strobe
4635 * 18: data (1->on, 0->off)
4636 * 19: reset
4637 */
4638 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4639 const u32 CSELECT = 1<<16;
4640 const u32 STROBE = 1<<17;
4641 const u32 DATA = data<<18;
4642
4643 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4644 gpio_bits(0x20000, STROBE); /* STROBE high */
4645 gpio_bits(0x40000, DATA); /* write DATA */
4646 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4647}
4648
4649/*
4650 * GeoVision GV-800(S) muxsel
4651 *
4652 * Each of the 4 cards (controllers) use this function.
4653 * The controller using this function selects the input through the GPIO pins
4654 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4655 *
4656 * The parameter 'input' is the requested camera number (0-4) on the controller.
4657 * The map array has the address of each input. Note that the addresses in the
4658 * array are in the sequence the original GeoVision driver uses, that is, set
4659 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4660 * the physical "camera 1" connector corresponds to controller 0 input 0,
4661 * "camera 2" corresponds to controller 1 input 0, and so on.
4662 *
4663 * After getting the input address, the function then writes the appropriate
4664 * data to the analog switch, and housekeeps the local copy of the switch
4665 * information.
4666 */
4667static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4668{
4669 struct bttv *mctlr;
4670 char *sw_status;
4671 int xaddr, yaddr;
4672 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4673 { 0x1, 0x5, 0xb, 0x7 },
4674 { 0x2, 0x8, 0xc, 0xe },
4675 { 0x3, 0x9, 0xd, 0xf } };
4676 input = input%4;
4677 mctlr = master[btv->c.nr];
4678 if (mctlr == NULL) {
4679 /* do nothing until the "master" is detected */
4680 return;
4681 }
4682 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4683 sw_status = (char *)(&mctlr->mbox_we);
4684 xaddr = map[yaddr][input] & 0xf;
4685
4686 /* Check if the controller/camera pair has changed, ignore otherwise */
4687 if (sw_status[yaddr] != xaddr) {
4688 /* disable the old switch, enable the new one and save status */
4689 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4690 sw_status[yaddr] = xaddr;
4691 gv800s_write(mctlr, xaddr, yaddr, 1);
4692 }
4693}
4694
4695/* GeoVision GV-800(S) "master" chip init */
4696static void gv800s_init(struct bttv *btv)
4697{
4698 char *sw_status = (char *)(&btv->mbox_we);
4699 int ix;
4700
4701 gpio_inout(0xf107f, 0xf107f);
4702 gpio_write(1<<19); /* reset the analog MUX */
4703 gpio_write(0);
4704
4705 /* Preset camera 0 to the 4 controllers */
4706 for (ix = 0; ix < 4; ix++) {
4707 sw_status[ix] = ix;
4708 gv800s_write(btv, ix, ix, 1);
4709 }
4710
4711 /* Inputs on the "master" controller need this brightness fix */
4712 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4713
4714 if (btv->c.nr > BTTV_MAX-4)
4715 return;
4716 /*
4717 * Store the "master" controller pointer in the master
4718 * array for later use in the muxsel function.
4719 */
4720 master[btv->c.nr] = btv;
4721 master[btv->c.nr+1] = btv;
4722 master[btv->c.nr+2] = btv;
4723 master[btv->c.nr+3] = btv;
4724}
4725
Linus Torvalds1da177e2005-04-16 15:20:36 -07004726/* ----------------------------------------------------------------------- */
4727/* motherboard chipset specific stuff */
4728
Adrian Bunk7d44e892007-12-11 19:23:43 -03004729void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004730{
4731 int pcipci_fail = 0;
4732 struct pci_dev *dev = NULL;
4733
Alan Cox3d265c92006-09-14 11:53:16 -03004734 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004735 pcipci_fail = 1;
4736 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4737 triton1 = 1;
4738 if (pci_pci_problems & PCIPCI_VSFX)
4739 vsfx = 1;
4740#ifdef PCIPCI_ALIMAGIK
4741 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4742 latency = 0x0A;
4743#endif
4744
Linus Torvalds1da177e2005-04-16 15:20:36 -07004745
4746 /* print warnings about any quirks found */
4747 if (triton1)
4748 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4749 if (vsfx)
4750 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4751 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004752 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4753 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004754 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004755 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004756 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004757 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004758 printk(KERN_INFO "bttv: overlay forced. Use this "
4759 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004760 }
4761 }
4762 if (UNSET != latency)
4763 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004764 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004765 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004766 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004767 pci_read_config_byte(dev, 0x53, &b);
4768 if (bttv_debug)
4769 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4770 "bufcon=0x%02x\n",b);
4771 }
4772}
4773
4774int __devinit bttv_handle_chipset(struct bttv *btv)
4775{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004776 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004777
4778 if (!triton1 && !vsfx && UNSET == latency)
4779 return 0;
4780
4781 if (bttv_verbose) {
4782 if (triton1)
4783 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4784 if (vsfx && btv->id >= 878)
4785 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4786 if (UNSET != latency)
4787 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4788 btv->c.nr,latency);
4789 }
4790
4791 if (btv->id < 878) {
4792 /* bt848 (mis)uses a bit in the irq mask for etbf */
4793 if (triton1)
4794 btv->triton1 = BT848_INT_ETBF;
4795 } else {
4796 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004797 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004798 if (triton1)
4799 command |= BT878_EN_TBFX;
4800 if (vsfx)
4801 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004802 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4803 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004804 if (UNSET != latency)
4805 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4806 return 0;
4807}
4808
4809
4810/*
4811 * Local variables:
4812 * c-basic-offset: 8
4813 * End:
4814 */