blob: 5939021d8eba4782cc983e99b658d0f370c93c0a [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" },
287 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
288 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
289 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800290 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
291 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800292 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700293
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800294 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
295 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800297 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
298 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
299 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
300 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700301
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800302 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303
Scott Alfter1ebba672007-04-02 14:22:39 -0300304 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
305 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
306
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700307 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800308 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700309
Steven Tothcd1257d2006-01-09 15:25:01 -0200310 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
311 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
312
Robert Millan76ecf452009-03-11 08:18:53 -0300313 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2, "Conceptronic CTVFMi v2"},
314
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700315 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800316 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200317 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
318 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800319 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
320 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
321 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
322 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200323 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800324 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300325 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800326 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300327 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300328 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300329 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300330 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300331 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
332 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
333 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
334 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Alan McIvordceaddb2009-03-12 21:43:34 -0300335
336 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
337 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
338 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
339 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
340 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
341 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
342 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
343 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
344
Linus Torvalds1da177e2005-04-16 15:20:36 -0700345 { 0, -1, NULL }
346};
347
348/* ----------------------------------------------------------------------- */
349/* array with description for bt848 / bt878 tv/grabber cards */
350
351struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800352 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800353 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800354 .name = " *** UNKNOWN/GENERIC *** ",
355 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300357 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300358 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800359 .tuner_addr = ADDR_UNSET,
360 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800361 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800362 .name = "MIRO PCTV",
363 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300364 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800365 .svhs = 2,
366 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300367 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300368 .gpiomux = { 2, 0, 0, 0 },
369 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800370 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300371 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800372 .tuner_addr = ADDR_UNSET,
373 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800374 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800375 .name = "Hauppauge (bt848)",
376 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300377 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800378 .svhs = 2,
379 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300380 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300381 .gpiomux = { 0, 1, 2, 3 },
382 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800383 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300384 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800385 .tuner_addr = ADDR_UNSET,
386 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800387 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800388 .name = "STB, Gateway P/N 6000699 (bt848)",
389 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300390 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800391 .svhs = 2,
392 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300393 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300394 .gpiomux = { 4, 0, 2, 3 },
395 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800396 .no_msp34xx = 1,
397 .needs_tvaudio = 1,
398 .tuner_type = TUNER_PHILIPS_NTSC,
399 .tuner_addr = ADDR_UNSET,
400 .pll = PLL_28,
401 .has_radio = 1,
402 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800404 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800405 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800406 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
407 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300408 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800409 .svhs = 2,
410 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300411 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300412 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800413 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300414 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800415 .tuner_addr = ADDR_UNSET,
416 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800417 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800418 .name = "Diamond DTV2000",
419 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300420 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800421 .svhs = 2,
422 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300423 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300424 .gpiomux = { 0, 1, 0, 1 },
425 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800426 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300427 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800428 .tuner_addr = ADDR_UNSET,
429 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800430 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800431 .name = "AVerMedia TVPhone",
432 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300433 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800434 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300435 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800436 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300437 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800438 /* 0x04 for some cards ?? */
439 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300440 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800441 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300442 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800443 .has_remote = 1,
444 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800445 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800446 .name = "MATRIX-Vision MV-Delta",
447 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300448 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800449 .svhs = 3,
450 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300451 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300452 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800453 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300454 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800455 .tuner_addr = ADDR_UNSET,
456 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700457
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800458 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800459 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800460 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
461 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300462 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800463 .svhs = 2,
464 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300465 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300466 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
467 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800468 .needs_tvaudio = 1,
469 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300470 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800471 .tuner_addr = ADDR_UNSET,
472 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800473 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800474 .name = "IMS/IXmicro TurboTV",
475 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300476 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800477 .svhs = 2,
478 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300479 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300480 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800481 .needs_tvaudio = 0,
482 .pll = PLL_28,
483 .tuner_type = TUNER_TEMIC_PAL,
484 .tuner_addr = ADDR_UNSET,
485 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800486 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800487 .name = "Hauppauge (bt878)",
488 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300489 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800490 .svhs = 2,
491 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300492 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300493 .gpiomux = { 0, 1, 2, 3 },
494 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800495 .needs_tvaudio = 1,
496 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300497 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800498 .tuner_addr = ADDR_UNSET,
499 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800500 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800501 .name = "MIRO PCTV pro",
502 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300503 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 .svhs = 2,
505 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300506 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300507 .gpiomux = { 0x20001,0x10001, 0, 0 },
508 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800509 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300510 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800511 .tuner_addr = ADDR_UNSET,
512 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800514 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800515 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800516 .name = "ADS Technologies Channel Surfer TV (bt848)",
517 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300518 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800519 .svhs = 2,
520 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300521 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300522 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800523 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300524 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800525 .tuner_addr = ADDR_UNSET,
526 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800527 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800528 .name = "AVerMedia TVCapture 98",
529 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300530 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800531 .svhs = 2,
532 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300533 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300534 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800535 .needs_tvaudio = 1,
536 .msp34xx_alt = 1,
537 .pll = PLL_28,
538 .tuner_type = TUNER_PHILIPS_PAL,
539 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300540 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800541 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800542 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800543 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800544 .name = "Aimslab Video Highway Xtreme (VHX)",
545 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300546 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800547 .svhs = 2,
548 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300549 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300550 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
551 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800552 .needs_tvaudio = 1,
553 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300554 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800555 .tuner_addr = ADDR_UNSET,
556 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800557 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800558 .name = "Zoltrix TV-Max",
559 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300560 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800561 .svhs = 2,
562 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300563 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300564 .gpiomux = { 0, 0, 1, 0 },
565 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800566 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300567 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800568 .tuner_addr = ADDR_UNSET,
569 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800571 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800572 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800573 .name = "Prolink Pixelview PlayTV (bt878)",
574 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300575 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 .svhs = 2,
577 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300578 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300580 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
581 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800582 .needs_tvaudio = 1,
583 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300584 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300585 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800586 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800587 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800588 .name = "Leadtek WinView 601",
589 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300590 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800591 .svhs = 2,
592 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300593 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300594 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
595 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800596 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300597 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300599 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800600 .has_radio = 1,
601 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800602 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800603 .name = "AVEC Intercapture",
604 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300605 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800606 .svhs = 2,
607 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300608 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300609 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300611 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800612 .tuner_addr = ADDR_UNSET,
613 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800614 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800615 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
616 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300617 /* .audio_inputs= 1, */
618 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800619 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300620 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300621 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800622 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300623 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800624 .tuner_addr = ADDR_UNSET,
625 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700626
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800627 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800628 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800629 .name = "CEI Raffles Card",
630 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300631 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800632 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300633 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300634 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800635 .tuner_addr = ADDR_UNSET,
636 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800637 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800638 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
639 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300640 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800641 .svhs = 2,
642 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300643 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300644 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
645 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800646 .pll = PLL_28,
647 .tuner_type = TUNER_PHILIPS_PAL_I,
648 .tuner_addr = ADDR_UNSET,
649 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800650 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800651 .name = "Askey CPH050/ Phoebe Tv Master + FM",
652 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300653 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800654 .svhs = 2,
655 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300656 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300657 .gpiomux = { 0, 1, 0x800, 0x400 },
658 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800659 .needs_tvaudio = 1,
660 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300661 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800662 .tuner_addr = ADDR_UNSET,
663 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800664 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800665 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
666 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300667 /* .audio_inputs= 1, */
668 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300669 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800670 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300671 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300672 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300673 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800674 .no_msp34xx = 1,
675 .pll = PLL_28,
676 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
677 .tuner_addr = ADDR_UNSET,
678 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700679
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800680 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800681 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800682 .name = "Askey CPH05X/06X (bt878) [many vendors]",
683 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300684 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800685 .svhs = 2,
686 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300687 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300688 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
689 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 .needs_tvaudio = 1,
691 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300692 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 .tuner_addr = ADDR_UNSET,
694 .has_remote = 1,
695 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800696 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800697 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
698 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300699 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800700 .svhs = 2,
701 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300702 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300703 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
704 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800705 .needs_tvaudio = 0,
706 .tuner_type = TUNER_PHILIPS_PAL,
707 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300708 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800709 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800710 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800711 .name = "Hauppauge WinCam newer (bt878)",
712 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300713 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800714 .svhs = 3,
715 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300716 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300717 .gpiomux = { 0, 1, 2, 3 },
718 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800719 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300720 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800721 .tuner_addr = ADDR_UNSET,
722 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800723 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800724 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
725 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300726 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800727 .svhs = 2,
728 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300729 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300730 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
731 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800732 .pll = PLL_28,
733 .tuner_type = TUNER_PHILIPS_SECAM,
734 .tuner_addr = ADDR_UNSET,
735 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700736
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800737 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800738 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800739 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
740 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300741 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800742 .svhs = 2,
743 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300744 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300745 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
746 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800747 .needs_tvaudio = 0,
748 .tuner_type = TUNER_PHILIPS_PAL,
749 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300750 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 /* GPIO wiring:
752 External 20 pin connector (for Active Radio Upgrade board)
753 gpio00: i2c-sda
754 gpio01: i2c-scl
755 gpio02: om5610-data
756 gpio03: om5610-clk
757 gpio04: om5610-wre
758 gpio05: om5610-stereo
759 gpio06: rds6588-davn
760 gpio07: Pin 7 n.c.
761 gpio08: nIOW
762 gpio09+10: nIOR, nSEL ?? (bt878)
763 gpio09: nIOR (bt848)
764 gpio10: nSEL (bt848)
765 Sound Routing:
766 gpio16: u2-A0 (1st 4052bt)
767 gpio17: u2-A1
768 gpio18: u2-nEN
769 gpio19: u4-A0 (2nd 4052)
770 gpio20: u4-A1
771 u4-nEN - GND
772 Btspy:
773 00000 : Cdrom (internal audio input)
774 10000 : ext. Video audio input
775 20000 : TV Mono
776 a0000 : TV Mono/2
777 1a0000 : TV Stereo
778 30000 : Radio
779 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700780 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700781
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800782 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800783 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800784 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
785 .name = "Imagenation PXC200",
786 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300787 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800788 .svhs = 1, /* was: 4 */
789 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300790 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300791 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800792 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300793 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800794 .tuner_addr = ADDR_UNSET,
795 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800797 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800798 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800799 .name = "Lifeview FlyVideo 98 LR50",
800 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300801 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800802 .svhs = 2,
803 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300804 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300805 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
806 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300808 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800809 .tuner_addr = ADDR_UNSET,
810 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800811 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800812 .name = "Formac iProTV, Formac ProTV I (bt848)",
813 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300814 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 .svhs = 3,
816 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300817 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300818 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800819 .pll = PLL_28,
820 .tuner_type = TUNER_PHILIPS_PAL,
821 .tuner_addr = ADDR_UNSET,
822 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800824 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800825 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800826 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
827 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300828 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800829 .svhs = 2,
830 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300831 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300832 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800833 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300834 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800835 .tuner_addr = ADDR_UNSET,
836 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800837 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800838 .name = "Terratec TerraTValue Version Bt878",
839 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300840 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800841 .svhs = 2,
842 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300843 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300844 .gpiomux = { 0x500, 0, 0x300, 0x900 },
845 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 .needs_tvaudio = 1,
847 .pll = PLL_28,
848 .tuner_type = TUNER_PHILIPS_PAL,
849 .tuner_addr = ADDR_UNSET,
850 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800851 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800852 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
853 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300854 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800855 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300856 /* TV, CVid, SVid, CVid over SVid connector */
857 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800858 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
859 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300860 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
861 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800862 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
863 gpio23 -- hef4052:nEnable (0x800000)
864 gpio12 -- hef4052:A1
865 gpio13 -- hef4052:A0
866 0x0000: external audio
867 0x1000: FM
868 0x2000: TV
869 0x3000: n.c.
870 Note: There exists another variant "Winfast 2000" with tv stereo !?
871 Note: eeprom only contains FF and pci subsystem id 107d:6606
872 */
873 .needs_tvaudio = 0,
874 .pll = PLL_28,
875 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300876 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800877 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300878 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800879 .has_remote = 1,
880 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800881 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800882 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
883 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300884 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800885 .svhs = 2,
886 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300887 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300888 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
889 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800890 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300891 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800892 .tuner_addr = ADDR_UNSET,
893 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700894
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800895 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800896 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800897 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
898 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300899 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800900 .svhs = 2,
901 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300902 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300903 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
904 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800905 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300906 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800907 .tuner_addr = ADDR_UNSET,
908 .has_radio = 1,
909 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800910 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .name = "Prolink PixelView PlayTV pro",
912 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300913 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800914 .svhs = 2,
915 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300916 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300917 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
918 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800919 .no_msp34xx = 1,
920 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300921 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800922 .tuner_addr = ADDR_UNSET,
923 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800924 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800925 .name = "Askey CPH06X TView99",
926 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300927 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800928 .svhs = 2,
929 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300930 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300931 .gpiomux = { 0x551400, 0x551200, 0, 0 },
932 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800933 .needs_tvaudio = 1,
934 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300935 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800936 .tuner_addr = ADDR_UNSET,
937 .has_remote = 1,
938 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800939 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800940 .name = "Pinnacle PCTV Studio/Rave",
941 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300942 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800943 .svhs = 2,
944 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300945 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300946 .gpiomux = { 2, 0xd0001, 0, 0 },
947 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800948 .needs_tvaudio = 0,
949 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300950 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800951 .tuner_addr = ADDR_UNSET,
952 },
953
954 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800955 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
957 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300958 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800959 .svhs = 2,
960 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300961 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300962 .gpiomux = { 4, 0, 2, 3 },
963 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800964 .no_msp34xx = 1,
965 .needs_tvaudio = 1,
966 .tuner_type = TUNER_PHILIPS_NTSC,
967 .tuner_addr = ADDR_UNSET,
968 .pll = PLL_28,
969 .has_radio = 1,
970 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800971 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800972 .name = "AVerMedia TVPhone 98",
973 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300974 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800975 .svhs = 2,
976 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300977 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300978 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800979 .needs_tvaudio = 1,
980 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300981 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800982 .tuner_addr = ADDR_UNSET,
983 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300984 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800985 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800986 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800987 .name = "ProVideo PV951", /* pic16c54 */
988 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300989 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800990 .svhs = 2,
991 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300992 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300993 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800994 .needs_tvaudio = 1,
995 .no_msp34xx = 1,
996 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300997 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800998 .tuner_addr = ADDR_UNSET,
999 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001000 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001001 .name = "Little OnAir TV",
1002 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001003 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001004 .svhs = 2,
1005 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -03001006 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001007 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
1008 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001009 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001010 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001011 .tuner_addr = ADDR_UNSET,
1012 },
1013
1014 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001015 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .name = "Sigma TVII-FM",
1017 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001018 /* .audio_inputs= 1, */
1019 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001020 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001021 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001022 .gpiomux = { 1, 1, 0, 2 },
1023 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .no_msp34xx = 1,
1025 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001026 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001027 .tuner_addr = ADDR_UNSET,
1028 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001029 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 .name = "MATRIX-Vision MV-Delta 2",
1031 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001032 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001033 .svhs = 3,
1034 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001035 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001036 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001037 .no_msp34xx = 1,
1038 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001039 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001040 .tuner_addr = ADDR_UNSET,
1041 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001042 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001043 .name = "Zoltrix Genie TV/FM",
1044 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001045 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001046 .svhs = 2,
1047 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001048 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001049 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1050 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001051 .no_msp34xx = 1,
1052 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001053 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001054 .tuner_addr = ADDR_UNSET,
1055 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001056 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001057 .name = "Terratec TV/Radio+",
1058 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001059 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001060 .svhs = 2,
1061 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001062 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001063 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1064 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001065 .needs_tvaudio = 1,
1066 .no_msp34xx = 1,
1067 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001068 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001069 .tuner_addr = ADDR_UNSET,
1070 .has_radio = 1,
1071 },
1072
1073 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001074 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 .name = "Askey CPH03x/ Dynalink Magic TView",
1076 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001077 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001078 .svhs = 2,
1079 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001080 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001081 .gpiomux = {2,0,0,0 },
1082 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001083 .needs_tvaudio = 1,
1084 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001085 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001086 .tuner_addr = ADDR_UNSET,
1087 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001088 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001089 .name = "IODATA GV-BCTV3/PCI",
1090 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001091 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001092 .svhs = 2,
1093 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001094 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001095 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001096 .no_msp34xx = 1,
1097 .pll = PLL_28,
1098 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1099 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001100 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001101 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001102 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001103 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1104 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001105 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001106 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001107 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001109 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001110 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001111 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1112 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001113 .no_msp34xx = 1,
1114 .pll = PLL_28,
1115 .tuner_type = TUNER_PHILIPS_PAL_I,
1116 .tuner_addr = ADDR_UNSET,
1117 .has_remote = 1,
1118 /* GPIO wiring: (different from Rev.4C !)
1119 GPIO17: U4.A0 (first hef4052bt)
1120 GPIO19: U4.A1
1121 GPIO20: U5.A1 (second hef4052bt)
1122 GPIO21: U4.nEN
1123 GPIO22: BT832 Reset Line
1124 GPIO23: A5,A0, U5,nEN
1125 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1126 */
1127 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001128 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001129 .name = "Eagle Wireless Capricorn2 (bt878A)",
1130 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001131 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001132 .svhs = 2,
1133 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001134 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001135 .gpiomux = { 0, 1, 2, 3 },
1136 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001137 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001138 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001139 .tuner_addr = ADDR_UNSET,
1140 },
1141
1142 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001143 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001144 /* David Härdeman <david@2gen.com> */
1145 .name = "Pinnacle PCTV Studio Pro",
1146 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001147 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001148 .svhs = 3,
1149 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001150 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001151 .gpiomux = { 1, 0xd0001, 0, 0 },
1152 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001153 /* sound path (5 sources):
1154 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1155 0= ext. Audio IN
1156 1= from MUX2
1157 2= Mono TV sound from Tuner
1158 3= not connected
1159 MUX2 (mask 0x30000):
1160 0,2,3= from MSP34xx
1161 1= FM stereo Radio from Tuner */
1162 .needs_tvaudio = 0,
1163 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001164 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001165 .tuner_addr = ADDR_UNSET,
1166 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001167 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001168 /* Claas Langbehn <claas@bigfoot.com>,
1169 Sven Grothklags <sven@upb.de> */
1170 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1171 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001172 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001173 .svhs = 2,
1174 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001175 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001176 .gpiomux = { 0, 0, 0x10, 8 },
1177 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001178 .needs_tvaudio = 1,
1179 .pll = PLL_28,
1180 .tuner_type = TUNER_PHILIPS_PAL,
1181 .tuner_addr = ADDR_UNSET,
1182 .has_radio = 1,
1183 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001184 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001185 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001186 in de.comp.os.unix.linux.hardware:
1187 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001188 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001189 options tuner type=5 */
1190 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1191 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001192 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001193 .svhs = 2,
1194 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001195 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001196 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1197 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001198 /* For cards with tda9820/tda9821:
1199 0x0000: Tuner normal stereo
1200 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1201 0x0880: Tuner A2 stereo */
1202 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001203 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001204 .tuner_addr = ADDR_UNSET,
1205 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001206 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001207 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1208 old Easy TV BT848 version (model CPH031) */
1209 .name = "Askey CPH031/ BESTBUY Easy TV",
1210 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001211 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001212 .svhs = 2,
1213 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001214 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001215 .gpiomux = { 2, 0, 0, 0 },
1216 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001217 .needs_tvaudio = 0,
1218 .pll = PLL_28,
1219 .tuner_type = TUNER_TEMIC_PAL,
1220 .tuner_addr = ADDR_UNSET,
1221 },
1222
1223 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001224 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001225 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1226 .name = "Lifeview FlyVideo 98FM LR50",
1227 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001228 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001229 .svhs = 2,
1230 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001231 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001232 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1233 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001234 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001235 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001236 .tuner_addr = ADDR_UNSET,
1237 },
1238 /* This is the ultimate cheapo capture card
1239 * just a BT848A on a small PCB!
1240 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001241 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001242 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1243 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001244 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001245 .svhs = 1,
1246 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001247 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001248 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001249 .needs_tvaudio = 0,
1250 .no_msp34xx = 1,
1251 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001252 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001253 .tuner_addr = ADDR_UNSET,
1254 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001255 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001256 /* Daniel Herrington <daniel.herrington@home.com> */
1257 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1258 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001259 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001260 .svhs = 2,
1261 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001262 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001263 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1264 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001265 .needs_tvaudio = 1,
1266 .pll = PLL_28,
1267 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1268 .tuner_addr = ADDR_UNSET,
1269 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001270 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001271 /* Matti Mottus <mottus@physic.ut.ee> */
1272 .name = "Askey CPH03x TV Capturer",
1273 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001274 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001275 .svhs = 2,
1276 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001277 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001278 .gpiomux = { 2, 0, 0, 0 },
1279 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001280 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001281 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001282 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehabed44f662009-08-22 14:43:50 -03001283 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001284 },
1285
1286 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001287 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001288 /* Philip Blundell <philb@gnu.org> */
1289 .name = "Modular Technology MM100PCTV",
1290 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001291 /* .audio_inputs= 2, */
1292 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001293 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001294 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001295 .gpiomux = { 2, 0, 0, 1 },
1296 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001297 .pll = PLL_35,
1298 .tuner_type = TUNER_TEMIC_PAL,
1299 .tuner_addr = ADDR_UNSET,
1300 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001301 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001302 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001303 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001304 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001305 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001306 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001307 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001308 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001309 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001310 .no_msp34xx = 1,
1311 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001312 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001313 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001314 .tuner_addr = ADDR_UNSET,
1315 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001316 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001317 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1318 new Easy TV BT878 version (model CPH061)
1319 special thanks to Informatica Mieres for providing the card */
1320 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1321 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001322 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001323 .svhs = 2,
1324 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001325 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001326 .gpiomux = { 1, 0, 4, 4 },
1327 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001328 .needs_tvaudio = 0,
1329 .pll = PLL_28,
1330 .tuner_type = TUNER_PHILIPS_PAL,
1331 .tuner_addr = ADDR_UNSET,
1332 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001333 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001334 /* Lukas Gebauer <geby@volny.cz> */
1335 .name = "ATI TV-Wonder",
1336 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001337 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001338 .svhs = 2,
1339 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001340 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001341 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1342 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001343 .pll = PLL_28,
1344 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1345 .tuner_addr = ADDR_UNSET,
1346 },
1347
1348 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001349 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001350 /* Lukas Gebauer <geby@volny.cz> */
1351 .name = "ATI TV-Wonder VE",
1352 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001353 /* .audio_inputs= 1, */
1354 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001355 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001356 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001357 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001358 .no_msp34xx = 1,
1359 .pll = PLL_28,
1360 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1361 .tuner_addr = ADDR_UNSET,
1362 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001363 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001364 /* DeeJay <deejay@westel900.net (2000S) */
1365 .name = "Lifeview FlyVideo 2000S LR90",
1366 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001367 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 .svhs = 2,
1369 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001370 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001371 /* Radio changed from 1e80 to 0x800 to make
1372 FlyVideo2000S in .hu happy (gm)*/
1373 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001374 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1375 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001376 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001377 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001378 .needs_tvaudio = 1,
1379 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001380 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 .tuner_addr = ADDR_UNSET,
1382 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001383 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001384 .name = "Terratec TValueRadio",
1385 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001386 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001387 .svhs = 2,
1388 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001389 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001390 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1391 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001392 .needs_tvaudio = 1,
1393 .pll = PLL_28,
1394 .tuner_type = TUNER_PHILIPS_PAL,
1395 .tuner_addr = ADDR_UNSET,
1396 .has_radio = 1,
1397 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001398 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001399 /* TANAKA Kei <peg00625@nifty.com> */
1400 .name = "IODATA GV-BCTV4/PCI",
1401 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001402 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001403 .svhs = 2,
1404 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001405 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001406 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001407 .no_msp34xx = 1,
1408 .pll = PLL_28,
1409 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1410 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001411 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001412 },
1413
1414 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001415 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001416 .name = "3Dfx VoodooTV FM (Euro)",
1417 /* try "insmod msp3400 simple=0" if you have
1418 * sound problems with this card. */
1419 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001420 /* .audio_inputs= 1, */
1421 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001422 .gpiomask = 0x4f8a00,
1423 /* 0x100000: 1=MSP enabled (0=disable again)
1424 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1425 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1426 .gpiomute = 0x947fff,
1427 /* tvtuner, radio, external,internal, mute, stereo
1428 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001429 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001430 .tuner_type = TUNER_MT2032,
1431 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001432 .pll = PLL_28,
1433 .has_radio = 1,
1434 },
1435 [BTTV_BOARD_VOODOOTV_200] = {
1436 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001437 /* try "insmod msp3400 simple=0" if you have
1438 * sound problems with this card. */
1439 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001440 /* .audio_inputs= 1, */
1441 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001442 .gpiomask = 0x4f8a00,
1443 /* 0x100000: 1=MSP enabled (0=disable again)
1444 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001445 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1446 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001447 /* tvtuner, radio, external,internal, mute, stereo
1448 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001449 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001450 .tuner_type = TUNER_MT2032,
1451 .tuner_addr = ADDR_UNSET,
1452 .pll = PLL_28,
1453 .has_radio = 1,
1454 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001455 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001456 /* Philip Blundell <pb@nexus.co.uk> */
1457 .name = "Active Imaging AIMMS",
1458 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001459 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001460 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001461 .tuner_addr = ADDR_UNSET,
1462 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001463 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001464 .gpiomask = 0
1465 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001466 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001467 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1468 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1469 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001470 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001471 .svhs = 2,
1472 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001473 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001474 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1475 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001476 .needs_tvaudio = 1,
1477 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001478 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001479 .tuner_addr = ADDR_UNSET,
1480 .has_remote = 1,
1481 /* GPIO wiring:
1482 GPIO0: U4.A0 (hef4052bt)
1483 GPIO1: U4.A1
1484 GPIO2: U4.A1 (second hef4052bt)
1485 GPIO3: U4.nEN, U5.A0, A5.nEN
1486 GPIO8-15: vrd866b ?
1487 */
1488 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001489 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001490 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1491 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001492 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001493 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001494 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1495 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001496 .pll = PLL_28,
1497 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001498 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001499 .tuner_addr = ADDR_UNSET,
1500 },
1501
1502 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001503 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001504 /* Dariusz Kowalewski <darekk@automex.pl> */
1505 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1506 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001507 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001508 .svhs = 2,
1509 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001510 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001511 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1512 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001513 .needs_tvaudio = 1,
1514 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001515 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001516 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001517 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001518 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001519 .has_radio = 1, /* Note: not all cards have radio */
1520 .has_remote = 1,
1521 /* GPIO wiring:
1522 GPIO0: A0 hef4052
1523 GPIO1: A1 hef4052
1524 GPIO3: nEN hef4052
1525 GPIO8-15: vrd866b
1526 GPIO20,22,23: R30,R29,R28
1527 */
1528 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001529 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001530 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1531 /* you must jumper JP5 for the card to work */
1532 .name = "Sensoray 311",
1533 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001534 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001535 .svhs = 4,
1536 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001537 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001538 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001539 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001540 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001541 .tuner_addr = ADDR_UNSET,
1542 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001543 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001544 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1545 .name = "RemoteVision MX (RV605)",
1546 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001547 /* .audio_inputs= 0, */
1548 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001549 .gpiomask = 0x00,
1550 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001551 .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 -08001552 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001553 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001554 .tuner_addr = ADDR_UNSET,
1555 .muxsel_hook = rv605_muxsel,
1556 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001557 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001558 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1559 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001560 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001561 .svhs = 2,
1562 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001563 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001564 .gpiomux = { 0, 1, 2, 2 },
1565 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001566 .needs_tvaudio = 0,
1567 .tuner_type = TUNER_PHILIPS_PAL,
1568 .tuner_addr = ADDR_UNSET,
1569 .pll = PLL_28,
1570 .has_radio = 1,
1571 },
1572
1573 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001574 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001575 /* Masaki Suzuki <masaki@btree.org> */
1576 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1577 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001578 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001579 .svhs = 2,
1580 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001581 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001582 .gpiomux = { 0, 1, 2, 3 },
1583 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001584 .tuner_type = TUNER_PHILIPS_NTSC,
1585 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001586 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001587 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001588 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001589 .name = "GrandTec Multi Capture Card (Bt878)",
1590 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001591 /* .audio_inputs= 0, */
1592 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001593 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001594 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001595 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001596 .needs_tvaudio = 0,
1597 .no_msp34xx = 1,
1598 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001599 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001600 .tuner_addr = ADDR_UNSET,
1601 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001602 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001603 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1604 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001605 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001606 .svhs = 2,
1607 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001608 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1609 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001610 .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 -08001611 * This card lacks external Audio In, so we mute it on Ext. & Int.
1612 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1613 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001614 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001615 * btwincap uses 0x80000/0x80003
1616 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001617 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001618 .needs_tvaudio = 0,
1619 .no_msp34xx = 1,
1620 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001621 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001622 .tuner_addr = ADDR_UNSET,
1623 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1624 radio signal strength indicators work fine. */
1625 .has_radio = 1,
1626 /* GPIO Info:
1627 GPIO0,1: HEF4052 A0,A1
1628 GPIO2: HEF4052 nENABLE
1629 GPIO3-7: n.c.
1630 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1631 GPIO14,15: ??
1632 GPIO16-21: n.c.
1633 GPIO22,23: ??
1634 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1635 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001636 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001637 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1638 .name = "DSP Design TCVIDEO",
1639 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001640 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001641 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001642 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001643 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001644 .tuner_addr = ADDR_UNSET,
1645 },
1646
1647 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001648 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001649 .name = "Hauppauge WinTV PVR",
1650 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001651 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001652 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001653 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001654 .needs_tvaudio = 1,
1655 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001656 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001657 .tuner_addr = ADDR_UNSET,
1658
1659 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001660 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001661 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001662 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001663 .name = "IODATA GV-BCTV5/PCI",
1664 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001665 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001666 .svhs = 2,
1667 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001668 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001669 .gpiomux = {0x030000, 0x010000, 0, 0 },
1670 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001671 .no_msp34xx = 1,
1672 .pll = PLL_28,
1673 .tuner_type = TUNER_PHILIPS_NTSC_M,
1674 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001675 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001676 .has_radio = 1,
1677 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001678 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001679 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1680 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001681 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001682 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001683 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001684 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001685 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001686 .tuner_addr = ADDR_UNSET,
1687 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001688 .no_tda7432 = 1,
1689 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001690 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001691 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1692 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001693 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001694 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001695 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001696 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001697 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001698 .tuner_addr = ADDR_UNSET,
1699 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001700 .no_tda7432 = 1,
1701 },
1702
1703 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001704 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001705 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1706 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001707 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001708 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001709 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001710 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001711 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001712 .tuner_addr = ADDR_UNSET,
1713 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001714 .no_tda7432 = 1,
1715 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001716 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1718 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001719 /* .audio_inputs= 0, */
1720 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001721 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001722 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001723 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .tuner_addr = ADDR_UNSET,
1725 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001726 .no_tda7432 = 1,
1727 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001728 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001729 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1730 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001731 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001732 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001733 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001734 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001735 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001736 .tuner_addr = ADDR_UNSET,
1737 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001738 .no_tda7432 = 1,
1739 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001740 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001741 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1742 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001743 /* .audio_inputs= 1, */
1744 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001745 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001747 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001748 .tuner_addr = ADDR_UNSET,
1749 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001750 .no_tda7432 = 1,
1751 },
1752
1753 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001754 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001755 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1756 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001757 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001758 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001759 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001760 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001761 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001762 .tuner_addr = ADDR_UNSET,
1763 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001764 .no_tda7432 = 1,
1765 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001766 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001767 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001768 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001769 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001770 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001771 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001772 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001773 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001774 .tuner_addr = ADDR_UNSET,
1775 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001776 .no_tda7432 = 1,
1777 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001778 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001779 .name = "Osprey 500", /* 500 */
1780 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001781 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001782 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001783 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001784 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001785 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001786 .tuner_addr = ADDR_UNSET,
1787 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001788 .no_tda7432 = 1,
1789 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001790 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001791 .name = "Osprey 540", /* 540 */
1792 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001793 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001794 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001795 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001796 .tuner_addr = ADDR_UNSET,
1797 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001799 },
1800
1801 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001802 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001803 .name = "Osprey 2000", /* 2000 */
1804 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001805 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001806 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001807 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001808 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001809 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001810 .tuner_addr = ADDR_UNSET,
1811 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001812 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1813 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001814 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001815 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1816 .name = "IDS Eagle",
1817 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001818 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001819 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001820 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001821 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001822 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001823 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001824 .muxsel_hook = eagle_muxsel,
1825 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001826 .pll = PLL_28,
1827 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001828 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001829 .name = "Pinnacle PCTV Sat",
1830 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001831 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001832 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001833 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001834 .tuner_addr = ADDR_UNSET,
1835 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001836 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001837 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001838 .pll = PLL_28,
1839 .no_gpioirq = 1,
1840 .has_dvb = 1,
1841 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001842 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001843 .name = "Formac ProTV II (bt878)",
1844 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001845 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001846 .svhs = 3,
1847 .gpiomask = 2,
1848 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001849 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001850 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001851 .pll = PLL_28,
1852 .has_radio = 1,
1853 .tuner_type = TUNER_PHILIPS_PAL,
1854 .tuner_addr = ADDR_UNSET,
1855 /* sound routing:
1856 GPIO=0x00,0x01,0x03: mute (?)
1857 0x02: both TV and radio (tuner: FM1216/I)
1858 The card has onboard audio connectors labeled "cdrom" and "board",
1859 not soldered here, though unknown wiring.
1860 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001861 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001862 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001863
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001864 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001865 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001866 .name = "MachTV",
1867 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001868 /* .audio_inputs= 1, */
1869 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001870 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001871 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001872 .gpiomux = { 0, 1, 2, 3},
1873 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001874 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001875 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001876 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001877 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001878 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001879 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001880 .name = "Euresys Picolo",
1881 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001882 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001883 .svhs = 2,
1884 .gpiomask = 0,
1885 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001886 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001887 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001888 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001889 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .tuner_addr = ADDR_UNSET,
1891 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001892 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001893 /* Luc Van Hoeylandt <luc@e-magic.be> */
1894 .name = "ProVideo PV150", /* 0x4f */
1895 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001896 /* .audio_inputs= 0, */
1897 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001898 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001899 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001900 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001901 .needs_tvaudio = 0,
1902 .no_msp34xx = 1,
1903 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001904 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .tuner_addr = ADDR_UNSET,
1906 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001907 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001908 /* Hiroshi Takekawa <sian@big.or.jp> */
1909 /* This card lacks subsystem ID */
1910 .name = "AD-TVK503", /* 0x63 */
1911 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001912 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001913 .svhs = 2,
1914 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001915 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001916 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001917 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1918 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001919 .needs_tvaudio = 0,
1920 .no_msp34xx = 1,
1921 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001922 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001923 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001924 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001925 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001926
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001928 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 .name = "Hercules Smart TV Stereo",
1930 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001931 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001932 .svhs = 2,
1933 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001934 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001935 .needs_tvaudio = 1,
1936 .no_msp34xx = 1,
1937 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001938 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001939 .tuner_addr = ADDR_UNSET,
1940 /* Notes:
1941 - card lacks subsystem ID
1942 - stereo variant w/ daughter board with tda9874a @0xb0
1943 - Audio Routing:
1944 always from tda9874 independent of GPIO (?)
1945 external line in: unknown
1946 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1947 hef4053 (instead 4052) for unknown function
1948 */
1949 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001950 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001951 .name = "Pace TV & Radio Card",
1952 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001953 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001954 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001955 /* Tuner, CVid, SVid, CVid over SVid connector */
1956 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001957 .gpiomask = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001958 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001959 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001960 .tuner_addr = ADDR_UNSET,
1961 .has_radio = 1,
1962 .pll = PLL_28,
1963 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1964 only internal line out: (4pin header) RGGL
1965 Radio must be decoded by msp3410d (not routed through)*/
1966 /*
1967 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1968 */
1969 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001970 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001971 /* Chris Willing <chris@vislab.usyd.edu.au> */
1972 .name = "IVC-200",
1973 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001974 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001975 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001976 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001977 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001978 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001979 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001980 .pll = PLL_28,
1981 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001982 [BTTV_BOARD_IVCE8784] = {
1983 .name = "IVCE-8784",
1984 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001985 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001986 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001987 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001988 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001989 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001990 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001991 .pll = PLL_28,
1992 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001993 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001994 .name = "Grand X-Guard / Trust 814PCI",
1995 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001996 /* .audio_inputs= 0, */
1997 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001998 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001999 .tuner_addr = ADDR_UNSET,
2000 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03002001 .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 -08002002 .muxsel_hook = xguard_muxsel,
2003 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .no_tda7432 = 1,
2005 .pll = PLL_28,
2006 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002007
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002008 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002009 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002010 .name = "Nebula Electronics DigiTV",
2011 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002012 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002013 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002014 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002015 .no_tda7432 = 1,
2016 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002017 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002018 .tuner_addr = ADDR_UNSET,
2019 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002020 .has_remote = 1,
2021 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002022 .no_gpioirq = 1,
2023 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002024 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002025 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2026 .name = "ProVideo PV143",
2027 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002028 /* .audio_inputs= 0, */
2029 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002030 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002031 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002032 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002033 .needs_tvaudio = 0,
2034 .no_msp34xx = 1,
2035 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002036 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002037 .tuner_addr = ADDR_UNSET,
2038 },
Dirk Heer05583622008-11-21 19:00:55 -03002039 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002040 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002041 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002042 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002043 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002044 .svhs = 3,
2045 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002046 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002047 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002048 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002049 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002050 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002051 .tuner_addr = ADDR_UNSET,
2052 },
Dirk Heer05583622008-11-21 19:00:55 -03002053 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2054 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002055 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002056 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002057 .svhs = 3,
2058 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002059 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002060 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002061 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002062 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002063 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002064 .tuner_addr = ADDR_UNSET,
2065 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002066
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002067 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002068 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002069 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2070 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002071 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002072 .svhs = 9,
2073 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002074 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002075 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002076 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002077 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002078 .needs_tvaudio = 1,
2079 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002080 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002081 .tuner_addr = ADDR_UNSET,
2082 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002083 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002084 .name = "PHYTEC VD-009 Combi (bt878)",
2085 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002086 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002087 .svhs = 9,
2088 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002089 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002090 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002091 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002092 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002093 .needs_tvaudio = 1,
2094 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002095 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002096 .tuner_addr = ADDR_UNSET,
2097 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002098 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 .name = "IVC-100",
2100 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002101 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002102 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002104 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002105 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002106 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002107 .pll = PLL_28,
2108 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002109 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002110 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2111 .name = "IVC-120G",
2112 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002113 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002114 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002115 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002116 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002117 .needs_tvaudio = 0,
2118 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002119 .no_tda7432 = 1,
2120 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002121 .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 -08002122 .muxsel_hook = ivc120_muxsel,
2123 .pll = PLL_28,
2124 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002125
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002126 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002127 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002128 .name = "pcHDTV HD-2000 TV",
2129 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002130 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002131 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002132 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002133 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002134 .tuner_addr = ADDR_UNSET,
2135 .has_dvb = 1,
2136 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002137 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002138 .name = "Twinhan DST + clones",
2139 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002140 .no_tda7432 = 1,
2141 .tuner_type = TUNER_ABSENT,
2142 .tuner_addr = ADDR_UNSET,
2143 .no_video = 1,
2144 .has_dvb = 1,
2145 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002146 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002147 .name = "Winfast VC100",
2148 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002149 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002150 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002151 /* Vid In, SVid In, Vid over SVid in connector */
2152 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002153 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002154 .no_tda7432 = 1,
2155 .tuner_type = TUNER_ABSENT,
2156 .tuner_addr = ADDR_UNSET,
2157 .pll = PLL_28,
2158 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002159 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002160 .name = "Teppro TEV-560/InterVision IV-560",
2161 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002162 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002163 .svhs = 2,
2164 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002165 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002166 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .needs_tvaudio = 1,
2168 .tuner_type = TUNER_PHILIPS_PAL,
2169 .tuner_addr = ADDR_UNSET,
2170 .pll = PLL_35,
2171 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002172
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002173 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002174 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002175 .name = "SIMUS GVC1100",
2176 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002177 /* .audio_inputs= 0, */
2178 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002179 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002180 .tuner_addr = ADDR_UNSET,
2181 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002182 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002183 .gpiomask = 0x3F,
2184 .muxsel_hook = gvc1100_muxsel,
2185 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002186 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002187 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2188 .name = "NGS NGSTV+",
2189 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002190 .svhs = 2,
2191 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002192 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002193 .gpiomux = { 0, 0, 0, 0 },
2194 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002195 .pll = PLL_28,
2196 .tuner_type = TUNER_PHILIPS_PAL,
2197 .tuner_addr = ADDR_UNSET,
2198 .has_remote = 1,
2199 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002200 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002201 /* http://linuxmedialabs.com */
2202 .name = "LMLBT4",
2203 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002204 /* .audio_inputs= 0, */
2205 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002206 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002207 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002208 .no_tda7432 = 1,
2209 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002210 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002211 .tuner_addr = ADDR_UNSET,
2212 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002213 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002214 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2215 .name = "Tekram M205 PRO",
2216 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002217 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002218 .tuner_type = TUNER_PHILIPS_PAL,
2219 .tuner_addr = ADDR_UNSET,
2220 .svhs = 2,
2221 .needs_tvaudio = 0,
2222 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002223 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002224 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002225 .pll = PLL_28,
2226 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002227
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002228 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002229 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002230 /* Javier Cendan Ares <jcendan@lycos.es> */
2231 /* bt878 TV + FM without subsystem ID */
2232 .name = "Conceptronic CONTVFMi",
2233 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002234 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002235 .svhs = 2,
2236 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002237 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002238 .gpiomux = { 0, 1, 2, 2 },
2239 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002240 .needs_tvaudio = 0,
2241 .pll = PLL_28,
2242 .tuner_type = TUNER_PHILIPS_PAL,
2243 .tuner_addr = ADDR_UNSET,
2244 .has_remote = 1,
2245 .has_radio = 1,
2246 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002247 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002248 /*Eric DEBIEF <debief@telemsa.com>*/
Lucas De Marchi25985ed2011-03-30 22:57:33 -03002249 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2250 /* 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 -08002251 /*0x79 in bttv.h*/
2252 .name = "Euresys Picolo Tetra",
2253 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002254 /* .audio_inputs= 0, */
2255 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002256 .gpiomask = 0,
2257 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2258 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002259 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002260 /*878A input is always MUX0, see above.*/
2261 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002262 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002263 .pll = PLL_28,
2264 .needs_tvaudio = 0,
2265 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002266 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002267 .tuner_addr = ADDR_UNSET,
2268 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002269 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002270 /* Spirit TV Tuner from http://spiritmodems.com.au */
2271 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2272 .name = "Spirit TV Tuner",
2273 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002274 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002275 .svhs = 2,
2276 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002277 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002278 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002279 .tuner_type = TUNER_TEMIC_PAL,
2280 .tuner_addr = ADDR_UNSET,
2281 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002282 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002283 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002284 /* Wolfram Joost <wojo@frokaschwei.de> */
2285 .name = "AVerMedia AVerTV DVB-T 771",
2286 .video_inputs = 2,
2287 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002288 .tuner_type = TUNER_ABSENT,
2289 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002290 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002291 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002292 .no_tda7432 = 1,
2293 .pll = PLL_28,
2294 .has_dvb = 1,
2295 .no_gpioirq = 1,
2296 .has_remote = 1,
2297 },
2298 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002299 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002300 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002301 /* 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 -08002302 .name = "AverMedia AverTV DVB-T 761",
2303 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002304 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002305 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002307 .no_tda7432 = 1,
2308 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002309 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002310 .tuner_addr = ADDR_UNSET,
2311 .has_dvb = 1,
2312 .no_gpioirq = 1,
2313 .has_remote = 1,
2314 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002315 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002316 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002317 .name = "MATRIX Vision Sigma-SQ",
2318 .video_inputs = 16,
2319 /* .audio_inputs= 0, */
2320 .svhs = NO_SVHS,
2321 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002322 .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 -03002323 .muxsel_hook = sigmaSQ_muxsel,
2324 .gpiomux = { 0 },
2325 .no_msp34xx = 1,
2326 .pll = PLL_28,
2327 .tuner_type = TUNER_ABSENT,
2328 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002329 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002330 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002331 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002332 .name = "MATRIX Vision Sigma-SLC",
2333 .video_inputs = 4,
2334 /* .audio_inputs= 0, */
2335 .svhs = NO_SVHS,
2336 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002337 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002338 .muxsel_hook = sigmaSLC_muxsel,
2339 .gpiomux = { 0 },
2340 .no_msp34xx = 1,
2341 .pll = PLL_28,
2342 .tuner_type = TUNER_ABSENT,
2343 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002344 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002345 /* BTTV_BOARD_APAC_VIEWCOMP */
2346 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002347 /* Attila Kondoros <attila.kondoros@chello.hu> */
2348 /* bt878 TV + FM 0x00000000 subsystem ID */
2349 .name = "APAC Viewcomp 878(AMAX)",
2350 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002351 /* .audio_inputs= 1, */
2352 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002353 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002354 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002355 .gpiomux = { 2, 0, 0, 0 },
2356 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002357 .needs_tvaudio = 0,
2358 .pll = PLL_28,
2359 .tuner_type = TUNER_PHILIPS_PAL,
2360 .tuner_addr = ADDR_UNSET,
2361 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2362 .has_radio = 1, /* not every card has radio */
2363 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002364
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002365 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002366 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002367 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2368 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002369 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002370 .no_tda7432 = 1,
2371 .pll = PLL_28,
2372 .no_video = 1,
2373 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002374 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002375 .tuner_addr = ADDR_UNSET,
2376 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002377 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002378 /* Steven <photon38@pchome.com.tw> */
2379 .name = "V-Gear MyVCD",
2380 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002381 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002382 .svhs = 2,
2383 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002384 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002385 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2386 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002387 .no_msp34xx = 1,
2388 .pll = PLL_28,
2389 .tuner_type = TUNER_PHILIPS_NTSC_M,
2390 .tuner_addr = ADDR_UNSET,
2391 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002392 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002393 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002394 /* Rick C <cryptdragoon@gmail.com> */
2395 .name = "Super TV Tuner",
2396 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002397 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002398 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002399 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002400 .tuner_type = TUNER_PHILIPS_NTSC,
2401 .tuner_addr = ADDR_UNSET,
2402 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002403 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .needs_tvaudio = 1,
2405 .has_radio = 1,
2406 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002407 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002408 /* Chris Fanning <video4linux@haydon.net> */
2409 .name = "Tibet Systems 'Progress DVR' CS16",
2410 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002411 /* .audio_inputs= 0, */
2412 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002413 .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 -08002414 .pll = PLL_28,
2415 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002416 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002417 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002418 .tuner_addr = ADDR_UNSET,
2419 .muxsel_hook = tibetCS16_muxsel,
2420 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002421 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002422 /* Bill Brack <wbrack@mmm.com.hk> */
2423 /*
2424 * Note that, because of the card's wiring, the "master"
2425 * BT878A chip (i.e. the one which controls the analog switch
2426 * and must use this card type) is the 2nd one detected. The
2427 * other 3 chips should use card type 0x85, whose description
2428 * follows this one. There is a EEPROM on the card (which is
2429 * connected to the I2C of one of those other chips), but is
2430 * not currently handled. There is also a facility for a
2431 * "monitor", which is also not currently implemented.
2432 */
2433 .name = "Kodicom 4400R (master)",
2434 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002435 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002436 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002437 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002438 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002439 /* GPIO bits 0-9 used for analog switch:
2440 * 00 - 03: camera selector
2441 * 04 - 06: channel (controller) selector
2442 * 07: data (1->on, 0->off)
2443 * 08: strobe
2444 * 09: reset
2445 * bit 16 is input from sync separator for the channel
2446 */
2447 .gpiomask = 0x0003ff,
2448 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002449 .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 -08002450 .pll = PLL_28,
2451 .no_msp34xx = 1,
2452 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002453 .muxsel_hook = kodicom4400r_muxsel,
2454 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002455 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002456 /* Bill Brack <wbrack@mmm.com.hk> */
2457 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2458 * one which controls the analog switch, and must use the card type)
2459 * is the 2nd one detected. The other 3 chips should use this card
2460 * type
2461 */
2462 .name = "Kodicom 4400R (slave)",
2463 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002464 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002465 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002466 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002467 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002468 .gpiomask = 0x010000,
2469 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002470 .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 -08002471 .pll = PLL_28,
2472 .no_msp34xx = 1,
2473 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002474 .muxsel_hook = kodicom4400r_muxsel,
2475 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002476 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002477 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002478 /* Michael Henson <mhenson@clarityvi.com> */
2479 /* Adlink RTV24 with special unlock codes */
2480 .name = "Adlink RTV24",
2481 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002482 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002483 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002484 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002485 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002486 .tuner_addr = ADDR_UNSET,
2487 .pll = PLL_28,
2488 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002489 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002490 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002491 /* Michael Krufky <mkrufky@m1k.net> */
2492 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002493 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002494 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002495 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002496 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002497 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002498 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002499 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002500 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2501 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002502 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002503 .no_tda7432 = 1,
2504 .has_dvb = 1,
2505 },
2506 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002507 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002508 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002509 .name = "Acorp Y878F",
2510 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002511 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002512 .svhs = 2,
2513 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002514 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002515 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2516 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002517 .needs_tvaudio = 1,
2518 .pll = PLL_28,
2519 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2520 .tuner_addr = 0xc1 >>1,
2521 .has_radio = 1,
2522 },
2523 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002524 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002525 .name = "Conceptronic CTVFMi v2",
2526 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002527 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002528 .svhs = 2,
2529 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002530 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002531 .gpiomux = { 0, 1, 2, 2 },
2532 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002533 .needs_tvaudio = 0,
2534 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002535 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002536 .tuner_addr = ADDR_UNSET,
2537 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002538 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002539 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002540 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002541 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002542 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2543 .video_inputs = 5,
2544 /* .audio_inputs= 1, */
2545 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002546 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002547 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002548 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002549 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2550 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2551 .gpiomute = 0x12400,
2552 .no_msp34xx = 1,
2553 .pll = PLL_28,
2554 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002555 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002556 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002557 },
2558 /* ---- card 0x8b ---------------------------------- */
2559 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002560 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002561 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2562 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002563 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002564 .svhs = 2,
2565 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002566 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002567 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2568 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002569 .no_msp34xx = 1,
2570 .pll = PLL_28,
2571 .tuner_type = TUNER_YMEC_TVF_5533MF,
2572 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002573 .has_radio = 1,
2574 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002575 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002576 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002577 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2578 one external BNC composite input (mux 2)
2579 three internal composite inputs (unknown muxes)
2580 an 18-bit stereo A/D (CS5331A), which has:
2581 one external stereo unblanced (RCA) audio connection
2582 one (or 3?) internal stereo balanced (XLR) audio connection
2583 input is selected via gpio to a 14052B mux
2584 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2585 gain is controlled via an X9221A chip on the I2C bus @0x28
2586 sample rate is controlled via gpio to an MK1413S
2587 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2588 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002589 [BTTV_BOARD_OSPREY440] = {
2590 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002591 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002592 /* .audio_inputs= 2, */
2593 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002594 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002595 .gpiomask = 0x303,
2596 .gpiomute = 0x000, /* int + 32kHz */
2597 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002598 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002599 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002600 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002601 .no_msp34xx = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002602 .no_tda7432 = 1,
2603 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002604 /* ---- card 0x8d ---------------------------------- */
2605 [BTTV_BOARD_ASOUND_SKYEYE] = {
2606 .name = "Asound Skyeye PCTV",
2607 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002608 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002609 .svhs = 2,
2610 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002611 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002612 .gpiomux = { 2, 0, 0, 0 },
2613 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002614 .needs_tvaudio = 1,
2615 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002616 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002617 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002618 },
Bill Pechter633323f2005-11-13 16:07:50 -08002619 /* ---- card 0x8e ---------------------------------- */
2620 [BTTV_BOARD_SABRENT_TVFM] = {
2621 .name = "Sabrent TV-FM (bttv version)",
2622 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002623 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002624 .svhs = 2,
2625 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002626 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002627 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002628 .no_msp34xx = 1,
Bill Pechter633323f2005-11-13 16:07:50 -08002629 .no_tda7432 = 1,
2630 .pll = PLL_28,
2631 .tuner_type = TUNER_TNF_5335MF,
2632 .tuner_addr = ADDR_UNSET,
2633 .has_radio = 1,
2634 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002635 /* ---- card 0x8f ---------------------------------- */
2636 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2637 .name = "Hauppauge ImpactVCB (bt878)",
2638 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002639 /* .audio_inputs= 0, */
2640 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002641 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002642 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002643 .no_msp34xx = 1,
Steven Tothcd1257d2006-01-09 15:25:01 -02002644 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002645 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002646 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002647 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002648 [BTTV_BOARD_MACHTV_MAGICTV] = {
2649 /* Julian Calaby <julian.calaby@gmail.com>
2650 * Slightly different from original MachTV definition (0x60)
2651
2652 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2653 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2654 * properly (methinks) causing no keyup bits being set */
2655
2656 .name = "MagicTV", /* rebranded MachTV */
2657 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002658 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002659 .svhs = 2,
2660 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002661 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002662 .gpiomux = { 0, 1, 2, 3 },
2663 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002664 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2665 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002666 .pll = PLL_28,
2667 .has_radio = 1,
2668 .has_remote = 1,
2669 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002670 [BTTV_BOARD_SSAI_SECURITY] = {
2671 .name = "SSAI Security Video Interface",
2672 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002673 /* .audio_inputs= 0, */
2674 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002675 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002676 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002677 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002678 },
2679 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2680 .name = "SSAI Ultrasound Video Interface",
2681 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002682 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002683 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002684 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002685 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002686 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002687 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002688 /* ---- card 0x94---------------------------------- */
2689 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2690 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002691 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002692 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002693 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002694 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002695 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002696 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002697 .gpiomask = 0x00e00007,
2698 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2699 .gpiomute = 0x00c00007,
2700 .no_msp34xx = 1,
Michael Krufky27cb7862007-06-28 12:19:20 -03002701 .no_tda7432 = 1,
2702 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002703 /* ---- card 0x95---------------------------------- */
2704 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2705 .name = "Typhoon TV-Tuner PCI (50684)",
2706 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002707 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002708 .svhs = 2,
2709 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002710 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002711 .gpiomux = { 0x20001,0x10001, 0, 0 },
2712 .gpiomute = 10,
2713 .needs_tvaudio = 1,
2714 .pll = PLL_28,
2715 .tuner_type = TUNER_PHILIPS_PAL_I,
2716 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002717 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002718 [BTTV_BOARD_GEOVISION_GV600] = {
2719 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002720 .name = "Geovision GV-600",
2721 .video_inputs = 16,
2722 /* .audio_inputs= 0, */
2723 .svhs = NO_SVHS,
2724 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002725 .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 -03002726 .muxsel_hook = geovision_muxsel,
2727 .gpiomux = { 0 },
2728 .no_msp34xx = 1,
2729 .pll = PLL_28,
2730 .tuner_type = TUNER_ABSENT,
2731 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002732 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002733 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2734 /* Mauro Lacy <mauro@lacy.com.ar>
2735 * Based on MagicTV and Conceptronic CONTVFMi */
2736
2737 .name = "Kozumi KTV-01C",
2738 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002739 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002740 .svhs = 2,
2741 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002742 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002743 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002744 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002745 .needs_tvaudio = 0,
2746 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2747 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002748 .pll = PLL_28,
2749 .has_radio = 1,
2750 .has_remote = 1,
2751 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002752 [BTTV_BOARD_ENLTV_FM_2] = {
2753 /* Encore TV Tuner Pro ENL TV-FM-2
2754 Mauro Carvalho Chehab <mchehab@infradead.org */
2755 .name = "Encore ENL TV-FM-2",
2756 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002757 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002758 .svhs = 2,
2759 /* bit 6 -> IR disabled
2760 bit 18/17 = 00 -> mute
2761 01 -> enable external audio input
2762 10 -> internal audio input (mono?)
2763 11 -> internal audio input
2764 */
2765 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002766 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002767 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2768 .gpiomute = 0,
2769 .tuner_type = TUNER_TCL_MF02GIP_5N,
2770 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002771 .pll = PLL_28,
2772 .has_radio = 1,
2773 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002774 },
2775 [BTTV_BOARD_VD012] = {
2776 /* D.Heer@Phytec.de */
2777 .name = "PHYTEC VD-012 (bt878)",
2778 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002779 /* .audio_inputs= 0, */
2780 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002781 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002782 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002783 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2784 .needs_tvaudio = 0,
2785 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002786 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002787 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002788 },
2789 [BTTV_BOARD_VD012_X1] = {
2790 /* D.Heer@Phytec.de */
2791 .name = "PHYTEC VD-012-X1 (bt878)",
2792 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002793 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002794 .svhs = 3,
2795 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002796 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002797 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2798 .needs_tvaudio = 0,
2799 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002800 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002801 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002802 },
2803 [BTTV_BOARD_VD012_X2] = {
2804 /* D.Heer@Phytec.de */
2805 .name = "PHYTEC VD-012-X2 (bt878)",
2806 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002807 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002808 .svhs = 3,
2809 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002810 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002811 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2812 .needs_tvaudio = 0,
2813 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002814 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002815 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002816 },
2817 [BTTV_BOARD_GEOVISION_GV800S] = {
2818 /* Bruno Christo <bchristo@inf.ufsm.br>
2819 *
2820 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2821 * 1 audio input per BT878A = 4 audio inputs
2822 * 4 video inputs per BT878A = 16 video inputs
2823 * This is the first BT878A chip of the GV-800(S). It's the
2824 * "master" chip and it controls the video inputs through an
2825 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2826 * slaves should use card type 0x9e (following this one).
2827 * There is a EEPROM on the card which is currently not handled.
2828 * The audio input is not working yet.
2829 */
2830 .name = "Geovision GV-800(S) (master)",
2831 .video_inputs = 4,
2832 /* .audio_inputs= 1, */
2833 .tuner_type = TUNER_ABSENT,
2834 .tuner_addr = ADDR_UNSET,
2835 .svhs = NO_SVHS,
2836 .gpiomask = 0xf107f,
2837 .no_gpioirq = 1,
2838 .muxsel = MUXSEL(2, 2, 2, 2),
2839 .pll = PLL_28,
2840 .no_msp34xx = 1,
2841 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002842 .muxsel_hook = gv800s_muxsel,
2843 },
2844 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2845 /* Bruno Christo <bchristo@inf.ufsm.br>
2846 *
2847 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2848 * 1 audio input per BT878A = 4 audio inputs
2849 * 4 video inputs per BT878A = 16 video inputs
2850 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2851 * and should use this card type.
2852 * The audio input is not working yet.
2853 */
2854 .name = "Geovision GV-800(S) (slave)",
2855 .video_inputs = 4,
2856 /* .audio_inputs= 1, */
2857 .tuner_type = TUNER_ABSENT,
2858 .tuner_addr = ADDR_UNSET,
2859 .svhs = NO_SVHS,
2860 .gpiomask = 0x00,
2861 .no_gpioirq = 1,
2862 .muxsel = MUXSEL(2, 2, 2, 2),
2863 .pll = PLL_28,
2864 .no_msp34xx = 1,
2865 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002866 .muxsel_hook = gv800s_muxsel,
2867 },
Alan McIvordceaddb2009-03-12 21:43:34 -03002868 [BTTV_BOARD_PV183] = {
2869 .name = "ProVideo PV183", /* 0x9f */
2870 .video_inputs = 2,
2871 /* .audio_inputs= 0, */
2872 .svhs = NO_SVHS,
2873 .gpiomask = 0,
2874 .muxsel = MUXSEL(2, 3),
2875 .gpiomux = { 0 },
2876 .needs_tvaudio = 0,
2877 .no_msp34xx = 1,
2878 .pll = PLL_28,
2879 .tuner_type = TUNER_ABSENT,
2880 .tuner_addr = ADDR_UNSET,
2881 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002882};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002883
2884static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2885
2886/* ----------------------------------------------------------------------- */
2887
2888static unsigned char eeprom_data[256];
2889
2890/*
2891 * identify card
2892 */
2893void __devinit bttv_idcard(struct bttv *btv)
2894{
2895 unsigned int gpiobits;
2896 int i,type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002897
2898 /* read PCI subsystem ID */
Sergei Shtylyovfa1400142011-07-22 15:16:04 -03002899 btv->cardid = btv->c.pci->subsystem_device << 16;
2900 btv->cardid |= btv->c.pci->subsystem_vendor;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002901
2902 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2903 /* look for the card */
2904 for (type = -1, i = 0; cards[i].id != 0; i++)
2905 if (cards[i].id == btv->cardid)
2906 type = i;
2907
2908 if (type != -1) {
2909 /* found it */
Joe Perches8af443e2011-08-21 19:56:48 -03002910 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2911 btv->c.nr, cards[type].name, cards[type].cardnr,
2912 btv->cardid & 0xffff,
2913 (btv->cardid >> 16) & 0xffff);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002914 btv->c.type = cards[type].cardnr;
2915 } else {
2916 /* 404 */
Joe Perches8af443e2011-08-21 19:56:48 -03002917 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2918 btv->c.nr, btv->cardid & 0xffff,
2919 (btv->cardid >> 16) & 0xffff);
2920 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 -07002921 }
2922 }
2923
2924 /* let the user override the autodetected type */
2925 if (card[btv->c.nr] < bttv_num_tvcards)
2926 btv->c.type=card[btv->c.nr];
2927
2928 /* print which card config we are using */
Joe Perches8af443e2011-08-21 19:56:48 -03002929 pr_info("%d: using: %s [card=%d,%s]\n",
2930 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type,
2931 card[btv->c.nr] < bttv_num_tvcards
2932 ? "insmod option" : "autodetected");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002933
2934 /* overwrite gpio stuff ?? */
2935 if (UNSET == audioall && UNSET == audiomux[0])
2936 return;
2937
2938 if (UNSET != audiomux[0]) {
2939 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002940 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002941 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002942 gpiobits |= audiomux[i];
2943 }
2944 } else {
2945 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002946 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002947 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002948 }
2949 }
2950 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
Joe Perches8af443e2011-08-21 19:56:48 -03002951 pr_info("%d: gpio config override: mask=0x%x, mux=",
2952 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002953 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Joe Perches8af443e2011-08-21 19:56:48 -03002954 pr_cont("%s0x%x",
2955 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002956 }
Joe Perches8af443e2011-08-21 19:56:48 -03002957 pr_cont("\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002958}
2959
2960/*
2961 * (most) board specific initialisations goes here
2962 */
2963
2964/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002965static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002966{
2967 int type = -1;
2968
2969 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002970 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002971 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002972 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002973 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002974 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002975
2976 if (-1 != type) {
2977 btv->c.type = type;
Joe Perches8af443e2011-08-21 19:56:48 -03002978 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2979 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002980 }
2981}
2982
2983static void flyvideo_gpio(struct bttv *btv)
2984{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002985 int gpio, has_remote, has_radio, is_capture_only;
2986 int is_lr90, has_tda9820_tda9821;
2987 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002988
2989 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002990 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002991 gpio = gpio_read();
2992 /* FIXME: must restore OUR_EN ??? */
2993
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002994 /* all cards provide GPIO info, some have an additional eeprom
2995 * LR50: GPIO coding can be found lower right CP1 .. CP9
2996 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2997 * GPIO14-12: n.c.
2998 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002999
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003000 * lowest 3 bytes are remote control codes (no handshake needed)
3001 * xxxFFF: No remote control chip soldered
3002 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
3003 * Note: Some bits are Audio_Mask !
3004 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003005 ttype = (gpio & 0x0f0000) >> 16;
3006 switch (ttype) {
3007 case 0x0:
3008 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003009 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003010 case 0x2:
3011 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003012 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003013 case 0x4:
3014 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003015 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003016 case 0x6:
3017 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003018 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003019 case 0xC:
3020 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003021 break;
3022 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003023 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003024 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003025 }
3026
3027 has_remote = gpio & 0x800000;
3028 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003029 /* unknown 0x200000;
3030 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003031 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003032 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003033 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
3034 /*
3035 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003036
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003037 if (is_capture_only)
3038 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003039
Joe Perches8af443e2011-08-21 19:56:48 -03003040 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
3041 btv->c.nr, has_radio ? "yes" : "no",
3042 has_remote ? "yes" : "no", tuner_type, gpio);
3043 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
3044 btv->c.nr, is_lr90 ? "yes" : "no",
3045 has_tda9820_tda9821 ? "yes" : "no",
3046 is_capture_only ? "yes" : "no");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003047
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003048 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
3049 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003050 btv->has_radio = has_radio;
3051
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003052 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3053 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3054 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003055 if (has_tda9820_tda9821)
3056 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003057 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003058}
3059
3060static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3061 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3062static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3063 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3064
3065static void miro_pinnacle_gpio(struct bttv *btv)
3066{
3067 int id,msp,gpio;
3068 char *info;
3069
3070 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003071 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003072 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003073 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003074 if (id < 32) {
3075 btv->tuner_type = miro_tunermap[id];
3076 if (0 == (gpio & 0x20)) {
3077 btv->has_radio = 1;
3078 if (!miro_fmtuner[id]) {
3079 btv->has_matchbox = 1;
3080 btv->mbox_we = (1<<6);
3081 btv->mbox_most = (1<<7);
3082 btv->mbox_clk = (1<<8);
3083 btv->mbox_data = (1<<9);
3084 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3085 }
3086 } else {
3087 btv->has_radio = 0;
3088 }
3089 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003090 if (btv->c.type == BTTV_BOARD_MIRO)
3091 btv->c.type = BTTV_BOARD_MIROPRO;
3092 if (btv->c.type == BTTV_BOARD_PINNACLE)
3093 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003094 }
Joe Perches8af443e2011-08-21 19:56:48 -03003095 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3096 btv->c.nr, id+1, btv->tuner_type,
3097 !btv->has_radio ? "no" :
3098 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3099 (-1 == msp) ? "no" : "yes");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003100 } else {
3101 /* new cards with microtune tuner */
3102 id = 63 - id;
3103 btv->has_radio = 0;
3104 switch (id) {
3105 case 1:
3106 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003107 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003108 break;
3109 case 2:
3110 info = "PAL+SECAM / stereo";
3111 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003112 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003113 break;
3114 case 3:
3115 info = "NTSC / stereo";
3116 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003117 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003118 break;
3119 case 4:
3120 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003121 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003122 break;
3123 case 5:
3124 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003125 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003126 break;
3127 case 6:
3128 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003129 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003130 break;
3131 case 7:
3132 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003133 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003134 break;
3135 default:
3136 info = "oops: unknown card";
3137 break;
3138 }
3139 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003140 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Joe Perches8af443e2011-08-21 19:56:48 -03003141 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3142 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003143 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003144 }
3145}
3146
3147/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3148#define LM1882_SYNC_DRIVE 0x200000L
3149
3150static void init_ids_eagle(struct bttv *btv)
3151{
3152 gpio_inout(0xffffff,0xFFFF37);
3153 gpio_write(0x200020);
3154
3155 /* flash strobe inverter ?! */
3156 gpio_write(0x200024);
3157
3158 /* switch sync drive off */
3159 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3160
3161 /* set BT848 muxel to 2 */
3162 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3163}
3164
3165/* Muxsel helper for the IDS Eagle.
3166 * the eagles does not use the standard muxsel-bits but
3167 * has its own multiplexer */
3168static void eagle_muxsel(struct bttv *btv, unsigned int input)
3169{
Trent Piepho430390e2009-01-28 21:32:59 -03003170 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003171
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003172 /* composite */
3173 /* set chroma ADC to sleep */
3174 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3175 /* set to composite video */
3176 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3177 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003178
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003179 /* switch sync drive off */
3180 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003181}
3182
3183static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3184{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003185 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003186 gpio_write(masks[input%4]);
3187}
3188
3189/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3190 alarms output
3191
3192 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3193 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3194
3195 IN - sensor inputs, INx - sensor inputs and TI XORed together
3196 O1,O2,O3 - alarm outputs (relays)
3197
3198 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3199
3200*/
3201
3202static void init_lmlbt4x(struct bttv *btv)
3203{
Joe Perches8af443e2011-08-21 19:56:48 -03003204 pr_debug("LMLBT4x init\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003205 btwrite(0x000000, BT848_GPIO_REG_INP);
3206 gpio_inout(0xffffff, 0x0006C0);
3207 gpio_write(0x000000);
3208}
3209
3210static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3211{
3212 unsigned int inmux = input % 8;
3213 gpio_inout( 0xf, 0xf );
3214 gpio_bits( 0xf, inmux );
3215}
3216
3217static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3218{
3219 unsigned int inmux = input % 4;
3220 gpio_inout( 3<<9, 3<<9 );
3221 gpio_bits( 3<<9, inmux<<9 );
3222}
3223
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003224static void geovision_muxsel(struct bttv *btv, unsigned int input)
3225{
3226 unsigned int inmux = input % 16;
3227 gpio_inout(0xf, 0xf);
3228 gpio_bits(0xf, inmux);
3229}
3230
Linus Torvalds1da177e2005-04-16 15:20:36 -07003231/* ----------------------------------------------------------------------- */
3232
3233static void bttv_reset_audio(struct bttv *btv)
3234{
3235 /*
3236 * BT878A has a audio-reset register.
3237 * 1. This register is an audio reset function but it is in
3238 * function-0 (video capture) address space.
3239 * 2. It is enough to do this once per power-up of the card.
3240 * 3. There is a typo in the Conexant doc -- it is not at
3241 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3242 * --//Shrikumar 030609
3243 */
3244 if (btv->id != 878)
3245 return;
3246
3247 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03003248 pr_debug("%d: BT878A ARESET\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003249 btwrite((1<<7), 0x058);
3250 udelay(10);
3251 btwrite( 0, 0x058);
3252}
3253
3254/* initialization part one -- before registering i2c bus */
3255void __devinit bttv_init_card1(struct bttv *btv)
3256{
3257 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003258 case BTTV_BOARD_HAUPPAUGE:
3259 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003260 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003261 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003262 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003263 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003264 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003265 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003266 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003267 boot_msp34xx(btv,11);
3268 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003269 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003270 pvr_boot(btv);
3271 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003272 case BTTV_BOARD_TWINHAN_DST:
3273 case BTTV_BOARD_AVDVBT_771:
3274 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003275 btv->use_i2c_hw = 1;
3276 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003277 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003278 init_RTV24( btv );
3279 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003280
Linus Torvalds1da177e2005-04-16 15:20:36 -07003281 }
3282 if (!bttv_tvcards[btv->c.type].has_dvb)
3283 bttv_reset_audio(btv);
3284}
3285
3286/* initialization part two -- after registering i2c bus */
3287void __devinit bttv_init_card2(struct bttv *btv)
3288{
Trent Piephoac7dc842007-06-28 17:51:08 -03003289 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003290
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003291 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003292 bttv_readee(btv,eeprom_data,0xa0);
3293 identify_by_eeprom(btv,eeprom_data);
3294 }
3295
3296 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003297 case BTTV_BOARD_MIRO:
3298 case BTTV_BOARD_MIROPRO:
3299 case BTTV_BOARD_PINNACLE:
3300 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003301 /* miro/pinnacle */
3302 miro_pinnacle_gpio(btv);
3303 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003304 case BTTV_BOARD_FLYVIDEO_98:
3305 case BTTV_BOARD_MAXI:
3306 case BTTV_BOARD_LIFE_FLYKIT:
3307 case BTTV_BOARD_FLYVIDEO:
3308 case BTTV_BOARD_TYPHOON_TVIEW:
3309 case BTTV_BOARD_CHRONOS_VS2:
3310 case BTTV_BOARD_FLYVIDEO_98FM:
3311 case BTTV_BOARD_FLYVIDEO2000:
3312 case BTTV_BOARD_FLYVIDEO98EZ:
3313 case BTTV_BOARD_CONFERENCETV:
3314 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003315 flyvideo_gpio(btv);
3316 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003317 case BTTV_BOARD_HAUPPAUGE:
3318 case BTTV_BOARD_HAUPPAUGE878:
3319 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003320 /* pick up some config infos from the eeprom */
3321 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003322 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003323 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003324 case BTTV_BOARD_AVERMEDIA98:
3325 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003326 bttv_readee(btv,eeprom_data,0xa0);
3327 avermedia_eeprom(btv);
3328 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003329 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003330 init_PXC200(btv);
3331 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003332 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003333 picolo_tetra_init(btv);
3334 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003335 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003336 btv->has_radio = 1;
3337 btv->has_matchbox = 1;
3338 btv->mbox_we = 0x20;
3339 btv->mbox_most = 0;
3340 btv->mbox_clk = 0x08;
3341 btv->mbox_data = 0x10;
3342 btv->mbox_mask = 0x38;
3343 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003344 case BTTV_BOARD_VOBIS_BOOSTAR:
3345 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003346 terratec_active_radio_upgrade(btv);
3347 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003348 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003349 if (btv->cardid == 0x3002144f) {
3350 btv->has_radio=1;
Joe Perches8af443e2011-08-21 19:56:48 -03003351 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3352 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003353 }
3354 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003355 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003356 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003357 /* Fix up entry for 3DFX VoodooTV 100,
3358 which is an OEM STB card variant. */
3359 btv->has_radio=0;
3360 btv->tuner_type=TUNER_TEMIC_NTSC;
3361 }
3362 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003363 case BTTV_BOARD_OSPREY1x0:
3364 case BTTV_BOARD_OSPREY1x0_848:
3365 case BTTV_BOARD_OSPREY101_848:
3366 case BTTV_BOARD_OSPREY1x1:
3367 case BTTV_BOARD_OSPREY1x1_SVID:
3368 case BTTV_BOARD_OSPREY2xx:
3369 case BTTV_BOARD_OSPREY2x0_SVID:
3370 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003371 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003372 case BTTV_BOARD_OSPREY500:
3373 case BTTV_BOARD_OSPREY540:
3374 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003375 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003376 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003377 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003378 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003379 init_ids_eagle(btv);
3380 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003381 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003382 bttv_readee(btv,eeprom_data,0xa0);
3383 modtec_eeprom(btv);
3384 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003385 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003386 init_lmlbt4x(btv);
3387 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003388 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003389 tibetCS16_init(btv);
3390 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003391 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003392 kodicom4400r_init(btv);
3393 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003394 case BTTV_BOARD_GEOVISION_GV800S:
3395 gv800s_init(btv);
3396 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003397 }
3398
3399 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003400 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003401 /* defaults from card list */
3402 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3403 btv->pll.pll_ifreq=28636363;
3404 btv->pll.pll_crystal=BT848_IFORM_XT0;
3405 }
3406 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3407 btv->pll.pll_ifreq=35468950;
3408 btv->pll.pll_crystal=BT848_IFORM_XT1;
3409 }
3410 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003411 switch (pll[btv->c.nr]) {
3412 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003413 btv->pll.pll_crystal = 0;
3414 btv->pll.pll_ifreq = 0;
3415 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003416 break;
3417 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003418 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003419 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003421 btv->pll.pll_crystal = BT848_IFORM_XT0;
3422 break;
3423 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003424 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003425 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003426 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003427 btv->pll.pll_crystal = BT848_IFORM_XT1;
3428 break;
3429 }
3430 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003431 btv->pll.pll_current = -1;
3432
Linus Torvalds1da177e2005-04-16 15:20:36 -07003433 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003434 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003435 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003436 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003437 if (UNSET != tuner[btv->c.nr])
3438 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003439
Trent Piephoabb03622009-01-28 21:32:59 -03003440 if (btv->tuner_type == TUNER_ABSENT)
Joe Perches8af443e2011-08-21 19:56:48 -03003441 pr_info("%d: tuner absent\n", btv->c.nr);
3442 else if (btv->tuner_type == UNSET)
3443 pr_warn("%d: tuner type unset\n", btv->c.nr);
Trent Piephoac7dc842007-06-28 17:51:08 -03003444 else
Joe Perches8af443e2011-08-21 19:56:48 -03003445 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003446
Hans Verkuil859f0272009-03-28 08:29:00 -03003447 if (autoload != UNSET) {
Joe Perches8af443e2011-08-21 19:56:48 -03003448 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr);
3449 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3450 btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003451 }
3452
Trent Piephoabb03622009-01-28 21:32:59 -03003453 if (UNSET == btv->tuner_type)
3454 btv->tuner_type = TUNER_ABSENT;
3455
Trent Piepho5221e212009-01-28 21:32:59 -03003456 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3457 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003458 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3459 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003460 if (svhs[btv->c.nr] != UNSET)
3461 btv->svhs = svhs[btv->c.nr];
3462 if (remote[btv->c.nr] != UNSET)
3463 btv->has_remote = remote[btv->c.nr];
3464
3465 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003466 btv->has_radio = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003467 if (bttv_tvcards[btv->c.type].has_remote)
Hans Verkuil2c905772009-07-20 08:14:17 -03003468 btv->has_remote = 1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003469 if (!bttv_tvcards[btv->c.type].no_gpioirq)
Hans Verkuil2c905772009-07-20 08:14:17 -03003470 btv->gpioirq = 1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003471 if (bttv_tvcards[btv->c.type].volume_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003472 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003473 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003474 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003475
Trent Piephoabb03622009-01-28 21:32:59 -03003476 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003477 return; /* no tuner or related drivers to load */
3478
Hans Verkuil859f0272009-03-28 08:29:00 -03003479 if (btv->has_saa6588 || saa6588[btv->c.nr]) {
3480 /* Probe for RDS receiver chip */
3481 static const unsigned short addrs[] = {
3482 0x20 >> 1,
3483 0x22 >> 1,
3484 I2C_CLIENT_END
3485 };
3486 struct v4l2_subdev *sd;
3487
Hans Verkuil53dacb12009-08-10 02:49:08 -03003488 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003489 &btv->c.i2c_adap, "saa6588", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003490 btv->has_saa6588 = (sd != NULL);
3491 }
3492
Linus Torvalds1da177e2005-04-16 15:20:36 -07003493 /* try to detect audio/fader chips */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003494
Hans Verkuil859f0272009-03-28 08:29:00 -03003495 /* First check if the user specified the audio chip via a module
3496 option. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003497
Hans Verkuil859f0272009-03-28 08:29:00 -03003498 switch (audiodev[btv->c.nr]) {
3499 case -1:
3500 return; /* do not load any audio module */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003501
Hans Verkuil859f0272009-03-28 08:29:00 -03003502 case 0: /* autodetect */
3503 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003504
Hans Verkuil859f0272009-03-28 08:29:00 -03003505 case 1: {
3506 /* The user specified that we should probe for msp3400 */
3507 static const unsigned short addrs[] = {
3508 I2C_ADDR_MSP3400 >> 1,
3509 I2C_ADDR_MSP3400_ALT >> 1,
3510 I2C_CLIENT_END
3511 };
3512
Hans Verkuil53dacb12009-08-10 02:49:08 -03003513 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003514 &btv->c.i2c_adap, "msp3400", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003515 if (btv->sd_msp34xx)
3516 return;
3517 goto no_audio;
3518 }
3519
3520 case 2: {
3521 /* The user specified that we should probe for tda7432 */
3522 static const unsigned short addrs[] = {
3523 I2C_ADDR_TDA7432 >> 1,
3524 I2C_CLIENT_END
3525 };
3526
Hans Verkuil53dacb12009-08-10 02:49:08 -03003527 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003528 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003529 return;
3530 goto no_audio;
3531 }
3532
3533 case 3: {
3534 /* The user specified that we should probe for tvaudio */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003535 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003536 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003537 if (btv->sd_tvaudio)
3538 return;
3539 goto no_audio;
3540 }
3541
3542 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003543 pr_warn("%d: unknown audiodev value!\n", btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003544 return;
3545 }
3546
3547 /* There were no overrides, so now we try to discover this through the
3548 card definition */
3549
3550 /* probe for msp3400 first: this driver can detect whether or not
3551 it really is a msp3400, so it will return NULL when the device
3552 found is really something else (e.g. a tea6300). */
3553 if (!bttv_tvcards[btv->c.type].no_msp34xx) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003554 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003555 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003556 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003557 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003558 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003559 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003560 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003561 }
3562
3563 /* If we found a msp34xx, then we're done. */
3564 if (btv->sd_msp34xx)
3565 return;
3566
3567 /* it might also be a tda7432. */
3568 if (!bttv_tvcards[btv->c.type].no_tda7432) {
3569 static const unsigned short addrs[] = {
3570 I2C_ADDR_TDA7432 >> 1,
3571 I2C_CLIENT_END
3572 };
3573
Hans Verkuil53dacb12009-08-10 02:49:08 -03003574 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003575 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003576 return;
3577 }
3578
3579 /* Now see if we can find one of the tvaudio devices. */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003580 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003581 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003582 if (btv->sd_tvaudio)
3583 return;
3584
3585no_audio:
Joe Perches8af443e2011-08-21 19:56:48 -03003586 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003587}
3588
3589
Hans Verkuil2c905772009-07-20 08:14:17 -03003590/* initialize the tuner */
3591void __devinit bttv_init_tuner(struct bttv *btv)
3592{
3593 int addr = ADDR_UNSET;
3594
3595 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3596 addr = bttv_tvcards[btv->c.type].tuner_addr;
3597
3598 if (btv->tuner_type != TUNER_ABSENT) {
3599 struct tuner_setup tun_setup;
3600
3601 /* Load tuner module before issuing tuner config call! */
3602 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003603 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003604 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003605 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3606 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003607 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003608 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3609 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003610 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003611 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
Hans Verkuil2c905772009-07-20 08:14:17 -03003612
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003613 tun_setup.mode_mask = T_ANALOG_TV;
Hans Verkuil2c905772009-07-20 08:14:17 -03003614 tun_setup.type = btv->tuner_type;
3615 tun_setup.addr = addr;
3616
3617 if (bttv_tvcards[btv->c.type].has_radio)
3618 tun_setup.mode_mask |= T_RADIO;
3619
3620 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3621 }
3622
3623 if (btv->tda9887_conf) {
3624 struct v4l2_priv_tun_config tda9887_cfg;
3625
3626 tda9887_cfg.tuner = TUNER_TDA9887;
3627 tda9887_cfg.priv = &btv->tda9887_conf;
3628
3629 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3630 }
3631}
3632
Linus Torvalds1da177e2005-04-16 15:20:36 -07003633/* ----------------------------------------------------------------------- */
3634
3635static void modtec_eeprom(struct bttv *btv)
3636{
3637 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3638 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003639 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3640 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003641 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3642 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003643 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3644 btv->c.nr, &eeprom_data[0x1e]);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003645 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3646 btv->tuner_type=TUNER_PHILIPS_NTSC;
Joe Perches8af443e2011-08-21 19:56:48 -03003647 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3648 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003649 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003650 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3651 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003652 }
3653}
3654
3655static void __devinit hauppauge_eeprom(struct bttv *btv)
3656{
3657 struct tveeprom tv;
3658
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003659 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003660 btv->tuner_type = tv.tuner_type;
3661 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003662
Joe Perches8af443e2011-08-21 19:56:48 -03003663 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003664 btv->c.nr, tv.model);
3665
3666 /*
3667 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3668 * type based on model #.
3669 */
3670 if(tv.model == 64900) {
Joe Perches8af443e2011-08-21 19:56:48 -03003671 pr_info("%d: Switching board type from %s to %s\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003672 btv->c.nr,
3673 bttv_tvcards[btv->c.type].name,
3674 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3675 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3676 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003677}
3678
3679static int terratec_active_radio_upgrade(struct bttv *btv)
3680{
3681 int freq;
3682
3683 btv->has_radio = 1;
3684 btv->has_matchbox = 1;
3685 btv->mbox_we = 0x10;
3686 btv->mbox_most = 0x20;
3687 btv->mbox_clk = 0x08;
3688 btv->mbox_data = 0x04;
3689 btv->mbox_mask = 0x3c;
3690
3691 btv->mbox_iow = 1 << 8;
3692 btv->mbox_ior = 1 << 9;
3693 btv->mbox_csel = 1 << 10;
3694
3695 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003696 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003697 if (0x1ed8 == tea5757_read(btv)) {
Joe Perches8af443e2011-08-21 19:56:48 -03003698 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003699 btv->has_radio = 1;
Hans Verkuil859f0272009-03-28 08:29:00 -03003700 btv->has_saa6588 = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003701 btv->has_matchbox = 1;
3702 } else {
3703 btv->has_radio = 0;
3704 btv->has_matchbox = 0;
3705 }
3706 return 0;
3707}
3708
3709
3710/* ----------------------------------------------------------------------- */
3711
3712/*
3713 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3714 *
3715 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3716 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3717 * unpacked with unzip).
3718 */
3719#define PVR_GPIO_DELAY 10
3720
3721#define BTTV_ALT_DATA 0x000001
3722#define BTTV_ALT_DCLK 0x100000
3723#define BTTV_ALT_NCONFIG 0x800000
3724
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003725static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3726 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003727{
3728 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003729 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003730 int i;
3731
3732 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3733 gpio_write(0);
3734 udelay(PVR_GPIO_DELAY);
3735
3736 gpio_write(BTTV_ALT_NCONFIG);
3737 udelay(PVR_GPIO_DELAY);
3738
3739 for (n = 0; n < microlen; n++) {
3740 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003741 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003742 gpio_bits(BTTV_ALT_DCLK,0);
3743 if (bits & 0x01)
3744 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3745 else
3746 gpio_bits(BTTV_ALT_DATA,0);
3747 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3748 bits >>= 1;
3749 }
3750 }
3751 gpio_bits(BTTV_ALT_DCLK,0);
3752 udelay(PVR_GPIO_DELAY);
3753
3754 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3755 for (i = 0 ; i < 30 ; i++) {
3756 gpio_bits(BTTV_ALT_DCLK,0);
3757 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3758 }
3759 gpio_bits(BTTV_ALT_DCLK,0);
3760 return 0;
3761}
3762
3763static int __devinit pvr_boot(struct bttv *btv)
3764{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003765 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003766 int rc;
3767
3768 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3769 if (rc != 0) {
Joe Perches8af443e2011-08-21 19:56:48 -03003770 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003771 return rc;
3772 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003773 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
Joe Perches8af443e2011-08-21 19:56:48 -03003774 pr_info("%d: altera firmware upload %s\n",
3775 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003776 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003777 return rc;
3778}
3779
3780/* ----------------------------------------------------------------------- */
3781/* some osprey specific stuff */
3782
Trent Piephocf784d52007-07-21 21:26:40 -03003783static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003784{
Trent Piephocf784d52007-07-21 21:26:40 -03003785 int i;
3786 u32 serial = 0;
3787 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003788
Trent Piephocf784d52007-07-21 21:26:40 -03003789 /* This code will nevery actually get called in this case.... */
3790 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3791 /* this might be an antique... check for MMAC label in eeprom */
3792 if (!strncmp(ee, "MMAC", 4)) {
3793 u8 checksum = 0;
3794 for (i = 0; i < 21; i++)
3795 checksum += ee[i];
3796 if (checksum != ee[21])
3797 return;
3798 cardid = BTTV_BOARD_OSPREY1x0_848;
3799 for (i = 12; i < 21; i++)
3800 serial *= 10, serial += ee[i] - '0';
3801 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003802 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003803 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003804
Trent Piephocf784d52007-07-21 21:26:40 -03003805 for (i = 4*16; i < 8*16; i += 16) {
3806 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003807
Trent Piephocf784d52007-07-21 21:26:40 -03003808 if ((checksum&0xff) + (checksum>>8) == 0xff)
3809 break;
3810 }
3811 if (i >= 8*16)
3812 return;
3813 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003814
Trent Piephocf784d52007-07-21 21:26:40 -03003815 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003816 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003817
Trent Piephocf784d52007-07-21 21:26:40 -03003818 switch(type) {
3819 /* 848 based */
3820 case 0x0004:
3821 cardid = BTTV_BOARD_OSPREY1x0_848;
3822 break;
3823 case 0x0005:
3824 cardid = BTTV_BOARD_OSPREY101_848;
3825 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003826
Trent Piephocf784d52007-07-21 21:26:40 -03003827 /* 878 based */
3828 case 0x0012:
3829 case 0x0013:
3830 cardid = BTTV_BOARD_OSPREY1x0;
3831 break;
3832 case 0x0014:
3833 case 0x0015:
3834 cardid = BTTV_BOARD_OSPREY1x1;
3835 break;
3836 case 0x0016:
3837 case 0x0017:
3838 case 0x0020:
3839 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3840 break;
3841 case 0x0018:
3842 case 0x0019:
3843 case 0x001E:
3844 case 0x001F:
3845 cardid = BTTV_BOARD_OSPREY2xx;
3846 break;
3847 case 0x001A:
3848 case 0x001B:
3849 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3850 break;
3851 case 0x0040:
3852 cardid = BTTV_BOARD_OSPREY500;
3853 break;
3854 case 0x0050:
3855 case 0x0056:
3856 cardid = BTTV_BOARD_OSPREY540;
3857 /* bttv_osprey_540_init(btv); */
3858 break;
3859 case 0x0060:
3860 case 0x0070:
3861 case 0x00A0:
3862 cardid = BTTV_BOARD_OSPREY2x0;
3863 /* enable output on select control lines */
3864 gpio_inout(0xffffff,0x000303);
3865 break;
3866 case 0x00D8:
3867 cardid = BTTV_BOARD_OSPREY440;
3868 break;
3869 default:
3870 /* unknown...leave generic, but get serial # */
Joe Perches8af443e2011-08-21 19:56:48 -03003871 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
3872 btv->c.nr, type);
Trent Piephocf784d52007-07-21 21:26:40 -03003873 break;
3874 }
Al Viroc1c36f32008-05-21 00:32:21 -03003875 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003876 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003877
Joe Perches8af443e2011-08-21 19:56:48 -03003878 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
3879 btv->c.nr, cardid,
3880 cardid > 0 ? bttv_tvcards[cardid].name : "Unknown", serial);
Trent Piephocf784d52007-07-21 21:26:40 -03003881
3882 if (cardid<0 || btv->c.type == cardid)
3883 return;
3884
3885 /* card type isn't set correctly */
3886 if (card[btv->c.nr] < bttv_num_tvcards) {
Joe Perches8af443e2011-08-21 19:56:48 -03003887 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
3888 btv->c.nr);
Trent Piephocf784d52007-07-21 21:26:40 -03003889 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003890 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
3891 btv->c.nr, btv->c.type, cardid);
Trent Piephocf784d52007-07-21 21:26:40 -03003892 btv->c.type = cardid;
3893 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003894}
3895
3896/* ----------------------------------------------------------------------- */
3897/* AVermedia specific stuff, from bktr_card.c */
3898
3899static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003900 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3901 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3902 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3903 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3904 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003905 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003906
3907static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003908 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003909 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3910 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003911 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3912 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003913
3914static void __devinit avermedia_eeprom(struct bttv *btv)
3915{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003916 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003917
3918 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003919 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3920 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003921 btv->has_remote = (eeprom_data[0x42] & 0x01);
3922
3923 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003924 if (tuner_format <= 0x0a)
3925 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003926 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003927 if (tuner_format <= 9)
3928 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003929
3930 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003931 if (tuner_format == 0x09)
3932 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003933
Joe Perches8af443e2011-08-21 19:56:48 -03003934 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003935 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3936 if (tuner_type) {
3937 btv->tuner_type = tuner_type;
Joe Perches8af443e2011-08-21 19:56:48 -03003938 pr_cont("%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003939 } else
Joe Perches8af443e2011-08-21 19:56:48 -03003940 pr_cont("Unknown type");
3941 pr_cont(" radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003942 tuner_tv_fm ? "yes" : "no",
3943 btv->has_remote ? "yes" : "no");
3944}
3945
Trent Piepho72134a62009-01-28 21:32:59 -03003946/*
3947 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3948 * analog demod, which is not I2C controlled like the newer and more common
3949 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3950 * that control the IF for the video and audio. Apparently, bttv GPIO
3951 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3952 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3953 */
3954u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003955{
Trent Piepho72134a62009-01-28 21:32:59 -03003956
3957 if (btv->audio == TVAUDIO_INPUT_TUNER) {
3958 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3959 gpiobits |= 0x10000;
3960 else
3961 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003962 }
Trent Piepho72134a62009-01-28 21:32:59 -03003963
3964 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3965 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003966}
3967
3968
3969/*
3970 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003971 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003972 *
3973 * Hauppauge: pin 5
3974 * Voodoo: pin 20
3975 */
3976static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3977{
3978 int mask = (1 << pin);
3979
3980 gpio_inout(mask,mask);
3981 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003982 mdelay(2);
3983 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003984 gpio_bits(mask,mask);
3985
3986 if (bttv_gpio)
3987 bttv_gpio_tracking(btv,"msp34xx");
3988 if (bttv_verbose)
Joe Perches8af443e2011-08-21 19:56:48 -03003989 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
3990 btv->c.nr, pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003991}
3992
Linus Torvalds1da177e2005-04-16 15:20:36 -07003993/* ----------------------------------------------------------------------- */
3994/* Imagenation L-Model PXC200 Framegrabber */
3995/* This is basically the same procedure as
3996 * used by Alessandro Rubini in his pxc200
3997 * driver, but using BTTV functions */
3998
3999static void __devinit init_PXC200(struct bttv *btv)
4000{
4001 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
4002 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
4003 0x00 };
4004 unsigned int i;
4005 int tmp;
4006 u32 val;
4007
4008 /* Initialise GPIO-connevted stuff */
4009 gpio_inout(0xffffff, (1<<13));
4010 gpio_write(0);
4011 udelay(3);
4012 gpio_write(1<<13);
4013 /* GPIO inputs are pulled up, so no need to drive
4014 * reset pin any longer */
4015 gpio_bits(0xffffff, 0);
4016 if (bttv_gpio)
4017 bttv_gpio_tracking(btv,"pxc200");
4018
4019 /* we could/should try and reset/control the AD pots? but
4020 right now we simply turned off the crushing. Without
4021 this the AGC drifts drifts
4022 remember the EN is reverse logic -->
4023 setting BT848_ADC_AGC_EN disable the AGC
4024 tboult@eecs.lehigh.edu
4025 */
4026
4027 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4028
4029 /* Initialise MAX517 DAC */
Joe Perches8af443e2011-08-21 19:56:48 -03004030 pr_info("Setting DAC reference voltage level ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004031 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4032
4033 /* Initialise 12C508 PIC */
4034 /* The I2CWrite and I2CRead commmands are actually to the
4035 * same chips - but the R/W bit is included in the address
4036 * argument so the numbers are different */
4037
4038
Joe Perches8af443e2011-08-21 19:56:48 -03004039 pr_info("Initialising 12C508 PIC chip ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004040
4041 /* First of all, enable the clock line. This is used in the PXC200-F */
4042 val = btread(BT848_GPIO_DMA_CTL);
4043 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4044 btwrite(val, BT848_GPIO_DMA_CTL);
4045
4046 /* Then, push to 0 the reset pin long enough to reset the *
4047 * device same as above for the reset line, but not the same
4048 * value sent to the GPIO-connected stuff
4049 * which one is the good one? */
4050 gpio_inout(0xffffff,(1<<2));
4051 gpio_write(0);
4052 udelay(10);
4053 gpio_write(1<<2);
4054
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004055 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004056 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4057 if (tmp != -1) {
Joe Perches8af443e2011-08-21 19:56:48 -03004058 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004059 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4060 }
4061 }
4062
Joe Perches8af443e2011-08-21 19:56:48 -03004063 pr_info("PXC200 Initialised\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004064}
4065
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004066
4067
Peter Skipworth93b43f12005-06-23 22:04:45 -07004068/* ----------------------------------------------------------------------- */
4069/*
4070 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4071 * it. This apparently involves the following procedure for each 878 chip:
4072 *
4073 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4074 *
4075 * 2) write to GPIO_DATA
4076 * - 0x0E
4077 * - sleep 1ms
4078 * - 0x10 + 0x0E
4079 * - sleep 10ms
4080 * - 0x0E
4081 * read from GPIO_DATA into buf (uint_32)
4082 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4083 * error. ERROR_CPLD_Check_Failed stop.
4084 *
4085 * 3) write to GPIO_DATA
4086 * - write 0x4400 + 0x0E
4087 * - sleep 10ms
4088 * - write 0x4410 + 0x0E
4089 * - sleep 1ms
4090 * - write 0x0E
4091 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004092 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004093 * error. ERROR_CPLD_Check_Failed.
4094 */
4095/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004096static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004097init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004098{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004099 uint32_t dataRead = 0;
4100 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004101
Joe Perches8af443e2011-08-21 19:56:48 -03004102 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004103 btv->c.nr);
4104
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004105 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004106
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004107 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4108 msleep (1);
4109 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4110 msleep (10);
4111 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004112
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004113 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004114
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004115 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004116 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004117 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004118 }
4119
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004120 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4121 msleep (10);
4122 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4123 msleep (1);
4124 btwrite (watchdog_value, BT848_GPIO_DATA);
4125 msleep (1);
4126 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004127
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004128 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004129 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004130 btv->c.nr, dataRead);
4131
Peter Skipworth93b43f12005-06-23 22:04:45 -07004132 return;
4133 }
4134
Joe Perches8af443e2011-08-21 19:56:48 -03004135 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004136}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004137
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004138
4139
Linus Torvalds1da177e2005-04-16 15:20:36 -07004140/* ----------------------------------------------------------------------- */
4141/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4142/*
4143 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4144 * This code is placed under the terms of the GNU General Public License
4145 *
4146 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4147 */
4148
4149static void bus_low(struct bttv *btv, int bit)
4150{
4151 if (btv->mbox_ior) {
4152 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4153 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4154 udelay(5);
4155 }
4156
4157 gpio_bits(bit,0);
4158 udelay(5);
4159
4160 if (btv->mbox_ior) {
4161 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4162 udelay(5);
4163 }
4164}
4165
4166static void bus_high(struct bttv *btv, int bit)
4167{
4168 if (btv->mbox_ior) {
4169 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4170 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4171 udelay(5);
4172 }
4173
4174 gpio_bits(bit,bit);
4175 udelay(5);
4176
4177 if (btv->mbox_ior) {
4178 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4179 udelay(5);
4180 }
4181}
4182
4183static int bus_in(struct bttv *btv, int bit)
4184{
4185 if (btv->mbox_ior) {
4186 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4187 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4188 udelay(5);
4189
4190 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4191 udelay(5);
4192 }
4193 return gpio_read() & (bit);
4194}
4195
4196/* TEA5757 register bits */
4197#define TEA_FREQ 0:14
4198#define TEA_BUFFER 15:15
4199
4200#define TEA_SIGNAL_STRENGTH 16:17
4201
4202#define TEA_PORT1 18:18
4203#define TEA_PORT0 19:19
4204
4205#define TEA_BAND 20:21
4206#define TEA_BAND_FM 0
4207#define TEA_BAND_MW 1
4208#define TEA_BAND_LW 2
4209#define TEA_BAND_SW 3
4210
4211#define TEA_MONO 22:22
4212#define TEA_ALLOW_STEREO 0
4213#define TEA_FORCE_MONO 1
4214
4215#define TEA_SEARCH_DIRECTION 23:23
4216#define TEA_SEARCH_DOWN 0
4217#define TEA_SEARCH_UP 1
4218
4219#define TEA_STATUS 24:24
4220#define TEA_STATUS_TUNED 0
4221#define TEA_STATUS_SEARCHING 1
4222
4223/* Low-level stuff */
4224static int tea5757_read(struct bttv *btv)
4225{
4226 unsigned long timeout;
4227 int value = 0;
4228 int i;
4229
4230 /* better safe than sorry */
4231 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4232
4233 if (btv->mbox_ior) {
4234 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4235 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4236 udelay(5);
4237 }
4238
4239 if (bttv_gpio)
4240 bttv_gpio_tracking(btv,"tea5757 read");
4241
4242 bus_low(btv,btv->mbox_we);
4243 bus_low(btv,btv->mbox_clk);
4244
4245 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004246 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004247
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004248 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004249 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4250 schedule();
4251 if (bus_in(btv,btv->mbox_data)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004252 pr_warn("%d: tea5757: read timeout\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004253 return -1;
4254 }
4255
Joe Perches8af443e2011-08-21 19:56:48 -03004256 dprintk("%d: tea5757:", btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004257 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004258 udelay(5);
4259 bus_high(btv,btv->mbox_clk);
4260 udelay(5);
Joe Perches8af443e2011-08-21 19:56:48 -03004261 dprintk_cont("%c",
4262 bus_in(btv, btv->mbox_most) == 0 ? 'T' : '-');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004263 bus_low(btv,btv->mbox_clk);
4264 value <<= 1;
4265 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
Joe Perches8af443e2011-08-21 19:56:48 -03004266 dprintk_cont("%c",
4267 bus_in(btv, btv->mbox_most) == 0 ? 'S' : 'M');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004268 }
Joe Perches8af443e2011-08-21 19:56:48 -03004269 dprintk_cont("\n");
4270 dprintk("%d: tea5757: read 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004271 return value;
4272}
4273
4274static int tea5757_write(struct bttv *btv, int value)
4275{
4276 int i;
4277 int reg = value;
4278
4279 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4280
4281 if (btv->mbox_ior) {
4282 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4283 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4284 udelay(5);
4285 }
4286 if (bttv_gpio)
4287 bttv_gpio_tracking(btv,"tea5757 write");
4288
Joe Perches8af443e2011-08-21 19:56:48 -03004289 dprintk("%d: tea5757: write 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004290 bus_low(btv,btv->mbox_clk);
4291 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004292 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004293 if (reg & 0x1000000)
4294 bus_high(btv,btv->mbox_data);
4295 else
4296 bus_low(btv,btv->mbox_data);
4297 reg <<= 1;
4298 bus_high(btv,btv->mbox_clk);
4299 udelay(10);
4300 bus_low(btv,btv->mbox_clk);
4301 udelay(10);
4302 }
4303 bus_low(btv,btv->mbox_we); /* unmute !!! */
4304 return 0;
4305}
4306
4307void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4308{
4309 dprintk("tea5757_set_freq %d\n",freq);
4310 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004311}
4312
Linus Torvalds1da177e2005-04-16 15:20:36 -07004313/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4314 *
4315 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4316 * switch instead (CD22M3494E). This IC can have multiple active connections
4317 * between Xn (input) and Yn (output) pins. We need to clear any existing
4318 * connection prior to establish a new one, pulsing the STROBE pin.
4319 *
4320 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4321 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004322 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4323 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4324 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4325 * GPIO[8] - - P3[5] (microcontroller)
4326 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4327 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4328 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004329 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004330 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4331 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004332 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004333 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004334 * note: the vendor refused to give any information on this product, all
4335 * that stuff was found using a multimeter! :)
4336 */
4337static void rv605_muxsel(struct bttv *btv, unsigned int input)
4338{
Trent Piepho13afaef2009-01-28 21:32:59 -03004339 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4340 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4341
4342 gpio_bits(0x07f, muxgpio[input]);
4343
Linus Torvalds1da177e2005-04-16 15:20:36 -07004344 /* reset all conections */
4345 gpio_bits(0x200,0x200);
4346 mdelay(1);
4347 gpio_bits(0x200,0x000);
4348 mdelay(1);
4349
Joe Perchesc84e6032008-02-03 17:18:59 +02004350 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004351 gpio_bits(0x480,0x480);
4352 mdelay(1);
4353 gpio_bits(0x480,0x080);
4354 mdelay(1);
4355}
4356
4357/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4358 *
4359 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004360 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
Linus Torvalds1da177e2005-04-16 15:20:36 -07004361 * chips, ten eight input analog multiplexors, a not chip and a few
4362 * other components.
4363 *
4364 * 16 inputs on a secondary bracket are provided and can be selected
4365 * from each of the four capture chips. Two of the eight input
4366 * multiplexors are used to select from any of the 16 input signals.
4367 *
4368 * Unsupported hardware capabilities:
4369 * . A video output monitor on the secondary bracket can be selected from
4370 * one of the 878A chips.
4371 * . Another passthrough but I haven't spent any time investigating it.
4372 * . Digital I/O (logic level connected to GPIO) is available from an
4373 * onboard header.
4374 *
4375 * The on chip input mux should always be set to 2.
4376 * GPIO[16:19] - Video input selection
4377 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4378 * GPIO[?:?] - Digital I/O.
4379 *
4380 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4381 * determined what function (if any) it provides. With the microcontroller
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004382 * and sync separator chips a guess is that it might have to do with video
Linus Torvalds1da177e2005-04-16 15:20:36 -07004383 * switching and maybe some digital I/O.
4384 */
4385static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4386{
4387 /* video mux */
4388 gpio_bits(0x0f0000, input << 16);
4389}
4390
4391static void tibetCS16_init(struct bttv *btv)
4392{
4393 /* enable gpio bits, mask obtained via btSpy */
4394 gpio_inout(0xffffff, 0x0f7fff);
4395 gpio_write(0x0f7fff);
4396}
4397
4398/*
4399 * The following routines for the Kodicom-4400r get a little mind-twisting.
4400 * There is a "master" controller and three "slave" controllers, together
4401 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4402 * The analog switch is controlled by the "master", but the detection order
4403 * of the four BT878A chips is in an order which I just don't understand.
4404 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004405 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004406 * those numbers are different from the detection sequence. When working
4407 * with the analog switch, we need to "map" from the detection sequence
4408 * over to the board's logical controller number. This mapping sequence
4409 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4410 * unit 3, the second (which is the master) is logical unit 0, etc.
4411 * We need to maintain the status of the analog switch (which of the 16
4412 * cameras is connected to which of the 4 controllers). Rather than
4413 * add to the bttv structure for this, we use the data reserved for
4414 * the mbox (unused for this card type).
4415 */
4416
4417/*
4418 * First a routine to set the analog switch, which controls which camera
4419 * is routed to which controller. The switch comprises an X-address
4420 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4421 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4422 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4423 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4424 * specified address. The idea is to set the address and data, then bring
4425 * STROBE high, and finally bring STROBE back to low.
4426 */
4427static void kodicom4400r_write(struct bttv *btv,
4428 unsigned char xaddr,
4429 unsigned char yaddr,
4430 unsigned char data) {
4431 unsigned int udata;
4432
4433 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4434 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4435 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4436 gpio_bits(0x1ff, udata); /* strobe low */
4437}
4438
4439/*
4440 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4441 * use this routine. The routine finds the "master" for the card, maps
4442 * the controller number from the detected position over to the logical
4443 * number, writes the appropriate data to the analog switch, and housekeeps
4444 * the local copy of the switch information. The parameter 'input' is the
4445 * requested camera number (0 - 15).
4446 */
4447static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4448{
4449 char *sw_status;
4450 int xaddr, yaddr;
4451 struct bttv *mctlr;
4452 static unsigned char map[4] = {3, 0, 2, 1};
4453
4454 mctlr = master[btv->c.nr];
4455 if (mctlr == NULL) { /* ignore if master not yet detected */
4456 return;
4457 }
4458 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4459 yaddr = map[yaddr];
4460 sw_status = (char *)(&mctlr->mbox_we);
4461 xaddr = input & 0xf;
4462 /* Check if the controller/camera pair has changed, else ignore */
4463 if (sw_status[yaddr] != xaddr)
4464 {
4465 /* "open" the old switch, "close" the new one, save the new */
4466 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4467 sw_status[yaddr] = xaddr;
4468 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4469 }
4470}
4471
4472/*
4473 * During initialisation, we need to reset the analog switch. We
4474 * also preset the switch to map the 4 connectors on the card to the
4475 * *user's* (see above description of kodicom4400r_muxsel) channels
4476 * 0 through 3
4477 */
4478static void kodicom4400r_init(struct bttv *btv)
4479{
4480 char *sw_status = (char *)(&btv->mbox_we);
4481 int ix;
4482
4483 gpio_inout(0x0003ff, 0x0003ff);
4484 gpio_write(1 << 9); /* reset MUX */
4485 gpio_write(0);
4486 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004487 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004488 sw_status[ix] = ix;
4489 kodicom4400r_write(btv, ix, ix, 1);
4490 }
4491 /*
4492 * Since this is the "master", we need to set up the
4493 * other three controller chips' pointers to this structure
4494 * for later use in the muxsel routine.
4495 */
4496 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4497 return;
4498 master[btv->c.nr-1] = btv;
4499 master[btv->c.nr] = btv;
4500 master[btv->c.nr+1] = btv;
4501 master[btv->c.nr+2] = btv;
4502}
4503
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004504/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4505 * video multiplexers to provide up to 16 video inputs. These
4506 * multiplexers are controlled by the lower 8 GPIO pins of the
4507 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004508
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004509 * xxx0 is pin xxx of multiplexer U5,
4510 * yyy1 is pin yyy of multiplexer U2
4511 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004512#define ENA0 0x01
4513#define ENB0 0x02
4514#define ENA1 0x04
4515#define ENB1 0x08
4516
4517#define IN10 0x10
4518#define IN00 0x20
4519#define IN11 0x40
4520#define IN01 0x80
4521
4522static void xguard_muxsel(struct bttv *btv, unsigned int input)
4523{
4524 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004525 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4526 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4527 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4528 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004529 };
4530 gpio_write(masks[input%16]);
4531}
4532static void picolo_tetra_init(struct bttv *btv)
4533{
4534 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4535 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4536 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4537}
4538static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4539{
4540
Joe Perches8af443e2011-08-21 19:56:48 -03004541 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004542 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4543 /*GPIO[20]&GPIO[21] used to choose the right input*/
4544 btwrite (input<<20,BT848_GPIO_DATA);
4545
4546}
4547
4548/*
4549 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4550 *
4551 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4552 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004553 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004554 * optional "Monitor Out" bus. This allows the card to be looking
4555 * at one input while the monitor is looking at another.
4556 *
4557 * Since I've couldn't be bothered figuring out how to add an
Lucas De Marchi25985ed2011-03-30 22:57:33 -03004558 * independent muxsel for the monitor bus, I've just set it to
Linus Torvalds1da177e2005-04-16 15:20:36 -07004559 * whatever the card is looking at.
4560 *
4561 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4562 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4563 *
4564 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4565 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4566 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4567 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4568 *
4569 */
4570
4571/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4572#define I2C_TDA8540 0x90
4573#define I2C_TDA8540_ALT1 0x92
4574#define I2C_TDA8540_ALT2 0x94
4575#define I2C_TDA8540_ALT3 0x96
4576#define I2C_TDA8540_ALT4 0x98
4577#define I2C_TDA8540_ALT5 0x9a
4578#define I2C_TDA8540_ALT6 0x9c
4579
4580static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4581{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004582 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004583 int key = input % 4;
4584 int matrix = input / 4;
4585
Joe Perches8af443e2011-08-21 19:56:48 -03004586 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004587 btv->c.nr, input, matrix, key);
4588
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004589 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004590 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4591 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4592 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4593 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4594 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4595 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4596 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4597 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4598
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004599 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004600 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004601 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004602 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004603 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004604 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004605 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004606 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004607 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004608
Trent Piephofb5deb12009-01-28 21:32:59 -03004609 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004610}
4611
4612
4613/* PXC200 muxsel helper
4614 * luke@syseng.anu.edu.au
4615 * another transplant
4616 * from Alessandro Rubini (rubini@linux.it)
4617 *
4618 * There are 4 kinds of cards:
4619 * PXC200L which is bt848
4620 * PXC200F which is bt848 with PIC controlling mux
4621 * PXC200AL which is bt878
4622 * PXC200AF which is bt878 with PIC controlling mux
4623 */
4624#define PX_CFG_PXC200F 0x01
4625#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4626#define PX_I2C_PIC 0x0f
4627#define PX_PXC200A_CARDID 0x200a1295
4628#define PX_I2C_CMD_CFG 0x00
4629
4630static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4631{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004632 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004633 long mux;
4634 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004635 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004636
4637 /* Read PIC config to determine if this is a PXC200F */
4638 /* PX_I2C_CMD_CFG*/
4639 buf[0]=0;
4640 buf[1]=0;
4641 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4642 if (rc) {
Joe Perches8af443e2011-08-21 19:56:48 -03004643 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4644 btv->c.nr, rc);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004645 /* not PXC ? do nothing */
Joe Perches8af443e2011-08-21 19:56:48 -03004646 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004647 }
4648
4649 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4650 if (!(rc & PX_CFG_PXC200F)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004651 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4652 btv->c.nr, rc);
4653 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004654 }
4655
4656
4657 /* The multiplexer in the 200F is handled by the GPIO port */
4658 /* get correct mapping between inputs */
4659 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4660 /* ** not needed!? */
4661 mux = input;
4662
4663 /* make sure output pins are enabled */
4664 /* bitmask=0x30f; */
4665 bitmask=0x302;
4666 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004667 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004668 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4669 bitmask |= 7<<4; /* the DAC */
4670 }
4671 btwrite(bitmask, BT848_GPIO_OUT_EN);
4672
4673 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004674 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004675 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4676 else /* older device */
4677 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4678 btwrite(bitmask,BT848_GPIO_DATA);
4679
4680 /*
4681 * Was "to be safe, set the bt848 to input 0"
4682 * Actually, since it's ok at load time, better not messing
4683 * with these bits (on PXC200AF you need to set mux 2 here)
4684 *
4685 * needed because bttv-driver sets mux before calling this function
4686 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004687 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004688 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4689 else /* older device */
4690 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4691
Joe Perches8af443e2011-08-21 19:56:48 -03004692 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004693}
4694
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004695static void phytec_muxsel(struct bttv *btv, unsigned int input)
4696{
4697 unsigned int mux = input % 4;
4698
4699 if (input == btv->svhs)
4700 mux = 0;
4701
4702 gpio_bits(0x3, mux);
4703}
4704
Bruno Christo0c5db422009-03-02 22:38:59 -03004705/*
4706 * GeoVision GV-800(S) functions
4707 * Bruno Christo <bchristo@inf.ufsm.br>
4708*/
4709
4710/* This is a function to control the analog switch, which determines which
4711 * camera is routed to which controller. The switch comprises an X-address
4712 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4713 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4714 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4715 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4716 * specified address. There is also a chip select (gpio bit 16).
4717 * The idea is to set the address and chip select together, bring
4718 * STROBE high, write the data, and finally bring STROBE back to low.
4719 */
4720static void gv800s_write(struct bttv *btv,
4721 unsigned char xaddr,
4722 unsigned char yaddr,
4723 unsigned char data) {
4724 /* On the "master" 878A:
4725 * GPIO bits 0-9 are used for the analog switch:
4726 * 00 - 03: camera selector
4727 * 04 - 06: 878A (controller) selector
4728 * 16: cselect
4729 * 17: strobe
4730 * 18: data (1->on, 0->off)
4731 * 19: reset
4732 */
4733 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4734 const u32 CSELECT = 1<<16;
4735 const u32 STROBE = 1<<17;
4736 const u32 DATA = data<<18;
4737
4738 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4739 gpio_bits(0x20000, STROBE); /* STROBE high */
4740 gpio_bits(0x40000, DATA); /* write DATA */
4741 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4742}
4743
4744/*
4745 * GeoVision GV-800(S) muxsel
4746 *
4747 * Each of the 4 cards (controllers) use this function.
4748 * The controller using this function selects the input through the GPIO pins
4749 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4750 *
4751 * The parameter 'input' is the requested camera number (0-4) on the controller.
4752 * The map array has the address of each input. Note that the addresses in the
4753 * array are in the sequence the original GeoVision driver uses, that is, set
4754 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4755 * the physical "camera 1" connector corresponds to controller 0 input 0,
4756 * "camera 2" corresponds to controller 1 input 0, and so on.
4757 *
4758 * After getting the input address, the function then writes the appropriate
4759 * data to the analog switch, and housekeeps the local copy of the switch
4760 * information.
4761 */
4762static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4763{
4764 struct bttv *mctlr;
4765 char *sw_status;
4766 int xaddr, yaddr;
4767 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4768 { 0x1, 0x5, 0xb, 0x7 },
4769 { 0x2, 0x8, 0xc, 0xe },
4770 { 0x3, 0x9, 0xd, 0xf } };
4771 input = input%4;
4772 mctlr = master[btv->c.nr];
4773 if (mctlr == NULL) {
4774 /* do nothing until the "master" is detected */
4775 return;
4776 }
4777 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4778 sw_status = (char *)(&mctlr->mbox_we);
4779 xaddr = map[yaddr][input] & 0xf;
4780
4781 /* Check if the controller/camera pair has changed, ignore otherwise */
4782 if (sw_status[yaddr] != xaddr) {
4783 /* disable the old switch, enable the new one and save status */
4784 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4785 sw_status[yaddr] = xaddr;
4786 gv800s_write(mctlr, xaddr, yaddr, 1);
4787 }
4788}
4789
4790/* GeoVision GV-800(S) "master" chip init */
4791static void gv800s_init(struct bttv *btv)
4792{
4793 char *sw_status = (char *)(&btv->mbox_we);
4794 int ix;
4795
4796 gpio_inout(0xf107f, 0xf107f);
4797 gpio_write(1<<19); /* reset the analog MUX */
4798 gpio_write(0);
4799
4800 /* Preset camera 0 to the 4 controllers */
4801 for (ix = 0; ix < 4; ix++) {
4802 sw_status[ix] = ix;
4803 gv800s_write(btv, ix, ix, 1);
4804 }
4805
4806 /* Inputs on the "master" controller need this brightness fix */
4807 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4808
4809 if (btv->c.nr > BTTV_MAX-4)
4810 return;
4811 /*
4812 * Store the "master" controller pointer in the master
4813 * array for later use in the muxsel function.
4814 */
4815 master[btv->c.nr] = btv;
4816 master[btv->c.nr+1] = btv;
4817 master[btv->c.nr+2] = btv;
4818 master[btv->c.nr+3] = btv;
4819}
4820
Linus Torvalds1da177e2005-04-16 15:20:36 -07004821/* ----------------------------------------------------------------------- */
4822/* motherboard chipset specific stuff */
4823
Adrian Bunk7d44e892007-12-11 19:23:43 -03004824void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004825{
4826 int pcipci_fail = 0;
4827 struct pci_dev *dev = NULL;
4828
Alan Cox3d265c92006-09-14 11:53:16 -03004829 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004830 pcipci_fail = 1;
4831 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4832 triton1 = 1;
4833 if (pci_pci_problems & PCIPCI_VSFX)
4834 vsfx = 1;
4835#ifdef PCIPCI_ALIMAGIK
4836 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4837 latency = 0x0A;
4838#endif
4839
Linus Torvalds1da177e2005-04-16 15:20:36 -07004840
4841 /* print warnings about any quirks found */
4842 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004843 pr_info("Host bridge needs ETBF enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004844 if (vsfx)
Joe Perches8af443e2011-08-21 19:56:48 -03004845 pr_info("Host bridge needs VSFX enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004846 if (pcipci_fail) {
Joe Perches8af443e2011-08-21 19:56:48 -03004847 pr_info("bttv and your chipset may not work together\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004848 if (!no_overlay) {
Joe Perches8af443e2011-08-21 19:56:48 -03004849 pr_info("overlay will be disabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004850 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004851 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03004852 pr_info("overlay forced. Use this option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004853 }
4854 }
4855 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004856 pr_info("pci latency fixup [%d]\n", latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004857 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004858 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004859 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004860 pci_read_config_byte(dev, 0x53, &b);
4861 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03004862 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4863 b);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004864 }
4865}
4866
4867int __devinit bttv_handle_chipset(struct bttv *btv)
4868{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004869 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004870
4871 if (!triton1 && !vsfx && UNSET == latency)
4872 return 0;
4873
4874 if (bttv_verbose) {
4875 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004876 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4877 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004878 if (vsfx && btv->id >= 878)
Joe Perches8af443e2011-08-21 19:56:48 -03004879 pr_info("%d: enabling VSFX\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004880 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004881 pr_info("%d: setting pci timer to %d\n",
4882 btv->c.nr, latency);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004883 }
4884
4885 if (btv->id < 878) {
4886 /* bt848 (mis)uses a bit in the irq mask for etbf */
4887 if (triton1)
4888 btv->triton1 = BT848_INT_ETBF;
4889 } else {
4890 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004891 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004892 if (triton1)
4893 command |= BT878_EN_TBFX;
4894 if (vsfx)
4895 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004896 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4897 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004898 if (UNSET != latency)
4899 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4900 return 0;
4901}
4902
4903
4904/*
4905 * Local variables:
4906 * c-basic-offset: 8
4907 * End:
4908 */