blob: 187ed4ef39939be98b1ce6dc1c9b83754f410290 [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
Robert Millan76ecf452009-03-11 08:18:53 -0300301 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2, "Conceptronic CTVFMi v2"},
302
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700303 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800304 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200305 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
306 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800307 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
308 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
309 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
310 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200311 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800312 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300313 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800314 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300315 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300316 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300317 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300318 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300319 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
320 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
321 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
322 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700323 { 0, -1, NULL }
324};
325
326/* ----------------------------------------------------------------------- */
327/* array with description for bt848 / bt878 tv/grabber cards */
328
329struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800330 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800331 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800332 .name = " *** UNKNOWN/GENERIC *** ",
333 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800334 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300335 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300336 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800337 .tuner_addr = ADDR_UNSET,
338 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800339 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800340 .name = "MIRO PCTV",
341 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300342 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800343 .svhs = 2,
344 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300345 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300346 .gpiomux = { 2, 0, 0, 0 },
347 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800348 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300349 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800350 .tuner_addr = ADDR_UNSET,
351 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800352 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800353 .name = "Hauppauge (bt848)",
354 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300355 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 .svhs = 2,
357 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300358 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300359 .gpiomux = { 0, 1, 2, 3 },
360 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800361 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300362 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800363 .tuner_addr = ADDR_UNSET,
364 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800365 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800366 .name = "STB, Gateway P/N 6000699 (bt848)",
367 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300368 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800369 .svhs = 2,
370 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300371 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300372 .gpiomux = { 4, 0, 2, 3 },
373 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800374 .no_msp34xx = 1,
375 .needs_tvaudio = 1,
376 .tuner_type = TUNER_PHILIPS_NTSC,
377 .tuner_addr = ADDR_UNSET,
378 .pll = PLL_28,
379 .has_radio = 1,
380 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700381
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800383 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800384 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
385 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300386 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 .svhs = 2,
388 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300389 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300390 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800391 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300392 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800393 .tuner_addr = ADDR_UNSET,
394 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800395 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800396 .name = "Diamond DTV2000",
397 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300398 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800399 .svhs = 2,
400 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300401 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300402 .gpiomux = { 0, 1, 0, 1 },
403 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800404 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300405 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800406 .tuner_addr = ADDR_UNSET,
407 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800408 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800409 .name = "AVerMedia TVPhone",
410 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300411 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800412 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300413 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800414 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300415 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800416 /* 0x04 for some cards ?? */
417 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300418 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300420 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800421 .has_remote = 1,
422 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800423 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800424 .name = "MATRIX-Vision MV-Delta",
425 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300426 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800427 .svhs = 3,
428 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300429 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300430 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800431 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300432 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800433 .tuner_addr = ADDR_UNSET,
434 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800437 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
439 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300440 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800441 .svhs = 2,
442 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300443 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300444 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
445 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800446 .needs_tvaudio = 1,
447 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300448 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800449 .tuner_addr = ADDR_UNSET,
450 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800451 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800452 .name = "IMS/IXmicro TurboTV",
453 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300454 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800455 .svhs = 2,
456 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300457 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300458 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800459 .needs_tvaudio = 0,
460 .pll = PLL_28,
461 .tuner_type = TUNER_TEMIC_PAL,
462 .tuner_addr = ADDR_UNSET,
463 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800464 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800465 .name = "Hauppauge (bt878)",
466 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300467 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800468 .svhs = 2,
469 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300470 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300471 .gpiomux = { 0, 1, 2, 3 },
472 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800473 .needs_tvaudio = 1,
474 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300475 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800476 .tuner_addr = ADDR_UNSET,
477 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800478 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800479 .name = "MIRO PCTV pro",
480 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300481 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800482 .svhs = 2,
483 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300484 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300485 .gpiomux = { 0x20001,0x10001, 0, 0 },
486 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800487 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300488 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800489 .tuner_addr = ADDR_UNSET,
490 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700491
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800492 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800493 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800494 .name = "ADS Technologies Channel Surfer TV (bt848)",
495 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300496 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800497 .svhs = 2,
498 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300499 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300500 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800501 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300502 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800503 .tuner_addr = ADDR_UNSET,
504 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800505 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800506 .name = "AVerMedia TVCapture 98",
507 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300508 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800509 .svhs = 2,
510 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300511 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300512 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 .needs_tvaudio = 1,
514 .msp34xx_alt = 1,
515 .pll = PLL_28,
516 .tuner_type = TUNER_PHILIPS_PAL,
517 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300518 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800519 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800521 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800522 .name = "Aimslab Video Highway Xtreme (VHX)",
523 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300524 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800525 .svhs = 2,
526 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300527 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300528 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
529 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800530 .needs_tvaudio = 1,
531 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300532 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800533 .tuner_addr = ADDR_UNSET,
534 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800535 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800536 .name = "Zoltrix TV-Max",
537 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300538 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800539 .svhs = 2,
540 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300541 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300542 .gpiomux = { 0, 0, 1, 0 },
543 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800544 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300545 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800546 .tuner_addr = ADDR_UNSET,
547 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700548
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800549 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800550 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800551 .name = "Prolink Pixelview PlayTV (bt878)",
552 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300553 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800554 .svhs = 2,
555 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300556 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800557 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300558 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
559 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800560 .needs_tvaudio = 1,
561 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300562 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300563 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800564 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800565 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800566 .name = "Leadtek WinView 601",
567 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300568 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 .svhs = 2,
570 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300571 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300572 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
573 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800574 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300575 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300577 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800578 .has_radio = 1,
579 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800580 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800581 .name = "AVEC Intercapture",
582 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300583 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800584 .svhs = 2,
585 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300586 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300587 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800588 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300589 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800590 .tuner_addr = ADDR_UNSET,
591 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800592 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800593 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
594 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300595 /* .audio_inputs= 1, */
596 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800597 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300598 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300599 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300601 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800602 .tuner_addr = ADDR_UNSET,
603 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700604
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800605 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800606 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800607 .name = "CEI Raffles Card",
608 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300609 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300611 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300612 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800613 .tuner_addr = ADDR_UNSET,
614 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800615 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800616 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
617 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300618 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800619 .svhs = 2,
620 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300621 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300622 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
623 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800624 .pll = PLL_28,
625 .tuner_type = TUNER_PHILIPS_PAL_I,
626 .tuner_addr = ADDR_UNSET,
627 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800628 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800629 .name = "Askey CPH050/ Phoebe Tv Master + FM",
630 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300631 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800632 .svhs = 2,
633 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300634 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300635 .gpiomux = { 0, 1, 0x800, 0x400 },
636 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800637 .needs_tvaudio = 1,
638 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300639 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800640 .tuner_addr = ADDR_UNSET,
641 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800642 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800643 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
644 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300645 /* .audio_inputs= 1, */
646 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300647 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800648 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300649 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300650 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300651 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800652 .no_msp34xx = 1,
653 .pll = PLL_28,
654 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
655 .tuner_addr = ADDR_UNSET,
656 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700657
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800658 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800659 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800660 .name = "Askey CPH05X/06X (bt878) [many vendors]",
661 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300662 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800663 .svhs = 2,
664 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300665 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300666 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
667 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800668 .needs_tvaudio = 1,
669 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300670 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800671 .tuner_addr = ADDR_UNSET,
672 .has_remote = 1,
673 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800674 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
676 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300677 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800678 .svhs = 2,
679 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300680 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300681 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
682 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800683 .needs_tvaudio = 0,
684 .tuner_type = TUNER_PHILIPS_PAL,
685 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300686 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800687 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800688 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800689 .name = "Hauppauge WinCam newer (bt878)",
690 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300691 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800692 .svhs = 3,
693 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300694 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300695 .gpiomux = { 0, 1, 2, 3 },
696 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300698 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800699 .tuner_addr = ADDR_UNSET,
700 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800701 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800702 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
703 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300704 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800705 .svhs = 2,
706 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300707 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300708 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
709 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800710 .pll = PLL_28,
711 .tuner_type = TUNER_PHILIPS_SECAM,
712 .tuner_addr = ADDR_UNSET,
713 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800715 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800716 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800717 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
718 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300719 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800720 .svhs = 2,
721 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300722 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300723 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
724 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800725 .needs_tvaudio = 0,
726 .tuner_type = TUNER_PHILIPS_PAL,
727 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300728 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800729 /* GPIO wiring:
730 External 20 pin connector (for Active Radio Upgrade board)
731 gpio00: i2c-sda
732 gpio01: i2c-scl
733 gpio02: om5610-data
734 gpio03: om5610-clk
735 gpio04: om5610-wre
736 gpio05: om5610-stereo
737 gpio06: rds6588-davn
738 gpio07: Pin 7 n.c.
739 gpio08: nIOW
740 gpio09+10: nIOR, nSEL ?? (bt878)
741 gpio09: nIOR (bt848)
742 gpio10: nSEL (bt848)
743 Sound Routing:
744 gpio16: u2-A0 (1st 4052bt)
745 gpio17: u2-A1
746 gpio18: u2-nEN
747 gpio19: u4-A0 (2nd 4052)
748 gpio20: u4-A1
749 u4-nEN - GND
750 Btspy:
751 00000 : Cdrom (internal audio input)
752 10000 : ext. Video audio input
753 20000 : TV Mono
754 a0000 : TV Mono/2
755 1a0000 : TV Stereo
756 30000 : Radio
757 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700758 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700759
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800760 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800761 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800762 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
763 .name = "Imagenation PXC200",
764 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300765 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800766 .svhs = 1, /* was: 4 */
767 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300768 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300769 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800770 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300771 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800772 .tuner_addr = ADDR_UNSET,
773 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800775 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800776 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800777 .name = "Lifeview FlyVideo 98 LR50",
778 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300779 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800780 .svhs = 2,
781 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300782 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300783 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
784 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800785 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300786 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800787 .tuner_addr = ADDR_UNSET,
788 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800789 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800790 .name = "Formac iProTV, Formac ProTV I (bt848)",
791 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300792 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800793 .svhs = 3,
794 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300795 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300796 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800797 .pll = PLL_28,
798 .tuner_type = TUNER_PHILIPS_PAL,
799 .tuner_addr = ADDR_UNSET,
800 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700801
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800802 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800803 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800804 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
805 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300806 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 .svhs = 2,
808 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300809 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300810 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300812 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800813 .tuner_addr = ADDR_UNSET,
814 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800815 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800816 .name = "Terratec TerraTValue Version Bt878",
817 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300818 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800819 .svhs = 2,
820 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300821 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300822 .gpiomux = { 0x500, 0, 0x300, 0x900 },
823 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800824 .needs_tvaudio = 1,
825 .pll = PLL_28,
826 .tuner_type = TUNER_PHILIPS_PAL,
827 .tuner_addr = ADDR_UNSET,
828 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800829 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
831 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300832 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800833 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300834 /* TV, CVid, SVid, CVid over SVid connector */
835 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800836 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
837 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300838 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
839 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800840 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
841 gpio23 -- hef4052:nEnable (0x800000)
842 gpio12 -- hef4052:A1
843 gpio13 -- hef4052:A0
844 0x0000: external audio
845 0x1000: FM
846 0x2000: TV
847 0x3000: n.c.
848 Note: There exists another variant "Winfast 2000" with tv stereo !?
849 Note: eeprom only contains FF and pci subsystem id 107d:6606
850 */
851 .needs_tvaudio = 0,
852 .pll = PLL_28,
853 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300854 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800855 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300856 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800857 .has_remote = 1,
858 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800859 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800860 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
861 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300862 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800863 .svhs = 2,
864 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300865 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300866 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
867 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800868 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300869 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800870 .tuner_addr = ADDR_UNSET,
871 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800873 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800874 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800875 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
876 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300877 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800878 .svhs = 2,
879 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300880 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300881 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
882 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300884 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800885 .tuner_addr = ADDR_UNSET,
886 .has_radio = 1,
887 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800888 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800889 .name = "Prolink PixelView PlayTV pro",
890 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300891 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800892 .svhs = 2,
893 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300894 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300895 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
896 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800897 .no_msp34xx = 1,
898 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300899 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800900 .tuner_addr = ADDR_UNSET,
901 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800902 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800903 .name = "Askey CPH06X TView99",
904 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300905 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800906 .svhs = 2,
907 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300908 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300909 .gpiomux = { 0x551400, 0x551200, 0, 0 },
910 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .needs_tvaudio = 1,
912 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300913 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800914 .tuner_addr = ADDR_UNSET,
915 .has_remote = 1,
916 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800917 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800918 .name = "Pinnacle PCTV Studio/Rave",
919 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300920 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800921 .svhs = 2,
922 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300923 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300924 .gpiomux = { 2, 0xd0001, 0, 0 },
925 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .needs_tvaudio = 0,
927 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300928 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800929 .tuner_addr = ADDR_UNSET,
930 },
931
932 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800933 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800934 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
935 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300936 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800937 .svhs = 2,
938 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300939 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300940 .gpiomux = { 4, 0, 2, 3 },
941 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800942 .no_msp34xx = 1,
943 .needs_tvaudio = 1,
944 .tuner_type = TUNER_PHILIPS_NTSC,
945 .tuner_addr = ADDR_UNSET,
946 .pll = PLL_28,
947 .has_radio = 1,
948 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800949 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800950 .name = "AVerMedia TVPhone 98",
951 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300952 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800953 .svhs = 2,
954 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300955 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300956 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800957 .needs_tvaudio = 1,
958 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300959 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .tuner_addr = ADDR_UNSET,
961 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300962 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800964 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800965 .name = "ProVideo PV951", /* pic16c54 */
966 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300967 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800968 .svhs = 2,
969 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300970 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300971 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800972 .needs_tvaudio = 1,
973 .no_msp34xx = 1,
974 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300975 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800976 .tuner_addr = ADDR_UNSET,
977 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800978 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800979 .name = "Little OnAir TV",
980 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300981 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800982 .svhs = 2,
983 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -0300984 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300985 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
986 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800987 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300988 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 .tuner_addr = ADDR_UNSET,
990 },
991
992 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800993 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800994 .name = "Sigma TVII-FM",
995 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -0300996 /* .audio_inputs= 1, */
997 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800998 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300999 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001000 .gpiomux = { 1, 1, 0, 2 },
1001 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .no_msp34xx = 1,
1003 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001004 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001005 .tuner_addr = ADDR_UNSET,
1006 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001007 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001008 .name = "MATRIX-Vision MV-Delta 2",
1009 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001010 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001011 .svhs = 3,
1012 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001013 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001014 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001015 .no_msp34xx = 1,
1016 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001017 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001018 .tuner_addr = ADDR_UNSET,
1019 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001020 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001021 .name = "Zoltrix Genie TV/FM",
1022 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001023 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .svhs = 2,
1025 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001026 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001027 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1028 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001029 .no_msp34xx = 1,
1030 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001031 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001032 .tuner_addr = ADDR_UNSET,
1033 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001034 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001035 .name = "Terratec TV/Radio+",
1036 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001037 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001038 .svhs = 2,
1039 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001040 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001041 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1042 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001043 .needs_tvaudio = 1,
1044 .no_msp34xx = 1,
1045 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001046 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 .tuner_addr = ADDR_UNSET,
1048 .has_radio = 1,
1049 },
1050
1051 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001052 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001053 .name = "Askey CPH03x/ Dynalink Magic TView",
1054 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001055 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001056 .svhs = 2,
1057 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001058 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001059 .gpiomux = {2,0,0,0 },
1060 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .needs_tvaudio = 1,
1062 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001063 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001064 .tuner_addr = ADDR_UNSET,
1065 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001066 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001067 .name = "IODATA GV-BCTV3/PCI",
1068 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001069 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001070 .svhs = 2,
1071 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001072 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001073 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001074 .no_msp34xx = 1,
1075 .pll = PLL_28,
1076 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1077 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001078 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001080 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001081 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1082 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001083 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001084 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001085 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001086 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001087 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001088 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001089 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1090 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001091 .no_msp34xx = 1,
1092 .pll = PLL_28,
1093 .tuner_type = TUNER_PHILIPS_PAL_I,
1094 .tuner_addr = ADDR_UNSET,
1095 .has_remote = 1,
1096 /* GPIO wiring: (different from Rev.4C !)
1097 GPIO17: U4.A0 (first hef4052bt)
1098 GPIO19: U4.A1
1099 GPIO20: U5.A1 (second hef4052bt)
1100 GPIO21: U4.nEN
1101 GPIO22: BT832 Reset Line
1102 GPIO23: A5,A0, U5,nEN
1103 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1104 */
1105 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001106 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001107 .name = "Eagle Wireless Capricorn2 (bt878A)",
1108 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001109 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .svhs = 2,
1111 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001112 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001113 .gpiomux = { 0, 1, 2, 3 },
1114 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001115 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001116 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001117 .tuner_addr = ADDR_UNSET,
1118 },
1119
1120 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001121 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001122 /* David Härdeman <david@2gen.com> */
1123 .name = "Pinnacle PCTV Studio Pro",
1124 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001125 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001126 .svhs = 3,
1127 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001128 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001129 .gpiomux = { 1, 0xd0001, 0, 0 },
1130 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001131 /* sound path (5 sources):
1132 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1133 0= ext. Audio IN
1134 1= from MUX2
1135 2= Mono TV sound from Tuner
1136 3= not connected
1137 MUX2 (mask 0x30000):
1138 0,2,3= from MSP34xx
1139 1= FM stereo Radio from Tuner */
1140 .needs_tvaudio = 0,
1141 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001142 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001143 .tuner_addr = ADDR_UNSET,
1144 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001145 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001146 /* Claas Langbehn <claas@bigfoot.com>,
1147 Sven Grothklags <sven@upb.de> */
1148 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1149 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001150 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001151 .svhs = 2,
1152 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001153 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001154 .gpiomux = { 0, 0, 0x10, 8 },
1155 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001156 .needs_tvaudio = 1,
1157 .pll = PLL_28,
1158 .tuner_type = TUNER_PHILIPS_PAL,
1159 .tuner_addr = ADDR_UNSET,
1160 .has_radio = 1,
1161 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001162 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001163 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001164 in de.comp.os.unix.linux.hardware:
1165 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001166 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001167 options tuner type=5 */
1168 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1169 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001170 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001171 .svhs = 2,
1172 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001173 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001174 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1175 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001176 /* For cards with tda9820/tda9821:
1177 0x0000: Tuner normal stereo
1178 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1179 0x0880: Tuner A2 stereo */
1180 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001181 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001182 .tuner_addr = ADDR_UNSET,
1183 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001184 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001185 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1186 old Easy TV BT848 version (model CPH031) */
1187 .name = "Askey CPH031/ BESTBUY Easy TV",
1188 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001189 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001190 .svhs = 2,
1191 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001192 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001193 .gpiomux = { 2, 0, 0, 0 },
1194 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001195 .needs_tvaudio = 0,
1196 .pll = PLL_28,
1197 .tuner_type = TUNER_TEMIC_PAL,
1198 .tuner_addr = ADDR_UNSET,
1199 },
1200
1201 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001202 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001203 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1204 .name = "Lifeview FlyVideo 98FM LR50",
1205 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001206 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001207 .svhs = 2,
1208 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001209 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001210 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1211 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001212 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001213 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001214 .tuner_addr = ADDR_UNSET,
1215 },
1216 /* This is the ultimate cheapo capture card
1217 * just a BT848A on a small PCB!
1218 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001219 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001220 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1221 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001222 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001223 .svhs = 1,
1224 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001225 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001226 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001227 .needs_tvaudio = 0,
1228 .no_msp34xx = 1,
1229 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001230 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001231 .tuner_addr = ADDR_UNSET,
1232 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001233 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001234 /* Daniel Herrington <daniel.herrington@home.com> */
1235 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1236 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001237 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001238 .svhs = 2,
1239 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001240 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001241 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1242 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001243 .needs_tvaudio = 1,
1244 .pll = PLL_28,
1245 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1246 .tuner_addr = ADDR_UNSET,
1247 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001248 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001249 /* Matti Mottus <mottus@physic.ut.ee> */
1250 .name = "Askey CPH03x TV Capturer",
1251 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001252 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001253 .svhs = 2,
1254 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001255 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001256 .gpiomux = { 2, 0, 0, 0 },
1257 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001258 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001259 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001260 .tuner_addr = ADDR_UNSET,
1261 },
1262
1263 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001264 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001265 /* Philip Blundell <philb@gnu.org> */
1266 .name = "Modular Technology MM100PCTV",
1267 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001268 /* .audio_inputs= 2, */
1269 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001270 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001271 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001272 .gpiomux = { 2, 0, 0, 1 },
1273 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001274 .pll = PLL_35,
1275 .tuner_type = TUNER_TEMIC_PAL,
1276 .tuner_addr = ADDR_UNSET,
1277 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001278 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001279 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001280 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001281 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001282 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001283 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001284 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001285 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001286 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001287 .no_msp34xx = 1,
1288 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001289 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001290 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001291 .tuner_addr = ADDR_UNSET,
1292 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001293 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001294 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1295 new Easy TV BT878 version (model CPH061)
1296 special thanks to Informatica Mieres for providing the card */
1297 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1298 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001299 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001300 .svhs = 2,
1301 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001302 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001303 .gpiomux = { 1, 0, 4, 4 },
1304 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001305 .needs_tvaudio = 0,
1306 .pll = PLL_28,
1307 .tuner_type = TUNER_PHILIPS_PAL,
1308 .tuner_addr = ADDR_UNSET,
1309 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001310 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001311 /* Lukas Gebauer <geby@volny.cz> */
1312 .name = "ATI TV-Wonder",
1313 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001314 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001315 .svhs = 2,
1316 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001317 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001318 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1319 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001320 .pll = PLL_28,
1321 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1322 .tuner_addr = ADDR_UNSET,
1323 },
1324
1325 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001326 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001327 /* Lukas Gebauer <geby@volny.cz> */
1328 .name = "ATI TV-Wonder VE",
1329 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001330 /* .audio_inputs= 1, */
1331 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001332 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001333 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001334 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001335 .no_msp34xx = 1,
1336 .pll = PLL_28,
1337 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1338 .tuner_addr = ADDR_UNSET,
1339 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001340 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001341 /* DeeJay <deejay@westel900.net (2000S) */
1342 .name = "Lifeview FlyVideo 2000S LR90",
1343 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001344 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001345 .svhs = 2,
1346 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001347 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001348 /* Radio changed from 1e80 to 0x800 to make
1349 FlyVideo2000S in .hu happy (gm)*/
1350 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001351 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1352 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001353 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001354 .no_msp34xx = 1,
1355 .no_tda9875 = 1,
1356 .needs_tvaudio = 1,
1357 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001358 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001359 .tuner_addr = ADDR_UNSET,
1360 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001361 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001362 .name = "Terratec TValueRadio",
1363 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001364 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001365 .svhs = 2,
1366 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001367 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001368 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1369 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001370 .needs_tvaudio = 1,
1371 .pll = PLL_28,
1372 .tuner_type = TUNER_PHILIPS_PAL,
1373 .tuner_addr = ADDR_UNSET,
1374 .has_radio = 1,
1375 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001376 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001377 /* TANAKA Kei <peg00625@nifty.com> */
1378 .name = "IODATA GV-BCTV4/PCI",
1379 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001380 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 .svhs = 2,
1382 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001383 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001384 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 .no_msp34xx = 1,
1386 .pll = PLL_28,
1387 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1388 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001389 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001390 },
1391
1392 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001393 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001394 .name = "3Dfx VoodooTV FM (Euro)",
1395 /* try "insmod msp3400 simple=0" if you have
1396 * sound problems with this card. */
1397 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001398 /* .audio_inputs= 1, */
1399 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001400 .gpiomask = 0x4f8a00,
1401 /* 0x100000: 1=MSP enabled (0=disable again)
1402 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1403 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1404 .gpiomute = 0x947fff,
1405 /* tvtuner, radio, external,internal, mute, stereo
1406 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001407 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001408 .tuner_type = TUNER_MT2032,
1409 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001410 .pll = PLL_28,
1411 .has_radio = 1,
1412 },
1413 [BTTV_BOARD_VOODOOTV_200] = {
1414 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001415 /* try "insmod msp3400 simple=0" if you have
1416 * sound problems with this card. */
1417 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001418 /* .audio_inputs= 1, */
1419 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001420 .gpiomask = 0x4f8a00,
1421 /* 0x100000: 1=MSP enabled (0=disable again)
1422 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001423 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1424 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001425 /* tvtuner, radio, external,internal, mute, stereo
1426 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001427 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001428 .tuner_type = TUNER_MT2032,
1429 .tuner_addr = ADDR_UNSET,
1430 .pll = PLL_28,
1431 .has_radio = 1,
1432 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001433 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001434 /* Philip Blundell <pb@nexus.co.uk> */
1435 .name = "Active Imaging AIMMS",
1436 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001437 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001438 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001439 .tuner_addr = ADDR_UNSET,
1440 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001441 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001442 .gpiomask = 0
1443 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001444 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001445 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1446 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1447 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001448 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001449 .svhs = 2,
1450 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001451 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001452 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1453 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001454 .needs_tvaudio = 1,
1455 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001456 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001457 .tuner_addr = ADDR_UNSET,
1458 .has_remote = 1,
1459 /* GPIO wiring:
1460 GPIO0: U4.A0 (hef4052bt)
1461 GPIO1: U4.A1
1462 GPIO2: U4.A1 (second hef4052bt)
1463 GPIO3: U4.nEN, U5.A0, A5.nEN
1464 GPIO8-15: vrd866b ?
1465 */
1466 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001467 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1469 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001470 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001471 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001472 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1473 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001474 .pll = PLL_28,
1475 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001476 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .tuner_addr = ADDR_UNSET,
1478 },
1479
1480 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001481 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001482 /* Dariusz Kowalewski <darekk@automex.pl> */
1483 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1484 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001485 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001486 .svhs = 2,
1487 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001488 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001489 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1490 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001491 .needs_tvaudio = 1,
1492 .no_msp34xx = 1,
1493 .no_tda9875 = 1,
1494 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001495 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001496 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001497 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001498 .has_radio = 1, /* Note: not all cards have radio */
1499 .has_remote = 1,
1500 /* GPIO wiring:
1501 GPIO0: A0 hef4052
1502 GPIO1: A1 hef4052
1503 GPIO3: nEN hef4052
1504 GPIO8-15: vrd866b
1505 GPIO20,22,23: R30,R29,R28
1506 */
1507 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001508 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001509 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1510 /* you must jumper JP5 for the card to work */
1511 .name = "Sensoray 311",
1512 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001513 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001514 .svhs = 4,
1515 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001516 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001517 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001518 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001519 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001520 .tuner_addr = ADDR_UNSET,
1521 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001522 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001523 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1524 .name = "RemoteVision MX (RV605)",
1525 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001526 /* .audio_inputs= 0, */
1527 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001528 .gpiomask = 0x00,
1529 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001530 .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 -08001531 .no_msp34xx = 1,
1532 .no_tda9875 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001533 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001534 .tuner_addr = ADDR_UNSET,
1535 .muxsel_hook = rv605_muxsel,
1536 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001537 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001538 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1539 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001540 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001541 .svhs = 2,
1542 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001543 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001544 .gpiomux = { 0, 1, 2, 2 },
1545 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001546 .needs_tvaudio = 0,
1547 .tuner_type = TUNER_PHILIPS_PAL,
1548 .tuner_addr = ADDR_UNSET,
1549 .pll = PLL_28,
1550 .has_radio = 1,
1551 },
1552
1553 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001554 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001555 /* Masaki Suzuki <masaki@btree.org> */
1556 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1557 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001558 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001559 .svhs = 2,
1560 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001561 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001562 .gpiomux = { 0, 1, 2, 3 },
1563 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001564 .tuner_type = TUNER_PHILIPS_NTSC,
1565 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001566 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001568 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001569 .name = "GrandTec Multi Capture Card (Bt878)",
1570 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001571 /* .audio_inputs= 0, */
1572 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001573 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001574 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001575 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001576 .needs_tvaudio = 0,
1577 .no_msp34xx = 1,
1578 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001579 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001580 .tuner_addr = ADDR_UNSET,
1581 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001582 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001583 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1584 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001585 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001586 .svhs = 2,
1587 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001588 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1589 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001590 .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 -08001591 * This card lacks external Audio In, so we mute it on Ext. & Int.
1592 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1593 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001594 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001595 * btwincap uses 0x80000/0x80003
1596 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001597 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001598 .needs_tvaudio = 0,
1599 .no_msp34xx = 1,
1600 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001601 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001602 .tuner_addr = ADDR_UNSET,
1603 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1604 radio signal strength indicators work fine. */
1605 .has_radio = 1,
1606 /* GPIO Info:
1607 GPIO0,1: HEF4052 A0,A1
1608 GPIO2: HEF4052 nENABLE
1609 GPIO3-7: n.c.
1610 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1611 GPIO14,15: ??
1612 GPIO16-21: n.c.
1613 GPIO22,23: ??
1614 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1615 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001616 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001617 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1618 .name = "DSP Design TCVIDEO",
1619 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001620 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001621 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001622 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001623 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001624 .tuner_addr = ADDR_UNSET,
1625 },
1626
1627 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001628 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001629 .name = "Hauppauge WinTV PVR",
1630 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001631 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001632 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001633 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001634 .needs_tvaudio = 1,
1635 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001636 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001637 .tuner_addr = ADDR_UNSET,
1638
1639 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001640 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001641 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001642 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001643 .name = "IODATA GV-BCTV5/PCI",
1644 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001645 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .svhs = 2,
1647 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001648 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001649 .gpiomux = {0x030000, 0x010000, 0, 0 },
1650 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001651 .no_msp34xx = 1,
1652 .pll = PLL_28,
1653 .tuner_type = TUNER_PHILIPS_NTSC_M,
1654 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001655 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001656 .has_radio = 1,
1657 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001658 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001659 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1660 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001661 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001662 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001663 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001664 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001665 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001666 .tuner_addr = ADDR_UNSET,
1667 .no_msp34xx = 1,
1668 .no_tda9875 = 1,
1669 .no_tda7432 = 1,
1670 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001671 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001672 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1673 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001674 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001675 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001676 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001678 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001679 .tuner_addr = ADDR_UNSET,
1680 .no_msp34xx = 1,
1681 .no_tda9875 = 1,
1682 .no_tda7432 = 1,
1683 },
1684
1685 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001686 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001687 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1688 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001689 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001690 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001691 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001692 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001693 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001694 .tuner_addr = ADDR_UNSET,
1695 .no_msp34xx = 1,
1696 .no_tda9875 = 1,
1697 .no_tda7432 = 1,
1698 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001699 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001700 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1701 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001702 /* .audio_inputs= 0, */
1703 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001704 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001705 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001706 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001707 .tuner_addr = ADDR_UNSET,
1708 .no_msp34xx = 1,
1709 .no_tda9875 = 1,
1710 .no_tda7432 = 1,
1711 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001712 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001713 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1714 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001715 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001716 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001717 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001718 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001719 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001720 .tuner_addr = ADDR_UNSET,
1721 .no_msp34xx = 1,
1722 .no_tda9875 = 1,
1723 .no_tda7432 = 1,
1724 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001725 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001726 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1727 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001728 /* .audio_inputs= 1, */
1729 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001730 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001731 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001732 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001733 .tuner_addr = ADDR_UNSET,
1734 .no_msp34xx = 1,
1735 .no_tda9875 = 1,
1736 .no_tda7432 = 1,
1737 },
1738
1739 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001740 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001741 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1742 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001743 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001744 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001745 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001747 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001748 .tuner_addr = ADDR_UNSET,
1749 .no_msp34xx = 1,
1750 .no_tda9875 = 1,
1751 .no_tda7432 = 1,
1752 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001753 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001754 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001755 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001756 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001757 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001758 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001760 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001761 .tuner_addr = ADDR_UNSET,
1762 .no_msp34xx = 1,
1763 .no_tda9875 = 1,
1764 .no_tda7432 = 1,
1765 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001766 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001767 .name = "Osprey 500", /* 500 */
1768 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001769 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001770 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001771 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001773 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001774 .tuner_addr = ADDR_UNSET,
1775 .no_msp34xx = 1,
1776 .no_tda9875 = 1,
1777 .no_tda7432 = 1,
1778 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001779 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001780 .name = "Osprey 540", /* 540 */
1781 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001782 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001784 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001785 .tuner_addr = ADDR_UNSET,
1786 .no_msp34xx = 1,
1787 .no_tda9875 = 1,
1788 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001789 },
1790
1791 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001792 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001793 .name = "Osprey 2000", /* 2000 */
1794 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001795 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001796 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001797 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001799 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001800 .tuner_addr = ADDR_UNSET,
1801 .no_msp34xx = 1,
1802 .no_tda9875 = 1,
1803 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1804 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001805 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001806 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1807 .name = "IDS Eagle",
1808 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001809 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001810 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001812 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001813 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001814 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001815 .muxsel_hook = eagle_muxsel,
1816 .no_msp34xx = 1,
1817 .no_tda9875 = 1,
1818 .pll = PLL_28,
1819 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001820 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001821 .name = "Pinnacle PCTV Sat",
1822 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001823 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001824 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001825 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .tuner_addr = ADDR_UNSET,
1827 .no_msp34xx = 1,
1828 .no_tda9875 = 1,
1829 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001830 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001831 .pll = PLL_28,
1832 .no_gpioirq = 1,
1833 .has_dvb = 1,
1834 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001835 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001836 .name = "Formac ProTV II (bt878)",
1837 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001838 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001839 .svhs = 3,
1840 .gpiomask = 2,
1841 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001842 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001843 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001844 .pll = PLL_28,
1845 .has_radio = 1,
1846 .tuner_type = TUNER_PHILIPS_PAL,
1847 .tuner_addr = ADDR_UNSET,
1848 /* sound routing:
1849 GPIO=0x00,0x01,0x03: mute (?)
1850 0x02: both TV and radio (tuner: FM1216/I)
1851 The card has onboard audio connectors labeled "cdrom" and "board",
1852 not soldered here, though unknown wiring.
1853 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001854 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001855 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001856
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001857 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001858 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001859 .name = "MachTV",
1860 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001861 /* .audio_inputs= 1, */
1862 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001863 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001864 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001865 .gpiomux = { 0, 1, 2, 3},
1866 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001868 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001869 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001870 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001871 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001872 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001873 .name = "Euresys Picolo",
1874 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001875 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001876 .svhs = 2,
1877 .gpiomask = 0,
1878 .no_msp34xx = 1,
1879 .no_tda9875 = 1,
1880 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001881 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001882 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001883 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001884 .tuner_addr = ADDR_UNSET,
1885 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001886 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001887 /* Luc Van Hoeylandt <luc@e-magic.be> */
1888 .name = "ProVideo PV150", /* 0x4f */
1889 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001890 /* .audio_inputs= 0, */
1891 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001892 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001893 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001894 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001895 .needs_tvaudio = 0,
1896 .no_msp34xx = 1,
1897 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001898 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001899 .tuner_addr = ADDR_UNSET,
1900 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001901 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001902 /* Hiroshi Takekawa <sian@big.or.jp> */
1903 /* This card lacks subsystem ID */
1904 .name = "AD-TVK503", /* 0x63 */
1905 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001906 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001907 .svhs = 2,
1908 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001909 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001910 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001911 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1912 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001913 .needs_tvaudio = 0,
1914 .no_msp34xx = 1,
1915 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001916 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001918 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001919 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001920
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001921 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001922 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001923 .name = "Hercules Smart TV Stereo",
1924 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001925 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001926 .svhs = 2,
1927 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001928 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 .needs_tvaudio = 1,
1930 .no_msp34xx = 1,
1931 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001932 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001933 .tuner_addr = ADDR_UNSET,
1934 /* Notes:
1935 - card lacks subsystem ID
1936 - stereo variant w/ daughter board with tda9874a @0xb0
1937 - Audio Routing:
1938 always from tda9874 independent of GPIO (?)
1939 external line in: unknown
1940 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1941 hef4053 (instead 4052) for unknown function
1942 */
1943 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001944 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001945 .name = "Pace TV & Radio Card",
1946 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001947 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001948 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001949 /* Tuner, CVid, SVid, CVid over SVid connector */
1950 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001951 .gpiomask = 0,
1952 .no_tda9875 = 1,
1953 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001954 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .tuner_addr = ADDR_UNSET,
1956 .has_radio = 1,
1957 .pll = PLL_28,
1958 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1959 only internal line out: (4pin header) RGGL
1960 Radio must be decoded by msp3410d (not routed through)*/
1961 /*
1962 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1963 */
1964 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001965 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001966 /* Chris Willing <chris@vislab.usyd.edu.au> */
1967 .name = "IVC-200",
1968 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001969 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001970 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001971 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001972 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001973 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001974 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001975 .pll = PLL_28,
1976 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001977 [BTTV_BOARD_IVCE8784] = {
1978 .name = "IVCE-8784",
1979 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001980 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001981 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001982 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001983 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001984 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001985 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001986 .pll = PLL_28,
1987 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001988 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001989 .name = "Grand X-Guard / Trust 814PCI",
1990 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001991 /* .audio_inputs= 0, */
1992 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001993 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001994 .tuner_addr = ADDR_UNSET,
1995 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03001996 .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 -08001997 .muxsel_hook = xguard_muxsel,
1998 .no_msp34xx = 1,
1999 .no_tda9875 = 1,
2000 .no_tda7432 = 1,
2001 .pll = PLL_28,
2002 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002003
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002005 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002006 .name = "Nebula Electronics DigiTV",
2007 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002008 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002009 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002010 .no_msp34xx = 1,
2011 .no_tda9875 = 1,
2012 .no_tda7432 = 1,
2013 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002014 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002015 .tuner_addr = ADDR_UNSET,
2016 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002017 .has_remote = 1,
2018 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002019 .no_gpioirq = 1,
2020 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002021 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002022 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2023 .name = "ProVideo PV143",
2024 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002025 /* .audio_inputs= 0, */
2026 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002027 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002028 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002029 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002030 .needs_tvaudio = 0,
2031 .no_msp34xx = 1,
2032 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002033 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .tuner_addr = ADDR_UNSET,
2035 },
Dirk Heer05583622008-11-21 19:00:55 -03002036 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002037 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002038 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002039 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002040 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002041 .svhs = 3,
2042 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002043 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002044 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002045 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002046 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002047 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002048 .tuner_addr = ADDR_UNSET,
2049 },
Dirk Heer05583622008-11-21 19:00:55 -03002050 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2051 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002052 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002053 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002054 .svhs = 3,
2055 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002056 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002057 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002058 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002059 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002060 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 .tuner_addr = ADDR_UNSET,
2062 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002063
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002064 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002065 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002066 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2067 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002068 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002069 .svhs = 9,
2070 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002071 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002072 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002073 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002074 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002075 .needs_tvaudio = 1,
2076 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002077 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002078 .tuner_addr = ADDR_UNSET,
2079 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002080 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002081 .name = "PHYTEC VD-009 Combi (bt878)",
2082 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002083 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002084 .svhs = 9,
2085 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002086 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002087 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002088 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002089 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002090 .needs_tvaudio = 1,
2091 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002092 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002093 .tuner_addr = ADDR_UNSET,
2094 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002095 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002096 .name = "IVC-100",
2097 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002098 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002099 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002100 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002101 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002102 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002103 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002104 .pll = PLL_28,
2105 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002106 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002107 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2108 .name = "IVC-120G",
2109 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002110 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002111 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002112 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002113 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002114 .needs_tvaudio = 0,
2115 .no_msp34xx = 1,
2116 .no_tda9875 = 1,
2117 .no_tda7432 = 1,
2118 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002119 .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 -08002120 .muxsel_hook = ivc120_muxsel,
2121 .pll = PLL_28,
2122 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002123
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002124 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002125 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002126 .name = "pcHDTV HD-2000 TV",
2127 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002128 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002129 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002130 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002131 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002132 .tuner_addr = ADDR_UNSET,
2133 .has_dvb = 1,
2134 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002135 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002136 .name = "Twinhan DST + clones",
2137 .no_msp34xx = 1,
2138 .no_tda9875 = 1,
2139 .no_tda7432 = 1,
2140 .tuner_type = TUNER_ABSENT,
2141 .tuner_addr = ADDR_UNSET,
2142 .no_video = 1,
2143 .has_dvb = 1,
2144 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002145 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002146 .name = "Winfast VC100",
2147 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002148 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002149 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002150 /* Vid In, SVid In, Vid over SVid in connector */
2151 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002152 .no_msp34xx = 1,
2153 .no_tda9875 = 1,
2154 .no_tda7432 = 1,
2155 .tuner_type = TUNER_ABSENT,
2156 .tuner_addr = ADDR_UNSET,
2157 .pll = PLL_28,
2158 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002159 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002160 .name = "Teppro TEV-560/InterVision IV-560",
2161 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002162 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002163 .svhs = 2,
2164 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002165 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002166 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .needs_tvaudio = 1,
2168 .tuner_type = TUNER_PHILIPS_PAL,
2169 .tuner_addr = ADDR_UNSET,
2170 .pll = PLL_35,
2171 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002172
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002173 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002174 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002175 .name = "SIMUS GVC1100",
2176 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002177 /* .audio_inputs= 0, */
2178 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002179 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002180 .tuner_addr = ADDR_UNSET,
2181 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002182 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002183 .gpiomask = 0x3F,
2184 .muxsel_hook = gvc1100_muxsel,
2185 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002186 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002187 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2188 .name = "NGS NGSTV+",
2189 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002190 .svhs = 2,
2191 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002192 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002193 .gpiomux = { 0, 0, 0, 0 },
2194 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002195 .pll = PLL_28,
2196 .tuner_type = TUNER_PHILIPS_PAL,
2197 .tuner_addr = ADDR_UNSET,
2198 .has_remote = 1,
2199 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002200 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002201 /* http://linuxmedialabs.com */
2202 .name = "LMLBT4",
2203 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002204 /* .audio_inputs= 0, */
2205 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002206 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002207 .no_msp34xx = 1,
2208 .no_tda9875 = 1,
2209 .no_tda7432 = 1,
2210 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002211 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002212 .tuner_addr = ADDR_UNSET,
2213 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002214 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2216 .name = "Tekram M205 PRO",
2217 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002218 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002219 .tuner_type = TUNER_PHILIPS_PAL,
2220 .tuner_addr = ADDR_UNSET,
2221 .svhs = 2,
2222 .needs_tvaudio = 0,
2223 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002224 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002225 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002226 .pll = PLL_28,
2227 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002228
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002230 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 /* Javier Cendan Ares <jcendan@lycos.es> */
2232 /* bt878 TV + FM without subsystem ID */
2233 .name = "Conceptronic CONTVFMi",
2234 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002235 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002236 .svhs = 2,
2237 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002238 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002239 .gpiomux = { 0, 1, 2, 2 },
2240 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002241 .needs_tvaudio = 0,
2242 .pll = PLL_28,
2243 .tuner_type = TUNER_PHILIPS_PAL,
2244 .tuner_addr = ADDR_UNSET,
2245 .has_remote = 1,
2246 .has_radio = 1,
2247 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002248 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002249 /*Eric DEBIEF <debief@telemsa.com>*/
2250 /*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 -08002251 /* 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 -08002252 /*0x79 in bttv.h*/
2253 .name = "Euresys Picolo Tetra",
2254 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002255 /* .audio_inputs= 0, */
2256 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002257 .gpiomask = 0,
2258 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2259 .no_msp34xx = 1,
2260 .no_tda9875 = 1,
2261 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002262 /*878A input is always MUX0, see above.*/
2263 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002264 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002265 .pll = PLL_28,
2266 .needs_tvaudio = 0,
2267 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002268 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002269 .tuner_addr = ADDR_UNSET,
2270 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002271 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002272 /* Spirit TV Tuner from http://spiritmodems.com.au */
2273 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2274 .name = "Spirit TV Tuner",
2275 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002276 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002277 .svhs = 2,
2278 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002279 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002280 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002281 .tuner_type = TUNER_TEMIC_PAL,
2282 .tuner_addr = ADDR_UNSET,
2283 .no_msp34xx = 1,
2284 .no_tda9875 = 1,
2285 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002286 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002287 /* Wolfram Joost <wojo@frokaschwei.de> */
2288 .name = "AVerMedia AVerTV DVB-T 771",
2289 .video_inputs = 2,
2290 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002291 .tuner_type = TUNER_ABSENT,
2292 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002293 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002294 .no_msp34xx = 1,
2295 .no_tda9875 = 1,
2296 .no_tda7432 = 1,
2297 .pll = PLL_28,
2298 .has_dvb = 1,
2299 .no_gpioirq = 1,
2300 .has_remote = 1,
2301 },
2302 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002303 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002304 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002305 /* 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 -08002306 .name = "AverMedia AverTV DVB-T 761",
2307 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002309 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002310 .no_msp34xx = 1,
2311 .no_tda9875 = 1,
2312 .no_tda7432 = 1,
2313 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002314 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002315 .tuner_addr = ADDR_UNSET,
2316 .has_dvb = 1,
2317 .no_gpioirq = 1,
2318 .has_remote = 1,
2319 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002320 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002321 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002322 .name = "MATRIX Vision Sigma-SQ",
2323 .video_inputs = 16,
2324 /* .audio_inputs= 0, */
2325 .svhs = NO_SVHS,
2326 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002327 .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 -03002328 .muxsel_hook = sigmaSQ_muxsel,
2329 .gpiomux = { 0 },
2330 .no_msp34xx = 1,
2331 .pll = PLL_28,
2332 .tuner_type = TUNER_ABSENT,
2333 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002334 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002335 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002336 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002337 .name = "MATRIX Vision Sigma-SLC",
2338 .video_inputs = 4,
2339 /* .audio_inputs= 0, */
2340 .svhs = NO_SVHS,
2341 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002342 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002343 .muxsel_hook = sigmaSLC_muxsel,
2344 .gpiomux = { 0 },
2345 .no_msp34xx = 1,
2346 .pll = PLL_28,
2347 .tuner_type = TUNER_ABSENT,
2348 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002349 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002350 /* BTTV_BOARD_APAC_VIEWCOMP */
2351 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002352 /* Attila Kondoros <attila.kondoros@chello.hu> */
2353 /* bt878 TV + FM 0x00000000 subsystem ID */
2354 .name = "APAC Viewcomp 878(AMAX)",
2355 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002356 /* .audio_inputs= 1, */
2357 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002358 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002359 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002360 .gpiomux = { 2, 0, 0, 0 },
2361 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002362 .needs_tvaudio = 0,
2363 .pll = PLL_28,
2364 .tuner_type = TUNER_PHILIPS_PAL,
2365 .tuner_addr = ADDR_UNSET,
2366 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2367 .has_radio = 1, /* not every card has radio */
2368 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002369
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002371 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002372 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2373 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 .no_msp34xx = 1,
2375 .no_tda9875 = 1,
2376 .no_tda7432 = 1,
2377 .pll = PLL_28,
2378 .no_video = 1,
2379 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002380 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002381 .tuner_addr = ADDR_UNSET,
2382 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002383 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002384 /* Steven <photon38@pchome.com.tw> */
2385 .name = "V-Gear MyVCD",
2386 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002387 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002388 .svhs = 2,
2389 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002390 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002391 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2392 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002393 .no_msp34xx = 1,
2394 .pll = PLL_28,
2395 .tuner_type = TUNER_PHILIPS_NTSC_M,
2396 .tuner_addr = ADDR_UNSET,
2397 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002398 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002399 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002400 /* Rick C <cryptdragoon@gmail.com> */
2401 .name = "Super TV Tuner",
2402 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002403 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002405 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 .tuner_type = TUNER_PHILIPS_NTSC,
2407 .tuner_addr = ADDR_UNSET,
2408 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002409 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002410 .needs_tvaudio = 1,
2411 .has_radio = 1,
2412 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002413 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002414 /* Chris Fanning <video4linux@haydon.net> */
2415 .name = "Tibet Systems 'Progress DVR' CS16",
2416 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002417 /* .audio_inputs= 0, */
2418 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002419 .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 -08002420 .pll = PLL_28,
2421 .no_msp34xx = 1,
2422 .no_tda9875 = 1,
2423 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002424 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002425 .tuner_addr = ADDR_UNSET,
2426 .muxsel_hook = tibetCS16_muxsel,
2427 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002428 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002429 /* Bill Brack <wbrack@mmm.com.hk> */
2430 /*
2431 * Note that, because of the card's wiring, the "master"
2432 * BT878A chip (i.e. the one which controls the analog switch
2433 * and must use this card type) is the 2nd one detected. The
2434 * other 3 chips should use card type 0x85, whose description
2435 * follows this one. There is a EEPROM on the card (which is
2436 * connected to the I2C of one of those other chips), but is
2437 * not currently handled. There is also a facility for a
2438 * "monitor", which is also not currently implemented.
2439 */
2440 .name = "Kodicom 4400R (master)",
2441 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002442 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002443 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002444 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002445 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002446 /* GPIO bits 0-9 used for analog switch:
2447 * 00 - 03: camera selector
2448 * 04 - 06: channel (controller) selector
2449 * 07: data (1->on, 0->off)
2450 * 08: strobe
2451 * 09: reset
2452 * bit 16 is input from sync separator for the channel
2453 */
2454 .gpiomask = 0x0003ff,
2455 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002456 .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 -08002457 .pll = PLL_28,
2458 .no_msp34xx = 1,
2459 .no_tda7432 = 1,
2460 .no_tda9875 = 1,
2461 .muxsel_hook = kodicom4400r_muxsel,
2462 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002463 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002464 /* Bill Brack <wbrack@mmm.com.hk> */
2465 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2466 * one which controls the analog switch, and must use the card type)
2467 * is the 2nd one detected. The other 3 chips should use this card
2468 * type
2469 */
2470 .name = "Kodicom 4400R (slave)",
2471 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002472 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002473 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002474 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002475 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002476 .gpiomask = 0x010000,
2477 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002478 .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 -08002479 .pll = PLL_28,
2480 .no_msp34xx = 1,
2481 .no_tda7432 = 1,
2482 .no_tda9875 = 1,
2483 .muxsel_hook = kodicom4400r_muxsel,
2484 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002485 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002486 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002487 /* Michael Henson <mhenson@clarityvi.com> */
2488 /* Adlink RTV24 with special unlock codes */
2489 .name = "Adlink RTV24",
2490 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002491 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002492 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002493 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002494 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002495 .tuner_addr = ADDR_UNSET,
2496 .pll = PLL_28,
2497 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002499 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002500 /* Michael Krufky <mkrufky@m1k.net> */
2501 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002502 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002503 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002504 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002505 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002506 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002507 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002508 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002509 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2510 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002511 .no_msp34xx = 1,
2512 .no_tda9875 = 1,
2513 .no_tda7432 = 1,
2514 .has_dvb = 1,
2515 },
2516 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002517 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002518 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002519 .name = "Acorp Y878F",
2520 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002521 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002522 .svhs = 2,
2523 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002524 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002525 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2526 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002527 .needs_tvaudio = 1,
2528 .pll = PLL_28,
2529 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2530 .tuner_addr = 0xc1 >>1,
2531 .has_radio = 1,
2532 },
2533 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002534 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002535 .name = "Conceptronic CTVFMi v2",
2536 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002537 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002538 .svhs = 2,
2539 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002540 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002541 .gpiomux = { 0, 1, 2, 2 },
2542 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002543 .needs_tvaudio = 0,
2544 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002545 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002546 .tuner_addr = ADDR_UNSET,
2547 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002548 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002549 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002550 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002551 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002552 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2553 .video_inputs = 5,
2554 /* .audio_inputs= 1, */
2555 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002556 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002557 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002558 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002559 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2560 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2561 .gpiomute = 0x12400,
2562 .no_msp34xx = 1,
2563 .pll = PLL_28,
2564 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002565 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002566 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002567 },
2568 /* ---- card 0x8b ---------------------------------- */
2569 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002570 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002571 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2572 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002573 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002574 .svhs = 2,
2575 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002576 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002577 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2578 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002579 .no_msp34xx = 1,
2580 .pll = PLL_28,
2581 .tuner_type = TUNER_YMEC_TVF_5533MF,
2582 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002583 .has_radio = 1,
2584 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002585 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002586 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002587 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2588 one external BNC composite input (mux 2)
2589 three internal composite inputs (unknown muxes)
2590 an 18-bit stereo A/D (CS5331A), which has:
2591 one external stereo unblanced (RCA) audio connection
2592 one (or 3?) internal stereo balanced (XLR) audio connection
2593 input is selected via gpio to a 14052B mux
2594 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2595 gain is controlled via an X9221A chip on the I2C bus @0x28
2596 sample rate is controlled via gpio to an MK1413S
2597 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2598 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002599 [BTTV_BOARD_OSPREY440] = {
2600 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002601 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002602 /* .audio_inputs= 2, */
2603 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002604 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002605 .gpiomask = 0x303,
2606 .gpiomute = 0x000, /* int + 32kHz */
2607 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002608 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002609 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002610 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002611 .no_msp34xx = 1,
2612 .no_tda9875 = 1,
2613 .no_tda7432 = 1,
2614 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002615 /* ---- card 0x8d ---------------------------------- */
2616 [BTTV_BOARD_ASOUND_SKYEYE] = {
2617 .name = "Asound Skyeye PCTV",
2618 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002619 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002620 .svhs = 2,
2621 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002622 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002623 .gpiomux = { 2, 0, 0, 0 },
2624 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002625 .needs_tvaudio = 1,
2626 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002627 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002628 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002629 },
Bill Pechter633323f2005-11-13 16:07:50 -08002630 /* ---- card 0x8e ---------------------------------- */
2631 [BTTV_BOARD_SABRENT_TVFM] = {
2632 .name = "Sabrent TV-FM (bttv version)",
2633 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002634 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002635 .svhs = 2,
2636 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002637 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002638 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002639 .no_msp34xx = 1,
2640 .no_tda9875 = 1,
2641 .no_tda7432 = 1,
2642 .pll = PLL_28,
2643 .tuner_type = TUNER_TNF_5335MF,
2644 .tuner_addr = ADDR_UNSET,
2645 .has_radio = 1,
2646 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002647 /* ---- card 0x8f ---------------------------------- */
2648 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2649 .name = "Hauppauge ImpactVCB (bt878)",
2650 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002651 /* .audio_inputs= 0, */
2652 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002653 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002654 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002655 .no_msp34xx = 1,
2656 .no_tda9875 = 1,
2657 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002658 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002659 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002660 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002661 [BTTV_BOARD_MACHTV_MAGICTV] = {
2662 /* Julian Calaby <julian.calaby@gmail.com>
2663 * Slightly different from original MachTV definition (0x60)
2664
2665 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2666 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2667 * properly (methinks) causing no keyup bits being set */
2668
2669 .name = "MagicTV", /* rebranded MachTV */
2670 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002671 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002672 .svhs = 2,
2673 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002674 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002675 .gpiomux = { 0, 1, 2, 3 },
2676 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002677 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2678 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002679 .pll = PLL_28,
2680 .has_radio = 1,
2681 .has_remote = 1,
2682 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002683 [BTTV_BOARD_SSAI_SECURITY] = {
2684 .name = "SSAI Security Video Interface",
2685 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002686 /* .audio_inputs= 0, */
2687 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002688 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002689 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002690 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002691 },
2692 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2693 .name = "SSAI Ultrasound Video Interface",
2694 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002695 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002696 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002697 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002698 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002699 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002700 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002701 /* ---- card 0x94---------------------------------- */
2702 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2703 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002704 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002705 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002706 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002707 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002708 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002709 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002710 .gpiomask = 0x00e00007,
2711 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2712 .gpiomute = 0x00c00007,
2713 .no_msp34xx = 1,
2714 .no_tda9875 = 1,
2715 .no_tda7432 = 1,
2716 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002717 /* ---- card 0x95---------------------------------- */
2718 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2719 .name = "Typhoon TV-Tuner PCI (50684)",
2720 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002721 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002722 .svhs = 2,
2723 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002724 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002725 .gpiomux = { 0x20001,0x10001, 0, 0 },
2726 .gpiomute = 10,
2727 .needs_tvaudio = 1,
2728 .pll = PLL_28,
2729 .tuner_type = TUNER_PHILIPS_PAL_I,
2730 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002731 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002732 [BTTV_BOARD_GEOVISION_GV600] = {
2733 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002734 .name = "Geovision GV-600",
2735 .video_inputs = 16,
2736 /* .audio_inputs= 0, */
2737 .svhs = NO_SVHS,
2738 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002739 .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 -03002740 .muxsel_hook = geovision_muxsel,
2741 .gpiomux = { 0 },
2742 .no_msp34xx = 1,
2743 .pll = PLL_28,
2744 .tuner_type = TUNER_ABSENT,
2745 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002746 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002747 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2748 /* Mauro Lacy <mauro@lacy.com.ar>
2749 * Based on MagicTV and Conceptronic CONTVFMi */
2750
2751 .name = "Kozumi KTV-01C",
2752 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002753 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002754 .svhs = 2,
2755 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002756 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002757 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002758 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002759 .needs_tvaudio = 0,
2760 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2761 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002762 .pll = PLL_28,
2763 .has_radio = 1,
2764 .has_remote = 1,
2765 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002766 [BTTV_BOARD_ENLTV_FM_2] = {
2767 /* Encore TV Tuner Pro ENL TV-FM-2
2768 Mauro Carvalho Chehab <mchehab@infradead.org */
2769 .name = "Encore ENL TV-FM-2",
2770 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002771 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002772 .svhs = 2,
2773 /* bit 6 -> IR disabled
2774 bit 18/17 = 00 -> mute
2775 01 -> enable external audio input
2776 10 -> internal audio input (mono?)
2777 11 -> internal audio input
2778 */
2779 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002780 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002781 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2782 .gpiomute = 0,
2783 .tuner_type = TUNER_TCL_MF02GIP_5N,
2784 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002785 .pll = PLL_28,
2786 .has_radio = 1,
2787 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002788 },
2789 [BTTV_BOARD_VD012] = {
2790 /* D.Heer@Phytec.de */
2791 .name = "PHYTEC VD-012 (bt878)",
2792 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002793 /* .audio_inputs= 0, */
2794 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002795 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002796 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002797 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2798 .needs_tvaudio = 0,
2799 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002800 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002801 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002802 },
2803 [BTTV_BOARD_VD012_X1] = {
2804 /* D.Heer@Phytec.de */
2805 .name = "PHYTEC VD-012-X1 (bt878)",
2806 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002807 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002808 .svhs = 3,
2809 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002810 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002811 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2812 .needs_tvaudio = 0,
2813 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002814 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002815 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002816 },
2817 [BTTV_BOARD_VD012_X2] = {
2818 /* D.Heer@Phytec.de */
2819 .name = "PHYTEC VD-012-X2 (bt878)",
2820 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002821 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002822 .svhs = 3,
2823 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002824 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002825 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2826 .needs_tvaudio = 0,
2827 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002828 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002829 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002830 },
2831 [BTTV_BOARD_GEOVISION_GV800S] = {
2832 /* Bruno Christo <bchristo@inf.ufsm.br>
2833 *
2834 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2835 * 1 audio input per BT878A = 4 audio inputs
2836 * 4 video inputs per BT878A = 16 video inputs
2837 * This is the first BT878A chip of the GV-800(S). It's the
2838 * "master" chip and it controls the video inputs through an
2839 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2840 * slaves should use card type 0x9e (following this one).
2841 * There is a EEPROM on the card which is currently not handled.
2842 * The audio input is not working yet.
2843 */
2844 .name = "Geovision GV-800(S) (master)",
2845 .video_inputs = 4,
2846 /* .audio_inputs= 1, */
2847 .tuner_type = TUNER_ABSENT,
2848 .tuner_addr = ADDR_UNSET,
2849 .svhs = NO_SVHS,
2850 .gpiomask = 0xf107f,
2851 .no_gpioirq = 1,
2852 .muxsel = MUXSEL(2, 2, 2, 2),
2853 .pll = PLL_28,
2854 .no_msp34xx = 1,
2855 .no_tda7432 = 1,
2856 .no_tda9875 = 1,
2857 .muxsel_hook = gv800s_muxsel,
2858 },
2859 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2860 /* Bruno Christo <bchristo@inf.ufsm.br>
2861 *
2862 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2863 * 1 audio input per BT878A = 4 audio inputs
2864 * 4 video inputs per BT878A = 16 video inputs
2865 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2866 * and should use this card type.
2867 * The audio input is not working yet.
2868 */
2869 .name = "Geovision GV-800(S) (slave)",
2870 .video_inputs = 4,
2871 /* .audio_inputs= 1, */
2872 .tuner_type = TUNER_ABSENT,
2873 .tuner_addr = ADDR_UNSET,
2874 .svhs = NO_SVHS,
2875 .gpiomask = 0x00,
2876 .no_gpioirq = 1,
2877 .muxsel = MUXSEL(2, 2, 2, 2),
2878 .pll = PLL_28,
2879 .no_msp34xx = 1,
2880 .no_tda7432 = 1,
2881 .no_tda9875 = 1,
2882 .muxsel_hook = gv800s_muxsel,
2883 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002884};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002885
2886static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2887
2888/* ----------------------------------------------------------------------- */
2889
2890static unsigned char eeprom_data[256];
2891
2892/*
2893 * identify card
2894 */
2895void __devinit bttv_idcard(struct bttv *btv)
2896{
2897 unsigned int gpiobits;
2898 int i,type;
2899 unsigned short tmp;
2900
2901 /* read PCI subsystem ID */
2902 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
2903 btv->cardid = tmp << 16;
2904 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2905 btv->cardid |= tmp;
2906
2907 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2908 /* look for the card */
2909 for (type = -1, i = 0; cards[i].id != 0; i++)
2910 if (cards[i].id == btv->cardid)
2911 type = i;
2912
2913 if (type != -1) {
2914 /* found it */
2915 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
2916 "PCI subsystem ID is %04x:%04x\n",
2917 btv->c.nr,cards[type].name,cards[type].cardnr,
2918 btv->cardid & 0xffff,
2919 (btv->cardid >> 16) & 0xffff);
2920 btv->c.type = cards[type].cardnr;
2921 } else {
2922 /* 404 */
2923 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2924 btv->c.nr, btv->cardid & 0xffff,
2925 (btv->cardid >> 16) & 0xffff);
2926 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08002927 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002928 }
2929 }
2930
2931 /* let the user override the autodetected type */
2932 if (card[btv->c.nr] < bttv_num_tvcards)
2933 btv->c.type=card[btv->c.nr];
2934
2935 /* print which card config we are using */
2936 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
2937 bttv_tvcards[btv->c.type].name, btv->c.type,
2938 card[btv->c.nr] < bttv_num_tvcards
2939 ? "insmod option" : "autodetected");
2940
2941 /* overwrite gpio stuff ?? */
2942 if (UNSET == audioall && UNSET == audiomux[0])
2943 return;
2944
2945 if (UNSET != audiomux[0]) {
2946 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002947 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002948 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002949 gpiobits |= audiomux[i];
2950 }
2951 } else {
2952 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002953 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002954 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002955 }
2956 }
2957 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
2958 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
2959 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002960 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002961 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002962 }
2963 printk("\n");
2964}
2965
2966/*
2967 * (most) board specific initialisations goes here
2968 */
2969
2970/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002971static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002972{
2973 int type = -1;
2974
2975 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002976 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002977 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002978 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002979 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002980 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002981
2982 if (-1 != type) {
2983 btv->c.type = type;
2984 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2985 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
2986 }
2987}
2988
2989static void flyvideo_gpio(struct bttv *btv)
2990{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002991 int gpio, has_remote, has_radio, is_capture_only;
2992 int is_lr90, has_tda9820_tda9821;
2993 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002994
2995 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002996 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002997 gpio = gpio_read();
2998 /* FIXME: must restore OUR_EN ??? */
2999
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003000 /* all cards provide GPIO info, some have an additional eeprom
3001 * LR50: GPIO coding can be found lower right CP1 .. CP9
3002 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3003 * GPIO14-12: n.c.
3004 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003005
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003006 * lowest 3 bytes are remote control codes (no handshake needed)
3007 * xxxFFF: No remote control chip soldered
3008 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3009 * Note: Some bits are Audio_Mask !
3010 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003011 ttype = (gpio & 0x0f0000) >> 16;
3012 switch (ttype) {
3013 case 0x0:
3014 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003015 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003016 case 0x2:
3017 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003018 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003019 case 0x4:
3020 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003021 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003022 case 0x6:
3023 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003024 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003025 case 0xC:
3026 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003027 break;
3028 default:
3029 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003030 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003031 }
3032
3033 has_remote = gpio & 0x800000;
3034 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003035 /* unknown 0x200000;
3036 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003037 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003038 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003039 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3040 /*
3041 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003042
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003043 if (is_capture_only)
3044 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003045
3046 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003047 btv->c.nr, has_radio ? "yes" : "no ",
3048 has_remote ? "yes" : "no ", tuner_type, gpio);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003049 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003050 btv->c.nr, is_lr90 ? "yes" : "no ",
3051 has_tda9820_tda9821 ? "yes" : "no ",
3052 is_capture_only ? "yes" : "no ");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003053
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003054 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3055 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003056 btv->has_radio = has_radio;
3057
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003058 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3059 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3060 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003061 if (has_tda9820_tda9821)
3062 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003063 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003064}
3065
3066static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3067 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3068static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3069 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3070
3071static void miro_pinnacle_gpio(struct bttv *btv)
3072{
3073 int id,msp,gpio;
3074 char *info;
3075
3076 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003077 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003078 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003079 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003080 if (id < 32) {
3081 btv->tuner_type = miro_tunermap[id];
3082 if (0 == (gpio & 0x20)) {
3083 btv->has_radio = 1;
3084 if (!miro_fmtuner[id]) {
3085 btv->has_matchbox = 1;
3086 btv->mbox_we = (1<<6);
3087 btv->mbox_most = (1<<7);
3088 btv->mbox_clk = (1<<8);
3089 btv->mbox_data = (1<<9);
3090 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3091 }
3092 } else {
3093 btv->has_radio = 0;
3094 }
3095 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003096 if (btv->c.type == BTTV_BOARD_MIRO)
3097 btv->c.type = BTTV_BOARD_MIROPRO;
3098 if (btv->c.type == BTTV_BOARD_PINNACLE)
3099 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003100 }
3101 printk(KERN_INFO
3102 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3103 btv->c.nr, id+1, btv->tuner_type,
3104 !btv->has_radio ? "no" :
3105 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3106 (-1 == msp) ? "no" : "yes");
3107 } else {
3108 /* new cards with microtune tuner */
3109 id = 63 - id;
3110 btv->has_radio = 0;
3111 switch (id) {
3112 case 1:
3113 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003114 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003115 break;
3116 case 2:
3117 info = "PAL+SECAM / stereo";
3118 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003119 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003120 break;
3121 case 3:
3122 info = "NTSC / stereo";
3123 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003124 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003125 break;
3126 case 4:
3127 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003128 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003129 break;
3130 case 5:
3131 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003132 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003133 break;
3134 case 6:
3135 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003136 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003137 break;
3138 case 7:
3139 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003140 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003141 break;
3142 default:
3143 info = "oops: unknown card";
3144 break;
3145 }
3146 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003147 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003148 printk(KERN_INFO
3149 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3150 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003151 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003152 }
3153}
3154
3155/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3156#define LM1882_SYNC_DRIVE 0x200000L
3157
3158static void init_ids_eagle(struct bttv *btv)
3159{
3160 gpio_inout(0xffffff,0xFFFF37);
3161 gpio_write(0x200020);
3162
3163 /* flash strobe inverter ?! */
3164 gpio_write(0x200024);
3165
3166 /* switch sync drive off */
3167 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3168
3169 /* set BT848 muxel to 2 */
3170 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3171}
3172
3173/* Muxsel helper for the IDS Eagle.
3174 * the eagles does not use the standard muxsel-bits but
3175 * has its own multiplexer */
3176static void eagle_muxsel(struct bttv *btv, unsigned int input)
3177{
Trent Piepho430390e2009-01-28 21:32:59 -03003178 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003179
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003180 /* composite */
3181 /* set chroma ADC to sleep */
3182 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3183 /* set to composite video */
3184 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3185 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003186
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003187 /* switch sync drive off */
3188 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003189}
3190
3191static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3192{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003193 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003194 gpio_write(masks[input%4]);
3195}
3196
3197/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3198 alarms output
3199
3200 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3201 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3202
3203 IN - sensor inputs, INx - sensor inputs and TI XORed together
3204 O1,O2,O3 - alarm outputs (relays)
3205
3206 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3207
3208*/
3209
3210static void init_lmlbt4x(struct bttv *btv)
3211{
3212 printk(KERN_DEBUG "LMLBT4x init\n");
3213 btwrite(0x000000, BT848_GPIO_REG_INP);
3214 gpio_inout(0xffffff, 0x0006C0);
3215 gpio_write(0x000000);
3216}
3217
3218static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3219{
3220 unsigned int inmux = input % 8;
3221 gpio_inout( 0xf, 0xf );
3222 gpio_bits( 0xf, inmux );
3223}
3224
3225static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3226{
3227 unsigned int inmux = input % 4;
3228 gpio_inout( 3<<9, 3<<9 );
3229 gpio_bits( 3<<9, inmux<<9 );
3230}
3231
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003232static void geovision_muxsel(struct bttv *btv, unsigned int input)
3233{
3234 unsigned int inmux = input % 16;
3235 gpio_inout(0xf, 0xf);
3236 gpio_bits(0xf, inmux);
3237}
3238
Linus Torvalds1da177e2005-04-16 15:20:36 -07003239/* ----------------------------------------------------------------------- */
3240
3241static void bttv_reset_audio(struct bttv *btv)
3242{
3243 /*
3244 * BT878A has a audio-reset register.
3245 * 1. This register is an audio reset function but it is in
3246 * function-0 (video capture) address space.
3247 * 2. It is enough to do this once per power-up of the card.
3248 * 3. There is a typo in the Conexant doc -- it is not at
3249 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3250 * --//Shrikumar 030609
3251 */
3252 if (btv->id != 878)
3253 return;
3254
3255 if (bttv_debug)
3256 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3257 btwrite((1<<7), 0x058);
3258 udelay(10);
3259 btwrite( 0, 0x058);
3260}
3261
3262/* initialization part one -- before registering i2c bus */
3263void __devinit bttv_init_card1(struct bttv *btv)
3264{
3265 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003266 case BTTV_BOARD_HAUPPAUGE:
3267 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003268 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003269 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003270 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003271 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003272 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003273 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003274 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003275 boot_msp34xx(btv,11);
3276 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003277 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003278 pvr_boot(btv);
3279 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003280 case BTTV_BOARD_TWINHAN_DST:
3281 case BTTV_BOARD_AVDVBT_771:
3282 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003283 btv->use_i2c_hw = 1;
3284 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003285 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003286 init_RTV24( btv );
3287 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003288
Linus Torvalds1da177e2005-04-16 15:20:36 -07003289 }
3290 if (!bttv_tvcards[btv->c.type].has_dvb)
3291 bttv_reset_audio(btv);
3292}
3293
3294/* initialization part two -- after registering i2c bus */
3295void __devinit bttv_init_card2(struct bttv *btv)
3296{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003297 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003298
Trent Piephoac7dc842007-06-28 17:51:08 -03003299 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003300
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003301 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003302 bttv_readee(btv,eeprom_data,0xa0);
3303 identify_by_eeprom(btv,eeprom_data);
3304 }
3305
3306 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003307 case BTTV_BOARD_MIRO:
3308 case BTTV_BOARD_MIROPRO:
3309 case BTTV_BOARD_PINNACLE:
3310 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003311 /* miro/pinnacle */
3312 miro_pinnacle_gpio(btv);
3313 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003314 case BTTV_BOARD_FLYVIDEO_98:
3315 case BTTV_BOARD_MAXI:
3316 case BTTV_BOARD_LIFE_FLYKIT:
3317 case BTTV_BOARD_FLYVIDEO:
3318 case BTTV_BOARD_TYPHOON_TVIEW:
3319 case BTTV_BOARD_CHRONOS_VS2:
3320 case BTTV_BOARD_FLYVIDEO_98FM:
3321 case BTTV_BOARD_FLYVIDEO2000:
3322 case BTTV_BOARD_FLYVIDEO98EZ:
3323 case BTTV_BOARD_CONFERENCETV:
3324 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003325 flyvideo_gpio(btv);
3326 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003327 case BTTV_BOARD_HAUPPAUGE:
3328 case BTTV_BOARD_HAUPPAUGE878:
3329 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003330 /* pick up some config infos from the eeprom */
3331 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003332 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003333 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003334 case BTTV_BOARD_AVERMEDIA98:
3335 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003336 bttv_readee(btv,eeprom_data,0xa0);
3337 avermedia_eeprom(btv);
3338 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003339 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003340 init_PXC200(btv);
3341 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003342 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003343 picolo_tetra_init(btv);
3344 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003345 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003346 btv->has_radio = 1;
3347 btv->has_matchbox = 1;
3348 btv->mbox_we = 0x20;
3349 btv->mbox_most = 0;
3350 btv->mbox_clk = 0x08;
3351 btv->mbox_data = 0x10;
3352 btv->mbox_mask = 0x38;
3353 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003354 case BTTV_BOARD_VOBIS_BOOSTAR:
3355 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003356 terratec_active_radio_upgrade(btv);
3357 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003358 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003359 if (btv->cardid == 0x3002144f) {
3360 btv->has_radio=1;
3361 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3362 }
3363 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003364 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003365 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003366 /* Fix up entry for 3DFX VoodooTV 100,
3367 which is an OEM STB card variant. */
3368 btv->has_radio=0;
3369 btv->tuner_type=TUNER_TEMIC_NTSC;
3370 }
3371 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003372 case BTTV_BOARD_OSPREY1x0:
3373 case BTTV_BOARD_OSPREY1x0_848:
3374 case BTTV_BOARD_OSPREY101_848:
3375 case BTTV_BOARD_OSPREY1x1:
3376 case BTTV_BOARD_OSPREY1x1_SVID:
3377 case BTTV_BOARD_OSPREY2xx:
3378 case BTTV_BOARD_OSPREY2x0_SVID:
3379 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003380 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003381 case BTTV_BOARD_OSPREY500:
3382 case BTTV_BOARD_OSPREY540:
3383 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003384 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003385 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003387 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003388 init_ids_eagle(btv);
3389 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003390 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003391 bttv_readee(btv,eeprom_data,0xa0);
3392 modtec_eeprom(btv);
3393 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003394 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003395 init_lmlbt4x(btv);
3396 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003397 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003398 tibetCS16_init(btv);
3399 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003400 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003401 kodicom4400r_init(btv);
3402 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003403 case BTTV_BOARD_GEOVISION_GV800S:
3404 gv800s_init(btv);
3405 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003406 }
3407
3408 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003409 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003410 /* defaults from card list */
3411 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3412 btv->pll.pll_ifreq=28636363;
3413 btv->pll.pll_crystal=BT848_IFORM_XT0;
3414 }
3415 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3416 btv->pll.pll_ifreq=35468950;
3417 btv->pll.pll_crystal=BT848_IFORM_XT1;
3418 }
3419 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003420 switch (pll[btv->c.nr]) {
3421 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003422 btv->pll.pll_crystal = 0;
3423 btv->pll.pll_ifreq = 0;
3424 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003425 break;
3426 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003428 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003429 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003430 btv->pll.pll_crystal = BT848_IFORM_XT0;
3431 break;
3432 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003433 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003434 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003435 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003436 btv->pll.pll_crystal = BT848_IFORM_XT1;
3437 break;
3438 }
3439 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003440 btv->pll.pll_current = -1;
3441
Linus Torvalds1da177e2005-04-16 15:20:36 -07003442 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003443 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3444 addr = bttv_tvcards[btv->c.type].tuner_addr;
3445
3446 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003447 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003448 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003449 if (UNSET != tuner[btv->c.nr])
3450 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003451
Trent Piephoabb03622009-01-28 21:32:59 -03003452 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003453 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3454 else if(btv->tuner_type == UNSET)
3455 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3456 else
3457 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3458 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003459
Trent Piephoabb03622009-01-28 21:32:59 -03003460 if (UNSET == btv->tuner_type)
3461 btv->tuner_type = TUNER_ABSENT;
3462
3463 if (btv->tuner_type != TUNER_ABSENT) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003464 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003465
Trent Piephoabb03622009-01-28 21:32:59 -03003466 /* Load tuner module before issuing tuner config call! */
3467 if (autoload)
3468 request_module("tuner");
3469
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003470 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003471 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003472 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003473
Trent Piephoabb03622009-01-28 21:32:59 -03003474 if (bttv_tvcards[btv->c.type].has_radio)
3475 tun_setup.mode_mask |= T_RADIO;
3476
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003477 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3478 }
3479
Hans Verkuil39e8f402006-01-09 15:25:16 -02003480 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003481 struct v4l2_priv_tun_config tda9887_cfg;
3482
3483 tda9887_cfg.tuner = TUNER_TDA9887;
3484 tda9887_cfg.priv = &btv->tda9887_conf;
3485
3486 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003487 }
3488
Trent Piepho5221e212009-01-28 21:32:59 -03003489 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3490 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003491 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3492 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003493 if (svhs[btv->c.nr] != UNSET)
3494 btv->svhs = svhs[btv->c.nr];
3495 if (remote[btv->c.nr] != UNSET)
3496 btv->has_remote = remote[btv->c.nr];
3497
3498 if (bttv_tvcards[btv->c.type].has_radio)
3499 btv->has_radio=1;
3500 if (bttv_tvcards[btv->c.type].has_remote)
3501 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003502 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3503 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003504 if (bttv_tvcards[btv->c.type].volume_gpio)
3505 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3506 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3507 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003508
Linus Torvalds1da177e2005-04-16 15:20:36 -07003509 if (!autoload)
3510 return;
3511
Trent Piephoabb03622009-01-28 21:32:59 -03003512 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003513 return; /* no tuner or related drivers to load */
3514
Linus Torvalds1da177e2005-04-16 15:20:36 -07003515 /* try to detect audio/fader chips */
3516 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003517 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003518 request_module("msp3400");
3519
3520 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003521 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003522 request_module("msp3400");
3523
3524 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003525 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003526 request_module("tda9875");
3527
3528 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003529 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003530 request_module("tda7432");
3531
3532 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3533 request_module("tvaudio");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003534}
3535
3536
3537/* ----------------------------------------------------------------------- */
3538
3539static void modtec_eeprom(struct bttv *btv)
3540{
3541 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3542 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3543 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3544 btv->c.nr,&eeprom_data[0x1e]);
3545 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3546 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3547 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003548 btv->c.nr,&eeprom_data[0x1e]);
3549 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3550 btv->tuner_type=TUNER_PHILIPS_NTSC;
3551 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3552 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003553 } else {
3554 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3555 btv->c.nr,&eeprom_data[0x1e]);
3556 }
3557}
3558
3559static void __devinit hauppauge_eeprom(struct bttv *btv)
3560{
3561 struct tveeprom tv;
3562
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003563 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003564 btv->tuner_type = tv.tuner_type;
3565 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003566
3567 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3568 btv->c.nr, tv.model);
3569
3570 /*
3571 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3572 * type based on model #.
3573 */
3574 if(tv.model == 64900) {
3575 printk("bttv%d: Switching board type from %s to %s\n",
3576 btv->c.nr,
3577 bttv_tvcards[btv->c.type].name,
3578 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3579 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3580 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003581}
3582
3583static int terratec_active_radio_upgrade(struct bttv *btv)
3584{
3585 int freq;
3586
3587 btv->has_radio = 1;
3588 btv->has_matchbox = 1;
3589 btv->mbox_we = 0x10;
3590 btv->mbox_most = 0x20;
3591 btv->mbox_clk = 0x08;
3592 btv->mbox_data = 0x04;
3593 btv->mbox_mask = 0x3c;
3594
3595 btv->mbox_iow = 1 << 8;
3596 btv->mbox_ior = 1 << 9;
3597 btv->mbox_csel = 1 << 10;
3598
3599 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003600 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003601 if (0x1ed8 == tea5757_read(btv)) {
3602 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3603 btv->c.nr);
3604 btv->has_radio = 1;
3605 btv->has_matchbox = 1;
3606 } else {
3607 btv->has_radio = 0;
3608 btv->has_matchbox = 0;
3609 }
3610 return 0;
3611}
3612
3613
3614/* ----------------------------------------------------------------------- */
3615
3616/*
3617 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3618 *
3619 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3620 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3621 * unpacked with unzip).
3622 */
3623#define PVR_GPIO_DELAY 10
3624
3625#define BTTV_ALT_DATA 0x000001
3626#define BTTV_ALT_DCLK 0x100000
3627#define BTTV_ALT_NCONFIG 0x800000
3628
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003629static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3630 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003631{
3632 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003633 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003634 int i;
3635
3636 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3637 gpio_write(0);
3638 udelay(PVR_GPIO_DELAY);
3639
3640 gpio_write(BTTV_ALT_NCONFIG);
3641 udelay(PVR_GPIO_DELAY);
3642
3643 for (n = 0; n < microlen; n++) {
3644 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003645 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003646 gpio_bits(BTTV_ALT_DCLK,0);
3647 if (bits & 0x01)
3648 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3649 else
3650 gpio_bits(BTTV_ALT_DATA,0);
3651 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3652 bits >>= 1;
3653 }
3654 }
3655 gpio_bits(BTTV_ALT_DCLK,0);
3656 udelay(PVR_GPIO_DELAY);
3657
3658 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3659 for (i = 0 ; i < 30 ; i++) {
3660 gpio_bits(BTTV_ALT_DCLK,0);
3661 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3662 }
3663 gpio_bits(BTTV_ALT_DCLK,0);
3664 return 0;
3665}
3666
3667static int __devinit pvr_boot(struct bttv *btv)
3668{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003669 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003670 int rc;
3671
3672 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3673 if (rc != 0) {
3674 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3675 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003676 return rc;
3677 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003678 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3679 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3680 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003681 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003682 return rc;
3683}
3684
3685/* ----------------------------------------------------------------------- */
3686/* some osprey specific stuff */
3687
Trent Piephocf784d52007-07-21 21:26:40 -03003688static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003689{
Trent Piephocf784d52007-07-21 21:26:40 -03003690 int i;
3691 u32 serial = 0;
3692 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003693
Trent Piephocf784d52007-07-21 21:26:40 -03003694 /* This code will nevery actually get called in this case.... */
3695 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3696 /* this might be an antique... check for MMAC label in eeprom */
3697 if (!strncmp(ee, "MMAC", 4)) {
3698 u8 checksum = 0;
3699 for (i = 0; i < 21; i++)
3700 checksum += ee[i];
3701 if (checksum != ee[21])
3702 return;
3703 cardid = BTTV_BOARD_OSPREY1x0_848;
3704 for (i = 12; i < 21; i++)
3705 serial *= 10, serial += ee[i] - '0';
3706 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003707 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003708 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003709
Trent Piephocf784d52007-07-21 21:26:40 -03003710 for (i = 4*16; i < 8*16; i += 16) {
3711 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003712
Trent Piephocf784d52007-07-21 21:26:40 -03003713 if ((checksum&0xff) + (checksum>>8) == 0xff)
3714 break;
3715 }
3716 if (i >= 8*16)
3717 return;
3718 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003719
Trent Piephocf784d52007-07-21 21:26:40 -03003720 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003721 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003722
Trent Piephocf784d52007-07-21 21:26:40 -03003723 switch(type) {
3724 /* 848 based */
3725 case 0x0004:
3726 cardid = BTTV_BOARD_OSPREY1x0_848;
3727 break;
3728 case 0x0005:
3729 cardid = BTTV_BOARD_OSPREY101_848;
3730 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003731
Trent Piephocf784d52007-07-21 21:26:40 -03003732 /* 878 based */
3733 case 0x0012:
3734 case 0x0013:
3735 cardid = BTTV_BOARD_OSPREY1x0;
3736 break;
3737 case 0x0014:
3738 case 0x0015:
3739 cardid = BTTV_BOARD_OSPREY1x1;
3740 break;
3741 case 0x0016:
3742 case 0x0017:
3743 case 0x0020:
3744 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3745 break;
3746 case 0x0018:
3747 case 0x0019:
3748 case 0x001E:
3749 case 0x001F:
3750 cardid = BTTV_BOARD_OSPREY2xx;
3751 break;
3752 case 0x001A:
3753 case 0x001B:
3754 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3755 break;
3756 case 0x0040:
3757 cardid = BTTV_BOARD_OSPREY500;
3758 break;
3759 case 0x0050:
3760 case 0x0056:
3761 cardid = BTTV_BOARD_OSPREY540;
3762 /* bttv_osprey_540_init(btv); */
3763 break;
3764 case 0x0060:
3765 case 0x0070:
3766 case 0x00A0:
3767 cardid = BTTV_BOARD_OSPREY2x0;
3768 /* enable output on select control lines */
3769 gpio_inout(0xffffff,0x000303);
3770 break;
3771 case 0x00D8:
3772 cardid = BTTV_BOARD_OSPREY440;
3773 break;
3774 default:
3775 /* unknown...leave generic, but get serial # */
3776 printk(KERN_INFO "bttv%d: "
3777 "osprey eeprom: unknown card type 0x%04x\n",
3778 btv->c.nr, type);
3779 break;
3780 }
Al Viroc1c36f32008-05-21 00:32:21 -03003781 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003782 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003783
Trent Piephocf784d52007-07-21 21:26:40 -03003784 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3785 btv->c.nr, cardid,
3786 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3787
3788 if (cardid<0 || btv->c.type == cardid)
3789 return;
3790
3791 /* card type isn't set correctly */
3792 if (card[btv->c.nr] < bttv_num_tvcards) {
3793 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3794 "Not overriding user specified card type\n", btv->c.nr);
3795 } else {
3796 printk(KERN_INFO "bttv%d: osprey eeprom: "
3797 "Changing card type from %d to %d\n", btv->c.nr,
3798 btv->c.type, cardid);
3799 btv->c.type = cardid;
3800 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003801}
3802
3803/* ----------------------------------------------------------------------- */
3804/* AVermedia specific stuff, from bktr_card.c */
3805
3806static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003807 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3808 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3809 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3810 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3811 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003812 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003813
3814static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003815 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003816 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3817 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003818 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3819 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003820
3821static void __devinit avermedia_eeprom(struct bttv *btv)
3822{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003823 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003824
3825 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003826 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3827 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003828 btv->has_remote = (eeprom_data[0x42] & 0x01);
3829
3830 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003831 if (tuner_format <= 0x0a)
3832 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003833 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003834 if (tuner_format <= 9)
3835 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003836
3837 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003838 if (tuner_format == 0x09)
3839 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003840
3841 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003842 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3843 if (tuner_type) {
3844 btv->tuner_type = tuner_type;
3845 printk(KERN_CONT "%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003846 } else
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003847 printk(KERN_CONT "Unknown type");
3848 printk(KERN_CONT " radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003849 tuner_tv_fm ? "yes" : "no",
3850 btv->has_remote ? "yes" : "no");
3851}
3852
Trent Piepho72134a62009-01-28 21:32:59 -03003853/*
3854 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3855 * analog demod, which is not I2C controlled like the newer and more common
3856 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3857 * that control the IF for the video and audio. Apparently, bttv GPIO
3858 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3859 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3860 */
3861u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003862{
Trent Piepho72134a62009-01-28 21:32:59 -03003863
3864 if (btv->audio == TVAUDIO_INPUT_TUNER) {
3865 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3866 gpiobits |= 0x10000;
3867 else
3868 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003869 }
Trent Piepho72134a62009-01-28 21:32:59 -03003870
3871 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3872 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003873}
3874
3875
3876/*
3877 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003878 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003879 *
3880 * Hauppauge: pin 5
3881 * Voodoo: pin 20
3882 */
3883static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3884{
3885 int mask = (1 << pin);
3886
3887 gpio_inout(mask,mask);
3888 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003889 mdelay(2);
3890 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003891 gpio_bits(mask,mask);
3892
3893 if (bttv_gpio)
3894 bttv_gpio_tracking(btv,"msp34xx");
3895 if (bttv_verbose)
3896 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3897 "init [%d]\n", btv->c.nr, pin);
3898}
3899
Linus Torvalds1da177e2005-04-16 15:20:36 -07003900/* ----------------------------------------------------------------------- */
3901/* Imagenation L-Model PXC200 Framegrabber */
3902/* This is basically the same procedure as
3903 * used by Alessandro Rubini in his pxc200
3904 * driver, but using BTTV functions */
3905
3906static void __devinit init_PXC200(struct bttv *btv)
3907{
3908 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3909 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3910 0x00 };
3911 unsigned int i;
3912 int tmp;
3913 u32 val;
3914
3915 /* Initialise GPIO-connevted stuff */
3916 gpio_inout(0xffffff, (1<<13));
3917 gpio_write(0);
3918 udelay(3);
3919 gpio_write(1<<13);
3920 /* GPIO inputs are pulled up, so no need to drive
3921 * reset pin any longer */
3922 gpio_bits(0xffffff, 0);
3923 if (bttv_gpio)
3924 bttv_gpio_tracking(btv,"pxc200");
3925
3926 /* we could/should try and reset/control the AD pots? but
3927 right now we simply turned off the crushing. Without
3928 this the AGC drifts drifts
3929 remember the EN is reverse logic -->
3930 setting BT848_ADC_AGC_EN disable the AGC
3931 tboult@eecs.lehigh.edu
3932 */
3933
3934 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
3935
3936 /* Initialise MAX517 DAC */
3937 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
3938 bttv_I2CWrite(btv,0x5E,0,0x80,1);
3939
3940 /* Initialise 12C508 PIC */
3941 /* The I2CWrite and I2CRead commmands are actually to the
3942 * same chips - but the R/W bit is included in the address
3943 * argument so the numbers are different */
3944
3945
3946 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
3947
3948 /* First of all, enable the clock line. This is used in the PXC200-F */
3949 val = btread(BT848_GPIO_DMA_CTL);
3950 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
3951 btwrite(val, BT848_GPIO_DMA_CTL);
3952
3953 /* Then, push to 0 the reset pin long enough to reset the *
3954 * device same as above for the reset line, but not the same
3955 * value sent to the GPIO-connected stuff
3956 * which one is the good one? */
3957 gpio_inout(0xffffff,(1<<2));
3958 gpio_write(0);
3959 udelay(10);
3960 gpio_write(1<<2);
3961
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003962 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003963 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
3964 if (tmp != -1) {
3965 printk(KERN_INFO
3966 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3967 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
3968 }
3969 }
3970
3971 printk(KERN_INFO "PXC200 Initialised.\n");
3972}
3973
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003974
3975
Peter Skipworth93b43f12005-06-23 22:04:45 -07003976/* ----------------------------------------------------------------------- */
3977/*
3978 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3979 * it. This apparently involves the following procedure for each 878 chip:
3980 *
3981 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3982 *
3983 * 2) write to GPIO_DATA
3984 * - 0x0E
3985 * - sleep 1ms
3986 * - 0x10 + 0x0E
3987 * - sleep 10ms
3988 * - 0x0E
3989 * read from GPIO_DATA into buf (uint_32)
3990 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3991 * error. ERROR_CPLD_Check_Failed stop.
3992 *
3993 * 3) write to GPIO_DATA
3994 * - write 0x4400 + 0x0E
3995 * - sleep 10ms
3996 * - write 0x4410 + 0x0E
3997 * - sleep 1ms
3998 * - write 0x0E
3999 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004000 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004001 * error. ERROR_CPLD_Check_Failed.
4002 */
4003/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004004static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004005init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004006{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004007 uint32_t dataRead = 0;
4008 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004009
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004010 printk (KERN_INFO
4011 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004012 btv->c.nr);
4013
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004014 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004015
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004016 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4017 msleep (1);
4018 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4019 msleep (10);
4020 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004021
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004022 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004023
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004024 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
4025 printk (KERN_INFO
4026 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
4027 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004028 }
4029
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004030 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4031 msleep (10);
4032 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4033 msleep (1);
4034 btwrite (watchdog_value, BT848_GPIO_DATA);
4035 msleep (1);
4036 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004037
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004038 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
4039 printk (KERN_INFO
4040 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
4041 btv->c.nr, dataRead);
4042
Peter Skipworth93b43f12005-06-23 22:04:45 -07004043 return;
4044 }
4045
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004046 printk (KERN_INFO
4047 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004048}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004049
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004050
4051
Linus Torvalds1da177e2005-04-16 15:20:36 -07004052/* ----------------------------------------------------------------------- */
4053/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4054/*
4055 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4056 * This code is placed under the terms of the GNU General Public License
4057 *
4058 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4059 */
4060
4061static void bus_low(struct bttv *btv, int bit)
4062{
4063 if (btv->mbox_ior) {
4064 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4065 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4066 udelay(5);
4067 }
4068
4069 gpio_bits(bit,0);
4070 udelay(5);
4071
4072 if (btv->mbox_ior) {
4073 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4074 udelay(5);
4075 }
4076}
4077
4078static void bus_high(struct bttv *btv, int bit)
4079{
4080 if (btv->mbox_ior) {
4081 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4082 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4083 udelay(5);
4084 }
4085
4086 gpio_bits(bit,bit);
4087 udelay(5);
4088
4089 if (btv->mbox_ior) {
4090 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4091 udelay(5);
4092 }
4093}
4094
4095static int bus_in(struct bttv *btv, int bit)
4096{
4097 if (btv->mbox_ior) {
4098 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4099 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4100 udelay(5);
4101
4102 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4103 udelay(5);
4104 }
4105 return gpio_read() & (bit);
4106}
4107
4108/* TEA5757 register bits */
4109#define TEA_FREQ 0:14
4110#define TEA_BUFFER 15:15
4111
4112#define TEA_SIGNAL_STRENGTH 16:17
4113
4114#define TEA_PORT1 18:18
4115#define TEA_PORT0 19:19
4116
4117#define TEA_BAND 20:21
4118#define TEA_BAND_FM 0
4119#define TEA_BAND_MW 1
4120#define TEA_BAND_LW 2
4121#define TEA_BAND_SW 3
4122
4123#define TEA_MONO 22:22
4124#define TEA_ALLOW_STEREO 0
4125#define TEA_FORCE_MONO 1
4126
4127#define TEA_SEARCH_DIRECTION 23:23
4128#define TEA_SEARCH_DOWN 0
4129#define TEA_SEARCH_UP 1
4130
4131#define TEA_STATUS 24:24
4132#define TEA_STATUS_TUNED 0
4133#define TEA_STATUS_SEARCHING 1
4134
4135/* Low-level stuff */
4136static int tea5757_read(struct bttv *btv)
4137{
4138 unsigned long timeout;
4139 int value = 0;
4140 int i;
4141
4142 /* better safe than sorry */
4143 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4144
4145 if (btv->mbox_ior) {
4146 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4147 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4148 udelay(5);
4149 }
4150
4151 if (bttv_gpio)
4152 bttv_gpio_tracking(btv,"tea5757 read");
4153
4154 bus_low(btv,btv->mbox_we);
4155 bus_low(btv,btv->mbox_clk);
4156
4157 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004158 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004159
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004160 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004161 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4162 schedule();
4163 if (bus_in(btv,btv->mbox_data)) {
4164 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4165 return -1;
4166 }
4167
4168 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004169 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004170 udelay(5);
4171 bus_high(btv,btv->mbox_clk);
4172 udelay(5);
4173 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4174 bus_low(btv,btv->mbox_clk);
4175 value <<= 1;
4176 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4177 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4178 }
4179 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4180 return value;
4181}
4182
4183static int tea5757_write(struct bttv *btv, int value)
4184{
4185 int i;
4186 int reg = value;
4187
4188 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4189
4190 if (btv->mbox_ior) {
4191 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4192 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4193 udelay(5);
4194 }
4195 if (bttv_gpio)
4196 bttv_gpio_tracking(btv,"tea5757 write");
4197
4198 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4199 bus_low(btv,btv->mbox_clk);
4200 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004201 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004202 if (reg & 0x1000000)
4203 bus_high(btv,btv->mbox_data);
4204 else
4205 bus_low(btv,btv->mbox_data);
4206 reg <<= 1;
4207 bus_high(btv,btv->mbox_clk);
4208 udelay(10);
4209 bus_low(btv,btv->mbox_clk);
4210 udelay(10);
4211 }
4212 bus_low(btv,btv->mbox_we); /* unmute !!! */
4213 return 0;
4214}
4215
4216void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4217{
4218 dprintk("tea5757_set_freq %d\n",freq);
4219 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004220}
4221
Linus Torvalds1da177e2005-04-16 15:20:36 -07004222/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4223 *
4224 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4225 * switch instead (CD22M3494E). This IC can have multiple active connections
4226 * between Xn (input) and Yn (output) pins. We need to clear any existing
4227 * connection prior to establish a new one, pulsing the STROBE pin.
4228 *
4229 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4230 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004231 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4232 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4233 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4234 * GPIO[8] - - P3[5] (microcontroller)
4235 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4236 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4237 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004238 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004239 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4240 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004241 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004242 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004243 * note: the vendor refused to give any information on this product, all
4244 * that stuff was found using a multimeter! :)
4245 */
4246static void rv605_muxsel(struct bttv *btv, unsigned int input)
4247{
Trent Piepho13afaef2009-01-28 21:32:59 -03004248 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4249 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4250
4251 gpio_bits(0x07f, muxgpio[input]);
4252
Linus Torvalds1da177e2005-04-16 15:20:36 -07004253 /* reset all conections */
4254 gpio_bits(0x200,0x200);
4255 mdelay(1);
4256 gpio_bits(0x200,0x000);
4257 mdelay(1);
4258
Joe Perchesc84e6032008-02-03 17:18:59 +02004259 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004260 gpio_bits(0x480,0x480);
4261 mdelay(1);
4262 gpio_bits(0x480,0x080);
4263 mdelay(1);
4264}
4265
4266/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4267 *
4268 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4269 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4270 * chips, ten eight input analog multiplexors, a not chip and a few
4271 * other components.
4272 *
4273 * 16 inputs on a secondary bracket are provided and can be selected
4274 * from each of the four capture chips. Two of the eight input
4275 * multiplexors are used to select from any of the 16 input signals.
4276 *
4277 * Unsupported hardware capabilities:
4278 * . A video output monitor on the secondary bracket can be selected from
4279 * one of the 878A chips.
4280 * . Another passthrough but I haven't spent any time investigating it.
4281 * . Digital I/O (logic level connected to GPIO) is available from an
4282 * onboard header.
4283 *
4284 * The on chip input mux should always be set to 2.
4285 * GPIO[16:19] - Video input selection
4286 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4287 * GPIO[?:?] - Digital I/O.
4288 *
4289 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4290 * determined what function (if any) it provides. With the microcontroller
4291 * and sync seperator chips a guess is that it might have to do with video
4292 * switching and maybe some digital I/O.
4293 */
4294static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4295{
4296 /* video mux */
4297 gpio_bits(0x0f0000, input << 16);
4298}
4299
4300static void tibetCS16_init(struct bttv *btv)
4301{
4302 /* enable gpio bits, mask obtained via btSpy */
4303 gpio_inout(0xffffff, 0x0f7fff);
4304 gpio_write(0x0f7fff);
4305}
4306
4307/*
4308 * The following routines for the Kodicom-4400r get a little mind-twisting.
4309 * There is a "master" controller and three "slave" controllers, together
4310 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4311 * The analog switch is controlled by the "master", but the detection order
4312 * of the four BT878A chips is in an order which I just don't understand.
4313 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004314 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004315 * those numbers are different from the detection sequence. When working
4316 * with the analog switch, we need to "map" from the detection sequence
4317 * over to the board's logical controller number. This mapping sequence
4318 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4319 * unit 3, the second (which is the master) is logical unit 0, etc.
4320 * We need to maintain the status of the analog switch (which of the 16
4321 * cameras is connected to which of the 4 controllers). Rather than
4322 * add to the bttv structure for this, we use the data reserved for
4323 * the mbox (unused for this card type).
4324 */
4325
4326/*
4327 * First a routine to set the analog switch, which controls which camera
4328 * is routed to which controller. The switch comprises an X-address
4329 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4330 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4331 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4332 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4333 * specified address. The idea is to set the address and data, then bring
4334 * STROBE high, and finally bring STROBE back to low.
4335 */
4336static void kodicom4400r_write(struct bttv *btv,
4337 unsigned char xaddr,
4338 unsigned char yaddr,
4339 unsigned char data) {
4340 unsigned int udata;
4341
4342 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4343 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4344 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4345 gpio_bits(0x1ff, udata); /* strobe low */
4346}
4347
4348/*
4349 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4350 * use this routine. The routine finds the "master" for the card, maps
4351 * the controller number from the detected position over to the logical
4352 * number, writes the appropriate data to the analog switch, and housekeeps
4353 * the local copy of the switch information. The parameter 'input' is the
4354 * requested camera number (0 - 15).
4355 */
4356static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4357{
4358 char *sw_status;
4359 int xaddr, yaddr;
4360 struct bttv *mctlr;
4361 static unsigned char map[4] = {3, 0, 2, 1};
4362
4363 mctlr = master[btv->c.nr];
4364 if (mctlr == NULL) { /* ignore if master not yet detected */
4365 return;
4366 }
4367 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4368 yaddr = map[yaddr];
4369 sw_status = (char *)(&mctlr->mbox_we);
4370 xaddr = input & 0xf;
4371 /* Check if the controller/camera pair has changed, else ignore */
4372 if (sw_status[yaddr] != xaddr)
4373 {
4374 /* "open" the old switch, "close" the new one, save the new */
4375 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4376 sw_status[yaddr] = xaddr;
4377 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4378 }
4379}
4380
4381/*
4382 * During initialisation, we need to reset the analog switch. We
4383 * also preset the switch to map the 4 connectors on the card to the
4384 * *user's* (see above description of kodicom4400r_muxsel) channels
4385 * 0 through 3
4386 */
4387static void kodicom4400r_init(struct bttv *btv)
4388{
4389 char *sw_status = (char *)(&btv->mbox_we);
4390 int ix;
4391
4392 gpio_inout(0x0003ff, 0x0003ff);
4393 gpio_write(1 << 9); /* reset MUX */
4394 gpio_write(0);
4395 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004396 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004397 sw_status[ix] = ix;
4398 kodicom4400r_write(btv, ix, ix, 1);
4399 }
4400 /*
4401 * Since this is the "master", we need to set up the
4402 * other three controller chips' pointers to this structure
4403 * for later use in the muxsel routine.
4404 */
4405 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4406 return;
4407 master[btv->c.nr-1] = btv;
4408 master[btv->c.nr] = btv;
4409 master[btv->c.nr+1] = btv;
4410 master[btv->c.nr+2] = btv;
4411}
4412
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004413/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4414 * video multiplexers to provide up to 16 video inputs. These
4415 * multiplexers are controlled by the lower 8 GPIO pins of the
4416 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004417
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004418 * xxx0 is pin xxx of multiplexer U5,
4419 * yyy1 is pin yyy of multiplexer U2
4420 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004421#define ENA0 0x01
4422#define ENB0 0x02
4423#define ENA1 0x04
4424#define ENB1 0x08
4425
4426#define IN10 0x10
4427#define IN00 0x20
4428#define IN11 0x40
4429#define IN01 0x80
4430
4431static void xguard_muxsel(struct bttv *btv, unsigned int input)
4432{
4433 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004434 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4435 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4436 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4437 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004438 };
4439 gpio_write(masks[input%16]);
4440}
4441static void picolo_tetra_init(struct bttv *btv)
4442{
4443 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4444 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4445 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4446}
4447static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4448{
4449
4450 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4451 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4452 /*GPIO[20]&GPIO[21] used to choose the right input*/
4453 btwrite (input<<20,BT848_GPIO_DATA);
4454
4455}
4456
4457/*
4458 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4459 *
4460 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4461 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004462 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004463 * optional "Monitor Out" bus. This allows the card to be looking
4464 * at one input while the monitor is looking at another.
4465 *
4466 * Since I've couldn't be bothered figuring out how to add an
4467 * independant muxsel for the monitor bus, I've just set it to
4468 * whatever the card is looking at.
4469 *
4470 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4471 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4472 *
4473 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4474 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4475 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4476 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4477 *
4478 */
4479
4480/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4481#define I2C_TDA8540 0x90
4482#define I2C_TDA8540_ALT1 0x92
4483#define I2C_TDA8540_ALT2 0x94
4484#define I2C_TDA8540_ALT3 0x96
4485#define I2C_TDA8540_ALT4 0x98
4486#define I2C_TDA8540_ALT5 0x9a
4487#define I2C_TDA8540_ALT6 0x9c
4488
4489static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4490{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004491 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004492 int key = input % 4;
4493 int matrix = input / 4;
4494
4495 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4496 btv->c.nr, input, matrix, key);
4497
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004498 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004499 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4500 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4501 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4502 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4503 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4504 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4505 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4506 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4507
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004508 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004509 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004510 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004511 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004512 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004513 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004514 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004515 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004516 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004517
Trent Piephofb5deb12009-01-28 21:32:59 -03004518 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004519}
4520
4521
4522/* PXC200 muxsel helper
4523 * luke@syseng.anu.edu.au
4524 * another transplant
4525 * from Alessandro Rubini (rubini@linux.it)
4526 *
4527 * There are 4 kinds of cards:
4528 * PXC200L which is bt848
4529 * PXC200F which is bt848 with PIC controlling mux
4530 * PXC200AL which is bt878
4531 * PXC200AF which is bt878 with PIC controlling mux
4532 */
4533#define PX_CFG_PXC200F 0x01
4534#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4535#define PX_I2C_PIC 0x0f
4536#define PX_PXC200A_CARDID 0x200a1295
4537#define PX_I2C_CMD_CFG 0x00
4538
4539static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4540{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004541 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004542 long mux;
4543 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004544 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004545
4546 /* Read PIC config to determine if this is a PXC200F */
4547 /* PX_I2C_CMD_CFG*/
4548 buf[0]=0;
4549 buf[1]=0;
4550 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4551 if (rc) {
4552 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4553 /* not PXC ? do nothing */
4554 return;
4555 }
4556
4557 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4558 if (!(rc & PX_CFG_PXC200F)) {
4559 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4560 return;
4561 }
4562
4563
4564 /* The multiplexer in the 200F is handled by the GPIO port */
4565 /* get correct mapping between inputs */
4566 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4567 /* ** not needed!? */
4568 mux = input;
4569
4570 /* make sure output pins are enabled */
4571 /* bitmask=0x30f; */
4572 bitmask=0x302;
4573 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004574 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004575 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4576 bitmask |= 7<<4; /* the DAC */
4577 }
4578 btwrite(bitmask, BT848_GPIO_OUT_EN);
4579
4580 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004581 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004582 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4583 else /* older device */
4584 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4585 btwrite(bitmask,BT848_GPIO_DATA);
4586
4587 /*
4588 * Was "to be safe, set the bt848 to input 0"
4589 * Actually, since it's ok at load time, better not messing
4590 * with these bits (on PXC200AF you need to set mux 2 here)
4591 *
4592 * needed because bttv-driver sets mux before calling this function
4593 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004594 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004595 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4596 else /* older device */
4597 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4598
4599 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4600}
4601
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004602static void phytec_muxsel(struct bttv *btv, unsigned int input)
4603{
4604 unsigned int mux = input % 4;
4605
4606 if (input == btv->svhs)
4607 mux = 0;
4608
4609 gpio_bits(0x3, mux);
4610}
4611
Bruno Christo0c5db422009-03-02 22:38:59 -03004612/*
4613 * GeoVision GV-800(S) functions
4614 * Bruno Christo <bchristo@inf.ufsm.br>
4615*/
4616
4617/* This is a function to control the analog switch, which determines which
4618 * camera is routed to which controller. The switch comprises an X-address
4619 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4620 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4621 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4622 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4623 * specified address. There is also a chip select (gpio bit 16).
4624 * The idea is to set the address and chip select together, bring
4625 * STROBE high, write the data, and finally bring STROBE back to low.
4626 */
4627static void gv800s_write(struct bttv *btv,
4628 unsigned char xaddr,
4629 unsigned char yaddr,
4630 unsigned char data) {
4631 /* On the "master" 878A:
4632 * GPIO bits 0-9 are used for the analog switch:
4633 * 00 - 03: camera selector
4634 * 04 - 06: 878A (controller) selector
4635 * 16: cselect
4636 * 17: strobe
4637 * 18: data (1->on, 0->off)
4638 * 19: reset
4639 */
4640 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4641 const u32 CSELECT = 1<<16;
4642 const u32 STROBE = 1<<17;
4643 const u32 DATA = data<<18;
4644
4645 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4646 gpio_bits(0x20000, STROBE); /* STROBE high */
4647 gpio_bits(0x40000, DATA); /* write DATA */
4648 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4649}
4650
4651/*
4652 * GeoVision GV-800(S) muxsel
4653 *
4654 * Each of the 4 cards (controllers) use this function.
4655 * The controller using this function selects the input through the GPIO pins
4656 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4657 *
4658 * The parameter 'input' is the requested camera number (0-4) on the controller.
4659 * The map array has the address of each input. Note that the addresses in the
4660 * array are in the sequence the original GeoVision driver uses, that is, set
4661 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4662 * the physical "camera 1" connector corresponds to controller 0 input 0,
4663 * "camera 2" corresponds to controller 1 input 0, and so on.
4664 *
4665 * After getting the input address, the function then writes the appropriate
4666 * data to the analog switch, and housekeeps the local copy of the switch
4667 * information.
4668 */
4669static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4670{
4671 struct bttv *mctlr;
4672 char *sw_status;
4673 int xaddr, yaddr;
4674 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4675 { 0x1, 0x5, 0xb, 0x7 },
4676 { 0x2, 0x8, 0xc, 0xe },
4677 { 0x3, 0x9, 0xd, 0xf } };
4678 input = input%4;
4679 mctlr = master[btv->c.nr];
4680 if (mctlr == NULL) {
4681 /* do nothing until the "master" is detected */
4682 return;
4683 }
4684 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4685 sw_status = (char *)(&mctlr->mbox_we);
4686 xaddr = map[yaddr][input] & 0xf;
4687
4688 /* Check if the controller/camera pair has changed, ignore otherwise */
4689 if (sw_status[yaddr] != xaddr) {
4690 /* disable the old switch, enable the new one and save status */
4691 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4692 sw_status[yaddr] = xaddr;
4693 gv800s_write(mctlr, xaddr, yaddr, 1);
4694 }
4695}
4696
4697/* GeoVision GV-800(S) "master" chip init */
4698static void gv800s_init(struct bttv *btv)
4699{
4700 char *sw_status = (char *)(&btv->mbox_we);
4701 int ix;
4702
4703 gpio_inout(0xf107f, 0xf107f);
4704 gpio_write(1<<19); /* reset the analog MUX */
4705 gpio_write(0);
4706
4707 /* Preset camera 0 to the 4 controllers */
4708 for (ix = 0; ix < 4; ix++) {
4709 sw_status[ix] = ix;
4710 gv800s_write(btv, ix, ix, 1);
4711 }
4712
4713 /* Inputs on the "master" controller need this brightness fix */
4714 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4715
4716 if (btv->c.nr > BTTV_MAX-4)
4717 return;
4718 /*
4719 * Store the "master" controller pointer in the master
4720 * array for later use in the muxsel function.
4721 */
4722 master[btv->c.nr] = btv;
4723 master[btv->c.nr+1] = btv;
4724 master[btv->c.nr+2] = btv;
4725 master[btv->c.nr+3] = btv;
4726}
4727
Linus Torvalds1da177e2005-04-16 15:20:36 -07004728/* ----------------------------------------------------------------------- */
4729/* motherboard chipset specific stuff */
4730
Adrian Bunk7d44e892007-12-11 19:23:43 -03004731void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004732{
4733 int pcipci_fail = 0;
4734 struct pci_dev *dev = NULL;
4735
Alan Cox3d265c92006-09-14 11:53:16 -03004736 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004737 pcipci_fail = 1;
4738 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4739 triton1 = 1;
4740 if (pci_pci_problems & PCIPCI_VSFX)
4741 vsfx = 1;
4742#ifdef PCIPCI_ALIMAGIK
4743 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4744 latency = 0x0A;
4745#endif
4746
Linus Torvalds1da177e2005-04-16 15:20:36 -07004747
4748 /* print warnings about any quirks found */
4749 if (triton1)
4750 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4751 if (vsfx)
4752 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4753 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004754 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4755 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004756 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004757 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004758 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004759 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004760 printk(KERN_INFO "bttv: overlay forced. Use this "
4761 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004762 }
4763 }
4764 if (UNSET != latency)
4765 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004766 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004767 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004768 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004769 pci_read_config_byte(dev, 0x53, &b);
4770 if (bttv_debug)
4771 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4772 "bufcon=0x%02x\n",b);
4773 }
4774}
4775
4776int __devinit bttv_handle_chipset(struct bttv *btv)
4777{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004778 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004779
4780 if (!triton1 && !vsfx && UNSET == latency)
4781 return 0;
4782
4783 if (bttv_verbose) {
4784 if (triton1)
4785 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4786 if (vsfx && btv->id >= 878)
4787 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4788 if (UNSET != latency)
4789 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4790 btv->c.nr,latency);
4791 }
4792
4793 if (btv->id < 878) {
4794 /* bt848 (mis)uses a bit in the irq mask for etbf */
4795 if (triton1)
4796 btv->triton1 = BT848_INT_ETBF;
4797 } else {
4798 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004799 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004800 if (triton1)
4801 command |= BT878_EN_TBFX;
4802 if (vsfx)
4803 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004804 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4805 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004806 if (UNSET != latency)
4807 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4808 return 0;
4809}
4810
4811
4812/*
4813 * Local variables:
4814 * c-basic-offset: 8
4815 * End:
4816 */