blob: ff2933ab705ff2608dd38827dcab12ff0b0ca2ee [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
Joe Perches8af443e2011-08-21 19:56:48 -030028#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/delay.h>
31#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#include <linux/kmod.h>
33#include <linux/init.h>
34#include <linux/pci.h>
35#include <linux/vmalloc.h>
36#include <linux/firmware.h>
Trent Piephocf784d52007-07-21 21:26:40 -030037#include <net/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Al Viroc1c36f32008-05-21 00:32:21 -030039#include <asm/unaligned.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#include <asm/io.h>
41
42#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020043#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030044#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030045#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47/* fwd decl */
48static void boot_msp34xx(struct bttv *btv, int pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -070049static void hauppauge_eeprom(struct bttv *btv);
50static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030051static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052static void modtec_eeprom(struct bttv *btv);
53static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070054static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Linus Torvalds1da177e2005-04-16 15:20:36 -070056static void rv605_muxsel(struct bttv *btv, unsigned int input);
57static void eagle_muxsel(struct bttv *btv, unsigned int input);
58static void xguard_muxsel(struct bttv *btv, unsigned int input);
59static void ivc120_muxsel(struct bttv *btv, unsigned int input);
60static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
61
62static void PXC200_muxsel(struct bttv *btv, unsigned int input);
63
64static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
65static void picolo_tetra_init(struct bttv *btv);
66
67static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
68static void tibetCS16_init(struct bttv *btv);
69
70static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
71static void kodicom4400r_init(struct bttv *btv);
72
73static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
74static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
75
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030076static void geovision_muxsel(struct bttv *btv, unsigned int input);
77
Trent Piepho15f8eeb2009-01-28 21:32:59 -030078static void phytec_muxsel(struct bttv *btv, unsigned int input);
79
Bruno Christo0c5db422009-03-02 22:38:59 -030080static void gv800s_muxsel(struct bttv *btv, unsigned int input);
81static void gv800s_init(struct bttv *btv);
82
Peter De Schrijverde2843b2011-11-06 10:15:47 -030083static void td3116_muxsel(struct bttv *btv, unsigned int input);
84
Linus Torvalds1da177e2005-04-16 15:20:36 -070085static int terratec_active_radio_upgrade(struct bttv *btv);
86static int tea5757_read(struct bttv *btv);
87static int tea5757_write(struct bttv *btv, int value);
88static void identify_by_eeprom(struct bttv *btv,
89 unsigned char eeprom_data[256]);
90static int __devinit pvr_boot(struct bttv *btv);
91
92/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020093static unsigned int triton1;
94static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070095static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070096int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070097
98static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
99static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
100static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
101static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
102static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
Hans Verkuil859f0272009-03-28 08:29:00 -0300103static unsigned int audiodev[BTTV_MAX];
104static unsigned int saa6588[BTTV_MAX];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
Hans Verkuil859f0272009-03-28 08:29:00 -0300106static unsigned int autoload = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107static unsigned int gpiomask = UNSET;
108static unsigned int audioall = UNSET;
109static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
110
111/* insmod options */
112module_param(triton1, int, 0444);
113module_param(vsfx, int, 0444);
114module_param(no_overlay, int, 0444);
115module_param(latency, int, 0444);
116module_param(gpiomask, int, 0444);
117module_param(audioall, int, 0444);
118module_param(autoload, int, 0444);
119
120module_param_array(card, int, NULL, 0444);
121module_param_array(pll, int, NULL, 0444);
122module_param_array(tuner, int, NULL, 0444);
123module_param_array(svhs, int, NULL, 0444);
124module_param_array(remote, int, NULL, 0444);
Hans Verkuil859f0272009-03-28 08:29:00 -0300125module_param_array(audiodev, int, NULL, 0444);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126module_param_array(audiomux, int, NULL, 0444);
127
128MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
129 "[enable bug compatibility for triton1 + others]");
130MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
131 "[yet another chipset flaw workaround]");
132MODULE_PARM_DESC(latency,"pci latency timer");
133MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
134MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
135MODULE_PARM_DESC(tuner,"specify installed tuner type");
Hans Verkuil859f0272009-03-28 08:29:00 -0300136MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
137MODULE_PARM_DESC(audiodev, "specify audio device:\n"
138 "\t\t-1 = no audio\n"
139 "\t\t 0 = autodetect (default)\n"
140 "\t\t 1 = msp3400\n"
141 "\t\t 2 = tda7432\n"
142 "\t\t 3 = tvaudio");
143MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300144MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
145 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146
147/* ----------------------------------------------------------------------- */
148/* list of card IDs for bt878+ cards */
149
150static struct CARD {
151 unsigned id;
152 int cardnr;
153 char *name;
154} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800155 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
156 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
157 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
158 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
159 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
160 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
161 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
162 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800163 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800165 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
166 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
169 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
170 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
171 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
172 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800173 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
175 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800176 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700177
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800178 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700179 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800180 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
181 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700182 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800183 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700184
Wade Berrier434b2522007-06-25 13:02:16 -0300185 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
186 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800187 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800189 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
190 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
191 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
192 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
193 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
194 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
195 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800197 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
198 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
199 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
200 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
201 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800203 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
204 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
205 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
206 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800208 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
209 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700210 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800211 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
212 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
213 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
214 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
215 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800217 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
218 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
219 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
220 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
221 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800223 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
224 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
225 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
226 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
227 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800229 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
230 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
231 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
232 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800234 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
235 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
236 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
237 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700238
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800239 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
240 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
242 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
243 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
244 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
245 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
246 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
247 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
Kirill Smelkovb7589ac2010-04-27 13:17:51 -0300248 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
249 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
250 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
251 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800252 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
258 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
259 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
260 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
261 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
262 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
263 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
264 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
265 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
266 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
267 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300268 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
269 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
270 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
271 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800273 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
274 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800276 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
277 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
278 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
279 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
280 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
281 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282
Trent Piepho657de3c2006-06-20 00:30:57 -0300283 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800284 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700285
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800286 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
287 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
288 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
sensoray-dev57437c12011-10-25 19:43:55 -0300289 { 0x03116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 311" },
290 { 0x06116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 611" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800291 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
292 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800293 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
294 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800295 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800297 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
298 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800300 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
301 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
302 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
303 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800305 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306
Scott Alfter1ebba672007-04-02 14:22:39 -0300307 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
308 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
309
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700310 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800311 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700312
Steven Tothcd1257d2006-01-09 15:25:01 -0200313 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
314 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
315
Robert Millan76ecf452009-03-11 08:18:53 -0300316 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2, "Conceptronic CTVFMi v2"},
317
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700318 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800319 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200320 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
321 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800322 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
323 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
324 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
325 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200326 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800327 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300328 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800329 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300330 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300331 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300332 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300333 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300334 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
335 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
336 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
337 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Alan McIvordceaddb2009-03-12 21:43:34 -0300338
339 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
340 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
341 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
342 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
343 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
344 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
345 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
346 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
Peter De Schrijverde2843b2011-11-06 10:15:47 -0300347 { 0x3116f200, BTTV_BOARD_TVT_TD3116, "Tongwei Video Technology TD-3116" },
Alan McIvordceaddb2009-03-12 21:43:34 -0300348
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349 { 0, -1, NULL }
350};
351
352/* ----------------------------------------------------------------------- */
353/* array with description for bt848 / bt878 tv/grabber cards */
354
355struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800357 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800358 .name = " *** UNKNOWN/GENERIC *** ",
359 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800360 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300361 .muxsel = MUXSEL(2, 3, 1, 0),
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_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800366 .name = "MIRO PCTV",
367 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300368 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800369 .svhs = 2,
370 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300371 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300372 .gpiomux = { 2, 0, 0, 0 },
373 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800374 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300375 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800376 .tuner_addr = ADDR_UNSET,
377 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800378 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800379 .name = "Hauppauge (bt848)",
380 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300381 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 .svhs = 2,
383 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300384 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300385 .gpiomux = { 0, 1, 2, 3 },
386 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300388 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 .tuner_addr = ADDR_UNSET,
390 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800391 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800392 .name = "STB, Gateway P/N 6000699 (bt848)",
393 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300394 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800395 .svhs = 2,
396 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300397 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300398 .gpiomux = { 4, 0, 2, 3 },
399 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800400 .no_msp34xx = 1,
401 .needs_tvaudio = 1,
402 .tuner_type = TUNER_PHILIPS_NTSC,
403 .tuner_addr = ADDR_UNSET,
404 .pll = PLL_28,
405 .has_radio = 1,
406 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700407
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800408 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800409 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
411 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300412 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800413 .svhs = 2,
414 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300415 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300416 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800417 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300418 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 .tuner_addr = ADDR_UNSET,
420 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800421 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .name = "Diamond DTV2000",
423 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300424 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800425 .svhs = 2,
426 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300427 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300428 .gpiomux = { 0, 1, 0, 1 },
429 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800430 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300431 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800432 .tuner_addr = ADDR_UNSET,
433 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800434 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800435 .name = "AVerMedia TVPhone",
436 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300437 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300439 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800440 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300441 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800442 /* 0x04 for some cards ?? */
443 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300444 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800445 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300446 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800447 .has_remote = 1,
448 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800449 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800450 .name = "MATRIX-Vision MV-Delta",
451 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300452 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .svhs = 3,
454 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300455 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300456 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800457 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300458 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800459 .tuner_addr = ADDR_UNSET,
460 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800462 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800463 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800464 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
465 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300466 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800467 .svhs = 2,
468 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300469 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300470 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
471 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800472 .needs_tvaudio = 1,
473 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300474 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800475 .tuner_addr = ADDR_UNSET,
476 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800477 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800478 .name = "IMS/IXmicro TurboTV",
479 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300480 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800481 .svhs = 2,
482 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300483 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300484 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800485 .needs_tvaudio = 0,
486 .pll = PLL_28,
487 .tuner_type = TUNER_TEMIC_PAL,
488 .tuner_addr = ADDR_UNSET,
489 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800490 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800491 .name = "Hauppauge (bt878)",
492 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300493 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800494 .svhs = 2,
495 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300496 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300497 .gpiomux = { 0, 1, 2, 3 },
498 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 .needs_tvaudio = 1,
500 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300501 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800502 .tuner_addr = ADDR_UNSET,
503 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800504 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800505 .name = "MIRO PCTV pro",
506 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300507 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800508 .svhs = 2,
509 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300510 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300511 .gpiomux = { 0x20001,0x10001, 0, 0 },
512 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300514 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800515 .tuner_addr = ADDR_UNSET,
516 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700517
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800518 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800519 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 .name = "ADS Technologies Channel Surfer TV (bt848)",
521 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300522 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800523 .svhs = 2,
524 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300525 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300526 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800527 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300528 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800529 .tuner_addr = ADDR_UNSET,
530 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800531 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800532 .name = "AVerMedia TVCapture 98",
533 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300534 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800535 .svhs = 2,
536 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300537 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300538 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800539 .needs_tvaudio = 1,
540 .msp34xx_alt = 1,
541 .pll = PLL_28,
542 .tuner_type = TUNER_PHILIPS_PAL,
543 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300544 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800545 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800546 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800547 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800548 .name = "Aimslab Video Highway Xtreme (VHX)",
549 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300550 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800551 .svhs = 2,
552 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300553 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300554 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
555 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800556 .needs_tvaudio = 1,
557 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300558 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800559 .tuner_addr = ADDR_UNSET,
560 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800561 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 .name = "Zoltrix TV-Max",
563 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300564 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800565 .svhs = 2,
566 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300567 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300568 .gpiomux = { 0, 0, 1, 0 },
569 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800570 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300571 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800572 .tuner_addr = ADDR_UNSET,
573 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700574
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800575 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800576 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800577 .name = "Prolink Pixelview PlayTV (bt878)",
578 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300579 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800580 .svhs = 2,
581 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300582 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800583 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300584 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
585 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800586 .needs_tvaudio = 1,
587 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300588 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300589 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800590 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800591 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800592 .name = "Leadtek WinView 601",
593 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300594 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800595 .svhs = 2,
596 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300597 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300598 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
599 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300601 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800602 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300603 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800604 .has_radio = 1,
605 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800606 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800607 .name = "AVEC Intercapture",
608 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300609 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .svhs = 2,
611 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300612 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300613 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800614 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300615 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800616 .tuner_addr = ADDR_UNSET,
617 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800618 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800619 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
620 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300621 /* .audio_inputs= 1, */
622 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800623 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300624 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300625 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800626 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300627 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 .tuner_addr = ADDR_UNSET,
629 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700630
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800631 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800632 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800633 .name = "CEI Raffles Card",
634 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300635 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800636 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300637 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300638 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800639 .tuner_addr = ADDR_UNSET,
640 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800641 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800642 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
643 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300644 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800645 .svhs = 2,
646 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300647 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300648 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
649 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800650 .pll = PLL_28,
651 .tuner_type = TUNER_PHILIPS_PAL_I,
652 .tuner_addr = ADDR_UNSET,
653 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800654 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800655 .name = "Askey CPH050/ Phoebe Tv Master + FM",
656 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300657 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800658 .svhs = 2,
659 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300660 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300661 .gpiomux = { 0, 1, 0x800, 0x400 },
662 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800663 .needs_tvaudio = 1,
664 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300665 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800666 .tuner_addr = ADDR_UNSET,
667 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800668 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800669 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
670 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300671 /* .audio_inputs= 1, */
672 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300673 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800674 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300675 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300676 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300677 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800678 .no_msp34xx = 1,
679 .pll = PLL_28,
680 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
681 .tuner_addr = ADDR_UNSET,
682 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800684 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800685 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800686 .name = "Askey CPH05X/06X (bt878) [many vendors]",
687 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300688 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800689 .svhs = 2,
690 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300691 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300692 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
693 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800694 .needs_tvaudio = 1,
695 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300696 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .tuner_addr = ADDR_UNSET,
698 .has_remote = 1,
699 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800700 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800701 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
702 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300703 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800704 .svhs = 2,
705 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300706 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300707 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
708 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800709 .needs_tvaudio = 0,
710 .tuner_type = TUNER_PHILIPS_PAL,
711 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300712 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800713 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800714 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800715 .name = "Hauppauge WinCam newer (bt878)",
716 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300717 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800718 .svhs = 3,
719 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300720 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300721 .gpiomux = { 0, 1, 2, 3 },
722 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800723 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300724 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800725 .tuner_addr = ADDR_UNSET,
726 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800727 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800728 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
729 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300730 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800731 .svhs = 2,
732 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300733 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300734 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
735 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800736 .pll = PLL_28,
737 .tuner_type = TUNER_PHILIPS_SECAM,
738 .tuner_addr = ADDR_UNSET,
739 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700740
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800741 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800742 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800743 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
744 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300745 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800746 .svhs = 2,
747 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300748 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300749 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
750 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 .needs_tvaudio = 0,
752 .tuner_type = TUNER_PHILIPS_PAL,
753 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300754 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800755 /* GPIO wiring:
756 External 20 pin connector (for Active Radio Upgrade board)
757 gpio00: i2c-sda
758 gpio01: i2c-scl
759 gpio02: om5610-data
760 gpio03: om5610-clk
761 gpio04: om5610-wre
762 gpio05: om5610-stereo
763 gpio06: rds6588-davn
764 gpio07: Pin 7 n.c.
765 gpio08: nIOW
766 gpio09+10: nIOR, nSEL ?? (bt878)
767 gpio09: nIOR (bt848)
768 gpio10: nSEL (bt848)
769 Sound Routing:
770 gpio16: u2-A0 (1st 4052bt)
771 gpio17: u2-A1
772 gpio18: u2-nEN
773 gpio19: u4-A0 (2nd 4052)
774 gpio20: u4-A1
775 u4-nEN - GND
776 Btspy:
777 00000 : Cdrom (internal audio input)
778 10000 : ext. Video audio input
779 20000 : TV Mono
780 a0000 : TV Mono/2
781 1a0000 : TV Stereo
782 30000 : Radio
783 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700784 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800786 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800787 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800788 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
789 .name = "Imagenation PXC200",
790 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300791 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800792 .svhs = 1, /* was: 4 */
793 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300794 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300795 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800796 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300797 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800798 .tuner_addr = ADDR_UNSET,
799 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700800
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800801 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800802 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800803 .name = "Lifeview FlyVideo 98 LR50",
804 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300805 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800806 .svhs = 2,
807 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300808 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300809 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
810 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800811 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300812 .tuner_type = UNSET,
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_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800816 .name = "Formac iProTV, Formac ProTV I (bt848)",
817 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300818 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800819 .svhs = 3,
820 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300821 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300822 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800823 .pll = PLL_28,
824 .tuner_type = TUNER_PHILIPS_PAL,
825 .tuner_addr = ADDR_UNSET,
826 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700827
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800828 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800829 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
831 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300832 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800833 .svhs = 2,
834 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300835 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300836 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800837 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300838 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800839 .tuner_addr = ADDR_UNSET,
840 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800841 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800842 .name = "Terratec TerraTValue Version Bt878",
843 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300844 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800845 .svhs = 2,
846 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300847 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300848 .gpiomux = { 0x500, 0, 0x300, 0x900 },
849 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800850 .needs_tvaudio = 1,
851 .pll = PLL_28,
852 .tuner_type = TUNER_PHILIPS_PAL,
853 .tuner_addr = ADDR_UNSET,
854 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800855 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800856 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
857 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300858 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800859 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300860 /* TV, CVid, SVid, CVid over SVid connector */
861 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800862 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
863 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300864 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
865 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800866 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
867 gpio23 -- hef4052:nEnable (0x800000)
868 gpio12 -- hef4052:A1
869 gpio13 -- hef4052:A0
870 0x0000: external audio
871 0x1000: FM
872 0x2000: TV
873 0x3000: n.c.
874 Note: There exists another variant "Winfast 2000" with tv stereo !?
875 Note: eeprom only contains FF and pci subsystem id 107d:6606
876 */
877 .needs_tvaudio = 0,
878 .pll = PLL_28,
879 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300880 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800881 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300882 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .has_remote = 1,
884 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800885 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800886 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
887 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300888 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800889 .svhs = 2,
890 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300891 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300892 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
893 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800894 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300895 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800896 .tuner_addr = ADDR_UNSET,
897 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700898
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800899 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800900 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800901 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
902 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300903 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800904 .svhs = 2,
905 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300906 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300907 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
908 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800909 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300910 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .tuner_addr = ADDR_UNSET,
912 .has_radio = 1,
913 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800914 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800915 .name = "Prolink PixelView PlayTV pro",
916 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300917 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800918 .svhs = 2,
919 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300920 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300921 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
922 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800923 .no_msp34xx = 1,
924 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300925 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .tuner_addr = ADDR_UNSET,
927 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800928 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800929 .name = "Askey CPH06X TView99",
930 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300931 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800932 .svhs = 2,
933 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300934 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300935 .gpiomux = { 0x551400, 0x551200, 0, 0 },
936 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800937 .needs_tvaudio = 1,
938 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300939 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800940 .tuner_addr = ADDR_UNSET,
941 .has_remote = 1,
942 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800943 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .name = "Pinnacle PCTV Studio/Rave",
945 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300946 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800947 .svhs = 2,
948 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300949 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300950 .gpiomux = { 2, 0xd0001, 0, 0 },
951 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800952 .needs_tvaudio = 0,
953 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300954 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800955 .tuner_addr = ADDR_UNSET,
956 },
957
958 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800959 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
961 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300962 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 .svhs = 2,
964 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300965 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300966 .gpiomux = { 4, 0, 2, 3 },
967 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800968 .no_msp34xx = 1,
969 .needs_tvaudio = 1,
970 .tuner_type = TUNER_PHILIPS_NTSC,
971 .tuner_addr = ADDR_UNSET,
972 .pll = PLL_28,
973 .has_radio = 1,
974 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800975 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800976 .name = "AVerMedia TVPhone 98",
977 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300978 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800979 .svhs = 2,
980 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300981 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300982 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800983 .needs_tvaudio = 1,
984 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300985 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800986 .tuner_addr = ADDR_UNSET,
987 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300988 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800990 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800991 .name = "ProVideo PV951", /* pic16c54 */
992 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300993 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800994 .svhs = 2,
995 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300996 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300997 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800998 .needs_tvaudio = 1,
999 .no_msp34xx = 1,
1000 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001001 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .tuner_addr = ADDR_UNSET,
1003 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001004 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001005 .name = "Little OnAir TV",
1006 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001007 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001008 .svhs = 2,
1009 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -03001010 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001011 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1012 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001013 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001014 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001015 .tuner_addr = ADDR_UNSET,
1016 },
1017
1018 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001019 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001020 .name = "Sigma TVII-FM",
1021 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001022 /* .audio_inputs= 1, */
1023 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001025 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001026 .gpiomux = { 1, 1, 0, 2 },
1027 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 .no_msp34xx = 1,
1029 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001030 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001031 .tuner_addr = ADDR_UNSET,
1032 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001033 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001034 .name = "MATRIX-Vision MV-Delta 2",
1035 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001036 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001037 .svhs = 3,
1038 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001039 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001040 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001041 .no_msp34xx = 1,
1042 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001043 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 .tuner_addr = ADDR_UNSET,
1045 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001046 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 .name = "Zoltrix Genie TV/FM",
1048 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001049 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001050 .svhs = 2,
1051 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001052 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001053 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1054 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .no_msp34xx = 1,
1056 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001057 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001058 .tuner_addr = ADDR_UNSET,
1059 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001060 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .name = "Terratec TV/Radio+",
1062 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001063 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001064 .svhs = 2,
1065 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001066 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001067 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1068 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001069 .needs_tvaudio = 1,
1070 .no_msp34xx = 1,
1071 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001072 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001073 .tuner_addr = ADDR_UNSET,
1074 .has_radio = 1,
1075 },
1076
1077 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001078 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .name = "Askey CPH03x/ Dynalink Magic TView",
1080 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001081 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001082 .svhs = 2,
1083 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001084 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001085 .gpiomux = {2,0,0,0 },
1086 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001087 .needs_tvaudio = 1,
1088 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001089 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 .tuner_addr = ADDR_UNSET,
1091 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001092 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001093 .name = "IODATA GV-BCTV3/PCI",
1094 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001095 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001096 .svhs = 2,
1097 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001098 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001099 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001100 .no_msp34xx = 1,
1101 .pll = PLL_28,
1102 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1103 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001104 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001105 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001106 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001107 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1108 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001109 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001111 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001112 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001113 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001114 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001115 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1116 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001117 .no_msp34xx = 1,
1118 .pll = PLL_28,
1119 .tuner_type = TUNER_PHILIPS_PAL_I,
1120 .tuner_addr = ADDR_UNSET,
1121 .has_remote = 1,
1122 /* GPIO wiring: (different from Rev.4C !)
1123 GPIO17: U4.A0 (first hef4052bt)
1124 GPIO19: U4.A1
1125 GPIO20: U5.A1 (second hef4052bt)
1126 GPIO21: U4.nEN
1127 GPIO22: BT832 Reset Line
1128 GPIO23: A5,A0, U5,nEN
1129 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1130 */
1131 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001132 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001133 .name = "Eagle Wireless Capricorn2 (bt878A)",
1134 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001135 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001136 .svhs = 2,
1137 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001138 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001139 .gpiomux = { 0, 1, 2, 3 },
1140 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001141 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001142 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001143 .tuner_addr = ADDR_UNSET,
1144 },
1145
1146 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001147 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001148 /* David Härdeman <david@2gen.com> */
1149 .name = "Pinnacle PCTV Studio Pro",
1150 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001151 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001152 .svhs = 3,
1153 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001154 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001155 .gpiomux = { 1, 0xd0001, 0, 0 },
1156 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001157 /* sound path (5 sources):
1158 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1159 0= ext. Audio IN
1160 1= from MUX2
1161 2= Mono TV sound from Tuner
1162 3= not connected
1163 MUX2 (mask 0x30000):
1164 0,2,3= from MSP34xx
1165 1= FM stereo Radio from Tuner */
1166 .needs_tvaudio = 0,
1167 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001168 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001169 .tuner_addr = ADDR_UNSET,
1170 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001171 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001172 /* Claas Langbehn <claas@bigfoot.com>,
1173 Sven Grothklags <sven@upb.de> */
1174 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1175 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001176 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001177 .svhs = 2,
1178 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001179 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001180 .gpiomux = { 0, 0, 0x10, 8 },
1181 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001182 .needs_tvaudio = 1,
1183 .pll = PLL_28,
1184 .tuner_type = TUNER_PHILIPS_PAL,
1185 .tuner_addr = ADDR_UNSET,
1186 .has_radio = 1,
1187 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001188 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001189 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001190 in de.comp.os.unix.linux.hardware:
1191 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001192 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001193 options tuner type=5 */
1194 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1195 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001196 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001197 .svhs = 2,
1198 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001199 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001200 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1201 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001202 /* For cards with tda9820/tda9821:
1203 0x0000: Tuner normal stereo
1204 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1205 0x0880: Tuner A2 stereo */
1206 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001207 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001208 .tuner_addr = ADDR_UNSET,
1209 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001210 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001211 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1212 old Easy TV BT848 version (model CPH031) */
1213 .name = "Askey CPH031/ BESTBUY Easy TV",
1214 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001215 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001216 .svhs = 2,
1217 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001218 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001219 .gpiomux = { 2, 0, 0, 0 },
1220 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001221 .needs_tvaudio = 0,
1222 .pll = PLL_28,
1223 .tuner_type = TUNER_TEMIC_PAL,
1224 .tuner_addr = ADDR_UNSET,
1225 },
1226
1227 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001228 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001229 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1230 .name = "Lifeview FlyVideo 98FM LR50",
1231 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001232 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001233 .svhs = 2,
1234 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001235 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001236 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1237 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001238 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001239 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001240 .tuner_addr = ADDR_UNSET,
1241 },
1242 /* This is the ultimate cheapo capture card
1243 * just a BT848A on a small PCB!
1244 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001245 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001246 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1247 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001248 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001249 .svhs = 1,
1250 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001251 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001252 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001253 .needs_tvaudio = 0,
1254 .no_msp34xx = 1,
1255 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001256 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001257 .tuner_addr = ADDR_UNSET,
1258 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001259 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001260 /* Daniel Herrington <daniel.herrington@home.com> */
1261 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1262 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001263 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001264 .svhs = 2,
1265 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001266 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001267 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1268 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001269 .needs_tvaudio = 1,
1270 .pll = PLL_28,
1271 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1272 .tuner_addr = ADDR_UNSET,
1273 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001274 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001275 /* Matti Mottus <mottus@physic.ut.ee> */
1276 .name = "Askey CPH03x TV Capturer",
1277 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001278 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001279 .svhs = 2,
1280 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001281 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001282 .gpiomux = { 2, 0, 0, 0 },
1283 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001284 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001285 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001286 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehabed44f662009-08-22 14:43:50 -03001287 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001288 },
1289
1290 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001291 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001292 /* Philip Blundell <philb@gnu.org> */
1293 .name = "Modular Technology MM100PCTV",
1294 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001295 /* .audio_inputs= 2, */
1296 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001297 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001298 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001299 .gpiomux = { 2, 0, 0, 1 },
1300 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001301 .pll = PLL_35,
1302 .tuner_type = TUNER_TEMIC_PAL,
1303 .tuner_addr = ADDR_UNSET,
1304 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001305 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001306 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001307 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001308 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001309 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001310 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001311 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001312 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001313 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001314 .no_msp34xx = 1,
1315 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001316 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001317 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 .tuner_addr = ADDR_UNSET,
1319 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001320 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001321 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1322 new Easy TV BT878 version (model CPH061)
1323 special thanks to Informatica Mieres for providing the card */
1324 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1325 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001326 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001327 .svhs = 2,
1328 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001329 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001330 .gpiomux = { 1, 0, 4, 4 },
1331 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001332 .needs_tvaudio = 0,
1333 .pll = PLL_28,
1334 .tuner_type = TUNER_PHILIPS_PAL,
1335 .tuner_addr = ADDR_UNSET,
1336 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001337 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001338 /* Lukas Gebauer <geby@volny.cz> */
1339 .name = "ATI TV-Wonder",
1340 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001341 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001342 .svhs = 2,
1343 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001344 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001345 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1346 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001347 .pll = PLL_28,
1348 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1349 .tuner_addr = ADDR_UNSET,
1350 },
1351
1352 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001353 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001354 /* Lukas Gebauer <geby@volny.cz> */
1355 .name = "ATI TV-Wonder VE",
1356 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001357 /* .audio_inputs= 1, */
1358 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001359 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001360 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001361 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001362 .no_msp34xx = 1,
1363 .pll = PLL_28,
1364 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1365 .tuner_addr = ADDR_UNSET,
1366 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001367 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 /* DeeJay <deejay@westel900.net (2000S) */
1369 .name = "Lifeview FlyVideo 2000S LR90",
1370 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001371 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001372 .svhs = 2,
1373 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001374 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001375 /* Radio changed from 1e80 to 0x800 to make
1376 FlyVideo2000S in .hu happy (gm)*/
1377 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001378 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1379 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001380 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001382 .needs_tvaudio = 1,
1383 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001384 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 .tuner_addr = ADDR_UNSET,
1386 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001387 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001388 .name = "Terratec TValueRadio",
1389 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001390 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001391 .svhs = 2,
1392 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001393 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001394 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1395 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001396 .needs_tvaudio = 1,
1397 .pll = PLL_28,
1398 .tuner_type = TUNER_PHILIPS_PAL,
1399 .tuner_addr = ADDR_UNSET,
1400 .has_radio = 1,
1401 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001402 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001403 /* TANAKA Kei <peg00625@nifty.com> */
1404 .name = "IODATA GV-BCTV4/PCI",
1405 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001406 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001407 .svhs = 2,
1408 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001409 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001410 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001411 .no_msp34xx = 1,
1412 .pll = PLL_28,
1413 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1414 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001415 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001416 },
1417
1418 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001419 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001420 .name = "3Dfx VoodooTV FM (Euro)",
1421 /* try "insmod msp3400 simple=0" if you have
1422 * sound problems with this card. */
1423 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001424 /* .audio_inputs= 1, */
1425 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001426 .gpiomask = 0x4f8a00,
1427 /* 0x100000: 1=MSP enabled (0=disable again)
1428 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1429 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1430 .gpiomute = 0x947fff,
1431 /* tvtuner, radio, external,internal, mute, stereo
1432 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001433 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001434 .tuner_type = TUNER_MT2032,
1435 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001436 .pll = PLL_28,
1437 .has_radio = 1,
1438 },
1439 [BTTV_BOARD_VOODOOTV_200] = {
1440 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001441 /* try "insmod msp3400 simple=0" if you have
1442 * sound problems with this card. */
1443 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001444 /* .audio_inputs= 1, */
1445 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001446 .gpiomask = 0x4f8a00,
1447 /* 0x100000: 1=MSP enabled (0=disable again)
1448 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001449 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1450 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001451 /* tvtuner, radio, external,internal, mute, stereo
1452 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001453 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001454 .tuner_type = TUNER_MT2032,
1455 .tuner_addr = ADDR_UNSET,
1456 .pll = PLL_28,
1457 .has_radio = 1,
1458 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001459 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001460 /* Philip Blundell <pb@nexus.co.uk> */
1461 .name = "Active Imaging AIMMS",
1462 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001463 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001464 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001465 .tuner_addr = ADDR_UNSET,
1466 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001467 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 .gpiomask = 0
1469 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001470 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001471 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1472 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1473 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001474 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001475 .svhs = 2,
1476 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001477 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001478 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1479 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001480 .needs_tvaudio = 1,
1481 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001482 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001483 .tuner_addr = ADDR_UNSET,
1484 .has_remote = 1,
1485 /* GPIO wiring:
1486 GPIO0: U4.A0 (hef4052bt)
1487 GPIO1: U4.A1
1488 GPIO2: U4.A1 (second hef4052bt)
1489 GPIO3: U4.nEN, U5.A0, A5.nEN
1490 GPIO8-15: vrd866b ?
1491 */
1492 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001493 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001494 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1495 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001496 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001497 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001498 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1499 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001500 .pll = PLL_28,
1501 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001502 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001503 .tuner_addr = ADDR_UNSET,
1504 },
1505
1506 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001507 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001508 /* Dariusz Kowalewski <darekk@automex.pl> */
1509 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1510 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001511 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001512 .svhs = 2,
1513 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001514 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001515 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1516 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001517 .needs_tvaudio = 1,
1518 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001519 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001520 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001521 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001522 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001523 .has_radio = 1, /* Note: not all cards have radio */
1524 .has_remote = 1,
1525 /* GPIO wiring:
1526 GPIO0: A0 hef4052
1527 GPIO1: A1 hef4052
1528 GPIO3: nEN hef4052
1529 GPIO8-15: vrd866b
1530 GPIO20,22,23: R30,R29,R28
1531 */
1532 },
sensoray-dev57437c12011-10-25 19:43:55 -03001533 [BTTV_BOARD_SENSORAY311_611] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001534 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
sensoray-dev57437c12011-10-25 19:43:55 -03001535 /* you must jumper JP5 for the 311 card (PC/104+) to work */
1536 .name = "Sensoray 311/611",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001537 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001538 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001539 .svhs = 4,
1540 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001541 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001542 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001543 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001544 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001545 .tuner_addr = ADDR_UNSET,
1546 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001547 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001548 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1549 .name = "RemoteVision MX (RV605)",
1550 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001551 /* .audio_inputs= 0, */
1552 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001553 .gpiomask = 0x00,
1554 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001555 .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 -08001556 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001557 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001558 .tuner_addr = ADDR_UNSET,
1559 .muxsel_hook = rv605_muxsel,
1560 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001561 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001562 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1563 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001564 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001565 .svhs = 2,
1566 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001567 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001568 .gpiomux = { 0, 1, 2, 2 },
1569 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001570 .needs_tvaudio = 0,
1571 .tuner_type = TUNER_PHILIPS_PAL,
1572 .tuner_addr = ADDR_UNSET,
1573 .pll = PLL_28,
1574 .has_radio = 1,
1575 },
1576
1577 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001578 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001579 /* Masaki Suzuki <masaki@btree.org> */
1580 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1581 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001582 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001583 .svhs = 2,
1584 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001585 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001586 .gpiomux = { 0, 1, 2, 3 },
1587 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001588 .tuner_type = TUNER_PHILIPS_NTSC,
1589 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001590 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001591 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001592 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001593 .name = "GrandTec Multi Capture Card (Bt878)",
1594 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001595 /* .audio_inputs= 0, */
1596 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001597 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001598 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001599 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001600 .needs_tvaudio = 0,
1601 .no_msp34xx = 1,
1602 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001603 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001604 .tuner_addr = ADDR_UNSET,
1605 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001606 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001607 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1608 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001609 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001610 .svhs = 2,
1611 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001612 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1613 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001614 .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 -08001615 * This card lacks external Audio In, so we mute it on Ext. & Int.
1616 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1617 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001618 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001619 * btwincap uses 0x80000/0x80003
1620 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001621 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001622 .needs_tvaudio = 0,
1623 .no_msp34xx = 1,
1624 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001625 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001626 .tuner_addr = ADDR_UNSET,
1627 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1628 radio signal strength indicators work fine. */
1629 .has_radio = 1,
1630 /* GPIO Info:
1631 GPIO0,1: HEF4052 A0,A1
1632 GPIO2: HEF4052 nENABLE
1633 GPIO3-7: n.c.
1634 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1635 GPIO14,15: ??
1636 GPIO16-21: n.c.
1637 GPIO22,23: ??
1638 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1639 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001640 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001641 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1642 .name = "DSP Design TCVIDEO",
1643 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001644 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001645 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001647 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001648 .tuner_addr = ADDR_UNSET,
1649 },
1650
1651 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001652 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 .name = "Hauppauge WinTV PVR",
1654 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001655 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001656 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001657 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001658 .needs_tvaudio = 1,
1659 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001660 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001661 .tuner_addr = ADDR_UNSET,
1662
1663 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001664 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001665 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001666 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001667 .name = "IODATA GV-BCTV5/PCI",
1668 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001669 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001670 .svhs = 2,
1671 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001672 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001673 .gpiomux = {0x030000, 0x010000, 0, 0 },
1674 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001675 .no_msp34xx = 1,
1676 .pll = PLL_28,
1677 .tuner_type = TUNER_PHILIPS_NTSC_M,
1678 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001679 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001680 .has_radio = 1,
1681 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001682 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001683 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1684 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001685 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001686 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001687 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001688 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001689 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001690 .tuner_addr = ADDR_UNSET,
1691 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001692 .no_tda7432 = 1,
1693 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001694 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001695 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1696 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001697 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001698 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001699 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001700 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001701 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001702 .tuner_addr = ADDR_UNSET,
1703 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001704 .no_tda7432 = 1,
1705 },
1706
1707 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001708 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001709 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1710 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001711 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001712 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001713 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001714 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001715 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001716 .tuner_addr = ADDR_UNSET,
1717 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001718 .no_tda7432 = 1,
1719 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001720 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001721 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1722 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001723 /* .audio_inputs= 0, */
1724 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001725 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001726 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001727 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001728 .tuner_addr = ADDR_UNSET,
1729 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001730 .no_tda7432 = 1,
1731 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001732 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001733 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1734 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001735 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001736 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001737 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001738 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001739 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001740 .tuner_addr = ADDR_UNSET,
1741 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001742 .no_tda7432 = 1,
1743 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001744 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001745 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1746 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001747 /* .audio_inputs= 1, */
1748 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001749 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001750 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001751 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001752 .tuner_addr = ADDR_UNSET,
1753 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001754 .no_tda7432 = 1,
1755 },
1756
1757 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001758 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1760 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001761 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001762 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001763 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001764 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001765 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001766 .tuner_addr = ADDR_UNSET,
1767 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001768 .no_tda7432 = 1,
1769 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001770 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001771 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001773 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001774 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001775 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001776 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001777 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001778 .tuner_addr = ADDR_UNSET,
1779 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001780 .no_tda7432 = 1,
1781 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001782 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .name = "Osprey 500", /* 500 */
1784 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001785 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001786 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001787 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001788 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001789 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001790 .tuner_addr = ADDR_UNSET,
1791 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001792 .no_tda7432 = 1,
1793 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001794 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001795 .name = "Osprey 540", /* 540 */
1796 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001797 /* .audio_inputs= 1, */
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,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001802 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001803 },
1804
1805 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001806 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001807 .name = "Osprey 2000", /* 2000 */
1808 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001809 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001810 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001811 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001812 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001813 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001814 .tuner_addr = ADDR_UNSET,
1815 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001816 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1817 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001818 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001819 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1820 .name = "IDS Eagle",
1821 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001822 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001823 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001824 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001825 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001827 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001828 .muxsel_hook = eagle_muxsel,
1829 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001830 .pll = PLL_28,
1831 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001832 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001833 .name = "Pinnacle PCTV Sat",
1834 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001835 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001836 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001837 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001838 .tuner_addr = ADDR_UNSET,
1839 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001840 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001841 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001842 .pll = PLL_28,
1843 .no_gpioirq = 1,
1844 .has_dvb = 1,
1845 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001846 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001847 .name = "Formac ProTV II (bt878)",
1848 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001849 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001850 .svhs = 3,
1851 .gpiomask = 2,
1852 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001853 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001854 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001855 .pll = PLL_28,
1856 .has_radio = 1,
1857 .tuner_type = TUNER_PHILIPS_PAL,
1858 .tuner_addr = ADDR_UNSET,
1859 /* sound routing:
1860 GPIO=0x00,0x01,0x03: mute (?)
1861 0x02: both TV and radio (tuner: FM1216/I)
1862 The card has onboard audio connectors labeled "cdrom" and "board",
1863 not soldered here, though unknown wiring.
1864 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001865 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001866 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001867
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001868 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001869 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001870 .name = "MachTV",
1871 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001872 /* .audio_inputs= 1, */
1873 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001874 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001875 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001876 .gpiomux = { 0, 1, 2, 3},
1877 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001878 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001879 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001881 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001882 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001883 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001884 .name = "Euresys Picolo",
1885 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001886 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001887 .svhs = 2,
1888 .gpiomask = 0,
1889 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001891 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001892 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001893 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001894 .tuner_addr = ADDR_UNSET,
1895 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001896 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001897 /* Luc Van Hoeylandt <luc@e-magic.be> */
1898 .name = "ProVideo PV150", /* 0x4f */
1899 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001900 /* .audio_inputs= 0, */
1901 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001902 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001903 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001904 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .needs_tvaudio = 0,
1906 .no_msp34xx = 1,
1907 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001908 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001909 .tuner_addr = ADDR_UNSET,
1910 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001911 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001912 /* Hiroshi Takekawa <sian@big.or.jp> */
1913 /* This card lacks subsystem ID */
1914 .name = "AD-TVK503", /* 0x63 */
1915 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001916 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 .svhs = 2,
1918 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001919 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001921 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1922 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001923 .needs_tvaudio = 0,
1924 .no_msp34xx = 1,
1925 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001926 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001928 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001930
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001931 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001932 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001933 .name = "Hercules Smart TV Stereo",
1934 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001935 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001936 .svhs = 2,
1937 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001938 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001939 .needs_tvaudio = 1,
1940 .no_msp34xx = 1,
1941 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001942 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001943 .tuner_addr = ADDR_UNSET,
1944 /* Notes:
1945 - card lacks subsystem ID
1946 - stereo variant w/ daughter board with tda9874a @0xb0
1947 - Audio Routing:
1948 always from tda9874 independent of GPIO (?)
1949 external line in: unknown
1950 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1951 hef4053 (instead 4052) for unknown function
1952 */
1953 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001954 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .name = "Pace TV & Radio Card",
1956 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001957 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001958 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001959 /* Tuner, CVid, SVid, CVid over SVid connector */
1960 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .gpiomask = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001962 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001963 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001964 .tuner_addr = ADDR_UNSET,
1965 .has_radio = 1,
1966 .pll = PLL_28,
1967 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1968 only internal line out: (4pin header) RGGL
1969 Radio must be decoded by msp3410d (not routed through)*/
1970 /*
1971 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1972 */
1973 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001974 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001975 /* Chris Willing <chris@vislab.usyd.edu.au> */
1976 .name = "IVC-200",
1977 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001978 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001979 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001980 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001981 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001982 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001983 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001984 .pll = PLL_28,
1985 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001986 [BTTV_BOARD_IVCE8784] = {
1987 .name = "IVCE-8784",
1988 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001989 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001990 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001991 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001992 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001993 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001994 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001995 .pll = PLL_28,
1996 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001997 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001998 .name = "Grand X-Guard / Trust 814PCI",
1999 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002000 /* .audio_inputs= 0, */
2001 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002002 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002003 .tuner_addr = ADDR_UNSET,
2004 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03002005 .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 -08002006 .muxsel_hook = xguard_muxsel,
2007 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002008 .no_tda7432 = 1,
2009 .pll = PLL_28,
2010 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002011
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002012 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002013 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002014 .name = "Nebula Electronics DigiTV",
2015 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002016 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002017 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002018 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002019 .no_tda7432 = 1,
2020 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002021 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002022 .tuner_addr = ADDR_UNSET,
2023 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002024 .has_remote = 1,
2025 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002026 .no_gpioirq = 1,
2027 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002028 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002029 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2030 .name = "ProVideo PV143",
2031 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002032 /* .audio_inputs= 0, */
2033 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002035 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002036 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002037 .needs_tvaudio = 0,
2038 .no_msp34xx = 1,
2039 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002040 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002041 .tuner_addr = ADDR_UNSET,
2042 },
Dirk Heer05583622008-11-21 19:00:55 -03002043 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002044 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002045 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002046 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002047 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002048 .svhs = 3,
2049 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002050 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002051 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002052 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002053 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002054 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002055 .tuner_addr = ADDR_UNSET,
2056 },
Dirk Heer05583622008-11-21 19:00:55 -03002057 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2058 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002059 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002060 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 .svhs = 3,
2062 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002063 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002064 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002065 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002066 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002067 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002068 .tuner_addr = ADDR_UNSET,
2069 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002070
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002071 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002072 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002073 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2074 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002075 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 .svhs = 9,
2077 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002078 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002079 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002080 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002081 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002082 .needs_tvaudio = 1,
2083 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002084 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002085 .tuner_addr = ADDR_UNSET,
2086 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002087 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002088 .name = "PHYTEC VD-009 Combi (bt878)",
2089 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002090 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002091 .svhs = 9,
2092 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002093 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002094 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002095 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002096 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002097 .needs_tvaudio = 1,
2098 .pll = PLL_28,
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,
2101 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002102 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 .name = "IVC-100",
2104 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002105 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002106 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002107 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002108 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002109 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002110 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002111 .pll = PLL_28,
2112 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002113 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002114 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2115 .name = "IVC-120G",
2116 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002117 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002118 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002119 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002120 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002121 .needs_tvaudio = 0,
2122 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002123 .no_tda7432 = 1,
2124 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002125 .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 -08002126 .muxsel_hook = ivc120_muxsel,
2127 .pll = PLL_28,
2128 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002129
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002130 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002131 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002132 .name = "pcHDTV HD-2000 TV",
2133 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002134 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002135 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002136 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002137 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002138 .tuner_addr = ADDR_UNSET,
2139 .has_dvb = 1,
2140 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002141 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002142 .name = "Twinhan DST + clones",
2143 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002144 .no_tda7432 = 1,
2145 .tuner_type = TUNER_ABSENT,
2146 .tuner_addr = ADDR_UNSET,
2147 .no_video = 1,
2148 .has_dvb = 1,
2149 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002150 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002151 .name = "Winfast VC100",
2152 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002153 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002154 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002155 /* Vid In, SVid In, Vid over SVid in connector */
2156 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002157 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002158 .no_tda7432 = 1,
2159 .tuner_type = TUNER_ABSENT,
2160 .tuner_addr = ADDR_UNSET,
2161 .pll = PLL_28,
2162 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002163 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002164 .name = "Teppro TEV-560/InterVision IV-560",
2165 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002166 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .svhs = 2,
2168 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002169 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002170 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002171 .needs_tvaudio = 1,
2172 .tuner_type = TUNER_PHILIPS_PAL,
2173 .tuner_addr = ADDR_UNSET,
2174 .pll = PLL_35,
2175 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002176
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002177 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002178 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002179 .name = "SIMUS GVC1100",
2180 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002181 /* .audio_inputs= 0, */
2182 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002183 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002184 .tuner_addr = ADDR_UNSET,
2185 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002186 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002187 .gpiomask = 0x3F,
2188 .muxsel_hook = gvc1100_muxsel,
2189 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002190 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002191 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2192 .name = "NGS NGSTV+",
2193 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002194 .svhs = 2,
2195 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002196 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002197 .gpiomux = { 0, 0, 0, 0 },
2198 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002199 .pll = PLL_28,
2200 .tuner_type = TUNER_PHILIPS_PAL,
2201 .tuner_addr = ADDR_UNSET,
2202 .has_remote = 1,
2203 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002204 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002205 /* http://linuxmedialabs.com */
2206 .name = "LMLBT4",
2207 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002208 /* .audio_inputs= 0, */
2209 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002210 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002211 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002212 .no_tda7432 = 1,
2213 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002214 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 .tuner_addr = ADDR_UNSET,
2216 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002217 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002218 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2219 .name = "Tekram M205 PRO",
2220 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002221 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002222 .tuner_type = TUNER_PHILIPS_PAL,
2223 .tuner_addr = ADDR_UNSET,
2224 .svhs = 2,
2225 .needs_tvaudio = 0,
2226 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002227 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002228 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 .pll = PLL_28,
2230 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002231
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002232 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002233 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002234 /* Javier Cendan Ares <jcendan@lycos.es> */
2235 /* bt878 TV + FM without subsystem ID */
2236 .name = "Conceptronic CONTVFMi",
2237 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002238 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002239 .svhs = 2,
2240 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002241 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002242 .gpiomux = { 0, 1, 2, 2 },
2243 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 .needs_tvaudio = 0,
2245 .pll = PLL_28,
2246 .tuner_type = TUNER_PHILIPS_PAL,
2247 .tuner_addr = ADDR_UNSET,
2248 .has_remote = 1,
2249 .has_radio = 1,
2250 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002251 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002252 /*Eric DEBIEF <debief@telemsa.com>*/
Lucas De Marchi25985ed2011-03-30 22:57:33 -03002253 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2254 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the following declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002255 /*0x79 in bttv.h*/
2256 .name = "Euresys Picolo Tetra",
2257 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002258 /* .audio_inputs= 0, */
2259 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002260 .gpiomask = 0,
2261 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2262 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002263 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002264 /*878A input is always MUX0, see above.*/
2265 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002266 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002267 .pll = PLL_28,
2268 .needs_tvaudio = 0,
2269 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002270 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002271 .tuner_addr = ADDR_UNSET,
2272 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002273 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002274 /* Spirit TV Tuner from http://spiritmodems.com.au */
2275 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2276 .name = "Spirit TV Tuner",
2277 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002278 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002279 .svhs = 2,
2280 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002281 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002282 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002283 .tuner_type = TUNER_TEMIC_PAL,
2284 .tuner_addr = ADDR_UNSET,
2285 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002286 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002287 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002288 /* Wolfram Joost <wojo@frokaschwei.de> */
2289 .name = "AVerMedia AVerTV DVB-T 771",
2290 .video_inputs = 2,
2291 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .tuner_type = TUNER_ABSENT,
2293 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002294 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002295 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002296 .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,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002311 .no_tda7432 = 1,
2312 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002313 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002314 .tuner_addr = ADDR_UNSET,
2315 .has_dvb = 1,
2316 .no_gpioirq = 1,
2317 .has_remote = 1,
2318 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002319 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002320 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002321 .name = "MATRIX Vision Sigma-SQ",
2322 .video_inputs = 16,
2323 /* .audio_inputs= 0, */
2324 .svhs = NO_SVHS,
2325 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002326 .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 -03002327 .muxsel_hook = sigmaSQ_muxsel,
2328 .gpiomux = { 0 },
2329 .no_msp34xx = 1,
2330 .pll = PLL_28,
2331 .tuner_type = TUNER_ABSENT,
2332 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002333 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002334 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002335 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002336 .name = "MATRIX Vision Sigma-SLC",
2337 .video_inputs = 4,
2338 /* .audio_inputs= 0, */
2339 .svhs = NO_SVHS,
2340 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002341 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002342 .muxsel_hook = sigmaSLC_muxsel,
2343 .gpiomux = { 0 },
2344 .no_msp34xx = 1,
2345 .pll = PLL_28,
2346 .tuner_type = TUNER_ABSENT,
2347 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002348 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002349 /* BTTV_BOARD_APAC_VIEWCOMP */
2350 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002351 /* Attila Kondoros <attila.kondoros@chello.hu> */
2352 /* bt878 TV + FM 0x00000000 subsystem ID */
2353 .name = "APAC Viewcomp 878(AMAX)",
2354 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002355 /* .audio_inputs= 1, */
2356 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002357 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002358 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002359 .gpiomux = { 2, 0, 0, 0 },
2360 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002361 .needs_tvaudio = 0,
2362 .pll = PLL_28,
2363 .tuner_type = TUNER_PHILIPS_PAL,
2364 .tuner_addr = ADDR_UNSET,
2365 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2366 .has_radio = 1, /* not every card has radio */
2367 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002368
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002369 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002370 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002371 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2372 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002373 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002374 .no_tda7432 = 1,
2375 .pll = PLL_28,
2376 .no_video = 1,
2377 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002378 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 .tuner_addr = ADDR_UNSET,
2380 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002381 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 /* Steven <photon38@pchome.com.tw> */
2383 .name = "V-Gear MyVCD",
2384 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002385 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002386 .svhs = 2,
2387 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002388 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002389 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2390 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002391 .no_msp34xx = 1,
2392 .pll = PLL_28,
2393 .tuner_type = TUNER_PHILIPS_NTSC_M,
2394 .tuner_addr = ADDR_UNSET,
2395 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002396 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002397 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002398 /* Rick C <cryptdragoon@gmail.com> */
2399 .name = "Super TV Tuner",
2400 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002401 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002402 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002403 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .tuner_type = TUNER_PHILIPS_NTSC,
2405 .tuner_addr = ADDR_UNSET,
2406 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002407 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002408 .needs_tvaudio = 1,
2409 .has_radio = 1,
2410 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002411 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002412 /* Chris Fanning <video4linux@haydon.net> */
2413 .name = "Tibet Systems 'Progress DVR' CS16",
2414 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002415 /* .audio_inputs= 0, */
2416 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002417 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002418 .pll = PLL_28,
2419 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002420 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002421 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002422 .tuner_addr = ADDR_UNSET,
2423 .muxsel_hook = tibetCS16_muxsel,
2424 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002425 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002426 /* Bill Brack <wbrack@mmm.com.hk> */
2427 /*
2428 * Note that, because of the card's wiring, the "master"
2429 * BT878A chip (i.e. the one which controls the analog switch
2430 * and must use this card type) is the 2nd one detected. The
2431 * other 3 chips should use card type 0x85, whose description
2432 * follows this one. There is a EEPROM on the card (which is
2433 * connected to the I2C of one of those other chips), but is
2434 * not currently handled. There is also a facility for a
2435 * "monitor", which is also not currently implemented.
2436 */
2437 .name = "Kodicom 4400R (master)",
2438 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002439 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002440 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002441 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002442 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002443 /* GPIO bits 0-9 used for analog switch:
2444 * 00 - 03: camera selector
2445 * 04 - 06: channel (controller) selector
2446 * 07: data (1->on, 0->off)
2447 * 08: strobe
2448 * 09: reset
2449 * bit 16 is input from sync separator for the channel
2450 */
2451 .gpiomask = 0x0003ff,
2452 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002453 .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 -08002454 .pll = PLL_28,
2455 .no_msp34xx = 1,
2456 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002457 .muxsel_hook = kodicom4400r_muxsel,
2458 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002459 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002460 /* Bill Brack <wbrack@mmm.com.hk> */
2461 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2462 * one which controls the analog switch, and must use the card type)
2463 * is the 2nd one detected. The other 3 chips should use this card
2464 * type
2465 */
2466 .name = "Kodicom 4400R (slave)",
2467 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002468 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002469 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002470 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002471 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002472 .gpiomask = 0x010000,
2473 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002474 .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 -08002475 .pll = PLL_28,
2476 .no_msp34xx = 1,
2477 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002478 .muxsel_hook = kodicom4400r_muxsel,
2479 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002480 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002481 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002482 /* Michael Henson <mhenson@clarityvi.com> */
2483 /* Adlink RTV24 with special unlock codes */
2484 .name = "Adlink RTV24",
2485 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002486 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002487 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002488 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002489 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002490 .tuner_addr = ADDR_UNSET,
2491 .pll = PLL_28,
2492 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002493 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002494 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002495 /* Michael Krufky <mkrufky@m1k.net> */
2496 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002497 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002499 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002500 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002501 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002502 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002503 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002504 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2505 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002506 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002507 .no_tda7432 = 1,
2508 .has_dvb = 1,
2509 },
2510 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002511 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002512 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002513 .name = "Acorp Y878F",
2514 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002515 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002516 .svhs = 2,
2517 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002518 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002519 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2520 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002521 .needs_tvaudio = 1,
2522 .pll = PLL_28,
2523 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2524 .tuner_addr = 0xc1 >>1,
2525 .has_radio = 1,
2526 },
2527 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002528 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002529 .name = "Conceptronic CTVFMi v2",
2530 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002531 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002532 .svhs = 2,
2533 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002534 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002535 .gpiomux = { 0, 1, 2, 2 },
2536 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 .needs_tvaudio = 0,
2538 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002539 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002540 .tuner_addr = ADDR_UNSET,
2541 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002542 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002543 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002544 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002545 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002546 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2547 .video_inputs = 5,
2548 /* .audio_inputs= 1, */
2549 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002550 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002551 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002552 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002553 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2554 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2555 .gpiomute = 0x12400,
2556 .no_msp34xx = 1,
2557 .pll = PLL_28,
2558 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002559 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002560 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002561 },
2562 /* ---- card 0x8b ---------------------------------- */
2563 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002564 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002565 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2566 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002567 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002568 .svhs = 2,
2569 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002570 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002571 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2572 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002573 .no_msp34xx = 1,
2574 .pll = PLL_28,
2575 .tuner_type = TUNER_YMEC_TVF_5533MF,
2576 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002577 .has_radio = 1,
2578 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002579 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002580 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002581 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2582 one external BNC composite input (mux 2)
2583 three internal composite inputs (unknown muxes)
2584 an 18-bit stereo A/D (CS5331A), which has:
2585 one external stereo unblanced (RCA) audio connection
2586 one (or 3?) internal stereo balanced (XLR) audio connection
2587 input is selected via gpio to a 14052B mux
2588 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2589 gain is controlled via an X9221A chip on the I2C bus @0x28
2590 sample rate is controlled via gpio to an MK1413S
2591 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2592 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002593 [BTTV_BOARD_OSPREY440] = {
2594 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002595 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002596 /* .audio_inputs= 2, */
2597 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002598 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002599 .gpiomask = 0x303,
2600 .gpiomute = 0x000, /* int + 32kHz */
2601 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002602 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002603 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002604 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002605 .no_msp34xx = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002606 .no_tda7432 = 1,
2607 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002608 /* ---- card 0x8d ---------------------------------- */
2609 [BTTV_BOARD_ASOUND_SKYEYE] = {
2610 .name = "Asound Skyeye PCTV",
2611 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002612 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002613 .svhs = 2,
2614 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002615 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002616 .gpiomux = { 2, 0, 0, 0 },
2617 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002618 .needs_tvaudio = 1,
2619 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002620 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002621 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002622 },
Bill Pechter633323f2005-11-13 16:07:50 -08002623 /* ---- card 0x8e ---------------------------------- */
2624 [BTTV_BOARD_SABRENT_TVFM] = {
2625 .name = "Sabrent TV-FM (bttv version)",
2626 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002627 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002628 .svhs = 2,
2629 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002630 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002631 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002632 .no_msp34xx = 1,
Bill Pechter633323f2005-11-13 16:07:50 -08002633 .no_tda7432 = 1,
2634 .pll = PLL_28,
2635 .tuner_type = TUNER_TNF_5335MF,
2636 .tuner_addr = ADDR_UNSET,
2637 .has_radio = 1,
2638 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002639 /* ---- card 0x8f ---------------------------------- */
2640 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2641 .name = "Hauppauge ImpactVCB (bt878)",
2642 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002643 /* .audio_inputs= 0, */
2644 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002645 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002646 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002647 .no_msp34xx = 1,
Steven Tothcd1257d2006-01-09 15:25:01 -02002648 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002649 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002650 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002651 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002652 [BTTV_BOARD_MACHTV_MAGICTV] = {
2653 /* Julian Calaby <julian.calaby@gmail.com>
2654 * Slightly different from original MachTV definition (0x60)
2655
2656 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2657 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2658 * properly (methinks) causing no keyup bits being set */
2659
2660 .name = "MagicTV", /* rebranded MachTV */
2661 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002662 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002663 .svhs = 2,
2664 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002665 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002666 .gpiomux = { 0, 1, 2, 3 },
2667 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002668 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2669 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002670 .pll = PLL_28,
2671 .has_radio = 1,
2672 .has_remote = 1,
2673 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002674 [BTTV_BOARD_SSAI_SECURITY] = {
2675 .name = "SSAI Security Video Interface",
2676 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002677 /* .audio_inputs= 0, */
2678 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002679 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002680 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002681 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002682 },
2683 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2684 .name = "SSAI Ultrasound Video Interface",
2685 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002686 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002687 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002688 .muxsel = MUXSEL(2, 0, 1, 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 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002692 /* ---- card 0x94---------------------------------- */
2693 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2694 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002695 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002696 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002697 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002698 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002699 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002700 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002701 .gpiomask = 0x00e00007,
2702 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2703 .gpiomute = 0x00c00007,
2704 .no_msp34xx = 1,
Michael Krufky27cb7862007-06-28 12:19:20 -03002705 .no_tda7432 = 1,
2706 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002707 /* ---- card 0x95---------------------------------- */
2708 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2709 .name = "Typhoon TV-Tuner PCI (50684)",
2710 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002711 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002712 .svhs = 2,
2713 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002714 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002715 .gpiomux = { 0x20001,0x10001, 0, 0 },
2716 .gpiomute = 10,
2717 .needs_tvaudio = 1,
2718 .pll = PLL_28,
2719 .tuner_type = TUNER_PHILIPS_PAL_I,
2720 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002721 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002722 [BTTV_BOARD_GEOVISION_GV600] = {
2723 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002724 .name = "Geovision GV-600",
2725 .video_inputs = 16,
2726 /* .audio_inputs= 0, */
2727 .svhs = NO_SVHS,
2728 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002729 .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 -03002730 .muxsel_hook = geovision_muxsel,
2731 .gpiomux = { 0 },
2732 .no_msp34xx = 1,
2733 .pll = PLL_28,
2734 .tuner_type = TUNER_ABSENT,
2735 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002736 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002737 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2738 /* Mauro Lacy <mauro@lacy.com.ar>
2739 * Based on MagicTV and Conceptronic CONTVFMi */
2740
2741 .name = "Kozumi KTV-01C",
2742 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002743 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002744 .svhs = 2,
2745 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002746 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002747 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002748 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002749 .needs_tvaudio = 0,
2750 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2751 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002752 .pll = PLL_28,
2753 .has_radio = 1,
2754 .has_remote = 1,
2755 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002756 [BTTV_BOARD_ENLTV_FM_2] = {
2757 /* Encore TV Tuner Pro ENL TV-FM-2
2758 Mauro Carvalho Chehab <mchehab@infradead.org */
2759 .name = "Encore ENL TV-FM-2",
2760 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002761 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002762 .svhs = 2,
2763 /* bit 6 -> IR disabled
2764 bit 18/17 = 00 -> mute
2765 01 -> enable external audio input
2766 10 -> internal audio input (mono?)
2767 11 -> internal audio input
2768 */
2769 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002770 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002771 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2772 .gpiomute = 0,
2773 .tuner_type = TUNER_TCL_MF02GIP_5N,
2774 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002775 .pll = PLL_28,
2776 .has_radio = 1,
2777 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002778 },
2779 [BTTV_BOARD_VD012] = {
2780 /* D.Heer@Phytec.de */
2781 .name = "PHYTEC VD-012 (bt878)",
2782 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002783 /* .audio_inputs= 0, */
2784 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002785 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002786 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002787 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2788 .needs_tvaudio = 0,
2789 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002790 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002791 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002792 },
2793 [BTTV_BOARD_VD012_X1] = {
2794 /* D.Heer@Phytec.de */
2795 .name = "PHYTEC VD-012-X1 (bt878)",
2796 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002797 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002798 .svhs = 3,
2799 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002800 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002801 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2802 .needs_tvaudio = 0,
2803 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002804 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002805 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002806 },
2807 [BTTV_BOARD_VD012_X2] = {
2808 /* D.Heer@Phytec.de */
2809 .name = "PHYTEC VD-012-X2 (bt878)",
2810 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002811 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002812 .svhs = 3,
2813 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002814 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002815 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2816 .needs_tvaudio = 0,
2817 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002818 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002819 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002820 },
2821 [BTTV_BOARD_GEOVISION_GV800S] = {
2822 /* Bruno Christo <bchristo@inf.ufsm.br>
2823 *
2824 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2825 * 1 audio input per BT878A = 4 audio inputs
2826 * 4 video inputs per BT878A = 16 video inputs
2827 * This is the first BT878A chip of the GV-800(S). It's the
2828 * "master" chip and it controls the video inputs through an
2829 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2830 * slaves should use card type 0x9e (following this one).
2831 * There is a EEPROM on the card which is currently not handled.
2832 * The audio input is not working yet.
2833 */
2834 .name = "Geovision GV-800(S) (master)",
2835 .video_inputs = 4,
2836 /* .audio_inputs= 1, */
2837 .tuner_type = TUNER_ABSENT,
2838 .tuner_addr = ADDR_UNSET,
2839 .svhs = NO_SVHS,
2840 .gpiomask = 0xf107f,
2841 .no_gpioirq = 1,
2842 .muxsel = MUXSEL(2, 2, 2, 2),
2843 .pll = PLL_28,
2844 .no_msp34xx = 1,
2845 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002846 .muxsel_hook = gv800s_muxsel,
2847 },
2848 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2849 /* Bruno Christo <bchristo@inf.ufsm.br>
2850 *
2851 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2852 * 1 audio input per BT878A = 4 audio inputs
2853 * 4 video inputs per BT878A = 16 video inputs
2854 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2855 * and should use this card type.
2856 * The audio input is not working yet.
2857 */
2858 .name = "Geovision GV-800(S) (slave)",
2859 .video_inputs = 4,
2860 /* .audio_inputs= 1, */
2861 .tuner_type = TUNER_ABSENT,
2862 .tuner_addr = ADDR_UNSET,
2863 .svhs = NO_SVHS,
2864 .gpiomask = 0x00,
2865 .no_gpioirq = 1,
2866 .muxsel = MUXSEL(2, 2, 2, 2),
2867 .pll = PLL_28,
2868 .no_msp34xx = 1,
2869 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002870 .muxsel_hook = gv800s_muxsel,
2871 },
Alan McIvordceaddb2009-03-12 21:43:34 -03002872 [BTTV_BOARD_PV183] = {
2873 .name = "ProVideo PV183", /* 0x9f */
2874 .video_inputs = 2,
2875 /* .audio_inputs= 0, */
2876 .svhs = NO_SVHS,
2877 .gpiomask = 0,
2878 .muxsel = MUXSEL(2, 3),
2879 .gpiomux = { 0 },
2880 .needs_tvaudio = 0,
2881 .no_msp34xx = 1,
2882 .pll = PLL_28,
2883 .tuner_type = TUNER_ABSENT,
2884 .tuner_addr = ADDR_UNSET,
2885 },
Peter De Schrijverde2843b2011-11-06 10:15:47 -03002886 [BTTV_BOARD_TVT_TD3116] = {
2887 .name = "Tongwei Video Technology TD-3116",
2888 .video_inputs = 16,
2889 .gpiomask = 0xc00ff,
2890 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2891 .muxsel_hook = td3116_muxsel,
2892 .svhs = NO_SVHS,
2893 .pll = PLL_28,
2894 .tuner_type = TUNER_ABSENT,
2895 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002896};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002897
2898static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2899
2900/* ----------------------------------------------------------------------- */
2901
2902static unsigned char eeprom_data[256];
2903
2904/*
2905 * identify card
2906 */
2907void __devinit bttv_idcard(struct bttv *btv)
2908{
2909 unsigned int gpiobits;
2910 int i,type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002911
2912 /* read PCI subsystem ID */
Sergei Shtylyovfa1400142011-07-22 15:16:04 -03002913 btv->cardid = btv->c.pci->subsystem_device << 16;
2914 btv->cardid |= btv->c.pci->subsystem_vendor;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002915
2916 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2917 /* look for the card */
2918 for (type = -1, i = 0; cards[i].id != 0; i++)
2919 if (cards[i].id == btv->cardid)
2920 type = i;
2921
2922 if (type != -1) {
2923 /* found it */
Joe Perches8af443e2011-08-21 19:56:48 -03002924 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2925 btv->c.nr, cards[type].name, cards[type].cardnr,
2926 btv->cardid & 0xffff,
2927 (btv->cardid >> 16) & 0xffff);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002928 btv->c.type = cards[type].cardnr;
2929 } else {
2930 /* 404 */
Joe Perches8af443e2011-08-21 19:56:48 -03002931 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2932 btv->c.nr, btv->cardid & 0xffff,
2933 (btv->cardid >> 16) & 0xffff);
2934 pr_debug("please mail id, board name and the correct card= insmod option to linux-media@vger.kernel.org\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002935 }
2936 }
2937
2938 /* let the user override the autodetected type */
2939 if (card[btv->c.nr] < bttv_num_tvcards)
2940 btv->c.type=card[btv->c.nr];
2941
2942 /* print which card config we are using */
Joe Perches8af443e2011-08-21 19:56:48 -03002943 pr_info("%d: using: %s [card=%d,%s]\n",
2944 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type,
2945 card[btv->c.nr] < bttv_num_tvcards
2946 ? "insmod option" : "autodetected");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002947
2948 /* overwrite gpio stuff ?? */
2949 if (UNSET == audioall && UNSET == audiomux[0])
2950 return;
2951
2952 if (UNSET != audiomux[0]) {
2953 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002954 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002955 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002956 gpiobits |= audiomux[i];
2957 }
2958 } else {
2959 gpiobits = audioall;
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 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002962 }
2963 }
2964 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
Joe Perches8af443e2011-08-21 19:56:48 -03002965 pr_info("%d: gpio config override: mask=0x%x, mux=",
2966 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002967 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Joe Perches8af443e2011-08-21 19:56:48 -03002968 pr_cont("%s0x%x",
2969 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002970 }
Joe Perches8af443e2011-08-21 19:56:48 -03002971 pr_cont("\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002972}
2973
2974/*
2975 * (most) board specific initialisations goes here
2976 */
2977
2978/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002979static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002980{
2981 int type = -1;
2982
2983 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002984 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002985 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002986 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002987 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002988 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002989
2990 if (-1 != type) {
2991 btv->c.type = type;
Joe Perches8af443e2011-08-21 19:56:48 -03002992 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2993 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002994 }
2995}
2996
2997static void flyvideo_gpio(struct bttv *btv)
2998{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002999 int gpio, has_remote, has_radio, is_capture_only;
3000 int is_lr90, has_tda9820_tda9821;
3001 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003002
3003 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003004 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003005 gpio = gpio_read();
3006 /* FIXME: must restore OUR_EN ??? */
3007
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003008 /* all cards provide GPIO info, some have an additional eeprom
3009 * LR50: GPIO coding can be found lower right CP1 .. CP9
3010 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
3011 * GPIO14-12: n.c.
3012 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003013
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003014 * lowest 3 bytes are remote control codes (no handshake needed)
3015 * xxxFFF: No remote control chip soldered
3016 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3017 * Note: Some bits are Audio_Mask !
3018 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003019 ttype = (gpio & 0x0f0000) >> 16;
3020 switch (ttype) {
3021 case 0x0:
3022 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003023 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003024 case 0x2:
3025 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003026 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003027 case 0x4:
3028 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003029 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003030 case 0x6:
3031 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003032 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003033 case 0xC:
3034 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003035 break;
3036 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003037 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003038 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003039 }
3040
3041 has_remote = gpio & 0x800000;
3042 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003043 /* unknown 0x200000;
3044 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003045 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003046 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003047 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3048 /*
3049 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003050
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003051 if (is_capture_only)
3052 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003053
Joe Perches8af443e2011-08-21 19:56:48 -03003054 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3055 btv->c.nr, has_radio ? "yes" : "no",
3056 has_remote ? "yes" : "no", tuner_type, gpio);
3057 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3058 btv->c.nr, is_lr90 ? "yes" : "no",
3059 has_tda9820_tda9821 ? "yes" : "no",
3060 is_capture_only ? "yes" : "no");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003061
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003062 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3063 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003064 btv->has_radio = has_radio;
3065
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003066 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3067 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3068 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003069 if (has_tda9820_tda9821)
3070 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003071 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003072}
3073
3074static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3075 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3076static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3077 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3078
3079static void miro_pinnacle_gpio(struct bttv *btv)
3080{
3081 int id,msp,gpio;
3082 char *info;
3083
3084 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003085 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003086 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003087 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003088 if (id < 32) {
3089 btv->tuner_type = miro_tunermap[id];
3090 if (0 == (gpio & 0x20)) {
3091 btv->has_radio = 1;
3092 if (!miro_fmtuner[id]) {
3093 btv->has_matchbox = 1;
3094 btv->mbox_we = (1<<6);
3095 btv->mbox_most = (1<<7);
3096 btv->mbox_clk = (1<<8);
3097 btv->mbox_data = (1<<9);
3098 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3099 }
3100 } else {
3101 btv->has_radio = 0;
3102 }
3103 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003104 if (btv->c.type == BTTV_BOARD_MIRO)
3105 btv->c.type = BTTV_BOARD_MIROPRO;
3106 if (btv->c.type == BTTV_BOARD_PINNACLE)
3107 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003108 }
Joe Perches8af443e2011-08-21 19:56:48 -03003109 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3110 btv->c.nr, id+1, btv->tuner_type,
3111 !btv->has_radio ? "no" :
3112 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3113 (-1 == msp) ? "no" : "yes");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003114 } else {
3115 /* new cards with microtune tuner */
3116 id = 63 - id;
3117 btv->has_radio = 0;
3118 switch (id) {
3119 case 1:
3120 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003121 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003122 break;
3123 case 2:
3124 info = "PAL+SECAM / stereo";
3125 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003126 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003127 break;
3128 case 3:
3129 info = "NTSC / stereo";
3130 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003131 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003132 break;
3133 case 4:
3134 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003135 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003136 break;
3137 case 5:
3138 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003139 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003140 break;
3141 case 6:
3142 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003143 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003144 break;
3145 case 7:
3146 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003147 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003148 break;
3149 default:
3150 info = "oops: unknown card";
3151 break;
3152 }
3153 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003154 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Joe Perches8af443e2011-08-21 19:56:48 -03003155 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3156 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003157 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003158 }
3159}
3160
3161/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3162#define LM1882_SYNC_DRIVE 0x200000L
3163
3164static void init_ids_eagle(struct bttv *btv)
3165{
3166 gpio_inout(0xffffff,0xFFFF37);
3167 gpio_write(0x200020);
3168
3169 /* flash strobe inverter ?! */
3170 gpio_write(0x200024);
3171
3172 /* switch sync drive off */
3173 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3174
3175 /* set BT848 muxel to 2 */
3176 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3177}
3178
3179/* Muxsel helper for the IDS Eagle.
3180 * the eagles does not use the standard muxsel-bits but
3181 * has its own multiplexer */
3182static void eagle_muxsel(struct bttv *btv, unsigned int input)
3183{
Trent Piepho430390e2009-01-28 21:32:59 -03003184 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003185
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003186 /* composite */
3187 /* set chroma ADC to sleep */
3188 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3189 /* set to composite video */
3190 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3191 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003192
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003193 /* switch sync drive off */
3194 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003195}
3196
3197static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3198{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003199 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003200 gpio_write(masks[input%4]);
3201}
3202
3203/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3204 alarms output
3205
3206 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3207 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3208
3209 IN - sensor inputs, INx - sensor inputs and TI XORed together
3210 O1,O2,O3 - alarm outputs (relays)
3211
3212 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3213
3214*/
3215
3216static void init_lmlbt4x(struct bttv *btv)
3217{
Joe Perches8af443e2011-08-21 19:56:48 -03003218 pr_debug("LMLBT4x init\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003219 btwrite(0x000000, BT848_GPIO_REG_INP);
3220 gpio_inout(0xffffff, 0x0006C0);
3221 gpio_write(0x000000);
3222}
3223
3224static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3225{
3226 unsigned int inmux = input % 8;
3227 gpio_inout( 0xf, 0xf );
3228 gpio_bits( 0xf, inmux );
3229}
3230
3231static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3232{
3233 unsigned int inmux = input % 4;
3234 gpio_inout( 3<<9, 3<<9 );
3235 gpio_bits( 3<<9, inmux<<9 );
3236}
3237
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003238static void geovision_muxsel(struct bttv *btv, unsigned int input)
3239{
3240 unsigned int inmux = input % 16;
3241 gpio_inout(0xf, 0xf);
3242 gpio_bits(0xf, inmux);
3243}
3244
Peter De Schrijverde2843b2011-11-06 10:15:47 -03003245/*
3246 * The TD3116 has 2 74HC4051 muxes wired to the MUX0 input of a bt878.
3247 * The first 74HC4051 has the lower 8 inputs, the second one the higher 8.
3248 * The muxes are controlled via a 74HC373 latch which is connected to
3249 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3250 * Q0 of the latch is connected to the Enable (~E) input of the first
3251 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3252 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3253 */
3254
3255static void td3116_latch_value(struct bttv *btv, u32 value)
3256{
3257 gpio_bits((1<<18) | 0xff, value);
3258 gpio_bits((1<<18) | 0xff, (1<<18) | value);
3259 udelay(1);
3260 gpio_bits((1<<18) | 0xff, value);
3261}
3262
3263static void td3116_muxsel(struct bttv *btv, unsigned int input)
3264{
3265 u32 value;
3266 u32 highbit;
3267
3268 highbit = (input & 0x8) >> 3 ;
3269
3270 /* Disable outputs and set value in the mux */
3271 value = 0x11; /* Disable outputs */
3272 value |= ((input & 0x7) << 1) << (4 * highbit);
3273 td3116_latch_value(btv, value);
3274
3275 /* Enable the correct output */
3276 value &= ~0x11;
3277 value |= ((highbit ^ 0x1) << 4) | highbit;
3278 td3116_latch_value(btv, value);
3279}
3280
Linus Torvalds1da177e2005-04-16 15:20:36 -07003281/* ----------------------------------------------------------------------- */
3282
3283static void bttv_reset_audio(struct bttv *btv)
3284{
3285 /*
3286 * BT878A has a audio-reset register.
3287 * 1. This register is an audio reset function but it is in
3288 * function-0 (video capture) address space.
3289 * 2. It is enough to do this once per power-up of the card.
3290 * 3. There is a typo in the Conexant doc -- it is not at
3291 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3292 * --//Shrikumar 030609
3293 */
3294 if (btv->id != 878)
3295 return;
3296
3297 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03003298 pr_debug("%d: BT878A ARESET\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003299 btwrite((1<<7), 0x058);
3300 udelay(10);
3301 btwrite( 0, 0x058);
3302}
3303
3304/* initialization part one -- before registering i2c bus */
3305void __devinit bttv_init_card1(struct bttv *btv)
3306{
3307 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003308 case BTTV_BOARD_HAUPPAUGE:
3309 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003310 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003311 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003312 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003313 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003314 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003315 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003316 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003317 boot_msp34xx(btv,11);
3318 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003319 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003320 pvr_boot(btv);
3321 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003322 case BTTV_BOARD_TWINHAN_DST:
3323 case BTTV_BOARD_AVDVBT_771:
3324 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003325 btv->use_i2c_hw = 1;
3326 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003327 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003328 init_RTV24( btv );
3329 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003330
Linus Torvalds1da177e2005-04-16 15:20:36 -07003331 }
3332 if (!bttv_tvcards[btv->c.type].has_dvb)
3333 bttv_reset_audio(btv);
3334}
3335
3336/* initialization part two -- after registering i2c bus */
3337void __devinit bttv_init_card2(struct bttv *btv)
3338{
Trent Piephoac7dc842007-06-28 17:51:08 -03003339 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003340
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003341 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003342 bttv_readee(btv,eeprom_data,0xa0);
3343 identify_by_eeprom(btv,eeprom_data);
3344 }
3345
3346 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003347 case BTTV_BOARD_MIRO:
3348 case BTTV_BOARD_MIROPRO:
3349 case BTTV_BOARD_PINNACLE:
3350 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003351 /* miro/pinnacle */
3352 miro_pinnacle_gpio(btv);
3353 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003354 case BTTV_BOARD_FLYVIDEO_98:
3355 case BTTV_BOARD_MAXI:
3356 case BTTV_BOARD_LIFE_FLYKIT:
3357 case BTTV_BOARD_FLYVIDEO:
3358 case BTTV_BOARD_TYPHOON_TVIEW:
3359 case BTTV_BOARD_CHRONOS_VS2:
3360 case BTTV_BOARD_FLYVIDEO_98FM:
3361 case BTTV_BOARD_FLYVIDEO2000:
3362 case BTTV_BOARD_FLYVIDEO98EZ:
3363 case BTTV_BOARD_CONFERENCETV:
3364 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003365 flyvideo_gpio(btv);
3366 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003367 case BTTV_BOARD_HAUPPAUGE:
3368 case BTTV_BOARD_HAUPPAUGE878:
3369 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003370 /* pick up some config infos from the eeprom */
3371 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003372 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003373 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003374 case BTTV_BOARD_AVERMEDIA98:
3375 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003376 bttv_readee(btv,eeprom_data,0xa0);
3377 avermedia_eeprom(btv);
3378 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003379 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003380 init_PXC200(btv);
3381 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003382 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003383 picolo_tetra_init(btv);
3384 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003385 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 btv->has_radio = 1;
3387 btv->has_matchbox = 1;
3388 btv->mbox_we = 0x20;
3389 btv->mbox_most = 0;
3390 btv->mbox_clk = 0x08;
3391 btv->mbox_data = 0x10;
3392 btv->mbox_mask = 0x38;
3393 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003394 case BTTV_BOARD_VOBIS_BOOSTAR:
3395 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003396 terratec_active_radio_upgrade(btv);
3397 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003398 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003399 if (btv->cardid == 0x3002144f) {
3400 btv->has_radio=1;
Joe Perches8af443e2011-08-21 19:56:48 -03003401 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3402 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003403 }
3404 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003405 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003406 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003407 /* Fix up entry for 3DFX VoodooTV 100,
3408 which is an OEM STB card variant. */
3409 btv->has_radio=0;
3410 btv->tuner_type=TUNER_TEMIC_NTSC;
3411 }
3412 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003413 case BTTV_BOARD_OSPREY1x0:
3414 case BTTV_BOARD_OSPREY1x0_848:
3415 case BTTV_BOARD_OSPREY101_848:
3416 case BTTV_BOARD_OSPREY1x1:
3417 case BTTV_BOARD_OSPREY1x1_SVID:
3418 case BTTV_BOARD_OSPREY2xx:
3419 case BTTV_BOARD_OSPREY2x0_SVID:
3420 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003421 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003422 case BTTV_BOARD_OSPREY500:
3423 case BTTV_BOARD_OSPREY540:
3424 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003425 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003426 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003428 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003429 init_ids_eagle(btv);
3430 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003431 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003432 bttv_readee(btv,eeprom_data,0xa0);
3433 modtec_eeprom(btv);
3434 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003435 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003436 init_lmlbt4x(btv);
3437 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003438 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003439 tibetCS16_init(btv);
3440 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003441 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003442 kodicom4400r_init(btv);
3443 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003444 case BTTV_BOARD_GEOVISION_GV800S:
3445 gv800s_init(btv);
3446 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003447 }
3448
3449 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003450 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003451 /* defaults from card list */
3452 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3453 btv->pll.pll_ifreq=28636363;
3454 btv->pll.pll_crystal=BT848_IFORM_XT0;
3455 }
3456 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3457 btv->pll.pll_ifreq=35468950;
3458 btv->pll.pll_crystal=BT848_IFORM_XT1;
3459 }
3460 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003461 switch (pll[btv->c.nr]) {
3462 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003463 btv->pll.pll_crystal = 0;
3464 btv->pll.pll_ifreq = 0;
3465 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003466 break;
3467 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003468 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003469 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003470 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003471 btv->pll.pll_crystal = BT848_IFORM_XT0;
3472 break;
3473 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003474 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003475 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003476 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003477 btv->pll.pll_crystal = BT848_IFORM_XT1;
3478 break;
3479 }
3480 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003481 btv->pll.pll_current = -1;
3482
Linus Torvalds1da177e2005-04-16 15:20:36 -07003483 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003484 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003485 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003486 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003487 if (UNSET != tuner[btv->c.nr])
3488 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003489
Trent Piephoabb03622009-01-28 21:32:59 -03003490 if (btv->tuner_type == TUNER_ABSENT)
Joe Perches8af443e2011-08-21 19:56:48 -03003491 pr_info("%d: tuner absent\n", btv->c.nr);
3492 else if (btv->tuner_type == UNSET)
3493 pr_warn("%d: tuner type unset\n", btv->c.nr);
Trent Piephoac7dc842007-06-28 17:51:08 -03003494 else
Joe Perches8af443e2011-08-21 19:56:48 -03003495 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003496
Hans Verkuil859f0272009-03-28 08:29:00 -03003497 if (autoload != UNSET) {
Joe Perches8af443e2011-08-21 19:56:48 -03003498 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr);
3499 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3500 btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003501 }
3502
Trent Piephoabb03622009-01-28 21:32:59 -03003503 if (UNSET == btv->tuner_type)
3504 btv->tuner_type = TUNER_ABSENT;
3505
Trent Piepho5221e212009-01-28 21:32:59 -03003506 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3507 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003508 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3509 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003510 if (svhs[btv->c.nr] != UNSET)
3511 btv->svhs = svhs[btv->c.nr];
3512 if (remote[btv->c.nr] != UNSET)
3513 btv->has_remote = remote[btv->c.nr];
3514
3515 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003516 btv->has_radio = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003517 if (bttv_tvcards[btv->c.type].has_remote)
Hans Verkuil2c905772009-07-20 08:14:17 -03003518 btv->has_remote = 1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003519 if (!bttv_tvcards[btv->c.type].no_gpioirq)
Hans Verkuil2c905772009-07-20 08:14:17 -03003520 btv->gpioirq = 1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003521 if (bttv_tvcards[btv->c.type].volume_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003522 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003523 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003524 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003525
Trent Piephoabb03622009-01-28 21:32:59 -03003526 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003527 return; /* no tuner or related drivers to load */
3528
Hans Verkuil859f0272009-03-28 08:29:00 -03003529 if (btv->has_saa6588 || saa6588[btv->c.nr]) {
3530 /* Probe for RDS receiver chip */
3531 static const unsigned short addrs[] = {
3532 0x20 >> 1,
3533 0x22 >> 1,
3534 I2C_CLIENT_END
3535 };
3536 struct v4l2_subdev *sd;
3537
Hans Verkuil53dacb12009-08-10 02:49:08 -03003538 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003539 &btv->c.i2c_adap, "saa6588", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003540 btv->has_saa6588 = (sd != NULL);
3541 }
3542
Linus Torvalds1da177e2005-04-16 15:20:36 -07003543 /* try to detect audio/fader chips */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003544
Hans Verkuil859f0272009-03-28 08:29:00 -03003545 /* First check if the user specified the audio chip via a module
3546 option. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003547
Hans Verkuil859f0272009-03-28 08:29:00 -03003548 switch (audiodev[btv->c.nr]) {
3549 case -1:
3550 return; /* do not load any audio module */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003551
Hans Verkuil859f0272009-03-28 08:29:00 -03003552 case 0: /* autodetect */
3553 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003554
Hans Verkuil859f0272009-03-28 08:29:00 -03003555 case 1: {
3556 /* The user specified that we should probe for msp3400 */
3557 static const unsigned short addrs[] = {
3558 I2C_ADDR_MSP3400 >> 1,
3559 I2C_ADDR_MSP3400_ALT >> 1,
3560 I2C_CLIENT_END
3561 };
3562
Hans Verkuil53dacb12009-08-10 02:49:08 -03003563 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003564 &btv->c.i2c_adap, "msp3400", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003565 if (btv->sd_msp34xx)
3566 return;
3567 goto no_audio;
3568 }
3569
3570 case 2: {
3571 /* The user specified that we should probe for tda7432 */
3572 static const unsigned short addrs[] = {
3573 I2C_ADDR_TDA7432 >> 1,
3574 I2C_CLIENT_END
3575 };
3576
Hans Verkuil53dacb12009-08-10 02:49:08 -03003577 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003578 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003579 return;
3580 goto no_audio;
3581 }
3582
3583 case 3: {
3584 /* The user specified that we should probe for tvaudio */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003585 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003586 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003587 if (btv->sd_tvaudio)
3588 return;
3589 goto no_audio;
3590 }
3591
3592 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003593 pr_warn("%d: unknown audiodev value!\n", btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003594 return;
3595 }
3596
3597 /* There were no overrides, so now we try to discover this through the
3598 card definition */
3599
3600 /* probe for msp3400 first: this driver can detect whether or not
3601 it really is a msp3400, so it will return NULL when the device
3602 found is really something else (e.g. a tea6300). */
3603 if (!bttv_tvcards[btv->c.type].no_msp34xx) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003604 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003605 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003606 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003607 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003608 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003609 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003610 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003611 }
3612
3613 /* If we found a msp34xx, then we're done. */
3614 if (btv->sd_msp34xx)
3615 return;
3616
3617 /* it might also be a tda7432. */
3618 if (!bttv_tvcards[btv->c.type].no_tda7432) {
3619 static const unsigned short addrs[] = {
3620 I2C_ADDR_TDA7432 >> 1,
3621 I2C_CLIENT_END
3622 };
3623
Hans Verkuil53dacb12009-08-10 02:49:08 -03003624 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003625 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003626 return;
3627 }
3628
3629 /* Now see if we can find one of the tvaudio devices. */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003630 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003631 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003632 if (btv->sd_tvaudio)
3633 return;
3634
3635no_audio:
Joe Perches8af443e2011-08-21 19:56:48 -03003636 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003637}
3638
3639
Hans Verkuil2c905772009-07-20 08:14:17 -03003640/* initialize the tuner */
3641void __devinit bttv_init_tuner(struct bttv *btv)
3642{
3643 int addr = ADDR_UNSET;
3644
3645 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3646 addr = bttv_tvcards[btv->c.type].tuner_addr;
3647
3648 if (btv->tuner_type != TUNER_ABSENT) {
3649 struct tuner_setup tun_setup;
3650
3651 /* Load tuner module before issuing tuner config call! */
3652 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003653 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003654 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003655 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3656 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003657 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003658 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3659 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003660 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003661 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
Hans Verkuil2c905772009-07-20 08:14:17 -03003662
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003663 tun_setup.mode_mask = T_ANALOG_TV;
Hans Verkuil2c905772009-07-20 08:14:17 -03003664 tun_setup.type = btv->tuner_type;
3665 tun_setup.addr = addr;
3666
3667 if (bttv_tvcards[btv->c.type].has_radio)
3668 tun_setup.mode_mask |= T_RADIO;
3669
3670 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3671 }
3672
3673 if (btv->tda9887_conf) {
3674 struct v4l2_priv_tun_config tda9887_cfg;
3675
3676 tda9887_cfg.tuner = TUNER_TDA9887;
3677 tda9887_cfg.priv = &btv->tda9887_conf;
3678
3679 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3680 }
3681}
3682
Linus Torvalds1da177e2005-04-16 15:20:36 -07003683/* ----------------------------------------------------------------------- */
3684
3685static void modtec_eeprom(struct bttv *btv)
3686{
3687 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3688 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003689 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3690 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003691 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3692 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003693 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3694 btv->c.nr, &eeprom_data[0x1e]);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003695 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3696 btv->tuner_type=TUNER_PHILIPS_NTSC;
Joe Perches8af443e2011-08-21 19:56:48 -03003697 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3698 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003699 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003700 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3701 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003702 }
3703}
3704
3705static void __devinit hauppauge_eeprom(struct bttv *btv)
3706{
3707 struct tveeprom tv;
3708
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003709 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003710 btv->tuner_type = tv.tuner_type;
3711 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003712
Joe Perches8af443e2011-08-21 19:56:48 -03003713 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003714 btv->c.nr, tv.model);
3715
3716 /*
3717 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3718 * type based on model #.
3719 */
3720 if(tv.model == 64900) {
Joe Perches8af443e2011-08-21 19:56:48 -03003721 pr_info("%d: Switching board type from %s to %s\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003722 btv->c.nr,
3723 bttv_tvcards[btv->c.type].name,
3724 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3725 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3726 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003727}
3728
3729static int terratec_active_radio_upgrade(struct bttv *btv)
3730{
3731 int freq;
3732
3733 btv->has_radio = 1;
3734 btv->has_matchbox = 1;
3735 btv->mbox_we = 0x10;
3736 btv->mbox_most = 0x20;
3737 btv->mbox_clk = 0x08;
3738 btv->mbox_data = 0x04;
3739 btv->mbox_mask = 0x3c;
3740
3741 btv->mbox_iow = 1 << 8;
3742 btv->mbox_ior = 1 << 9;
3743 btv->mbox_csel = 1 << 10;
3744
3745 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003746 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003747 if (0x1ed8 == tea5757_read(btv)) {
Joe Perches8af443e2011-08-21 19:56:48 -03003748 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003749 btv->has_radio = 1;
Hans Verkuil859f0272009-03-28 08:29:00 -03003750 btv->has_saa6588 = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003751 btv->has_matchbox = 1;
3752 } else {
3753 btv->has_radio = 0;
3754 btv->has_matchbox = 0;
3755 }
3756 return 0;
3757}
3758
3759
3760/* ----------------------------------------------------------------------- */
3761
3762/*
3763 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3764 *
3765 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3766 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3767 * unpacked with unzip).
3768 */
3769#define PVR_GPIO_DELAY 10
3770
3771#define BTTV_ALT_DATA 0x000001
3772#define BTTV_ALT_DCLK 0x100000
3773#define BTTV_ALT_NCONFIG 0x800000
3774
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003775static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3776 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003777{
3778 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003779 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003780 int i;
3781
3782 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3783 gpio_write(0);
3784 udelay(PVR_GPIO_DELAY);
3785
3786 gpio_write(BTTV_ALT_NCONFIG);
3787 udelay(PVR_GPIO_DELAY);
3788
3789 for (n = 0; n < microlen; n++) {
3790 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003791 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003792 gpio_bits(BTTV_ALT_DCLK,0);
3793 if (bits & 0x01)
3794 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3795 else
3796 gpio_bits(BTTV_ALT_DATA,0);
3797 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3798 bits >>= 1;
3799 }
3800 }
3801 gpio_bits(BTTV_ALT_DCLK,0);
3802 udelay(PVR_GPIO_DELAY);
3803
3804 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3805 for (i = 0 ; i < 30 ; i++) {
3806 gpio_bits(BTTV_ALT_DCLK,0);
3807 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3808 }
3809 gpio_bits(BTTV_ALT_DCLK,0);
3810 return 0;
3811}
3812
3813static int __devinit pvr_boot(struct bttv *btv)
3814{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003815 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003816 int rc;
3817
3818 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3819 if (rc != 0) {
Joe Perches8af443e2011-08-21 19:56:48 -03003820 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003821 return rc;
3822 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003823 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
Joe Perches8af443e2011-08-21 19:56:48 -03003824 pr_info("%d: altera firmware upload %s\n",
3825 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003826 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003827 return rc;
3828}
3829
3830/* ----------------------------------------------------------------------- */
3831/* some osprey specific stuff */
3832
Trent Piephocf784d52007-07-21 21:26:40 -03003833static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003834{
Trent Piephocf784d52007-07-21 21:26:40 -03003835 int i;
3836 u32 serial = 0;
3837 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003838
Trent Piephocf784d52007-07-21 21:26:40 -03003839 /* This code will nevery actually get called in this case.... */
3840 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3841 /* this might be an antique... check for MMAC label in eeprom */
3842 if (!strncmp(ee, "MMAC", 4)) {
3843 u8 checksum = 0;
3844 for (i = 0; i < 21; i++)
3845 checksum += ee[i];
3846 if (checksum != ee[21])
3847 return;
3848 cardid = BTTV_BOARD_OSPREY1x0_848;
3849 for (i = 12; i < 21; i++)
3850 serial *= 10, serial += ee[i] - '0';
3851 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003852 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003853 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003854
Trent Piephocf784d52007-07-21 21:26:40 -03003855 for (i = 4*16; i < 8*16; i += 16) {
3856 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003857
Trent Piephocf784d52007-07-21 21:26:40 -03003858 if ((checksum&0xff) + (checksum>>8) == 0xff)
3859 break;
3860 }
3861 if (i >= 8*16)
3862 return;
3863 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003864
Trent Piephocf784d52007-07-21 21:26:40 -03003865 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003866 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003867
Trent Piephocf784d52007-07-21 21:26:40 -03003868 switch(type) {
3869 /* 848 based */
3870 case 0x0004:
3871 cardid = BTTV_BOARD_OSPREY1x0_848;
3872 break;
3873 case 0x0005:
3874 cardid = BTTV_BOARD_OSPREY101_848;
3875 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003876
Trent Piephocf784d52007-07-21 21:26:40 -03003877 /* 878 based */
3878 case 0x0012:
3879 case 0x0013:
3880 cardid = BTTV_BOARD_OSPREY1x0;
3881 break;
3882 case 0x0014:
3883 case 0x0015:
3884 cardid = BTTV_BOARD_OSPREY1x1;
3885 break;
3886 case 0x0016:
3887 case 0x0017:
3888 case 0x0020:
3889 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3890 break;
3891 case 0x0018:
3892 case 0x0019:
3893 case 0x001E:
3894 case 0x001F:
3895 cardid = BTTV_BOARD_OSPREY2xx;
3896 break;
3897 case 0x001A:
3898 case 0x001B:
3899 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3900 break;
3901 case 0x0040:
3902 cardid = BTTV_BOARD_OSPREY500;
3903 break;
3904 case 0x0050:
3905 case 0x0056:
3906 cardid = BTTV_BOARD_OSPREY540;
3907 /* bttv_osprey_540_init(btv); */
3908 break;
3909 case 0x0060:
3910 case 0x0070:
3911 case 0x00A0:
3912 cardid = BTTV_BOARD_OSPREY2x0;
3913 /* enable output on select control lines */
3914 gpio_inout(0xffffff,0x000303);
3915 break;
3916 case 0x00D8:
3917 cardid = BTTV_BOARD_OSPREY440;
3918 break;
3919 default:
3920 /* unknown...leave generic, but get serial # */
Joe Perches8af443e2011-08-21 19:56:48 -03003921 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
3922 btv->c.nr, type);
Trent Piephocf784d52007-07-21 21:26:40 -03003923 break;
3924 }
Al Viroc1c36f32008-05-21 00:32:21 -03003925 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003926 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003927
Joe Perches8af443e2011-08-21 19:56:48 -03003928 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
3929 btv->c.nr, cardid,
3930 cardid > 0 ? bttv_tvcards[cardid].name : "Unknown", serial);
Trent Piephocf784d52007-07-21 21:26:40 -03003931
3932 if (cardid<0 || btv->c.type == cardid)
3933 return;
3934
3935 /* card type isn't set correctly */
3936 if (card[btv->c.nr] < bttv_num_tvcards) {
Joe Perches8af443e2011-08-21 19:56:48 -03003937 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
3938 btv->c.nr);
Trent Piephocf784d52007-07-21 21:26:40 -03003939 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003940 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
3941 btv->c.nr, btv->c.type, cardid);
Trent Piephocf784d52007-07-21 21:26:40 -03003942 btv->c.type = cardid;
3943 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003944}
3945
3946/* ----------------------------------------------------------------------- */
3947/* AVermedia specific stuff, from bktr_card.c */
3948
3949static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003950 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3951 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3952 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3953 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3954 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003955 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003956
3957static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003958 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003959 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3960 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003961 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3962 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003963
3964static void __devinit avermedia_eeprom(struct bttv *btv)
3965{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003966 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003967
3968 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003969 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3970 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003971 btv->has_remote = (eeprom_data[0x42] & 0x01);
3972
3973 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003974 if (tuner_format <= 0x0a)
3975 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003976 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003977 if (tuner_format <= 9)
3978 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003979
3980 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003981 if (tuner_format == 0x09)
3982 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003983
Joe Perches8af443e2011-08-21 19:56:48 -03003984 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003985 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3986 if (tuner_type) {
3987 btv->tuner_type = tuner_type;
Joe Perches8af443e2011-08-21 19:56:48 -03003988 pr_cont("%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003989 } else
Joe Perches8af443e2011-08-21 19:56:48 -03003990 pr_cont("Unknown type");
3991 pr_cont(" radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003992 tuner_tv_fm ? "yes" : "no",
3993 btv->has_remote ? "yes" : "no");
3994}
3995
Trent Piepho72134a62009-01-28 21:32:59 -03003996/*
3997 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3998 * analog demod, which is not I2C controlled like the newer and more common
3999 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
4000 * that control the IF for the video and audio. Apparently, bttv GPIO
4001 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
4002 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
4003 */
4004u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004005{
Trent Piepho72134a62009-01-28 21:32:59 -03004006
4007 if (btv->audio == TVAUDIO_INPUT_TUNER) {
4008 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
4009 gpiobits |= 0x10000;
4010 else
4011 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004012 }
Trent Piepho72134a62009-01-28 21:32:59 -03004013
4014 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
4015 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004016}
4017
4018
4019/*
4020 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08004021 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07004022 *
4023 * Hauppauge: pin 5
4024 * Voodoo: pin 20
4025 */
4026static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4027{
4028 int mask = (1 << pin);
4029
4030 gpio_inout(mask,mask);
4031 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03004032 mdelay(2);
4033 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004034 gpio_bits(mask,mask);
4035
4036 if (bttv_gpio)
4037 bttv_gpio_tracking(btv,"msp34xx");
4038 if (bttv_verbose)
Joe Perches8af443e2011-08-21 19:56:48 -03004039 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
4040 btv->c.nr, pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004041}
4042
Linus Torvalds1da177e2005-04-16 15:20:36 -07004043/* ----------------------------------------------------------------------- */
4044/* Imagenation L-Model PXC200 Framegrabber */
4045/* This is basically the same procedure as
4046 * used by Alessandro Rubini in his pxc200
4047 * driver, but using BTTV functions */
4048
4049static void __devinit init_PXC200(struct bttv *btv)
4050{
4051 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4052 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4053 0x00 };
4054 unsigned int i;
4055 int tmp;
4056 u32 val;
4057
4058 /* Initialise GPIO-connevted stuff */
4059 gpio_inout(0xffffff, (1<<13));
4060 gpio_write(0);
4061 udelay(3);
4062 gpio_write(1<<13);
4063 /* GPIO inputs are pulled up, so no need to drive
4064 * reset pin any longer */
4065 gpio_bits(0xffffff, 0);
4066 if (bttv_gpio)
4067 bttv_gpio_tracking(btv,"pxc200");
4068
4069 /* we could/should try and reset/control the AD pots? but
4070 right now we simply turned off the crushing. Without
4071 this the AGC drifts drifts
4072 remember the EN is reverse logic -->
4073 setting BT848_ADC_AGC_EN disable the AGC
4074 tboult@eecs.lehigh.edu
4075 */
4076
4077 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4078
4079 /* Initialise MAX517 DAC */
Joe Perches8af443e2011-08-21 19:56:48 -03004080 pr_info("Setting DAC reference voltage level ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004081 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4082
4083 /* Initialise 12C508 PIC */
4084 /* The I2CWrite and I2CRead commmands are actually to the
4085 * same chips - but the R/W bit is included in the address
4086 * argument so the numbers are different */
4087
4088
Joe Perches8af443e2011-08-21 19:56:48 -03004089 pr_info("Initialising 12C508 PIC chip ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004090
4091 /* First of all, enable the clock line. This is used in the PXC200-F */
4092 val = btread(BT848_GPIO_DMA_CTL);
4093 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4094 btwrite(val, BT848_GPIO_DMA_CTL);
4095
4096 /* Then, push to 0 the reset pin long enough to reset the *
4097 * device same as above for the reset line, but not the same
4098 * value sent to the GPIO-connected stuff
4099 * which one is the good one? */
4100 gpio_inout(0xffffff,(1<<2));
4101 gpio_write(0);
4102 udelay(10);
4103 gpio_write(1<<2);
4104
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004105 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004106 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4107 if (tmp != -1) {
Joe Perches8af443e2011-08-21 19:56:48 -03004108 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004109 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4110 }
4111 }
4112
Joe Perches8af443e2011-08-21 19:56:48 -03004113 pr_info("PXC200 Initialised\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004114}
4115
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004116
4117
Peter Skipworth93b43f12005-06-23 22:04:45 -07004118/* ----------------------------------------------------------------------- */
4119/*
4120 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4121 * it. This apparently involves the following procedure for each 878 chip:
4122 *
4123 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4124 *
4125 * 2) write to GPIO_DATA
4126 * - 0x0E
4127 * - sleep 1ms
4128 * - 0x10 + 0x0E
4129 * - sleep 10ms
4130 * - 0x0E
4131 * read from GPIO_DATA into buf (uint_32)
4132 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4133 * error. ERROR_CPLD_Check_Failed stop.
4134 *
4135 * 3) write to GPIO_DATA
4136 * - write 0x4400 + 0x0E
4137 * - sleep 10ms
4138 * - write 0x4410 + 0x0E
4139 * - sleep 1ms
4140 * - write 0x0E
4141 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004142 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004143 * error. ERROR_CPLD_Check_Failed.
4144 */
4145/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004146static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004147init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004148{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004149 uint32_t dataRead = 0;
4150 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004151
Joe Perches8af443e2011-08-21 19:56:48 -03004152 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004153 btv->c.nr);
4154
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004155 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004156
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004157 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4158 msleep (1);
4159 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4160 msleep (10);
4161 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004162
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004163 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004164
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004165 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004166 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004167 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004168 }
4169
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004170 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4171 msleep (10);
4172 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4173 msleep (1);
4174 btwrite (watchdog_value, BT848_GPIO_DATA);
4175 msleep (1);
4176 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004177
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004178 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004179 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004180 btv->c.nr, dataRead);
4181
Peter Skipworth93b43f12005-06-23 22:04:45 -07004182 return;
4183 }
4184
Joe Perches8af443e2011-08-21 19:56:48 -03004185 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004186}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004187
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004188
4189
Linus Torvalds1da177e2005-04-16 15:20:36 -07004190/* ----------------------------------------------------------------------- */
4191/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4192/*
4193 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4194 * This code is placed under the terms of the GNU General Public License
4195 *
4196 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4197 */
4198
4199static void bus_low(struct bttv *btv, int bit)
4200{
4201 if (btv->mbox_ior) {
4202 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4203 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4204 udelay(5);
4205 }
4206
4207 gpio_bits(bit,0);
4208 udelay(5);
4209
4210 if (btv->mbox_ior) {
4211 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4212 udelay(5);
4213 }
4214}
4215
4216static void bus_high(struct bttv *btv, int bit)
4217{
4218 if (btv->mbox_ior) {
4219 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4220 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4221 udelay(5);
4222 }
4223
4224 gpio_bits(bit,bit);
4225 udelay(5);
4226
4227 if (btv->mbox_ior) {
4228 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4229 udelay(5);
4230 }
4231}
4232
4233static int bus_in(struct bttv *btv, int bit)
4234{
4235 if (btv->mbox_ior) {
4236 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4237 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4238 udelay(5);
4239
4240 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4241 udelay(5);
4242 }
4243 return gpio_read() & (bit);
4244}
4245
4246/* TEA5757 register bits */
4247#define TEA_FREQ 0:14
4248#define TEA_BUFFER 15:15
4249
4250#define TEA_SIGNAL_STRENGTH 16:17
4251
4252#define TEA_PORT1 18:18
4253#define TEA_PORT0 19:19
4254
4255#define TEA_BAND 20:21
4256#define TEA_BAND_FM 0
4257#define TEA_BAND_MW 1
4258#define TEA_BAND_LW 2
4259#define TEA_BAND_SW 3
4260
4261#define TEA_MONO 22:22
4262#define TEA_ALLOW_STEREO 0
4263#define TEA_FORCE_MONO 1
4264
4265#define TEA_SEARCH_DIRECTION 23:23
4266#define TEA_SEARCH_DOWN 0
4267#define TEA_SEARCH_UP 1
4268
4269#define TEA_STATUS 24:24
4270#define TEA_STATUS_TUNED 0
4271#define TEA_STATUS_SEARCHING 1
4272
4273/* Low-level stuff */
4274static int tea5757_read(struct bttv *btv)
4275{
4276 unsigned long timeout;
4277 int value = 0;
4278 int i;
4279
4280 /* better safe than sorry */
4281 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4282
4283 if (btv->mbox_ior) {
4284 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4285 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4286 udelay(5);
4287 }
4288
4289 if (bttv_gpio)
4290 bttv_gpio_tracking(btv,"tea5757 read");
4291
4292 bus_low(btv,btv->mbox_we);
4293 bus_low(btv,btv->mbox_clk);
4294
4295 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004296 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004297
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004298 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004299 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4300 schedule();
4301 if (bus_in(btv,btv->mbox_data)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004302 pr_warn("%d: tea5757: read timeout\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004303 return -1;
4304 }
4305
Joe Perches8af443e2011-08-21 19:56:48 -03004306 dprintk("%d: tea5757:", btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004307 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004308 udelay(5);
4309 bus_high(btv,btv->mbox_clk);
4310 udelay(5);
Joe Perches8af443e2011-08-21 19:56:48 -03004311 dprintk_cont("%c",
4312 bus_in(btv, btv->mbox_most) == 0 ? 'T' : '-');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004313 bus_low(btv,btv->mbox_clk);
4314 value <<= 1;
4315 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
Joe Perches8af443e2011-08-21 19:56:48 -03004316 dprintk_cont("%c",
4317 bus_in(btv, btv->mbox_most) == 0 ? 'S' : 'M');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004318 }
Joe Perches8af443e2011-08-21 19:56:48 -03004319 dprintk_cont("\n");
4320 dprintk("%d: tea5757: read 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004321 return value;
4322}
4323
4324static int tea5757_write(struct bttv *btv, int value)
4325{
4326 int i;
4327 int reg = value;
4328
4329 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4330
4331 if (btv->mbox_ior) {
4332 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4333 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4334 udelay(5);
4335 }
4336 if (bttv_gpio)
4337 bttv_gpio_tracking(btv,"tea5757 write");
4338
Joe Perches8af443e2011-08-21 19:56:48 -03004339 dprintk("%d: tea5757: write 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004340 bus_low(btv,btv->mbox_clk);
4341 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004342 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004343 if (reg & 0x1000000)
4344 bus_high(btv,btv->mbox_data);
4345 else
4346 bus_low(btv,btv->mbox_data);
4347 reg <<= 1;
4348 bus_high(btv,btv->mbox_clk);
4349 udelay(10);
4350 bus_low(btv,btv->mbox_clk);
4351 udelay(10);
4352 }
4353 bus_low(btv,btv->mbox_we); /* unmute !!! */
4354 return 0;
4355}
4356
4357void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4358{
4359 dprintk("tea5757_set_freq %d\n",freq);
4360 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004361}
4362
Linus Torvalds1da177e2005-04-16 15:20:36 -07004363/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4364 *
4365 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4366 * switch instead (CD22M3494E). This IC can have multiple active connections
4367 * between Xn (input) and Yn (output) pins. We need to clear any existing
4368 * connection prior to establish a new one, pulsing the STROBE pin.
4369 *
4370 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4371 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004372 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4373 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4374 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4375 * GPIO[8] - - P3[5] (microcontroller)
4376 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4377 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4378 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004379 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004380 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4381 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004382 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004383 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004384 * note: the vendor refused to give any information on this product, all
4385 * that stuff was found using a multimeter! :)
4386 */
4387static void rv605_muxsel(struct bttv *btv, unsigned int input)
4388{
Trent Piepho13afaef2009-01-28 21:32:59 -03004389 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4390 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4391
4392 gpio_bits(0x07f, muxgpio[input]);
4393
Linus Torvalds1da177e2005-04-16 15:20:36 -07004394 /* reset all conections */
4395 gpio_bits(0x200,0x200);
4396 mdelay(1);
4397 gpio_bits(0x200,0x000);
4398 mdelay(1);
4399
Joe Perchesc84e6032008-02-03 17:18:59 +02004400 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004401 gpio_bits(0x480,0x480);
4402 mdelay(1);
4403 gpio_bits(0x480,0x080);
4404 mdelay(1);
4405}
4406
4407/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4408 *
4409 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004410 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
Linus Torvalds1da177e2005-04-16 15:20:36 -07004411 * chips, ten eight input analog multiplexors, a not chip and a few
4412 * other components.
4413 *
4414 * 16 inputs on a secondary bracket are provided and can be selected
4415 * from each of the four capture chips. Two of the eight input
4416 * multiplexors are used to select from any of the 16 input signals.
4417 *
4418 * Unsupported hardware capabilities:
4419 * . A video output monitor on the secondary bracket can be selected from
4420 * one of the 878A chips.
4421 * . Another passthrough but I haven't spent any time investigating it.
4422 * . Digital I/O (logic level connected to GPIO) is available from an
4423 * onboard header.
4424 *
4425 * The on chip input mux should always be set to 2.
4426 * GPIO[16:19] - Video input selection
4427 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4428 * GPIO[?:?] - Digital I/O.
4429 *
4430 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4431 * determined what function (if any) it provides. With the microcontroller
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004432 * and sync separator chips a guess is that it might have to do with video
Linus Torvalds1da177e2005-04-16 15:20:36 -07004433 * switching and maybe some digital I/O.
4434 */
4435static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4436{
4437 /* video mux */
4438 gpio_bits(0x0f0000, input << 16);
4439}
4440
4441static void tibetCS16_init(struct bttv *btv)
4442{
4443 /* enable gpio bits, mask obtained via btSpy */
4444 gpio_inout(0xffffff, 0x0f7fff);
4445 gpio_write(0x0f7fff);
4446}
4447
4448/*
4449 * The following routines for the Kodicom-4400r get a little mind-twisting.
4450 * There is a "master" controller and three "slave" controllers, together
4451 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4452 * The analog switch is controlled by the "master", but the detection order
4453 * of the four BT878A chips is in an order which I just don't understand.
4454 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004455 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004456 * those numbers are different from the detection sequence. When working
4457 * with the analog switch, we need to "map" from the detection sequence
4458 * over to the board's logical controller number. This mapping sequence
4459 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4460 * unit 3, the second (which is the master) is logical unit 0, etc.
4461 * We need to maintain the status of the analog switch (which of the 16
4462 * cameras is connected to which of the 4 controllers). Rather than
4463 * add to the bttv structure for this, we use the data reserved for
4464 * the mbox (unused for this card type).
4465 */
4466
4467/*
4468 * First a routine to set the analog switch, which controls which camera
4469 * is routed to which controller. The switch comprises an X-address
4470 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4471 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4472 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4473 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4474 * specified address. The idea is to set the address and data, then bring
4475 * STROBE high, and finally bring STROBE back to low.
4476 */
4477static void kodicom4400r_write(struct bttv *btv,
4478 unsigned char xaddr,
4479 unsigned char yaddr,
4480 unsigned char data) {
4481 unsigned int udata;
4482
4483 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4484 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4485 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4486 gpio_bits(0x1ff, udata); /* strobe low */
4487}
4488
4489/*
4490 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4491 * use this routine. The routine finds the "master" for the card, maps
4492 * the controller number from the detected position over to the logical
4493 * number, writes the appropriate data to the analog switch, and housekeeps
4494 * the local copy of the switch information. The parameter 'input' is the
4495 * requested camera number (0 - 15).
4496 */
4497static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4498{
4499 char *sw_status;
4500 int xaddr, yaddr;
4501 struct bttv *mctlr;
4502 static unsigned char map[4] = {3, 0, 2, 1};
4503
4504 mctlr = master[btv->c.nr];
4505 if (mctlr == NULL) { /* ignore if master not yet detected */
4506 return;
4507 }
4508 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4509 yaddr = map[yaddr];
4510 sw_status = (char *)(&mctlr->mbox_we);
4511 xaddr = input & 0xf;
4512 /* Check if the controller/camera pair has changed, else ignore */
4513 if (sw_status[yaddr] != xaddr)
4514 {
4515 /* "open" the old switch, "close" the new one, save the new */
4516 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4517 sw_status[yaddr] = xaddr;
4518 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4519 }
4520}
4521
4522/*
4523 * During initialisation, we need to reset the analog switch. We
4524 * also preset the switch to map the 4 connectors on the card to the
4525 * *user's* (see above description of kodicom4400r_muxsel) channels
4526 * 0 through 3
4527 */
4528static void kodicom4400r_init(struct bttv *btv)
4529{
4530 char *sw_status = (char *)(&btv->mbox_we);
4531 int ix;
4532
4533 gpio_inout(0x0003ff, 0x0003ff);
4534 gpio_write(1 << 9); /* reset MUX */
4535 gpio_write(0);
4536 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004537 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004538 sw_status[ix] = ix;
4539 kodicom4400r_write(btv, ix, ix, 1);
4540 }
4541 /*
4542 * Since this is the "master", we need to set up the
4543 * other three controller chips' pointers to this structure
4544 * for later use in the muxsel routine.
4545 */
4546 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4547 return;
4548 master[btv->c.nr-1] = btv;
4549 master[btv->c.nr] = btv;
4550 master[btv->c.nr+1] = btv;
4551 master[btv->c.nr+2] = btv;
4552}
4553
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004554/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4555 * video multiplexers to provide up to 16 video inputs. These
4556 * multiplexers are controlled by the lower 8 GPIO pins of the
4557 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004558
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004559 * xxx0 is pin xxx of multiplexer U5,
4560 * yyy1 is pin yyy of multiplexer U2
4561 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004562#define ENA0 0x01
4563#define ENB0 0x02
4564#define ENA1 0x04
4565#define ENB1 0x08
4566
4567#define IN10 0x10
4568#define IN00 0x20
4569#define IN11 0x40
4570#define IN01 0x80
4571
4572static void xguard_muxsel(struct bttv *btv, unsigned int input)
4573{
4574 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004575 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4576 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4577 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4578 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004579 };
4580 gpio_write(masks[input%16]);
4581}
4582static void picolo_tetra_init(struct bttv *btv)
4583{
4584 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4585 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4586 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4587}
4588static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4589{
4590
Joe Perches8af443e2011-08-21 19:56:48 -03004591 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004592 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4593 /*GPIO[20]&GPIO[21] used to choose the right input*/
4594 btwrite (input<<20,BT848_GPIO_DATA);
4595
4596}
4597
4598/*
4599 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4600 *
4601 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4602 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004603 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004604 * optional "Monitor Out" bus. This allows the card to be looking
4605 * at one input while the monitor is looking at another.
4606 *
4607 * Since I've couldn't be bothered figuring out how to add an
Lucas De Marchi25985ed2011-03-30 22:57:33 -03004608 * independent muxsel for the monitor bus, I've just set it to
Linus Torvalds1da177e2005-04-16 15:20:36 -07004609 * whatever the card is looking at.
4610 *
4611 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4612 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4613 *
4614 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4615 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4616 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4617 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4618 *
4619 */
4620
4621/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4622#define I2C_TDA8540 0x90
4623#define I2C_TDA8540_ALT1 0x92
4624#define I2C_TDA8540_ALT2 0x94
4625#define I2C_TDA8540_ALT3 0x96
4626#define I2C_TDA8540_ALT4 0x98
4627#define I2C_TDA8540_ALT5 0x9a
4628#define I2C_TDA8540_ALT6 0x9c
4629
4630static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4631{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004632 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004633 int key = input % 4;
4634 int matrix = input / 4;
4635
Joe Perches8af443e2011-08-21 19:56:48 -03004636 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004637 btv->c.nr, input, matrix, key);
4638
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004639 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004640 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4641 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4642 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4643 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4644 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4645 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4646 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4647 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4648
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004649 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004650 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004651 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004652 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004653 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004654 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004655 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004656 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004657 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004658
Trent Piephofb5deb12009-01-28 21:32:59 -03004659 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004660}
4661
4662
4663/* PXC200 muxsel helper
4664 * luke@syseng.anu.edu.au
4665 * another transplant
4666 * from Alessandro Rubini (rubini@linux.it)
4667 *
4668 * There are 4 kinds of cards:
4669 * PXC200L which is bt848
4670 * PXC200F which is bt848 with PIC controlling mux
4671 * PXC200AL which is bt878
4672 * PXC200AF which is bt878 with PIC controlling mux
4673 */
4674#define PX_CFG_PXC200F 0x01
4675#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4676#define PX_I2C_PIC 0x0f
4677#define PX_PXC200A_CARDID 0x200a1295
4678#define PX_I2C_CMD_CFG 0x00
4679
4680static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4681{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004682 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004683 long mux;
4684 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004685 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004686
4687 /* Read PIC config to determine if this is a PXC200F */
4688 /* PX_I2C_CMD_CFG*/
4689 buf[0]=0;
4690 buf[1]=0;
4691 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4692 if (rc) {
Joe Perches8af443e2011-08-21 19:56:48 -03004693 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4694 btv->c.nr, rc);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004695 /* not PXC ? do nothing */
Joe Perches8af443e2011-08-21 19:56:48 -03004696 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004697 }
4698
4699 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4700 if (!(rc & PX_CFG_PXC200F)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004701 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4702 btv->c.nr, rc);
4703 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004704 }
4705
4706
4707 /* The multiplexer in the 200F is handled by the GPIO port */
4708 /* get correct mapping between inputs */
4709 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4710 /* ** not needed!? */
4711 mux = input;
4712
4713 /* make sure output pins are enabled */
4714 /* bitmask=0x30f; */
4715 bitmask=0x302;
4716 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004717 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004718 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4719 bitmask |= 7<<4; /* the DAC */
4720 }
4721 btwrite(bitmask, BT848_GPIO_OUT_EN);
4722
4723 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004724 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004725 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4726 else /* older device */
4727 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4728 btwrite(bitmask,BT848_GPIO_DATA);
4729
4730 /*
4731 * Was "to be safe, set the bt848 to input 0"
4732 * Actually, since it's ok at load time, better not messing
4733 * with these bits (on PXC200AF you need to set mux 2 here)
4734 *
4735 * needed because bttv-driver sets mux before calling this function
4736 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004737 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004738 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4739 else /* older device */
4740 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4741
Joe Perches8af443e2011-08-21 19:56:48 -03004742 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004743}
4744
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004745static void phytec_muxsel(struct bttv *btv, unsigned int input)
4746{
4747 unsigned int mux = input % 4;
4748
4749 if (input == btv->svhs)
4750 mux = 0;
4751
4752 gpio_bits(0x3, mux);
4753}
4754
Bruno Christo0c5db422009-03-02 22:38:59 -03004755/*
4756 * GeoVision GV-800(S) functions
4757 * Bruno Christo <bchristo@inf.ufsm.br>
4758*/
4759
4760/* This is a function to control the analog switch, which determines which
4761 * camera is routed to which controller. The switch comprises an X-address
4762 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4763 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4764 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4765 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4766 * specified address. There is also a chip select (gpio bit 16).
4767 * The idea is to set the address and chip select together, bring
4768 * STROBE high, write the data, and finally bring STROBE back to low.
4769 */
4770static void gv800s_write(struct bttv *btv,
4771 unsigned char xaddr,
4772 unsigned char yaddr,
4773 unsigned char data) {
4774 /* On the "master" 878A:
4775 * GPIO bits 0-9 are used for the analog switch:
4776 * 00 - 03: camera selector
4777 * 04 - 06: 878A (controller) selector
4778 * 16: cselect
4779 * 17: strobe
4780 * 18: data (1->on, 0->off)
4781 * 19: reset
4782 */
4783 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4784 const u32 CSELECT = 1<<16;
4785 const u32 STROBE = 1<<17;
4786 const u32 DATA = data<<18;
4787
4788 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4789 gpio_bits(0x20000, STROBE); /* STROBE high */
4790 gpio_bits(0x40000, DATA); /* write DATA */
4791 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4792}
4793
4794/*
4795 * GeoVision GV-800(S) muxsel
4796 *
4797 * Each of the 4 cards (controllers) use this function.
4798 * The controller using this function selects the input through the GPIO pins
4799 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4800 *
4801 * The parameter 'input' is the requested camera number (0-4) on the controller.
4802 * The map array has the address of each input. Note that the addresses in the
4803 * array are in the sequence the original GeoVision driver uses, that is, set
4804 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4805 * the physical "camera 1" connector corresponds to controller 0 input 0,
4806 * "camera 2" corresponds to controller 1 input 0, and so on.
4807 *
4808 * After getting the input address, the function then writes the appropriate
4809 * data to the analog switch, and housekeeps the local copy of the switch
4810 * information.
4811 */
4812static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4813{
4814 struct bttv *mctlr;
4815 char *sw_status;
4816 int xaddr, yaddr;
4817 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4818 { 0x1, 0x5, 0xb, 0x7 },
4819 { 0x2, 0x8, 0xc, 0xe },
4820 { 0x3, 0x9, 0xd, 0xf } };
4821 input = input%4;
4822 mctlr = master[btv->c.nr];
4823 if (mctlr == NULL) {
4824 /* do nothing until the "master" is detected */
4825 return;
4826 }
4827 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4828 sw_status = (char *)(&mctlr->mbox_we);
4829 xaddr = map[yaddr][input] & 0xf;
4830
4831 /* Check if the controller/camera pair has changed, ignore otherwise */
4832 if (sw_status[yaddr] != xaddr) {
4833 /* disable the old switch, enable the new one and save status */
4834 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4835 sw_status[yaddr] = xaddr;
4836 gv800s_write(mctlr, xaddr, yaddr, 1);
4837 }
4838}
4839
4840/* GeoVision GV-800(S) "master" chip init */
4841static void gv800s_init(struct bttv *btv)
4842{
4843 char *sw_status = (char *)(&btv->mbox_we);
4844 int ix;
4845
4846 gpio_inout(0xf107f, 0xf107f);
4847 gpio_write(1<<19); /* reset the analog MUX */
4848 gpio_write(0);
4849
4850 /* Preset camera 0 to the 4 controllers */
4851 for (ix = 0; ix < 4; ix++) {
4852 sw_status[ix] = ix;
4853 gv800s_write(btv, ix, ix, 1);
4854 }
4855
4856 /* Inputs on the "master" controller need this brightness fix */
4857 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4858
4859 if (btv->c.nr > BTTV_MAX-4)
4860 return;
4861 /*
4862 * Store the "master" controller pointer in the master
4863 * array for later use in the muxsel function.
4864 */
4865 master[btv->c.nr] = btv;
4866 master[btv->c.nr+1] = btv;
4867 master[btv->c.nr+2] = btv;
4868 master[btv->c.nr+3] = btv;
4869}
4870
Linus Torvalds1da177e2005-04-16 15:20:36 -07004871/* ----------------------------------------------------------------------- */
4872/* motherboard chipset specific stuff */
4873
Adrian Bunk7d44e892007-12-11 19:23:43 -03004874void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004875{
4876 int pcipci_fail = 0;
4877 struct pci_dev *dev = NULL;
4878
Alan Cox3d265c92006-09-14 11:53:16 -03004879 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004880 pcipci_fail = 1;
4881 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4882 triton1 = 1;
4883 if (pci_pci_problems & PCIPCI_VSFX)
4884 vsfx = 1;
4885#ifdef PCIPCI_ALIMAGIK
4886 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4887 latency = 0x0A;
4888#endif
4889
Linus Torvalds1da177e2005-04-16 15:20:36 -07004890
4891 /* print warnings about any quirks found */
4892 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004893 pr_info("Host bridge needs ETBF enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004894 if (vsfx)
Joe Perches8af443e2011-08-21 19:56:48 -03004895 pr_info("Host bridge needs VSFX enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004896 if (pcipci_fail) {
Joe Perches8af443e2011-08-21 19:56:48 -03004897 pr_info("bttv and your chipset may not work together\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004898 if (!no_overlay) {
Joe Perches8af443e2011-08-21 19:56:48 -03004899 pr_info("overlay will be disabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004900 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004901 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03004902 pr_info("overlay forced. Use this option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004903 }
4904 }
4905 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004906 pr_info("pci latency fixup [%d]\n", latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004907 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004908 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004909 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004910 pci_read_config_byte(dev, 0x53, &b);
4911 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03004912 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4913 b);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004914 }
4915}
4916
4917int __devinit bttv_handle_chipset(struct bttv *btv)
4918{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004919 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004920
4921 if (!triton1 && !vsfx && UNSET == latency)
4922 return 0;
4923
4924 if (bttv_verbose) {
4925 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004926 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4927 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004928 if (vsfx && btv->id >= 878)
Joe Perches8af443e2011-08-21 19:56:48 -03004929 pr_info("%d: enabling VSFX\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004930 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004931 pr_info("%d: setting pci timer to %d\n",
4932 btv->c.nr, latency);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004933 }
4934
4935 if (btv->id < 878) {
4936 /* bt848 (mis)uses a bit in the irq mask for etbf */
4937 if (triton1)
4938 btv->triton1 = BT848_INT_ETBF;
4939 } else {
4940 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004941 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004942 if (triton1)
4943 command |= BT878_EN_TBFX;
4944 if (vsfx)
4945 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004946 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4947 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004948 if (UNSET != latency)
4949 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4950 return 0;
4951}
4952
4953
4954/*
4955 * Local variables:
4956 * c-basic-offset: 8
4957 * End:
4958 */