blob: b7dc921e1b9113f6777735af1f337d3430b41fd8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3 bttv-cards.c
4
5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
7
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08009 & Marcus Metzler (mocm@thp.uni-koeln.de)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26*/
27
Joe Perches8af443e2011-08-21 19:56:48 -030028#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/delay.h>
31#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#include <linux/kmod.h>
33#include <linux/init.h>
34#include <linux/pci.h>
35#include <linux/vmalloc.h>
36#include <linux/firmware.h>
Trent Piephocf784d52007-07-21 21:26:40 -030037#include <net/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Al Viroc1c36f32008-05-21 00:32:21 -030039#include <asm/unaligned.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#include <asm/io.h>
41
42#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020043#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030044#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030045#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070046
47/* fwd decl */
48static void boot_msp34xx(struct bttv *btv, int pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -070049static void hauppauge_eeprom(struct bttv *btv);
50static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030051static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052static void modtec_eeprom(struct bttv *btv);
53static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070054static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070055
Linus Torvalds1da177e2005-04-16 15:20:36 -070056static void rv605_muxsel(struct bttv *btv, unsigned int input);
57static void eagle_muxsel(struct bttv *btv, unsigned int input);
58static void xguard_muxsel(struct bttv *btv, unsigned int input);
59static void ivc120_muxsel(struct bttv *btv, unsigned int input);
60static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
61
62static void PXC200_muxsel(struct bttv *btv, unsigned int input);
63
64static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
65static void picolo_tetra_init(struct bttv *btv);
66
67static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
68static void tibetCS16_init(struct bttv *btv);
69
70static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
71static void kodicom4400r_init(struct bttv *btv);
72
73static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
74static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
75
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030076static void geovision_muxsel(struct bttv *btv, unsigned int input);
77
Trent Piepho15f8eeb2009-01-28 21:32:59 -030078static void phytec_muxsel(struct bttv *btv, unsigned int input);
79
Bruno Christo0c5db422009-03-02 22:38:59 -030080static void gv800s_muxsel(struct bttv *btv, unsigned int input);
81static void gv800s_init(struct bttv *btv);
82
Peter De Schrijverde2843b2011-11-06 10:15:47 -030083static void td3116_muxsel(struct bttv *btv, unsigned int input);
84
Linus Torvalds1da177e2005-04-16 15:20:36 -070085static int terratec_active_radio_upgrade(struct bttv *btv);
86static int tea5757_read(struct bttv *btv);
87static int tea5757_write(struct bttv *btv, int value);
88static void identify_by_eeprom(struct bttv *btv,
89 unsigned char eeprom_data[256]);
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -080090static int pvr_boot(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070091
92/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020093static unsigned int triton1;
94static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070095static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070096int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070097
98static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
99static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
100static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
101static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
102static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
Hans Verkuil859f0272009-03-28 08:29:00 -0300103static unsigned int audiodev[BTTV_MAX];
104static unsigned int saa6588[BTTV_MAX];
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
Hans Verkuil859f0272009-03-28 08:29:00 -0300106static unsigned int autoload = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107static unsigned int gpiomask = UNSET;
108static unsigned int audioall = UNSET;
109static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
110
111/* insmod options */
112module_param(triton1, int, 0444);
113module_param(vsfx, int, 0444);
114module_param(no_overlay, int, 0444);
115module_param(latency, int, 0444);
116module_param(gpiomask, int, 0444);
117module_param(audioall, int, 0444);
118module_param(autoload, int, 0444);
119
120module_param_array(card, int, NULL, 0444);
121module_param_array(pll, int, NULL, 0444);
122module_param_array(tuner, int, NULL, 0444);
123module_param_array(svhs, int, NULL, 0444);
124module_param_array(remote, int, NULL, 0444);
Hans Verkuil859f0272009-03-28 08:29:00 -0300125module_param_array(audiodev, int, NULL, 0444);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126module_param_array(audiomux, int, NULL, 0444);
127
128MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
129 "[enable bug compatibility for triton1 + others]");
130MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
131 "[yet another chipset flaw workaround]");
132MODULE_PARM_DESC(latency,"pci latency timer");
133MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
134MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
135MODULE_PARM_DESC(tuner,"specify installed tuner type");
Hans Verkuil859f0272009-03-28 08:29:00 -0300136MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
137MODULE_PARM_DESC(audiodev, "specify audio device:\n"
138 "\t\t-1 = no audio\n"
139 "\t\t 0 = autodetect (default)\n"
140 "\t\t 1 = msp3400\n"
141 "\t\t 2 = tda7432\n"
142 "\t\t 3 = tvaudio");
143MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300144MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
145 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146
147/* ----------------------------------------------------------------------- */
148/* list of card IDs for bt878+ cards */
149
150static struct CARD {
151 unsigned id;
152 int cardnr;
153 char *name;
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -0800154} cards[] = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800155 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
156 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
157 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
158 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
159 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
160 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
161 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
162 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800163 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800165 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
166 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800168 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
169 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
170 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
171 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
172 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800173 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
175 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800176 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700177
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800178 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700179 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800180 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
181 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700182 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800183 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700184
Wade Berrier434b2522007-06-25 13:02:16 -0300185 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
186 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800187 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800189 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
190 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
191 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
192 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
193 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
194 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
195 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800197 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
198 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
199 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
200 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
201 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700202
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800203 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
204 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
205 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
206 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800208 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
209 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700210 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800211 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
212 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
213 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
214 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
215 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700216
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800217 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
218 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
219 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
220 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
221 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700222
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800223 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
224 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
225 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
226 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
227 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700228
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800229 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
230 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
231 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
232 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800234 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
235 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
236 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
237 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700238
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800239 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
240 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
241 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
242 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
243 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
244 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
245 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
246 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
247 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
Kirill Smelkovb7589ac2010-04-27 13:17:51 -0300248 { 0xa1550800, BTTV_BOARD_IVC200, "IVC-200" },
249 { 0xa1550801, BTTV_BOARD_IVC200, "IVC-200" },
250 { 0xa1550802, BTTV_BOARD_IVC200, "IVC-200" },
251 { 0xa1550803, BTTV_BOARD_IVC200, "IVC-200" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800252 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
253 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
254 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
255 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
256 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
257 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
258 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
259 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
260 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
261 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
262 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
263 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
264 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
265 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
266 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
267 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300268 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
269 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
270 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
271 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800273 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
274 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700275
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800276 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
277 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
278 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
279 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
280 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
281 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700282
Trent Piepho657de3c2006-06-20 00:30:57 -0300283 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800284 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700285
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800286 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
287 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
288 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
sensoray-dev57437c12011-10-25 19:43:55 -0300289 { 0x03116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 311" },
290 { 0x06116000, BTTV_BOARD_SENSORAY311_611, "Sensoray 611" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800291 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
292 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800293 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
294 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800295 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700296
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800297 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
298 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700299
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800300 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
301 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
302 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
303 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700304
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800305 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700306
Scott Alfter1ebba672007-04-02 14:22:39 -0300307 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
308 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
309
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700310 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800311 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700312
Steven Tothcd1257d2006-01-09 15:25:01 -0200313 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
314 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
315
Robert Millan76ecf452009-03-11 08:18:53 -0300316 { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2, "Conceptronic CTVFMi v2"},
317
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700318 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800319 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200320 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
321 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800322 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
323 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
324 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
325 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200326 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800327 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300328 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800329 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300330 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300331 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300332 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300333 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Bruno Christo0c5db422009-03-02 22:38:59 -0300334 { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
335 { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
336 { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
337 { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL, "GeoVision GV-800(S) (slave)" },
Alan McIvordceaddb2009-03-12 21:43:34 -0300338
339 { 0x15401830, BTTV_BOARD_PV183, "Provideo PV183-1" },
340 { 0x15401831, BTTV_BOARD_PV183, "Provideo PV183-2" },
341 { 0x15401832, BTTV_BOARD_PV183, "Provideo PV183-3" },
342 { 0x15401833, BTTV_BOARD_PV183, "Provideo PV183-4" },
343 { 0x15401834, BTTV_BOARD_PV183, "Provideo PV183-5" },
344 { 0x15401835, BTTV_BOARD_PV183, "Provideo PV183-6" },
345 { 0x15401836, BTTV_BOARD_PV183, "Provideo PV183-7" },
346 { 0x15401837, BTTV_BOARD_PV183, "Provideo PV183-8" },
Peter De Schrijverde2843b2011-11-06 10:15:47 -0300347 { 0x3116f200, BTTV_BOARD_TVT_TD3116, "Tongwei Video Technology TD-3116" },
Tony Gentile9d2952d2012-07-19 09:36:33 -0300348 { 0x02280279, BTTV_BOARD_APOSONIC_WDVR, "Aposonic W-DVR" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349 { 0, -1, NULL }
350};
351
352/* ----------------------------------------------------------------------- */
353/* array with description for bt848 / bt878 tv/grabber cards */
354
355struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800356 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800357 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800358 .name = " *** UNKNOWN/GENERIC *** ",
359 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800360 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300361 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300362 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800363 .tuner_addr = ADDR_UNSET,
364 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800365 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800366 .name = "MIRO PCTV",
367 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300368 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800369 .svhs = 2,
370 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300371 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300372 .gpiomux = { 2, 0, 0, 0 },
373 .gpiomute = 10,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300374 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800375 .tuner_addr = ADDR_UNSET,
376 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800377 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800378 .name = "Hauppauge (bt848)",
379 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300380 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800381 .svhs = 2,
382 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300383 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300384 .gpiomux = { 0, 1, 2, 3 },
385 .gpiomute = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300386 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 .tuner_addr = ADDR_UNSET,
388 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800389 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800390 .name = "STB, Gateway P/N 6000699 (bt848)",
391 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300392 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800393 .svhs = 2,
394 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300395 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300396 .gpiomux = { 4, 0, 2, 3 },
397 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800398 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800399 .tuner_type = TUNER_PHILIPS_NTSC,
400 .tuner_addr = ADDR_UNSET,
401 .pll = PLL_28,
402 .has_radio = 1,
403 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700404
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800406 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
408 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300409 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .svhs = 2,
411 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300412 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300413 .gpiomux = { 0 },
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,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300426 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800427 .tuner_addr = ADDR_UNSET,
428 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800429 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800430 .name = "AVerMedia TVPhone",
431 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300432 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800433 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300434 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800435 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300436 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800437 /* 0x04 for some cards ?? */
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300438 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800439 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300440 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800441 .has_remote = 1,
442 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800443 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800444 .name = "MATRIX-Vision MV-Delta",
445 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300446 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800447 .svhs = 3,
448 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300449 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300450 .gpiomux = { 0 },
Trent Piephoabb03622009-01-28 21:32:59 -0300451 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800452 .tuner_addr = ADDR_UNSET,
453 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700454
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800455 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800456 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800457 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
458 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300459 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800460 .svhs = 2,
461 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300462 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300463 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
464 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800465 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300466 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800467 .tuner_addr = ADDR_UNSET,
468 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800469 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800470 .name = "IMS/IXmicro TurboTV",
471 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300472 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800473 .svhs = 2,
474 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300475 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300476 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800477 .pll = PLL_28,
478 .tuner_type = TUNER_TEMIC_PAL,
479 .tuner_addr = ADDR_UNSET,
480 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800481 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800482 .name = "Hauppauge (bt878)",
483 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300484 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800485 .svhs = 2,
486 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300487 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300488 .gpiomux = { 0, 1, 2, 3 },
489 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800490 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300491 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800492 .tuner_addr = ADDR_UNSET,
493 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800494 [BTTV_BOARD_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800495 .name = "MIRO PCTV pro",
496 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300497 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800498 .svhs = 2,
499 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300500 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300501 .gpiomux = { 0x20001,0x10001, 0, 0 },
502 .gpiomute = 10,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300503 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 .tuner_addr = ADDR_UNSET,
505 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700506
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800507 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800508 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800509 .name = "ADS Technologies Channel Surfer TV (bt848)",
510 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300511 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800512 .svhs = 2,
513 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300514 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300515 .gpiomux = { 13, 14, 11, 7 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300516 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800517 .tuner_addr = ADDR_UNSET,
518 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800519 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800520 .name = "AVerMedia TVCapture 98",
521 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300522 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800523 .svhs = 2,
524 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300525 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300526 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800527 .msp34xx_alt = 1,
528 .pll = PLL_28,
529 .tuner_type = TUNER_PHILIPS_PAL,
530 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300531 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800532 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800533 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800534 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800535 .name = "Aimslab Video Highway Xtreme (VHX)",
536 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300537 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800538 .svhs = 2,
539 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300540 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300541 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
542 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800543 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300544 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800545 .tuner_addr = ADDR_UNSET,
546 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800547 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800548 .name = "Zoltrix TV-Max",
549 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300550 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800551 .svhs = 2,
552 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300553 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300554 .gpiomux = { 0, 0, 1, 0 },
555 .gpiomute = 10,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300556 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800557 .tuner_addr = ADDR_UNSET,
558 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700559
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800560 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800561 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800562 .name = "Prolink Pixelview PlayTV (bt878)",
563 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300564 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800565 .svhs = 2,
566 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300567 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800568 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300569 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
570 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800571 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300572 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300573 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800574 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800575 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800576 .name = "Leadtek WinView 601",
577 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300578 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 .svhs = 2,
580 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300581 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300582 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
583 .gpiomute = 0xcfa007,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300584 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800585 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300586 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800587 .has_radio = 1,
588 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800589 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800590 .name = "AVEC Intercapture",
591 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300592 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800593 .svhs = 2,
594 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300595 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300596 .gpiomux = { 1, 0, 0, 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300597 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .tuner_addr = ADDR_UNSET,
599 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800600 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800601 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
602 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300603 /* .audio_inputs= 1, */
604 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800605 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300606 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300607 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800608 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300609 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .tuner_addr = ADDR_UNSET,
611 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700612
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800613 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800614 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800615 .name = "CEI Raffles Card",
616 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300617 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800618 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300619 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300620 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800621 .tuner_addr = ADDR_UNSET,
622 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800623 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800624 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
625 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300626 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800627 .svhs = 2,
628 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300629 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300630 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
631 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800632 .pll = PLL_28,
633 .tuner_type = TUNER_PHILIPS_PAL_I,
634 .tuner_addr = ADDR_UNSET,
635 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800636 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800637 .name = "Askey CPH050/ Phoebe Tv Master + FM",
638 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300639 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800640 .svhs = 2,
641 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300642 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300643 .gpiomux = { 0, 1, 0x800, 0x400 },
644 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800645 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300646 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800647 .tuner_addr = ADDR_UNSET,
648 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800649 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800650 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
651 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300652 /* .audio_inputs= 1, */
653 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300654 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800655 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300656 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300657 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300658 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800659 .no_msp34xx = 1,
660 .pll = PLL_28,
661 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
662 .tuner_addr = ADDR_UNSET,
663 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700664
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800665 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800666 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800667 .name = "Askey CPH05X/06X (bt878) [many vendors]",
668 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300669 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800670 .svhs = 2,
671 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300672 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300673 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
674 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800675 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300676 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800677 .tuner_addr = ADDR_UNSET,
678 .has_remote = 1,
Thomas Betkerb61097e2012-07-01 10:22:08 -0300679 .has_radio = 1, /* not every card has radio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800680 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800681 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800682 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
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 = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300687 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300688 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
689 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 .tuner_type = TUNER_PHILIPS_PAL,
691 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300692 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800694 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800695 .name = "Hauppauge WinCam newer (bt878)",
696 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300697 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800698 .svhs = 3,
699 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300700 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300701 .gpiomux = { 0, 1, 2, 3 },
702 .gpiomute = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300703 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800704 .tuner_addr = ADDR_UNSET,
705 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800706 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800707 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
708 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300709 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800710 .svhs = 2,
711 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300712 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300713 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
714 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800715 .pll = PLL_28,
716 .tuner_type = TUNER_PHILIPS_SECAM,
717 .tuner_addr = ADDR_UNSET,
718 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700719
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800720 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800721 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800722 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
723 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300724 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800725 .svhs = 2,
726 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300727 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300728 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
729 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800730 .tuner_type = TUNER_PHILIPS_PAL,
731 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300732 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800733 /* GPIO wiring:
734 External 20 pin connector (for Active Radio Upgrade board)
735 gpio00: i2c-sda
736 gpio01: i2c-scl
737 gpio02: om5610-data
738 gpio03: om5610-clk
739 gpio04: om5610-wre
740 gpio05: om5610-stereo
741 gpio06: rds6588-davn
742 gpio07: Pin 7 n.c.
743 gpio08: nIOW
744 gpio09+10: nIOR, nSEL ?? (bt878)
745 gpio09: nIOR (bt848)
746 gpio10: nSEL (bt848)
747 Sound Routing:
748 gpio16: u2-A0 (1st 4052bt)
749 gpio17: u2-A1
750 gpio18: u2-nEN
751 gpio19: u4-A0 (2nd 4052)
752 gpio20: u4-A1
753 u4-nEN - GND
754 Btspy:
755 00000 : Cdrom (internal audio input)
756 10000 : ext. Video audio input
757 20000 : TV Mono
758 a0000 : TV Mono/2
759 1a0000 : TV Stereo
760 30000 : Radio
761 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700762 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800764 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800765 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800766 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
767 .name = "Imagenation PXC200",
768 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300769 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800770 .svhs = 1, /* was: 4 */
771 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300772 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300773 .gpiomux = { 0 },
Trent Piephoabb03622009-01-28 21:32:59 -0300774 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800775 .tuner_addr = ADDR_UNSET,
776 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700777
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800778 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800779 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800780 .name = "Lifeview FlyVideo 98 LR50",
781 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300782 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800783 .svhs = 2,
784 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300785 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300786 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
787 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800788 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300789 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800790 .tuner_addr = ADDR_UNSET,
791 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800792 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800793 .name = "Formac iProTV, Formac ProTV I (bt848)",
794 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300795 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800796 .svhs = 3,
797 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300798 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300799 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800800 .pll = PLL_28,
801 .tuner_type = TUNER_PHILIPS_PAL,
802 .tuner_addr = ADDR_UNSET,
803 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800805 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800806 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
808 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300809 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800810 .svhs = 2,
811 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300812 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300813 .gpiomux = { 0 },
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300814 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 .tuner_addr = ADDR_UNSET,
816 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800817 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800818 .name = "Terratec TerraTValue Version Bt878",
819 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300820 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800821 .svhs = 2,
822 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300823 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300824 .gpiomux = { 0x500, 0, 0x300, 0x900 },
825 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800826 .pll = PLL_28,
827 .tuner_type = TUNER_PHILIPS_PAL,
828 .tuner_addr = ADDR_UNSET,
829 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800830 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800831 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
832 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300833 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800834 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300835 /* TV, CVid, SVid, CVid over SVid connector */
836 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800837 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
838 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300839 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
840 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800841 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
842 gpio23 -- hef4052:nEnable (0x800000)
843 gpio12 -- hef4052:A1
844 gpio13 -- hef4052:A0
845 0x0000: external audio
846 0x1000: FM
847 0x2000: TV
848 0x3000: n.c.
849 Note: There exists another variant "Winfast 2000" with tv stereo !?
850 Note: eeprom only contains FF and pci subsystem id 107d:6606
851 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800852 .pll = PLL_28,
853 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300854 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800855 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300856 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800857 .has_remote = 1,
858 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800859 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800860 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
861 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300862 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800863 .svhs = 2,
864 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300865 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300866 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
867 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800868 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300869 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800870 .tuner_addr = ADDR_UNSET,
871 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700872
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800873 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800874 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800875 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
876 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300877 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800878 .svhs = 2,
879 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300880 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300881 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
882 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300884 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800885 .tuner_addr = ADDR_UNSET,
886 .has_radio = 1,
887 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800888 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800889 .name = "Prolink PixelView PlayTV pro",
890 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300891 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800892 .svhs = 2,
893 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300894 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300895 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
896 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800897 .no_msp34xx = 1,
898 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300899 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800900 .tuner_addr = ADDR_UNSET,
901 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800902 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800903 .name = "Askey CPH06X TView99",
904 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300905 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800906 .svhs = 2,
907 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300908 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300909 .gpiomux = { 0x551400, 0x551200, 0, 0 },
910 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800911 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300912 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800913 .tuner_addr = ADDR_UNSET,
914 .has_remote = 1,
915 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800916 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800917 .name = "Pinnacle PCTV Studio/Rave",
918 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300919 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800920 .svhs = 2,
921 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300922 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300923 .gpiomux = { 2, 0xd0001, 0, 0 },
924 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800925 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300926 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800927 .tuner_addr = ADDR_UNSET,
928 },
929
930 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800931 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800932 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
933 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300934 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800935 .svhs = 2,
936 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300937 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300938 .gpiomux = { 4, 0, 2, 3 },
939 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800940 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800941 .tuner_type = TUNER_PHILIPS_NTSC,
942 .tuner_addr = ADDR_UNSET,
943 .pll = PLL_28,
944 .has_radio = 1,
945 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800946 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800947 .name = "AVerMedia TVPhone 98",
948 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300949 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800950 .svhs = 2,
951 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300952 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300953 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800954 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300955 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .tuner_addr = ADDR_UNSET,
957 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300958 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800959 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800960 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800961 .name = "ProVideo PV951", /* pic16c54 */
962 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300963 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800964 .svhs = 2,
965 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300966 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300967 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800968 .no_msp34xx = 1,
969 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300970 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800971 .tuner_addr = ADDR_UNSET,
972 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800973 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800974 .name = "Little OnAir TV",
975 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300976 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800977 .svhs = 2,
978 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -0300979 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300980 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
981 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800982 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300983 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800984 .tuner_addr = ADDR_UNSET,
985 },
986
987 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800988 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 .name = "Sigma TVII-FM",
990 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -0300991 /* .audio_inputs= 1, */
992 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800993 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300994 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300995 .gpiomux = { 1, 1, 0, 2 },
996 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800997 .no_msp34xx = 1,
998 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300999 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001000 .tuner_addr = ADDR_UNSET,
1001 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001002 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001003 .name = "MATRIX-Vision MV-Delta 2",
1004 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001005 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001006 .svhs = 3,
1007 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001008 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001009 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001010 .no_msp34xx = 1,
1011 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001012 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001013 .tuner_addr = ADDR_UNSET,
1014 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001015 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001016 .name = "Zoltrix Genie TV/FM",
1017 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001018 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001019 .svhs = 2,
1020 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001021 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001022 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1023 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001024 .no_msp34xx = 1,
1025 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001026 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
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_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001030 .name = "Terratec TV/Radio+",
1031 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001032 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001033 .svhs = 2,
1034 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001035 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001036 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1037 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001038 .no_msp34xx = 1,
1039 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001040 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001041 .tuner_addr = ADDR_UNSET,
1042 .has_radio = 1,
1043 },
1044
1045 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001046 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 .name = "Askey CPH03x/ Dynalink Magic TView",
1048 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001049 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001050 .svhs = 2,
1051 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001052 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001053 .gpiomux = {2,0,0,0 },
1054 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001056 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001057 .tuner_addr = ADDR_UNSET,
1058 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001059 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001060 .name = "IODATA GV-BCTV3/PCI",
1061 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001062 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001063 .svhs = 2,
1064 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001065 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001066 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001067 .no_msp34xx = 1,
1068 .pll = PLL_28,
1069 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1070 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001071 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001072 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001073 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001074 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1075 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001076 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001077 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001078 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001079 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001080 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001081 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001082 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1083 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001084 .no_msp34xx = 1,
1085 .pll = PLL_28,
1086 .tuner_type = TUNER_PHILIPS_PAL_I,
1087 .tuner_addr = ADDR_UNSET,
1088 .has_remote = 1,
1089 /* GPIO wiring: (different from Rev.4C !)
1090 GPIO17: U4.A0 (first hef4052bt)
1091 GPIO19: U4.A1
1092 GPIO20: U5.A1 (second hef4052bt)
1093 GPIO21: U4.nEN
1094 GPIO22: BT832 Reset Line
1095 GPIO23: A5,A0, U5,nEN
1096 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1097 */
1098 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001099 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001100 .name = "Eagle Wireless Capricorn2 (bt878A)",
1101 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001102 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001103 .svhs = 2,
1104 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001105 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001106 .gpiomux = { 0, 1, 2, 3 },
1107 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001109 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001110 .tuner_addr = ADDR_UNSET,
1111 },
1112
1113 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001114 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001115 /* David Härdeman <david@2gen.com> */
1116 .name = "Pinnacle PCTV Studio Pro",
1117 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001118 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001119 .svhs = 3,
1120 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001121 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001122 .gpiomux = { 1, 0xd0001, 0, 0 },
1123 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001124 /* sound path (5 sources):
1125 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1126 0= ext. Audio IN
1127 1= from MUX2
1128 2= Mono TV sound from Tuner
1129 3= not connected
1130 MUX2 (mask 0x30000):
1131 0,2,3= from MSP34xx
1132 1= FM stereo Radio from Tuner */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001133 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001134 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001135 .tuner_addr = ADDR_UNSET,
1136 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001137 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001138 /* Claas Langbehn <claas@bigfoot.com>,
1139 Sven Grothklags <sven@upb.de> */
1140 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1141 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001142 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001143 .svhs = 2,
1144 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001145 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001146 .gpiomux = { 0, 0, 0x10, 8 },
1147 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001148 .pll = PLL_28,
1149 .tuner_type = TUNER_PHILIPS_PAL,
1150 .tuner_addr = ADDR_UNSET,
1151 .has_radio = 1,
1152 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001153 [BTTV_BOARD_LIFETEC_9415] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02001154 /* Tim Röstermundt <rosterm@uni-muenster.de>
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001155 in de.comp.os.unix.linux.hardware:
1156 options bttv card=0 pll=1 radio=1 gpiomask=0x18e0
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001157 gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001158 options tuner type=5 */
1159 .name = "Lifeview FlyVideo 2000 /FlyVideo A2/ Lifetec LT 9415 TV [LR90]",
1160 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001161 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001162 .svhs = 2,
1163 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001164 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001165 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1166 .gpiomute = 0x18e0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001167 /* For cards with tda9820/tda9821:
1168 0x0000: Tuner normal stereo
1169 0x0080: Tuner A2 SAP (second audio program = Zweikanalton)
1170 0x0880: Tuner A2 stereo */
1171 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001172 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001173 .tuner_addr = ADDR_UNSET,
1174 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001175 [BTTV_BOARD_BESTBUY_EASYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001176 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1177 old Easy TV BT848 version (model CPH031) */
1178 .name = "Askey CPH031/ BESTBUY Easy TV",
1179 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001180 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001181 .svhs = 2,
1182 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001183 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001184 .gpiomux = { 2, 0, 0, 0 },
1185 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001186 .pll = PLL_28,
1187 .tuner_type = TUNER_TEMIC_PAL,
1188 .tuner_addr = ADDR_UNSET,
1189 },
1190
1191 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001192 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001193 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1194 .name = "Lifeview FlyVideo 98FM LR50",
1195 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001196 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001197 .svhs = 2,
1198 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001199 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001200 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1201 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001202 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001203 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001204 .tuner_addr = ADDR_UNSET,
1205 },
1206 /* This is the ultimate cheapo capture card
1207 * just a BT848A on a small PCB!
1208 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001209 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001210 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1211 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001212 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001213 .svhs = 1,
1214 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001215 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001216 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001217 .no_msp34xx = 1,
1218 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001219 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001220 .tuner_addr = ADDR_UNSET,
1221 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001222 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001223 /* Daniel Herrington <daniel.herrington@home.com> */
1224 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1225 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001226 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001227 .svhs = 2,
1228 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001229 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001230 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1231 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001232 .pll = PLL_28,
1233 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1234 .tuner_addr = ADDR_UNSET,
1235 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001236 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001237 /* Matti Mottus <mottus@physic.ut.ee> */
1238 .name = "Askey CPH03x TV Capturer",
1239 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001240 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001241 .svhs = 2,
1242 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001243 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001244 .gpiomux = { 2, 0, 0, 0 },
1245 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001246 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001247 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001248 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehabed44f662009-08-22 14:43:50 -03001249 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001250 },
1251
1252 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001253 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001254 /* Philip Blundell <philb@gnu.org> */
1255 .name = "Modular Technology MM100PCTV",
1256 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001257 /* .audio_inputs= 2, */
1258 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001259 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001260 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001261 .gpiomux = { 2, 0, 0, 1 },
1262 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001263 .pll = PLL_35,
1264 .tuner_type = TUNER_TEMIC_PAL,
1265 .tuner_addr = ADDR_UNSET,
1266 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001267 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001268 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001269 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001270 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001271 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001272 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001273 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001274 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001275 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001276 .no_msp34xx = 1,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001277 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001278 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001279 .tuner_addr = ADDR_UNSET,
1280 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001281 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001282 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1283 new Easy TV BT878 version (model CPH061)
1284 special thanks to Informatica Mieres for providing the card */
1285 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1286 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001287 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001288 .svhs = 2,
1289 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001290 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001291 .gpiomux = { 1, 0, 4, 4 },
1292 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001293 .pll = PLL_28,
1294 .tuner_type = TUNER_PHILIPS_PAL,
1295 .tuner_addr = ADDR_UNSET,
1296 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001297 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001298 /* Lukas Gebauer <geby@volny.cz> */
1299 .name = "ATI TV-Wonder",
1300 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001301 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001302 .svhs = 2,
1303 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001304 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001305 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1306 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001307 .pll = PLL_28,
1308 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1309 .tuner_addr = ADDR_UNSET,
1310 },
1311
1312 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001313 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001314 /* Lukas Gebauer <geby@volny.cz> */
1315 .name = "ATI TV-Wonder VE",
1316 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001317 /* .audio_inputs= 1, */
1318 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001319 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001320 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001321 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001322 .no_msp34xx = 1,
1323 .pll = PLL_28,
1324 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1325 .tuner_addr = ADDR_UNSET,
1326 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001327 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001328 /* DeeJay <deejay@westel900.net (2000S) */
1329 .name = "Lifeview FlyVideo 2000S LR90",
1330 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001331 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001332 .svhs = 2,
1333 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001334 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001335 /* Radio changed from 1e80 to 0x800 to make
1336 FlyVideo2000S in .hu happy (gm)*/
1337 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001338 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1339 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001340 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001341 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001342 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001343 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001344 .tuner_addr = ADDR_UNSET,
1345 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001346 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001347 .name = "Terratec TValueRadio",
1348 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001349 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001350 .svhs = 2,
1351 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001352 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001353 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1354 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001355 .pll = PLL_28,
1356 .tuner_type = TUNER_PHILIPS_PAL,
1357 .tuner_addr = ADDR_UNSET,
1358 .has_radio = 1,
1359 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001360 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001361 /* TANAKA Kei <peg00625@nifty.com> */
1362 .name = "IODATA GV-BCTV4/PCI",
1363 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001364 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001365 .svhs = 2,
1366 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001367 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001368 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001369 .no_msp34xx = 1,
1370 .pll = PLL_28,
1371 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1372 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001373 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001374 },
1375
1376 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001377 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001378 .name = "3Dfx VoodooTV FM (Euro)",
1379 /* try "insmod msp3400 simple=0" if you have
1380 * sound problems with this card. */
1381 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001382 /* .audio_inputs= 1, */
1383 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001384 .gpiomask = 0x4f8a00,
1385 /* 0x100000: 1=MSP enabled (0=disable again)
1386 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1387 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1388 .gpiomute = 0x947fff,
1389 /* tvtuner, radio, external,internal, mute, stereo
1390 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001391 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001392 .tuner_type = TUNER_MT2032,
1393 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001394 .pll = PLL_28,
1395 .has_radio = 1,
1396 },
1397 [BTTV_BOARD_VOODOOTV_200] = {
1398 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001399 /* try "insmod msp3400 simple=0" if you have
1400 * sound problems with this card. */
1401 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001402 /* .audio_inputs= 1, */
1403 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001404 .gpiomask = 0x4f8a00,
1405 /* 0x100000: 1=MSP enabled (0=disable again)
1406 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001407 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1408 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001409 /* tvtuner, radio, external,internal, mute, stereo
1410 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001411 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001412 .tuner_type = TUNER_MT2032,
1413 .tuner_addr = ADDR_UNSET,
1414 .pll = PLL_28,
1415 .has_radio = 1,
1416 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001417 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001418 /* Philip Blundell <pb@nexus.co.uk> */
1419 .name = "Active Imaging AIMMS",
1420 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001421 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001422 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001423 .tuner_addr = ADDR_UNSET,
1424 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001425 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001426 .gpiomask = 0
1427 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001428 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001429 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1430 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1431 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001432 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001433 .svhs = 2,
1434 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001435 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001436 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1437 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001438 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001439 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001440 .tuner_addr = ADDR_UNSET,
1441 .has_remote = 1,
1442 /* GPIO wiring:
1443 GPIO0: U4.A0 (hef4052bt)
1444 GPIO1: U4.A1
1445 GPIO2: U4.A1 (second hef4052bt)
1446 GPIO3: U4.nEN, U5.A0, A5.nEN
1447 GPIO8-15: vrd866b ?
1448 */
1449 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001450 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001451 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1452 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001453 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001454 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001455 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1456 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001457 .pll = PLL_28,
1458 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001459 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001460 .tuner_addr = ADDR_UNSET,
1461 },
1462
1463 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001464 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001465 /* Dariusz Kowalewski <darekk@automex.pl> */
1466 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1467 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001468 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001469 .svhs = 2,
1470 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001471 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001472 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1473 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001474 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001475 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001476 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001478 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001479 .has_radio = 1, /* Note: not all cards have radio */
1480 .has_remote = 1,
1481 /* GPIO wiring:
1482 GPIO0: A0 hef4052
1483 GPIO1: A1 hef4052
1484 GPIO3: nEN hef4052
1485 GPIO8-15: vrd866b
1486 GPIO20,22,23: R30,R29,R28
1487 */
1488 },
sensoray-dev57437c12011-10-25 19:43:55 -03001489 [BTTV_BOARD_SENSORAY311_611] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001490 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
sensoray-dev57437c12011-10-25 19:43:55 -03001491 /* you must jumper JP5 for the 311 card (PC/104+) to work */
1492 .name = "Sensoray 311/611",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001493 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001494 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001495 .svhs = 4,
1496 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001497 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001498 .gpiomux = { 0 },
Trent Piephoabb03622009-01-28 21:32:59 -03001499 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001500 .tuner_addr = ADDR_UNSET,
1501 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001502 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001503 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1504 .name = "RemoteVision MX (RV605)",
1505 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001506 /* .audio_inputs= 0, */
1507 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001508 .gpiomask = 0x00,
1509 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001510 .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 -08001511 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001512 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001513 .tuner_addr = ADDR_UNSET,
1514 .muxsel_hook = rv605_muxsel,
1515 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001516 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001517 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1518 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001519 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001520 .svhs = 2,
1521 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001522 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001523 .gpiomux = { 0, 1, 2, 2 },
1524 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001525 .tuner_type = TUNER_PHILIPS_PAL,
1526 .tuner_addr = ADDR_UNSET,
1527 .pll = PLL_28,
1528 .has_radio = 1,
1529 },
1530
1531 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001532 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001533 /* Masaki Suzuki <masaki@btree.org> */
1534 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1535 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001536 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001537 .svhs = 2,
1538 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001539 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001540 .gpiomux = { 0, 1, 2, 3 },
1541 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001542 .tuner_type = TUNER_PHILIPS_NTSC,
1543 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001544 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001545 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001546 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001547 .name = "GrandTec Multi Capture Card (Bt878)",
1548 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001549 /* .audio_inputs= 0, */
1550 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001551 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001552 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001553 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001554 .no_msp34xx = 1,
1555 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001556 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001557 .tuner_addr = ADDR_UNSET,
1558 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001559 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001560 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1561 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001562 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001563 .svhs = 2,
1564 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001565 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1566 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001567 .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 -08001568 * This card lacks external Audio In, so we mute it on Ext. & Int.
1569 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1570 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001571 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001572 * btwincap uses 0x80000/0x80003
1573 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001574 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001575 .no_msp34xx = 1,
1576 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001577 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001578 .tuner_addr = ADDR_UNSET,
1579 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1580 radio signal strength indicators work fine. */
1581 .has_radio = 1,
1582 /* GPIO Info:
1583 GPIO0,1: HEF4052 A0,A1
1584 GPIO2: HEF4052 nENABLE
1585 GPIO3-7: n.c.
1586 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1587 GPIO14,15: ??
1588 GPIO16-21: n.c.
1589 GPIO22,23: ??
1590 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1591 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001592 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001593 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1594 .name = "DSP Design TCVIDEO",
1595 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001596 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001597 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001598 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001599 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001600 .tuner_addr = ADDR_UNSET,
1601 },
1602
1603 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001604 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001605 .name = "Hauppauge WinTV PVR",
1606 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001607 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001608 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001609 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001610 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001611 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001612 .tuner_addr = ADDR_UNSET,
1613
1614 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001615 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001616 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001617 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001618 .name = "IODATA GV-BCTV5/PCI",
1619 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001620 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001621 .svhs = 2,
1622 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001623 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001624 .gpiomux = {0x030000, 0x010000, 0, 0 },
1625 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001626 .no_msp34xx = 1,
1627 .pll = PLL_28,
1628 .tuner_type = TUNER_PHILIPS_NTSC_M,
1629 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001630 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001631 .has_radio = 1,
1632 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001633 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001634 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1635 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001636 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001637 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001638 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001639 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001640 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001641 .tuner_addr = ADDR_UNSET,
1642 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001643 .no_tda7432 = 1,
1644 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001645 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001646 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1647 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001648 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001649 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001650 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001651 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001652 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 .tuner_addr = ADDR_UNSET,
1654 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001655 .no_tda7432 = 1,
1656 },
1657
1658 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001659 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001660 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1661 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001662 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001663 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001664 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001665 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001666 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001667 .tuner_addr = ADDR_UNSET,
1668 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001669 .no_tda7432 = 1,
1670 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001671 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001672 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1673 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001674 /* .audio_inputs= 0, */
1675 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001676 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001677 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001678 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001679 .tuner_addr = ADDR_UNSET,
1680 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001681 .no_tda7432 = 1,
1682 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001683 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001684 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1685 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001686 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001687 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001688 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001689 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001690 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001691 .tuner_addr = ADDR_UNSET,
1692 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001693 .no_tda7432 = 1,
1694 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001695 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001696 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1697 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001698 /* .audio_inputs= 1, */
1699 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001700 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001701 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001702 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001703 .tuner_addr = ADDR_UNSET,
1704 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001705 .no_tda7432 = 1,
1706 },
1707
1708 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001709 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001710 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1711 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001712 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001713 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001714 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001715 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001716 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .tuner_addr = ADDR_UNSET,
1718 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001719 .no_tda7432 = 1,
1720 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001721 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001722 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001723 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001724 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001725 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001726 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001727 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001728 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001729 .tuner_addr = ADDR_UNSET,
1730 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001731 .no_tda7432 = 1,
1732 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001733 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001734 .name = "Osprey 500", /* 500 */
1735 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001736 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001737 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001738 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001739 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001740 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001741 .tuner_addr = ADDR_UNSET,
1742 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001743 .no_tda7432 = 1,
1744 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001745 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 .name = "Osprey 540", /* 540 */
1747 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001748 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001749 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001750 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001751 .tuner_addr = ADDR_UNSET,
1752 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001753 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001754 },
1755
1756 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001757 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001758 .name = "Osprey 2000", /* 2000 */
1759 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001760 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001761 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001762 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001763 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001764 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001765 .tuner_addr = ADDR_UNSET,
1766 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001767 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1768 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001769 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001770 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1771 .name = "IDS Eagle",
1772 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001773 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001774 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001775 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001776 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001777 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001778 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001779 .muxsel_hook = eagle_muxsel,
1780 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001781 .pll = PLL_28,
1782 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001783 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001784 .name = "Pinnacle PCTV Sat",
1785 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001786 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001788 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001789 .tuner_addr = ADDR_UNSET,
1790 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001791 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001792 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001793 .pll = PLL_28,
1794 .no_gpioirq = 1,
1795 .has_dvb = 1,
1796 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001797 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001798 .name = "Formac ProTV II (bt878)",
1799 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001800 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001801 .svhs = 3,
1802 .gpiomask = 2,
1803 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001804 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001805 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001806 .pll = PLL_28,
1807 .has_radio = 1,
1808 .tuner_type = TUNER_PHILIPS_PAL,
1809 .tuner_addr = ADDR_UNSET,
1810 /* sound routing:
1811 GPIO=0x00,0x01,0x03: mute (?)
1812 0x02: both TV and radio (tuner: FM1216/I)
1813 The card has onboard audio connectors labeled "cdrom" and "board",
1814 not soldered here, though unknown wiring.
1815 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001816 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001817 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001818
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001819 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001820 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001821 .name = "MachTV",
1822 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001823 /* .audio_inputs= 1, */
1824 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001825 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001826 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001827 .gpiomux = { 0, 1, 2, 3},
1828 .gpiomute = 4,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001829 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001830 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001831 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001832 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001833 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001834 .name = "Euresys Picolo",
1835 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001836 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001837 .svhs = 2,
1838 .gpiomask = 0,
1839 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001840 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001841 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001842 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001843 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001844 .tuner_addr = ADDR_UNSET,
1845 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001846 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001847 /* Luc Van Hoeylandt <luc@e-magic.be> */
1848 .name = "ProVideo PV150", /* 0x4f */
1849 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001850 /* .audio_inputs= 0, */
1851 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001852 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001853 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001854 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001855 .no_msp34xx = 1,
1856 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001857 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001858 .tuner_addr = ADDR_UNSET,
1859 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001860 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001861 /* Hiroshi Takekawa <sian@big.or.jp> */
1862 /* This card lacks subsystem ID */
1863 .name = "AD-TVK503", /* 0x63 */
1864 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001865 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001866 .svhs = 2,
1867 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001868 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001869 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001870 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1871 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001872 .no_msp34xx = 1,
1873 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001874 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001875 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001876 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001877 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001878
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001879 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001880 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001881 .name = "Hercules Smart TV Stereo",
1882 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001883 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001884 .svhs = 2,
1885 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001886 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001887 .no_msp34xx = 1,
1888 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001889 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .tuner_addr = ADDR_UNSET,
1891 /* Notes:
1892 - card lacks subsystem ID
1893 - stereo variant w/ daughter board with tda9874a @0xb0
1894 - Audio Routing:
1895 always from tda9874 independent of GPIO (?)
1896 external line in: unknown
1897 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1898 hef4053 (instead 4052) for unknown function
1899 */
1900 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001901 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001902 .name = "Pace TV & Radio Card",
1903 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001904 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001905 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001906 /* Tuner, CVid, SVid, CVid over SVid connector */
1907 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001908 .gpiomask = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001909 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001910 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001911 .tuner_addr = ADDR_UNSET,
1912 .has_radio = 1,
1913 .pll = PLL_28,
1914 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1915 only internal line out: (4pin header) RGGL
1916 Radio must be decoded by msp3410d (not routed through)*/
1917 /*
1918 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1919 */
1920 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001921 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001922 /* Chris Willing <chris@vislab.usyd.edu.au> */
1923 .name = "IVC-200",
1924 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001925 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001926 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001927 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001928 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001929 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001930 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001931 .pll = PLL_28,
1932 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001933 [BTTV_BOARD_IVCE8784] = {
1934 .name = "IVCE-8784",
1935 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001936 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001937 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001938 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001939 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001940 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001941 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001942 .pll = PLL_28,
1943 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001944 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001945 .name = "Grand X-Guard / Trust 814PCI",
1946 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001947 /* .audio_inputs= 0, */
1948 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001949 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001950 .tuner_addr = ADDR_UNSET,
1951 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03001952 .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 -08001953 .muxsel_hook = xguard_muxsel,
1954 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001955 .no_tda7432 = 1,
1956 .pll = PLL_28,
1957 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001958
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001959 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001960 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001961 .name = "Nebula Electronics DigiTV",
1962 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001963 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001964 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001965 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001966 .no_tda7432 = 1,
1967 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001968 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001969 .tuner_addr = ADDR_UNSET,
1970 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08001971 .has_remote = 1,
1972 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001973 .no_gpioirq = 1,
1974 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001975 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001976 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
1977 .name = "ProVideo PV143",
1978 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001979 /* .audio_inputs= 0, */
1980 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001981 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001982 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001983 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001984 .no_msp34xx = 1,
1985 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001986 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001987 .tuner_addr = ADDR_UNSET,
1988 },
Dirk Heer05583622008-11-21 19:00:55 -03001989 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001990 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03001991 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001992 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001993 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001994 .svhs = 3,
1995 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001996 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001997 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001998 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001999 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002000 .tuner_addr = ADDR_UNSET,
2001 },
Dirk Heer05583622008-11-21 19:00:55 -03002002 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2003 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002004 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002005 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002006 .svhs = 3,
2007 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002008 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002009 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002010 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002011 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002012 .tuner_addr = ADDR_UNSET,
2013 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002014
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002015 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002016 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002017 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2018 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002019 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002020 .svhs = 9,
2021 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002022 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002023 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002024 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002025 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002026 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002027 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002028 .tuner_addr = ADDR_UNSET,
2029 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002030 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002031 .name = "PHYTEC VD-009 Combi (bt878)",
2032 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002033 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002034 .svhs = 9,
2035 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002036 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002037 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002038 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002039 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002040 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002041 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002042 .tuner_addr = ADDR_UNSET,
2043 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002044 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 .name = "IVC-100",
2046 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002047 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002048 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002049 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002050 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002051 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002052 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002053 .pll = PLL_28,
2054 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002055 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002056 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2057 .name = "IVC-120G",
2058 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002059 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002060 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002061 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002062 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002063 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002064 .no_tda7432 = 1,
2065 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002066 .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 -08002067 .muxsel_hook = ivc120_muxsel,
2068 .pll = PLL_28,
2069 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002070
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002071 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002072 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002073 .name = "pcHDTV HD-2000 TV",
2074 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002075 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002076 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002077 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002078 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002079 .tuner_addr = ADDR_UNSET,
2080 .has_dvb = 1,
2081 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002082 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002083 .name = "Twinhan DST + clones",
2084 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002085 .no_tda7432 = 1,
2086 .tuner_type = TUNER_ABSENT,
2087 .tuner_addr = ADDR_UNSET,
2088 .no_video = 1,
2089 .has_dvb = 1,
2090 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002091 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002092 .name = "Winfast VC100",
2093 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002094 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002095 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002096 /* Vid In, SVid In, Vid over SVid in connector */
2097 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002098 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002099 .no_tda7432 = 1,
2100 .tuner_type = TUNER_ABSENT,
2101 .tuner_addr = ADDR_UNSET,
2102 .pll = PLL_28,
2103 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002104 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002105 .name = "Teppro TEV-560/InterVision IV-560",
2106 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002107 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002108 .svhs = 2,
2109 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002110 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002111 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002112 .tuner_type = TUNER_PHILIPS_PAL,
2113 .tuner_addr = ADDR_UNSET,
2114 .pll = PLL_35,
2115 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002116
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002117 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002118 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002119 .name = "SIMUS GVC1100",
2120 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002121 /* .audio_inputs= 0, */
2122 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002123 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002124 .tuner_addr = ADDR_UNSET,
2125 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002126 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 .gpiomask = 0x3F,
2128 .muxsel_hook = gvc1100_muxsel,
2129 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002130 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002131 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2132 .name = "NGS NGSTV+",
2133 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002134 .svhs = 2,
2135 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002136 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002137 .gpiomux = { 0, 0, 0, 0 },
2138 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002139 .pll = PLL_28,
2140 .tuner_type = TUNER_PHILIPS_PAL,
2141 .tuner_addr = ADDR_UNSET,
2142 .has_remote = 1,
2143 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002144 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002145 /* http://linuxmedialabs.com */
2146 .name = "LMLBT4",
2147 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002148 /* .audio_inputs= 0, */
2149 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002150 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002151 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002152 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002153 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002154 .tuner_addr = ADDR_UNSET,
2155 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002156 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002157 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2158 .name = "Tekram M205 PRO",
2159 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002160 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002161 .tuner_type = TUNER_PHILIPS_PAL,
2162 .tuner_addr = ADDR_UNSET,
2163 .svhs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002164 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002165 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002166 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002167 .pll = PLL_28,
2168 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002169
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002170 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002171 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002172 /* Javier Cendan Ares <jcendan@lycos.es> */
2173 /* bt878 TV + FM without subsystem ID */
2174 .name = "Conceptronic CONTVFMi",
2175 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002176 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002177 .svhs = 2,
2178 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002179 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002180 .gpiomux = { 0, 1, 2, 2 },
2181 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002182 .pll = PLL_28,
2183 .tuner_type = TUNER_PHILIPS_PAL,
2184 .tuner_addr = ADDR_UNSET,
2185 .has_remote = 1,
2186 .has_radio = 1,
2187 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002188 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002189 /*Eric DEBIEF <debief@telemsa.com>*/
Lucas De Marchi25985ed2011-03-30 22:57:33 -03002190 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controlled*/
2191 /* 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 -08002192 /*0x79 in bttv.h*/
2193 .name = "Euresys Picolo Tetra",
2194 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002195 /* .audio_inputs= 0, */
2196 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002197 .gpiomask = 0,
2198 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2199 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002200 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002201 /*878A input is always MUX0, see above.*/
2202 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002203 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002204 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002205 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002206 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002207 .tuner_addr = ADDR_UNSET,
2208 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002209 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002210 /* Spirit TV Tuner from http://spiritmodems.com.au */
2211 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2212 .name = "Spirit TV Tuner",
2213 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002214 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002215 .svhs = 2,
2216 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002217 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002218 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002219 .tuner_type = TUNER_TEMIC_PAL,
2220 .tuner_addr = ADDR_UNSET,
2221 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002222 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002223 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002224 /* Wolfram Joost <wojo@frokaschwei.de> */
2225 .name = "AVerMedia AVerTV DVB-T 771",
2226 .video_inputs = 2,
2227 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002228 .tuner_type = TUNER_ABSENT,
2229 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002230 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002231 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002232 .no_tda7432 = 1,
2233 .pll = PLL_28,
2234 .has_dvb = 1,
2235 .no_gpioirq = 1,
2236 .has_remote = 1,
2237 },
2238 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002239 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002240 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002241 /* 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 -08002242 .name = "AverMedia AverTV DVB-T 761",
2243 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002244 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002245 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002246 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002247 .no_tda7432 = 1,
2248 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002249 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002250 .tuner_addr = ADDR_UNSET,
2251 .has_dvb = 1,
2252 .no_gpioirq = 1,
2253 .has_remote = 1,
2254 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002255 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002256 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002257 .name = "MATRIX Vision Sigma-SQ",
2258 .video_inputs = 16,
2259 /* .audio_inputs= 0, */
2260 .svhs = NO_SVHS,
2261 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002262 .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 -03002263 .muxsel_hook = sigmaSQ_muxsel,
2264 .gpiomux = { 0 },
2265 .no_msp34xx = 1,
2266 .pll = PLL_28,
2267 .tuner_type = TUNER_ABSENT,
2268 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002269 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002270 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002271 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002272 .name = "MATRIX Vision Sigma-SLC",
2273 .video_inputs = 4,
2274 /* .audio_inputs= 0, */
2275 .svhs = NO_SVHS,
2276 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002277 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002278 .muxsel_hook = sigmaSLC_muxsel,
2279 .gpiomux = { 0 },
2280 .no_msp34xx = 1,
2281 .pll = PLL_28,
2282 .tuner_type = TUNER_ABSENT,
2283 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002284 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002285 /* BTTV_BOARD_APAC_VIEWCOMP */
2286 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002287 /* Attila Kondoros <attila.kondoros@chello.hu> */
2288 /* bt878 TV + FM 0x00000000 subsystem ID */
2289 .name = "APAC Viewcomp 878(AMAX)",
2290 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002291 /* .audio_inputs= 1, */
2292 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002293 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002294 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002295 .gpiomux = { 2, 0, 0, 0 },
2296 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002297 .pll = PLL_28,
2298 .tuner_type = TUNER_PHILIPS_PAL,
2299 .tuner_addr = ADDR_UNSET,
2300 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2301 .has_radio = 1, /* not every card has radio */
2302 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002303
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002304 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002305 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2307 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002308 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002309 .no_tda7432 = 1,
2310 .pll = PLL_28,
2311 .no_video = 1,
2312 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002313 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002314 .tuner_addr = ADDR_UNSET,
2315 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002316 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002317 /* Steven <photon38@pchome.com.tw> */
2318 .name = "V-Gear MyVCD",
2319 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002320 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002321 .svhs = 2,
2322 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002323 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002324 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2325 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002326 .no_msp34xx = 1,
2327 .pll = PLL_28,
2328 .tuner_type = TUNER_PHILIPS_NTSC_M,
2329 .tuner_addr = ADDR_UNSET,
2330 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002331 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002332 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002333 /* Rick C <cryptdragoon@gmail.com> */
2334 .name = "Super TV Tuner",
2335 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002336 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002337 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002338 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002339 .tuner_type = TUNER_PHILIPS_NTSC,
2340 .tuner_addr = ADDR_UNSET,
2341 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002342 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002343 .has_radio = 1,
2344 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002345 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002346 /* Chris Fanning <video4linux@haydon.net> */
2347 .name = "Tibet Systems 'Progress DVR' CS16",
2348 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002349 /* .audio_inputs= 0, */
2350 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002351 .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 -08002352 .pll = PLL_28,
2353 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002354 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002355 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002356 .tuner_addr = ADDR_UNSET,
2357 .muxsel_hook = tibetCS16_muxsel,
2358 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002359 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002360 /* Bill Brack <wbrack@mmm.com.hk> */
2361 /*
2362 * Note that, because of the card's wiring, the "master"
2363 * BT878A chip (i.e. the one which controls the analog switch
2364 * and must use this card type) is the 2nd one detected. The
2365 * other 3 chips should use card type 0x85, whose description
2366 * follows this one. There is a EEPROM on the card (which is
2367 * connected to the I2C of one of those other chips), but is
2368 * not currently handled. There is also a facility for a
2369 * "monitor", which is also not currently implemented.
2370 */
2371 .name = "Kodicom 4400R (master)",
2372 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002373 /* .audio_inputs= 0, */
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,
Trent Piepho4c548d42009-01-28 21:32:59 -03002376 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002377 /* GPIO bits 0-9 used for analog switch:
2378 * 00 - 03: camera selector
2379 * 04 - 06: channel (controller) selector
2380 * 07: data (1->on, 0->off)
2381 * 08: strobe
2382 * 09: reset
2383 * bit 16 is input from sync separator for the channel
2384 */
2385 .gpiomask = 0x0003ff,
2386 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002387 .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 -08002388 .pll = PLL_28,
2389 .no_msp34xx = 1,
2390 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002391 .muxsel_hook = kodicom4400r_muxsel,
2392 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002393 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002394 /* Bill Brack <wbrack@mmm.com.hk> */
2395 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2396 * one which controls the analog switch, and must use the card type)
2397 * is the 2nd one detected. The other 3 chips should use this card
2398 * type
2399 */
2400 .name = "Kodicom 4400R (slave)",
2401 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002402 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002403 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002404 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002405 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002406 .gpiomask = 0x010000,
2407 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002408 .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 -08002409 .pll = PLL_28,
2410 .no_msp34xx = 1,
2411 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002412 .muxsel_hook = kodicom4400r_muxsel,
2413 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002414 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002415 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002416 /* Michael Henson <mhenson@clarityvi.com> */
2417 /* Adlink RTV24 with special unlock codes */
2418 .name = "Adlink RTV24",
2419 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002420 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002421 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002422 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002423 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002424 .tuner_addr = ADDR_UNSET,
2425 .pll = PLL_28,
2426 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002427 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002428 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002429 /* Michael Krufky <mkrufky@m1k.net> */
2430 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002431 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002432 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002433 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002434 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002435 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002436 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002437 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002438 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2439 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002440 .no_msp34xx = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002441 .no_tda7432 = 1,
2442 .has_dvb = 1,
2443 },
2444 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002445 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002446 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002447 .name = "Acorp Y878F",
2448 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002449 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002450 .svhs = 2,
2451 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002452 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002453 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2454 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002455 .pll = PLL_28,
2456 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2457 .tuner_addr = 0xc1 >>1,
2458 .has_radio = 1,
2459 },
2460 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002461 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002462 .name = "Conceptronic CTVFMi v2",
2463 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002464 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002465 .svhs = 2,
2466 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002467 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002468 .gpiomux = { 0, 1, 2, 2 },
2469 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002470 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002471 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002472 .tuner_addr = ADDR_UNSET,
2473 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002474 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002475 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002476 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002477 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002478 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2479 .video_inputs = 5,
2480 /* .audio_inputs= 1, */
2481 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002482 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002483 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002484 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002485 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2486 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2487 .gpiomute = 0x12400,
2488 .no_msp34xx = 1,
2489 .pll = PLL_28,
2490 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002491 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002492 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002493 },
2494 /* ---- card 0x8b ---------------------------------- */
2495 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002496 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002497 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2498 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002499 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002500 .svhs = 2,
2501 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002502 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002503 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2504 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002505 .no_msp34xx = 1,
2506 .pll = PLL_28,
2507 .tuner_type = TUNER_YMEC_TVF_5533MF,
2508 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002509 .has_radio = 1,
2510 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002511 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002512 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002513 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2514 one external BNC composite input (mux 2)
2515 three internal composite inputs (unknown muxes)
2516 an 18-bit stereo A/D (CS5331A), which has:
2517 one external stereo unblanced (RCA) audio connection
2518 one (or 3?) internal stereo balanced (XLR) audio connection
2519 input is selected via gpio to a 14052B mux
2520 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2521 gain is controlled via an X9221A chip on the I2C bus @0x28
2522 sample rate is controlled via gpio to an MK1413S
2523 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2524 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002525 [BTTV_BOARD_OSPREY440] = {
2526 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002527 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002528 /* .audio_inputs= 2, */
2529 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002530 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002531 .gpiomask = 0x303,
2532 .gpiomute = 0x000, /* int + 32kHz */
2533 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002534 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002535 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002536 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002537 .no_msp34xx = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002538 .no_tda7432 = 1,
2539 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002540 /* ---- card 0x8d ---------------------------------- */
2541 [BTTV_BOARD_ASOUND_SKYEYE] = {
2542 .name = "Asound Skyeye PCTV",
2543 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002544 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002545 .svhs = 2,
2546 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002547 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002548 .gpiomux = { 2, 0, 0, 0 },
2549 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002550 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002551 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002552 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002553 },
Bill Pechter633323f2005-11-13 16:07:50 -08002554 /* ---- card 0x8e ---------------------------------- */
2555 [BTTV_BOARD_SABRENT_TVFM] = {
2556 .name = "Sabrent TV-FM (bttv version)",
2557 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002558 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002559 .svhs = 2,
2560 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002561 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002562 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002563 .no_msp34xx = 1,
Bill Pechter633323f2005-11-13 16:07:50 -08002564 .no_tda7432 = 1,
2565 .pll = PLL_28,
2566 .tuner_type = TUNER_TNF_5335MF,
2567 .tuner_addr = ADDR_UNSET,
2568 .has_radio = 1,
2569 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002570 /* ---- card 0x8f ---------------------------------- */
2571 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2572 .name = "Hauppauge ImpactVCB (bt878)",
2573 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002574 /* .audio_inputs= 0, */
2575 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002576 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002577 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002578 .no_msp34xx = 1,
Steven Tothcd1257d2006-01-09 15:25:01 -02002579 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002580 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002581 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002582 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002583 [BTTV_BOARD_MACHTV_MAGICTV] = {
2584 /* Julian Calaby <julian.calaby@gmail.com>
2585 * Slightly different from original MachTV definition (0x60)
2586
2587 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2588 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2589 * properly (methinks) causing no keyup bits being set */
2590
2591 .name = "MagicTV", /* rebranded MachTV */
2592 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002593 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002594 .svhs = 2,
2595 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002596 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002597 .gpiomux = { 0, 1, 2, 3 },
2598 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002599 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2600 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002601 .pll = PLL_28,
2602 .has_radio = 1,
2603 .has_remote = 1,
2604 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002605 [BTTV_BOARD_SSAI_SECURITY] = {
2606 .name = "SSAI Security Video Interface",
2607 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002608 /* .audio_inputs= 0, */
2609 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002610 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002611 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002612 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002613 },
2614 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2615 .name = "SSAI Ultrasound Video Interface",
2616 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002617 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002618 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002619 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002620 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002621 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002622 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002623 /* ---- card 0x94---------------------------------- */
2624 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2625 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002626 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002627 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002628 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002629 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002630 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002631 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002632 .gpiomask = 0x00e00007,
2633 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2634 .gpiomute = 0x00c00007,
2635 .no_msp34xx = 1,
Michael Krufky27cb7862007-06-28 12:19:20 -03002636 .no_tda7432 = 1,
2637 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002638 /* ---- card 0x95---------------------------------- */
2639 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2640 .name = "Typhoon TV-Tuner PCI (50684)",
2641 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002642 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002643 .svhs = 2,
2644 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002645 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002646 .gpiomux = { 0x20001,0x10001, 0, 0 },
2647 .gpiomute = 10,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002648 .pll = PLL_28,
2649 .tuner_type = TUNER_PHILIPS_PAL_I,
2650 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002651 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002652 [BTTV_BOARD_GEOVISION_GV600] = {
2653 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002654 .name = "Geovision GV-600",
2655 .video_inputs = 16,
2656 /* .audio_inputs= 0, */
2657 .svhs = NO_SVHS,
2658 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002659 .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 -03002660 .muxsel_hook = geovision_muxsel,
2661 .gpiomux = { 0 },
2662 .no_msp34xx = 1,
2663 .pll = PLL_28,
2664 .tuner_type = TUNER_ABSENT,
2665 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002666 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002667 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2668 /* Mauro Lacy <mauro@lacy.com.ar>
2669 * Based on MagicTV and Conceptronic CONTVFMi */
2670
2671 .name = "Kozumi KTV-01C",
2672 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002673 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002674 .svhs = 2,
2675 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002676 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002677 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002678 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002679 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2680 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002681 .pll = PLL_28,
2682 .has_radio = 1,
2683 .has_remote = 1,
2684 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002685 [BTTV_BOARD_ENLTV_FM_2] = {
2686 /* Encore TV Tuner Pro ENL TV-FM-2
2687 Mauro Carvalho Chehab <mchehab@infradead.org */
2688 .name = "Encore ENL TV-FM-2",
2689 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002690 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002691 .svhs = 2,
2692 /* bit 6 -> IR disabled
2693 bit 18/17 = 00 -> mute
2694 01 -> enable external audio input
2695 10 -> internal audio input (mono?)
2696 11 -> internal audio input
2697 */
2698 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002699 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002700 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2701 .gpiomute = 0,
2702 .tuner_type = TUNER_TCL_MF02GIP_5N,
2703 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002704 .pll = PLL_28,
2705 .has_radio = 1,
2706 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002707 },
2708 [BTTV_BOARD_VD012] = {
2709 /* D.Heer@Phytec.de */
2710 .name = "PHYTEC VD-012 (bt878)",
2711 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002712 /* .audio_inputs= 0, */
2713 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002714 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002715 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002716 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002717 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002718 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002719 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002720 },
2721 [BTTV_BOARD_VD012_X1] = {
2722 /* D.Heer@Phytec.de */
2723 .name = "PHYTEC VD-012-X1 (bt878)",
2724 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002725 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002726 .svhs = 3,
2727 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002728 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002729 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002730 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002731 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002732 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002733 },
2734 [BTTV_BOARD_VD012_X2] = {
2735 /* D.Heer@Phytec.de */
2736 .name = "PHYTEC VD-012-X2 (bt878)",
2737 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002738 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002739 .svhs = 3,
2740 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002741 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002742 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002743 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002744 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002745 .tuner_addr = ADDR_UNSET,
Bruno Christo0c5db422009-03-02 22:38:59 -03002746 },
2747 [BTTV_BOARD_GEOVISION_GV800S] = {
2748 /* Bruno Christo <bchristo@inf.ufsm.br>
2749 *
2750 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2751 * 1 audio input per BT878A = 4 audio inputs
2752 * 4 video inputs per BT878A = 16 video inputs
2753 * This is the first BT878A chip of the GV-800(S). It's the
2754 * "master" chip and it controls the video inputs through an
2755 * analog multiplexer (a CD22M3494) via some GPIO pins. The
2756 * slaves should use card type 0x9e (following this one).
2757 * There is a EEPROM on the card which is currently not handled.
2758 * The audio input is not working yet.
2759 */
2760 .name = "Geovision GV-800(S) (master)",
2761 .video_inputs = 4,
2762 /* .audio_inputs= 1, */
2763 .tuner_type = TUNER_ABSENT,
2764 .tuner_addr = ADDR_UNSET,
2765 .svhs = NO_SVHS,
2766 .gpiomask = 0xf107f,
2767 .no_gpioirq = 1,
2768 .muxsel = MUXSEL(2, 2, 2, 2),
2769 .pll = PLL_28,
2770 .no_msp34xx = 1,
2771 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002772 .muxsel_hook = gv800s_muxsel,
2773 },
2774 [BTTV_BOARD_GEOVISION_GV800S_SL] = {
2775 /* Bruno Christo <bchristo@inf.ufsm.br>
2776 *
2777 * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
2778 * 1 audio input per BT878A = 4 audio inputs
2779 * 4 video inputs per BT878A = 16 video inputs
2780 * The 3 other BT878A chips are "slave" chips of the GV-800(S)
2781 * and should use this card type.
2782 * The audio input is not working yet.
2783 */
2784 .name = "Geovision GV-800(S) (slave)",
2785 .video_inputs = 4,
2786 /* .audio_inputs= 1, */
2787 .tuner_type = TUNER_ABSENT,
2788 .tuner_addr = ADDR_UNSET,
2789 .svhs = NO_SVHS,
2790 .gpiomask = 0x00,
2791 .no_gpioirq = 1,
2792 .muxsel = MUXSEL(2, 2, 2, 2),
2793 .pll = PLL_28,
2794 .no_msp34xx = 1,
2795 .no_tda7432 = 1,
Bruno Christo0c5db422009-03-02 22:38:59 -03002796 .muxsel_hook = gv800s_muxsel,
2797 },
Alan McIvordceaddb2009-03-12 21:43:34 -03002798 [BTTV_BOARD_PV183] = {
2799 .name = "ProVideo PV183", /* 0x9f */
2800 .video_inputs = 2,
2801 /* .audio_inputs= 0, */
2802 .svhs = NO_SVHS,
2803 .gpiomask = 0,
2804 .muxsel = MUXSEL(2, 3),
2805 .gpiomux = { 0 },
Alan McIvordceaddb2009-03-12 21:43:34 -03002806 .no_msp34xx = 1,
2807 .pll = PLL_28,
2808 .tuner_type = TUNER_ABSENT,
2809 .tuner_addr = ADDR_UNSET,
2810 },
Peter De Schrijverde2843b2011-11-06 10:15:47 -03002811 [BTTV_BOARD_TVT_TD3116] = {
2812 .name = "Tongwei Video Technology TD-3116",
2813 .video_inputs = 16,
2814 .gpiomask = 0xc00ff,
2815 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2816 .muxsel_hook = td3116_muxsel,
2817 .svhs = NO_SVHS,
2818 .pll = PLL_28,
2819 .tuner_type = TUNER_ABSENT,
2820 },
Tony Gentile9d2952d2012-07-19 09:36:33 -03002821 [BTTV_BOARD_APOSONIC_WDVR] = {
2822 .name = "Aposonic W-DVR",
2823 .video_inputs = 4,
2824 .svhs = NO_SVHS,
2825 .muxsel = MUXSEL(2, 3, 1, 0),
2826 .tuner_type = TUNER_ABSENT,
2827 },
2828
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002829};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002830
2831static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2832
2833/* ----------------------------------------------------------------------- */
2834
2835static unsigned char eeprom_data[256];
2836
2837/*
2838 * identify card
2839 */
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08002840void bttv_idcard(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002841{
2842 unsigned int gpiobits;
2843 int i,type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002844
2845 /* read PCI subsystem ID */
Sergei Shtylyovfa1400142011-07-22 15:16:04 -03002846 btv->cardid = btv->c.pci->subsystem_device << 16;
2847 btv->cardid |= btv->c.pci->subsystem_vendor;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002848
2849 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2850 /* look for the card */
2851 for (type = -1, i = 0; cards[i].id != 0; i++)
2852 if (cards[i].id == btv->cardid)
2853 type = i;
2854
2855 if (type != -1) {
2856 /* found it */
Joe Perches8af443e2011-08-21 19:56:48 -03002857 pr_info("%d: detected: %s [card=%d], PCI subsystem ID is %04x:%04x\n",
2858 btv->c.nr, cards[type].name, cards[type].cardnr,
2859 btv->cardid & 0xffff,
2860 (btv->cardid >> 16) & 0xffff);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002861 btv->c.type = cards[type].cardnr;
2862 } else {
2863 /* 404 */
Joe Perches8af443e2011-08-21 19:56:48 -03002864 pr_info("%d: subsystem: %04x:%04x (UNKNOWN)\n",
2865 btv->c.nr, btv->cardid & 0xffff,
2866 (btv->cardid >> 16) & 0xffff);
2867 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 -07002868 }
2869 }
2870
2871 /* let the user override the autodetected type */
2872 if (card[btv->c.nr] < bttv_num_tvcards)
2873 btv->c.type=card[btv->c.nr];
2874
2875 /* print which card config we are using */
Joe Perches8af443e2011-08-21 19:56:48 -03002876 pr_info("%d: using: %s [card=%d,%s]\n",
2877 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type,
2878 card[btv->c.nr] < bttv_num_tvcards
2879 ? "insmod option" : "autodetected");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002880
2881 /* overwrite gpio stuff ?? */
2882 if (UNSET == audioall && UNSET == audiomux[0])
2883 return;
2884
2885 if (UNSET != audiomux[0]) {
2886 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002887 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002888 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002889 gpiobits |= audiomux[i];
2890 }
2891 } else {
2892 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002893 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002894 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002895 }
2896 }
2897 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
Joe Perches8af443e2011-08-21 19:56:48 -03002898 pr_info("%d: gpio config override: mask=0x%x, mux=",
2899 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002900 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Joe Perches8af443e2011-08-21 19:56:48 -03002901 pr_cont("%s0x%x",
2902 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002903 }
Joe Perches8af443e2011-08-21 19:56:48 -03002904 pr_cont("\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002905}
2906
2907/*
2908 * (most) board specific initialisations goes here
2909 */
2910
2911/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002912static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002913{
2914 int type = -1;
2915
2916 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002917 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002918 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002919 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002920 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002921 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002922
2923 if (-1 != type) {
2924 btv->c.type = type;
Joe Perches8af443e2011-08-21 19:56:48 -03002925 pr_info("%d: detected by eeprom: %s [card=%d]\n",
2926 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002927 }
2928}
2929
2930static void flyvideo_gpio(struct bttv *btv)
2931{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002932 int gpio, has_remote, has_radio, is_capture_only;
2933 int is_lr90, has_tda9820_tda9821;
2934 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002935
2936 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002937 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002938 gpio = gpio_read();
2939 /* FIXME: must restore OUR_EN ??? */
2940
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002941 /* all cards provide GPIO info, some have an additional eeprom
2942 * LR50: GPIO coding can be found lower right CP1 .. CP9
2943 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2944 * GPIO14-12: n.c.
2945 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002946
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002947 * lowest 3 bytes are remote control codes (no handshake needed)
2948 * xxxFFF: No remote control chip soldered
2949 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
2950 * Note: Some bits are Audio_Mask !
2951 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002952 ttype = (gpio & 0x0f0000) >> 16;
2953 switch (ttype) {
2954 case 0x0:
2955 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002956 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002957 case 0x2:
2958 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002959 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002960 case 0x4:
2961 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002962 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002963 case 0x6:
2964 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002965 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002966 case 0xC:
2967 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002968 break;
2969 default:
Joe Perches8af443e2011-08-21 19:56:48 -03002970 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002971 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002972 }
2973
2974 has_remote = gpio & 0x800000;
2975 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002976 /* unknown 0x200000;
2977 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002978 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002979 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002980 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
2981 /*
2982 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002983
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002984 if (is_capture_only)
2985 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002986
Joe Perches8af443e2011-08-21 19:56:48 -03002987 pr_info("%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
2988 btv->c.nr, has_radio ? "yes" : "no",
2989 has_remote ? "yes" : "no", tuner_type, gpio);
2990 pr_info("%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
2991 btv->c.nr, is_lr90 ? "yes" : "no",
2992 has_tda9820_tda9821 ? "yes" : "no",
2993 is_capture_only ? "yes" : "no");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002994
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002995 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
2996 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002997 btv->has_radio = has_radio;
2998
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002999 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3000 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3001 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003002 if (has_tda9820_tda9821)
3003 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003004 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003005}
3006
3007static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3008 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3009static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3010 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3011
3012static void miro_pinnacle_gpio(struct bttv *btv)
3013{
3014 int id,msp,gpio;
3015 char *info;
3016
3017 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003018 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003019 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003020 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003021 if (id < 32) {
3022 btv->tuner_type = miro_tunermap[id];
3023 if (0 == (gpio & 0x20)) {
3024 btv->has_radio = 1;
3025 if (!miro_fmtuner[id]) {
3026 btv->has_matchbox = 1;
3027 btv->mbox_we = (1<<6);
3028 btv->mbox_most = (1<<7);
3029 btv->mbox_clk = (1<<8);
3030 btv->mbox_data = (1<<9);
3031 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3032 }
3033 } else {
3034 btv->has_radio = 0;
3035 }
3036 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003037 if (btv->c.type == BTTV_BOARD_MIRO)
3038 btv->c.type = BTTV_BOARD_MIROPRO;
3039 if (btv->c.type == BTTV_BOARD_PINNACLE)
3040 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003041 }
Joe Perches8af443e2011-08-21 19:56:48 -03003042 pr_info("%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3043 btv->c.nr, id+1, btv->tuner_type,
3044 !btv->has_radio ? "no" :
3045 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3046 (-1 == msp) ? "no" : "yes");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003047 } else {
3048 /* new cards with microtune tuner */
3049 id = 63 - id;
3050 btv->has_radio = 0;
3051 switch (id) {
3052 case 1:
3053 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003054 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003055 break;
3056 case 2:
3057 info = "PAL+SECAM / stereo";
3058 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003059 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003060 break;
3061 case 3:
3062 info = "NTSC / stereo";
3063 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003064 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003065 break;
3066 case 4:
3067 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003068 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003069 break;
3070 case 5:
3071 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003072 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003073 break;
3074 case 6:
3075 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003076 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003077 break;
3078 case 7:
3079 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003080 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003081 break;
3082 default:
3083 info = "oops: unknown card";
3084 break;
3085 }
3086 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003087 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Joe Perches8af443e2011-08-21 19:56:48 -03003088 pr_info("%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3089 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003090 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003091 }
3092}
3093
3094/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3095#define LM1882_SYNC_DRIVE 0x200000L
3096
3097static void init_ids_eagle(struct bttv *btv)
3098{
3099 gpio_inout(0xffffff,0xFFFF37);
3100 gpio_write(0x200020);
3101
3102 /* flash strobe inverter ?! */
3103 gpio_write(0x200024);
3104
3105 /* switch sync drive off */
3106 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3107
3108 /* set BT848 muxel to 2 */
3109 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3110}
3111
3112/* Muxsel helper for the IDS Eagle.
3113 * the eagles does not use the standard muxsel-bits but
3114 * has its own multiplexer */
3115static void eagle_muxsel(struct bttv *btv, unsigned int input)
3116{
Trent Piepho430390e2009-01-28 21:32:59 -03003117 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003118
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003119 /* composite */
3120 /* set chroma ADC to sleep */
3121 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3122 /* set to composite video */
3123 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3124 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003125
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003126 /* switch sync drive off */
3127 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003128}
3129
3130static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3131{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003132 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003133 gpio_write(masks[input%4]);
3134}
3135
3136/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3137 alarms output
3138
3139 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3140 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3141
3142 IN - sensor inputs, INx - sensor inputs and TI XORed together
3143 O1,O2,O3 - alarm outputs (relays)
3144
3145 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3146
3147*/
3148
3149static void init_lmlbt4x(struct bttv *btv)
3150{
Joe Perches8af443e2011-08-21 19:56:48 -03003151 pr_debug("LMLBT4x init\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003152 btwrite(0x000000, BT848_GPIO_REG_INP);
3153 gpio_inout(0xffffff, 0x0006C0);
3154 gpio_write(0x000000);
3155}
3156
3157static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3158{
3159 unsigned int inmux = input % 8;
3160 gpio_inout( 0xf, 0xf );
3161 gpio_bits( 0xf, inmux );
3162}
3163
3164static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3165{
3166 unsigned int inmux = input % 4;
3167 gpio_inout( 3<<9, 3<<9 );
3168 gpio_bits( 3<<9, inmux<<9 );
3169}
3170
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003171static void geovision_muxsel(struct bttv *btv, unsigned int input)
3172{
3173 unsigned int inmux = input % 16;
3174 gpio_inout(0xf, 0xf);
3175 gpio_bits(0xf, inmux);
3176}
3177
Peter De Schrijverde2843b2011-11-06 10:15:47 -03003178/*
3179 * The TD3116 has 2 74HC4051 muxes wired to the MUX0 input of a bt878.
3180 * The first 74HC4051 has the lower 8 inputs, the second one the higher 8.
3181 * The muxes are controlled via a 74HC373 latch which is connected to
3182 * GPIOs 0-7. GPIO 18 is connected to the LE signal of the latch.
3183 * Q0 of the latch is connected to the Enable (~E) input of the first
3184 * 74HC4051. Q1 - Q3 are connected to S0 - S2 of the same 74HC4051.
3185 * Q4 - Q7 are connected to the second 74HC4051 in the same way.
3186 */
3187
3188static void td3116_latch_value(struct bttv *btv, u32 value)
3189{
3190 gpio_bits((1<<18) | 0xff, value);
3191 gpio_bits((1<<18) | 0xff, (1<<18) | value);
3192 udelay(1);
3193 gpio_bits((1<<18) | 0xff, value);
3194}
3195
3196static void td3116_muxsel(struct bttv *btv, unsigned int input)
3197{
3198 u32 value;
3199 u32 highbit;
3200
3201 highbit = (input & 0x8) >> 3 ;
3202
3203 /* Disable outputs and set value in the mux */
3204 value = 0x11; /* Disable outputs */
3205 value |= ((input & 0x7) << 1) << (4 * highbit);
3206 td3116_latch_value(btv, value);
3207
3208 /* Enable the correct output */
3209 value &= ~0x11;
3210 value |= ((highbit ^ 0x1) << 4) | highbit;
3211 td3116_latch_value(btv, value);
3212}
3213
Linus Torvalds1da177e2005-04-16 15:20:36 -07003214/* ----------------------------------------------------------------------- */
3215
3216static void bttv_reset_audio(struct bttv *btv)
3217{
3218 /*
3219 * BT878A has a audio-reset register.
3220 * 1. This register is an audio reset function but it is in
3221 * function-0 (video capture) address space.
3222 * 2. It is enough to do this once per power-up of the card.
3223 * 3. There is a typo in the Conexant doc -- it is not at
3224 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3225 * --//Shrikumar 030609
3226 */
3227 if (btv->id != 878)
3228 return;
3229
3230 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03003231 pr_debug("%d: BT878A ARESET\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003232 btwrite((1<<7), 0x058);
3233 udelay(10);
3234 btwrite( 0, 0x058);
3235}
3236
3237/* initialization part one -- before registering i2c bus */
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003238void bttv_init_card1(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003239{
3240 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003241 case BTTV_BOARD_HAUPPAUGE:
3242 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003243 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003244 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003245 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003246 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003247 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003248 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003249 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003250 boot_msp34xx(btv,11);
3251 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003252 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003253 pvr_boot(btv);
3254 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003255 case BTTV_BOARD_TWINHAN_DST:
3256 case BTTV_BOARD_AVDVBT_771:
3257 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003258 btv->use_i2c_hw = 1;
3259 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003260 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003261 init_RTV24( btv );
3262 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003263
Linus Torvalds1da177e2005-04-16 15:20:36 -07003264 }
3265 if (!bttv_tvcards[btv->c.type].has_dvb)
3266 bttv_reset_audio(btv);
3267}
3268
3269/* initialization part two -- after registering i2c bus */
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003270void bttv_init_card2(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003271{
Trent Piephoac7dc842007-06-28 17:51:08 -03003272 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003273
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003274 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003275 bttv_readee(btv,eeprom_data,0xa0);
3276 identify_by_eeprom(btv,eeprom_data);
3277 }
3278
3279 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003280 case BTTV_BOARD_MIRO:
3281 case BTTV_BOARD_MIROPRO:
3282 case BTTV_BOARD_PINNACLE:
3283 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003284 /* miro/pinnacle */
3285 miro_pinnacle_gpio(btv);
3286 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003287 case BTTV_BOARD_FLYVIDEO_98:
3288 case BTTV_BOARD_MAXI:
3289 case BTTV_BOARD_LIFE_FLYKIT:
3290 case BTTV_BOARD_FLYVIDEO:
3291 case BTTV_BOARD_TYPHOON_TVIEW:
3292 case BTTV_BOARD_CHRONOS_VS2:
3293 case BTTV_BOARD_FLYVIDEO_98FM:
3294 case BTTV_BOARD_FLYVIDEO2000:
3295 case BTTV_BOARD_FLYVIDEO98EZ:
3296 case BTTV_BOARD_CONFERENCETV:
3297 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003298 flyvideo_gpio(btv);
3299 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003300 case BTTV_BOARD_HAUPPAUGE:
3301 case BTTV_BOARD_HAUPPAUGE878:
3302 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003303 /* pick up some config infos from the eeprom */
3304 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003305 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003306 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003307 case BTTV_BOARD_AVERMEDIA98:
3308 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003309 bttv_readee(btv,eeprom_data,0xa0);
3310 avermedia_eeprom(btv);
3311 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003312 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003313 init_PXC200(btv);
3314 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003315 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003316 picolo_tetra_init(btv);
3317 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003318 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003319 btv->has_radio = 1;
3320 btv->has_matchbox = 1;
3321 btv->mbox_we = 0x20;
3322 btv->mbox_most = 0;
3323 btv->mbox_clk = 0x08;
3324 btv->mbox_data = 0x10;
3325 btv->mbox_mask = 0x38;
3326 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003327 case BTTV_BOARD_VOBIS_BOOSTAR:
3328 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003329 terratec_active_radio_upgrade(btv);
3330 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003331 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003332 if (btv->cardid == 0x3002144f) {
3333 btv->has_radio=1;
Joe Perches8af443e2011-08-21 19:56:48 -03003334 pr_info("%d: radio detected by subsystem id (CPH05x)\n",
3335 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003336 }
3337 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003338 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003339 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003340 /* Fix up entry for 3DFX VoodooTV 100,
3341 which is an OEM STB card variant. */
3342 btv->has_radio=0;
3343 btv->tuner_type=TUNER_TEMIC_NTSC;
3344 }
3345 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003346 case BTTV_BOARD_OSPREY1x0:
3347 case BTTV_BOARD_OSPREY1x0_848:
3348 case BTTV_BOARD_OSPREY101_848:
3349 case BTTV_BOARD_OSPREY1x1:
3350 case BTTV_BOARD_OSPREY1x1_SVID:
3351 case BTTV_BOARD_OSPREY2xx:
3352 case BTTV_BOARD_OSPREY2x0_SVID:
3353 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003354 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003355 case BTTV_BOARD_OSPREY500:
3356 case BTTV_BOARD_OSPREY540:
3357 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003358 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003359 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003360 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003361 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003362 init_ids_eagle(btv);
3363 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003364 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003365 bttv_readee(btv,eeprom_data,0xa0);
3366 modtec_eeprom(btv);
3367 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003368 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003369 init_lmlbt4x(btv);
3370 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003371 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003372 tibetCS16_init(btv);
3373 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003374 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003375 kodicom4400r_init(btv);
3376 break;
Bruno Christo0c5db422009-03-02 22:38:59 -03003377 case BTTV_BOARD_GEOVISION_GV800S:
3378 gv800s_init(btv);
3379 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003380 }
3381
3382 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003383 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003384 /* defaults from card list */
3385 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3386 btv->pll.pll_ifreq=28636363;
3387 btv->pll.pll_crystal=BT848_IFORM_XT0;
3388 }
3389 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3390 btv->pll.pll_ifreq=35468950;
3391 btv->pll.pll_crystal=BT848_IFORM_XT1;
3392 }
3393 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003394 switch (pll[btv->c.nr]) {
3395 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003396 btv->pll.pll_crystal = 0;
3397 btv->pll.pll_ifreq = 0;
3398 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003399 break;
3400 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003401 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003402 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003403 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003404 btv->pll.pll_crystal = BT848_IFORM_XT0;
3405 break;
3406 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003407 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003408 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003409 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003410 btv->pll.pll_crystal = BT848_IFORM_XT1;
3411 break;
3412 }
3413 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003414 btv->pll.pll_current = -1;
3415
Linus Torvalds1da177e2005-04-16 15:20:36 -07003416 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003417 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003418 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003419 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003420 if (UNSET != tuner[btv->c.nr])
3421 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003422
Trent Piephoabb03622009-01-28 21:32:59 -03003423 if (btv->tuner_type == TUNER_ABSENT)
Joe Perches8af443e2011-08-21 19:56:48 -03003424 pr_info("%d: tuner absent\n", btv->c.nr);
3425 else if (btv->tuner_type == UNSET)
3426 pr_warn("%d: tuner type unset\n", btv->c.nr);
Trent Piephoac7dc842007-06-28 17:51:08 -03003427 else
Joe Perches8af443e2011-08-21 19:56:48 -03003428 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003429
Hans Verkuil859f0272009-03-28 08:29:00 -03003430 if (autoload != UNSET) {
Joe Perches8af443e2011-08-21 19:56:48 -03003431 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr);
3432 pr_warn("%d: use option msp3400, tda7432 or tvaudio to override which audio module should be used\n",
3433 btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003434 }
3435
Trent Piephoabb03622009-01-28 21:32:59 -03003436 if (UNSET == btv->tuner_type)
3437 btv->tuner_type = TUNER_ABSENT;
3438
Trent Piepho5221e212009-01-28 21:32:59 -03003439 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3440 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003441 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3442 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003443 if (svhs[btv->c.nr] != UNSET)
3444 btv->svhs = svhs[btv->c.nr];
3445 if (remote[btv->c.nr] != UNSET)
3446 btv->has_remote = remote[btv->c.nr];
3447
3448 if (bttv_tvcards[btv->c.type].has_radio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003449 btv->has_radio = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003450 if (bttv_tvcards[btv->c.type].has_remote)
Hans Verkuil2c905772009-07-20 08:14:17 -03003451 btv->has_remote = 1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003452 if (!bttv_tvcards[btv->c.type].no_gpioirq)
Hans Verkuil2c905772009-07-20 08:14:17 -03003453 btv->gpioirq = 1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003454 if (bttv_tvcards[btv->c.type].volume_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003455 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003456 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003457 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003458
Trent Piephoabb03622009-01-28 21:32:59 -03003459 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003460 return; /* no tuner or related drivers to load */
3461
Hans Verkuil859f0272009-03-28 08:29:00 -03003462 if (btv->has_saa6588 || saa6588[btv->c.nr]) {
3463 /* Probe for RDS receiver chip */
3464 static const unsigned short addrs[] = {
3465 0x20 >> 1,
3466 0x22 >> 1,
3467 I2C_CLIENT_END
3468 };
3469 struct v4l2_subdev *sd;
3470
Hans Verkuil53dacb12009-08-10 02:49:08 -03003471 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003472 &btv->c.i2c_adap, "saa6588", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003473 btv->has_saa6588 = (sd != NULL);
3474 }
3475
Linus Torvalds1da177e2005-04-16 15:20:36 -07003476 /* try to detect audio/fader chips */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003477
Hans Verkuil859f0272009-03-28 08:29:00 -03003478 /* First check if the user specified the audio chip via a module
3479 option. */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003480
Hans Verkuil859f0272009-03-28 08:29:00 -03003481 switch (audiodev[btv->c.nr]) {
3482 case -1:
3483 return; /* do not load any audio module */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003484
Hans Verkuil859f0272009-03-28 08:29:00 -03003485 case 0: /* autodetect */
3486 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003487
Hans Verkuil859f0272009-03-28 08:29:00 -03003488 case 1: {
3489 /* The user specified that we should probe for msp3400 */
3490 static const unsigned short addrs[] = {
3491 I2C_ADDR_MSP3400 >> 1,
3492 I2C_ADDR_MSP3400_ALT >> 1,
3493 I2C_CLIENT_END
3494 };
3495
Hans Verkuil53dacb12009-08-10 02:49:08 -03003496 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003497 &btv->c.i2c_adap, "msp3400", 0, addrs);
Hans Verkuil859f0272009-03-28 08:29:00 -03003498 if (btv->sd_msp34xx)
3499 return;
3500 goto no_audio;
3501 }
3502
3503 case 2: {
3504 /* The user specified that we should probe for tda7432 */
3505 static const unsigned short addrs[] = {
3506 I2C_ADDR_TDA7432 >> 1,
3507 I2C_CLIENT_END
3508 };
3509
Hans Verkuil53dacb12009-08-10 02:49:08 -03003510 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003511 &btv->c.i2c_adap, "tda7432", 0, addrs))
Hans Verkuil859f0272009-03-28 08:29:00 -03003512 return;
3513 goto no_audio;
3514 }
3515
3516 case 3: {
3517 /* The user specified that we should probe for tvaudio */
Hans Verkuil53dacb12009-08-10 02:49:08 -03003518 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003519 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
Hans Verkuil859f0272009-03-28 08:29:00 -03003520 if (btv->sd_tvaudio)
3521 return;
3522 goto no_audio;
3523 }
3524
3525 default:
Joe Perches8af443e2011-08-21 19:56:48 -03003526 pr_warn("%d: unknown audiodev value!\n", btv->c.nr);
Hans Verkuil859f0272009-03-28 08:29:00 -03003527 return;
3528 }
3529
3530 /* There were no overrides, so now we try to discover this through the
3531 card definition */
3532
3533 /* probe for msp3400 first: this driver can detect whether or not
3534 it really is a msp3400, so it will return NULL when the device
3535 found is really something else (e.g. a tea6300). */
3536 if (!bttv_tvcards[btv->c.type].no_msp34xx) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003537 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003538 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003539 0, I2C_ADDRS(I2C_ADDR_MSP3400 >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003540 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
Hans Verkuil53dacb12009-08-10 02:49:08 -03003541 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003542 &btv->c.i2c_adap, "msp3400",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003543 0, I2C_ADDRS(I2C_ADDR_MSP3400_ALT >> 1));
Hans Verkuil859f0272009-03-28 08:29:00 -03003544 }
3545
3546 /* If we found a msp34xx, then we're done. */
3547 if (btv->sd_msp34xx)
3548 return;
3549
Hans Verkuilfafdc262013-02-06 12:43:37 -03003550 /* Now see if we can find one of the tvaudio devices. */
3551 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3552 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
3553 if (btv->sd_tvaudio) {
3554 /* There may be two tvaudio chips on the card, so try to
3555 find another. */
3556 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3557 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
3558 }
3559
Hans Verkuil859f0272009-03-28 08:29:00 -03003560 /* it might also be a tda7432. */
3561 if (!bttv_tvcards[btv->c.type].no_tda7432) {
3562 static const unsigned short addrs[] = {
3563 I2C_ADDR_TDA7432 >> 1,
3564 I2C_CLIENT_END
3565 };
3566
Hans Verkuil01df5302013-02-06 12:40:28 -03003567 btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3568 &btv->c.i2c_adap, "tda7432", 0, addrs);
3569 if (btv->sd_tda7432)
Hans Verkuil859f0272009-03-28 08:29:00 -03003570 return;
3571 }
Hans Verkuil859f0272009-03-28 08:29:00 -03003572 if (btv->sd_tvaudio)
3573 return;
3574
3575no_audio:
Joe Perches8af443e2011-08-21 19:56:48 -03003576 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003577}
3578
3579
Hans Verkuil2c905772009-07-20 08:14:17 -03003580/* initialize the tuner */
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003581void bttv_init_tuner(struct bttv *btv)
Hans Verkuil2c905772009-07-20 08:14:17 -03003582{
3583 int addr = ADDR_UNSET;
3584
3585 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3586 addr = bttv_tvcards[btv->c.type].tuner_addr;
3587
3588 if (btv->tuner_type != TUNER_ABSENT) {
3589 struct tuner_setup tun_setup;
3590
3591 /* Load tuner module before issuing tuner config call! */
Hans de Goede5c164642012-05-20 08:11:04 -03003592 if (btv->has_radio)
Hans Verkuil53dacb12009-08-10 02:49:08 -03003593 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003594 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003595 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3596 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003597 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003598 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3599 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
Laurent Pinchart9a1f8b32010-09-24 10:16:44 -03003600 &btv->c.i2c_adap, "tuner",
Hans Verkuil53dacb12009-08-10 02:49:08 -03003601 0, v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
Hans Verkuil2c905772009-07-20 08:14:17 -03003602
Mauro Carvalho Chehabad020dc2011-02-15 09:30:50 -02003603 tun_setup.mode_mask = T_ANALOG_TV;
Hans Verkuil2c905772009-07-20 08:14:17 -03003604 tun_setup.type = btv->tuner_type;
3605 tun_setup.addr = addr;
3606
Hans de Goede5c164642012-05-20 08:11:04 -03003607 if (btv->has_radio)
Hans Verkuil2c905772009-07-20 08:14:17 -03003608 tun_setup.mode_mask |= T_RADIO;
3609
3610 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3611 }
3612
3613 if (btv->tda9887_conf) {
3614 struct v4l2_priv_tun_config tda9887_cfg;
3615
3616 tda9887_cfg.tuner = TUNER_TDA9887;
3617 tda9887_cfg.priv = &btv->tda9887_conf;
3618
3619 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3620 }
3621}
3622
Linus Torvalds1da177e2005-04-16 15:20:36 -07003623/* ----------------------------------------------------------------------- */
3624
3625static void modtec_eeprom(struct bttv *btv)
3626{
3627 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3628 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003629 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3630 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003631 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3632 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
Joe Perches8af443e2011-08-21 19:56:48 -03003633 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3634 btv->c.nr, &eeprom_data[0x1e]);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003635 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3636 btv->tuner_type=TUNER_PHILIPS_NTSC;
Joe Perches8af443e2011-08-21 19:56:48 -03003637 pr_info("%d: Modtec: Tuner autodetected by eeprom: %s\n",
3638 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003639 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003640 pr_info("%d: Modtec: Unknown TunerString: %s\n",
3641 btv->c.nr, &eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003642 }
3643}
3644
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003645static void hauppauge_eeprom(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003646{
3647 struct tveeprom tv;
3648
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003649 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003650 btv->tuner_type = tv.tuner_type;
3651 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003652
Joe Perches8af443e2011-08-21 19:56:48 -03003653 pr_info("%d: Hauppauge eeprom indicates model#%d\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003654 btv->c.nr, tv.model);
3655
3656 /*
3657 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3658 * type based on model #.
3659 */
3660 if(tv.model == 64900) {
Joe Perches8af443e2011-08-21 19:56:48 -03003661 pr_info("%d: Switching board type from %s to %s\n",
Steven Tothcd1257d2006-01-09 15:25:01 -02003662 btv->c.nr,
3663 bttv_tvcards[btv->c.type].name,
3664 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3665 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3666 }
Hans de Goede7025e522012-05-21 07:46:22 -03003667
3668 /* The 61334 needs the msp3410 to do the radio demod to get sound */
3669 if (tv.model == 61334)
3670 btv->radio_uses_msp_demodulator = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003671}
3672
3673static int terratec_active_radio_upgrade(struct bttv *btv)
3674{
3675 int freq;
3676
3677 btv->has_radio = 1;
3678 btv->has_matchbox = 1;
3679 btv->mbox_we = 0x10;
3680 btv->mbox_most = 0x20;
3681 btv->mbox_clk = 0x08;
3682 btv->mbox_data = 0x04;
3683 btv->mbox_mask = 0x3c;
3684
3685 btv->mbox_iow = 1 << 8;
3686 btv->mbox_ior = 1 << 9;
3687 btv->mbox_csel = 1 << 10;
3688
3689 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003690 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003691 if (0x1ed8 == tea5757_read(btv)) {
Joe Perches8af443e2011-08-21 19:56:48 -03003692 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003693 btv->has_radio = 1;
Hans Verkuil859f0272009-03-28 08:29:00 -03003694 btv->has_saa6588 = 1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003695 btv->has_matchbox = 1;
3696 } else {
3697 btv->has_radio = 0;
3698 btv->has_matchbox = 0;
3699 }
3700 return 0;
3701}
3702
3703
3704/* ----------------------------------------------------------------------- */
3705
3706/*
3707 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3708 *
3709 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3710 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3711 * unpacked with unzip).
3712 */
3713#define PVR_GPIO_DELAY 10
3714
3715#define BTTV_ALT_DATA 0x000001
3716#define BTTV_ALT_DCLK 0x100000
3717#define BTTV_ALT_NCONFIG 0x800000
3718
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003719static int pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003720{
3721 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003722 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003723 int i;
3724
3725 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3726 gpio_write(0);
3727 udelay(PVR_GPIO_DELAY);
3728
3729 gpio_write(BTTV_ALT_NCONFIG);
3730 udelay(PVR_GPIO_DELAY);
3731
3732 for (n = 0; n < microlen; n++) {
3733 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003734 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003735 gpio_bits(BTTV_ALT_DCLK,0);
3736 if (bits & 0x01)
3737 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3738 else
3739 gpio_bits(BTTV_ALT_DATA,0);
3740 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3741 bits >>= 1;
3742 }
3743 }
3744 gpio_bits(BTTV_ALT_DCLK,0);
3745 udelay(PVR_GPIO_DELAY);
3746
3747 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3748 for (i = 0 ; i < 30 ; i++) {
3749 gpio_bits(BTTV_ALT_DCLK,0);
3750 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3751 }
3752 gpio_bits(BTTV_ALT_DCLK,0);
3753 return 0;
3754}
3755
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003756static int pvr_boot(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003757{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003758 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003759 int rc;
3760
3761 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3762 if (rc != 0) {
Joe Perches8af443e2011-08-21 19:56:48 -03003763 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003764 return rc;
3765 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003766 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
Joe Perches8af443e2011-08-21 19:56:48 -03003767 pr_info("%d: altera firmware upload %s\n",
3768 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003769 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003770 return rc;
3771}
3772
3773/* ----------------------------------------------------------------------- */
3774/* some osprey specific stuff */
3775
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003776static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003777{
Trent Piephocf784d52007-07-21 21:26:40 -03003778 int i;
3779 u32 serial = 0;
3780 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003781
Trent Piephocf784d52007-07-21 21:26:40 -03003782 /* This code will nevery actually get called in this case.... */
3783 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3784 /* this might be an antique... check for MMAC label in eeprom */
3785 if (!strncmp(ee, "MMAC", 4)) {
3786 u8 checksum = 0;
3787 for (i = 0; i < 21; i++)
3788 checksum += ee[i];
3789 if (checksum != ee[21])
3790 return;
3791 cardid = BTTV_BOARD_OSPREY1x0_848;
3792 for (i = 12; i < 21; i++)
3793 serial *= 10, serial += ee[i] - '0';
3794 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003795 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003796 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003797
Trent Piephocf784d52007-07-21 21:26:40 -03003798 for (i = 4*16; i < 8*16; i += 16) {
3799 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003800
Trent Piephocf784d52007-07-21 21:26:40 -03003801 if ((checksum&0xff) + (checksum>>8) == 0xff)
3802 break;
3803 }
3804 if (i >= 8*16)
3805 return;
3806 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003807
Trent Piephocf784d52007-07-21 21:26:40 -03003808 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003809 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003810
Trent Piephocf784d52007-07-21 21:26:40 -03003811 switch(type) {
3812 /* 848 based */
3813 case 0x0004:
3814 cardid = BTTV_BOARD_OSPREY1x0_848;
3815 break;
3816 case 0x0005:
3817 cardid = BTTV_BOARD_OSPREY101_848;
3818 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003819
Trent Piephocf784d52007-07-21 21:26:40 -03003820 /* 878 based */
3821 case 0x0012:
3822 case 0x0013:
3823 cardid = BTTV_BOARD_OSPREY1x0;
3824 break;
3825 case 0x0014:
3826 case 0x0015:
3827 cardid = BTTV_BOARD_OSPREY1x1;
3828 break;
3829 case 0x0016:
3830 case 0x0017:
3831 case 0x0020:
3832 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3833 break;
3834 case 0x0018:
3835 case 0x0019:
3836 case 0x001E:
3837 case 0x001F:
3838 cardid = BTTV_BOARD_OSPREY2xx;
3839 break;
3840 case 0x001A:
3841 case 0x001B:
3842 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3843 break;
3844 case 0x0040:
3845 cardid = BTTV_BOARD_OSPREY500;
3846 break;
3847 case 0x0050:
3848 case 0x0056:
3849 cardid = BTTV_BOARD_OSPREY540;
3850 /* bttv_osprey_540_init(btv); */
3851 break;
3852 case 0x0060:
3853 case 0x0070:
3854 case 0x00A0:
3855 cardid = BTTV_BOARD_OSPREY2x0;
3856 /* enable output on select control lines */
3857 gpio_inout(0xffffff,0x000303);
3858 break;
3859 case 0x00D8:
3860 cardid = BTTV_BOARD_OSPREY440;
3861 break;
3862 default:
3863 /* unknown...leave generic, but get serial # */
Joe Perches8af443e2011-08-21 19:56:48 -03003864 pr_info("%d: osprey eeprom: unknown card type 0x%04x\n",
3865 btv->c.nr, type);
Trent Piephocf784d52007-07-21 21:26:40 -03003866 break;
3867 }
Al Viroc1c36f32008-05-21 00:32:21 -03003868 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003869 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003870
Joe Perches8af443e2011-08-21 19:56:48 -03003871 pr_info("%d: osprey eeprom: card=%d '%s' serial=%u\n",
3872 btv->c.nr, cardid,
3873 cardid > 0 ? bttv_tvcards[cardid].name : "Unknown", serial);
Trent Piephocf784d52007-07-21 21:26:40 -03003874
3875 if (cardid<0 || btv->c.type == cardid)
3876 return;
3877
3878 /* card type isn't set correctly */
3879 if (card[btv->c.nr] < bttv_num_tvcards) {
Joe Perches8af443e2011-08-21 19:56:48 -03003880 pr_warn("%d: osprey eeprom: Not overriding user specified card type\n",
3881 btv->c.nr);
Trent Piephocf784d52007-07-21 21:26:40 -03003882 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03003883 pr_info("%d: osprey eeprom: Changing card type from %d to %d\n",
3884 btv->c.nr, btv->c.type, cardid);
Trent Piephocf784d52007-07-21 21:26:40 -03003885 btv->c.type = cardid;
3886 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003887}
3888
3889/* ----------------------------------------------------------------------- */
3890/* AVermedia specific stuff, from bktr_card.c */
3891
3892static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003893 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3894 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3895 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3896 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3897 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003898 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003899
3900static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003901 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003902 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3903 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003904 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3905 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003906
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003907static void avermedia_eeprom(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003908{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003909 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003910
3911 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003912 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3913 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003914 btv->has_remote = (eeprom_data[0x42] & 0x01);
3915
3916 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003917 if (tuner_format <= 0x0a)
3918 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003919 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003920 if (tuner_format <= 9)
3921 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003922
3923 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003924 if (tuner_format == 0x09)
3925 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003926
Joe Perches8af443e2011-08-21 19:56:48 -03003927 pr_info("%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003928 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3929 if (tuner_type) {
3930 btv->tuner_type = tuner_type;
Joe Perches8af443e2011-08-21 19:56:48 -03003931 pr_cont("%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003932 } else
Joe Perches8af443e2011-08-21 19:56:48 -03003933 pr_cont("Unknown type");
3934 pr_cont(" radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003935 tuner_tv_fm ? "yes" : "no",
3936 btv->has_remote ? "yes" : "no");
3937}
3938
Trent Piepho72134a62009-01-28 21:32:59 -03003939/*
3940 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3941 * analog demod, which is not I2C controlled like the newer and more common
3942 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3943 * that control the IF for the video and audio. Apparently, bttv GPIO
3944 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3945 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3946 */
3947u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003948{
Trent Piepho72134a62009-01-28 21:32:59 -03003949
Frank Schaefer2166f0a2013-03-21 13:51:16 -03003950 if (btv->audio_input == TVAUDIO_INPUT_TUNER) {
Trent Piepho72134a62009-01-28 21:32:59 -03003951 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3952 gpiobits |= 0x10000;
3953 else
3954 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003955 }
Trent Piepho72134a62009-01-28 21:32:59 -03003956
3957 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3958 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003959}
3960
3961
3962/*
3963 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003964 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003965 *
3966 * Hauppauge: pin 5
3967 * Voodoo: pin 20
3968 */
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003969static void boot_msp34xx(struct bttv *btv, int pin)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003970{
3971 int mask = (1 << pin);
3972
3973 gpio_inout(mask,mask);
3974 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003975 mdelay(2);
3976 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003977 gpio_bits(mask,mask);
3978
3979 if (bttv_gpio)
3980 bttv_gpio_tracking(btv,"msp34xx");
3981 if (bttv_verbose)
Joe Perches8af443e2011-08-21 19:56:48 -03003982 pr_info("%d: Hauppauge/Voodoo msp34xx: reset line init [%d]\n",
3983 btv->c.nr, pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003984}
3985
Linus Torvalds1da177e2005-04-16 15:20:36 -07003986/* ----------------------------------------------------------------------- */
3987/* Imagenation L-Model PXC200 Framegrabber */
3988/* This is basically the same procedure as
3989 * used by Alessandro Rubini in his pxc200
3990 * driver, but using BTTV functions */
3991
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003992static void init_PXC200(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003993{
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08003994 static int vals[] = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d, 0x01, 0x02,
3995 0x03, 0x04, 0x05, 0x06, 0x00 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003996 unsigned int i;
3997 int tmp;
3998 u32 val;
3999
4000 /* Initialise GPIO-connevted stuff */
4001 gpio_inout(0xffffff, (1<<13));
4002 gpio_write(0);
4003 udelay(3);
4004 gpio_write(1<<13);
4005 /* GPIO inputs are pulled up, so no need to drive
4006 * reset pin any longer */
4007 gpio_bits(0xffffff, 0);
4008 if (bttv_gpio)
4009 bttv_gpio_tracking(btv,"pxc200");
4010
4011 /* we could/should try and reset/control the AD pots? but
4012 right now we simply turned off the crushing. Without
4013 this the AGC drifts drifts
4014 remember the EN is reverse logic -->
4015 setting BT848_ADC_AGC_EN disable the AGC
4016 tboult@eecs.lehigh.edu
4017 */
4018
4019 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
4020
4021 /* Initialise MAX517 DAC */
Joe Perches8af443e2011-08-21 19:56:48 -03004022 pr_info("Setting DAC reference voltage level ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004023 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4024
4025 /* Initialise 12C508 PIC */
4026 /* The I2CWrite and I2CRead commmands are actually to the
4027 * same chips - but the R/W bit is included in the address
4028 * argument so the numbers are different */
4029
4030
Joe Perches8af443e2011-08-21 19:56:48 -03004031 pr_info("Initialising 12C508 PIC chip ...\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004032
4033 /* First of all, enable the clock line. This is used in the PXC200-F */
4034 val = btread(BT848_GPIO_DMA_CTL);
4035 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
4036 btwrite(val, BT848_GPIO_DMA_CTL);
4037
4038 /* Then, push to 0 the reset pin long enough to reset the *
4039 * device same as above for the reset line, but not the same
4040 * value sent to the GPIO-connected stuff
4041 * which one is the good one? */
4042 gpio_inout(0xffffff,(1<<2));
4043 gpio_write(0);
4044 udelay(10);
4045 gpio_write(1<<2);
4046
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004047 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004048 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4049 if (tmp != -1) {
Joe Perches8af443e2011-08-21 19:56:48 -03004050 pr_info("I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004051 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4052 }
4053 }
4054
Joe Perches8af443e2011-08-21 19:56:48 -03004055 pr_info("PXC200 Initialised\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004056}
4057
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004058
4059
Peter Skipworth93b43f12005-06-23 22:04:45 -07004060/* ----------------------------------------------------------------------- */
4061/*
4062 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
4063 * it. This apparently involves the following procedure for each 878 chip:
4064 *
4065 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
4066 *
4067 * 2) write to GPIO_DATA
4068 * - 0x0E
4069 * - sleep 1ms
4070 * - 0x10 + 0x0E
4071 * - sleep 10ms
4072 * - 0x0E
4073 * read from GPIO_DATA into buf (uint_32)
4074 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
4075 * error. ERROR_CPLD_Check_Failed stop.
4076 *
4077 * 3) write to GPIO_DATA
4078 * - write 0x4400 + 0x0E
4079 * - sleep 10ms
4080 * - write 0x4410 + 0x0E
4081 * - sleep 1ms
4082 * - write 0x0E
4083 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03004084 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07004085 * error. ERROR_CPLD_Check_Failed.
4086 */
4087/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08004088static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004089init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07004090{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004091 uint32_t dataRead = 0;
4092 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07004093
Joe Perches8af443e2011-08-21 19:56:48 -03004094 pr_info("%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07004095 btv->c.nr);
4096
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004097 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004098
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004099 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
4100 msleep (1);
4101 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
4102 msleep (10);
4103 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004104
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004105 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004106
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004107 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004108 pr_info("%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004109 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004110 }
4111
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004112 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
4113 msleep (10);
4114 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
4115 msleep (1);
4116 btwrite (watchdog_value, BT848_GPIO_DATA);
4117 msleep (1);
4118 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004119
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004120 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004121 pr_info("%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004122 btv->c.nr, dataRead);
4123
Peter Skipworth93b43f12005-06-23 22:04:45 -07004124 return;
4125 }
4126
Joe Perches8af443e2011-08-21 19:56:48 -03004127 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07004128}
Linus Torvalds1da177e2005-04-16 15:20:36 -07004129
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07004130
4131
Linus Torvalds1da177e2005-04-16 15:20:36 -07004132/* ----------------------------------------------------------------------- */
4133/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
4134/*
4135 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
4136 * This code is placed under the terms of the GNU General Public License
4137 *
4138 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
4139 */
4140
4141static void bus_low(struct bttv *btv, int bit)
4142{
4143 if (btv->mbox_ior) {
4144 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4145 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4146 udelay(5);
4147 }
4148
4149 gpio_bits(bit,0);
4150 udelay(5);
4151
4152 if (btv->mbox_ior) {
4153 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4154 udelay(5);
4155 }
4156}
4157
4158static void bus_high(struct bttv *btv, int bit)
4159{
4160 if (btv->mbox_ior) {
4161 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4162 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4163 udelay(5);
4164 }
4165
4166 gpio_bits(bit,bit);
4167 udelay(5);
4168
4169 if (btv->mbox_ior) {
4170 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4171 udelay(5);
4172 }
4173}
4174
4175static int bus_in(struct bttv *btv, int bit)
4176{
4177 if (btv->mbox_ior) {
4178 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4179 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4180 udelay(5);
4181
4182 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4183 udelay(5);
4184 }
4185 return gpio_read() & (bit);
4186}
4187
4188/* TEA5757 register bits */
4189#define TEA_FREQ 0:14
4190#define TEA_BUFFER 15:15
4191
4192#define TEA_SIGNAL_STRENGTH 16:17
4193
4194#define TEA_PORT1 18:18
4195#define TEA_PORT0 19:19
4196
4197#define TEA_BAND 20:21
4198#define TEA_BAND_FM 0
4199#define TEA_BAND_MW 1
4200#define TEA_BAND_LW 2
4201#define TEA_BAND_SW 3
4202
4203#define TEA_MONO 22:22
4204#define TEA_ALLOW_STEREO 0
4205#define TEA_FORCE_MONO 1
4206
4207#define TEA_SEARCH_DIRECTION 23:23
4208#define TEA_SEARCH_DOWN 0
4209#define TEA_SEARCH_UP 1
4210
4211#define TEA_STATUS 24:24
4212#define TEA_STATUS_TUNED 0
4213#define TEA_STATUS_SEARCHING 1
4214
4215/* Low-level stuff */
4216static int tea5757_read(struct bttv *btv)
4217{
4218 unsigned long timeout;
4219 int value = 0;
4220 int i;
4221
4222 /* better safe than sorry */
4223 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4224
4225 if (btv->mbox_ior) {
4226 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4227 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4228 udelay(5);
4229 }
4230
4231 if (bttv_gpio)
4232 bttv_gpio_tracking(btv,"tea5757 read");
4233
4234 bus_low(btv,btv->mbox_we);
4235 bus_low(btv,btv->mbox_clk);
4236
4237 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004238 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004239
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004240 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004241 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4242 schedule();
4243 if (bus_in(btv,btv->mbox_data)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004244 pr_warn("%d: tea5757: read timeout\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004245 return -1;
4246 }
4247
Joe Perches8af443e2011-08-21 19:56:48 -03004248 dprintk("%d: tea5757:", btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004249 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004250 udelay(5);
4251 bus_high(btv,btv->mbox_clk);
4252 udelay(5);
Joe Perches8af443e2011-08-21 19:56:48 -03004253 dprintk_cont("%c",
4254 bus_in(btv, btv->mbox_most) == 0 ? 'T' : '-');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004255 bus_low(btv,btv->mbox_clk);
4256 value <<= 1;
4257 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
Joe Perches8af443e2011-08-21 19:56:48 -03004258 dprintk_cont("%c",
4259 bus_in(btv, btv->mbox_most) == 0 ? 'S' : 'M');
Linus Torvalds1da177e2005-04-16 15:20:36 -07004260 }
Joe Perches8af443e2011-08-21 19:56:48 -03004261 dprintk_cont("\n");
4262 dprintk("%d: tea5757: read 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004263 return value;
4264}
4265
4266static int tea5757_write(struct bttv *btv, int value)
4267{
4268 int i;
4269 int reg = value;
4270
4271 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4272
4273 if (btv->mbox_ior) {
4274 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4275 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4276 udelay(5);
4277 }
4278 if (bttv_gpio)
4279 bttv_gpio_tracking(btv,"tea5757 write");
4280
Joe Perches8af443e2011-08-21 19:56:48 -03004281 dprintk("%d: tea5757: write 0x%X\n", btv->c.nr, value);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004282 bus_low(btv,btv->mbox_clk);
4283 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004284 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004285 if (reg & 0x1000000)
4286 bus_high(btv,btv->mbox_data);
4287 else
4288 bus_low(btv,btv->mbox_data);
4289 reg <<= 1;
4290 bus_high(btv,btv->mbox_clk);
4291 udelay(10);
4292 bus_low(btv,btv->mbox_clk);
4293 udelay(10);
4294 }
4295 bus_low(btv,btv->mbox_we); /* unmute !!! */
4296 return 0;
4297}
4298
4299void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4300{
4301 dprintk("tea5757_set_freq %d\n",freq);
4302 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004303}
4304
Linus Torvalds1da177e2005-04-16 15:20:36 -07004305/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4306 *
4307 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4308 * switch instead (CD22M3494E). This IC can have multiple active connections
4309 * between Xn (input) and Yn (output) pins. We need to clear any existing
4310 * connection prior to establish a new one, pulsing the STROBE pin.
4311 *
4312 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4313 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004314 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4315 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4316 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4317 * GPIO[8] - - P3[5] (microcontroller)
4318 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4319 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4320 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004321 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004322 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4323 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004324 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004325 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004326 * note: the vendor refused to give any information on this product, all
4327 * that stuff was found using a multimeter! :)
4328 */
4329static void rv605_muxsel(struct bttv *btv, unsigned int input)
4330{
Trent Piepho13afaef2009-01-28 21:32:59 -03004331 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4332 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4333
4334 gpio_bits(0x07f, muxgpio[input]);
4335
Linus Torvalds1da177e2005-04-16 15:20:36 -07004336 /* reset all conections */
4337 gpio_bits(0x200,0x200);
4338 mdelay(1);
4339 gpio_bits(0x200,0x000);
4340 mdelay(1);
4341
Joe Perchesc84e6032008-02-03 17:18:59 +02004342 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004343 gpio_bits(0x480,0x480);
4344 mdelay(1);
4345 gpio_bits(0x480,0x080);
4346 mdelay(1);
4347}
4348
4349/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4350 *
4351 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004352 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync separator
Linus Torvalds1da177e2005-04-16 15:20:36 -07004353 * chips, ten eight input analog multiplexors, a not chip and a few
4354 * other components.
4355 *
4356 * 16 inputs on a secondary bracket are provided and can be selected
4357 * from each of the four capture chips. Two of the eight input
4358 * multiplexors are used to select from any of the 16 input signals.
4359 *
4360 * Unsupported hardware capabilities:
4361 * . A video output monitor on the secondary bracket can be selected from
4362 * one of the 878A chips.
4363 * . Another passthrough but I haven't spent any time investigating it.
4364 * . Digital I/O (logic level connected to GPIO) is available from an
4365 * onboard header.
4366 *
4367 * The on chip input mux should always be set to 2.
4368 * GPIO[16:19] - Video input selection
4369 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4370 * GPIO[?:?] - Digital I/O.
4371 *
4372 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4373 * determined what function (if any) it provides. With the microcontroller
Daniel Mack3ad2f3f2010-02-03 08:01:28 +08004374 * and sync separator chips a guess is that it might have to do with video
Linus Torvalds1da177e2005-04-16 15:20:36 -07004375 * switching and maybe some digital I/O.
4376 */
4377static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4378{
4379 /* video mux */
4380 gpio_bits(0x0f0000, input << 16);
4381}
4382
4383static void tibetCS16_init(struct bttv *btv)
4384{
4385 /* enable gpio bits, mask obtained via btSpy */
4386 gpio_inout(0xffffff, 0x0f7fff);
4387 gpio_write(0x0f7fff);
4388}
4389
4390/*
4391 * The following routines for the Kodicom-4400r get a little mind-twisting.
4392 * There is a "master" controller and three "slave" controllers, together
4393 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4394 * The analog switch is controlled by the "master", but the detection order
4395 * of the four BT878A chips is in an order which I just don't understand.
4396 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004397 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004398 * those numbers are different from the detection sequence. When working
4399 * with the analog switch, we need to "map" from the detection sequence
4400 * over to the board's logical controller number. This mapping sequence
4401 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4402 * unit 3, the second (which is the master) is logical unit 0, etc.
4403 * We need to maintain the status of the analog switch (which of the 16
4404 * cameras is connected to which of the 4 controllers). Rather than
4405 * add to the bttv structure for this, we use the data reserved for
4406 * the mbox (unused for this card type).
4407 */
4408
4409/*
4410 * First a routine to set the analog switch, which controls which camera
4411 * is routed to which controller. The switch comprises an X-address
4412 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4413 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4414 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4415 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4416 * specified address. The idea is to set the address and data, then bring
4417 * STROBE high, and finally bring STROBE back to low.
4418 */
4419static void kodicom4400r_write(struct bttv *btv,
4420 unsigned char xaddr,
4421 unsigned char yaddr,
4422 unsigned char data) {
4423 unsigned int udata;
4424
4425 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4426 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4427 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4428 gpio_bits(0x1ff, udata); /* strobe low */
4429}
4430
4431/*
4432 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4433 * use this routine. The routine finds the "master" for the card, maps
4434 * the controller number from the detected position over to the logical
4435 * number, writes the appropriate data to the analog switch, and housekeeps
4436 * the local copy of the switch information. The parameter 'input' is the
4437 * requested camera number (0 - 15).
4438 */
4439static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4440{
4441 char *sw_status;
4442 int xaddr, yaddr;
4443 struct bttv *mctlr;
4444 static unsigned char map[4] = {3, 0, 2, 1};
4445
4446 mctlr = master[btv->c.nr];
4447 if (mctlr == NULL) { /* ignore if master not yet detected */
4448 return;
4449 }
4450 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4451 yaddr = map[yaddr];
4452 sw_status = (char *)(&mctlr->mbox_we);
4453 xaddr = input & 0xf;
4454 /* Check if the controller/camera pair has changed, else ignore */
4455 if (sw_status[yaddr] != xaddr)
4456 {
4457 /* "open" the old switch, "close" the new one, save the new */
4458 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4459 sw_status[yaddr] = xaddr;
4460 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4461 }
4462}
4463
4464/*
4465 * During initialisation, we need to reset the analog switch. We
4466 * also preset the switch to map the 4 connectors on the card to the
4467 * *user's* (see above description of kodicom4400r_muxsel) channels
4468 * 0 through 3
4469 */
4470static void kodicom4400r_init(struct bttv *btv)
4471{
4472 char *sw_status = (char *)(&btv->mbox_we);
4473 int ix;
4474
4475 gpio_inout(0x0003ff, 0x0003ff);
4476 gpio_write(1 << 9); /* reset MUX */
4477 gpio_write(0);
4478 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004479 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004480 sw_status[ix] = ix;
4481 kodicom4400r_write(btv, ix, ix, 1);
4482 }
4483 /*
4484 * Since this is the "master", we need to set up the
4485 * other three controller chips' pointers to this structure
4486 * for later use in the muxsel routine.
4487 */
4488 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4489 return;
4490 master[btv->c.nr-1] = btv;
4491 master[btv->c.nr] = btv;
4492 master[btv->c.nr+1] = btv;
4493 master[btv->c.nr+2] = btv;
4494}
4495
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004496/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4497 * video multiplexers to provide up to 16 video inputs. These
4498 * multiplexers are controlled by the lower 8 GPIO pins of the
4499 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004500
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004501 * xxx0 is pin xxx of multiplexer U5,
4502 * yyy1 is pin yyy of multiplexer U2
4503 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004504#define ENA0 0x01
4505#define ENB0 0x02
4506#define ENA1 0x04
4507#define ENB1 0x08
4508
4509#define IN10 0x10
4510#define IN00 0x20
4511#define IN11 0x40
4512#define IN01 0x80
4513
4514static void xguard_muxsel(struct bttv *btv, unsigned int input)
4515{
4516 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004517 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4518 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4519 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4520 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004521 };
4522 gpio_write(masks[input%16]);
4523}
4524static void picolo_tetra_init(struct bttv *btv)
4525{
4526 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4527 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4528 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4529}
4530static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4531{
4532
Joe Perches8af443e2011-08-21 19:56:48 -03004533 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004534 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4535 /*GPIO[20]&GPIO[21] used to choose the right input*/
4536 btwrite (input<<20,BT848_GPIO_DATA);
4537
4538}
4539
4540/*
4541 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4542 *
4543 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4544 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004545 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004546 * optional "Monitor Out" bus. This allows the card to be looking
4547 * at one input while the monitor is looking at another.
4548 *
4549 * Since I've couldn't be bothered figuring out how to add an
Lucas De Marchi25985ed2011-03-30 22:57:33 -03004550 * independent muxsel for the monitor bus, I've just set it to
Linus Torvalds1da177e2005-04-16 15:20:36 -07004551 * whatever the card is looking at.
4552 *
4553 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4554 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4555 *
4556 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4557 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4558 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4559 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4560 *
4561 */
4562
4563/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4564#define I2C_TDA8540 0x90
4565#define I2C_TDA8540_ALT1 0x92
4566#define I2C_TDA8540_ALT2 0x94
4567#define I2C_TDA8540_ALT3 0x96
4568#define I2C_TDA8540_ALT4 0x98
4569#define I2C_TDA8540_ALT5 0x9a
4570#define I2C_TDA8540_ALT6 0x9c
4571
4572static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4573{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004574 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004575 int key = input % 4;
4576 int matrix = input / 4;
4577
Joe Perches8af443e2011-08-21 19:56:48 -03004578 dprintk("%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07004579 btv->c.nr, input, matrix, key);
4580
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004581 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004582 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4583 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4584 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4585 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4586 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4587 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4588 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4589 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4590
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004591 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004592 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004593 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004594 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004595 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004596 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004597 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004598 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004599 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004600
Trent Piephofb5deb12009-01-28 21:32:59 -03004601 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004602}
4603
4604
4605/* PXC200 muxsel helper
4606 * luke@syseng.anu.edu.au
4607 * another transplant
4608 * from Alessandro Rubini (rubini@linux.it)
4609 *
4610 * There are 4 kinds of cards:
4611 * PXC200L which is bt848
4612 * PXC200F which is bt848 with PIC controlling mux
4613 * PXC200AL which is bt878
4614 * PXC200AF which is bt878 with PIC controlling mux
4615 */
4616#define PX_CFG_PXC200F 0x01
4617#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4618#define PX_I2C_PIC 0x0f
4619#define PX_PXC200A_CARDID 0x200a1295
4620#define PX_I2C_CMD_CFG 0x00
4621
4622static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4623{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004624 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004625 long mux;
4626 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004627 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004628
4629 /* Read PIC config to determine if this is a PXC200F */
4630 /* PX_I2C_CMD_CFG*/
4631 buf[0]=0;
4632 buf[1]=0;
4633 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4634 if (rc) {
Joe Perches8af443e2011-08-21 19:56:48 -03004635 pr_debug("%d: PXC200_muxsel: pic cfg write failed:%d\n",
4636 btv->c.nr, rc);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004637 /* not PXC ? do nothing */
Joe Perches8af443e2011-08-21 19:56:48 -03004638 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004639 }
4640
4641 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4642 if (!(rc & PX_CFG_PXC200F)) {
Joe Perches8af443e2011-08-21 19:56:48 -03004643 pr_debug("%d: PXC200_muxsel: not PXC200F rc:%d\n",
4644 btv->c.nr, rc);
4645 return;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004646 }
4647
4648
4649 /* The multiplexer in the 200F is handled by the GPIO port */
4650 /* get correct mapping between inputs */
4651 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4652 /* ** not needed!? */
4653 mux = input;
4654
4655 /* make sure output pins are enabled */
4656 /* bitmask=0x30f; */
4657 bitmask=0x302;
4658 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004659 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004660 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4661 bitmask |= 7<<4; /* the DAC */
4662 }
4663 btwrite(bitmask, BT848_GPIO_OUT_EN);
4664
4665 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004666 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004667 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4668 else /* older device */
4669 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4670 btwrite(bitmask,BT848_GPIO_DATA);
4671
4672 /*
4673 * Was "to be safe, set the bt848 to input 0"
4674 * Actually, since it's ok at load time, better not messing
4675 * with these bits (on PXC200AF you need to set mux 2 here)
4676 *
4677 * needed because bttv-driver sets mux before calling this function
4678 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004679 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004680 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4681 else /* older device */
4682 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4683
Joe Perches8af443e2011-08-21 19:56:48 -03004684 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004685}
4686
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004687static void phytec_muxsel(struct bttv *btv, unsigned int input)
4688{
4689 unsigned int mux = input % 4;
4690
4691 if (input == btv->svhs)
4692 mux = 0;
4693
4694 gpio_bits(0x3, mux);
4695}
4696
Bruno Christo0c5db422009-03-02 22:38:59 -03004697/*
4698 * GeoVision GV-800(S) functions
4699 * Bruno Christo <bchristo@inf.ufsm.br>
4700*/
4701
4702/* This is a function to control the analog switch, which determines which
4703 * camera is routed to which controller. The switch comprises an X-address
4704 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4705 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4706 * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
4707 * the switch. A STROBE bit (gpio bit 17) latches the data value into the
4708 * specified address. There is also a chip select (gpio bit 16).
4709 * The idea is to set the address and chip select together, bring
4710 * STROBE high, write the data, and finally bring STROBE back to low.
4711 */
4712static void gv800s_write(struct bttv *btv,
4713 unsigned char xaddr,
4714 unsigned char yaddr,
4715 unsigned char data) {
4716 /* On the "master" 878A:
4717 * GPIO bits 0-9 are used for the analog switch:
4718 * 00 - 03: camera selector
4719 * 04 - 06: 878A (controller) selector
4720 * 16: cselect
4721 * 17: strobe
4722 * 18: data (1->on, 0->off)
4723 * 19: reset
4724 */
4725 const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
4726 const u32 CSELECT = 1<<16;
4727 const u32 STROBE = 1<<17;
4728 const u32 DATA = data<<18;
4729
4730 gpio_bits(0x1007f, ADDRESS | CSELECT); /* write ADDRESS and CSELECT */
4731 gpio_bits(0x20000, STROBE); /* STROBE high */
4732 gpio_bits(0x40000, DATA); /* write DATA */
4733 gpio_bits(0x20000, ~STROBE); /* STROBE low */
4734}
4735
4736/*
4737 * GeoVision GV-800(S) muxsel
4738 *
4739 * Each of the 4 cards (controllers) use this function.
4740 * The controller using this function selects the input through the GPIO pins
4741 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4742 *
4743 * The parameter 'input' is the requested camera number (0-4) on the controller.
4744 * The map array has the address of each input. Note that the addresses in the
4745 * array are in the sequence the original GeoVision driver uses, that is, set
4746 * every controller to input 0, then to input 1, 2, 3, repeat. This means that
4747 * the physical "camera 1" connector corresponds to controller 0 input 0,
4748 * "camera 2" corresponds to controller 1 input 0, and so on.
4749 *
4750 * After getting the input address, the function then writes the appropriate
4751 * data to the analog switch, and housekeeps the local copy of the switch
4752 * information.
4753 */
4754static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4755{
4756 struct bttv *mctlr;
4757 char *sw_status;
4758 int xaddr, yaddr;
4759 static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
4760 { 0x1, 0x5, 0xb, 0x7 },
4761 { 0x2, 0x8, 0xc, 0xe },
4762 { 0x3, 0x9, 0xd, 0xf } };
4763 input = input%4;
4764 mctlr = master[btv->c.nr];
4765 if (mctlr == NULL) {
4766 /* do nothing until the "master" is detected */
4767 return;
4768 }
4769 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4770 sw_status = (char *)(&mctlr->mbox_we);
4771 xaddr = map[yaddr][input] & 0xf;
4772
4773 /* Check if the controller/camera pair has changed, ignore otherwise */
4774 if (sw_status[yaddr] != xaddr) {
4775 /* disable the old switch, enable the new one and save status */
4776 gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
4777 sw_status[yaddr] = xaddr;
4778 gv800s_write(mctlr, xaddr, yaddr, 1);
4779 }
4780}
4781
4782/* GeoVision GV-800(S) "master" chip init */
4783static void gv800s_init(struct bttv *btv)
4784{
4785 char *sw_status = (char *)(&btv->mbox_we);
4786 int ix;
4787
4788 gpio_inout(0xf107f, 0xf107f);
4789 gpio_write(1<<19); /* reset the analog MUX */
4790 gpio_write(0);
4791
4792 /* Preset camera 0 to the 4 controllers */
4793 for (ix = 0; ix < 4; ix++) {
4794 sw_status[ix] = ix;
4795 gv800s_write(btv, ix, ix, 1);
4796 }
4797
4798 /* Inputs on the "master" controller need this brightness fix */
4799 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4800
4801 if (btv->c.nr > BTTV_MAX-4)
4802 return;
4803 /*
4804 * Store the "master" controller pointer in the master
4805 * array for later use in the muxsel function.
4806 */
4807 master[btv->c.nr] = btv;
4808 master[btv->c.nr+1] = btv;
4809 master[btv->c.nr+2] = btv;
4810 master[btv->c.nr+3] = btv;
4811}
4812
Linus Torvalds1da177e2005-04-16 15:20:36 -07004813/* ----------------------------------------------------------------------- */
4814/* motherboard chipset specific stuff */
4815
Adrian Bunk7d44e892007-12-11 19:23:43 -03004816void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004817{
4818 int pcipci_fail = 0;
4819 struct pci_dev *dev = NULL;
4820
Alan Cox3d265c92006-09-14 11:53:16 -03004821 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004822 pcipci_fail = 1;
4823 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4824 triton1 = 1;
4825 if (pci_pci_problems & PCIPCI_VSFX)
4826 vsfx = 1;
4827#ifdef PCIPCI_ALIMAGIK
4828 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4829 latency = 0x0A;
4830#endif
4831
Linus Torvalds1da177e2005-04-16 15:20:36 -07004832
4833 /* print warnings about any quirks found */
4834 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004835 pr_info("Host bridge needs ETBF enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004836 if (vsfx)
Joe Perches8af443e2011-08-21 19:56:48 -03004837 pr_info("Host bridge needs VSFX enabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004838 if (pcipci_fail) {
Joe Perches8af443e2011-08-21 19:56:48 -03004839 pr_info("bttv and your chipset may not work together\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004840 if (!no_overlay) {
Joe Perches8af443e2011-08-21 19:56:48 -03004841 pr_info("overlay will be disabled\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004842 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004843 } else {
Joe Perches8af443e2011-08-21 19:56:48 -03004844 pr_info("overlay forced. Use this option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004845 }
4846 }
4847 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004848 pr_info("pci latency fixup [%d]\n", latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004849 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004850 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004851 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004852 pci_read_config_byte(dev, 0x53, &b);
4853 if (bttv_debug)
Joe Perches8af443e2011-08-21 19:56:48 -03004854 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",
4855 b);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004856 }
4857}
4858
Greg Kroah-Hartman4c62e972012-12-21 13:17:53 -08004859int bttv_handle_chipset(struct bttv *btv)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004860{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004861 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004862
4863 if (!triton1 && !vsfx && UNSET == latency)
4864 return 0;
4865
4866 if (bttv_verbose) {
4867 if (triton1)
Joe Perches8af443e2011-08-21 19:56:48 -03004868 pr_info("%d: enabling ETBF (430FX/VP3 compatibility)\n",
4869 btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004870 if (vsfx && btv->id >= 878)
Joe Perches8af443e2011-08-21 19:56:48 -03004871 pr_info("%d: enabling VSFX\n", btv->c.nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004872 if (UNSET != latency)
Joe Perches8af443e2011-08-21 19:56:48 -03004873 pr_info("%d: setting pci timer to %d\n",
4874 btv->c.nr, latency);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004875 }
4876
4877 if (btv->id < 878) {
4878 /* bt848 (mis)uses a bit in the irq mask for etbf */
4879 if (triton1)
4880 btv->triton1 = BT848_INT_ETBF;
4881 } else {
4882 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004883 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004884 if (triton1)
4885 command |= BT878_EN_TBFX;
4886 if (vsfx)
4887 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004888 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4889 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004890 if (UNSET != latency)
4891 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4892 return 0;
4893}
4894
4895
4896/*
4897 * Local variables:
4898 * c-basic-offset: 8
4899 * End:
4900 */