blob: 076b7f216538ee942c545a237544fdae7a3e1097 [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
Linus Torvalds1da177e2005-04-16 15:20:36 -070083static int terratec_active_radio_upgrade(struct bttv *btv);
84static int tea5757_read(struct bttv *btv);
85static int tea5757_write(struct bttv *btv, int value);
86static void identify_by_eeprom(struct bttv *btv,
87 unsigned char eeprom_data[256]);
88static int __devinit pvr_boot(struct bttv *btv);
89
90/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020091static unsigned int triton1;
92static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070093static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070094int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070095
96static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
97static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
98static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
99static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
100static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
Hans Verkuil859f0272009-03-28 08:29:00 -0300101static unsigned int audiodev[BTTV_MAX];
102static unsigned int saa6588[BTTV_MAX];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700103static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
Hans Verkuil859f0272009-03-28 08:29:00 -0300104static unsigned int autoload = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105static unsigned int gpiomask = UNSET;
106static unsigned int audioall = UNSET;
107static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
108
109/* insmod options */
110module_param(triton1, int, 0444);
111module_param(vsfx, int, 0444);
112module_param(no_overlay, int, 0444);
113module_param(latency, int, 0444);
114module_param(gpiomask, int, 0444);
115module_param(audioall, int, 0444);
116module_param(autoload, int, 0444);
117
118module_param_array(card, int, NULL, 0444);
119module_param_array(pll, int, NULL, 0444);
120module_param_array(tuner, int, NULL, 0444);
121module_param_array(svhs, int, NULL, 0444);
122module_param_array(remote, int, NULL, 0444);
Hans Verkuil859f0272009-03-28 08:29:00 -0300123module_param_array(audiodev, int, NULL, 0444);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124module_param_array(audiomux, int, NULL, 0444);
125
126MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
127 "[enable bug compatibility for triton1 + others]");
128MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
129 "[yet another chipset flaw workaround]");
130MODULE_PARM_DESC(latency,"pci latency timer");
131MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
132MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
133MODULE_PARM_DESC(tuner,"specify installed tuner type");
Hans Verkuil859f0272009-03-28 08:29:00 -0300134MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
135MODULE_PARM_DESC(audiodev, "specify audio device:\n"
136 "\t\t-1 = no audio\n"
137 "\t\t 0 = autodetect (default)\n"
138 "\t\t 1 = msp3400\n"
139 "\t\t 2 = tda7432\n"
140 "\t\t 3 = tvaudio");
141MODULE_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 -0300142MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
143 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144
145/* ----------------------------------------------------------------------- */
146/* list of card IDs for bt878+ cards */
147
148static struct CARD {
149 unsigned id;
150 int cardnr;
151 char *name;
152} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800153 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
154 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
155 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
156 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
157 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
158 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
159 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
160 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800161 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800163 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
164 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700165
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800166 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
167 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
168 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
169 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
170 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800171 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800172 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
173 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800174 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800176 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700177 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800178 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
179 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700180 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800181 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182
Wade Berrier434b2522007-06-25 13:02:16 -0300183 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
184 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800185 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700186
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800187 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
188 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
189 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
190 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
191 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
192 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
193 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800195 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
196 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
197 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
198 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
199 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800201 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
202 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
203 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
204 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700205
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800206 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
207 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700208 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800209 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
210 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
211 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
212 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
213 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800215 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
216 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
217 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
218 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
219 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700220
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800221 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
222 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
223 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
224 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
225 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800227 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
228 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
229 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
230 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800232 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
233 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
234 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
235 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800237 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
238 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
239 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
240 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
242 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
243 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
244 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
245 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
Kirill Smelkovb7589ac2010-04-27 13:17:51 -0300246 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
247 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
248 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
249 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800250 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
251 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
252 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
258 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
259 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
260 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
261 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
262 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
263 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
264 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
265 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300266 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
267 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
268 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
269 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700270
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800271 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
272 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700273
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800274 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
275 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
276 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
277 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
278 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
279 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280
Trent Piepho657de3c2006-06-20 00:30:57 -0300281 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800282 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700283
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800284 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
285 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
286 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
sensoray-dev57437c12011-10-25 19:43:55 -0300287 { 0x03116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 311" },
288 { 0x06116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 611" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800289 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
290 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800291 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
292 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800293 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700294
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800295 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
296 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800298 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
299 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
300 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
301 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700302
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800303 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
Scott Alfter1ebba672007-04-02 14:22:39 -0300305 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
306 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
307
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700308 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800309 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700310
Steven Tothcd1257d2006-01-09 15:25:01 -0200311 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
312 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
313
Robert Millan76ecf452009-03-11 08:18:53 -0300314 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2, "Conceptronic CTVFMi v2"},
315
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700316 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800317 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200318 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
319 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800320 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
321 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
322 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
323 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200324 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800325 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300326 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800327 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300328 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300329 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300330 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300331 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300332 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
333 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
334 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
335 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Alan McIvordceaddb2009-03-12 21:43:34 -0300336
337 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
338 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
339 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
340 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
341 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
342 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
343 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
344 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
345
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346 { 0, -1, NULL }
347};
348
349/* ----------------------------------------------------------------------- */
350/* array with description for bt848 / bt878 tv/grabber cards */
351
352struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800353 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800354 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800355 .name = " *** UNKNOWN/GENERIC *** ",
356 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800357 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300358 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300359 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800360 .tuner_addr = ADDR_UNSET,
361 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800362 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800363 .name = "MIRO PCTV",
364 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300365 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800366 .svhs = 2,
367 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300368 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300369 .gpiomux = { 2, 0, 0, 0 },
370 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800371 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300372 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800373 .tuner_addr = ADDR_UNSET,
374 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800375 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800376 .name = "Hauppauge (bt848)",
377 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300378 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800379 .svhs = 2,
380 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300381 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300382 .gpiomux = { 0, 1, 2, 3 },
383 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800384 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300385 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800386 .tuner_addr = ADDR_UNSET,
387 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800388 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800389 .name = "STB, Gateway P/N 6000699 (bt848)",
390 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300391 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800392 .svhs = 2,
393 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300394 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300395 .gpiomux = { 4, 0, 2, 3 },
396 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800397 .no_msp34xx = 1,
398 .needs_tvaudio = 1,
399 .tuner_type = TUNER_PHILIPS_NTSC,
400 .tuner_addr = ADDR_UNSET,
401 .pll = PLL_28,
402 .has_radio = 1,
403 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800406 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
408 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300409 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .svhs = 2,
411 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300412 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300413 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800414 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300415 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800416 .tuner_addr = ADDR_UNSET,
417 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800418 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800419 .name = "Diamond DTV2000",
420 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300421 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .svhs = 2,
423 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300424 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300425 .gpiomux = { 0, 1, 0, 1 },
426 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800427 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300428 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800429 .tuner_addr = ADDR_UNSET,
430 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800431 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800432 .name = "AVerMedia TVPhone",
433 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300434 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800435 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300436 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800437 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300438 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800439 /* 0x04 for some cards ?? */
440 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300441 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800442 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300443 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800444 .has_remote = 1,
445 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800446 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800447 .name = "MATRIX-Vision MV-Delta",
448 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300449 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800450 .svhs = 3,
451 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300452 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300453 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800454 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300455 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800456 .tuner_addr = ADDR_UNSET,
457 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800459 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800460 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800461 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
462 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300463 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800464 .svhs = 2,
465 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300466 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300467 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
468 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800469 .needs_tvaudio = 1,
470 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300471 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800472 .tuner_addr = ADDR_UNSET,
473 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800474 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800475 .name = "IMS/IXmicro TurboTV",
476 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300477 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800478 .svhs = 2,
479 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300480 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300481 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800482 .needs_tvaudio = 0,
483 .pll = PLL_28,
484 .tuner_type = TUNER_TEMIC_PAL,
485 .tuner_addr = ADDR_UNSET,
486 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800487 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800488 .name = "Hauppauge (bt878)",
489 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300490 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800491 .svhs = 2,
492 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300493 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300494 .gpiomux = { 0, 1, 2, 3 },
495 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800496 .needs_tvaudio = 1,
497 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300498 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800499 .tuner_addr = ADDR_UNSET,
500 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800501 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800502 .name = "MIRO PCTV pro",
503 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300504 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800505 .svhs = 2,
506 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300507 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300508 .gpiomux = { 0x20001,0x10001, 0, 0 },
509 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800510 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300511 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800512 .tuner_addr = ADDR_UNSET,
513 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700514
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800515 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800516 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800517 .name = "ADS Technologies Channel Surfer TV (bt848)",
518 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300519 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 .svhs = 2,
521 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300522 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300523 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800524 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300525 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800526 .tuner_addr = ADDR_UNSET,
527 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800528 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800529 .name = "AVerMedia TVCapture 98",
530 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300531 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800532 .svhs = 2,
533 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300534 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300535 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800536 .needs_tvaudio = 1,
537 .msp34xx_alt = 1,
538 .pll = PLL_28,
539 .tuner_type = TUNER_PHILIPS_PAL,
540 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300541 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800542 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800543 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800544 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800545 .name = "Aimslab Video Highway Xtreme (VHX)",
546 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300547 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800548 .svhs = 2,
549 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300550 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300551 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
552 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800553 .needs_tvaudio = 1,
554 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300555 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800556 .tuner_addr = ADDR_UNSET,
557 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800558 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800559 .name = "Zoltrix TV-Max",
560 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300561 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 .svhs = 2,
563 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300564 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300565 .gpiomux = { 0, 0, 1, 0 },
566 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800567 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300568 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 .tuner_addr = ADDR_UNSET,
570 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800572 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800573 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800574 .name = "Prolink Pixelview PlayTV (bt878)",
575 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300576 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800577 .svhs = 2,
578 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300579 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800580 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300581 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
582 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800583 .needs_tvaudio = 1,
584 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300585 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300586 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800587 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800588 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800589 .name = "Leadtek WinView 601",
590 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300591 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800592 .svhs = 2,
593 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300594 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300595 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
596 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800597 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300598 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800599 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300600 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800601 .has_radio = 1,
602 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800603 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800604 .name = "AVEC Intercapture",
605 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300606 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800607 .svhs = 2,
608 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300609 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300610 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800611 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300612 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800613 .tuner_addr = ADDR_UNSET,
614 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800615 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800616 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
617 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300618 /* .audio_inputs= 1, */
619 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800620 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300621 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300622 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800623 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300624 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800625 .tuner_addr = ADDR_UNSET,
626 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700627
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800629 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800630 .name = "CEI Raffles Card",
631 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300632 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800633 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300634 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300635 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800636 .tuner_addr = ADDR_UNSET,
637 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800638 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800639 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
640 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300641 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800642 .svhs = 2,
643 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300644 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300645 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
646 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800647 .pll = PLL_28,
648 .tuner_type = TUNER_PHILIPS_PAL_I,
649 .tuner_addr = ADDR_UNSET,
650 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800651 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800652 .name = "Askey CPH050/ Phoebe Tv Master + FM",
653 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300654 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800655 .svhs = 2,
656 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300657 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300658 .gpiomux = { 0, 1, 0x800, 0x400 },
659 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800660 .needs_tvaudio = 1,
661 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300662 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800663 .tuner_addr = ADDR_UNSET,
664 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800665 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800666 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
667 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300668 /* .audio_inputs= 1, */
669 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300670 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800671 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300672 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300673 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300674 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .no_msp34xx = 1,
676 .pll = PLL_28,
677 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
678 .tuner_addr = ADDR_UNSET,
679 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800681 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800682 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800683 .name = "Askey CPH05X/06X (bt878) [many vendors]",
684 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300685 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800686 .svhs = 2,
687 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300688 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300689 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
690 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800691 .needs_tvaudio = 1,
692 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300693 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800694 .tuner_addr = ADDR_UNSET,
695 .has_remote = 1,
696 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800697 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800698 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
699 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300700 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800701 .svhs = 2,
702 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300703 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300704 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
705 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800706 .needs_tvaudio = 0,
707 .tuner_type = TUNER_PHILIPS_PAL,
708 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300709 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800710 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800711 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800712 .name = "Hauppauge WinCam newer (bt878)",
713 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300714 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800715 .svhs = 3,
716 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300717 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300718 .gpiomux = { 0, 1, 2, 3 },
719 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800720 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300721 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800722 .tuner_addr = ADDR_UNSET,
723 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800724 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800725 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
726 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300727 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800728 .svhs = 2,
729 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300730 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300731 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
732 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800733 .pll = PLL_28,
734 .tuner_type = TUNER_PHILIPS_SECAM,
735 .tuner_addr = ADDR_UNSET,
736 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700737
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800738 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800739 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800740 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
741 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300742 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800743 .svhs = 2,
744 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300745 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300746 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
747 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800748 .needs_tvaudio = 0,
749 .tuner_type = TUNER_PHILIPS_PAL,
750 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300751 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800752 /* GPIO wiring:
753 External 20 pin connector (for Active Radio Upgrade board)
754 gpio00: i2c-sda
755 gpio01: i2c-scl
756 gpio02: om5610-data
757 gpio03: om5610-clk
758 gpio04: om5610-wre
759 gpio05: om5610-stereo
760 gpio06: rds6588-davn
761 gpio07: Pin 7 n.c.
762 gpio08: nIOW
763 gpio09+10: nIOR, nSEL ?? (bt878)
764 gpio09: nIOR (bt848)
765 gpio10: nSEL (bt848)
766 Sound Routing:
767 gpio16: u2-A0 (1st 4052bt)
768 gpio17: u2-A1
769 gpio18: u2-nEN
770 gpio19: u4-A0 (2nd 4052)
771 gpio20: u4-A1
772 u4-nEN - GND
773 Btspy:
774 00000 : Cdrom (internal audio input)
775 10000 : ext. Video audio input
776 20000 : TV Mono
777 a0000 : TV Mono/2
778 1a0000 : TV Stereo
779 30000 : Radio
780 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700781 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700782
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800783 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800784 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800785 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
786 .name = "Imagenation PXC200",
787 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300788 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800789 .svhs = 1, /* was: 4 */
790 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300791 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300792 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800793 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300794 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800795 .tuner_addr = ADDR_UNSET,
796 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800798 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800799 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800800 .name = "Lifeview FlyVideo 98 LR50",
801 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300802 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800803 .svhs = 2,
804 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300805 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300806 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
807 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800808 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300809 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800810 .tuner_addr = ADDR_UNSET,
811 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800812 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800813 .name = "Formac iProTV, Formac ProTV I (bt848)",
814 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300815 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800816 .svhs = 3,
817 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300818 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300819 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800820 .pll = PLL_28,
821 .tuner_type = TUNER_PHILIPS_PAL,
822 .tuner_addr = ADDR_UNSET,
823 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700824
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800825 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800826 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800827 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
828 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300829 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800830 .svhs = 2,
831 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300832 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300833 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800834 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300835 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800836 .tuner_addr = ADDR_UNSET,
837 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800838 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800839 .name = "Terratec TerraTValue Version Bt878",
840 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300841 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800842 .svhs = 2,
843 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300844 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300845 .gpiomux = { 0x500, 0, 0x300, 0x900 },
846 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800847 .needs_tvaudio = 1,
848 .pll = PLL_28,
849 .tuner_type = TUNER_PHILIPS_PAL,
850 .tuner_addr = ADDR_UNSET,
851 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800852 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800853 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
854 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300855 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800856 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300857 /* TV, CVid, SVid, CVid over SVid connector */
858 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800859 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
860 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300861 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
862 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800863 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
864 gpio23 -- hef4052:nEnable (0x800000)
865 gpio12 -- hef4052:A1
866 gpio13 -- hef4052:A0
867 0x0000: external audio
868 0x1000: FM
869 0x2000: TV
870 0x3000: n.c.
871 Note: There exists another variant "Winfast 2000" with tv stereo !?
872 Note: eeprom only contains FF and pci subsystem id 107d:6606
873 */
874 .needs_tvaudio = 0,
875 .pll = PLL_28,
876 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300877 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800878 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300879 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800880 .has_remote = 1,
881 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800882 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
884 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300885 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800886 .svhs = 2,
887 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300888 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300889 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
890 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800891 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300892 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800893 .tuner_addr = ADDR_UNSET,
894 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700895
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800896 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800897 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800898 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
899 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300900 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800901 .svhs = 2,
902 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300903 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300904 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
905 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800906 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300907 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800908 .tuner_addr = ADDR_UNSET,
909 .has_radio = 1,
910 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800911 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800912 .name = "Prolink PixelView PlayTV pro",
913 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300914 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800915 .svhs = 2,
916 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300917 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300918 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
919 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800920 .no_msp34xx = 1,
921 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300922 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800923 .tuner_addr = ADDR_UNSET,
924 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800925 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800926 .name = "Askey CPH06X TView99",
927 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300928 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800929 .svhs = 2,
930 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300931 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300932 .gpiomux = { 0x551400, 0x551200, 0, 0 },
933 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800934 .needs_tvaudio = 1,
935 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300936 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800937 .tuner_addr = ADDR_UNSET,
938 .has_remote = 1,
939 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800940 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800941 .name = "Pinnacle PCTV Studio/Rave",
942 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300943 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .svhs = 2,
945 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300946 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300947 .gpiomux = { 2, 0xd0001, 0, 0 },
948 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800949 .needs_tvaudio = 0,
950 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300951 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800952 .tuner_addr = ADDR_UNSET,
953 },
954
955 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800956 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800957 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
958 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300959 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800960 .svhs = 2,
961 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300962 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300963 .gpiomux = { 4, 0, 2, 3 },
964 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800965 .no_msp34xx = 1,
966 .needs_tvaudio = 1,
967 .tuner_type = TUNER_PHILIPS_NTSC,
968 .tuner_addr = ADDR_UNSET,
969 .pll = PLL_28,
970 .has_radio = 1,
971 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800972 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800973 .name = "AVerMedia TVPhone 98",
974 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300975 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800976 .svhs = 2,
977 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300978 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300979 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800980 .needs_tvaudio = 1,
981 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300982 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800983 .tuner_addr = ADDR_UNSET,
984 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300985 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800986 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800987 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800988 .name = "ProVideo PV951", /* pic16c54 */
989 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300990 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800991 .svhs = 2,
992 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300993 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300994 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800995 .needs_tvaudio = 1,
996 .no_msp34xx = 1,
997 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300998 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800999 .tuner_addr = ADDR_UNSET,
1000 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001001 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .name = "Little OnAir TV",
1003 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001004 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001005 .svhs = 2,
1006 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -03001007 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001008 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1009 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001010 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001011 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001012 .tuner_addr = ADDR_UNSET,
1013 },
1014
1015 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001016 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001017 .name = "Sigma TVII-FM",
1018 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001019 /* .audio_inputs= 1, */
1020 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001021 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001022 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001023 .gpiomux = { 1, 1, 0, 2 },
1024 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001025 .no_msp34xx = 1,
1026 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001027 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001028 .tuner_addr = ADDR_UNSET,
1029 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001030 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001031 .name = "MATRIX-Vision MV-Delta 2",
1032 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001033 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001034 .svhs = 3,
1035 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001036 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001037 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001038 .no_msp34xx = 1,
1039 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001040 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001041 .tuner_addr = ADDR_UNSET,
1042 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001043 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 .name = "Zoltrix Genie TV/FM",
1045 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001046 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 .svhs = 2,
1048 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001049 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001050 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1051 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001052 .no_msp34xx = 1,
1053 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001054 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .tuner_addr = ADDR_UNSET,
1056 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001057 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001058 .name = "Terratec TV/Radio+",
1059 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001060 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .svhs = 2,
1062 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001063 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001064 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1065 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001066 .needs_tvaudio = 1,
1067 .no_msp34xx = 1,
1068 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001069 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001070 .tuner_addr = ADDR_UNSET,
1071 .has_radio = 1,
1072 },
1073
1074 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001075 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001076 .name = "Askey CPH03x/ Dynalink Magic TView",
1077 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001078 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .svhs = 2,
1080 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001081 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001082 .gpiomux = {2,0,0,0 },
1083 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001084 .needs_tvaudio = 1,
1085 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001086 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001087 .tuner_addr = ADDR_UNSET,
1088 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001089 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001090 .name = "IODATA GV-BCTV3/PCI",
1091 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001092 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001093 .svhs = 2,
1094 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001095 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001096 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001097 .no_msp34xx = 1,
1098 .pll = PLL_28,
1099 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1100 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001101 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001102 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001103 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001104 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1105 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001106 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001107 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001108 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001109 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001110 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001111 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001112 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1113 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001114 .no_msp34xx = 1,
1115 .pll = PLL_28,
1116 .tuner_type = TUNER_PHILIPS_PAL_I,
1117 .tuner_addr = ADDR_UNSET,
1118 .has_remote = 1,
1119 /* GPIO wiring: (different from Rev.4C !)
1120 GPIO17: U4.A0 (first hef4052bt)
1121 GPIO19: U4.A1
1122 GPIO20: U5.A1 (second hef4052bt)
1123 GPIO21: U4.nEN
1124 GPIO22: BT832 Reset Line
1125 GPIO23: A5,A0, U5,nEN
1126 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1127 */
1128 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001129 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001130 .name = "Eagle Wireless Capricorn2 (bt878A)",
1131 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001132 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001133 .svhs = 2,
1134 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001135 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001136 .gpiomux = { 0, 1, 2, 3 },
1137 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001138 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001139 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001140 .tuner_addr = ADDR_UNSET,
1141 },
1142
1143 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001144 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001145 /* David Härdeman <david@2gen.com> */
1146 .name = "Pinnacle PCTV Studio Pro",
1147 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001148 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001149 .svhs = 3,
1150 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001151 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001152 .gpiomux = { 1, 0xd0001, 0, 0 },
1153 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001154 /* sound path (5 sources):
1155 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1156 0= ext. Audio IN
1157 1= from MUX2
1158 2= Mono TV sound from Tuner
1159 3= not connected
1160 MUX2 (mask 0x30000):
1161 0,2,3= from MSP34xx
1162 1= FM stereo Radio from Tuner */
1163 .needs_tvaudio = 0,
1164 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001165 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001166 .tuner_addr = ADDR_UNSET,
1167 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001168 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001169 /* Claas Langbehn <claas@bigfoot.com>,
1170 Sven Grothklags <sven@upb.de> */
1171 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1172 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001173 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001174 .svhs = 2,
1175 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001176 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001177 .gpiomux = { 0, 0, 0x10, 8 },
1178 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001179 .needs_tvaudio = 1,
1180 .pll = PLL_28,
1181 .tuner_type = TUNER_PHILIPS_PAL,
1182 .tuner_addr = ADDR_UNSET,
1183 .has_radio = 1,
1184 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001185 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001186 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001187 in de.comp.os.unix.linux.hardware:
1188 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001189 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001190 options tuner type=5 */
1191 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1192 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001193 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001194 .svhs = 2,
1195 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001196 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001197 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1198 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001199 /* For cards with tda9820/tda9821:
1200 0x0000: Tuner normal stereo
1201 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1202 0x0880: Tuner A2 stereo */
1203 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001204 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001205 .tuner_addr = ADDR_UNSET,
1206 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001207 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001208 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1209 old Easy TV BT848 version (model CPH031) */
1210 .name = "Askey CPH031/ BESTBUY Easy TV",
1211 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001212 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001213 .svhs = 2,
1214 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001215 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001216 .gpiomux = { 2, 0, 0, 0 },
1217 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001218 .needs_tvaudio = 0,
1219 .pll = PLL_28,
1220 .tuner_type = TUNER_TEMIC_PAL,
1221 .tuner_addr = ADDR_UNSET,
1222 },
1223
1224 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001225 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001226 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1227 .name = "Lifeview FlyVideo 98FM LR50",
1228 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001229 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001230 .svhs = 2,
1231 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001232 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001233 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1234 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001235 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001236 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001237 .tuner_addr = ADDR_UNSET,
1238 },
1239 /* This is the ultimate cheapo capture card
1240 * just a BT848A on a small PCB!
1241 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001242 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001243 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1244 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001245 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001246 .svhs = 1,
1247 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001248 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001249 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001250 .needs_tvaudio = 0,
1251 .no_msp34xx = 1,
1252 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001253 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001254 .tuner_addr = ADDR_UNSET,
1255 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001256 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001257 /* Daniel Herrington <daniel.herrington@home.com> */
1258 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1259 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001260 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001261 .svhs = 2,
1262 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001263 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001264 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1265 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001266 .needs_tvaudio = 1,
1267 .pll = PLL_28,
1268 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1269 .tuner_addr = ADDR_UNSET,
1270 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001271 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001272 /* Matti Mottus <mottus@physic.ut.ee> */
1273 .name = "Askey CPH03x TV Capturer",
1274 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001275 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001276 .svhs = 2,
1277 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001278 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001279 .gpiomux = { 2, 0, 0, 0 },
1280 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001281 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001282 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001283 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehabed44f662009-08-22 14:43:50 -03001284 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001285 },
1286
1287 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001288 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001289 /* Philip Blundell <philb@gnu.org> */
1290 .name = "Modular Technology MM100PCTV",
1291 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001292 /* .audio_inputs= 2, */
1293 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001294 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001295 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001296 .gpiomux = { 2, 0, 0, 1 },
1297 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001298 .pll = PLL_35,
1299 .tuner_type = TUNER_TEMIC_PAL,
1300 .tuner_addr = ADDR_UNSET,
1301 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001302 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001303 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001304 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001305 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001306 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001307 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001308 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001309 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001310 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001311 .no_msp34xx = 1,
1312 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001313 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001314 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001315 .tuner_addr = ADDR_UNSET,
1316 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001317 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1319 new Easy TV BT878 version (model CPH061)
1320 special thanks to Informatica Mieres for providing the card */
1321 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1322 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001323 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001324 .svhs = 2,
1325 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001326 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001327 .gpiomux = { 1, 0, 4, 4 },
1328 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001329 .needs_tvaudio = 0,
1330 .pll = PLL_28,
1331 .tuner_type = TUNER_PHILIPS_PAL,
1332 .tuner_addr = ADDR_UNSET,
1333 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001334 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001335 /* Lukas Gebauer <geby@volny.cz> */
1336 .name = "ATI TV-Wonder",
1337 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001338 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001339 .svhs = 2,
1340 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001341 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001342 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1343 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001344 .pll = PLL_28,
1345 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1346 .tuner_addr = ADDR_UNSET,
1347 },
1348
1349 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001350 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001351 /* Lukas Gebauer <geby@volny.cz> */
1352 .name = "ATI TV-Wonder VE",
1353 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001354 /* .audio_inputs= 1, */
1355 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001356 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001357 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001358 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001359 .no_msp34xx = 1,
1360 .pll = PLL_28,
1361 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1362 .tuner_addr = ADDR_UNSET,
1363 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001364 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001365 /* DeeJay <deejay@westel900.net (2000S) */
1366 .name = "Lifeview FlyVideo 2000S LR90",
1367 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001368 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001369 .svhs = 2,
1370 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001371 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001372 /* Radio changed from 1e80 to 0x800 to make
1373 FlyVideo2000S in .hu happy (gm)*/
1374 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001375 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1376 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001377 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001378 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001379 .needs_tvaudio = 1,
1380 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001381 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001382 .tuner_addr = ADDR_UNSET,
1383 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001384 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001385 .name = "Terratec TValueRadio",
1386 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001387 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001388 .svhs = 2,
1389 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001390 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001391 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1392 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001393 .needs_tvaudio = 1,
1394 .pll = PLL_28,
1395 .tuner_type = TUNER_PHILIPS_PAL,
1396 .tuner_addr = ADDR_UNSET,
1397 .has_radio = 1,
1398 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001399 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001400 /* TANAKA Kei <peg00625@nifty.com> */
1401 .name = "IODATA GV-BCTV4/PCI",
1402 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001403 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001404 .svhs = 2,
1405 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001406 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001407 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001408 .no_msp34xx = 1,
1409 .pll = PLL_28,
1410 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1411 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001412 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001413 },
1414
1415 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001416 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001417 .name = "3Dfx VoodooTV FM (Euro)",
1418 /* try "insmod msp3400 simple=0" if you have
1419 * sound problems with this card. */
1420 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001421 /* .audio_inputs= 1, */
1422 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001423 .gpiomask = 0x4f8a00,
1424 /* 0x100000: 1=MSP enabled (0=disable again)
1425 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1426 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1427 .gpiomute = 0x947fff,
1428 /* tvtuner, radio, external,internal, mute, stereo
1429 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001430 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001431 .tuner_type = TUNER_MT2032,
1432 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001433 .pll = PLL_28,
1434 .has_radio = 1,
1435 },
1436 [BTTV_BOARD_VOODOOTV_200] = {
1437 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001438 /* try "insmod msp3400 simple=0" if you have
1439 * sound problems with this card. */
1440 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001441 /* .audio_inputs= 1, */
1442 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001443 .gpiomask = 0x4f8a00,
1444 /* 0x100000: 1=MSP enabled (0=disable again)
1445 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001446 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1447 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001448 /* tvtuner, radio, external,internal, mute, stereo
1449 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001450 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001451 .tuner_type = TUNER_MT2032,
1452 .tuner_addr = ADDR_UNSET,
1453 .pll = PLL_28,
1454 .has_radio = 1,
1455 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001456 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001457 /* Philip Blundell <pb@nexus.co.uk> */
1458 .name = "Active Imaging AIMMS",
1459 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001460 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001461 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001462 .tuner_addr = ADDR_UNSET,
1463 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001464 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001465 .gpiomask = 0
1466 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001467 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1469 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1470 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001471 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001472 .svhs = 2,
1473 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001474 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001475 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1476 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .needs_tvaudio = 1,
1478 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001479 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001480 .tuner_addr = ADDR_UNSET,
1481 .has_remote = 1,
1482 /* GPIO wiring:
1483 GPIO0: U4.A0 (hef4052bt)
1484 GPIO1: U4.A1
1485 GPIO2: U4.A1 (second hef4052bt)
1486 GPIO3: U4.nEN, U5.A0, A5.nEN
1487 GPIO8-15: vrd866b ?
1488 */
1489 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001490 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001491 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1492 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001493 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001494 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001495 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1496 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001497 .pll = PLL_28,
1498 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001499 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001500 .tuner_addr = ADDR_UNSET,
1501 },
1502
1503 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001504 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001505 /* Dariusz Kowalewski <darekk@automex.pl> */
1506 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1507 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001508 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001509 .svhs = 2,
1510 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001511 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001512 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1513 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001514 .needs_tvaudio = 1,
1515 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001516 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001517 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001518 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001519 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001520 .has_radio = 1, /* Note: not all cards have radio */
1521 .has_remote = 1,
1522 /* GPIO wiring:
1523 GPIO0: A0 hef4052
1524 GPIO1: A1 hef4052
1525 GPIO3: nEN hef4052
1526 GPIO8-15: vrd866b
1527 GPIO20,22,23: R30,R29,R28
1528 */
1529 },
sensoray-dev57437c12011-10-25 19:43:55 -03001530 [BTTV_BOARD_SENSORAY311_611] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001531 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
sensoray-dev57437c12011-10-25 19:43:55 -03001532 /* you must jumper JP5 for the 311 card (PC/104+) to work */
1533 .name = "Sensoray 311/611",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001534 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001535 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001536 .svhs = 4,
1537 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001538 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001539 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001540 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001541 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001542 .tuner_addr = ADDR_UNSET,
1543 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001544 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001545 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1546 .name = "RemoteVision MX (RV605)",
1547 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001548 /* .audio_inputs= 0, */
1549 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001550 .gpiomask = 0x00,
1551 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001552 .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 -08001553 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001554 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001555 .tuner_addr = ADDR_UNSET,
1556 .muxsel_hook = rv605_muxsel,
1557 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001558 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001559 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1560 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001561 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001562 .svhs = 2,
1563 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001564 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001565 .gpiomux = { 0, 1, 2, 2 },
1566 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 .needs_tvaudio = 0,
1568 .tuner_type = TUNER_PHILIPS_PAL,
1569 .tuner_addr = ADDR_UNSET,
1570 .pll = PLL_28,
1571 .has_radio = 1,
1572 },
1573
1574 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001575 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001576 /* Masaki Suzuki <masaki@btree.org> */
1577 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1578 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001579 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001580 .svhs = 2,
1581 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001582 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001583 .gpiomux = { 0, 1, 2, 3 },
1584 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001585 .tuner_type = TUNER_PHILIPS_NTSC,
1586 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001587 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001588 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001589 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001590 .name = "GrandTec Multi Capture Card (Bt878)",
1591 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001592 /* .audio_inputs= 0, */
1593 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001594 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001595 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001596 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001597 .needs_tvaudio = 0,
1598 .no_msp34xx = 1,
1599 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001600 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001601 .tuner_addr = ADDR_UNSET,
1602 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001603 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001604 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1605 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001606 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001607 .svhs = 2,
1608 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001609 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1610 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001611 .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 -08001612 * This card lacks external Audio In, so we mute it on Ext. & Int.
1613 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1614 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001615 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001616 * btwincap uses 0x80000/0x80003
1617 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001618 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001619 .needs_tvaudio = 0,
1620 .no_msp34xx = 1,
1621 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001622 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001623 .tuner_addr = ADDR_UNSET,
1624 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1625 radio signal strength indicators work fine. */
1626 .has_radio = 1,
1627 /* GPIO Info:
1628 GPIO0,1: HEF4052 A0,A1
1629 GPIO2: HEF4052 nENABLE
1630 GPIO3-7: n.c.
1631 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1632 GPIO14,15: ??
1633 GPIO16-21: n.c.
1634 GPIO22,23: ??
1635 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1636 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001637 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001638 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1639 .name = "DSP Design TCVIDEO",
1640 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001641 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001642 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001643 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001644 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001645 .tuner_addr = ADDR_UNSET,
1646 },
1647
1648 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001649 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001650 .name = "Hauppauge WinTV PVR",
1651 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001652 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001654 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001655 .needs_tvaudio = 1,
1656 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001657 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001658 .tuner_addr = ADDR_UNSET,
1659
1660 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001661 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001662 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001663 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001664 .name = "IODATA GV-BCTV5/PCI",
1665 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001666 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001667 .svhs = 2,
1668 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001669 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001670 .gpiomux = {0x030000, 0x010000, 0, 0 },
1671 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001672 .no_msp34xx = 1,
1673 .pll = PLL_28,
1674 .tuner_type = TUNER_PHILIPS_NTSC_M,
1675 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001676 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .has_radio = 1,
1678 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001679 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001680 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1681 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001682 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001683 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001684 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001685 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001686 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001687 .tuner_addr = ADDR_UNSET,
1688 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001689 .no_tda7432 = 1,
1690 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001691 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001692 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1693 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001694 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001695 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001696 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001697 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001698 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001699 .tuner_addr = ADDR_UNSET,
1700 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001701 .no_tda7432 = 1,
1702 },
1703
1704 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001705 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001706 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1707 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001708 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001709 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001710 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001711 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001712 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001713 .tuner_addr = ADDR_UNSET,
1714 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001715 .no_tda7432 = 1,
1716 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001717 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001718 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1719 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001720 /* .audio_inputs= 0, */
1721 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001722 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001723 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001724 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001725 .tuner_addr = ADDR_UNSET,
1726 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001727 .no_tda7432 = 1,
1728 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001729 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001730 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1731 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001732 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001733 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001734 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001735 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001736 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001737 .tuner_addr = ADDR_UNSET,
1738 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001739 .no_tda7432 = 1,
1740 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001741 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001742 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1743 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001744 /* .audio_inputs= 1, */
1745 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001746 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001747 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001748 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001749 .tuner_addr = ADDR_UNSET,
1750 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001751 .no_tda7432 = 1,
1752 },
1753
1754 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001755 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001756 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1757 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001758 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001759 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001760 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001761 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001762 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001763 .tuner_addr = ADDR_UNSET,
1764 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001765 .no_tda7432 = 1,
1766 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001767 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001768 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001769 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001770 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001771 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001772 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001773 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001774 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001775 .tuner_addr = ADDR_UNSET,
1776 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001777 .no_tda7432 = 1,
1778 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001779 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001780 .name = "Osprey 500", /* 500 */
1781 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001782 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001783 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001784 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001785 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001786 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787 .tuner_addr = ADDR_UNSET,
1788 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001789 .no_tda7432 = 1,
1790 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001791 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001792 .name = "Osprey 540", /* 540 */
1793 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001794 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001795 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001796 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001797 .tuner_addr = ADDR_UNSET,
1798 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001799 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001800 },
1801
1802 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001803 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001804 .name = "Osprey 2000", /* 2000 */
1805 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001806 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001807 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001808 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001809 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001810 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001811 .tuner_addr = ADDR_UNSET,
1812 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001813 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1814 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001815 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001816 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1817 .name = "IDS Eagle",
1818 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001819 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001820 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001821 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001822 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001823 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001824 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001825 .muxsel_hook = eagle_muxsel,
1826 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001827 .pll = PLL_28,
1828 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001829 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001830 .name = "Pinnacle PCTV Sat",
1831 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001832 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001833 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001834 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001835 .tuner_addr = ADDR_UNSET,
1836 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001837 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001838 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001839 .pll = PLL_28,
1840 .no_gpioirq = 1,
1841 .has_dvb = 1,
1842 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001843 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001844 .name = "Formac ProTV II (bt878)",
1845 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001846 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001847 .svhs = 3,
1848 .gpiomask = 2,
1849 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001850 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001851 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001852 .pll = PLL_28,
1853 .has_radio = 1,
1854 .tuner_type = TUNER_PHILIPS_PAL,
1855 .tuner_addr = ADDR_UNSET,
1856 /* sound routing:
1857 GPIO=0x00,0x01,0x03: mute (?)
1858 0x02: both TV and radio (tuner: FM1216/I)
1859 The card has onboard audio connectors labeled "cdrom" and "board",
1860 not soldered here, though unknown wiring.
1861 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001862 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001863 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001864
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001865 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001866 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .name = "MachTV",
1868 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001869 /* .audio_inputs= 1, */
1870 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001871 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001872 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001873 .gpiomux = { 0, 1, 2, 3},
1874 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001875 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001876 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001877 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001878 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001879 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001880 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001881 .name = "Euresys Picolo",
1882 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001883 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001884 .svhs = 2,
1885 .gpiomask = 0,
1886 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001887 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001888 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001889 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001890 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001891 .tuner_addr = ADDR_UNSET,
1892 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001893 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001894 /* Luc Van Hoeylandt <luc@e-magic.be> */
1895 .name = "ProVideo PV150", /* 0x4f */
1896 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001897 /* .audio_inputs= 0, */
1898 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001899 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001900 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001901 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001902 .needs_tvaudio = 0,
1903 .no_msp34xx = 1,
1904 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001905 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001906 .tuner_addr = ADDR_UNSET,
1907 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001908 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001909 /* Hiroshi Takekawa <sian@big.or.jp> */
1910 /* This card lacks subsystem ID */
1911 .name = "AD-TVK503", /* 0x63 */
1912 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001913 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001914 .svhs = 2,
1915 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001916 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001918 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1919 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 .needs_tvaudio = 0,
1921 .no_msp34xx = 1,
1922 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001923 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001924 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001925 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001926 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001927
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001928 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001929 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001930 .name = "Hercules Smart TV Stereo",
1931 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001932 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001933 .svhs = 2,
1934 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001935 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001936 .needs_tvaudio = 1,
1937 .no_msp34xx = 1,
1938 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001939 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001940 .tuner_addr = ADDR_UNSET,
1941 /* Notes:
1942 - card lacks subsystem ID
1943 - stereo variant w/ daughter board with tda9874a @0xb0
1944 - Audio Routing:
1945 always from tda9874 independent of GPIO (?)
1946 external line in: unknown
1947 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1948 hef4053 (instead 4052) for unknown function
1949 */
1950 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001951 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001952 .name = "Pace TV & Radio Card",
1953 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001954 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001956 /* Tuner, CVid, SVid, CVid over SVid connector */
1957 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001958 .gpiomask = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001959 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001960 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .tuner_addr = ADDR_UNSET,
1962 .has_radio = 1,
1963 .pll = PLL_28,
1964 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1965 only internal line out: (4pin header) RGGL
1966 Radio must be decoded by msp3410d (not routed through)*/
1967 /*
1968 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1969 */
1970 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001971 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001972 /* Chris Willing <chris@vislab.usyd.edu.au> */
1973 .name = "IVC-200",
1974 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001975 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001976 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001977 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001978 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001979 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001980 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001981 .pll = PLL_28,
1982 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001983 [BTTV_BOARD_IVCE8784] = {
1984 .name = "IVCE-8784",
1985 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001986 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001987 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001988 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001989 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001990 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001991 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001992 .pll = PLL_28,
1993 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001994 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001995 .name = "Grand X-Guard / Trust 814PCI",
1996 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001997 /* .audio_inputs= 0, */
1998 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001999 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002000 .tuner_addr = ADDR_UNSET,
2001 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03002002 .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 -08002003 .muxsel_hook = xguard_muxsel,
2004 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002005 .no_tda7432 = 1,
2006 .pll = PLL_28,
2007 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002008
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002009 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002010 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002011 .name = "Nebula Electronics DigiTV",
2012 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002013 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002014 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002015 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002016 .no_tda7432 = 1,
2017 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002018 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002019 .tuner_addr = ADDR_UNSET,
2020 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002021 .has_remote = 1,
2022 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002023 .no_gpioirq = 1,
2024 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002025 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002026 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2027 .name = "ProVideo PV143",
2028 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002029 /* .audio_inputs= 0, */
2030 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002031 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002032 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002033 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .needs_tvaudio = 0,
2035 .no_msp34xx = 1,
2036 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002037 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002038 .tuner_addr = ADDR_UNSET,
2039 },
Dirk Heer05583622008-11-21 19:00:55 -03002040 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002041 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002042 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002044 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 .svhs = 3,
2046 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002047 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002048 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002049 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002050 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002051 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002052 .tuner_addr = ADDR_UNSET,
2053 },
Dirk Heer05583622008-11-21 19:00:55 -03002054 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2055 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002056 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002057 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002058 .svhs = 3,
2059 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002060 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002061 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002062 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002063 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002064 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002065 .tuner_addr = ADDR_UNSET,
2066 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002067
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002068 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002069 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002070 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2071 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002072 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002073 .svhs = 9,
2074 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002075 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002076 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002077 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002078 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002079 .needs_tvaudio = 1,
2080 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002081 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002082 .tuner_addr = ADDR_UNSET,
2083 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002084 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002085 .name = "PHYTEC VD-009 Combi (bt878)",
2086 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002087 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002088 .svhs = 9,
2089 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002090 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002091 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002092 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002093 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002094 .needs_tvaudio = 1,
2095 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002096 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002097 .tuner_addr = ADDR_UNSET,
2098 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002099 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002100 .name = "IVC-100",
2101 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002102 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002103 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002104 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002105 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002106 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002107 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002108 .pll = PLL_28,
2109 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002110 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002111 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2112 .name = "IVC-120G",
2113 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002114 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002115 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002116 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002117 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002118 .needs_tvaudio = 0,
2119 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002120 .no_tda7432 = 1,
2121 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002122 .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 -08002123 .muxsel_hook = ivc120_muxsel,
2124 .pll = PLL_28,
2125 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002126
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002128 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002129 .name = "pcHDTV HD-2000 TV",
2130 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002131 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002132 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002133 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002134 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002135 .tuner_addr = ADDR_UNSET,
2136 .has_dvb = 1,
2137 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002138 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002139 .name = "Twinhan DST + clones",
2140 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002141 .no_tda7432 = 1,
2142 .tuner_type = TUNER_ABSENT,
2143 .tuner_addr = ADDR_UNSET,
2144 .no_video = 1,
2145 .has_dvb = 1,
2146 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002147 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002148 .name = "Winfast VC100",
2149 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002150 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002151 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002152 /* Vid In, SVid In, Vid over SVid in connector */
2153 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002154 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002155 .no_tda7432 = 1,
2156 .tuner_type = TUNER_ABSENT,
2157 .tuner_addr = ADDR_UNSET,
2158 .pll = PLL_28,
2159 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002160 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002161 .name = "Teppro TEV-560/InterVision IV-560",
2162 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002163 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002164 .svhs = 2,
2165 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002166 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002167 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002168 .needs_tvaudio = 1,
2169 .tuner_type = TUNER_PHILIPS_PAL,
2170 .tuner_addr = ADDR_UNSET,
2171 .pll = PLL_35,
2172 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002173
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002174 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002175 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002176 .name = "SIMUS GVC1100",
2177 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002178 /* .audio_inputs= 0, */
2179 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002180 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002181 .tuner_addr = ADDR_UNSET,
2182 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002183 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002184 .gpiomask = 0x3F,
2185 .muxsel_hook = gvc1100_muxsel,
2186 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002187 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002188 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2189 .name = "NGS NGSTV+",
2190 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002191 .svhs = 2,
2192 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002193 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002194 .gpiomux = { 0, 0, 0, 0 },
2195 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002196 .pll = PLL_28,
2197 .tuner_type = TUNER_PHILIPS_PAL,
2198 .tuner_addr = ADDR_UNSET,
2199 .has_remote = 1,
2200 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002201 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002202 /* http://linuxmedialabs.com */
2203 .name = "LMLBT4",
2204 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002205 /* .audio_inputs= 0, */
2206 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002207 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002208 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002209 .no_tda7432 = 1,
2210 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002211 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002212 .tuner_addr = ADDR_UNSET,
2213 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002214 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2216 .name = "Tekram M205 PRO",
2217 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002218 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002219 .tuner_type = TUNER_PHILIPS_PAL,
2220 .tuner_addr = ADDR_UNSET,
2221 .svhs = 2,
2222 .needs_tvaudio = 0,
2223 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002224 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002225 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002226 .pll = PLL_28,
2227 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002228
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002229 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002230 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 /* Javier Cendan Ares <jcendan@lycos.es> */
2232 /* bt878 TV + FM without subsystem ID */
2233 .name = "Conceptronic CONTVFMi",
2234 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002235 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002236 .svhs = 2,
2237 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002238 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002239 .gpiomux = { 0, 1, 2, 2 },
2240 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002241 .needs_tvaudio = 0,
2242 .pll = PLL_28,
2243 .tuner_type = TUNER_PHILIPS_PAL,
2244 .tuner_addr = ADDR_UNSET,
2245 .has_remote = 1,
2246 .has_radio = 1,
2247 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002248 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002249 /*Eric DEBIEF <debief@telemsa.com>*/
Lucas De Marchi25985ed2011-03-30 22:57:33 -03002250 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2251 /* 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 -08002252 /*0x79 in bttv.h*/
2253 .name = "Euresys Picolo Tetra",
2254 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002255 /* .audio_inputs= 0, */
2256 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002257 .gpiomask = 0,
2258 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2259 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002260 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002261 /*878A input is always MUX0, see above.*/
2262 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002263 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002264 .pll = PLL_28,
2265 .needs_tvaudio = 0,
2266 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002267 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002268 .tuner_addr = ADDR_UNSET,
2269 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002270 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002271 /* Spirit TV Tuner from http://spiritmodems.com.au */
2272 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2273 .name = "Spirit TV Tuner",
2274 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002275 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002276 .svhs = 2,
2277 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002278 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002279 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002280 .tuner_type = TUNER_TEMIC_PAL,
2281 .tuner_addr = ADDR_UNSET,
2282 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002283 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002284 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002285 /* Wolfram Joost <wojo@frokaschwei.de> */
2286 .name = "AVerMedia AVerTV DVB-T 771",
2287 .video_inputs = 2,
2288 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002289 .tuner_type = TUNER_ABSENT,
2290 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002291 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002293 .no_tda7432 = 1,
2294 .pll = PLL_28,
2295 .has_dvb = 1,
2296 .no_gpioirq = 1,
2297 .has_remote = 1,
2298 },
2299 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002300 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002301 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002302 /* 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 -08002303 .name = "AverMedia AverTV DVB-T 761",
2304 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002305 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002306 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002307 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .no_tda7432 = 1,
2309 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002310 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002311 .tuner_addr = ADDR_UNSET,
2312 .has_dvb = 1,
2313 .no_gpioirq = 1,
2314 .has_remote = 1,
2315 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002316 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002317 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002318 .name = "MATRIX Vision Sigma-SQ",
2319 .video_inputs = 16,
2320 /* .audio_inputs= 0, */
2321 .svhs = NO_SVHS,
2322 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002323 .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 -03002324 .muxsel_hook = sigmaSQ_muxsel,
2325 .gpiomux = { 0 },
2326 .no_msp34xx = 1,
2327 .pll = PLL_28,
2328 .tuner_type = TUNER_ABSENT,
2329 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002330 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002331 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002332 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002333 .name = "MATRIX Vision Sigma-SLC",
2334 .video_inputs = 4,
2335 /* .audio_inputs= 0, */
2336 .svhs = NO_SVHS,
2337 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002338 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002339 .muxsel_hook = sigmaSLC_muxsel,
2340 .gpiomux = { 0 },
2341 .no_msp34xx = 1,
2342 .pll = PLL_28,
2343 .tuner_type = TUNER_ABSENT,
2344 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002345 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002346 /* BTTV_BOARD_APAC_VIEWCOMP */
2347 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002348 /* Attila Kondoros <attila.kondoros@chello.hu> */
2349 /* bt878 TV + FM 0x00000000 subsystem ID */
2350 .name = "APAC Viewcomp 878(AMAX)",
2351 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002352 /* .audio_inputs= 1, */
2353 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002354 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002355 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002356 .gpiomux = { 2, 0, 0, 0 },
2357 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002358 .needs_tvaudio = 0,
2359 .pll = PLL_28,
2360 .tuner_type = TUNER_PHILIPS_PAL,
2361 .tuner_addr = ADDR_UNSET,
2362 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2363 .has_radio = 1, /* not every card has radio */
2364 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002365
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002366 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002367 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002368 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2369 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002371 .no_tda7432 = 1,
2372 .pll = PLL_28,
2373 .no_video = 1,
2374 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002375 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002376 .tuner_addr = ADDR_UNSET,
2377 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002378 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 /* Steven <photon38@pchome.com.tw> */
2380 .name = "V-Gear MyVCD",
2381 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002382 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002383 .svhs = 2,
2384 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002385 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002386 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2387 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002388 .no_msp34xx = 1,
2389 .pll = PLL_28,
2390 .tuner_type = TUNER_PHILIPS_NTSC_M,
2391 .tuner_addr = ADDR_UNSET,
2392 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002393 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002394 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002395 /* Rick C <cryptdragoon@gmail.com> */
2396 .name = "Super TV Tuner",
2397 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002398 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002399 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002400 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002401 .tuner_type = TUNER_PHILIPS_NTSC,
2402 .tuner_addr = ADDR_UNSET,
2403 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002404 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002405 .needs_tvaudio = 1,
2406 .has_radio = 1,
2407 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002408 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002409 /* Chris Fanning <video4linux@haydon.net> */
2410 .name = "Tibet Systems 'Progress DVR' CS16",
2411 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002412 /* .audio_inputs= 0, */
2413 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002414 .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 -08002415 .pll = PLL_28,
2416 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002417 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002418 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002419 .tuner_addr = ADDR_UNSET,
2420 .muxsel_hook = tibetCS16_muxsel,
2421 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002422 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002423 /* Bill Brack <wbrack@mmm.com.hk> */
2424 /*
2425 * Note that, because of the card's wiring, the "master"
2426 * BT878A chip (i.e. the one which controls the analog switch
2427 * and must use this card type) is the 2nd one detected. The
2428 * other 3 chips should use card type 0x85, whose description
2429 * follows this one. There is a EEPROM on the card (which is
2430 * connected to the I2C of one of those other chips), but is
2431 * not currently handled. There is also a facility for a
2432 * "monitor", which is also not currently implemented.
2433 */
2434 .name = "Kodicom 4400R (master)",
2435 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002436 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002437 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002438 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002439 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002440 /* GPIO bits 0-9 used for analog switch:
2441 * 00 - 03: camera selector
2442 * 04 - 06: channel (controller) selector
2443 * 07: data (1->on, 0->off)
2444 * 08: strobe
2445 * 09: reset
2446 * bit 16 is input from sync separator for the channel
2447 */
2448 .gpiomask = 0x0003ff,
2449 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002450 .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 -08002451 .pll = PLL_28,
2452 .no_msp34xx = 1,
2453 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002454 .muxsel_hook = kodicom4400r_muxsel,
2455 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002456 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002457 /* Bill Brack <wbrack@mmm.com.hk> */
2458 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2459 * one which controls the analog switch, and must use the card type)
2460 * is the 2nd one detected. The other 3 chips should use this card
2461 * type
2462 */
2463 .name = "Kodicom 4400R (slave)",
2464 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002465 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002466 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002467 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002468 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002469 .gpiomask = 0x010000,
2470 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002471 .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 -08002472 .pll = PLL_28,
2473 .no_msp34xx = 1,
2474 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002475 .muxsel_hook = kodicom4400r_muxsel,
2476 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002477 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002478 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002479 /* Michael Henson <mhenson@clarityvi.com> */
2480 /* Adlink RTV24 with special unlock codes */
2481 .name = "Adlink RTV24",
2482 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002483 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002484 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002485 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002486 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002487 .tuner_addr = ADDR_UNSET,
2488 .pll = PLL_28,
2489 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002490 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002491 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002492 /* Michael Krufky <mkrufky@m1k.net> */
2493 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002494 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002495 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002496 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002497 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002498 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002499 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002500 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002501 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2502 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002503 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002504 .no_tda7432 = 1,
2505 .has_dvb = 1,
2506 },
2507 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002508 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002509 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002510 .name = "Acorp Y878F",
2511 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002512 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002513 .svhs = 2,
2514 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002515 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002516 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2517 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002518 .needs_tvaudio = 1,
2519 .pll = PLL_28,
2520 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2521 .tuner_addr = 0xc1 >>1,
2522 .has_radio = 1,
2523 },
2524 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002525 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002526 .name = "Conceptronic CTVFMi v2",
2527 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002528 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002529 .svhs = 2,
2530 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002531 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002532 .gpiomux = { 0, 1, 2, 2 },
2533 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002534 .needs_tvaudio = 0,
2535 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002536 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 .tuner_addr = ADDR_UNSET,
2538 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002539 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002540 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002541 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002542 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002543 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2544 .video_inputs = 5,
2545 /* .audio_inputs= 1, */
2546 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002547 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002548 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002549 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002550 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2551 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2552 .gpiomute = 0x12400,
2553 .no_msp34xx = 1,
2554 .pll = PLL_28,
2555 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002556 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002557 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002558 },
2559 /* ---- card 0x8b ---------------------------------- */
2560 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002561 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002562 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2563 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002564 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002565 .svhs = 2,
2566 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002567 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002568 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2569 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002570 .no_msp34xx = 1,
2571 .pll = PLL_28,
2572 .tuner_type = TUNER_YMEC_TVF_5533MF,
2573 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002574 .has_radio = 1,
2575 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002576 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002577 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002578 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2579 one external BNC composite input (mux 2)
2580 three internal composite inputs (unknown muxes)
2581 an 18-bit stereo A/D (CS5331A), which has:
2582 one external stereo unblanced (RCA) audio connection
2583 one (or 3?) internal stereo balanced (XLR) audio connection
2584 input is selected via gpio to a 14052B mux
2585 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2586 gain is controlled via an X9221A chip on the I2C bus @0x28
2587 sample rate is controlled via gpio to an MK1413S
2588 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2589 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002590 [BTTV_BOARD_OSPREY440] = {
2591 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002592 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002593 /* .audio_inputs= 2, */
2594 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002595 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002596 .gpiomask = 0x303,
2597 .gpiomute = 0x000, /* int + 32kHz */
2598 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002599 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002600 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002601 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002602 .no_msp34xx = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002603 .no_tda7432 = 1,
2604 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002605 /* ---- card 0x8d ---------------------------------- */
2606 [BTTV_BOARD_ASOUND_SKYEYE] = {
2607 .name = "Asound Skyeye PCTV",
2608 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002609 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002610 .svhs = 2,
2611 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002612 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002613 .gpiomux = { 2, 0, 0, 0 },
2614 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002615 .needs_tvaudio = 1,
2616 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002617 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002618 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002619 },
Bill Pechter633323f2005-11-13 16:07:50 -08002620 /* ---- card 0x8e ---------------------------------- */
2621 [BTTV_BOARD_SABRENT_TVFM] = {
2622 .name = "Sabrent TV-FM (bttv version)",
2623 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002624 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002625 .svhs = 2,
2626 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002627 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002628 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002629 .no_msp34xx = 1,
Bill Pechter633323f2005-11-13 16:07:50 -08002630 .no_tda7432 = 1,
2631 .pll = PLL_28,
2632 .tuner_type = TUNER_TNF_5335MF,
2633 .tuner_addr = ADDR_UNSET,
2634 .has_radio = 1,
2635 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002636 /* ---- card 0x8f ---------------------------------- */
2637 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2638 .name = "Hauppauge ImpactVCB (bt878)",
2639 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002640 /* .audio_inputs= 0, */
2641 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002642 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002643 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002644 .no_msp34xx = 1,
Steven Tothcd1257d2006-01-09 15:25:01 -02002645 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002646 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002647 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002648 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002649 [BTTV_BOARD_MACHTV_MAGICTV] = {
2650 /* Julian Calaby <julian.calaby@gmail.com>
2651 * Slightly different from original MachTV definition (0x60)
2652
2653 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2654 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2655 * properly (methinks) causing no keyup bits being set */
2656
2657 .name = "MagicTV", /* rebranded MachTV */
2658 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002659 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002660 .svhs = 2,
2661 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002662 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002663 .gpiomux = { 0, 1, 2, 3 },
2664 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002665 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2666 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002667 .pll = PLL_28,
2668 .has_radio = 1,
2669 .has_remote = 1,
2670 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002671 [BTTV_BOARD_SSAI_SECURITY] = {
2672 .name = "SSAI Security Video Interface",
2673 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002674 /* .audio_inputs= 0, */
2675 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002676 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002677 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002678 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002679 },
2680 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2681 .name = "SSAI Ultrasound Video Interface",
2682 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002683 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002684 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002685 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002686 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002687 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002688 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002689 /* ---- card 0x94---------------------------------- */
2690 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2691 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002692 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002693 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002694 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002695 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002696 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002697 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002698 .gpiomask = 0x00e00007,
2699 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2700 .gpiomute = 0x00c00007,
2701 .no_msp34xx = 1,
Michael Krufky27cb7862007-06-28 12:19:20 -03002702 .no_tda7432 = 1,
2703 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002704 /* ---- card 0x95---------------------------------- */
2705 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2706 .name = "Typhoon TV-Tuner PCI (50684)",
2707 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002708 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002709 .svhs = 2,
2710 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002711 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002712 .gpiomux = { 0x20001,0x10001, 0, 0 },
2713 .gpiomute = 10,
2714 .needs_tvaudio = 1,
2715 .pll = PLL_28,
2716 .tuner_type = TUNER_PHILIPS_PAL_I,
2717 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002718 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002719 [BTTV_BOARD_GEOVISION_GV600] = {
2720 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002721 .name = "Geovision GV-600",
2722 .video_inputs = 16,
2723 /* .audio_inputs= 0, */
2724 .svhs = NO_SVHS,
2725 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002726 .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 -03002727 .muxsel_hook = geovision_muxsel,
2728 .gpiomux = { 0 },
2729 .no_msp34xx = 1,
2730 .pll = PLL_28,
2731 .tuner_type = TUNER_ABSENT,
2732 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002733 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002734 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2735 /* Mauro Lacy <mauro@lacy.com.ar>
2736 * Based on MagicTV and Conceptronic CONTVFMi */
2737
2738 .name = "Kozumi KTV-01C",
2739 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002740 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002741 .svhs = 2,
2742 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002743 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002744 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002745 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002746 .needs_tvaudio = 0,
2747 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2748 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002749 .pll = PLL_28,
2750 .has_radio = 1,
2751 .has_remote = 1,
2752 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002753 [BTTV_BOARD_ENLTV_FM_2] = {
2754 /* Encore TV Tuner Pro ENL TV-FM-2
2755 Mauro Carvalho Chehab <mchehab@infradead.org */
2756 .name = "Encore ENL TV-FM-2",
2757 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002758 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002759 .svhs = 2,
2760 /* bit 6 -> IR disabled
2761 bit 18/17 = 00 -> mute
2762 01 -> enable external audio input
2763 10 -> internal audio input (mono?)
2764 11 -> internal audio input
2765 */
2766 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002767 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002768 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2769 .gpiomute = 0,
2770 .tuner_type = TUNER_TCL_MF02GIP_5N,
2771 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002772 .pll = PLL_28,
2773 .has_radio = 1,
2774 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002775 },
2776 [BTTV_BOARD_VD012] = {
2777 /* D.Heer@Phytec.de */
2778 .name = "PHYTEC VD-012 (bt878)",
2779 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002780 /* .audio_inputs= 0, */
2781 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002782 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002783 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002784 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2785 .needs_tvaudio = 0,
2786 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002787 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002788 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002789 },
2790 [BTTV_BOARD_VD012_X1] = {
2791 /* D.Heer@Phytec.de */
2792 .name = "PHYTEC VD-012-X1 (bt878)",
2793 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002794 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002795 .svhs = 3,
2796 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002797 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002798 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2799 .needs_tvaudio = 0,
2800 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002801 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002802 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002803 },
2804 [BTTV_BOARD_VD012_X2] = {
2805 /* D.Heer@Phytec.de */
2806 .name = "PHYTEC VD-012-X2 (bt878)",
2807 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002808 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002809 .svhs = 3,
2810 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002811 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002812 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2813 .needs_tvaudio = 0,
2814 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002815 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002816 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002817 },
2818 [BTTV_BOARD_GEOVISION_GV800S] = {
2819 /* Bruno Christo <bchristo@inf.ufsm.br>
2820 *
2821 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2822 * 1 audio input per BT878A = 4 audio inputs
2823 * 4 video inputs per BT878A = 16 video inputs
2824 * This is the first BT878A chip of the GV-800(S). It's the
2825 * "master" chip and it controls the video inputs through an
2826 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2827 * slaves should use card type 0x9e (following this one).
2828 * There is a EEPROM on the card which is currently not handled.
2829 * The audio input is not working yet.
2830 */
2831 .name = "Geovision GV-800(S) (master)",
2832 .video_inputs = 4,
2833 /* .audio_inputs= 1, */
2834 .tuner_type = TUNER_ABSENT,
2835 .tuner_addr = ADDR_UNSET,
2836 .svhs = NO_SVHS,
2837 .gpiomask = 0xf107f,
2838 .no_gpioirq = 1,
2839 .muxsel = MUXSEL(2, 2, 2, 2),
2840 .pll = PLL_28,
2841 .no_msp34xx = 1,
2842 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002843 .muxsel_hook = gv800s_muxsel,
2844 },
2845 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2846 /* Bruno Christo <bchristo@inf.ufsm.br>
2847 *
2848 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2849 * 1 audio input per BT878A = 4 audio inputs
2850 * 4 video inputs per BT878A = 16 video inputs
2851 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2852 * and should use this card type.
2853 * The audio input is not working yet.
2854 */
2855 .name = "Geovision GV-800(S) (slave)",
2856 .video_inputs = 4,
2857 /* .audio_inputs= 1, */
2858 .tuner_type = TUNER_ABSENT,
2859 .tuner_addr = ADDR_UNSET,
2860 .svhs = NO_SVHS,
2861 .gpiomask = 0x00,
2862 .no_gpioirq = 1,
2863 .muxsel = MUXSEL(2, 2, 2, 2),
2864 .pll = PLL_28,
2865 .no_msp34xx = 1,
2866 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002867 .muxsel_hook = gv800s_muxsel,
2868 },
Alan McIvordceaddb2009-03-12 21:43:34 -03002869 [BTTV_BOARD_PV183] = {
2870 .name = "ProVideo PV183", /* 0x9f */
2871 .video_inputs = 2,
2872 /* .audio_inputs= 0, */
2873 .svhs = NO_SVHS,
2874 .gpiomask = 0,
2875 .muxsel = MUXSEL(2, 3),
2876 .gpiomux = { 0 },
2877 .needs_tvaudio = 0,
2878 .no_msp34xx = 1,
2879 .pll = PLL_28,
2880 .tuner_type = TUNER_ABSENT,
2881 .tuner_addr = ADDR_UNSET,
2882 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002883};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002884
2885static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2886
2887/* ----------------------------------------------------------------------- */
2888
2889static unsigned char eeprom_data[256];
2890
2891/*
2892 * identify card
2893 */
2894void __devinit bttv_idcard(struct bttv *btv)
2895{
2896 unsigned int gpiobits;
2897 int i,type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002898
2899 /* read PCI subsystem ID */
Sergei Shtylyovfa1400142011-07-22 15:16:04 -03002900 btv->cardid = btv->c.pci->subsystem_device << 16;
2901 btv->cardid |= btv->c.pci->subsystem_vendor;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002902
2903 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2904 /* look for the card */
2905 for (type = -1, i = 0; cards[i].id != 0; i++)
2906 if (cards[i].id == btv->cardid)
2907 type = i;
2908
2909 if (type != -1) {
2910 /* found it */
Joe Perches8af443e2011-08-21 19:56:48 -03002911 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2912 btv->c.nr, cards[type].name, cards[type].cardnr,
2913 btv->cardid & 0xffff,
2914 (btv->cardid >> 16) & 0xffff);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002915 btv->c.type = cards[type].cardnr;
2916 } else {
2917 /* 404 */
Joe Perches8af443e2011-08-21 19:56:48 -03002918 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2919 btv->c.nr, btv->cardid & 0xffff,
2920 (btv->cardid >> 16) & 0xffff);
2921 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 -07002922 }
2923 }
2924
2925 /* let the user override the autodetected type */
2926 if (card[btv->c.nr] < bttv_num_tvcards)
2927 btv->c.type=card[btv->c.nr];
2928
2929 /* print which card config we are using */
Joe Perches8af443e2011-08-21 19:56:48 -03002930 pr_info("%d: using: %s [card=%d,%s]\n",
2931 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type,
2932 card[btv->c.nr] < bttv_num_tvcards
2933 ? "insmod option" : "autodetected");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002934
2935 /* overwrite gpio stuff ?? */
2936 if (UNSET == audioall && UNSET == audiomux[0])
2937 return;
2938
2939 if (UNSET != audiomux[0]) {
2940 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002941 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002942 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002943 gpiobits |= audiomux[i];
2944 }
2945 } else {
2946 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002947 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002948 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002949 }
2950 }
2951 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
Joe Perches8af443e2011-08-21 19:56:48 -03002952 pr_info("%d: gpio config override: mask=0x%x, mux=",
2953 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002954 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Joe Perches8af443e2011-08-21 19:56:48 -03002955 pr_cont("%s0x%x",
2956 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002957 }
Joe Perches8af443e2011-08-21 19:56:48 -03002958 pr_cont("\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002959}
2960
2961/*
2962 * (most) board specific initialisations goes here
2963 */
2964
2965/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002966static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002967{
2968 int type = -1;
2969
2970 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002971 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002972 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002973 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002974 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002975 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002976
2977 if (-1 != type) {
2978 btv->c.type = type;
Joe Perches8af443e2011-08-21 19:56:48 -03002979 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2980 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002981 }
2982}
2983
2984static void flyvideo_gpio(struct bttv *btv)
2985{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002986 int gpio, has_remote, has_radio, is_capture_only;
2987 int is_lr90, has_tda9820_tda9821;
2988 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002989
2990 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002991 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002992 gpio = gpio_read();
2993 /* FIXME: must restore OUR_EN ??? */
2994
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002995 /* all cards provide GPIO info, some have an additional eeprom
2996 * LR50: GPIO coding can be found lower right CP1 .. CP9
2997 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2998 * GPIO14-12: n.c.
2999 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003000
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003001 * lowest 3 bytes are remote control codes (no handshake needed)
3002 * xxxFFF: No remote control chip soldered
3003 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3004 * Note: Some bits are Audio_Mask !
3005 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003006 ttype = (gpio & 0x0f0000) >> 16;
3007 switch (ttype) {
3008 case 0x0:
3009 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003010 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003011 case 0x2:
3012 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003013 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003014 case 0x4:
3015 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003016 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003017 case 0x6:
3018 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003019 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003020 case 0xC:
3021 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003022 break;
3023 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003024 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003025 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003026 }
3027
3028 has_remote = gpio & 0x800000;
3029 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003030 /* unknown 0x200000;
3031 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003032 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003033 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003034 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3035 /*
3036 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003037
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003038 if (is_capture_only)
3039 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003040
Joe Perches8af443e2011-08-21 19:56:48 -03003041 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3042 btv->c.nr, has_radio ? "yes" : "no",
3043 has_remote ? "yes" : "no", tuner_type, gpio);
3044 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3045 btv->c.nr, is_lr90 ? "yes" : "no",
3046 has_tda9820_tda9821 ? "yes" : "no",
3047 is_capture_only ? "yes" : "no");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003048
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003049 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3050 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003051 btv->has_radio = has_radio;
3052
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003053 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3054 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3055 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003056 if (has_tda9820_tda9821)
3057 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003058 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003059}
3060
3061static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3062 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3063static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3064 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3065
3066static void miro_pinnacle_gpio(struct bttv *btv)
3067{
3068 int id,msp,gpio;
3069 char *info;
3070
3071 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003072 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003073 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003074 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003075 if (id < 32) {
3076 btv->tuner_type = miro_tunermap[id];
3077 if (0 == (gpio & 0x20)) {
3078 btv->has_radio = 1;
3079 if (!miro_fmtuner[id]) {
3080 btv->has_matchbox = 1;
3081 btv->mbox_we = (1<<6);
3082 btv->mbox_most = (1<<7);
3083 btv->mbox_clk = (1<<8);
3084 btv->mbox_data = (1<<9);
3085 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3086 }
3087 } else {
3088 btv->has_radio = 0;
3089 }
3090 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003091 if (btv->c.type == BTTV_BOARD_MIRO)
3092 btv->c.type = BTTV_BOARD_MIROPRO;
3093 if (btv->c.type == BTTV_BOARD_PINNACLE)
3094 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003095 }
Joe Perches8af443e2011-08-21 19:56:48 -03003096 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3097 btv->c.nr, id+1, btv->tuner_type,
3098 !btv->has_radio ? "no" :
3099 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3100 (-1 == msp) ? "no" : "yes");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003101 } else {
3102 /* new cards with microtune tuner */
3103 id = 63 - id;
3104 btv->has_radio = 0;
3105 switch (id) {
3106 case 1:
3107 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003108 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003109 break;
3110 case 2:
3111 info = "PAL+SECAM / stereo";
3112 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003113 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003114 break;
3115 case 3:
3116 info = "NTSC / stereo";
3117 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003118 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003119 break;
3120 case 4:
3121 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003122 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003123 break;
3124 case 5:
3125 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003126 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003127 break;
3128 case 6:
3129 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003130 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003131 break;
3132 case 7:
3133 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003134 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003135 break;
3136 default:
3137 info = "oops: unknown card";
3138 break;
3139 }
3140 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003141 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Joe Perches8af443e2011-08-21 19:56:48 -03003142 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3143 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003144 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003145 }
3146}
3147
3148/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3149#define LM1882_SYNC_DRIVE 0x200000L
3150
3151static void init_ids_eagle(struct bttv *btv)
3152{
3153 gpio_inout(0xffffff,0xFFFF37);
3154 gpio_write(0x200020);
3155
3156 /* flash strobe inverter ?! */
3157 gpio_write(0x200024);
3158
3159 /* switch sync drive off */
3160 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3161
3162 /* set BT848 muxel to 2 */
3163 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3164}
3165
3166/* Muxsel helper for the IDS Eagle.
3167 * the eagles does not use the standard muxsel-bits but
3168 * has its own multiplexer */
3169static void eagle_muxsel(struct bttv *btv, unsigned int input)
3170{
Trent Piepho430390e2009-01-28 21:32:59 -03003171 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003172
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003173 /* composite */
3174 /* set chroma ADC to sleep */
3175 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3176 /* set to composite video */
3177 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3178 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003179
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003180 /* switch sync drive off */
3181 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003182}
3183
3184static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3185{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003186 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003187 gpio_write(masks[input%4]);
3188}
3189
3190/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3191 alarms output
3192
3193 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3194 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3195
3196 IN - sensor inputs, INx - sensor inputs and TI XORed together
3197 O1,O2,O3 - alarm outputs (relays)
3198
3199 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3200
3201*/
3202
3203static void init_lmlbt4x(struct bttv *btv)
3204{
Joe Perches8af443e2011-08-21 19:56:48 -03003205 pr_debug("LMLBT4x init\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003206 btwrite(0x000000, BT848_GPIO_REG_INP);
3207 gpio_inout(0xffffff, 0x0006C0);
3208 gpio_write(0x000000);
3209}
3210
3211static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3212{
3213 unsigned int inmux = input % 8;
3214 gpio_inout( 0xf, 0xf );
3215 gpio_bits( 0xf, inmux );
3216}
3217
3218static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3219{
3220 unsigned int inmux = input % 4;
3221 gpio_inout( 3<<9, 3<<9 );
3222 gpio_bits( 3<<9, inmux<<9 );
3223}
3224
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003225static void geovision_muxsel(struct bttv *btv, unsigned int input)
3226{
3227 unsigned int inmux = input % 16;
3228 gpio_inout(0xf, 0xf);
3229 gpio_bits(0xf, inmux);
3230}
3231
Linus Torvalds1da177e2005-04-16 15:20:36 -07003232/* ----------------------------------------------------------------------- */
3233
3234static void bttv_reset_audio(struct bttv *btv)
3235{
3236 /*
3237 * BT878A has a audio-reset register.
3238 * 1. This register is an audio reset function but it is in
3239 * function-0 (video capture) address space.
3240 * 2. It is enough to do this once per power-up of the card.
3241 * 3. There is a typo in the Conexant doc -- it is not at
3242 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3243 * --//Shrikumar 030609
3244 */
3245 if (btv->id != 878)
3246 return;
3247
3248 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03003249 pr_debug("%d: BT878A ARESET\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003250 btwrite((1<<7), 0x058);
3251 udelay(10);
3252 btwrite( 0, 0x058);
3253}
3254
3255/* initialization part one -- before registering i2c bus */
3256void __devinit bttv_init_card1(struct bttv *btv)
3257{
3258 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003259 case BTTV_BOARD_HAUPPAUGE:
3260 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003261 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003262 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003263 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003264 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003265 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003266 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003267 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003268 boot_msp34xx(btv,11);
3269 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003270 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003271 pvr_boot(btv);
3272 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003273 case BTTV_BOARD_TWINHAN_DST:
3274 case BTTV_BOARD_AVDVBT_771:
3275 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003276 btv->use_i2c_hw = 1;
3277 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003278 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003279 init_RTV24( btv );
3280 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003281
Linus Torvalds1da177e2005-04-16 15:20:36 -07003282 }
3283 if (!bttv_tvcards[btv->c.type].has_dvb)
3284 bttv_reset_audio(btv);
3285}
3286
3287/* initialization part two -- after registering i2c bus */
3288void __devinit bttv_init_card2(struct bttv *btv)
3289{
Trent Piephoac7dc842007-06-28 17:51:08 -03003290 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003291
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003292 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003293 bttv_readee(btv,eeprom_data,0xa0);
3294 identify_by_eeprom(btv,eeprom_data);
3295 }
3296
3297 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003298 case BTTV_BOARD_MIRO:
3299 case BTTV_BOARD_MIROPRO:
3300 case BTTV_BOARD_PINNACLE:
3301 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003302 /* miro/pinnacle */
3303 miro_pinnacle_gpio(btv);
3304 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003305 case BTTV_BOARD_FLYVIDEO_98:
3306 case BTTV_BOARD_MAXI:
3307 case BTTV_BOARD_LIFE_FLYKIT:
3308 case BTTV_BOARD_FLYVIDEO:
3309 case BTTV_BOARD_TYPHOON_TVIEW:
3310 case BTTV_BOARD_CHRONOS_VS2:
3311 case BTTV_BOARD_FLYVIDEO_98FM:
3312 case BTTV_BOARD_FLYVIDEO2000:
3313 case BTTV_BOARD_FLYVIDEO98EZ:
3314 case BTTV_BOARD_CONFERENCETV:
3315 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003316 flyvideo_gpio(btv);
3317 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003318 case BTTV_BOARD_HAUPPAUGE:
3319 case BTTV_BOARD_HAUPPAUGE878:
3320 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003321 /* pick up some config infos from the eeprom */
3322 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003323 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003324 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003325 case BTTV_BOARD_AVERMEDIA98:
3326 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003327 bttv_readee(btv,eeprom_data,0xa0);
3328 avermedia_eeprom(btv);
3329 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003330 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003331 init_PXC200(btv);
3332 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003333 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003334 picolo_tetra_init(btv);
3335 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003336 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003337 btv->has_radio = 1;
3338 btv->has_matchbox = 1;
3339 btv->mbox_we = 0x20;
3340 btv->mbox_most = 0;
3341 btv->mbox_clk = 0x08;
3342 btv->mbox_data = 0x10;
3343 btv->mbox_mask = 0x38;
3344 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003345 case BTTV_BOARD_VOBIS_BOOSTAR:
3346 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003347 terratec_active_radio_upgrade(btv);
3348 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003349 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003350 if (btv->cardid == 0x3002144f) {
3351 btv->has_radio=1;
Joe Perches8af443e2011-08-21 19:56:48 -03003352 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3353 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003354 }
3355 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003356 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003357 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003358 /* Fix up entry for 3DFX VoodooTV 100,
3359 which is an OEM STB card variant. */
3360 btv->has_radio=0;
3361 btv->tuner_type=TUNER_TEMIC_NTSC;
3362 }
3363 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003364 case BTTV_BOARD_OSPREY1x0:
3365 case BTTV_BOARD_OSPREY1x0_848:
3366 case BTTV_BOARD_OSPREY101_848:
3367 case BTTV_BOARD_OSPREY1x1:
3368 case BTTV_BOARD_OSPREY1x1_SVID:
3369 case BTTV_BOARD_OSPREY2xx:
3370 case BTTV_BOARD_OSPREY2x0_SVID:
3371 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003372 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003373 case BTTV_BOARD_OSPREY500:
3374 case BTTV_BOARD_OSPREY540:
3375 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003376 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003377 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003378 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003379 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003380 init_ids_eagle(btv);
3381 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003382 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003383 bttv_readee(btv,eeprom_data,0xa0);
3384 modtec_eeprom(btv);
3385 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003386 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003387 init_lmlbt4x(btv);
3388 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003389 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003390 tibetCS16_init(btv);
3391 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003392 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003393 kodicom4400r_init(btv);
3394 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003395 case BTTV_BOARD_GEOVISION_GV800S:
3396 gv800s_init(btv);
3397 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003398 }
3399
3400 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003401 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003402 /* defaults from card list */
3403 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3404 btv->pll.pll_ifreq=28636363;
3405 btv->pll.pll_crystal=BT848_IFORM_XT0;
3406 }
3407 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3408 btv->pll.pll_ifreq=35468950;
3409 btv->pll.pll_crystal=BT848_IFORM_XT1;
3410 }
3411 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003412 switch (pll[btv->c.nr]) {
3413 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003414 btv->pll.pll_crystal = 0;
3415 btv->pll.pll_ifreq = 0;
3416 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003417 break;
3418 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003419 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003420 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003421 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003422 btv->pll.pll_crystal = BT848_IFORM_XT0;
3423 break;
3424 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003425 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003426 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003427 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003428 btv->pll.pll_crystal = BT848_IFORM_XT1;
3429 break;
3430 }
3431 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003432 btv->pll.pll_current = -1;
3433
Linus Torvalds1da177e2005-04-16 15:20:36 -07003434 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003435 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003436 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003437 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003438 if (UNSET != tuner[btv->c.nr])
3439 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003440
Trent Piephoabb03622009-01-28 21:32:59 -03003441 if (btv->tuner_type == TUNER_ABSENT)
Joe Perches8af443e2011-08-21 19:56:48 -03003442 pr_info("%d: tuner absent\n", btv->c.nr);
3443 else if (btv->tuner_type == UNSET)
3444 pr_warn("%d: tuner type unset\n", btv->c.nr);
Trent Piephoac7dc842007-06-28 17:51:08 -03003445 else
Joe Perches8af443e2011-08-21 19:56:48 -03003446 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003447
Hans Verkuil859f0272009-03-28 08:29:00 -03003448 if (autoload != UNSET) {
Joe Perches8af443e2011-08-21 19:56:48 -03003449 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr);
3450 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3451 btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003452 }
3453
Trent Piephoabb03622009-01-28 21:32:59 -03003454 if (UNSET == btv->tuner_type)
3455 btv->tuner_type = TUNER_ABSENT;
3456
Trent Piepho5221e212009-01-28 21:32:59 -03003457 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3458 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003459 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3460 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003461 if (svhs[btv->c.nr] != UNSET)
3462 btv->svhs = svhs[btv->c.nr];
3463 if (remote[btv->c.nr] != UNSET)
3464 btv->has_remote = remote[btv->c.nr];
3465
3466 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003467 btv->has_radio = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003468 if (bttv_tvcards[btv->c.type].has_remote)
Hans Verkuil2c905772009-07-20 08:14:17 -03003469 btv->has_remote = 1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003470 if (!bttv_tvcards[btv->c.type].no_gpioirq)
Hans Verkuil2c905772009-07-20 08:14:17 -03003471 btv->gpioirq = 1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003472 if (bttv_tvcards[btv->c.type].volume_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003473 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003474 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003475 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003476
Trent Piephoabb03622009-01-28 21:32:59 -03003477 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003478 return; /* no tuner or related drivers to load */
3479
Hans Verkuil859f0272009-03-28 08:29:00 -03003480 if (btv->has_saa6588 || saa6588[btv->c.nr]) {
3481 /* Probe for RDS receiver chip */
3482 static const unsigned short addrs[] = {
3483 0x20 >> 1,
3484 0x22 >> 1,
3485 I2C_CLIENT_END
3486 };
3487 struct v4l2_subdev *sd;
3488
Hans Verkuil53dacb12009-08-10 02:49:08 -03003489 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003490 &btv->c.i2c_adap, "saa6588", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003491 btv->has_saa6588 = (sd != NULL);
3492 }
3493
Linus Torvalds1da177e2005-04-16 15:20:36 -07003494 /* try to detect audio/fader chips */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003495
Hans Verkuil859f0272009-03-28 08:29:00 -03003496 /* First check if the user specified the audio chip via a module
3497 option. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003498
Hans Verkuil859f0272009-03-28 08:29:00 -03003499 switch (audiodev[btv->c.nr]) {
3500 case -1:
3501 return; /* do not load any audio module */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003502
Hans Verkuil859f0272009-03-28 08:29:00 -03003503 case 0: /* autodetect */
3504 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003505
Hans Verkuil859f0272009-03-28 08:29:00 -03003506 case 1: {
3507 /* The user specified that we should probe for msp3400 */
3508 static const unsigned short addrs[] = {
3509 I2C_ADDR_MSP3400 >> 1,
3510 I2C_ADDR_MSP3400_ALT >> 1,
3511 I2C_CLIENT_END
3512 };
3513
Hans Verkuil53dacb12009-08-10 02:49:08 -03003514 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003515 &btv->c.i2c_adap, "msp3400", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003516 if (btv->sd_msp34xx)
3517 return;
3518 goto no_audio;
3519 }
3520
3521 case 2: {
3522 /* The user specified that we should probe for tda7432 */
3523 static const unsigned short addrs[] = {
3524 I2C_ADDR_TDA7432 >> 1,
3525 I2C_CLIENT_END
3526 };
3527
Hans Verkuil53dacb12009-08-10 02:49:08 -03003528 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003529 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003530 return;
3531 goto no_audio;
3532 }
3533
3534 case 3: {
3535 /* The user specified that we should probe for tvaudio */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003536 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003537 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003538 if (btv->sd_tvaudio)
3539 return;
3540 goto no_audio;
3541 }
3542
3543 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003544 pr_warn("%d: unknown audiodev value!\n", btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003545 return;
3546 }
3547
3548 /* There were no overrides, so now we try to discover this through the
3549 card definition */
3550
3551 /* probe for msp3400 first: this driver can detect whether or not
3552 it really is a msp3400, so it will return NULL when the device
3553 found is really something else (e.g. a tea6300). */
3554 if (!bttv_tvcards[btv->c.type].no_msp34xx) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003555 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003556 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003557 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003558 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003559 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003560 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003561 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003562 }
3563
3564 /* If we found a msp34xx, then we're done. */
3565 if (btv->sd_msp34xx)
3566 return;
3567
3568 /* it might also be a tda7432. */
3569 if (!bttv_tvcards[btv->c.type].no_tda7432) {
3570 static const unsigned short addrs[] = {
3571 I2C_ADDR_TDA7432 >> 1,
3572 I2C_CLIENT_END
3573 };
3574
Hans Verkuil53dacb12009-08-10 02:49:08 -03003575 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003576 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003577 return;
3578 }
3579
3580 /* Now see if we can find one of the tvaudio devices. */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003581 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003582 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003583 if (btv->sd_tvaudio)
3584 return;
3585
3586no_audio:
Joe Perches8af443e2011-08-21 19:56:48 -03003587 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003588}
3589
3590
Hans Verkuil2c905772009-07-20 08:14:17 -03003591/* initialize the tuner */
3592void __devinit bttv_init_tuner(struct bttv *btv)
3593{
3594 int addr = ADDR_UNSET;
3595
3596 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3597 addr = bttv_tvcards[btv->c.type].tuner_addr;
3598
3599 if (btv->tuner_type != TUNER_ABSENT) {
3600 struct tuner_setup tun_setup;
3601
3602 /* Load tuner module before issuing tuner config call! */
3603 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003604 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003605 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003606 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3607 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003608 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003609 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3610 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003611 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003612 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
Hans Verkuil2c905772009-07-20 08:14:17 -03003613
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003614 tun_setup.mode_mask = T_ANALOG_TV;
Hans Verkuil2c905772009-07-20 08:14:17 -03003615 tun_setup.type = btv->tuner_type;
3616 tun_setup.addr = addr;
3617
3618 if (bttv_tvcards[btv->c.type].has_radio)
3619 tun_setup.mode_mask |= T_RADIO;
3620
3621 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3622 }
3623
3624 if (btv->tda9887_conf) {
3625 struct v4l2_priv_tun_config tda9887_cfg;
3626
3627 tda9887_cfg.tuner = TUNER_TDA9887;
3628 tda9887_cfg.priv = &btv->tda9887_conf;
3629
3630 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3631 }
3632}
3633
Linus Torvalds1da177e2005-04-16 15:20:36 -07003634/* ----------------------------------------------------------------------- */
3635
3636static void modtec_eeprom(struct bttv *btv)
3637{
3638 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3639 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003640 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3641 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003642 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3643 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003644 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3645 btv->c.nr, &eeprom_data[0x1e]);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003646 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3647 btv->tuner_type=TUNER_PHILIPS_NTSC;
Joe Perches8af443e2011-08-21 19:56:48 -03003648 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3649 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003650 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003651 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3652 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003653 }
3654}
3655
3656static void __devinit hauppauge_eeprom(struct bttv *btv)
3657{
3658 struct tveeprom tv;
3659
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003660 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003661 btv->tuner_type = tv.tuner_type;
3662 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003663
Joe Perches8af443e2011-08-21 19:56:48 -03003664 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003665 btv->c.nr, tv.model);
3666
3667 /*
3668 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3669 * type based on model #.
3670 */
3671 if(tv.model == 64900) {
Joe Perches8af443e2011-08-21 19:56:48 -03003672 pr_info("%d: Switching board type from %s to %s\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003673 btv->c.nr,
3674 bttv_tvcards[btv->c.type].name,
3675 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3676 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3677 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003678}
3679
3680static int terratec_active_radio_upgrade(struct bttv *btv)
3681{
3682 int freq;
3683
3684 btv->has_radio = 1;
3685 btv->has_matchbox = 1;
3686 btv->mbox_we = 0x10;
3687 btv->mbox_most = 0x20;
3688 btv->mbox_clk = 0x08;
3689 btv->mbox_data = 0x04;
3690 btv->mbox_mask = 0x3c;
3691
3692 btv->mbox_iow = 1 << 8;
3693 btv->mbox_ior = 1 << 9;
3694 btv->mbox_csel = 1 << 10;
3695
3696 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003697 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003698 if (0x1ed8 == tea5757_read(btv)) {
Joe Perches8af443e2011-08-21 19:56:48 -03003699 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003700 btv->has_radio = 1;
Hans Verkuil859f0272009-03-28 08:29:00 -03003701 btv->has_saa6588 = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003702 btv->has_matchbox = 1;
3703 } else {
3704 btv->has_radio = 0;
3705 btv->has_matchbox = 0;
3706 }
3707 return 0;
3708}
3709
3710
3711/* ----------------------------------------------------------------------- */
3712
3713/*
3714 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3715 *
3716 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3717 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3718 * unpacked with unzip).
3719 */
3720#define PVR_GPIO_DELAY 10
3721
3722#define BTTV_ALT_DATA 0x000001
3723#define BTTV_ALT_DCLK 0x100000
3724#define BTTV_ALT_NCONFIG 0x800000
3725
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003726static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3727 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003728{
3729 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003730 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003731 int i;
3732
3733 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3734 gpio_write(0);
3735 udelay(PVR_GPIO_DELAY);
3736
3737 gpio_write(BTTV_ALT_NCONFIG);
3738 udelay(PVR_GPIO_DELAY);
3739
3740 for (n = 0; n < microlen; n++) {
3741 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003742 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003743 gpio_bits(BTTV_ALT_DCLK,0);
3744 if (bits & 0x01)
3745 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3746 else
3747 gpio_bits(BTTV_ALT_DATA,0);
3748 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3749 bits >>= 1;
3750 }
3751 }
3752 gpio_bits(BTTV_ALT_DCLK,0);
3753 udelay(PVR_GPIO_DELAY);
3754
3755 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3756 for (i = 0 ; i < 30 ; i++) {
3757 gpio_bits(BTTV_ALT_DCLK,0);
3758 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3759 }
3760 gpio_bits(BTTV_ALT_DCLK,0);
3761 return 0;
3762}
3763
3764static int __devinit pvr_boot(struct bttv *btv)
3765{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003766 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003767 int rc;
3768
3769 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3770 if (rc != 0) {
Joe Perches8af443e2011-08-21 19:56:48 -03003771 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003772 return rc;
3773 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003774 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
Joe Perches8af443e2011-08-21 19:56:48 -03003775 pr_info("%d: altera firmware upload %s\n",
3776 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003777 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003778 return rc;
3779}
3780
3781/* ----------------------------------------------------------------------- */
3782/* some osprey specific stuff */
3783
Trent Piephocf784d52007-07-21 21:26:40 -03003784static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003785{
Trent Piephocf784d52007-07-21 21:26:40 -03003786 int i;
3787 u32 serial = 0;
3788 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003789
Trent Piephocf784d52007-07-21 21:26:40 -03003790 /* This code will nevery actually get called in this case.... */
3791 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3792 /* this might be an antique... check for MMAC label in eeprom */
3793 if (!strncmp(ee, "MMAC", 4)) {
3794 u8 checksum = 0;
3795 for (i = 0; i < 21; i++)
3796 checksum += ee[i];
3797 if (checksum != ee[21])
3798 return;
3799 cardid = BTTV_BOARD_OSPREY1x0_848;
3800 for (i = 12; i < 21; i++)
3801 serial *= 10, serial += ee[i] - '0';
3802 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003803 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003804 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003805
Trent Piephocf784d52007-07-21 21:26:40 -03003806 for (i = 4*16; i < 8*16; i += 16) {
3807 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003808
Trent Piephocf784d52007-07-21 21:26:40 -03003809 if ((checksum&0xff) + (checksum>>8) == 0xff)
3810 break;
3811 }
3812 if (i >= 8*16)
3813 return;
3814 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003815
Trent Piephocf784d52007-07-21 21:26:40 -03003816 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003817 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003818
Trent Piephocf784d52007-07-21 21:26:40 -03003819 switch(type) {
3820 /* 848 based */
3821 case 0x0004:
3822 cardid = BTTV_BOARD_OSPREY1x0_848;
3823 break;
3824 case 0x0005:
3825 cardid = BTTV_BOARD_OSPREY101_848;
3826 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003827
Trent Piephocf784d52007-07-21 21:26:40 -03003828 /* 878 based */
3829 case 0x0012:
3830 case 0x0013:
3831 cardid = BTTV_BOARD_OSPREY1x0;
3832 break;
3833 case 0x0014:
3834 case 0x0015:
3835 cardid = BTTV_BOARD_OSPREY1x1;
3836 break;
3837 case 0x0016:
3838 case 0x0017:
3839 case 0x0020:
3840 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3841 break;
3842 case 0x0018:
3843 case 0x0019:
3844 case 0x001E:
3845 case 0x001F:
3846 cardid = BTTV_BOARD_OSPREY2xx;
3847 break;
3848 case 0x001A:
3849 case 0x001B:
3850 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3851 break;
3852 case 0x0040:
3853 cardid = BTTV_BOARD_OSPREY500;
3854 break;
3855 case 0x0050:
3856 case 0x0056:
3857 cardid = BTTV_BOARD_OSPREY540;
3858 /* bttv_osprey_540_init(btv); */
3859 break;
3860 case 0x0060:
3861 case 0x0070:
3862 case 0x00A0:
3863 cardid = BTTV_BOARD_OSPREY2x0;
3864 /* enable output on select control lines */
3865 gpio_inout(0xffffff,0x000303);
3866 break;
3867 case 0x00D8:
3868 cardid = BTTV_BOARD_OSPREY440;
3869 break;
3870 default:
3871 /* unknown...leave generic, but get serial # */
Joe Perches8af443e2011-08-21 19:56:48 -03003872 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
3873 btv->c.nr, type);
Trent Piephocf784d52007-07-21 21:26:40 -03003874 break;
3875 }
Al Viroc1c36f32008-05-21 00:32:21 -03003876 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003877 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003878
Joe Perches8af443e2011-08-21 19:56:48 -03003879 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
3880 btv->c.nr, cardid,
3881 cardid > 0 ? bttv_tvcards[cardid].name : "Unknown", serial);
Trent Piephocf784d52007-07-21 21:26:40 -03003882
3883 if (cardid<0 || btv->c.type == cardid)
3884 return;
3885
3886 /* card type isn't set correctly */
3887 if (card[btv->c.nr] < bttv_num_tvcards) {
Joe Perches8af443e2011-08-21 19:56:48 -03003888 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
3889 btv->c.nr);
Trent Piephocf784d52007-07-21 21:26:40 -03003890 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003891 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
3892 btv->c.nr, btv->c.type, cardid);
Trent Piephocf784d52007-07-21 21:26:40 -03003893 btv->c.type = cardid;
3894 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003895}
3896
3897/* ----------------------------------------------------------------------- */
3898/* AVermedia specific stuff, from bktr_card.c */
3899
3900static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003901 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3902 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3903 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3904 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3905 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003906 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003907
3908static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003909 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003910 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3911 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003912 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3913 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003914
3915static void __devinit avermedia_eeprom(struct bttv *btv)
3916{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003917 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003918
3919 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003920 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3921 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003922 btv->has_remote = (eeprom_data[0x42] & 0x01);
3923
3924 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003925 if (tuner_format <= 0x0a)
3926 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003927 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003928 if (tuner_format <= 9)
3929 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003930
3931 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003932 if (tuner_format == 0x09)
3933 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003934
Joe Perches8af443e2011-08-21 19:56:48 -03003935 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003936 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3937 if (tuner_type) {
3938 btv->tuner_type = tuner_type;
Joe Perches8af443e2011-08-21 19:56:48 -03003939 pr_cont("%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003940 } else
Joe Perches8af443e2011-08-21 19:56:48 -03003941 pr_cont("Unknown type");
3942 pr_cont(" radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003943 tuner_tv_fm ? "yes" : "no",
3944 btv->has_remote ? "yes" : "no");
3945}
3946
Trent Piepho72134a62009-01-28 21:32:59 -03003947/*
3948 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3949 * analog demod, which is not I2C controlled like the newer and more common
3950 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3951 * that control the IF for the video and audio. Apparently, bttv GPIO
3952 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3953 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3954 */
3955u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003956{
Trent Piepho72134a62009-01-28 21:32:59 -03003957
3958 if (btv->audio == TVAUDIO_INPUT_TUNER) {
3959 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3960 gpiobits |= 0x10000;
3961 else
3962 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003963 }
Trent Piepho72134a62009-01-28 21:32:59 -03003964
3965 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3966 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003967}
3968
3969
3970/*
3971 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003972 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003973 *
3974 * Hauppauge: pin 5
3975 * Voodoo: pin 20
3976 */
3977static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3978{
3979 int mask = (1 << pin);
3980
3981 gpio_inout(mask,mask);
3982 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003983 mdelay(2);
3984 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003985 gpio_bits(mask,mask);
3986
3987 if (bttv_gpio)
3988 bttv_gpio_tracking(btv,"msp34xx");
3989 if (bttv_verbose)
Joe Perches8af443e2011-08-21 19:56:48 -03003990 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
3991 btv->c.nr, pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003992}
3993
Linus Torvalds1da177e2005-04-16 15:20:36 -07003994/* ----------------------------------------------------------------------- */
3995/* Imagenation L-Model PXC200 Framegrabber */
3996/* This is basically the same procedure as
3997 * used by Alessandro Rubini in his pxc200
3998 * driver, but using BTTV functions */
3999
4000static void __devinit init_PXC200(struct bttv *btv)
4001{
4002 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4003 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4004 0x00 };
4005 unsigned int i;
4006 int tmp;
4007 u32 val;
4008
4009 /* Initialise GPIO-connevted stuff */
4010 gpio_inout(0xffffff, (1<<13));
4011 gpio_write(0);
4012 udelay(3);
4013 gpio_write(1<<13);
4014 /* GPIO inputs are pulled up, so no need to drive
4015 * reset pin any longer */
4016 gpio_bits(0xffffff, 0);
4017 if (bttv_gpio)
4018 bttv_gpio_tracking(btv,"pxc200");
4019
4020 /* we could/should try and reset/control the AD pots? but
4021 right now we simply turned off the crushing. Without
4022 this the AGC drifts drifts
4023 remember the EN is reverse logic -->
4024 setting BT848_ADC_AGC_EN disable the AGC
4025 tboult@eecs.lehigh.edu
4026 */
4027
4028 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4029
4030 /* Initialise MAX517 DAC */
Joe Perches8af443e2011-08-21 19:56:48 -03004031 pr_info("Setting DAC reference voltage level ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004032 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4033
4034 /* Initialise 12C508 PIC */
4035 /* The I2CWrite and I2CRead commmands are actually to the
4036 * same chips - but the R/W bit is included in the address
4037 * argument so the numbers are different */
4038
4039
Joe Perches8af443e2011-08-21 19:56:48 -03004040 pr_info("Initialising 12C508 PIC chip ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004041
4042 /* First of all, enable the clock line. This is used in the PXC200-F */
4043 val = btread(BT848_GPIO_DMA_CTL);
4044 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4045 btwrite(val, BT848_GPIO_DMA_CTL);
4046
4047 /* Then, push to 0 the reset pin long enough to reset the *
4048 * device same as above for the reset line, but not the same
4049 * value sent to the GPIO-connected stuff
4050 * which one is the good one? */
4051 gpio_inout(0xffffff,(1<<2));
4052 gpio_write(0);
4053 udelay(10);
4054 gpio_write(1<<2);
4055
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004056 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004057 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4058 if (tmp != -1) {
Joe Perches8af443e2011-08-21 19:56:48 -03004059 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004060 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4061 }
4062 }
4063
Joe Perches8af443e2011-08-21 19:56:48 -03004064 pr_info("PXC200 Initialised\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004065}
4066
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004067
4068
Peter Skipworth93b43f12005-06-23 22:04:45 -07004069/* ----------------------------------------------------------------------- */
4070/*
4071 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4072 * it. This apparently involves the following procedure for each 878 chip:
4073 *
4074 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4075 *
4076 * 2) write to GPIO_DATA
4077 * - 0x0E
4078 * - sleep 1ms
4079 * - 0x10 + 0x0E
4080 * - sleep 10ms
4081 * - 0x0E
4082 * read from GPIO_DATA into buf (uint_32)
4083 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4084 * error. ERROR_CPLD_Check_Failed stop.
4085 *
4086 * 3) write to GPIO_DATA
4087 * - write 0x4400 + 0x0E
4088 * - sleep 10ms
4089 * - write 0x4410 + 0x0E
4090 * - sleep 1ms
4091 * - write 0x0E
4092 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004093 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004094 * error. ERROR_CPLD_Check_Failed.
4095 */
4096/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004097static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004098init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004099{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004100 uint32_t dataRead = 0;
4101 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004102
Joe Perches8af443e2011-08-21 19:56:48 -03004103 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004104 btv->c.nr);
4105
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004106 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004107
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004108 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4109 msleep (1);
4110 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4111 msleep (10);
4112 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004113
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004114 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004115
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004116 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004117 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004118 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004119 }
4120
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004121 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4122 msleep (10);
4123 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4124 msleep (1);
4125 btwrite (watchdog_value, BT848_GPIO_DATA);
4126 msleep (1);
4127 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004128
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004129 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004130 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004131 btv->c.nr, dataRead);
4132
Peter Skipworth93b43f12005-06-23 22:04:45 -07004133 return;
4134 }
4135
Joe Perches8af443e2011-08-21 19:56:48 -03004136 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004137}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004138
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004139
4140
Linus Torvalds1da177e2005-04-16 15:20:36 -07004141/* ----------------------------------------------------------------------- */
4142/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4143/*
4144 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4145 * This code is placed under the terms of the GNU General Public License
4146 *
4147 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4148 */
4149
4150static void bus_low(struct bttv *btv, int bit)
4151{
4152 if (btv->mbox_ior) {
4153 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4154 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4155 udelay(5);
4156 }
4157
4158 gpio_bits(bit,0);
4159 udelay(5);
4160
4161 if (btv->mbox_ior) {
4162 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4163 udelay(5);
4164 }
4165}
4166
4167static void bus_high(struct bttv *btv, int bit)
4168{
4169 if (btv->mbox_ior) {
4170 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4171 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4172 udelay(5);
4173 }
4174
4175 gpio_bits(bit,bit);
4176 udelay(5);
4177
4178 if (btv->mbox_ior) {
4179 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4180 udelay(5);
4181 }
4182}
4183
4184static int bus_in(struct bttv *btv, int bit)
4185{
4186 if (btv->mbox_ior) {
4187 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4188 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4189 udelay(5);
4190
4191 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4192 udelay(5);
4193 }
4194 return gpio_read() & (bit);
4195}
4196
4197/* TEA5757 register bits */
4198#define TEA_FREQ 0:14
4199#define TEA_BUFFER 15:15
4200
4201#define TEA_SIGNAL_STRENGTH 16:17
4202
4203#define TEA_PORT1 18:18
4204#define TEA_PORT0 19:19
4205
4206#define TEA_BAND 20:21
4207#define TEA_BAND_FM 0
4208#define TEA_BAND_MW 1
4209#define TEA_BAND_LW 2
4210#define TEA_BAND_SW 3
4211
4212#define TEA_MONO 22:22
4213#define TEA_ALLOW_STEREO 0
4214#define TEA_FORCE_MONO 1
4215
4216#define TEA_SEARCH_DIRECTION 23:23
4217#define TEA_SEARCH_DOWN 0
4218#define TEA_SEARCH_UP 1
4219
4220#define TEA_STATUS 24:24
4221#define TEA_STATUS_TUNED 0
4222#define TEA_STATUS_SEARCHING 1
4223
4224/* Low-level stuff */
4225static int tea5757_read(struct bttv *btv)
4226{
4227 unsigned long timeout;
4228 int value = 0;
4229 int i;
4230
4231 /* better safe than sorry */
4232 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4233
4234 if (btv->mbox_ior) {
4235 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4236 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4237 udelay(5);
4238 }
4239
4240 if (bttv_gpio)
4241 bttv_gpio_tracking(btv,"tea5757 read");
4242
4243 bus_low(btv,btv->mbox_we);
4244 bus_low(btv,btv->mbox_clk);
4245
4246 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004247 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004248
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004249 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004250 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4251 schedule();
4252 if (bus_in(btv,btv->mbox_data)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004253 pr_warn("%d: tea5757: read timeout\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004254 return -1;
4255 }
4256
Joe Perches8af443e2011-08-21 19:56:48 -03004257 dprintk("%d: tea5757:", btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004258 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004259 udelay(5);
4260 bus_high(btv,btv->mbox_clk);
4261 udelay(5);
Joe Perches8af443e2011-08-21 19:56:48 -03004262 dprintk_cont("%c",
4263 bus_in(btv, btv->mbox_most) == 0 ? 'T' : '-');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004264 bus_low(btv,btv->mbox_clk);
4265 value <<= 1;
4266 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
Joe Perches8af443e2011-08-21 19:56:48 -03004267 dprintk_cont("%c",
4268 bus_in(btv, btv->mbox_most) == 0 ? 'S' : 'M');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004269 }
Joe Perches8af443e2011-08-21 19:56:48 -03004270 dprintk_cont("\n");
4271 dprintk("%d: tea5757: read 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004272 return value;
4273}
4274
4275static int tea5757_write(struct bttv *btv, int value)
4276{
4277 int i;
4278 int reg = value;
4279
4280 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4281
4282 if (btv->mbox_ior) {
4283 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4284 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4285 udelay(5);
4286 }
4287 if (bttv_gpio)
4288 bttv_gpio_tracking(btv,"tea5757 write");
4289
Joe Perches8af443e2011-08-21 19:56:48 -03004290 dprintk("%d: tea5757: write 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004291 bus_low(btv,btv->mbox_clk);
4292 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004293 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004294 if (reg & 0x1000000)
4295 bus_high(btv,btv->mbox_data);
4296 else
4297 bus_low(btv,btv->mbox_data);
4298 reg <<= 1;
4299 bus_high(btv,btv->mbox_clk);
4300 udelay(10);
4301 bus_low(btv,btv->mbox_clk);
4302 udelay(10);
4303 }
4304 bus_low(btv,btv->mbox_we); /* unmute !!! */
4305 return 0;
4306}
4307
4308void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4309{
4310 dprintk("tea5757_set_freq %d\n",freq);
4311 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004312}
4313
Linus Torvalds1da177e2005-04-16 15:20:36 -07004314/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4315 *
4316 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4317 * switch instead (CD22M3494E). This IC can have multiple active connections
4318 * between Xn (input) and Yn (output) pins. We need to clear any existing
4319 * connection prior to establish a new one, pulsing the STROBE pin.
4320 *
4321 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4322 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004323 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4324 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4325 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4326 * GPIO[8] - - P3[5] (microcontroller)
4327 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4328 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4329 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004330 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004331 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4332 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004333 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004334 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004335 * note: the vendor refused to give any information on this product, all
4336 * that stuff was found using a multimeter! :)
4337 */
4338static void rv605_muxsel(struct bttv *btv, unsigned int input)
4339{
Trent Piepho13afaef2009-01-28 21:32:59 -03004340 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4341 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4342
4343 gpio_bits(0x07f, muxgpio[input]);
4344
Linus Torvalds1da177e2005-04-16 15:20:36 -07004345 /* reset all conections */
4346 gpio_bits(0x200,0x200);
4347 mdelay(1);
4348 gpio_bits(0x200,0x000);
4349 mdelay(1);
4350
Joe Perchesc84e6032008-02-03 17:18:59 +02004351 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004352 gpio_bits(0x480,0x480);
4353 mdelay(1);
4354 gpio_bits(0x480,0x080);
4355 mdelay(1);
4356}
4357
4358/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4359 *
4360 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004361 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
Linus Torvalds1da177e2005-04-16 15:20:36 -07004362 * chips, ten eight input analog multiplexors, a not chip and a few
4363 * other components.
4364 *
4365 * 16 inputs on a secondary bracket are provided and can be selected
4366 * from each of the four capture chips. Two of the eight input
4367 * multiplexors are used to select from any of the 16 input signals.
4368 *
4369 * Unsupported hardware capabilities:
4370 * . A video output monitor on the secondary bracket can be selected from
4371 * one of the 878A chips.
4372 * . Another passthrough but I haven't spent any time investigating it.
4373 * . Digital I/O (logic level connected to GPIO) is available from an
4374 * onboard header.
4375 *
4376 * The on chip input mux should always be set to 2.
4377 * GPIO[16:19] - Video input selection
4378 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4379 * GPIO[?:?] - Digital I/O.
4380 *
4381 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4382 * determined what function (if any) it provides. With the microcontroller
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004383 * and sync separator chips a guess is that it might have to do with video
Linus Torvalds1da177e2005-04-16 15:20:36 -07004384 * switching and maybe some digital I/O.
4385 */
4386static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4387{
4388 /* video mux */
4389 gpio_bits(0x0f0000, input << 16);
4390}
4391
4392static void tibetCS16_init(struct bttv *btv)
4393{
4394 /* enable gpio bits, mask obtained via btSpy */
4395 gpio_inout(0xffffff, 0x0f7fff);
4396 gpio_write(0x0f7fff);
4397}
4398
4399/*
4400 * The following routines for the Kodicom-4400r get a little mind-twisting.
4401 * There is a "master" controller and three "slave" controllers, together
4402 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4403 * The analog switch is controlled by the "master", but the detection order
4404 * of the four BT878A chips is in an order which I just don't understand.
4405 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004406 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004407 * those numbers are different from the detection sequence. When working
4408 * with the analog switch, we need to "map" from the detection sequence
4409 * over to the board's logical controller number. This mapping sequence
4410 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4411 * unit 3, the second (which is the master) is logical unit 0, etc.
4412 * We need to maintain the status of the analog switch (which of the 16
4413 * cameras is connected to which of the 4 controllers). Rather than
4414 * add to the bttv structure for this, we use the data reserved for
4415 * the mbox (unused for this card type).
4416 */
4417
4418/*
4419 * First a routine to set the analog switch, which controls which camera
4420 * is routed to which controller. The switch comprises an X-address
4421 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4422 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4423 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4424 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4425 * specified address. The idea is to set the address and data, then bring
4426 * STROBE high, and finally bring STROBE back to low.
4427 */
4428static void kodicom4400r_write(struct bttv *btv,
4429 unsigned char xaddr,
4430 unsigned char yaddr,
4431 unsigned char data) {
4432 unsigned int udata;
4433
4434 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4435 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4436 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4437 gpio_bits(0x1ff, udata); /* strobe low */
4438}
4439
4440/*
4441 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4442 * use this routine. The routine finds the "master" for the card, maps
4443 * the controller number from the detected position over to the logical
4444 * number, writes the appropriate data to the analog switch, and housekeeps
4445 * the local copy of the switch information. The parameter 'input' is the
4446 * requested camera number (0 - 15).
4447 */
4448static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4449{
4450 char *sw_status;
4451 int xaddr, yaddr;
4452 struct bttv *mctlr;
4453 static unsigned char map[4] = {3, 0, 2, 1};
4454
4455 mctlr = master[btv->c.nr];
4456 if (mctlr == NULL) { /* ignore if master not yet detected */
4457 return;
4458 }
4459 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4460 yaddr = map[yaddr];
4461 sw_status = (char *)(&mctlr->mbox_we);
4462 xaddr = input & 0xf;
4463 /* Check if the controller/camera pair has changed, else ignore */
4464 if (sw_status[yaddr] != xaddr)
4465 {
4466 /* "open" the old switch, "close" the new one, save the new */
4467 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4468 sw_status[yaddr] = xaddr;
4469 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4470 }
4471}
4472
4473/*
4474 * During initialisation, we need to reset the analog switch. We
4475 * also preset the switch to map the 4 connectors on the card to the
4476 * *user's* (see above description of kodicom4400r_muxsel) channels
4477 * 0 through 3
4478 */
4479static void kodicom4400r_init(struct bttv *btv)
4480{
4481 char *sw_status = (char *)(&btv->mbox_we);
4482 int ix;
4483
4484 gpio_inout(0x0003ff, 0x0003ff);
4485 gpio_write(1 << 9); /* reset MUX */
4486 gpio_write(0);
4487 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004488 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004489 sw_status[ix] = ix;
4490 kodicom4400r_write(btv, ix, ix, 1);
4491 }
4492 /*
4493 * Since this is the "master", we need to set up the
4494 * other three controller chips' pointers to this structure
4495 * for later use in the muxsel routine.
4496 */
4497 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4498 return;
4499 master[btv->c.nr-1] = btv;
4500 master[btv->c.nr] = btv;
4501 master[btv->c.nr+1] = btv;
4502 master[btv->c.nr+2] = btv;
4503}
4504
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004505/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4506 * video multiplexers to provide up to 16 video inputs. These
4507 * multiplexers are controlled by the lower 8 GPIO pins of the
4508 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004509
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004510 * xxx0 is pin xxx of multiplexer U5,
4511 * yyy1 is pin yyy of multiplexer U2
4512 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004513#define ENA0 0x01
4514#define ENB0 0x02
4515#define ENA1 0x04
4516#define ENB1 0x08
4517
4518#define IN10 0x10
4519#define IN00 0x20
4520#define IN11 0x40
4521#define IN01 0x80
4522
4523static void xguard_muxsel(struct bttv *btv, unsigned int input)
4524{
4525 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004526 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4527 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4528 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4529 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004530 };
4531 gpio_write(masks[input%16]);
4532}
4533static void picolo_tetra_init(struct bttv *btv)
4534{
4535 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4536 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4537 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4538}
4539static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4540{
4541
Joe Perches8af443e2011-08-21 19:56:48 -03004542 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004543 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4544 /*GPIO[20]&GPIO[21] used to choose the right input*/
4545 btwrite (input<<20,BT848_GPIO_DATA);
4546
4547}
4548
4549/*
4550 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4551 *
4552 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4553 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004554 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004555 * optional "Monitor Out" bus. This allows the card to be looking
4556 * at one input while the monitor is looking at another.
4557 *
4558 * Since I've couldn't be bothered figuring out how to add an
Lucas De Marchi25985ed2011-03-30 22:57:33 -03004559 * independent muxsel for the monitor bus, I've just set it to
Linus Torvalds1da177e2005-04-16 15:20:36 -07004560 * whatever the card is looking at.
4561 *
4562 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4563 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4564 *
4565 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4566 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4567 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4568 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4569 *
4570 */
4571
4572/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4573#define I2C_TDA8540 0x90
4574#define I2C_TDA8540_ALT1 0x92
4575#define I2C_TDA8540_ALT2 0x94
4576#define I2C_TDA8540_ALT3 0x96
4577#define I2C_TDA8540_ALT4 0x98
4578#define I2C_TDA8540_ALT5 0x9a
4579#define I2C_TDA8540_ALT6 0x9c
4580
4581static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4582{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004583 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004584 int key = input % 4;
4585 int matrix = input / 4;
4586
Joe Perches8af443e2011-08-21 19:56:48 -03004587 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004588 btv->c.nr, input, matrix, key);
4589
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004590 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004591 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4592 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4593 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4594 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4595 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4596 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4597 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4598 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4599
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004600 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004601 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004602 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004603 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004604 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004605 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004606 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004607 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004608 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004609
Trent Piephofb5deb12009-01-28 21:32:59 -03004610 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004611}
4612
4613
4614/* PXC200 muxsel helper
4615 * luke@syseng.anu.edu.au
4616 * another transplant
4617 * from Alessandro Rubini (rubini@linux.it)
4618 *
4619 * There are 4 kinds of cards:
4620 * PXC200L which is bt848
4621 * PXC200F which is bt848 with PIC controlling mux
4622 * PXC200AL which is bt878
4623 * PXC200AF which is bt878 with PIC controlling mux
4624 */
4625#define PX_CFG_PXC200F 0x01
4626#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4627#define PX_I2C_PIC 0x0f
4628#define PX_PXC200A_CARDID 0x200a1295
4629#define PX_I2C_CMD_CFG 0x00
4630
4631static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4632{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004633 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004634 long mux;
4635 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004636 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004637
4638 /* Read PIC config to determine if this is a PXC200F */
4639 /* PX_I2C_CMD_CFG*/
4640 buf[0]=0;
4641 buf[1]=0;
4642 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4643 if (rc) {
Joe Perches8af443e2011-08-21 19:56:48 -03004644 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4645 btv->c.nr, rc);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004646 /* not PXC ? do nothing */
Joe Perches8af443e2011-08-21 19:56:48 -03004647 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004648 }
4649
4650 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4651 if (!(rc & PX_CFG_PXC200F)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004652 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4653 btv->c.nr, rc);
4654 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004655 }
4656
4657
4658 /* The multiplexer in the 200F is handled by the GPIO port */
4659 /* get correct mapping between inputs */
4660 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4661 /* ** not needed!? */
4662 mux = input;
4663
4664 /* make sure output pins are enabled */
4665 /* bitmask=0x30f; */
4666 bitmask=0x302;
4667 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004668 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004669 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4670 bitmask |= 7<<4; /* the DAC */
4671 }
4672 btwrite(bitmask, BT848_GPIO_OUT_EN);
4673
4674 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004675 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004676 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4677 else /* older device */
4678 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4679 btwrite(bitmask,BT848_GPIO_DATA);
4680
4681 /*
4682 * Was "to be safe, set the bt848 to input 0"
4683 * Actually, since it's ok at load time, better not messing
4684 * with these bits (on PXC200AF you need to set mux 2 here)
4685 *
4686 * needed because bttv-driver sets mux before calling this function
4687 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004688 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004689 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4690 else /* older device */
4691 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4692
Joe Perches8af443e2011-08-21 19:56:48 -03004693 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004694}
4695
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004696static void phytec_muxsel(struct bttv *btv, unsigned int input)
4697{
4698 unsigned int mux = input % 4;
4699
4700 if (input == btv->svhs)
4701 mux = 0;
4702
4703 gpio_bits(0x3, mux);
4704}
4705
Bruno Christo0c5db422009-03-02 22:38:59 -03004706/*
4707 * GeoVision GV-800(S) functions
4708 * Bruno Christo <bchristo@inf.ufsm.br>
4709*/
4710
4711/* This is a function to control the analog switch, which determines which
4712 * camera is routed to which controller. The switch comprises an X-address
4713 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4714 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4715 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4716 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4717 * specified address. There is also a chip select (gpio bit 16).
4718 * The idea is to set the address and chip select together, bring
4719 * STROBE high, write the data, and finally bring STROBE back to low.
4720 */
4721static void gv800s_write(struct bttv *btv,
4722 unsigned char xaddr,
4723 unsigned char yaddr,
4724 unsigned char data) {
4725 /* On the "master" 878A:
4726 * GPIO bits 0-9 are used for the analog switch:
4727 * 00 - 03: camera selector
4728 * 04 - 06: 878A (controller) selector
4729 * 16: cselect
4730 * 17: strobe
4731 * 18: data (1->on, 0->off)
4732 * 19: reset
4733 */
4734 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4735 const u32 CSELECT = 1<<16;
4736 const u32 STROBE = 1<<17;
4737 const u32 DATA = data<<18;
4738
4739 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4740 gpio_bits(0x20000, STROBE); /* STROBE high */
4741 gpio_bits(0x40000, DATA); /* write DATA */
4742 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4743}
4744
4745/*
4746 * GeoVision GV-800(S) muxsel
4747 *
4748 * Each of the 4 cards (controllers) use this function.
4749 * The controller using this function selects the input through the GPIO pins
4750 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4751 *
4752 * The parameter 'input' is the requested camera number (0-4) on the controller.
4753 * The map array has the address of each input. Note that the addresses in the
4754 * array are in the sequence the original GeoVision driver uses, that is, set
4755 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4756 * the physical "camera 1" connector corresponds to controller 0 input 0,
4757 * "camera 2" corresponds to controller 1 input 0, and so on.
4758 *
4759 * After getting the input address, the function then writes the appropriate
4760 * data to the analog switch, and housekeeps the local copy of the switch
4761 * information.
4762 */
4763static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4764{
4765 struct bttv *mctlr;
4766 char *sw_status;
4767 int xaddr, yaddr;
4768 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4769 { 0x1, 0x5, 0xb, 0x7 },
4770 { 0x2, 0x8, 0xc, 0xe },
4771 { 0x3, 0x9, 0xd, 0xf } };
4772 input = input%4;
4773 mctlr = master[btv->c.nr];
4774 if (mctlr == NULL) {
4775 /* do nothing until the "master" is detected */
4776 return;
4777 }
4778 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4779 sw_status = (char *)(&mctlr->mbox_we);
4780 xaddr = map[yaddr][input] & 0xf;
4781
4782 /* Check if the controller/camera pair has changed, ignore otherwise */
4783 if (sw_status[yaddr] != xaddr) {
4784 /* disable the old switch, enable the new one and save status */
4785 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4786 sw_status[yaddr] = xaddr;
4787 gv800s_write(mctlr, xaddr, yaddr, 1);
4788 }
4789}
4790
4791/* GeoVision GV-800(S) "master" chip init */
4792static void gv800s_init(struct bttv *btv)
4793{
4794 char *sw_status = (char *)(&btv->mbox_we);
4795 int ix;
4796
4797 gpio_inout(0xf107f, 0xf107f);
4798 gpio_write(1<<19); /* reset the analog MUX */
4799 gpio_write(0);
4800
4801 /* Preset camera 0 to the 4 controllers */
4802 for (ix = 0; ix < 4; ix++) {
4803 sw_status[ix] = ix;
4804 gv800s_write(btv, ix, ix, 1);
4805 }
4806
4807 /* Inputs on the "master" controller need this brightness fix */
4808 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4809
4810 if (btv->c.nr > BTTV_MAX-4)
4811 return;
4812 /*
4813 * Store the "master" controller pointer in the master
4814 * array for later use in the muxsel function.
4815 */
4816 master[btv->c.nr] = btv;
4817 master[btv->c.nr+1] = btv;
4818 master[btv->c.nr+2] = btv;
4819 master[btv->c.nr+3] = btv;
4820}
4821
Linus Torvalds1da177e2005-04-16 15:20:36 -07004822/* ----------------------------------------------------------------------- */
4823/* motherboard chipset specific stuff */
4824
Adrian Bunk7d44e892007-12-11 19:23:43 -03004825void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004826{
4827 int pcipci_fail = 0;
4828 struct pci_dev *dev = NULL;
4829
Alan Cox3d265c92006-09-14 11:53:16 -03004830 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004831 pcipci_fail = 1;
4832 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4833 triton1 = 1;
4834 if (pci_pci_problems & PCIPCI_VSFX)
4835 vsfx = 1;
4836#ifdef PCIPCI_ALIMAGIK
4837 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4838 latency = 0x0A;
4839#endif
4840
Linus Torvalds1da177e2005-04-16 15:20:36 -07004841
4842 /* print warnings about any quirks found */
4843 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004844 pr_info("Host bridge needs ETBF enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004845 if (vsfx)
Joe Perches8af443e2011-08-21 19:56:48 -03004846 pr_info("Host bridge needs VSFX enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004847 if (pcipci_fail) {
Joe Perches8af443e2011-08-21 19:56:48 -03004848 pr_info("bttv and your chipset may not work together\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004849 if (!no_overlay) {
Joe Perches8af443e2011-08-21 19:56:48 -03004850 pr_info("overlay will be disabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004851 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004852 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03004853 pr_info("overlay forced. Use this option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004854 }
4855 }
4856 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004857 pr_info("pci latency fixup [%d]\n", latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004858 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004859 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004860 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004861 pci_read_config_byte(dev, 0x53, &b);
4862 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03004863 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4864 b);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004865 }
4866}
4867
4868int __devinit bttv_handle_chipset(struct bttv *btv)
4869{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004870 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004871
4872 if (!triton1 && !vsfx && UNSET == latency)
4873 return 0;
4874
4875 if (bttv_verbose) {
4876 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004877 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4878 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004879 if (vsfx && btv->id >= 878)
Joe Perches8af443e2011-08-21 19:56:48 -03004880 pr_info("%d: enabling VSFX\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004881 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004882 pr_info("%d: setting pci timer to %d\n",
4883 btv->c.nr, latency);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004884 }
4885
4886 if (btv->id < 878) {
4887 /* bt848 (mis)uses a bit in the irq mask for etbf */
4888 if (triton1)
4889 btv->triton1 = BT848_INT_ETBF;
4890 } else {
4891 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004892 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004893 if (triton1)
4894 command |= BT878_EN_TBFX;
4895 if (vsfx)
4896 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004897 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4898 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004899 if (UNSET != latency)
4900 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4901 return 0;
4902}
4903
4904
4905/*
4906 * Local variables:
4907 * c-basic-offset: 8
4908 * End:
4909 */