blob: fd1ab7a15cd43980bedc66b62b6abcaa72a07862 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002
3 bttv-cards.c
4
5 this file has configuration informations - card-specific stuff
6 like the big tvcards array for the most part
7
8 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08009 & Marcus Metzler (mocm@thp.uni-koeln.de)
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
11
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
16
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
26*/
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#include <linux/delay.h>
29#include <linux/module.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#include <linux/kmod.h>
31#include <linux/init.h>
32#include <linux/pci.h>
33#include <linux/vmalloc.h>
34#include <linux/firmware.h>
Trent Piephocf784d52007-07-21 21:26:40 -030035#include <net/checksum.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Al Viroc1c36f32008-05-21 00:32:21 -030037#include <asm/unaligned.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070038#include <asm/io.h>
39
40#include "bttvp.h"
Michael Krufky5e453dc2006-01-09 15:32:31 -020041#include <media/v4l2-common.h>
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -030042#include <media/tvaudio.h>
Mauro Carvalho Chehabc2806d02007-10-26 16:54:54 -030043#include "bttv-audio-hook.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45/* fwd decl */
46static void boot_msp34xx(struct bttv *btv, int pin);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047static void hauppauge_eeprom(struct bttv *btv);
48static void avermedia_eeprom(struct bttv *btv);
Trent Piephocf784d52007-07-21 21:26:40 -030049static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050static void modtec_eeprom(struct bttv *btv);
51static void init_PXC200(struct bttv *btv);
Peter Skipworth93b43f12005-06-23 22:04:45 -070052static void init_RTV24(struct bttv *btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
Linus Torvalds1da177e2005-04-16 15:20:36 -070054static void rv605_muxsel(struct bttv *btv, unsigned int input);
55static void eagle_muxsel(struct bttv *btv, unsigned int input);
56static void xguard_muxsel(struct bttv *btv, unsigned int input);
57static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
59
60static void PXC200_muxsel(struct bttv *btv, unsigned int input);
61
62static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63static void picolo_tetra_init(struct bttv *btv);
64
65static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66static void tibetCS16_init(struct bttv *btv);
67
68static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69static void kodicom4400r_init(struct bttv *btv);
70
71static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
73
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -030074static void geovision_muxsel(struct bttv *btv, unsigned int input);
75
Trent Piepho15f8eeb2009-01-28 21:32:59 -030076static void phytec_muxsel(struct bttv *btv, unsigned int input);
77
Linus Torvalds1da177e2005-04-16 15:20:36 -070078static int terratec_active_radio_upgrade(struct bttv *btv);
79static int tea5757_read(struct bttv *btv);
80static int tea5757_write(struct bttv *btv, int value);
81static void identify_by_eeprom(struct bttv *btv,
82 unsigned char eeprom_data[256]);
83static int __devinit pvr_boot(struct bttv *btv);
84
85/* config variables */
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -020086static unsigned int triton1;
87static unsigned int vsfx;
Linus Torvalds1da177e2005-04-16 15:20:36 -070088static unsigned int latency = UNSET;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -070089int no_overlay=-1;
Linus Torvalds1da177e2005-04-16 15:20:36 -070090
91static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
92static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
93static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
94static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
95static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
96static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
97#ifdef MODULE
98static unsigned int autoload = 1;
99#else
Mauro Carvalho Chehaba5ed4252006-01-13 14:10:19 -0200100static unsigned int autoload;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101#endif
102static unsigned int gpiomask = UNSET;
103static unsigned int audioall = UNSET;
104static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
105
106/* insmod options */
107module_param(triton1, int, 0444);
108module_param(vsfx, int, 0444);
109module_param(no_overlay, int, 0444);
110module_param(latency, int, 0444);
111module_param(gpiomask, int, 0444);
112module_param(audioall, int, 0444);
113module_param(autoload, int, 0444);
114
115module_param_array(card, int, NULL, 0444);
116module_param_array(pll, int, NULL, 0444);
117module_param_array(tuner, int, NULL, 0444);
118module_param_array(svhs, int, NULL, 0444);
119module_param_array(remote, int, NULL, 0444);
120module_param_array(audiomux, int, NULL, 0444);
121
122MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
123 "[enable bug compatibility for triton1 + others]");
124MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
125 "[yet another chipset flaw workaround]");
126MODULE_PARM_DESC(latency,"pci latency timer");
127MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
128MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
129MODULE_PARM_DESC(tuner,"specify installed tuner type");
130MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -0300131MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
132 " [some VIA/SIS chipsets are known to have problem with overlay]");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700133
134/* ----------------------------------------------------------------------- */
135/* list of card IDs for bt878+ cards */
136
137static struct CARD {
138 unsigned id;
139 int cardnr;
140 char *name;
141} cards[] __devinitdata = {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800142 { 0x13eb0070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV" },
143 { 0x39000070, BTTV_BOARD_HAUPPAUGE878, "Hauppauge WinTV-D" },
144 { 0x45000070, BTTV_BOARD_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
145 { 0xff000070, BTTV_BOARD_OSPREY1x0, "Osprey-100" },
146 { 0xff010070, BTTV_BOARD_OSPREY2x0_SVID,"Osprey-200" },
147 { 0xff020070, BTTV_BOARD_OSPREY500, "Osprey-500" },
148 { 0xff030070, BTTV_BOARD_OSPREY2000, "Osprey-2000" },
149 { 0xff040070, BTTV_BOARD_OSPREY540, "Osprey-540" },
Kenth Anderssonf718e6e2005-11-08 21:37:02 -0800150 { 0xff070070, BTTV_BOARD_OSPREY440, "Osprey-440" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800152 { 0x00011002, BTTV_BOARD_ATI_TVWONDER, "ATI TV Wonder" },
153 { 0x00031002, BTTV_BOARD_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700154
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800155 { 0x6606107d, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
156 { 0x6607107d, BTTV_BOARD_WINFASTVC100, "Leadtek WinFast VC 100" },
157 { 0x6609107d, BTTV_BOARD_WINFAST2000, "Leadtek TV 2000 XP" },
158 { 0x263610b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
159 { 0x264510b4, BTTV_BOARD_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800160 { 0x402010fc, BTTV_BOARD_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800161 { 0x405010fc, BTTV_BOARD_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
162 { 0x407010fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800163 { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800165 { 0x001211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700166 /* some cards ship with byteswapped IDs ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800167 { 0x1200bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
168 { 0xff00bd11, BTTV_BOARD_PINNACLE, "Pinnacle PCTV [bswap]" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700169 /* this seems to happen as well ... */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800170 { 0xff1211bd, BTTV_BOARD_PINNACLE, "Pinnacle PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700171
Wade Berrier434b2522007-06-25 13:02:16 -0300172 { 0x3000121a, BTTV_BOARD_VOODOOTV_200, "3Dfx VoodooTV 200" },
173 { 0x263710b4, BTTV_BOARD_VOODOOTV_FM, "3Dfx VoodooTV FM" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800174 { 0x3060121a, BTTV_BOARD_STB2, "3Dfx VoodooTV 100/ STB OEM" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700175
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800176 { 0x3000144f, BTTV_BOARD_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
177 { 0xa005144f, BTTV_BOARD_MAGICTVIEW063, "CPH06X TView99-Card" },
178 { 0x3002144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
179 { 0x3005144f, BTTV_BOARD_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
180 { 0x5000144f, BTTV_BOARD_MAGICTVIEW061, "Askey CPH050" },
181 { 0x300014ff, BTTV_BOARD_MAGICTVIEW061, "TView 99 (CPH061)" },
182 { 0x300214ff, BTTV_BOARD_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700183
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800184 { 0x00011461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
185 { 0x00021461, BTTV_BOARD_AVERMEDIA98, "AVermedia TVCapture 98" },
186 { 0x00031461, BTTV_BOARD_AVPHONE98, "AVerMedia TVPhone98" },
187 { 0x00041461, BTTV_BOARD_AVERMEDIA98, "AVerMedia TVCapture 98" },
188 { 0x03001461, BTTV_BOARD_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800190 { 0x1117153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
191 { 0x1118153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
192 { 0x1119153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
193 { 0x111a153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800195 { 0x1123153b, BTTV_BOARD_TERRATVRADIO, "Terratec TV Radio+" },
196 { 0x1127153b, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.05)" },
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700197 /* clashes with FlyVideo
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800198 *{ 0x18521852, BTTV_BOARD_TERRATV, "Terratec TV+ (V1.10)" }, */
199 { 0x1134153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue (LR102)" },
200 { 0x1135153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* LR102 */
201 { 0x5018153b, BTTV_BOARD_TERRATVALUE, "Terratec TValue" }, /* ?? */
202 { 0xff3b153b, BTTV_BOARD_TERRATVALUER, "Terratec TValue Radio" }, /* ?? */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800204 { 0x400015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
205 { 0x400a15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
206 { 0x400d15b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
207 { 0x401015b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
208 { 0x401615b0, BTTV_BOARD_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700209
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800210 { 0x1430aa00, BTTV_BOARD_PV143, "Provideo PV143A" },
211 { 0x1431aa00, BTTV_BOARD_PV143, "Provideo PV143B" },
212 { 0x1432aa00, BTTV_BOARD_PV143, "Provideo PV143C" },
213 { 0x1433aa00, BTTV_BOARD_PV143, "Provideo PV143D" },
214 { 0x1433aa03, BTTV_BOARD_PV143, "Security Eyes" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800216 { 0x1460aa00, BTTV_BOARD_PV150, "Provideo PV150A-1" },
217 { 0x1461aa01, BTTV_BOARD_PV150, "Provideo PV150A-2" },
218 { 0x1462aa02, BTTV_BOARD_PV150, "Provideo PV150A-3" },
219 { 0x1463aa03, BTTV_BOARD_PV150, "Provideo PV150A-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700220
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800221 { 0x1464aa04, BTTV_BOARD_PV150, "Provideo PV150B-1" },
222 { 0x1465aa05, BTTV_BOARD_PV150, "Provideo PV150B-2" },
223 { 0x1466aa06, BTTV_BOARD_PV150, "Provideo PV150B-3" },
224 { 0x1467aa07, BTTV_BOARD_PV150, "Provideo PV150B-4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800226 { 0xa132ff00, BTTV_BOARD_IVC100, "IVC-100" },
227 { 0xa1550000, BTTV_BOARD_IVC200, "IVC-200" },
228 { 0xa1550001, BTTV_BOARD_IVC200, "IVC-200" },
229 { 0xa1550002, BTTV_BOARD_IVC200, "IVC-200" },
230 { 0xa1550003, BTTV_BOARD_IVC200, "IVC-200" },
231 { 0xa1550100, BTTV_BOARD_IVC200, "IVC-200G" },
232 { 0xa1550101, BTTV_BOARD_IVC200, "IVC-200G" },
233 { 0xa1550102, BTTV_BOARD_IVC200, "IVC-200G" },
234 { 0xa1550103, BTTV_BOARD_IVC200, "IVC-200G" },
235 { 0xa182ff00, BTTV_BOARD_IVC120, "IVC-120G" },
236 { 0xa182ff01, BTTV_BOARD_IVC120, "IVC-120G" },
237 { 0xa182ff02, BTTV_BOARD_IVC120, "IVC-120G" },
238 { 0xa182ff03, BTTV_BOARD_IVC120, "IVC-120G" },
239 { 0xa182ff04, BTTV_BOARD_IVC120, "IVC-120G" },
240 { 0xa182ff05, BTTV_BOARD_IVC120, "IVC-120G" },
241 { 0xa182ff06, BTTV_BOARD_IVC120, "IVC-120G" },
242 { 0xa182ff07, BTTV_BOARD_IVC120, "IVC-120G" },
243 { 0xa182ff08, BTTV_BOARD_IVC120, "IVC-120G" },
244 { 0xa182ff09, BTTV_BOARD_IVC120, "IVC-120G" },
245 { 0xa182ff0a, BTTV_BOARD_IVC120, "IVC-120G" },
246 { 0xa182ff0b, BTTV_BOARD_IVC120, "IVC-120G" },
247 { 0xa182ff0c, BTTV_BOARD_IVC120, "IVC-120G" },
248 { 0xa182ff0d, BTTV_BOARD_IVC120, "IVC-120G" },
249 { 0xa182ff0e, BTTV_BOARD_IVC120, "IVC-120G" },
250 { 0xa182ff0f, BTTV_BOARD_IVC120, "IVC-120G" },
Douglas Kosovicade08152009-01-22 23:07:26 -0300251 { 0xf0500000, BTTV_BOARD_IVCE8784, "IVCE-8784" },
252 { 0xf0500001, BTTV_BOARD_IVCE8784, "IVCE-8784" },
253 { 0xf0500002, BTTV_BOARD_IVCE8784, "IVCE-8784" },
254 { 0xf0500003, BTTV_BOARD_IVCE8784, "IVCE-8784" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700255
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800256 { 0x41424344, BTTV_BOARD_GRANDTEC, "GrandTec Multi Capture" },
257 { 0x01020304, BTTV_BOARD_XGUARD, "Grandtec Grand X-Guard" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800259 { 0x18501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
260 { 0xa0501851, BTTV_BOARD_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
261 { 0x18511851, BTTV_BOARD_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
262 { 0x18521852, BTTV_BOARD_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
263 { 0x41a0a051, BTTV_BOARD_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
264 { 0x18501f7f, BTTV_BOARD_FLYVIDEO_98, "Lifeview Flyvideo 98" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700265
Trent Piepho657de3c2006-06-20 00:30:57 -0300266 { 0x010115cb, BTTV_BOARD_GMV1, "AG GMV1" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800267 { 0x010114c7, BTTV_BOARD_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700268
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800269 { 0x10b42636, BTTV_BOARD_HAUPPAUGE878, "STB ???" },
270 { 0x217d6606, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
271 { 0xfff6f6ff, BTTV_BOARD_WINFAST2000, "Leadtek WinFast TV 2000" },
272 { 0x03116000, BTTV_BOARD_SENSORAY311, "Sensoray 311" },
273 { 0x00790e11, BTTV_BOARD_WINDVR, "Canopus WinDVR PCI" },
274 { 0xa0fca1a0, BTTV_BOARD_ZOLTRIX, "Face to Face Tvmax" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800275 { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
276 { 0x146caa0c, BTTV_BOARD_PV951, "ituner spectra8" },
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -0800277 { 0x200a1295, BTTV_BOARD_PXC200, "ImageNation PXC200A" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800279 { 0x40111554, BTTV_BOARD_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
280 { 0x17de0a01, BTTV_BOARD_KWORLD, "Mecer TV/FM/Video Tuner" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700281
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800282 { 0x01051805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
283 { 0x01061805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
284 { 0x01071805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
285 { 0x01081805, BTTV_BOARD_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700286
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800287 { 0x15409511, BTTV_BOARD_ACORP_Y878F, "Acorp Y878F" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700288
Scott Alfter1ebba672007-04-02 14:22:39 -0300289 { 0x53534149, BTTV_BOARD_SSAI_SECURITY, "SSAI Security Video Interface" },
290 { 0x5353414a, BTTV_BOARD_SSAI_ULTRASOUND, "SSAI Ultrasound Video Interface" },
291
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700292 /* likely broken, vendor id doesn't match the other magic views ...
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800293 * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700294
Steven Tothcd1257d2006-01-09 15:25:01 -0200295 /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
296 * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */
297
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700298 /* DVB cards (using pci function .1 for mpeg data xfer) */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800299 { 0x001c11bd, BTTV_BOARD_PINNACLESAT, "Pinnacle PCTV Sat" },
Michael Krufky2af35572006-01-23 17:11:06 -0200300 { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
301 { 0x20007063, BTTV_BOARD_PC_HDTV, "pcHDTV HD-2000 TV"},
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800302 { 0x002611bd, BTTV_BOARD_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
303 { 0x00011822, BTTV_BOARD_TWINHAN_DST, "Twinhan VisionPlus DVB" },
304 { 0xfc00270f, BTTV_BOARD_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
305 { 0x07711461, BTTV_BOARD_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
Michael Krufky2af35572006-01-23 17:11:06 -0200306 { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800307 { 0xdb1018ac, BTTV_BOARD_DVICO_DVBT_LITE, "DViCO FusionHDTV DVB-T Lite" },
Michael Krufky19790db2007-01-07 22:12:22 -0300308 { 0xdb1118ac, BTTV_BOARD_DVICO_DVBT_LITE, "Ultraview DVB-T Lite" },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800309 { 0xd50018ac, BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE, "DViCO FusionHDTV 5 Lite" },
Cameron Hutchinson442d15d2006-06-21 18:45:31 -0300310 { 0x00261822, BTTV_BOARD_TWINHAN_DST, "DNTV Live! Mini "},
Michael Krufky27cb7862007-06-28 12:19:20 -0300311 { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2, "DViCO FusionHDTV 2" },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -0300312 { 0x763c008a, BTTV_BOARD_GEOVISION_GV600, "GeoVision GV-600" },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -0300313 { 0x18011000, BTTV_BOARD_ENLTV_FM_2, "Encore ENL TV-FM-2" },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700314 { 0, -1, NULL }
315};
316
317/* ----------------------------------------------------------------------- */
318/* array with description for bt848 / bt878 tv/grabber cards */
319
320struct tvcard bttv_tvcards[] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800321 /* ---- card 0x00 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800322 [BTTV_BOARD_UNKNOWN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800323 .name = " *** UNKNOWN/GENERIC *** ",
324 .video_inputs = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800325 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300326 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300327 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800328 .tuner_addr = ADDR_UNSET,
329 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800330 [BTTV_BOARD_MIRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800331 .name = "MIRO PCTV",
332 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300333 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800334 .svhs = 2,
335 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300336 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300337 .gpiomux = { 2, 0, 0, 0 },
338 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800339 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300340 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800341 .tuner_addr = ADDR_UNSET,
342 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800343 [BTTV_BOARD_HAUPPAUGE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800344 .name = "Hauppauge (bt848)",
345 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300346 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800347 .svhs = 2,
348 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300349 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300350 .gpiomux = { 0, 1, 2, 3 },
351 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800352 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300353 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800354 .tuner_addr = ADDR_UNSET,
355 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800356 [BTTV_BOARD_STB] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800357 .name = "STB, Gateway P/N 6000699 (bt848)",
358 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300359 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800360 .svhs = 2,
361 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300362 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300363 .gpiomux = { 4, 0, 2, 3 },
364 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800365 .no_msp34xx = 1,
366 .needs_tvaudio = 1,
367 .tuner_type = TUNER_PHILIPS_NTSC,
368 .tuner_addr = ADDR_UNSET,
369 .pll = PLL_28,
370 .has_radio = 1,
371 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700372
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800373 /* ---- card 0x04 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800374 [BTTV_BOARD_INTEL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800375 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
376 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300377 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800378 .svhs = 2,
379 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300380 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300381 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800382 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300383 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800384 .tuner_addr = ADDR_UNSET,
385 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800386 [BTTV_BOARD_DIAMOND] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800387 .name = "Diamond DTV2000",
388 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300389 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800390 .svhs = 2,
391 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300392 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300393 .gpiomux = { 0, 1, 0, 1 },
394 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800395 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300396 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800397 .tuner_addr = ADDR_UNSET,
398 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800399 [BTTV_BOARD_AVERMEDIA] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800400 .name = "AVerMedia TVPhone",
401 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300402 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800403 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300404 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800405 .gpiomask = 0x0f,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300406 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800407 /* 0x04 for some cards ?? */
408 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300409 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800410 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300411 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800412 .has_remote = 1,
413 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800414 [BTTV_BOARD_MATRIX_VISION] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800415 .name = "MATRIX-Vision MV-Delta",
416 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300417 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800418 .svhs = 3,
419 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300420 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300421 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800422 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300423 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800424 .tuner_addr = ADDR_UNSET,
425 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700426
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800427 /* ---- card 0x08 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800428 [BTTV_BOARD_FLYVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800429 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
430 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300431 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800432 .svhs = 2,
433 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300434 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300435 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
436 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800437 .needs_tvaudio = 1,
438 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300439 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800440 .tuner_addr = ADDR_UNSET,
441 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800442 [BTTV_BOARD_TURBOTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800443 .name = "IMS/IXmicro TurboTV",
444 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300445 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800446 .svhs = 2,
447 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300448 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300449 .gpiomux = { 1, 1, 2, 3 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800450 .needs_tvaudio = 0,
451 .pll = PLL_28,
452 .tuner_type = TUNER_TEMIC_PAL,
453 .tuner_addr = ADDR_UNSET,
454 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800455 [BTTV_BOARD_HAUPPAUGE878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800456 .name = "Hauppauge (bt878)",
457 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300458 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800459 .svhs = 2,
460 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -0300461 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300462 .gpiomux = { 0, 1, 2, 3 },
463 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800464 .needs_tvaudio = 1,
465 .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_MIROPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800470 .name = "MIRO PCTV pro",
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 = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -0300475 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300476 .gpiomux = { 0x20001,0x10001, 0, 0 },
477 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800478 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300479 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800480 .tuner_addr = ADDR_UNSET,
481 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800483 /* ---- card 0x0c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800484 [BTTV_BOARD_ADSTECH_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800485 .name = "ADS Technologies Channel Surfer TV (bt848)",
486 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300487 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800488 .svhs = 2,
489 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300490 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300491 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800492 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300493 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800494 .tuner_addr = ADDR_UNSET,
495 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800496 [BTTV_BOARD_AVERMEDIA98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800497 .name = "AVerMedia TVCapture 98",
498 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300499 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800500 .svhs = 2,
501 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300502 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300503 .gpiomux = { 13, 14, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800504 .needs_tvaudio = 1,
505 .msp34xx_alt = 1,
506 .pll = PLL_28,
507 .tuner_type = TUNER_PHILIPS_PAL,
508 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300509 .audio_mode_gpio= avermedia_tv_stereo_audio,
Ray Colea8900fc2005-11-08 21:37:43 -0800510 .no_gpioirq = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800511 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800512 [BTTV_BOARD_VHX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800513 .name = "Aimslab Video Highway Xtreme (VHX)",
514 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300515 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800516 .svhs = 2,
517 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300518 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300519 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
520 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800521 .needs_tvaudio = 1,
522 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300523 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800524 .tuner_addr = ADDR_UNSET,
525 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800526 [BTTV_BOARD_ZOLTRIX] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800527 .name = "Zoltrix TV-Max",
528 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300529 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800530 .svhs = 2,
531 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300532 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300533 .gpiomux = { 0, 0, 1, 0 },
534 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800535 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300536 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800537 .tuner_addr = ADDR_UNSET,
538 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700539
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800540 /* ---- card 0x10 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800541 [BTTV_BOARD_PIXVIEWPLAYTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800542 .name = "Prolink Pixelview PlayTV (bt878)",
543 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300544 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800545 .svhs = 2,
546 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300547 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800548 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300549 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
550 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800551 .needs_tvaudio = 1,
552 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300553 .tuner_type = UNSET,
Wojciech Migda27dea3e2008-04-22 14:45:36 -0300554 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800555 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800556 [BTTV_BOARD_WINVIEW_601] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800557 .name = "Leadtek WinView 601",
558 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300559 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800560 .svhs = 2,
561 .gpiomask = 0x8300f8,
Trent Piepho6f987002009-01-28 21:32:59 -0300562 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300563 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
564 .gpiomute = 0xcfa007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800565 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300566 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800567 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300568 .volume_gpio = winview_volume,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800569 .has_radio = 1,
570 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800571 [BTTV_BOARD_AVEC_INTERCAP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800572 .name = "AVEC Intercapture",
573 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300574 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800575 .svhs = 2,
576 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300577 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300578 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800579 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300580 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800581 .tuner_addr = ADDR_UNSET,
582 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800583 [BTTV_BOARD_LIFE_FLYKIT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800584 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
585 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300586 /* .audio_inputs= 1, */
587 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800588 .gpiomask = 0x8dff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300589 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300590 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800591 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300592 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800593 .tuner_addr = ADDR_UNSET,
594 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800596 /* ---- card 0x14 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800597 [BTTV_BOARD_CEI_RAFFLES] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800598 .name = "CEI Raffles Card",
599 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300600 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800601 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300602 .muxsel = MUXSEL(2, 3, 1, 1),
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300603 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800604 .tuner_addr = ADDR_UNSET,
605 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800606 [BTTV_BOARD_CONFERENCETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800607 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
608 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300609 /* .audio_inputs= 2, tuner, line in */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800610 .svhs = 2,
611 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300612 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300613 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
614 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800615 .pll = PLL_28,
616 .tuner_type = TUNER_PHILIPS_PAL_I,
617 .tuner_addr = ADDR_UNSET,
618 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800619 [BTTV_BOARD_PHOEBE_TVMAS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800620 .name = "Askey CPH050/ Phoebe Tv Master + FM",
621 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300622 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800623 .svhs = 2,
624 .gpiomask = 0xc00,
Trent Piepho6f987002009-01-28 21:32:59 -0300625 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300626 .gpiomux = { 0, 1, 0x800, 0x400 },
627 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800628 .needs_tvaudio = 1,
629 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300630 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800631 .tuner_addr = ADDR_UNSET,
632 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800633 [BTTV_BOARD_MODTEC_205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800634 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
635 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300636 /* .audio_inputs= 1, */
637 .svhs = NO_SVHS,
Trent Piepho5221e212009-01-28 21:32:59 -0300638 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800639 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300640 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -0300641 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300642 .gpiomux = { 0, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800643 .no_msp34xx = 1,
644 .pll = PLL_28,
645 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
646 .tuner_addr = ADDR_UNSET,
647 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800649 /* ---- card 0x18 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800650 [BTTV_BOARD_MAGICTVIEW061] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800651 .name = "Askey CPH05X/06X (bt878) [many vendors]",
652 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300653 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800654 .svhs = 2,
655 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -0300656 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300657 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
658 .gpiomute = 0xc00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800659 .needs_tvaudio = 1,
660 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300661 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800662 .tuner_addr = ADDR_UNSET,
663 .has_remote = 1,
664 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800665 [BTTV_BOARD_VOBIS_BOOSTAR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800666 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
667 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300668 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800669 .svhs = 2,
670 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300671 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300672 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
673 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800674 .needs_tvaudio = 0,
675 .tuner_type = TUNER_PHILIPS_PAL,
676 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300677 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800678 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800679 [BTTV_BOARD_HAUPPAUG_WCAM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800680 .name = "Hauppauge WinCam newer (bt878)",
681 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300682 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800683 .svhs = 3,
684 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300685 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300686 .gpiomux = { 0, 1, 2, 3 },
687 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800688 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300689 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800690 .tuner_addr = ADDR_UNSET,
691 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800692 [BTTV_BOARD_MAXI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800693 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
694 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300695 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800696 .svhs = 2,
697 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300698 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300699 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
700 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800701 .pll = PLL_28,
702 .tuner_type = TUNER_PHILIPS_SECAM,
703 .tuner_addr = ADDR_UNSET,
704 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700705
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800706 /* ---- card 0x1c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800707 [BTTV_BOARD_TERRATV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800708 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
709 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300710 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800711 .svhs = 2,
712 .gpiomask = 0x1f0fff,
Trent Piepho6f987002009-01-28 21:32:59 -0300713 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300714 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
715 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800716 .needs_tvaudio = 0,
717 .tuner_type = TUNER_PHILIPS_PAL,
718 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300719 .audio_mode_gpio= terratv_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800720 /* GPIO wiring:
721 External 20 pin connector (for Active Radio Upgrade board)
722 gpio00: i2c-sda
723 gpio01: i2c-scl
724 gpio02: om5610-data
725 gpio03: om5610-clk
726 gpio04: om5610-wre
727 gpio05: om5610-stereo
728 gpio06: rds6588-davn
729 gpio07: Pin 7 n.c.
730 gpio08: nIOW
731 gpio09+10: nIOR, nSEL ?? (bt878)
732 gpio09: nIOR (bt848)
733 gpio10: nSEL (bt848)
734 Sound Routing:
735 gpio16: u2-A0 (1st 4052bt)
736 gpio17: u2-A1
737 gpio18: u2-nEN
738 gpio19: u4-A0 (2nd 4052)
739 gpio20: u4-A1
740 u4-nEN - GND
741 Btspy:
742 00000 : Cdrom (internal audio input)
743 10000 : ext. Video audio input
744 20000 : TV Mono
745 a0000 : TV Mono/2
746 1a0000 : TV Stereo
747 30000 : Radio
748 40000 : Mute
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -0700749 */
Linus Torvalds1da177e2005-04-16 15:20:36 -0700750
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800751 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800752 [BTTV_BOARD_PXC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800753 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
754 .name = "Imagenation PXC200",
755 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -0300756 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800757 .svhs = 1, /* was: 4 */
758 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300759 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300760 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800761 .needs_tvaudio = 1,
Trent Piephoabb03622009-01-28 21:32:59 -0300762 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800763 .tuner_addr = ADDR_UNSET,
764 .muxsel_hook = PXC200_muxsel,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700765
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800766 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800767 [BTTV_BOARD_FLYVIDEO_98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800768 .name = "Lifeview FlyVideo 98 LR50",
769 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300770 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800771 .svhs = 2,
772 .gpiomask = 0x1800, /* 0x8dfe00 */
Trent Piepho6f987002009-01-28 21:32:59 -0300773 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300774 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
775 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800776 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300777 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800778 .tuner_addr = ADDR_UNSET,
779 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800780 [BTTV_BOARD_IPROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800781 .name = "Formac iProTV, Formac ProTV I (bt848)",
782 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300783 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800784 .svhs = 3,
785 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -0300786 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300787 .gpiomux = { 1, 0, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800788 .pll = PLL_28,
789 .tuner_type = TUNER_PHILIPS_PAL,
790 .tuner_addr = ADDR_UNSET,
791 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700792
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800793 /* ---- card 0x20 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800794 [BTTV_BOARD_INTEL_C_S_PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800795 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
796 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300797 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800798 .svhs = 2,
799 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300800 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300801 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800802 .needs_tvaudio = 0,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300803 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800804 .tuner_addr = ADDR_UNSET,
805 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800806 [BTTV_BOARD_TERRATVALUE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800807 .name = "Terratec TerraTValue Version Bt878",
808 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300809 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800810 .svhs = 2,
811 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -0300812 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300813 .gpiomux = { 0x500, 0, 0x300, 0x900 },
814 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800815 .needs_tvaudio = 1,
816 .pll = PLL_28,
817 .tuner_type = TUNER_PHILIPS_PAL,
818 .tuner_addr = ADDR_UNSET,
819 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800820 [BTTV_BOARD_WINFAST2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800821 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
822 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300823 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800824 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -0300825 /* TV, CVid, SVid, CVid over SVid connector */
826 .muxsel = MUXSEL(2, 3, 1, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800827 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
828 .gpiomask = 0xb33000,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300829 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
830 .gpiomute = 0x800000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800831 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
832 gpio23 -- hef4052:nEnable (0x800000)
833 gpio12 -- hef4052:A1
834 gpio13 -- hef4052:A0
835 0x0000: external audio
836 0x1000: FM
837 0x2000: TV
838 0x3000: n.c.
839 Note: There exists another variant "Winfast 2000" with tv stereo !?
840 Note: eeprom only contains FF and pci subsystem id 107d:6606
841 */
842 .needs_tvaudio = 0,
843 .pll = PLL_28,
844 .has_radio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300845 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800846 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300847 .audio_mode_gpio= winfast2000_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800848 .has_remote = 1,
849 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800850 [BTTV_BOARD_CHRONOS_VS2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800851 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
852 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300853 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800854 .svhs = 2,
855 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300856 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300857 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
858 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800859 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300860 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800861 .tuner_addr = ADDR_UNSET,
862 },
Linus Torvalds1da177e2005-04-16 15:20:36 -0700863
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800864 /* ---- card 0x24 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800865 [BTTV_BOARD_TYPHOON_TVIEW] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800866 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
867 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300868 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800869 .svhs = 2,
870 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -0300871 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300872 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
873 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800874 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300875 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800876 .tuner_addr = ADDR_UNSET,
877 .has_radio = 1,
878 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800879 [BTTV_BOARD_PXELVWPLTVPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800880 .name = "Prolink PixelView PlayTV pro",
881 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300882 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800883 .svhs = 2,
884 .gpiomask = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -0300885 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300886 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
887 .gpiomute = 0x29,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800888 .no_msp34xx = 1,
889 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300890 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800891 .tuner_addr = ADDR_UNSET,
892 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800893 [BTTV_BOARD_MAGICTVIEW063] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800894 .name = "Askey CPH06X TView99",
895 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -0300896 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800897 .svhs = 2,
898 .gpiomask = 0x551e00,
Trent Piepho6f987002009-01-28 21:32:59 -0300899 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300900 .gpiomux = { 0x551400, 0x551200, 0, 0 },
901 .gpiomute = 0x551c00,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800902 .needs_tvaudio = 1,
903 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300904 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800905 .tuner_addr = ADDR_UNSET,
906 .has_remote = 1,
907 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800908 [BTTV_BOARD_PINNACLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800909 .name = "Pinnacle PCTV Studio/Rave",
910 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300911 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800912 .svhs = 2,
913 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -0300914 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300915 .gpiomux = { 2, 0xd0001, 0, 0 },
916 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800917 .needs_tvaudio = 0,
918 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300919 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800920 .tuner_addr = ADDR_UNSET,
921 },
922
923 /* ---- card 0x28 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800924 [BTTV_BOARD_STB2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800925 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
926 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300927 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800928 .svhs = 2,
929 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -0300930 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300931 .gpiomux = { 4, 0, 2, 3 },
932 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800933 .no_msp34xx = 1,
934 .needs_tvaudio = 1,
935 .tuner_type = TUNER_PHILIPS_NTSC,
936 .tuner_addr = ADDR_UNSET,
937 .pll = PLL_28,
938 .has_radio = 1,
939 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800940 [BTTV_BOARD_AVPHONE98] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800941 .name = "AVerMedia TVPhone 98",
942 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300943 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800944 .svhs = 2,
945 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -0300946 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300947 .gpiomux = { 13, 4, 11, 7 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800948 .needs_tvaudio = 1,
949 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300950 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800951 .tuner_addr = ADDR_UNSET,
952 .has_radio = 1,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -0300953 .audio_mode_gpio= avermedia_tvphone_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800954 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800955 [BTTV_BOARD_PV951] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800956 .name = "ProVideo PV951", /* pic16c54 */
957 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300958 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800959 .svhs = 2,
960 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -0300961 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300962 .gpiomux = { 0, 0, 0, 0},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800963 .needs_tvaudio = 1,
964 .no_msp34xx = 1,
965 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300966 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800967 .tuner_addr = ADDR_UNSET,
968 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800969 [BTTV_BOARD_ONAIR_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800970 .name = "Little OnAir TV",
971 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -0300972 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800973 .svhs = 2,
974 .gpiomask = 0xe00b,
Trent Piepho6f987002009-01-28 21:32:59 -0300975 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300976 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
977 .gpiomute = 0xff3ffc,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800978 .no_msp34xx = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300979 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800980 .tuner_addr = ADDR_UNSET,
981 },
982
983 /* ---- card 0x2c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800984 [BTTV_BOARD_SIGMA_TVII_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800985 .name = "Sigma TVII-FM",
986 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -0300987 /* .audio_inputs= 1, */
988 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800989 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -0300990 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -0300991 .gpiomux = { 1, 1, 0, 2 },
992 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800993 .no_msp34xx = 1,
994 .pll = PLL_NONE,
Trent Piepho8c2c0df2007-06-28 18:30:36 -0300995 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800996 .tuner_addr = ADDR_UNSET,
997 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -0800998 [BTTV_BOARD_MATRIX_VISION2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -0800999 .name = "MATRIX-Vision MV-Delta 2",
1000 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001001 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001002 .svhs = 3,
1003 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001004 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001005 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001006 .no_msp34xx = 1,
1007 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001008 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001009 .tuner_addr = ADDR_UNSET,
1010 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001011 [BTTV_BOARD_ZOLTRIX_GENIE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001012 .name = "Zoltrix Genie TV/FM",
1013 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001014 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001015 .svhs = 2,
1016 .gpiomask = 0xbcf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001017 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001018 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1019 .gpiomute = 0xbcb03f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001020 .no_msp34xx = 1,
1021 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001022 .tuner_type = TUNER_TEMIC_4039FR5_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001023 .tuner_addr = ADDR_UNSET,
1024 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001025 [BTTV_BOARD_TERRATVRADIO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001026 .name = "Terratec TV/Radio+",
1027 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001028 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001029 .svhs = 2,
1030 .gpiomask = 0x70000,
Trent Piepho6f987002009-01-28 21:32:59 -03001031 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001032 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1033 .gpiomute = 0x40000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001034 .needs_tvaudio = 1,
1035 .no_msp34xx = 1,
1036 .pll = PLL_35,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001037 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001038 .tuner_addr = ADDR_UNSET,
1039 .has_radio = 1,
1040 },
1041
1042 /* ---- card 0x30 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001043 [BTTV_BOARD_DYNALINK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001044 .name = "Askey CPH03x/ Dynalink Magic TView",
1045 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001046 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001047 .svhs = 2,
1048 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001049 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001050 .gpiomux = {2,0,0,0 },
1051 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001052 .needs_tvaudio = 1,
1053 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001054 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001055 .tuner_addr = ADDR_UNSET,
1056 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001057 [BTTV_BOARD_GVBCTV3PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001058 .name = "IODATA GV-BCTV3/PCI",
1059 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001060 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001061 .svhs = 2,
1062 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001063 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001064 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001065 .no_msp34xx = 1,
1066 .pll = PLL_28,
1067 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1068 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001069 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001070 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001071 [BTTV_BOARD_PXELVWPLTVPAK] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001072 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
1073 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001074 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001075 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03001076 .has_dig_in = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001077 .gpiomask = 0xAA0000,
Trent Piepho6f987002009-01-28 21:32:59 -03001078 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03001079 /* .digital_mode= DIGITAL_MODE_CAMERA, */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001080 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1081 .gpiomute = 0xa8000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001082 .no_msp34xx = 1,
1083 .pll = PLL_28,
1084 .tuner_type = TUNER_PHILIPS_PAL_I,
1085 .tuner_addr = ADDR_UNSET,
1086 .has_remote = 1,
1087 /* GPIO wiring: (different from Rev.4C !)
1088 GPIO17: U4.A0 (first hef4052bt)
1089 GPIO19: U4.A1
1090 GPIO20: U5.A1 (second hef4052bt)
1091 GPIO21: U4.nEN
1092 GPIO22: BT832 Reset Line
1093 GPIO23: A5,A0, U5,nEN
1094 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
1095 */
1096 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001097 [BTTV_BOARD_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001098 .name = "Eagle Wireless Capricorn2 (bt878A)",
1099 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001100 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001101 .svhs = 2,
1102 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001103 .muxsel = MUXSEL(2, 0, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001104 .gpiomux = { 0, 1, 2, 3 },
1105 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001106 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001107 .tuner_type = UNSET /* TUNER_ALPS_TMDH2_NTSC */,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001108 .tuner_addr = ADDR_UNSET,
1109 },
1110
1111 /* ---- card 0x34 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001112 [BTTV_BOARD_PINNACLEPRO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001113 /* David Härdeman <david@2gen.com> */
1114 .name = "Pinnacle PCTV Studio Pro",
1115 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001116 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001117 .svhs = 3,
1118 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001119 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001120 .gpiomux = { 1, 0xd0001, 0, 0 },
1121 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001122 /* sound path (5 sources):
1123 MUX1 (mask 0x03), Enable Pin 0x08 (0=enable, 1=disable)
1124 0= ext. Audio IN
1125 1= from MUX2
1126 2= Mono TV sound from Tuner
1127 3= not connected
1128 MUX2 (mask 0x30000):
1129 0,2,3= from MSP34xx
1130 1= FM stereo Radio from Tuner */
1131 .needs_tvaudio = 0,
1132 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001133 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001134 .tuner_addr = ADDR_UNSET,
1135 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001136 [BTTV_BOARD_TVIEW_RDS_FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001137 /* Claas Langbehn <claas@bigfoot.com>,
1138 Sven Grothklags <sven@upb.de> */
1139 .name = "Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS",
1140 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001141 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001142 .svhs = 2,
1143 .gpiomask = 0x1c,
Trent Piepho6f987002009-01-28 21:32:59 -03001144 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001145 .gpiomux = { 0, 0, 0x10, 8 },
1146 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001147 .needs_tvaudio = 1,
1148 .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 .needs_tvaudio = 0,
1187 .pll = PLL_28,
1188 .tuner_type = TUNER_TEMIC_PAL,
1189 .tuner_addr = ADDR_UNSET,
1190 },
1191
1192 /* ---- card 0x38 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001193 [BTTV_BOARD_FLYVIDEO_98FM] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001194 /* Gordon Heydon <gjheydon@bigfoot.com ('98) */
1195 .name = "Lifeview FlyVideo 98FM LR50",
1196 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001197 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001198 .svhs = 2,
1199 .gpiomask = 0x1800,
Trent Piepho6f987002009-01-28 21:32:59 -03001200 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001201 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1202 .gpiomute = 0x1800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001203 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001204 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001205 .tuner_addr = ADDR_UNSET,
1206 },
1207 /* This is the ultimate cheapo capture card
1208 * just a BT848A on a small PCB!
1209 * Steve Hosgood <steve@equiinet.com> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001210 [BTTV_BOARD_GRANDTEC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001211 .name = "GrandTec 'Grand Video Capture' (Bt848)",
1212 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001213 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001214 .svhs = 1,
1215 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001216 .muxsel = MUXSEL(3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001217 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001218 .needs_tvaudio = 0,
1219 .no_msp34xx = 1,
1220 .pll = PLL_35,
Trent Piephoabb03622009-01-28 21:32:59 -03001221 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001222 .tuner_addr = ADDR_UNSET,
1223 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001224 [BTTV_BOARD_ASKEY_CPH060] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001225 /* Daniel Herrington <daniel.herrington@home.com> */
1226 .name = "Askey CPH060/ Phoebe TV Master Only (No FM)",
1227 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001228 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001229 .svhs = 2,
1230 .gpiomask = 0xe00,
Trent Piepho6f987002009-01-28 21:32:59 -03001231 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001232 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1233 .gpiomute = 0x800,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001234 .needs_tvaudio = 1,
1235 .pll = PLL_28,
1236 .tuner_type = TUNER_TEMIC_4036FY5_NTSC,
1237 .tuner_addr = ADDR_UNSET,
1238 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001239 [BTTV_BOARD_ASKEY_CPH03X] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001240 /* Matti Mottus <mottus@physic.ut.ee> */
1241 .name = "Askey CPH03x TV Capturer",
1242 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001243 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001244 .svhs = 2,
1245 .gpiomask = 0x03000F,
Trent Piepho6f987002009-01-28 21:32:59 -03001246 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001247 .gpiomux = { 2, 0, 0, 0 },
1248 .gpiomute = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001249 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001250 .tuner_type = TUNER_TEMIC_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001251 .tuner_addr = ADDR_UNSET,
1252 },
1253
1254 /* ---- card 0x3c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001255 [BTTV_BOARD_MM100PCTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001256 /* Philip Blundell <philb@gnu.org> */
1257 .name = "Modular Technology MM100PCTV",
1258 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001259 /* .audio_inputs= 2, */
1260 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001261 .gpiomask = 11,
Trent Piepho6f987002009-01-28 21:32:59 -03001262 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001263 .gpiomux = { 2, 0, 0, 1 },
1264 .gpiomute = 8,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001265 .pll = PLL_35,
1266 .tuner_type = TUNER_TEMIC_PAL,
1267 .tuner_addr = ADDR_UNSET,
1268 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001269 [BTTV_BOARD_GMV1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001270 /* Adrian Cox <adrian@humboldt.co.uk */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001271 .name = "AG Electronics GMV1",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001272 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001273 /* .audio_inputs= 0, */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001274 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001275 .gpiomask = 0xF,
Trent Piepho6f987002009-01-28 21:32:59 -03001276 .muxsel = MUXSEL(2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001277 .gpiomux = { },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001278 .no_msp34xx = 1,
1279 .needs_tvaudio = 0,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08001280 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001281 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001282 .tuner_addr = ADDR_UNSET,
1283 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001284 [BTTV_BOARD_BESTBUY_EASYTV2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001285 /* Miguel Angel Alvarez <maacruz@navegalia.com>
1286 new Easy TV BT878 version (model CPH061)
1287 special thanks to Informatica Mieres for providing the card */
1288 .name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
1289 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001290 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001291 .svhs = 2,
1292 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03001293 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001294 .gpiomux = { 1, 0, 4, 4 },
1295 .gpiomute = 9,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001296 .needs_tvaudio = 0,
1297 .pll = PLL_28,
1298 .tuner_type = TUNER_PHILIPS_PAL,
1299 .tuner_addr = ADDR_UNSET,
1300 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001301 [BTTV_BOARD_ATI_TVWONDER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001302 /* Lukas Gebauer <geby@volny.cz> */
1303 .name = "ATI TV-Wonder",
1304 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001305 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001306 .svhs = 2,
1307 .gpiomask = 0xf03f,
Trent Piepho6f987002009-01-28 21:32:59 -03001308 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001309 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1310 .gpiomute = 0xbffe,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001311 .pll = PLL_28,
1312 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1313 .tuner_addr = ADDR_UNSET,
1314 },
1315
1316 /* ---- card 0x40 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001317 [BTTV_BOARD_ATI_TVWONDERVE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001318 /* Lukas Gebauer <geby@volny.cz> */
1319 .name = "ATI TV-Wonder VE",
1320 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001321 /* .audio_inputs= 1, */
1322 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001323 .gpiomask = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001324 .muxsel = MUXSEL(2, 3, 0, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001325 .gpiomux = { 0, 0, 1, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001326 .no_msp34xx = 1,
1327 .pll = PLL_28,
1328 .tuner_type = TUNER_TEMIC_4006FN5_MULTI_PAL,
1329 .tuner_addr = ADDR_UNSET,
1330 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001331 [BTTV_BOARD_FLYVIDEO2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001332 /* DeeJay <deejay@westel900.net (2000S) */
1333 .name = "Lifeview FlyVideo 2000S LR90",
1334 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001335 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001336 .svhs = 2,
1337 .gpiomask = 0x18e0,
Trent Piepho6f987002009-01-28 21:32:59 -03001338 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001339 /* Radio changed from 1e80 to 0x800 to make
1340 FlyVideo2000S in .hu happy (gm)*/
1341 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001342 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1343 .gpiomute = 0x1800,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001344 .audio_mode_gpio= fv2000s_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001345 .no_msp34xx = 1,
1346 .no_tda9875 = 1,
1347 .needs_tvaudio = 1,
1348 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001349 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001350 .tuner_addr = ADDR_UNSET,
1351 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001352 [BTTV_BOARD_TERRATVALUER] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001353 .name = "Terratec TValueRadio",
1354 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001355 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001356 .svhs = 2,
1357 .gpiomask = 0xffff00,
Trent Piepho6f987002009-01-28 21:32:59 -03001358 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001359 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1360 .gpiomute = 0x900,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001361 .needs_tvaudio = 1,
1362 .pll = PLL_28,
1363 .tuner_type = TUNER_PHILIPS_PAL,
1364 .tuner_addr = ADDR_UNSET,
1365 .has_radio = 1,
1366 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001367 [BTTV_BOARD_GVBCTV4PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001368 /* TANAKA Kei <peg00625@nifty.com> */
1369 .name = "IODATA GV-BCTV4/PCI",
1370 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001371 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001372 .svhs = 2,
1373 .gpiomask = 0x010f00,
Trent Piepho6f987002009-01-28 21:32:59 -03001374 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001375 .gpiomux = {0x10000, 0, 0x10000, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001376 .no_msp34xx = 1,
1377 .pll = PLL_28,
1378 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1379 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001380 .audio_mode_gpio= gvbctv3pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001381 },
1382
1383 /* ---- card 0x44 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001384 [BTTV_BOARD_VOODOOTV_FM] = {
Wade Berrier434b2522007-06-25 13:02:16 -03001385 .name = "3Dfx VoodooTV FM (Euro)",
1386 /* try "insmod msp3400 simple=0" if you have
1387 * sound problems with this card. */
1388 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001389 /* .audio_inputs= 1, */
1390 .svhs = NO_SVHS,
Wade Berrier434b2522007-06-25 13:02:16 -03001391 .gpiomask = 0x4f8a00,
1392 /* 0x100000: 1=MSP enabled (0=disable again)
1393 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
1394 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1395 .gpiomute = 0x947fff,
1396 /* tvtuner, radio, external,internal, mute, stereo
1397 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001398 .muxsel = MUXSEL(2, 3, 0, 1),
Wade Berrier434b2522007-06-25 13:02:16 -03001399 .tuner_type = TUNER_MT2032,
1400 .tuner_addr = ADDR_UNSET,
Wade Berrier434b2522007-06-25 13:02:16 -03001401 .pll = PLL_28,
1402 .has_radio = 1,
1403 },
1404 [BTTV_BOARD_VOODOOTV_200] = {
1405 .name = "VoodooTV 200 (USA)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001406 /* try "insmod msp3400 simple=0" if you have
1407 * sound problems with this card. */
1408 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001409 /* .audio_inputs= 1, */
1410 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001411 .gpiomask = 0x4f8a00,
1412 /* 0x100000: 1=MSP enabled (0=disable again)
1413 * 0x010000: Connected to "S0" on tda9880 (0=Pal/BG, 1=NTSC) */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001414 .gpiomux = {0x947fff, 0x987fff,0x947fff,0x947fff },
1415 .gpiomute = 0x947fff,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001416 /* tvtuner, radio, external,internal, mute, stereo
1417 * tuner, Composit, SVid, Composit-on-Svid-adapter */
Trent Piepho6f987002009-01-28 21:32:59 -03001418 .muxsel = MUXSEL(2, 3, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001419 .tuner_type = TUNER_MT2032,
1420 .tuner_addr = ADDR_UNSET,
1421 .pll = PLL_28,
1422 .has_radio = 1,
1423 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001424 [BTTV_BOARD_AIMMS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001425 /* Philip Blundell <pb@nexus.co.uk> */
1426 .name = "Active Imaging AIMMS",
1427 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001428 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001429 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001430 .tuner_addr = ADDR_UNSET,
1431 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03001432 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001433 .gpiomask = 0
1434 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001435 [BTTV_BOARD_PV_BT878P_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001436 /* Tomasz Pyra <hellfire@sedez.iq.pl> */
1437 .name = "Prolink Pixelview PV-BT878P+ (Rev.4C,8E)",
1438 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001439 /* .audio_inputs= 4, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001440 .svhs = 2,
1441 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03001442 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001443 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1444 .gpiomute = 13,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001445 .needs_tvaudio = 1,
1446 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001447 .tuner_type = TUNER_LG_PAL_I_FM,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001448 .tuner_addr = ADDR_UNSET,
1449 .has_remote = 1,
1450 /* GPIO wiring:
1451 GPIO0: U4.A0 (hef4052bt)
1452 GPIO1: U4.A1
1453 GPIO2: U4.A1 (second hef4052bt)
1454 GPIO3: U4.nEN, U5.A0, A5.nEN
1455 GPIO8-15: vrd866b ?
1456 */
1457 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001458 [BTTV_BOARD_FLYVIDEO98EZ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001459 .name = "Lifeview FlyVideo 98EZ (capture only) LR51",
1460 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001461 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001462 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001463 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1464 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001465 .pll = PLL_28,
1466 .no_msp34xx = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001467 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001468 .tuner_addr = ADDR_UNSET,
1469 },
1470
1471 /* ---- card 0x48 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001472 [BTTV_BOARD_PV_BT878P_9B] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001473 /* Dariusz Kowalewski <darekk@automex.pl> */
1474 .name = "Prolink Pixelview PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM)",
1475 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001476 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001477 .svhs = 2,
1478 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03001479 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001480 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1481 .gpiomute = 0x09,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001482 .needs_tvaudio = 1,
1483 .no_msp34xx = 1,
1484 .no_tda9875 = 1,
1485 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001486 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001487 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001488 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001489 .has_radio = 1, /* Note: not all cards have radio */
1490 .has_remote = 1,
1491 /* GPIO wiring:
1492 GPIO0: A0 hef4052
1493 GPIO1: A1 hef4052
1494 GPIO3: nEN hef4052
1495 GPIO8-15: vrd866b
1496 GPIO20,22,23: R30,R29,R28
1497 */
1498 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001499 [BTTV_BOARD_SENSORAY311] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001500 /* Clay Kunz <ckunz@mail.arc.nasa.gov> */
1501 /* you must jumper JP5 for the card to work */
1502 .name = "Sensoray 311",
1503 .video_inputs = 5,
Trent Piepho4c548d42009-01-28 21:32:59 -03001504 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001505 .svhs = 4,
1506 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001507 .muxsel = MUXSEL(2, 3, 1, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001508 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001509 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03001510 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001511 .tuner_addr = ADDR_UNSET,
1512 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001513 [BTTV_BOARD_RV605] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001514 /* Miguel Freitas <miguel@cetuc.puc-rio.br> */
1515 .name = "RemoteVision MX (RV605)",
1516 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001517 /* .audio_inputs= 0, */
1518 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001519 .gpiomask = 0x00,
1520 .gpiomask2 = 0x07ff,
Trent Piepho6f987002009-01-28 21:32:59 -03001521 .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 -08001522 .no_msp34xx = 1,
1523 .no_tda9875 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001524 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001525 .tuner_addr = ADDR_UNSET,
1526 .muxsel_hook = rv605_muxsel,
1527 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001528 [BTTV_BOARD_POWERCLR_MTV878] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001529 .name = "Powercolor MTV878/ MTV878R/ MTV878F",
1530 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001531 /* .audio_inputs= 2, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001532 .svhs = 2,
1533 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
Trent Piepho6f987002009-01-28 21:32:59 -03001534 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001535 .gpiomux = { 0, 1, 2, 2 },
1536 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001537 .needs_tvaudio = 0,
1538 .tuner_type = TUNER_PHILIPS_PAL,
1539 .tuner_addr = ADDR_UNSET,
1540 .pll = PLL_28,
1541 .has_radio = 1,
1542 },
1543
1544 /* ---- card 0x4c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001545 [BTTV_BOARD_WINDVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001546 /* Masaki Suzuki <masaki@btree.org> */
1547 .name = "Canopus WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)",
1548 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001549 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001550 .svhs = 2,
1551 .gpiomask = 0x140007,
Trent Piepho6f987002009-01-28 21:32:59 -03001552 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001553 .gpiomux = { 0, 1, 2, 3 },
1554 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001555 .tuner_type = TUNER_PHILIPS_NTSC,
1556 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001557 .audio_mode_gpio= windvr_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001558 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001559 [BTTV_BOARD_GRANDTEC_MULTI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001560 .name = "GrandTec Multi Capture Card (Bt878)",
1561 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001562 /* .audio_inputs= 0, */
1563 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001564 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001565 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001566 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001567 .needs_tvaudio = 0,
1568 .no_msp34xx = 1,
1569 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001570 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001571 .tuner_addr = ADDR_UNSET,
1572 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001573 [BTTV_BOARD_KWORLD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001574 .name = "Jetway TV/Capture JW-TV878-FBK, Kworld KW-TV878RF",
1575 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001576 /* .audio_inputs= 3, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001577 .svhs = 2,
1578 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001579 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1580 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001581 .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 -08001582 * This card lacks external Audio In, so we mute it on Ext. & Int.
1583 * The PCB can take a sbx1637/sbx1673, wiring unknown.
1584 * This card lacks PCI subsystem ID, sigh.
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001585 * gpiomux =1: lower volume, 2+3: mute
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001586 * btwincap uses 0x80000/0x80003
1587 */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001588 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001589 .needs_tvaudio = 0,
1590 .no_msp34xx = 1,
1591 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001592 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001593 .tuner_addr = ADDR_UNSET,
1594 /* Samsung TCPA9095PC27A (BG+DK), philips compatible, w/FM, stereo and
1595 radio signal strength indicators work fine. */
1596 .has_radio = 1,
1597 /* GPIO Info:
1598 GPIO0,1: HEF4052 A0,A1
1599 GPIO2: HEF4052 nENABLE
1600 GPIO3-7: n.c.
1601 GPIO8-13: IRDC357 data0-5 (data6 n.c. ?) [chip not present on my card]
1602 GPIO14,15: ??
1603 GPIO16-21: n.c.
1604 GPIO22,23: ??
1605 ?? : mtu8b56ep microcontroller for IR (GPIO wiring unknown)*/
1606 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001607 [BTTV_BOARD_DSP_TCVIDEO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001608 /* Arthur Tetzlaff-Deas, DSP Design Ltd <software@dspdesign.com> */
1609 .name = "DSP Design TCVIDEO",
1610 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001611 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001612 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001613 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001614 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001615 .tuner_addr = ADDR_UNSET,
1616 },
1617
1618 /* ---- card 0x50 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001619 [BTTV_BOARD_HAUPPAUGEPVR] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001620 .name = "Hauppauge WinTV PVR",
1621 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001622 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001623 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001624 .muxsel = MUXSEL(2, 0, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001625 .needs_tvaudio = 1,
1626 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001627 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001628 .tuner_addr = ADDR_UNSET,
1629
1630 .gpiomask = 7,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001631 .gpiomux = {7},
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001632 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001633 [BTTV_BOARD_GVBCTV5PCI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001634 .name = "IODATA GV-BCTV5/PCI",
1635 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001636 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001637 .svhs = 2,
1638 .gpiomask = 0x0f0f80,
Trent Piepho6f987002009-01-28 21:32:59 -03001639 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001640 .gpiomux = {0x030000, 0x010000, 0, 0 },
1641 .gpiomute = 0x020000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001642 .no_msp34xx = 1,
1643 .pll = PLL_28,
1644 .tuner_type = TUNER_PHILIPS_NTSC_M,
1645 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001646 .audio_mode_gpio= gvbctv5pci_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001647 .has_radio = 1,
1648 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001649 [BTTV_BOARD_OSPREY1x0] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001650 .name = "Osprey 100/150 (878)", /* 0x1(2|3)-45C6-C1 */
1651 .video_inputs = 4, /* id-inputs-clock */
Trent Piepho4c548d42009-01-28 21:32:59 -03001652 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001653 .svhs = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03001654 .muxsel = MUXSEL(3, 2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001655 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001656 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001657 .tuner_addr = ADDR_UNSET,
1658 .no_msp34xx = 1,
1659 .no_tda9875 = 1,
1660 .no_tda7432 = 1,
1661 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001662 [BTTV_BOARD_OSPREY1x0_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001663 .name = "Osprey 100/150 (848)", /* 0x04-54C0-C1 & older boards */
1664 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001665 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001666 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001667 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001668 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001669 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001670 .tuner_addr = ADDR_UNSET,
1671 .no_msp34xx = 1,
1672 .no_tda9875 = 1,
1673 .no_tda7432 = 1,
1674 },
1675
1676 /* ---- card 0x54 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001677 [BTTV_BOARD_OSPREY101_848] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001678 .name = "Osprey 101 (848)", /* 0x05-40C0-C1 */
1679 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001680 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001681 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001682 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001683 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001684 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001685 .tuner_addr = ADDR_UNSET,
1686 .no_msp34xx = 1,
1687 .no_tda9875 = 1,
1688 .no_tda7432 = 1,
1689 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001690 [BTTV_BOARD_OSPREY1x1] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001691 .name = "Osprey 101/151", /* 0x1(4|5)-0004-C4 */
1692 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001693 /* .audio_inputs= 0, */
1694 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001695 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001696 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001697 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001698 .tuner_addr = ADDR_UNSET,
1699 .no_msp34xx = 1,
1700 .no_tda9875 = 1,
1701 .no_tda7432 = 1,
1702 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001703 [BTTV_BOARD_OSPREY1x1_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001704 .name = "Osprey 101/151 w/ svid", /* 0x(16|17|20)-00C4-C1 */
1705 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001706 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001707 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001708 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001709 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001710 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001711 .tuner_addr = ADDR_UNSET,
1712 .no_msp34xx = 1,
1713 .no_tda9875 = 1,
1714 .no_tda7432 = 1,
1715 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001716 [BTTV_BOARD_OSPREY2xx] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001717 .name = "Osprey 200/201/250/251", /* 0x1(8|9|E|F)-0004-C4 */
1718 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001719 /* .audio_inputs= 1, */
1720 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03001721 .muxsel = MUXSEL(0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001722 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001723 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001724 .tuner_addr = ADDR_UNSET,
1725 .no_msp34xx = 1,
1726 .no_tda9875 = 1,
1727 .no_tda7432 = 1,
1728 },
1729
1730 /* ---- card 0x58 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001731 [BTTV_BOARD_OSPREY2x0_SVID] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001732 .name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
1733 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001734 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001735 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001736 .muxsel = MUXSEL(0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001737 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001738 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001739 .tuner_addr = ADDR_UNSET,
1740 .no_msp34xx = 1,
1741 .no_tda9875 = 1,
1742 .no_tda7432 = 1,
1743 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001744 [BTTV_BOARD_OSPREY2x0] = {
Michael Krufky52398ef2006-05-26 02:13:15 -03001745 .name = "Osprey 210/220/230", /* 0x1(A|B)-04C0-C1 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001746 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001747 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001748 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001749 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001750 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001751 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001752 .tuner_addr = ADDR_UNSET,
1753 .no_msp34xx = 1,
1754 .no_tda9875 = 1,
1755 .no_tda7432 = 1,
1756 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001757 [BTTV_BOARD_OSPREY500] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001758 .name = "Osprey 500", /* 500 */
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,
1767 .no_tda9875 = 1,
1768 .no_tda7432 = 1,
1769 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001770 [BTTV_BOARD_OSPREY540] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001771 .name = "Osprey 540", /* 540 */
1772 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001773 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001774 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001775 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001776 .tuner_addr = ADDR_UNSET,
1777 .no_msp34xx = 1,
1778 .no_tda9875 = 1,
1779 .no_tda7432 = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001780 },
1781
1782 /* ---- card 0x5C ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001783 [BTTV_BOARD_OSPREY2000] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001784 .name = "Osprey 2000", /* 2000 */
1785 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001786 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001787 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001788 .muxsel = MUXSEL(2, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001789 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001790 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001791 .tuner_addr = ADDR_UNSET,
1792 .no_msp34xx = 1,
1793 .no_tda9875 = 1,
1794 .no_tda7432 = 1, /* must avoid, conflicts with the bt860 */
1795 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001796 [BTTV_BOARD_IDS_EAGLE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001797 /* M G Berberich <berberic@forwiss.uni-passau.de> */
1798 .name = "IDS Eagle",
1799 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001800 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001801 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001802 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001803 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001804 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001805 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001806 .muxsel_hook = eagle_muxsel,
1807 .no_msp34xx = 1,
1808 .no_tda9875 = 1,
1809 .pll = PLL_28,
1810 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001811 [BTTV_BOARD_PINNACLESAT] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001812 .name = "Pinnacle PCTV Sat",
1813 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001814 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001815 .svhs = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03001816 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001817 .tuner_addr = ADDR_UNSET,
1818 .no_msp34xx = 1,
1819 .no_tda9875 = 1,
1820 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001821 .muxsel = MUXSEL(3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001822 .pll = PLL_28,
1823 .no_gpioirq = 1,
1824 .has_dvb = 1,
1825 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001826 [BTTV_BOARD_FORMAC_PROTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001827 .name = "Formac ProTV II (bt878)",
1828 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001829 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001830 .svhs = 3,
1831 .gpiomask = 2,
1832 /* TV, Comp1, Composite over SVID con, SVID */
Trent Piepho6f987002009-01-28 21:32:59 -03001833 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001834 .gpiomux = { 2, 2, 0, 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001835 .pll = PLL_28,
1836 .has_radio = 1,
1837 .tuner_type = TUNER_PHILIPS_PAL,
1838 .tuner_addr = ADDR_UNSET,
1839 /* sound routing:
1840 GPIO=0x00,0x01,0x03: mute (?)
1841 0x02: both TV and radio (tuner: FM1216/I)
1842 The card has onboard audio connectors labeled "cdrom" and "board",
1843 not soldered here, though unknown wiring.
1844 Card lacks: external audio in, pci subsystem id.
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07001845 */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001846 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001847
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001848 /* ---- card 0x60 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001849 [BTTV_BOARD_MACHTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001850 .name = "MachTV",
1851 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001852 /* .audio_inputs= 1, */
1853 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001854 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03001855 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001856 .gpiomux = { 0, 1, 2, 3},
1857 .gpiomute = 4,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001858 .needs_tvaudio = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001859 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001860 .tuner_addr = ADDR_UNSET,
Michael Krufkycf583ac2005-11-08 21:37:03 -08001861 .pll = PLL_28,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001862 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001863 [BTTV_BOARD_EURESYS_PICOLO] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001864 .name = "Euresys Picolo",
1865 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03001866 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001867 .svhs = 2,
1868 .gpiomask = 0,
1869 .no_msp34xx = 1,
1870 .no_tda9875 = 1,
1871 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03001872 .muxsel = MUXSEL(2, 0, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001873 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001874 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001875 .tuner_addr = ADDR_UNSET,
1876 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001877 [BTTV_BOARD_PV150] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001878 /* Luc Van Hoeylandt <luc@e-magic.be> */
1879 .name = "ProVideo PV150", /* 0x4f */
1880 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03001881 /* .audio_inputs= 0, */
1882 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001883 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03001884 .muxsel = MUXSEL(2, 3),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001885 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001886 .needs_tvaudio = 0,
1887 .no_msp34xx = 1,
1888 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03001889 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001890 .tuner_addr = ADDR_UNSET,
1891 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001892 [BTTV_BOARD_AD_TVK503] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001893 /* Hiroshi Takekawa <sian@big.or.jp> */
1894 /* This card lacks subsystem ID */
1895 .name = "AD-TVK503", /* 0x63 */
1896 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001897 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001898 .svhs = 2,
1899 .gpiomask = 0x001e8007,
Trent Piepho6f987002009-01-28 21:32:59 -03001900 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001901 /* Tuner, Radio, external, internal, off, on */
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03001902 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1903 .gpiomute = 0x0f,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001904 .needs_tvaudio = 0,
1905 .no_msp34xx = 1,
1906 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001907 .tuner_type = TUNER_PHILIPS_NTSC,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001908 .tuner_addr = ADDR_UNSET,
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03001909 .audio_mode_gpio= adtvk503_audio,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001910 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001911
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001912 /* ---- card 0x64 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001913 [BTTV_BOARD_HERCULES_SM_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001914 .name = "Hercules Smart TV Stereo",
1915 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001916 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001917 .svhs = 2,
1918 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03001919 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001920 .needs_tvaudio = 1,
1921 .no_msp34xx = 1,
1922 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001923 .tuner_type = TUNER_PHILIPS_PAL,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001924 .tuner_addr = ADDR_UNSET,
1925 /* Notes:
1926 - card lacks subsystem ID
1927 - stereo variant w/ daughter board with tda9874a @0xb0
1928 - Audio Routing:
1929 always from tda9874 independent of GPIO (?)
1930 external line in: unknown
1931 - Other chips: em78p156elp @ 0x96 (probably IR remote control)
1932 hef4053 (instead 4052) for unknown function
1933 */
1934 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001935 [BTTV_BOARD_PACETV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001936 .name = "Pace TV & Radio Card",
1937 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03001938 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001939 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03001940 /* Tuner, CVid, SVid, CVid over SVid connector */
1941 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001942 .gpiomask = 0,
1943 .no_tda9875 = 1,
1944 .no_tda7432 = 1,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001945 .tuner_type = TUNER_PHILIPS_PAL_I,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001946 .tuner_addr = ADDR_UNSET,
1947 .has_radio = 1,
1948 .pll = PLL_28,
1949 /* Bt878, Bt832, FI1246 tuner; no pci subsystem id
1950 only internal line out: (4pin header) RGGL
1951 Radio must be decoded by msp3410d (not routed through)*/
1952 /*
1953 .digital_mode = DIGITAL_MODE_CAMERA, todo!
1954 */
1955 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001956 [BTTV_BOARD_IVC200] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001957 /* Chris Willing <chris@vislab.usyd.edu.au> */
1958 .name = "IVC-200",
1959 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001960 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001961 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001962 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001963 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001964 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001965 .muxsel = MUXSEL(2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001966 .pll = PLL_28,
1967 },
Douglas Kosovicade08152009-01-22 23:07:26 -03001968 [BTTV_BOARD_IVCE8784] = {
1969 .name = "IVCE-8784",
1970 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001971 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03001972 .tuner_type = TUNER_ABSENT,
Douglas Kosovicade08152009-01-22 23:07:26 -03001973 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03001974 .svhs = NO_SVHS,
Douglas Kosovicade08152009-01-22 23:07:26 -03001975 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03001976 .muxsel = MUXSEL(2),
Douglas Kosovicade08152009-01-22 23:07:26 -03001977 .pll = PLL_28,
1978 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001979 [BTTV_BOARD_XGUARD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001980 .name = "Grand X-Guard / Trust 814PCI",
1981 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03001982 /* .audio_inputs= 0, */
1983 .svhs = NO_SVHS,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03001984 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001985 .tuner_addr = ADDR_UNSET,
1986 .gpiomask2 = 0xff,
Trent Piepho6f987002009-01-28 21:32:59 -03001987 .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 -08001988 .muxsel_hook = xguard_muxsel,
1989 .no_msp34xx = 1,
1990 .no_tda9875 = 1,
1991 .no_tda7432 = 1,
1992 .pll = PLL_28,
1993 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07001994
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001995 /* ---- card 0x68 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08001996 [BTTV_BOARD_NEBULA_DIGITV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08001997 .name = "Nebula Electronics DigiTV",
1998 .video_inputs = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03001999 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002000 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002001 .no_msp34xx = 1,
2002 .no_tda9875 = 1,
2003 .no_tda7432 = 1,
2004 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002005 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002006 .tuner_addr = ADDR_UNSET,
2007 .has_dvb = 1,
Mark Weaver6c6c0b22005-11-13 16:07:52 -08002008 .has_remote = 1,
2009 .gpiomask = 0x1b,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002010 .no_gpioirq = 1,
2011 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002012 [BTTV_BOARD_PV143] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002013 /* Jorge Boncompte - DTI2 <jorge@dti2.net> */
2014 .name = "ProVideo PV143",
2015 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002016 /* .audio_inputs= 0, */
2017 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002018 .gpiomask = 0,
Trent Piepho6f987002009-01-28 21:32:59 -03002019 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002020 .gpiomux = { 0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002021 .needs_tvaudio = 0,
2022 .no_msp34xx = 1,
2023 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002024 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002025 .tuner_addr = ADDR_UNSET,
2026 },
Dirk Heer05583622008-11-21 19:00:55 -03002027 [BTTV_BOARD_VD009X1_VD011_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002028 /* M.Klahr@phytec.de */
Dirk Heer05583622008-11-21 19:00:55 -03002029 .name = "PHYTEC VD-009-X1 VD-011 MiniDIN (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002030 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002031 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002032 .svhs = 3,
2033 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002034 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002035 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002036 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002037 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002038 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002039 .tuner_addr = ADDR_UNSET,
2040 },
Dirk Heer05583622008-11-21 19:00:55 -03002041 [BTTV_BOARD_VD009X1_VD011_COMBI] = {
2042 .name = "PHYTEC VD-009-X1 VD-011 Combi (bt878)",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002043 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002044 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002045 .svhs = 3,
2046 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002047 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002048 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Dirk Heer05583622008-11-21 19:00:55 -03002049 .needs_tvaudio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002050 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002051 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002052 .tuner_addr = ADDR_UNSET,
2053 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002054
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002055 /* ---- card 0x6c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002056 [BTTV_BOARD_VD009_MINIDIN] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002057 .name = "PHYTEC VD-009 MiniDIN (bt878)",
2058 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002059 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002060 .svhs = 9,
2061 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002062 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002063 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002064 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002065 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002066 .needs_tvaudio = 1,
2067 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002068 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002069 .tuner_addr = ADDR_UNSET,
2070 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002071 [BTTV_BOARD_VD009_COMBI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002072 .name = "PHYTEC VD-009 Combi (bt878)",
2073 .video_inputs = 10,
Trent Piepho4c548d42009-01-28 21:32:59 -03002074 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002075 .svhs = 9,
2076 .gpiomask = 0x00,
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002077 .gpiomask2 = 0x03, /* used for external vodeo mux */
Trent Piepho6f987002009-01-28 21:32:59 -03002078 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
Trent Piepho15f8eeb2009-01-28 21:32:59 -03002079 .muxsel_hook = phytec_muxsel,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002080 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002081 .needs_tvaudio = 1,
2082 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002083 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002084 .tuner_addr = ADDR_UNSET,
2085 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002086 [BTTV_BOARD_IVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002087 .name = "IVC-100",
2088 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002089 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002090 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002091 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002092 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002093 .gpiomask = 0xdf,
Trent Piepho6f987002009-01-28 21:32:59 -03002094 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002095 .pll = PLL_28,
2096 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002097 [BTTV_BOARD_IVC120] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002098 /* IVC-120G - Alan Garfield <alan@fromorbit.com> */
2099 .name = "IVC-120G",
2100 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002101 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002102 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002103 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002104 .svhs = NO_SVHS, /* card has no svhs */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002105 .needs_tvaudio = 0,
2106 .no_msp34xx = 1,
2107 .no_tda9875 = 1,
2108 .no_tda7432 = 1,
2109 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002110 .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 -08002111 .muxsel_hook = ivc120_muxsel,
2112 .pll = PLL_28,
2113 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002114
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002115 /* ---- card 0x70 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002116 [BTTV_BOARD_PC_HDTV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002117 .name = "pcHDTV HD-2000 TV",
2118 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002119 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002120 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002121 .muxsel = MUXSEL(2, 3, 1, 0),
Michael Krufkyab8b8702008-04-22 14:46:05 -03002122 .tuner_type = TUNER_PHILIPS_FCV1236D,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002123 .tuner_addr = ADDR_UNSET,
2124 .has_dvb = 1,
2125 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002126 [BTTV_BOARD_TWINHAN_DST] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002127 .name = "Twinhan DST + clones",
2128 .no_msp34xx = 1,
2129 .no_tda9875 = 1,
2130 .no_tda7432 = 1,
2131 .tuner_type = TUNER_ABSENT,
2132 .tuner_addr = ADDR_UNSET,
2133 .no_video = 1,
2134 .has_dvb = 1,
2135 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002136 [BTTV_BOARD_WINFASTVC100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002137 .name = "Winfast VC100",
2138 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002139 /* .audio_inputs= 0, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002140 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002141 /* Vid In, SVid In, Vid over SVid in connector */
2142 .muxsel = MUXSEL(3, 1, 1, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002143 .no_msp34xx = 1,
2144 .no_tda9875 = 1,
2145 .no_tda7432 = 1,
2146 .tuner_type = TUNER_ABSENT,
2147 .tuner_addr = ADDR_UNSET,
2148 .pll = PLL_28,
2149 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002150 [BTTV_BOARD_TEV560] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002151 .name = "Teppro TEV-560/InterVision IV-560",
2152 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002153 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002154 .svhs = 2,
2155 .gpiomask = 3,
Trent Piepho6f987002009-01-28 21:32:59 -03002156 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002157 .gpiomux = { 1, 1, 1, 1 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002158 .needs_tvaudio = 1,
2159 .tuner_type = TUNER_PHILIPS_PAL,
2160 .tuner_addr = ADDR_UNSET,
2161 .pll = PLL_35,
2162 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002163
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002164 /* ---- card 0x74 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002165 [BTTV_BOARD_SIMUS_GVC1100] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002166 .name = "SIMUS GVC1100",
2167 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002168 /* .audio_inputs= 0, */
2169 .svhs = NO_SVHS,
Trent Piephoabb03622009-01-28 21:32:59 -03002170 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002171 .tuner_addr = ADDR_UNSET,
2172 .pll = PLL_28,
Trent Piepho6f987002009-01-28 21:32:59 -03002173 .muxsel = MUXSEL(2, 2, 2, 2),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002174 .gpiomask = 0x3F,
2175 .muxsel_hook = gvc1100_muxsel,
2176 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002177 [BTTV_BOARD_NGSTV_PLUS] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002178 /* Carlos Silva r3pek@r3pek.homelinux.org || card 0x75 */
2179 .name = "NGS NGSTV+",
2180 .video_inputs = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002181 .svhs = 2,
2182 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002183 .muxsel = MUXSEL(2, 3, 0, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002184 .gpiomux = { 0, 0, 0, 0 },
2185 .gpiomute = 0x000003,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002186 .pll = PLL_28,
2187 .tuner_type = TUNER_PHILIPS_PAL,
2188 .tuner_addr = ADDR_UNSET,
2189 .has_remote = 1,
2190 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002191 [BTTV_BOARD_LMLBT4] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002192 /* http://linuxmedialabs.com */
2193 .name = "LMLBT4",
2194 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
Trent Piepho4c548d42009-01-28 21:32:59 -03002195 /* .audio_inputs= 0, */
2196 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002197 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002198 .no_msp34xx = 1,
2199 .no_tda9875 = 1,
2200 .no_tda7432 = 1,
2201 .needs_tvaudio = 0,
Trent Piephoabb03622009-01-28 21:32:59 -03002202 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002203 .tuner_addr = ADDR_UNSET,
2204 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002205 [BTTV_BOARD_TEKRAM_M205] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002206 /* Helmroos Harri <harri.helmroos@pp.inet.fi> */
2207 .name = "Tekram M205 PRO",
2208 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002209 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002210 .tuner_type = TUNER_PHILIPS_PAL,
2211 .tuner_addr = ADDR_UNSET,
2212 .svhs = 2,
2213 .needs_tvaudio = 0,
2214 .gpiomask = 0x68,
Trent Piepho6f987002009-01-28 21:32:59 -03002215 .muxsel = MUXSEL(2, 3, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002216 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002217 .pll = PLL_28,
2218 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002219
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002220 /* ---- card 0x78 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002221 [BTTV_BOARD_CONTVFMI] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002222 /* Javier Cendan Ares <jcendan@lycos.es> */
2223 /* bt878 TV + FM without subsystem ID */
2224 .name = "Conceptronic CONTVFMi",
2225 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002226 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002227 .svhs = 2,
2228 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002229 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002230 .gpiomux = { 0, 1, 2, 2 },
2231 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002232 .needs_tvaudio = 0,
2233 .pll = PLL_28,
2234 .tuner_type = TUNER_PHILIPS_PAL,
2235 .tuner_addr = ADDR_UNSET,
2236 .has_remote = 1,
2237 .has_radio = 1,
2238 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002239 [BTTV_BOARD_PICOLO_TETRA_CHIP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002240 /*Eric DEBIEF <debief@telemsa.com>*/
2241 /*EURESYS Picolo Tetra : 4 Conexant Fusion 878A, no audio, video input set with analog multiplexers GPIO controled*/
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002242 /* adds picolo_tetra_muxsel(), picolo_tetra_init(), the folowing declaration strucure, and #define BTTV_BOARD_PICOLO_TETRA_CHIP*/
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002243 /*0x79 in bttv.h*/
2244 .name = "Euresys Picolo Tetra",
2245 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002246 /* .audio_inputs= 0, */
2247 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002248 .gpiomask = 0,
2249 .gpiomask2 = 0x3C<<16,/*Set the GPIO[18]->GPIO[21] as output pin.==> drive the video inputs through analog multiplexers*/
2250 .no_msp34xx = 1,
2251 .no_tda9875 = 1,
2252 .no_tda7432 = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002253 /*878A input is always MUX0, see above.*/
2254 .muxsel = MUXSEL(2, 2, 2, 2),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002255 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002256 .pll = PLL_28,
2257 .needs_tvaudio = 0,
2258 .muxsel_hook = picolo_tetra_muxsel,/*Required as it doesn't follow the classic input selection policy*/
Trent Piephoabb03622009-01-28 21:32:59 -03002259 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002260 .tuner_addr = ADDR_UNSET,
2261 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002262 [BTTV_BOARD_SPIRIT_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002263 /* Spirit TV Tuner from http://spiritmodems.com.au */
2264 /* Stafford Goodsell <surge@goliath.homeunix.org> */
2265 .name = "Spirit TV Tuner",
2266 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002267 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002268 .svhs = 2,
2269 .gpiomask = 0x0000000f,
Trent Piepho6f987002009-01-28 21:32:59 -03002270 .muxsel = MUXSEL(2, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002271 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002272 .tuner_type = TUNER_TEMIC_PAL,
2273 .tuner_addr = ADDR_UNSET,
2274 .no_msp34xx = 1,
2275 .no_tda9875 = 1,
2276 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002277 [BTTV_BOARD_AVDVBT_771] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002278 /* Wolfram Joost <wojo@frokaschwei.de> */
2279 .name = "AVerMedia AVerTV DVB-T 771",
2280 .video_inputs = 2,
2281 .svhs = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002282 .tuner_type = TUNER_ABSENT,
2283 .tuner_addr = ADDR_UNSET,
Trent Piepho6f987002009-01-28 21:32:59 -03002284 .muxsel = MUXSEL(3, 3),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002285 .no_msp34xx = 1,
2286 .no_tda9875 = 1,
2287 .no_tda7432 = 1,
2288 .pll = PLL_28,
2289 .has_dvb = 1,
2290 .no_gpioirq = 1,
2291 .has_remote = 1,
2292 },
2293 /* ---- card 0x7c ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002294 [BTTV_BOARD_AVDVBT_761] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002295 /* Matt Jesson <dvb@jesson.eclipse.co.uk> */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002296 /* 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 -08002297 .name = "AverMedia AverTV DVB-T 761",
2298 .video_inputs = 2,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002299 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002300 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002301 .no_msp34xx = 1,
2302 .no_tda9875 = 1,
2303 .no_tda7432 = 1,
2304 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002305 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002306 .tuner_addr = ADDR_UNSET,
2307 .has_dvb = 1,
2308 .no_gpioirq = 1,
2309 .has_remote = 1,
2310 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002311 [BTTV_BOARD_MATRIX_VISIONSQ] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002312 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002313 .name = "MATRIX Vision Sigma-SQ",
2314 .video_inputs = 16,
2315 /* .audio_inputs= 0, */
2316 .svhs = NO_SVHS,
2317 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002318 .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 -03002319 .muxsel_hook = sigmaSQ_muxsel,
2320 .gpiomux = { 0 },
2321 .no_msp34xx = 1,
2322 .pll = PLL_28,
2323 .tuner_type = TUNER_ABSENT,
2324 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002325 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002326 [BTTV_BOARD_MATRIX_VISIONSLC] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002327 /* andre.schwarz@matrix-vision.de */
Trent Piepho4c548d42009-01-28 21:32:59 -03002328 .name = "MATRIX Vision Sigma-SLC",
2329 .video_inputs = 4,
2330 /* .audio_inputs= 0, */
2331 .svhs = NO_SVHS,
2332 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002333 .muxsel = MUXSEL(2, 2, 2, 2),
Trent Piepho4c548d42009-01-28 21:32:59 -03002334 .muxsel_hook = sigmaSLC_muxsel,
2335 .gpiomux = { 0 },
2336 .no_msp34xx = 1,
2337 .pll = PLL_28,
2338 .tuner_type = TUNER_ABSENT,
2339 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002340 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002341 /* BTTV_BOARD_APAC_VIEWCOMP */
2342 [BTTV_BOARD_APAC_VIEWCOMP] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002343 /* Attila Kondoros <attila.kondoros@chello.hu> */
2344 /* bt878 TV + FM 0x00000000 subsystem ID */
2345 .name = "APAC Viewcomp 878(AMAX)",
2346 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002347 /* .audio_inputs= 1, */
2348 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002349 .gpiomask = 0xFF,
Trent Piepho6f987002009-01-28 21:32:59 -03002350 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002351 .gpiomux = { 2, 0, 0, 0 },
2352 .gpiomute = 10,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002353 .needs_tvaudio = 0,
2354 .pll = PLL_28,
2355 .tuner_type = TUNER_PHILIPS_PAL,
2356 .tuner_addr = ADDR_UNSET,
2357 .has_remote = 1, /* miniremote works, see ir-kbd-gpio.c */
2358 .has_radio = 1, /* not every card has radio */
2359 },
Linus Torvalds1da177e2005-04-16 15:20:36 -07002360
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002361 /* ---- card 0x80 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002362 [BTTV_BOARD_DVICO_DVBT_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002363 /* Chris Pascoe <c.pascoe@itee.uq.edu.au> */
2364 .name = "DViCO FusionHDTV DVB-T Lite",
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002365 .no_msp34xx = 1,
2366 .no_tda9875 = 1,
2367 .no_tda7432 = 1,
2368 .pll = PLL_28,
2369 .no_video = 1,
2370 .has_dvb = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002371 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002372 .tuner_addr = ADDR_UNSET,
2373 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002374 [BTTV_BOARD_VGEAR_MYVCD] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002375 /* Steven <photon38@pchome.com.tw> */
2376 .name = "V-Gear MyVCD",
2377 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002378 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002379 .svhs = 2,
2380 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002381 .muxsel = MUXSEL(2, 3, 1, 0),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002382 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2383 .gpiomute = 0x31,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002384 .no_msp34xx = 1,
2385 .pll = PLL_28,
2386 .tuner_type = TUNER_PHILIPS_NTSC_M,
2387 .tuner_addr = ADDR_UNSET,
2388 .has_radio = 0,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002389 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002390 [BTTV_BOARD_SUPER_TV] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002391 /* Rick C <cryptdragoon@gmail.com> */
2392 .name = "Super TV Tuner",
2393 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002394 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002395 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002396 .muxsel = MUXSEL(2, 3, 1, 0),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002397 .tuner_type = TUNER_PHILIPS_NTSC,
2398 .tuner_addr = ADDR_UNSET,
2399 .gpiomask = 0x008007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002400 .gpiomux = { 0, 0x000001,0,0 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002401 .needs_tvaudio = 1,
2402 .has_radio = 1,
2403 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002404 [BTTV_BOARD_TIBET_CS16] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002405 /* Chris Fanning <video4linux@haydon.net> */
2406 .name = "Tibet Systems 'Progress DVR' CS16",
2407 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002408 /* .audio_inputs= 0, */
2409 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002410 .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 -08002411 .pll = PLL_28,
2412 .no_msp34xx = 1,
2413 .no_tda9875 = 1,
2414 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002415 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002416 .tuner_addr = ADDR_UNSET,
2417 .muxsel_hook = tibetCS16_muxsel,
2418 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002419 [BTTV_BOARD_KODICOM_4400R] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002420 /* Bill Brack <wbrack@mmm.com.hk> */
2421 /*
2422 * Note that, because of the card's wiring, the "master"
2423 * BT878A chip (i.e. the one which controls the analog switch
2424 * and must use this card type) is the 2nd one detected. The
2425 * other 3 chips should use card type 0x85, whose description
2426 * follows this one. There is a EEPROM on the card (which is
2427 * connected to the I2C of one of those other chips), but is
2428 * not currently handled. There is also a facility for a
2429 * "monitor", which is also not currently implemented.
2430 */
2431 .name = "Kodicom 4400R (master)",
2432 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002433 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002434 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002435 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002436 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002437 /* GPIO bits 0-9 used for analog switch:
2438 * 00 - 03: camera selector
2439 * 04 - 06: channel (controller) selector
2440 * 07: data (1->on, 0->off)
2441 * 08: strobe
2442 * 09: reset
2443 * bit 16 is input from sync separator for the channel
2444 */
2445 .gpiomask = 0x0003ff,
2446 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002447 .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 -08002448 .pll = PLL_28,
2449 .no_msp34xx = 1,
2450 .no_tda7432 = 1,
2451 .no_tda9875 = 1,
2452 .muxsel_hook = kodicom4400r_muxsel,
2453 },
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002454 [BTTV_BOARD_KODICOM_4400R_SL] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002455 /* Bill Brack <wbrack@mmm.com.hk> */
2456 /* Note that, for reasons unknown, the "master" BT878A chip (i.e. the
2457 * one which controls the analog switch, and must use the card type)
2458 * is the 2nd one detected. The other 3 chips should use this card
2459 * type
2460 */
2461 .name = "Kodicom 4400R (slave)",
2462 .video_inputs = 16,
Trent Piepho4c548d42009-01-28 21:32:59 -03002463 /* .audio_inputs= 0, */
Trent Piephoabb03622009-01-28 21:32:59 -03002464 .tuner_type = TUNER_ABSENT,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002465 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002466 .svhs = NO_SVHS,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002467 .gpiomask = 0x010000,
2468 .no_gpioirq = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002469 .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 -08002470 .pll = PLL_28,
2471 .no_msp34xx = 1,
2472 .no_tda7432 = 1,
2473 .no_tda9875 = 1,
2474 .muxsel_hook = kodicom4400r_muxsel,
2475 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002476 /* ---- card 0x86---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002477 [BTTV_BOARD_ADLINK_RTV24] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002478 /* Michael Henson <mhenson@clarityvi.com> */
2479 /* Adlink RTV24 with special unlock codes */
2480 .name = "Adlink RTV24",
2481 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002482 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002483 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002484 .muxsel = MUXSEL(2, 3, 1, 0),
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002485 .tuner_type = UNSET,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002486 .tuner_addr = ADDR_UNSET,
2487 .pll = PLL_28,
2488 },
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002489 /* ---- card 0x87---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002490 [BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002491 /* Michael Krufky <mkrufky@m1k.net> */
2492 .name = "DViCO FusionHDTV 5 Lite",
Michael Krufky9c26c8b2006-04-27 01:29:17 -03002493 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002494 .tuner_addr = ADDR_UNSET,
Michael Krufky4b017412005-11-08 21:37:06 -08002495 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002496 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002497 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002498 .muxsel = MUXSEL(2, 3, 1),
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002499 .gpiomask = 0x00e00007,
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002500 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2501 .gpiomute = 0x00c00007,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002502 .no_msp34xx = 1,
2503 .no_tda9875 = 1,
2504 .no_tda7432 = 1,
2505 .has_dvb = 1,
2506 },
2507 /* ---- card 0x88---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002508 [BTTV_BOARD_ACORP_Y878F] = {
Mauro Carvalho Chehab2e7c6dc2006-04-03 07:53:40 -03002509 /* Mauro Carvalho Chehab <mchehab@infradead.org> */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002510 .name = "Acorp Y878F",
2511 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002512 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002513 .svhs = 2,
2514 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002515 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002516 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2517 .gpiomute = 0x002000,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002518 .needs_tvaudio = 1,
2519 .pll = PLL_28,
2520 .tuner_type = TUNER_YMEC_TVF66T5_B_DFF,
2521 .tuner_addr = 0xc1 >>1,
2522 .has_radio = 1,
2523 },
2524 /* ---- card 0x89 ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002525 [BTTV_BOARD_CONCEPTRONIC_CTVFMI2] = {
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002526 .name = "Conceptronic CTVFMi v2",
2527 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002528 /* .audio_inputs= 1, */
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002529 .svhs = 2,
2530 .gpiomask = 0x001c0007,
Trent Piepho6f987002009-01-28 21:32:59 -03002531 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002532 .gpiomux = { 0, 1, 2, 2 },
2533 .gpiomute = 3,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002534 .needs_tvaudio = 0,
2535 .pll = PLL_28,
Ricardo Cerqueira24d41222005-11-08 21:38:21 -08002536 .tuner_type = TUNER_TENA_9533_DI,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002537 .tuner_addr = ADDR_UNSET,
2538 .has_remote = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002539 .has_radio = 1,
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08002540 },
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002541 /* ---- card 0x8a ---------------------------------- */
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002542 [BTTV_BOARD_PV_BT878P_2E] = {
Trent Piepho4c548d42009-01-28 21:32:59 -03002543 .name = "Prolink Pixelview PV-BT878P+ (Rev.2E)",
2544 .video_inputs = 5,
2545 /* .audio_inputs= 1, */
2546 .svhs = 3,
Trent Piepho5221e212009-01-28 21:32:59 -03002547 .has_dig_in = 1,
Trent Piepho4c548d42009-01-28 21:32:59 -03002548 .gpiomask = 0x01fe00,
Trent Piepho6f987002009-01-28 21:32:59 -03002549 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
Trent Piepho4c548d42009-01-28 21:32:59 -03002550 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2551 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2552 .gpiomute = 0x12400,
2553 .no_msp34xx = 1,
2554 .pll = PLL_28,
2555 .tuner_type = TUNER_LG_PAL_FM,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002556 .tuner_addr = ADDR_UNSET,
Trent Piepho4c548d42009-01-28 21:32:59 -03002557 .has_remote = 1,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002558 },
2559 /* ---- card 0x8b ---------------------------------- */
2560 [BTTV_BOARD_PV_M4900] = {
Jan Engelhardt96de0e22007-10-19 23:21:04 +02002561 /* Sérgio Fortier <sergiofortier@yahoo.com.br> */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002562 .name = "Prolink PixelView PlayTV MPEG2 PV-M4900",
2563 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002564 /* .audio_inputs= 1, */
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002565 .svhs = 2,
2566 .gpiomask = 0x3f,
Trent Piepho6f987002009-01-28 21:32:59 -03002567 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002568 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2569 .gpiomute = 0x29,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002570 .no_msp34xx = 1,
2571 .pll = PLL_28,
2572 .tuner_type = TUNER_YMEC_TVF_5533MF,
2573 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002574 .has_radio = 1,
2575 .has_remote = 1,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002576 },
Michael Krufkycf583ac2005-11-08 21:37:03 -08002577 /* ---- card 0x8c ---------------------------------- */
Trent Piephocf784d52007-07-21 21:26:40 -03002578 /* Has four Bt878 chips behind a PCI bridge, each chip has:
2579 one external BNC composite input (mux 2)
2580 three internal composite inputs (unknown muxes)
2581 an 18-bit stereo A/D (CS5331A), which has:
2582 one external stereo unblanced (RCA) audio connection
2583 one (or 3?) internal stereo balanced (XLR) audio connection
2584 input is selected via gpio to a 14052B mux
2585 (mask=0x300, unbal=0x000, bal=0x100, ??=0x200,0x300)
2586 gain is controlled via an X9221A chip on the I2C bus @0x28
2587 sample rate is controlled via gpio to an MK1413S
2588 (mask=0x3, 32kHz=0x0, 44.1kHz=0x1, 48kHz=0x2, ??=0x3)
2589 There is neither a tuner nor an svideo input. */
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002590 [BTTV_BOARD_OSPREY440] = {
2591 .name = "Osprey 440",
Trent Piephocf784d52007-07-21 21:26:40 -03002592 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002593 /* .audio_inputs= 2, */
2594 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002595 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
Trent Piephocf784d52007-07-21 21:26:40 -03002596 .gpiomask = 0x303,
2597 .gpiomute = 0x000, /* int + 32kHz */
2598 .gpiomux = { 0, 0, 0x000, 0x100},
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002599 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002600 .tuner_type = TUNER_ABSENT,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002601 .tuner_addr = ADDR_UNSET,
Kenth Anderssonf718e6e2005-11-08 21:37:02 -08002602 .no_msp34xx = 1,
2603 .no_tda9875 = 1,
2604 .no_tda7432 = 1,
2605 },
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002606 /* ---- card 0x8d ---------------------------------- */
2607 [BTTV_BOARD_ASOUND_SKYEYE] = {
2608 .name = "Asound Skyeye PCTV",
2609 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002610 /* .audio_inputs= 1, */
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002611 .svhs = 2,
2612 .gpiomask = 15,
Trent Piepho6f987002009-01-28 21:32:59 -03002613 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002614 .gpiomux = { 2, 0, 0, 0 },
2615 .gpiomute = 1,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002616 .needs_tvaudio = 1,
2617 .pll = PLL_28,
Trent Piepho8c2c0df2007-06-28 18:30:36 -03002618 .tuner_type = TUNER_PHILIPS_NTSC,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002619 .tuner_addr = ADDR_UNSET,
nshmyrev@yandex.ru71633c02005-11-08 21:37:38 -08002620 },
Bill Pechter633323f2005-11-13 16:07:50 -08002621 /* ---- card 0x8e ---------------------------------- */
2622 [BTTV_BOARD_SABRENT_TVFM] = {
2623 .name = "Sabrent TV-FM (bttv version)",
2624 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002625 /* .audio_inputs= 1, */
Bill Pechter633323f2005-11-13 16:07:50 -08002626 .svhs = 2,
2627 .gpiomask = 0x108007,
Trent Piepho6f987002009-01-28 21:32:59 -03002628 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002629 .gpiomux = { 100000, 100002, 100002, 100000 },
Bill Pechter633323f2005-11-13 16:07:50 -08002630 .no_msp34xx = 1,
2631 .no_tda9875 = 1,
2632 .no_tda7432 = 1,
2633 .pll = PLL_28,
2634 .tuner_type = TUNER_TNF_5335MF,
2635 .tuner_addr = ADDR_UNSET,
2636 .has_radio = 1,
2637 },
Steven Tothcd1257d2006-01-09 15:25:01 -02002638 /* ---- card 0x8f ---------------------------------- */
2639 [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = {
2640 .name = "Hauppauge ImpactVCB (bt878)",
2641 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002642 /* .audio_inputs= 0, */
2643 .svhs = NO_SVHS,
Steven Tothcd1257d2006-01-09 15:25:01 -02002644 .gpiomask = 0x0f, /* old: 7 */
Trent Piepho6f987002009-01-28 21:32:59 -03002645 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
Steven Tothcd1257d2006-01-09 15:25:01 -02002646 .no_msp34xx = 1,
2647 .no_tda9875 = 1,
2648 .no_tda7432 = 1,
Trent Piephoabb03622009-01-28 21:32:59 -03002649 .tuner_type = TUNER_ABSENT,
Steven Tothcd1257d2006-01-09 15:25:01 -02002650 .tuner_addr = ADDR_UNSET,
Steven Tothcd1257d2006-01-09 15:25:01 -02002651 },
Julian Calaby2d05ae62006-01-11 19:40:09 -02002652 [BTTV_BOARD_MACHTV_MAGICTV] = {
2653 /* Julian Calaby <julian.calaby@gmail.com>
2654 * Slightly different from original MachTV definition (0x60)
2655
2656 * FIXME: RegSpy says gpiomask should be "0x001c800f", but it
2657 * stuffs up remote chip. Bug is a pin on the jaecs is not set
2658 * properly (methinks) causing no keyup bits being set */
2659
2660 .name = "MagicTV", /* rebranded MachTV */
2661 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002662 /* .audio_inputs= 1, */
Julian Calaby2d05ae62006-01-11 19:40:09 -02002663 .svhs = 2,
2664 .gpiomask = 7,
Trent Piepho6f987002009-01-28 21:32:59 -03002665 .muxsel = MUXSEL(2, 3, 1, 1),
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002666 .gpiomux = { 0, 1, 2, 3 },
2667 .gpiomute = 4,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002668 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
2669 .tuner_addr = ADDR_UNSET,
Julian Calaby2d05ae62006-01-11 19:40:09 -02002670 .pll = PLL_28,
2671 .has_radio = 1,
2672 .has_remote = 1,
2673 },
Scott Alfter1ebba672007-04-02 14:22:39 -03002674 [BTTV_BOARD_SSAI_SECURITY] = {
2675 .name = "SSAI Security Video Interface",
2676 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002677 /* .audio_inputs= 0, */
2678 .svhs = NO_SVHS,
Trent Piepho6f987002009-01-28 21:32:59 -03002679 .muxsel = MUXSEL(0, 1, 2, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002680 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002681 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002682 },
2683 [BTTV_BOARD_SSAI_ULTRASOUND] = {
2684 .name = "SSAI Ultrasound Video Interface",
2685 .video_inputs = 2,
Trent Piepho4c548d42009-01-28 21:32:59 -03002686 /* .audio_inputs= 0, */
Scott Alfter1ebba672007-04-02 14:22:39 -03002687 .svhs = 1,
Trent Piepho6f987002009-01-28 21:32:59 -03002688 .muxsel = MUXSEL(2, 0, 1, 3),
Trent Piephoabb03622009-01-28 21:32:59 -03002689 .tuner_type = TUNER_ABSENT,
Scott Alfter1ebba672007-04-02 14:22:39 -03002690 .tuner_addr = ADDR_UNSET,
Scott Alfter1ebba672007-04-02 14:22:39 -03002691 },
Michael Krufky27cb7862007-06-28 12:19:20 -03002692 /* ---- card 0x94---------------------------------- */
2693 [BTTV_BOARD_DVICO_FUSIONHDTV_2] = {
2694 .name = "DViCO FusionHDTV 2",
Michael Krufkyab8b8702008-04-22 14:46:05 -03002695 .tuner_type = TUNER_PHILIPS_FCV1236D,
Michael Krufky27cb7862007-06-28 12:19:20 -03002696 .tuner_addr = ADDR_UNSET,
Michael Krufky27cb7862007-06-28 12:19:20 -03002697 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002698 /* .audio_inputs= 1, */
Michael Krufky27cb7862007-06-28 12:19:20 -03002699 .svhs = 2,
Trent Piepho6f987002009-01-28 21:32:59 -03002700 .muxsel = MUXSEL(2, 3, 1),
Michael Krufky27cb7862007-06-28 12:19:20 -03002701 .gpiomask = 0x00e00007,
2702 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2703 .gpiomute = 0x00c00007,
2704 .no_msp34xx = 1,
2705 .no_tda9875 = 1,
2706 .no_tda7432 = 1,
2707 },
Sascha Sommerb5457b72007-10-02 12:23:39 -03002708 /* ---- card 0x95---------------------------------- */
2709 [BTTV_BOARD_TYPHOON_TVTUNERPCI] = {
2710 .name = "Typhoon TV-Tuner PCI (50684)",
2711 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002712 /* .audio_inputs= 1, */
Sascha Sommerb5457b72007-10-02 12:23:39 -03002713 .svhs = 2,
2714 .gpiomask = 0x3014f,
Trent Piepho6f987002009-01-28 21:32:59 -03002715 .muxsel = MUXSEL(2, 3, 1, 1),
Sascha Sommerb5457b72007-10-02 12:23:39 -03002716 .gpiomux = { 0x20001,0x10001, 0, 0 },
2717 .gpiomute = 10,
2718 .needs_tvaudio = 1,
2719 .pll = PLL_28,
2720 .tuner_type = TUNER_PHILIPS_PAL_I,
2721 .tuner_addr = ADDR_UNSET,
Sascha Sommerb5457b72007-10-02 12:23:39 -03002722 },
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002723 [BTTV_BOARD_GEOVISION_GV600] = {
2724 /* emhn@usb.ve */
Trent Piepho4c548d42009-01-28 21:32:59 -03002725 .name = "Geovision GV-600",
2726 .video_inputs = 16,
2727 /* .audio_inputs= 0, */
2728 .svhs = NO_SVHS,
2729 .gpiomask = 0x0,
Trent Piepho6f987002009-01-28 21:32:59 -03002730 .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 -03002731 .muxsel_hook = geovision_muxsel,
2732 .gpiomux = { 0 },
2733 .no_msp34xx = 1,
2734 .pll = PLL_28,
2735 .tuner_type = TUNER_ABSENT,
2736 .tuner_addr = ADDR_UNSET,
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03002737 },
Mauro Lacye80faad2008-04-22 14:45:58 -03002738 [BTTV_BOARD_KOZUMI_KTV_01C] = {
2739 /* Mauro Lacy <mauro@lacy.com.ar>
2740 * Based on MagicTV and Conceptronic CONTVFMi */
2741
2742 .name = "Kozumi KTV-01C",
2743 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002744 /* .audio_inputs= 1, */
Mauro Lacye80faad2008-04-22 14:45:58 -03002745 .svhs = 2,
2746 .gpiomask = 0x008007,
Trent Piepho6f987002009-01-28 21:32:59 -03002747 .muxsel = MUXSEL(2, 3, 1, 1),
Mauro Lacye80faad2008-04-22 14:45:58 -03002748 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002749 .gpiomute = 3, /* CONTVFMi */
Mauro Lacye80faad2008-04-22 14:45:58 -03002750 .needs_tvaudio = 0,
2751 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3, /* TCL MK3 */
2752 .tuner_addr = ADDR_UNSET,
Mauro Lacye80faad2008-04-22 14:45:58 -03002753 .pll = PLL_28,
2754 .has_radio = 1,
2755 .has_remote = 1,
2756 },
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002757 [BTTV_BOARD_ENLTV_FM_2] = {
2758 /* Encore TV Tuner Pro ENL TV-FM-2
2759 Mauro Carvalho Chehab <mchehab@infradead.org */
2760 .name = "Encore ENL TV-FM-2",
2761 .video_inputs = 3,
Trent Piepho4c548d42009-01-28 21:32:59 -03002762 /* .audio_inputs= 1, */
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002763 .svhs = 2,
2764 /* bit 6 -> IR disabled
2765 bit 18/17 = 00 -> mute
2766 01 -> enable external audio input
2767 10 -> internal audio input (mono?)
2768 11 -> internal audio input
2769 */
2770 .gpiomask = 0x060040,
Trent Piepho6f987002009-01-28 21:32:59 -03002771 .muxsel = MUXSEL(2, 3, 3),
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002772 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2773 .gpiomute = 0,
2774 .tuner_type = TUNER_TCL_MF02GIP_5N,
2775 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002776 .pll = PLL_28,
2777 .has_radio = 1,
2778 .has_remote = 1,
Dirk Heer05583622008-11-21 19:00:55 -03002779 },
2780 [BTTV_BOARD_VD012] = {
2781 /* D.Heer@Phytec.de */
2782 .name = "PHYTEC VD-012 (bt878)",
2783 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002784 /* .audio_inputs= 0, */
2785 .svhs = NO_SVHS,
Dirk Heer05583622008-11-21 19:00:55 -03002786 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002787 .muxsel = MUXSEL(0, 2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002788 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2789 .needs_tvaudio = 0,
2790 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002791 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002792 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002793 },
2794 [BTTV_BOARD_VD012_X1] = {
2795 /* D.Heer@Phytec.de */
2796 .name = "PHYTEC VD-012-X1 (bt878)",
2797 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002798 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002799 .svhs = 3,
2800 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002801 .muxsel = MUXSEL(2, 3, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002802 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2803 .needs_tvaudio = 0,
2804 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002805 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002806 .tuner_addr = ADDR_UNSET,
Dirk Heer05583622008-11-21 19:00:55 -03002807 },
2808 [BTTV_BOARD_VD012_X2] = {
2809 /* D.Heer@Phytec.de */
2810 .name = "PHYTEC VD-012-X2 (bt878)",
2811 .video_inputs = 4,
Trent Piepho4c548d42009-01-28 21:32:59 -03002812 /* .audio_inputs= 0, */
Dirk Heer05583622008-11-21 19:00:55 -03002813 .svhs = 3,
2814 .gpiomask = 0x00,
Trent Piepho6f987002009-01-28 21:32:59 -03002815 .muxsel = MUXSEL(3, 2, 1),
Dirk Heer05583622008-11-21 19:00:55 -03002816 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2817 .needs_tvaudio = 0,
2818 .pll = PLL_28,
Trent Piephoabb03622009-01-28 21:32:59 -03002819 .tuner_type = TUNER_ABSENT,
Dirk Heer05583622008-11-21 19:00:55 -03002820 .tuner_addr = ADDR_UNSET,
Mauro Carvalho Chehab7d341a62008-08-05 10:14:13 -03002821 }
Mauro Carvalho Chehab10c2c8b2005-11-08 21:36:56 -08002822};
Linus Torvalds1da177e2005-04-16 15:20:36 -07002823
2824static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
2825
2826/* ----------------------------------------------------------------------- */
2827
2828static unsigned char eeprom_data[256];
2829
2830/*
2831 * identify card
2832 */
2833void __devinit bttv_idcard(struct bttv *btv)
2834{
2835 unsigned int gpiobits;
2836 int i,type;
2837 unsigned short tmp;
2838
2839 /* read PCI subsystem ID */
2840 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
2841 btv->cardid = tmp << 16;
2842 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2843 btv->cardid |= tmp;
2844
2845 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2846 /* look for the card */
2847 for (type = -1, i = 0; cards[i].id != 0; i++)
2848 if (cards[i].id == btv->cardid)
2849 type = i;
2850
2851 if (type != -1) {
2852 /* found it */
2853 printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
2854 "PCI subsystem ID is %04x:%04x\n",
2855 btv->c.nr,cards[type].name,cards[type].cardnr,
2856 btv->cardid & 0xffff,
2857 (btv->cardid >> 16) & 0xffff);
2858 btv->c.type = cards[type].cardnr;
2859 } else {
2860 /* 404 */
2861 printk(KERN_INFO "bttv%d: subsystem: %04x:%04x (UNKNOWN)\n",
2862 btv->c.nr, btv->cardid & 0xffff,
2863 (btv->cardid >> 16) & 0xffff);
2864 printk(KERN_DEBUG "please mail id, board name and "
Michael Krufky2a2d8572005-11-08 21:37:24 -08002865 "the correct card= insmod option to video4linux-list@redhat.com\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002866 }
2867 }
2868
2869 /* let the user override the autodetected type */
2870 if (card[btv->c.nr] < bttv_num_tvcards)
2871 btv->c.type=card[btv->c.nr];
2872
2873 /* print which card config we are using */
2874 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
2875 bttv_tvcards[btv->c.type].name, btv->c.type,
2876 card[btv->c.nr] < bttv_num_tvcards
2877 ? "insmod option" : "autodetected");
2878
2879 /* overwrite gpio stuff ?? */
2880 if (UNSET == audioall && UNSET == audiomux[0])
2881 return;
2882
2883 if (UNSET != audiomux[0]) {
2884 gpiobits = 0;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002885 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002886 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
Linus Torvalds1da177e2005-04-16 15:20:36 -07002887 gpiobits |= audiomux[i];
2888 }
2889 } else {
2890 gpiobits = audioall;
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002891 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002892 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002893 }
2894 }
2895 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
2896 printk(KERN_INFO "bttv%d: gpio config override: mask=0x%x, mux=",
2897 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
Mauro Carvalho Chehab57747b72007-03-28 22:37:20 -03002898 for (i = 0; i < ARRAY_SIZE(bttv_tvcards->gpiomux); i++) {
Hans Verkuil8bf2f8e2006-03-18 21:31:00 -03002899 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002900 }
2901 printk("\n");
2902}
2903
2904/*
2905 * (most) board specific initialisations goes here
2906 */
2907
2908/* Some Modular Technology cards have an eeprom, but no subsystem ID */
Adrian Bunk943a4902005-12-01 00:51:35 -08002909static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07002910{
2911 int type = -1;
2912
2913 if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002914 type = BTTV_BOARD_MODTEC_205;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002915 else if (0 == strncmp(eeprom_data+20,"Picolo",7))
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08002916 type = BTTV_BOARD_EURESYS_PICOLO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002917 else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002918 type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002919
2920 if (-1 != type) {
2921 btv->c.type = type;
2922 printk("bttv%d: detected by eeprom: %s [card=%d]\n",
2923 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
2924 }
2925}
2926
2927static void flyvideo_gpio(struct bttv *btv)
2928{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002929 int gpio, has_remote, has_radio, is_capture_only;
2930 int is_lr90, has_tda9820_tda9821;
2931 int tuner_type = UNSET, ttype;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002932
2933 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002934 udelay(8); /* without this we would see the 0x1800 mask */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002935 gpio = gpio_read();
2936 /* FIXME: must restore OUR_EN ??? */
2937
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002938 /* all cards provide GPIO info, some have an additional eeprom
2939 * LR50: GPIO coding can be found lower right CP1 .. CP9
2940 * CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
2941 * GPIO14-12: n.c.
2942 * LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
Linus Torvalds1da177e2005-04-16 15:20:36 -07002943
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002944 * lowest 3 bytes are remote control codes (no handshake needed)
2945 * xxxFFF: No remote control chip soldered
2946 * xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
2947 * Note: Some bits are Audio_Mask !
2948 */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002949 ttype = (gpio & 0x0f0000) >> 16;
2950 switch (ttype) {
2951 case 0x0:
2952 tuner_type = 2; /* NTSC, e.g. TPI8NSR11P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002953 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002954 case 0x2:
2955 tuner_type = 39; /* LG NTSC (newer TAPC series) TAPC-H701P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002956 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002957 case 0x4:
2958 tuner_type = 5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002959 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002960 case 0x6:
2961 tuner_type = 37; /* LG PAL (newer TAPC series) TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002962 break;
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002963 case 0xC:
2964 tuner_type = 3; /* Philips SECAM(+PAL) FQ1216ME or FI1216MF */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002965 break;
2966 default:
2967 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002968 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002969 }
2970
2971 has_remote = gpio & 0x800000;
2972 has_radio = gpio & 0x400000;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002973 /* unknown 0x200000;
2974 * unknown2 0x100000; */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08002975 is_capture_only = !(gpio & 0x008000); /* GPIO15 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002976 has_tda9820_tda9821 = !(gpio & 0x004000);
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002977 is_lr90 = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
2978 /*
2979 * gpio & 0x001000 output bit for audio routing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002980
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002981 if (is_capture_only)
2982 tuner_type = TUNER_ABSENT; /* No tuner present */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002983
2984 printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002985 btv->c.nr, has_radio ? "yes" : "no ",
2986 has_remote ? "yes" : "no ", tuner_type, gpio);
Linus Torvalds1da177e2005-04-16 15:20:36 -07002987 printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002988 btv->c.nr, is_lr90 ? "yes" : "no ",
2989 has_tda9820_tda9821 ? "yes" : "no ",
2990 is_capture_only ? "yes" : "no ");
Linus Torvalds1da177e2005-04-16 15:20:36 -07002991
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002992 if (tuner_type != UNSET) /* only set if known tuner autodetected, else let insmod option through */
2993 btv->tuner_type = tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07002994 btv->has_radio = has_radio;
2995
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07002996 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
2997 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
2998 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03002999 if (has_tda9820_tda9821)
3000 btv->audio_mode_gpio = lt9415_audio;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003001 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003002}
3003
3004static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
3005 14,2,17,1, 4,1,4,3, 1,2,16,1, 4,4,4,4 };
3006static int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
3007 1,1,1,1, 1,1,1,0, 0,0,0,0, 0,1,0,0 };
3008
3009static void miro_pinnacle_gpio(struct bttv *btv)
3010{
3011 int id,msp,gpio;
3012 char *info;
3013
3014 gpio_inout(0xffffff, 0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003015 gpio = gpio_read();
Linus Torvalds1da177e2005-04-16 15:20:36 -07003016 id = ((gpio>>10) & 63) -1;
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003017 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003018 if (id < 32) {
3019 btv->tuner_type = miro_tunermap[id];
3020 if (0 == (gpio & 0x20)) {
3021 btv->has_radio = 1;
3022 if (!miro_fmtuner[id]) {
3023 btv->has_matchbox = 1;
3024 btv->mbox_we = (1<<6);
3025 btv->mbox_most = (1<<7);
3026 btv->mbox_clk = (1<<8);
3027 btv->mbox_data = (1<<9);
3028 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3029 }
3030 } else {
3031 btv->has_radio = 0;
3032 }
3033 if (-1 != msp) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003034 if (btv->c.type == BTTV_BOARD_MIRO)
3035 btv->c.type = BTTV_BOARD_MIROPRO;
3036 if (btv->c.type == BTTV_BOARD_PINNACLE)
3037 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003038 }
3039 printk(KERN_INFO
3040 "bttv%d: miro: id=%d tuner=%d radio=%s stereo=%s\n",
3041 btv->c.nr, id+1, btv->tuner_type,
3042 !btv->has_radio ? "no" :
3043 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3044 (-1 == msp) ? "no" : "yes");
3045 } else {
3046 /* new cards with microtune tuner */
3047 id = 63 - id;
3048 btv->has_radio = 0;
3049 switch (id) {
3050 case 1:
3051 info = "PAL / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003052 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003053 break;
3054 case 2:
3055 info = "PAL+SECAM / stereo";
3056 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003057 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003058 break;
3059 case 3:
3060 info = "NTSC / stereo";
3061 btv->has_radio = 1;
Hans Verkuil39e8f402006-01-09 15:25:16 -02003062 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003063 break;
3064 case 4:
3065 info = "PAL+SECAM / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003066 btv->tda9887_conf = TDA9887_QSS;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003067 break;
3068 case 5:
3069 info = "NTSC / mono";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003070 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003071 break;
3072 case 6:
3073 info = "NTSC / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003074 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003075 break;
3076 case 7:
3077 info = "PAL / stereo";
Hans Verkuil39e8f402006-01-09 15:25:16 -02003078 btv->tda9887_conf = TDA9887_INTERCARRIER;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003079 break;
3080 default:
3081 info = "oops: unknown card";
3082 break;
3083 }
3084 if (-1 != msp)
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003085 btv->c.type = BTTV_BOARD_PINNACLEPRO;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003086 printk(KERN_INFO
3087 "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n",
3088 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
Hans Verkuil39e8f402006-01-09 15:25:16 -02003089 btv->tuner_type = TUNER_MT2032;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003090 }
3091}
3092
3093/* GPIO21 L: Buffer aktiv, H: Buffer inaktiv */
3094#define LM1882_SYNC_DRIVE 0x200000L
3095
3096static void init_ids_eagle(struct bttv *btv)
3097{
3098 gpio_inout(0xffffff,0xFFFF37);
3099 gpio_write(0x200020);
3100
3101 /* flash strobe inverter ?! */
3102 gpio_write(0x200024);
3103
3104 /* switch sync drive off */
3105 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
3106
3107 /* set BT848 muxel to 2 */
3108 btaor((2)<<5, ~(2<<5), BT848_IFORM);
3109}
3110
3111/* Muxsel helper for the IDS Eagle.
3112 * the eagles does not use the standard muxsel-bits but
3113 * has its own multiplexer */
3114static void eagle_muxsel(struct bttv *btv, unsigned int input)
3115{
Trent Piepho430390e2009-01-28 21:32:59 -03003116 gpio_bits(3, input & 3);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003117
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003118 /* composite */
3119 /* set chroma ADC to sleep */
3120 btor(BT848_ADC_C_SLEEP, BT848_ADC);
3121 /* set to composite video */
3122 btand(~BT848_CONTROL_COMP, BT848_E_CONTROL);
3123 btand(~BT848_CONTROL_COMP, BT848_O_CONTROL);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003124
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003125 /* switch sync drive off */
3126 gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003127}
3128
3129static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3130{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003131 static const int masks[] = {0x30, 0x01, 0x12, 0x23};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003132 gpio_write(masks[input%4]);
3133}
3134
3135/* LMLBT4x initialization - to allow access to GPIO bits for sensors input and
3136 alarms output
3137
3138 GPIObit | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
3139 assignment | TI | O3|INx| O2| O1|IN4|IN3|IN2|IN1| | |
3140
3141 IN - sensor inputs, INx - sensor inputs and TI XORed together
3142 O1,O2,O3 - alarm outputs (relays)
3143
3144 OUT ENABLE 1 1 0 . 1 1 0 0 . 0 0 0 0 = 0x6C0
3145
3146*/
3147
3148static void init_lmlbt4x(struct bttv *btv)
3149{
3150 printk(KERN_DEBUG "LMLBT4x init\n");
3151 btwrite(0x000000, BT848_GPIO_REG_INP);
3152 gpio_inout(0xffffff, 0x0006C0);
3153 gpio_write(0x000000);
3154}
3155
3156static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3157{
3158 unsigned int inmux = input % 8;
3159 gpio_inout( 0xf, 0xf );
3160 gpio_bits( 0xf, inmux );
3161}
3162
3163static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3164{
3165 unsigned int inmux = input % 4;
3166 gpio_inout( 3<<9, 3<<9 );
3167 gpio_bits( 3<<9, inmux<<9 );
3168}
3169
Ernesto Hernández-Novich97275ac2008-04-22 14:45:58 -03003170static void geovision_muxsel(struct bttv *btv, unsigned int input)
3171{
3172 unsigned int inmux = input % 16;
3173 gpio_inout(0xf, 0xf);
3174 gpio_bits(0xf, inmux);
3175}
3176
Linus Torvalds1da177e2005-04-16 15:20:36 -07003177/* ----------------------------------------------------------------------- */
3178
3179static void bttv_reset_audio(struct bttv *btv)
3180{
3181 /*
3182 * BT878A has a audio-reset register.
3183 * 1. This register is an audio reset function but it is in
3184 * function-0 (video capture) address space.
3185 * 2. It is enough to do this once per power-up of the card.
3186 * 3. There is a typo in the Conexant doc -- it is not at
3187 * 0x5B, but at 0x058. (B is an odd-number, obviously a typo!).
3188 * --//Shrikumar 030609
3189 */
3190 if (btv->id != 878)
3191 return;
3192
3193 if (bttv_debug)
3194 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3195 btwrite((1<<7), 0x058);
3196 udelay(10);
3197 btwrite( 0, 0x058);
3198}
3199
3200/* initialization part one -- before registering i2c bus */
3201void __devinit bttv_init_card1(struct bttv *btv)
3202{
3203 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003204 case BTTV_BOARD_HAUPPAUGE:
3205 case BTTV_BOARD_HAUPPAUGE878:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003206 boot_msp34xx(btv,5);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003207 break;
Wade Berrier434b2522007-06-25 13:02:16 -03003208 case BTTV_BOARD_VOODOOTV_200:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003209 case BTTV_BOARD_VOODOOTV_FM:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003210 boot_msp34xx(btv,20);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003211 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003212 case BTTV_BOARD_AVERMEDIA98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003213 boot_msp34xx(btv,11);
3214 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003215 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003216 pvr_boot(btv);
3217 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003218 case BTTV_BOARD_TWINHAN_DST:
3219 case BTTV_BOARD_AVDVBT_771:
3220 case BTTV_BOARD_PINNACLESAT:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003221 btv->use_i2c_hw = 1;
3222 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003223 case BTTV_BOARD_ADLINK_RTV24:
Michael Krufky7c08fb02005-11-08 21:36:21 -08003224 init_RTV24( btv );
3225 break;
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003226
Linus Torvalds1da177e2005-04-16 15:20:36 -07003227 }
3228 if (!bttv_tvcards[btv->c.type].has_dvb)
3229 bttv_reset_audio(btv);
3230}
3231
3232/* initialization part two -- after registering i2c bus */
3233void __devinit bttv_init_card2(struct bttv *btv)
3234{
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003235 int addr=ADDR_UNSET;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003236
Trent Piephoac7dc842007-06-28 17:51:08 -03003237 btv->tuner_type = UNSET;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003238
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003239 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003240 bttv_readee(btv,eeprom_data,0xa0);
3241 identify_by_eeprom(btv,eeprom_data);
3242 }
3243
3244 switch (btv->c.type) {
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003245 case BTTV_BOARD_MIRO:
3246 case BTTV_BOARD_MIROPRO:
3247 case BTTV_BOARD_PINNACLE:
3248 case BTTV_BOARD_PINNACLEPRO:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003249 /* miro/pinnacle */
3250 miro_pinnacle_gpio(btv);
3251 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003252 case BTTV_BOARD_FLYVIDEO_98:
3253 case BTTV_BOARD_MAXI:
3254 case BTTV_BOARD_LIFE_FLYKIT:
3255 case BTTV_BOARD_FLYVIDEO:
3256 case BTTV_BOARD_TYPHOON_TVIEW:
3257 case BTTV_BOARD_CHRONOS_VS2:
3258 case BTTV_BOARD_FLYVIDEO_98FM:
3259 case BTTV_BOARD_FLYVIDEO2000:
3260 case BTTV_BOARD_FLYVIDEO98EZ:
3261 case BTTV_BOARD_CONFERENCETV:
3262 case BTTV_BOARD_LIFETEC_9415:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003263 flyvideo_gpio(btv);
3264 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003265 case BTTV_BOARD_HAUPPAUGE:
3266 case BTTV_BOARD_HAUPPAUGE878:
3267 case BTTV_BOARD_HAUPPAUGEPVR:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003268 /* pick up some config infos from the eeprom */
3269 bttv_readee(btv,eeprom_data,0xa0);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003270 hauppauge_eeprom(btv);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003271 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003272 case BTTV_BOARD_AVERMEDIA98:
3273 case BTTV_BOARD_AVPHONE98:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003274 bttv_readee(btv,eeprom_data,0xa0);
3275 avermedia_eeprom(btv);
3276 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003277 case BTTV_BOARD_PXC200:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003278 init_PXC200(btv);
3279 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003280 case BTTV_BOARD_PICOLO_TETRA_CHIP:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003281 picolo_tetra_init(btv);
3282 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003283 case BTTV_BOARD_VHX:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003284 btv->has_radio = 1;
3285 btv->has_matchbox = 1;
3286 btv->mbox_we = 0x20;
3287 btv->mbox_most = 0;
3288 btv->mbox_clk = 0x08;
3289 btv->mbox_data = 0x10;
3290 btv->mbox_mask = 0x38;
3291 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003292 case BTTV_BOARD_VOBIS_BOOSTAR:
3293 case BTTV_BOARD_TERRATV:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003294 terratec_active_radio_upgrade(btv);
3295 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003296 case BTTV_BOARD_MAGICTVIEW061:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003297 if (btv->cardid == 0x3002144f) {
3298 btv->has_radio=1;
3299 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3300 }
3301 break;
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003302 case BTTV_BOARD_STB2:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003303 if (btv->cardid == 0x3060121a) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003304 /* Fix up entry for 3DFX VoodooTV 100,
3305 which is an OEM STB card variant. */
3306 btv->has_radio=0;
3307 btv->tuner_type=TUNER_TEMIC_NTSC;
3308 }
3309 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003310 case BTTV_BOARD_OSPREY1x0:
3311 case BTTV_BOARD_OSPREY1x0_848:
3312 case BTTV_BOARD_OSPREY101_848:
3313 case BTTV_BOARD_OSPREY1x1:
3314 case BTTV_BOARD_OSPREY1x1_SVID:
3315 case BTTV_BOARD_OSPREY2xx:
3316 case BTTV_BOARD_OSPREY2x0_SVID:
3317 case BTTV_BOARD_OSPREY2x0:
Trent Piephocf784d52007-07-21 21:26:40 -03003318 case BTTV_BOARD_OSPREY440:
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003319 case BTTV_BOARD_OSPREY500:
3320 case BTTV_BOARD_OSPREY540:
3321 case BTTV_BOARD_OSPREY2000:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003322 bttv_readee(btv,eeprom_data,0xa0);
Trent Piephocf784d52007-07-21 21:26:40 -03003323 osprey_eeprom(btv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003324 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003325 case BTTV_BOARD_IDS_EAGLE:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003326 init_ids_eagle(btv);
3327 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003328 case BTTV_BOARD_MODTEC_205:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003329 bttv_readee(btv,eeprom_data,0xa0);
3330 modtec_eeprom(btv);
3331 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003332 case BTTV_BOARD_LMLBT4:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003333 init_lmlbt4x(btv);
3334 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003335 case BTTV_BOARD_TIBET_CS16:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003336 tibetCS16_init(btv);
3337 break;
Mauro Carvalho Chehab5a25e842005-11-08 21:36:52 -08003338 case BTTV_BOARD_KODICOM_4400R:
Linus Torvalds1da177e2005-04-16 15:20:36 -07003339 kodicom4400r_init(btv);
3340 break;
3341 }
3342
3343 /* pll configuration */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003344 if (!(btv->id==848 && btv->revision==0x11)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003345 /* defaults from card list */
3346 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3347 btv->pll.pll_ifreq=28636363;
3348 btv->pll.pll_crystal=BT848_IFORM_XT0;
3349 }
3350 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3351 btv->pll.pll_ifreq=35468950;
3352 btv->pll.pll_crystal=BT848_IFORM_XT1;
3353 }
3354 /* insmod options can override */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003355 switch (pll[btv->c.nr]) {
3356 case 0: /* none */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003357 btv->pll.pll_crystal = 0;
3358 btv->pll.pll_ifreq = 0;
3359 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003360 break;
3361 case 1: /* 28 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003362 case 28:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003363 btv->pll.pll_ifreq = 28636363;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003364 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003365 btv->pll.pll_crystal = BT848_IFORM_XT0;
3366 break;
3367 case 2: /* 35 MHz */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003368 case 35:
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003369 btv->pll.pll_ifreq = 35468950;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003370 btv->pll.pll_ofreq = 0;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003371 btv->pll.pll_crystal = BT848_IFORM_XT1;
3372 break;
3373 }
3374 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003375 btv->pll.pll_current = -1;
3376
Linus Torvalds1da177e2005-04-16 15:20:36 -07003377 /* tuner configuration (from card list / autodetect / insmod option) */
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003378 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3379 addr = bttv_tvcards[btv->c.type].tuner_addr;
3380
3381 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
Trent Piephoabb03622009-01-28 21:32:59 -03003382 if (UNSET == btv->tuner_type)
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003383 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003384 if (UNSET != tuner[btv->c.nr])
3385 btv->tuner_type = tuner[btv->c.nr];
Trent Piephoac7dc842007-06-28 17:51:08 -03003386
Trent Piephoabb03622009-01-28 21:32:59 -03003387 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003388 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3389 else if(btv->tuner_type == UNSET)
3390 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3391 else
3392 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3393 btv->tuner_type);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003394
Trent Piephoabb03622009-01-28 21:32:59 -03003395 if (UNSET == btv->tuner_type)
3396 btv->tuner_type = TUNER_ABSENT;
3397
3398 if (btv->tuner_type != TUNER_ABSENT) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003399 struct tuner_setup tun_setup;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003400
Trent Piephoabb03622009-01-28 21:32:59 -03003401 /* Load tuner module before issuing tuner config call! */
3402 if (autoload)
3403 request_module("tuner");
3404
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003405 tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003406 tun_setup.type = btv->tuner_type;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003407 tun_setup.addr = addr;
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003408
Trent Piephoabb03622009-01-28 21:32:59 -03003409 if (bttv_tvcards[btv->c.type].has_radio)
3410 tun_setup.mode_mask |= T_RADIO;
3411
Mauro Carvalho Chehabfa9846a2005-07-12 13:58:42 -07003412 bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
3413 }
3414
Hans Verkuil39e8f402006-01-09 15:25:16 -02003415 if (btv->tda9887_conf) {
Mauro Carvalho Chehab7f171122007-10-18 19:56:47 -03003416 struct v4l2_priv_tun_config tda9887_cfg;
3417
3418 tda9887_cfg.tuner = TUNER_TDA9887;
3419 tda9887_cfg.priv = &btv->tda9887_conf;
3420
3421 bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
Mauro Carvalho Chehabf3b512f2005-11-08 21:38:23 -08003422 }
3423
Trent Piepho5221e212009-01-28 21:32:59 -03003424 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3425 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
Trent Piepho4c548d42009-01-28 21:32:59 -03003426 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3427 UNSET : bttv_tvcards[btv->c.type].svhs;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003428 if (svhs[btv->c.nr] != UNSET)
3429 btv->svhs = svhs[btv->c.nr];
3430 if (remote[btv->c.nr] != UNSET)
3431 btv->has_remote = remote[btv->c.nr];
3432
3433 if (bttv_tvcards[btv->c.type].has_radio)
3434 btv->has_radio=1;
3435 if (bttv_tvcards[btv->c.type].has_remote)
3436 btv->has_remote=1;
Michael Krufky7c08fb02005-11-08 21:36:21 -08003437 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3438 btv->gpioirq=1;
Nickolay V. Shmyrev4b9b9362006-08-25 16:53:04 -03003439 if (bttv_tvcards[btv->c.type].volume_gpio)
3440 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3441 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3442 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003443
Linus Torvalds1da177e2005-04-16 15:20:36 -07003444 if (!autoload)
3445 return;
3446
Trent Piephoabb03622009-01-28 21:32:59 -03003447 if (btv->tuner_type == TUNER_ABSENT)
Trent Piephoac7dc842007-06-28 17:51:08 -03003448 return; /* no tuner or related drivers to load */
3449
Linus Torvalds1da177e2005-04-16 15:20:36 -07003450 /* try to detect audio/fader chips */
3451 if (!bttv_tvcards[btv->c.type].no_msp34xx &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003452 bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003453 request_module("msp3400");
3454
3455 if (bttv_tvcards[btv->c.type].msp34xx_alt &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003456 bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003457 request_module("msp3400");
3458
3459 if (!bttv_tvcards[btv->c.type].no_tda9875 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003460 bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003461 request_module("tda9875");
3462
3463 if (!bttv_tvcards[btv->c.type].no_tda7432 &&
Mauro Carvalho Chehab09df1c12006-03-18 08:31:34 -03003464 bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003465 request_module("tda7432");
3466
3467 if (bttv_tvcards[btv->c.type].needs_tvaudio)
3468 request_module("tvaudio");
Linus Torvalds1da177e2005-04-16 15:20:36 -07003469}
3470
3471
3472/* ----------------------------------------------------------------------- */
3473
3474static void modtec_eeprom(struct bttv *btv)
3475{
3476 if( strncmp(&(eeprom_data[0x1e]),"Temic 4066 FY5",14) ==0) {
3477 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3478 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3479 btv->c.nr,&eeprom_data[0x1e]);
3480 } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
3481 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3482 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003483 btv->c.nr,&eeprom_data[0x1e]);
3484 } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
3485 btv->tuner_type=TUNER_PHILIPS_NTSC;
3486 printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
3487 btv->c.nr,&eeprom_data[0x1e]);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003488 } else {
3489 printk("bttv%d: Modtec: Unknown TunerString: %s\n",
3490 btv->c.nr,&eeprom_data[0x1e]);
3491 }
3492}
3493
3494static void __devinit hauppauge_eeprom(struct bttv *btv)
3495{
3496 struct tveeprom tv;
3497
Mauro Carvalho Chehab0f97a932005-09-09 13:04:05 -07003498 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003499 btv->tuner_type = tv.tuner_type;
3500 btv->has_radio = tv.has_radio;
Steven Tothcd1257d2006-01-09 15:25:01 -02003501
3502 printk("bttv%d: Hauppauge eeprom indicates model#%d\n",
3503 btv->c.nr, tv.model);
3504
3505 /*
3506 * Some of the 878 boards have duplicate PCI IDs. Switch the board
3507 * type based on model #.
3508 */
3509 if(tv.model == 64900) {
3510 printk("bttv%d: Switching board type from %s to %s\n",
3511 btv->c.nr,
3512 bttv_tvcards[btv->c.type].name,
3513 bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name);
3514 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3515 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003516}
3517
3518static int terratec_active_radio_upgrade(struct bttv *btv)
3519{
3520 int freq;
3521
3522 btv->has_radio = 1;
3523 btv->has_matchbox = 1;
3524 btv->mbox_we = 0x10;
3525 btv->mbox_most = 0x20;
3526 btv->mbox_clk = 0x08;
3527 btv->mbox_data = 0x04;
3528 btv->mbox_mask = 0x3c;
3529
3530 btv->mbox_iow = 1 << 8;
3531 btv->mbox_ior = 1 << 9;
3532 btv->mbox_csel = 1 << 10;
3533
3534 freq=88000/62.5;
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07003535 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003536 if (0x1ed8 == tea5757_read(btv)) {
3537 printk("bttv%d: Terratec Active Radio Upgrade found.\n",
3538 btv->c.nr);
3539 btv->has_radio = 1;
3540 btv->has_matchbox = 1;
3541 } else {
3542 btv->has_radio = 0;
3543 btv->has_matchbox = 0;
3544 }
3545 return 0;
3546}
3547
3548
3549/* ----------------------------------------------------------------------- */
3550
3551/*
3552 * minimal bootstrap for the WinTV/PVR -- upload altera firmware.
3553 *
3554 * The hcwamc.rbf firmware file is on the Hauppauge driver CD. Have
3555 * a look at Pvr/pvr45xxx.EXE (self-extracting zip archive, can be
3556 * unpacked with unzip).
3557 */
3558#define PVR_GPIO_DELAY 10
3559
3560#define BTTV_ALT_DATA 0x000001
3561#define BTTV_ALT_DCLK 0x100000
3562#define BTTV_ALT_NCONFIG 0x800000
3563
David Woodhouse4f2a0c32008-05-24 00:11:44 +01003564static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3565 u32 microlen)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003566{
3567 u32 n;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003568 u8 bits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003569 int i;
3570
3571 gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
3572 gpio_write(0);
3573 udelay(PVR_GPIO_DELAY);
3574
3575 gpio_write(BTTV_ALT_NCONFIG);
3576 udelay(PVR_GPIO_DELAY);
3577
3578 for (n = 0; n < microlen; n++) {
3579 bits = micro[n];
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03003580 for (i = 0 ; i < 8 ; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003581 gpio_bits(BTTV_ALT_DCLK,0);
3582 if (bits & 0x01)
3583 gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
3584 else
3585 gpio_bits(BTTV_ALT_DATA,0);
3586 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3587 bits >>= 1;
3588 }
3589 }
3590 gpio_bits(BTTV_ALT_DCLK,0);
3591 udelay(PVR_GPIO_DELAY);
3592
3593 /* begin Altera init loop (Not necessary,but doesn't hurt) */
3594 for (i = 0 ; i < 30 ; i++) {
3595 gpio_bits(BTTV_ALT_DCLK,0);
3596 gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
3597 }
3598 gpio_bits(BTTV_ALT_DCLK,0);
3599 return 0;
3600}
3601
3602static int __devinit pvr_boot(struct bttv *btv)
3603{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003604 const struct firmware *fw_entry;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003605 int rc;
3606
3607 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3608 if (rc != 0) {
3609 printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
3610 btv->c.nr);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003611 return rc;
3612 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003613 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3614 printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
3615 btv->c.nr, (rc < 0) ? "failed" : "ok");
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003616 release_firmware(fw_entry);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003617 return rc;
3618}
3619
3620/* ----------------------------------------------------------------------- */
3621/* some osprey specific stuff */
3622
Trent Piephocf784d52007-07-21 21:26:40 -03003623static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
Linus Torvalds1da177e2005-04-16 15:20:36 -07003624{
Trent Piephocf784d52007-07-21 21:26:40 -03003625 int i;
3626 u32 serial = 0;
3627 int cardid = -1;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003628
Trent Piephocf784d52007-07-21 21:26:40 -03003629 /* This code will nevery actually get called in this case.... */
3630 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3631 /* this might be an antique... check for MMAC label in eeprom */
3632 if (!strncmp(ee, "MMAC", 4)) {
3633 u8 checksum = 0;
3634 for (i = 0; i < 21; i++)
3635 checksum += ee[i];
3636 if (checksum != ee[21])
3637 return;
3638 cardid = BTTV_BOARD_OSPREY1x0_848;
3639 for (i = 12; i < 21; i++)
3640 serial *= 10, serial += ee[i] - '0';
3641 }
Michael Krufkyb930e1d2007-08-27 18:16:54 -03003642 } else {
Trent Piephocf784d52007-07-21 21:26:40 -03003643 unsigned short type;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003644
Trent Piephocf784d52007-07-21 21:26:40 -03003645 for (i = 4*16; i < 8*16; i += 16) {
3646 u16 checksum = ip_compute_csum(ee + i, 16);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003647
Trent Piephocf784d52007-07-21 21:26:40 -03003648 if ((checksum&0xff) + (checksum>>8) == 0xff)
3649 break;
3650 }
3651 if (i >= 8*16)
3652 return;
3653 ee += i;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003654
Trent Piephocf784d52007-07-21 21:26:40 -03003655 /* found a valid descriptor */
Al Viroc1c36f32008-05-21 00:32:21 -03003656 type = get_unaligned_be16((__be16 *)(ee+4));
Linus Torvalds1da177e2005-04-16 15:20:36 -07003657
Trent Piephocf784d52007-07-21 21:26:40 -03003658 switch(type) {
3659 /* 848 based */
3660 case 0x0004:
3661 cardid = BTTV_BOARD_OSPREY1x0_848;
3662 break;
3663 case 0x0005:
3664 cardid = BTTV_BOARD_OSPREY101_848;
3665 break;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003666
Trent Piephocf784d52007-07-21 21:26:40 -03003667 /* 878 based */
3668 case 0x0012:
3669 case 0x0013:
3670 cardid = BTTV_BOARD_OSPREY1x0;
3671 break;
3672 case 0x0014:
3673 case 0x0015:
3674 cardid = BTTV_BOARD_OSPREY1x1;
3675 break;
3676 case 0x0016:
3677 case 0x0017:
3678 case 0x0020:
3679 cardid = BTTV_BOARD_OSPREY1x1_SVID;
3680 break;
3681 case 0x0018:
3682 case 0x0019:
3683 case 0x001E:
3684 case 0x001F:
3685 cardid = BTTV_BOARD_OSPREY2xx;
3686 break;
3687 case 0x001A:
3688 case 0x001B:
3689 cardid = BTTV_BOARD_OSPREY2x0_SVID;
3690 break;
3691 case 0x0040:
3692 cardid = BTTV_BOARD_OSPREY500;
3693 break;
3694 case 0x0050:
3695 case 0x0056:
3696 cardid = BTTV_BOARD_OSPREY540;
3697 /* bttv_osprey_540_init(btv); */
3698 break;
3699 case 0x0060:
3700 case 0x0070:
3701 case 0x00A0:
3702 cardid = BTTV_BOARD_OSPREY2x0;
3703 /* enable output on select control lines */
3704 gpio_inout(0xffffff,0x000303);
3705 break;
3706 case 0x00D8:
3707 cardid = BTTV_BOARD_OSPREY440;
3708 break;
3709 default:
3710 /* unknown...leave generic, but get serial # */
3711 printk(KERN_INFO "bttv%d: "
3712 "osprey eeprom: unknown card type 0x%04x\n",
3713 btv->c.nr, type);
3714 break;
3715 }
Al Viroc1c36f32008-05-21 00:32:21 -03003716 serial = get_unaligned_be32((__be32 *)(ee+6));
Trent Piephocf784d52007-07-21 21:26:40 -03003717 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003718
Trent Piephocf784d52007-07-21 21:26:40 -03003719 printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
3720 btv->c.nr, cardid,
3721 cardid>0 ? bttv_tvcards[cardid].name : "Unknown", serial);
3722
3723 if (cardid<0 || btv->c.type == cardid)
3724 return;
3725
3726 /* card type isn't set correctly */
3727 if (card[btv->c.nr] < bttv_num_tvcards) {
3728 printk(KERN_WARNING "bttv%d: osprey eeprom: "
3729 "Not overriding user specified card type\n", btv->c.nr);
3730 } else {
3731 printk(KERN_INFO "bttv%d: osprey eeprom: "
3732 "Changing card type from %d to %d\n", btv->c.nr,
3733 btv->c.type, cardid);
3734 btv->c.type = cardid;
3735 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07003736}
3737
3738/* ----------------------------------------------------------------------- */
3739/* AVermedia specific stuff, from bktr_card.c */
3740
3741static int tuner_0_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003742 TUNER_PHILIPS_NTSC, TUNER_PHILIPS_PAL /* PAL-BG*/,
3743 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL /* PAL-I*/,
3744 TUNER_PHILIPS_PAL, TUNER_PHILIPS_PAL,
3745 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
3746 TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003747 TUNER_PHILIPS_FM1216ME_MK3 };
Linus Torvalds1da177e2005-04-16 15:20:36 -07003748
3749static int tuner_1_table[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003750 TUNER_TEMIC_NTSC, TUNER_TEMIC_PAL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07003751 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
3752 TUNER_TEMIC_PAL, TUNER_TEMIC_PAL,
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003753 TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
3754 TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
Linus Torvalds1da177e2005-04-16 15:20:36 -07003755
3756static void __devinit avermedia_eeprom(struct bttv *btv)
3757{
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003758 int tuner_make, tuner_tv_fm, tuner_format, tuner_type = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003759
3760 tuner_make = (eeprom_data[0x41] & 0x7);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003761 tuner_tv_fm = (eeprom_data[0x41] & 0x18) >> 3;
3762 tuner_format = (eeprom_data[0x42] & 0xf0) >> 4;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003763 btv->has_remote = (eeprom_data[0x42] & 0x01);
3764
3765 if (tuner_make == 0 || tuner_make == 2)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003766 if (tuner_format <= 0x0a)
3767 tuner_type = tuner_0_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003768 if (tuner_make == 1)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003769 if (tuner_format <= 9)
3770 tuner_type = tuner_1_table[tuner_format];
Linus Torvalds1da177e2005-04-16 15:20:36 -07003771
3772 if (tuner_make == 4)
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003773 if (tuner_format == 0x09)
3774 tuner_type = TUNER_LG_NTSC_NEW_TAPC; /* TAPC-G702P */
Linus Torvalds1da177e2005-04-16 15:20:36 -07003775
3776 printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003777 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3778 if (tuner_type) {
3779 btv->tuner_type = tuner_type;
3780 printk(KERN_CONT "%d", tuner_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003781 } else
Hans Verkuilc6eb8ea2008-09-03 17:11:54 -03003782 printk(KERN_CONT "Unknown type");
3783 printk(KERN_CONT " radio:%s remote control:%s\n",
Linus Torvalds1da177e2005-04-16 15:20:36 -07003784 tuner_tv_fm ? "yes" : "no",
3785 btv->has_remote ? "yes" : "no");
3786}
3787
Trent Piepho72134a62009-01-28 21:32:59 -03003788/*
3789 * For Voodoo TV/FM and Voodoo 200. These cards' tuners use a TDA9880
3790 * analog demod, which is not I2C controlled like the newer and more common
3791 * TDA9887 series. Instead is has two tri-state input pins, S0 and S1,
3792 * that control the IF for the video and audio. Apparently, bttv GPIO
3793 * 0x10000 is connected to S0. S0 low selects a 38.9 MHz VIF for B/G/D/K/I
3794 * (i.e., PAL) while high selects 45.75 MHz for M/N (i.e., NTSC).
3795 */
3796u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
Linus Torvalds1da177e2005-04-16 15:20:36 -07003797{
Trent Piepho72134a62009-01-28 21:32:59 -03003798
3799 if (btv->audio == TVAUDIO_INPUT_TUNER) {
3800 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
3801 gpiobits |= 0x10000;
3802 else
3803 gpiobits &= ~0x10000;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003804 }
Trent Piepho72134a62009-01-28 21:32:59 -03003805
3806 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
3807 return gpiobits;
Linus Torvalds1da177e2005-04-16 15:20:36 -07003808}
3809
3810
3811/*
3812 * reset/enable the MSP on some Hauppauge cards
David Woodhouse93e960f2005-11-08 21:36:46 -08003813 * Thanks to Kyösti Mälkki (kmalkki@cc.hut.fi)!
Linus Torvalds1da177e2005-04-16 15:20:36 -07003814 *
3815 * Hauppauge: pin 5
3816 * Voodoo: pin 20
3817 */
3818static void __devinit boot_msp34xx(struct bttv *btv, int pin)
3819{
3820 int mask = (1 << pin);
3821
3822 gpio_inout(mask,mask);
3823 gpio_bits(mask,0);
Thierry MERLEc4e3fd92008-09-01 17:32:10 -03003824 mdelay(2);
3825 udelay(500);
Linus Torvalds1da177e2005-04-16 15:20:36 -07003826 gpio_bits(mask,mask);
3827
3828 if (bttv_gpio)
3829 bttv_gpio_tracking(btv,"msp34xx");
3830 if (bttv_verbose)
3831 printk(KERN_INFO "bttv%d: Hauppauge/Voodoo msp34xx: reset line "
3832 "init [%d]\n", btv->c.nr, pin);
3833}
3834
Linus Torvalds1da177e2005-04-16 15:20:36 -07003835/* ----------------------------------------------------------------------- */
3836/* Imagenation L-Model PXC200 Framegrabber */
3837/* This is basically the same procedure as
3838 * used by Alessandro Rubini in his pxc200
3839 * driver, but using BTTV functions */
3840
3841static void __devinit init_PXC200(struct bttv *btv)
3842{
3843 static int vals[] __devinitdata = { 0x08, 0x09, 0x0a, 0x0b, 0x0d, 0x0d,
3844 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
3845 0x00 };
3846 unsigned int i;
3847 int tmp;
3848 u32 val;
3849
3850 /* Initialise GPIO-connevted stuff */
3851 gpio_inout(0xffffff, (1<<13));
3852 gpio_write(0);
3853 udelay(3);
3854 gpio_write(1<<13);
3855 /* GPIO inputs are pulled up, so no need to drive
3856 * reset pin any longer */
3857 gpio_bits(0xffffff, 0);
3858 if (bttv_gpio)
3859 bttv_gpio_tracking(btv,"pxc200");
3860
3861 /* we could/should try and reset/control the AD pots? but
3862 right now we simply turned off the crushing. Without
3863 this the AGC drifts drifts
3864 remember the EN is reverse logic -->
3865 setting BT848_ADC_AGC_EN disable the AGC
3866 tboult@eecs.lehigh.edu
3867 */
3868
3869 btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
3870
3871 /* Initialise MAX517 DAC */
3872 printk(KERN_INFO "Setting DAC reference voltage level ...\n");
3873 bttv_I2CWrite(btv,0x5E,0,0x80,1);
3874
3875 /* Initialise 12C508 PIC */
3876 /* The I2CWrite and I2CRead commmands are actually to the
3877 * same chips - but the R/W bit is included in the address
3878 * argument so the numbers are different */
3879
3880
3881 printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
3882
3883 /* First of all, enable the clock line. This is used in the PXC200-F */
3884 val = btread(BT848_GPIO_DMA_CTL);
3885 val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
3886 btwrite(val, BT848_GPIO_DMA_CTL);
3887
3888 /* Then, push to 0 the reset pin long enough to reset the *
3889 * device same as above for the reset line, but not the same
3890 * value sent to the GPIO-connected stuff
3891 * which one is the good one? */
3892 gpio_inout(0xffffff,(1<<2));
3893 gpio_write(0);
3894 udelay(10);
3895 gpio_write(1<<2);
3896
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08003897 for (i = 0; i < ARRAY_SIZE(vals); i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07003898 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
3899 if (tmp != -1) {
3900 printk(KERN_INFO
3901 "I2C Write(%2.2x) = %i\nI2C Read () = %2.2x\n\n",
3902 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
3903 }
3904 }
3905
3906 printk(KERN_INFO "PXC200 Initialised.\n");
3907}
3908
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003909
3910
Peter Skipworth93b43f12005-06-23 22:04:45 -07003911/* ----------------------------------------------------------------------- */
3912/*
3913 * The Adlink RTV-24 (aka Angelo) has some special initialisation to unlock
3914 * it. This apparently involves the following procedure for each 878 chip:
3915 *
3916 * 1) write 0x00C3FEFF to the GPIO_OUT_EN register
3917 *
3918 * 2) write to GPIO_DATA
3919 * - 0x0E
3920 * - sleep 1ms
3921 * - 0x10 + 0x0E
3922 * - sleep 10ms
3923 * - 0x0E
3924 * read from GPIO_DATA into buf (uint_32)
3925 * - if ( data>>18 & 0x01 != 0) || ( buf>>19 & 0x01 != 1 )
3926 * error. ERROR_CPLD_Check_Failed stop.
3927 *
3928 * 3) write to GPIO_DATA
3929 * - write 0x4400 + 0x0E
3930 * - sleep 10ms
3931 * - write 0x4410 + 0x0E
3932 * - sleep 1ms
3933 * - write 0x0E
3934 * read from GPIO_DATA into buf (uint_32)
Jean Delvarefef4fa142006-11-09 17:25:28 -03003935 * - if ( buf>>18 & 0x01 ) || ( buf>>19 & 0x01 != 0 )
Peter Skipworth93b43f12005-06-23 22:04:45 -07003936 * error. ERROR_CPLD_Check_Failed.
3937 */
3938/* ----------------------------------------------------------------------- */
Adrian Bunk943a4902005-12-01 00:51:35 -08003939static void
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003940init_RTV24 (struct bttv *btv)
Peter Skipworth93b43f12005-06-23 22:04:45 -07003941{
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003942 uint32_t dataRead = 0;
3943 long watchdog_value = 0x0E;
Peter Skipworth93b43f12005-06-23 22:04:45 -07003944
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003945 printk (KERN_INFO
3946 "bttv%d: Adlink RTV-24 initialisation in progress ...\n",
Peter Skipworth93b43f12005-06-23 22:04:45 -07003947 btv->c.nr);
3948
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003949 btwrite (0x00c3feff, BT848_GPIO_OUT_EN);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003950
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003951 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
3952 msleep (1);
3953 btwrite (0x10 + watchdog_value, BT848_GPIO_DATA);
3954 msleep (10);
3955 btwrite (0 + watchdog_value, BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003956
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003957 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003958
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003959 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 1)) {
3960 printk (KERN_INFO
3961 "bttv%d: Adlink RTV-24 initialisation(1) ERROR_CPLD_Check_Failed (read %d)\n",
3962 btv->c.nr, dataRead);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003963 }
3964
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003965 btwrite (0x4400 + watchdog_value, BT848_GPIO_DATA);
3966 msleep (10);
3967 btwrite (0x4410 + watchdog_value, BT848_GPIO_DATA);
3968 msleep (1);
3969 btwrite (watchdog_value, BT848_GPIO_DATA);
3970 msleep (1);
3971 dataRead = btread (BT848_GPIO_DATA);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003972
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003973 if ((((dataRead >> 18) & 0x01) != 0) || (((dataRead >> 19) & 0x01) != 0)) {
3974 printk (KERN_INFO
3975 "bttv%d: Adlink RTV-24 initialisation(2) ERROR_CPLD_Check_Failed (read %d)\n",
3976 btv->c.nr, dataRead);
3977
Peter Skipworth93b43f12005-06-23 22:04:45 -07003978 return;
3979 }
3980
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003981 printk (KERN_INFO
3982 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
Peter Skipworth93b43f12005-06-23 22:04:45 -07003983}
Linus Torvalds1da177e2005-04-16 15:20:36 -07003984
Mauro Carvalho Chehab2d03e282005-06-23 22:04:58 -07003985
3986
Linus Torvalds1da177e2005-04-16 15:20:36 -07003987/* ----------------------------------------------------------------------- */
3988/* Miro Pro radio stuff -- the tea5757 is connected to some GPIO ports */
3989/*
3990 * Copyright (c) 1999 Csaba Halasz <qgehali@uni-miskolc.hu>
3991 * This code is placed under the terms of the GNU General Public License
3992 *
3993 * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
3994 */
3995
3996static void bus_low(struct bttv *btv, int bit)
3997{
3998 if (btv->mbox_ior) {
3999 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4000 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4001 udelay(5);
4002 }
4003
4004 gpio_bits(bit,0);
4005 udelay(5);
4006
4007 if (btv->mbox_ior) {
4008 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4009 udelay(5);
4010 }
4011}
4012
4013static void bus_high(struct bttv *btv, int bit)
4014{
4015 if (btv->mbox_ior) {
4016 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4017 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4018 udelay(5);
4019 }
4020
4021 gpio_bits(bit,bit);
4022 udelay(5);
4023
4024 if (btv->mbox_ior) {
4025 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4026 udelay(5);
4027 }
4028}
4029
4030static int bus_in(struct bttv *btv, int bit)
4031{
4032 if (btv->mbox_ior) {
4033 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4034 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4035 udelay(5);
4036
4037 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4038 udelay(5);
4039 }
4040 return gpio_read() & (bit);
4041}
4042
4043/* TEA5757 register bits */
4044#define TEA_FREQ 0:14
4045#define TEA_BUFFER 15:15
4046
4047#define TEA_SIGNAL_STRENGTH 16:17
4048
4049#define TEA_PORT1 18:18
4050#define TEA_PORT0 19:19
4051
4052#define TEA_BAND 20:21
4053#define TEA_BAND_FM 0
4054#define TEA_BAND_MW 1
4055#define TEA_BAND_LW 2
4056#define TEA_BAND_SW 3
4057
4058#define TEA_MONO 22:22
4059#define TEA_ALLOW_STEREO 0
4060#define TEA_FORCE_MONO 1
4061
4062#define TEA_SEARCH_DIRECTION 23:23
4063#define TEA_SEARCH_DOWN 0
4064#define TEA_SEARCH_UP 1
4065
4066#define TEA_STATUS 24:24
4067#define TEA_STATUS_TUNED 0
4068#define TEA_STATUS_SEARCHING 1
4069
4070/* Low-level stuff */
4071static int tea5757_read(struct bttv *btv)
4072{
4073 unsigned long timeout;
4074 int value = 0;
4075 int i;
4076
4077 /* better safe than sorry */
4078 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4079
4080 if (btv->mbox_ior) {
4081 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4082 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4083 udelay(5);
4084 }
4085
4086 if (bttv_gpio)
4087 bttv_gpio_tracking(btv,"tea5757 read");
4088
4089 bus_low(btv,btv->mbox_we);
4090 bus_low(btv,btv->mbox_clk);
4091
4092 udelay(10);
Mauro Carvalho Chehabfe06fe02007-07-17 16:36:20 -03004093 timeout= jiffies + msecs_to_jiffies(1000);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004094
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004095 /* wait for DATA line to go low; error if it doesn't */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004096 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4097 schedule();
4098 if (bus_in(btv,btv->mbox_data)) {
4099 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4100 return -1;
4101 }
4102
4103 dprintk("bttv%d: tea5757:",btv->c.nr);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004104 for (i = 0; i < 24; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004105 udelay(5);
4106 bus_high(btv,btv->mbox_clk);
4107 udelay(5);
4108 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4109 bus_low(btv,btv->mbox_clk);
4110 value <<= 1;
4111 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4112 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4113 }
4114 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4115 return value;
4116}
4117
4118static int tea5757_write(struct bttv *btv, int value)
4119{
4120 int i;
4121 int reg = value;
4122
4123 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4124
4125 if (btv->mbox_ior) {
4126 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4127 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4128 udelay(5);
4129 }
4130 if (bttv_gpio)
4131 bttv_gpio_tracking(btv,"tea5757 write");
4132
4133 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4134 bus_low(btv,btv->mbox_clk);
4135 bus_high(btv,btv->mbox_we);
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004136 for (i = 0; i < 25; i++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004137 if (reg & 0x1000000)
4138 bus_high(btv,btv->mbox_data);
4139 else
4140 bus_low(btv,btv->mbox_data);
4141 reg <<= 1;
4142 bus_high(btv,btv->mbox_clk);
4143 udelay(10);
4144 bus_low(btv,btv->mbox_clk);
4145 udelay(10);
4146 }
4147 bus_low(btv,btv->mbox_we); /* unmute !!! */
4148 return 0;
4149}
4150
4151void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4152{
4153 dprintk("tea5757_set_freq %d\n",freq);
4154 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004155}
4156
Linus Torvalds1da177e2005-04-16 15:20:36 -07004157/* RemoteVision MX (rv605) muxsel helper [Miguel Freitas]
4158 *
4159 * This is needed because rv605 don't use a normal multiplex, but a crosspoint
4160 * switch instead (CD22M3494E). This IC can have multiple active connections
4161 * between Xn (input) and Yn (output) pins. We need to clear any existing
4162 * connection prior to establish a new one, pulsing the STROBE pin.
4163 *
4164 * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin.
4165 * GPIO pins are wired as:
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004166 * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller)
4167 * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller)
4168 * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller)
4169 * GPIO[8] - - P3[5] (microcontroller)
4170 * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller)
4171 * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller)
4172 * GPINTR - - P3[4] (microcontroller)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004173 *
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004174 * The microcontroller is a 80C32 like. It should be possible to change xpoint
4175 * configuration either directly (as we are doing) or using the microcontroller
Linus Torvalds1da177e2005-04-16 15:20:36 -07004176 * which is also wired to I2C interface. I have no further info on the
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004177 * microcontroller features, one would need to disassembly the firmware.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004178 * note: the vendor refused to give any information on this product, all
4179 * that stuff was found using a multimeter! :)
4180 */
4181static void rv605_muxsel(struct bttv *btv, unsigned int input)
4182{
Trent Piepho13afaef2009-01-28 21:32:59 -03004183 static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
4184 0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
4185
4186 gpio_bits(0x07f, muxgpio[input]);
4187
Linus Torvalds1da177e2005-04-16 15:20:36 -07004188 /* reset all conections */
4189 gpio_bits(0x200,0x200);
4190 mdelay(1);
4191 gpio_bits(0x200,0x000);
4192 mdelay(1);
4193
Joe Perchesc84e6032008-02-03 17:18:59 +02004194 /* create a new connection */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004195 gpio_bits(0x480,0x480);
4196 mdelay(1);
4197 gpio_bits(0x480,0x080);
4198 mdelay(1);
4199}
4200
4201/* Tibet Systems 'Progress DVR' CS16 muxsel helper [Chris Fanning]
4202 *
4203 * The CS16 (available on eBay cheap) is a PCI board with four Fusion
4204 * 878A chips, a PCI bridge, an Atmel microcontroller, four sync seperator
4205 * chips, ten eight input analog multiplexors, a not chip and a few
4206 * other components.
4207 *
4208 * 16 inputs on a secondary bracket are provided and can be selected
4209 * from each of the four capture chips. Two of the eight input
4210 * multiplexors are used to select from any of the 16 input signals.
4211 *
4212 * Unsupported hardware capabilities:
4213 * . A video output monitor on the secondary bracket can be selected from
4214 * one of the 878A chips.
4215 * . Another passthrough but I haven't spent any time investigating it.
4216 * . Digital I/O (logic level connected to GPIO) is available from an
4217 * onboard header.
4218 *
4219 * The on chip input mux should always be set to 2.
4220 * GPIO[16:19] - Video input selection
4221 * GPIO[0:3] - Video output monitor select (only available from one 878A)
4222 * GPIO[?:?] - Digital I/O.
4223 *
4224 * There is an ATMEL microcontroller with an 8031 core on board. I have not
4225 * determined what function (if any) it provides. With the microcontroller
4226 * and sync seperator chips a guess is that it might have to do with video
4227 * switching and maybe some digital I/O.
4228 */
4229static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4230{
4231 /* video mux */
4232 gpio_bits(0x0f0000, input << 16);
4233}
4234
4235static void tibetCS16_init(struct bttv *btv)
4236{
4237 /* enable gpio bits, mask obtained via btSpy */
4238 gpio_inout(0xffffff, 0x0f7fff);
4239 gpio_write(0x0f7fff);
4240}
4241
4242/*
4243 * The following routines for the Kodicom-4400r get a little mind-twisting.
4244 * There is a "master" controller and three "slave" controllers, together
4245 * an analog switch which connects any of 16 cameras to any of the BT87A's.
4246 * The analog switch is controlled by the "master", but the detection order
4247 * of the four BT878A chips is in an order which I just don't understand.
4248 * The "master" is actually the second controller to be detected. The
Robert P. J. Day3a4fa0a2007-10-19 23:10:43 +02004249 * logic on the board uses logical numbers for the 4 controllers, but
Linus Torvalds1da177e2005-04-16 15:20:36 -07004250 * those numbers are different from the detection sequence. When working
4251 * with the analog switch, we need to "map" from the detection sequence
4252 * over to the board's logical controller number. This mapping sequence
4253 * is {3, 0, 2, 1}, i.e. the first controller to be detected is logical
4254 * unit 3, the second (which is the master) is logical unit 0, etc.
4255 * We need to maintain the status of the analog switch (which of the 16
4256 * cameras is connected to which of the 4 controllers). Rather than
4257 * add to the bttv structure for this, we use the data reserved for
4258 * the mbox (unused for this card type).
4259 */
4260
4261/*
4262 * First a routine to set the analog switch, which controls which camera
4263 * is routed to which controller. The switch comprises an X-address
4264 * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
4265 * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
4266 * A data value (gpio bit 7) of '1' enables the switch, and '0' disables
4267 * the switch. A STROBE bit (gpio bit 8) latches the data value into the
4268 * specified address. The idea is to set the address and data, then bring
4269 * STROBE high, and finally bring STROBE back to low.
4270 */
4271static void kodicom4400r_write(struct bttv *btv,
4272 unsigned char xaddr,
4273 unsigned char yaddr,
4274 unsigned char data) {
4275 unsigned int udata;
4276
4277 udata = (data << 7) | ((yaddr&3) << 4) | (xaddr&0xf);
4278 gpio_bits(0x1ff, udata); /* write ADDR and DAT */
4279 gpio_bits(0x1ff, udata | (1 << 8)); /* strobe high */
4280 gpio_bits(0x1ff, udata); /* strobe low */
4281}
4282
4283/*
4284 * Next the mux select. Both the "master" and "slave" 'cards' (controllers)
4285 * use this routine. The routine finds the "master" for the card, maps
4286 * the controller number from the detected position over to the logical
4287 * number, writes the appropriate data to the analog switch, and housekeeps
4288 * the local copy of the switch information. The parameter 'input' is the
4289 * requested camera number (0 - 15).
4290 */
4291static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4292{
4293 char *sw_status;
4294 int xaddr, yaddr;
4295 struct bttv *mctlr;
4296 static unsigned char map[4] = {3, 0, 2, 1};
4297
4298 mctlr = master[btv->c.nr];
4299 if (mctlr == NULL) { /* ignore if master not yet detected */
4300 return;
4301 }
4302 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4303 yaddr = map[yaddr];
4304 sw_status = (char *)(&mctlr->mbox_we);
4305 xaddr = input & 0xf;
4306 /* Check if the controller/camera pair has changed, else ignore */
4307 if (sw_status[yaddr] != xaddr)
4308 {
4309 /* "open" the old switch, "close" the new one, save the new */
4310 kodicom4400r_write(mctlr, sw_status[yaddr], yaddr, 0);
4311 sw_status[yaddr] = xaddr;
4312 kodicom4400r_write(mctlr, xaddr, yaddr, 1);
4313 }
4314}
4315
4316/*
4317 * During initialisation, we need to reset the analog switch. We
4318 * also preset the switch to map the 4 connectors on the card to the
4319 * *user's* (see above description of kodicom4400r_muxsel) channels
4320 * 0 through 3
4321 */
4322static void kodicom4400r_init(struct bttv *btv)
4323{
4324 char *sw_status = (char *)(&btv->mbox_we);
4325 int ix;
4326
4327 gpio_inout(0x0003ff, 0x0003ff);
4328 gpio_write(1 << 9); /* reset MUX */
4329 gpio_write(0);
4330 /* Preset camera 0 to the 4 controllers */
Mauro Carvalho Chehabc1d57032007-03-28 22:37:23 -03004331 for (ix = 0; ix < 4; ix++) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004332 sw_status[ix] = ix;
4333 kodicom4400r_write(btv, ix, ix, 1);
4334 }
4335 /*
4336 * Since this is the "master", we need to set up the
4337 * other three controller chips' pointers to this structure
4338 * for later use in the muxsel routine.
4339 */
4340 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4341 return;
4342 master[btv->c.nr-1] = btv;
4343 master[btv->c.nr] = btv;
4344 master[btv->c.nr+1] = btv;
4345 master[btv->c.nr+2] = btv;
4346}
4347
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004348/* The Grandtec X-Guard framegrabber card uses two Dual 4-channel
4349 * video multiplexers to provide up to 16 video inputs. These
4350 * multiplexers are controlled by the lower 8 GPIO pins of the
4351 * bt878. The multiplexers probably Pericom PI5V331Q or similar.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004352
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004353 * xxx0 is pin xxx of multiplexer U5,
4354 * yyy1 is pin yyy of multiplexer U2
4355 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004356#define ENA0 0x01
4357#define ENB0 0x02
4358#define ENA1 0x04
4359#define ENB1 0x08
4360
4361#define IN10 0x10
4362#define IN00 0x20
4363#define IN11 0x40
4364#define IN01 0x80
4365
4366static void xguard_muxsel(struct bttv *btv, unsigned int input)
4367{
4368 static const int masks[] = {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004369 ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
4370 ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
4371 ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
4372 ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004373 };
4374 gpio_write(masks[input%16]);
4375}
4376static void picolo_tetra_init(struct bttv *btv)
4377{
4378 /*This is the video input redirection fonctionality : I DID NOT USED IT. */
4379 btwrite (0x08<<16,BT848_GPIO_DATA);/*GPIO[19] [==> 4053 B+C] set to 1 */
4380 btwrite (0x04<<16,BT848_GPIO_DATA);/*GPIO[18] [==> 4053 A] set to 1*/
4381}
4382static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4383{
4384
4385 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4386 /*Just set the right path in the analog multiplexers : channel 1 -> 4 ==> Analog Mux ==> MUX0*/
4387 /*GPIO[20]&GPIO[21] used to choose the right input*/
4388 btwrite (input<<20,BT848_GPIO_DATA);
4389
4390}
4391
4392/*
4393 * ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
4394 *
4395 * The IVC120G security card has 4 i2c controlled TDA8540 matrix
4396 * swichers to provide 16 channels to MUX0. The TDA8540's have
Andreas Mohrd6e05ed2006-06-26 18:35:02 +02004397 * 4 independent outputs and as such the IVC120G also has the
Linus Torvalds1da177e2005-04-16 15:20:36 -07004398 * optional "Monitor Out" bus. This allows the card to be looking
4399 * at one input while the monitor is looking at another.
4400 *
4401 * Since I've couldn't be bothered figuring out how to add an
4402 * independant muxsel for the monitor bus, I've just set it to
4403 * whatever the card is looking at.
4404 *
4405 * OUT0 of the TDA8540's is connected to MUX0 (0x03)
4406 * OUT1 of the TDA8540's is connected to "Monitor Out" (0x0C)
4407 *
4408 * TDA8540_ALT3 IN0-3 = Channel 13 - 16 (0x03)
4409 * TDA8540_ALT4 IN0-3 = Channel 1 - 4 (0x03)
4410 * TDA8540_ALT5 IN0-3 = Channel 5 - 8 (0x03)
4411 * TDA8540_ALT6 IN0-3 = Channel 9 - 12 (0x03)
4412 *
4413 */
4414
4415/* All 7 possible sub-ids for the TDA8540 Matrix Switcher */
4416#define I2C_TDA8540 0x90
4417#define I2C_TDA8540_ALT1 0x92
4418#define I2C_TDA8540_ALT2 0x94
4419#define I2C_TDA8540_ALT3 0x96
4420#define I2C_TDA8540_ALT4 0x98
4421#define I2C_TDA8540_ALT5 0x9a
4422#define I2C_TDA8540_ALT6 0x9c
4423
4424static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4425{
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004426 /* Simple maths */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004427 int key = input % 4;
4428 int matrix = input / 4;
4429
4430 dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
4431 btv->c.nr, input, matrix, key);
4432
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004433 /* Handles the input selection on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004434 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4435 ((matrix == 3) ? (key | key << 2) : 0x00), 1);
4436 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4437 ((matrix == 0) ? (key | key << 2) : 0x00), 1);
4438 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4439 ((matrix == 1) ? (key | key << 2) : 0x00), 1);
4440 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4441 ((matrix == 2) ? (key | key << 2) : 0x00), 1);
4442
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004443 /* Handles the output enables on the TDA8540's */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004444 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004445 ((matrix == 3) ? 0x03 : 0x00), 1); /* 13 - 16 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004446 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004447 ((matrix == 0) ? 0x03 : 0x00), 1); /* 1-4 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004448 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004449 ((matrix == 1) ? 0x03 : 0x00), 1); /* 5-8 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004450 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
Mauro Carvalho Chehab24a70fd2005-09-09 13:03:39 -07004451 ((matrix == 2) ? 0x03 : 0x00), 1); /* 9-12 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004452
Trent Piephofb5deb12009-01-28 21:32:59 -03004453 /* 878's MUX0 is already selected for input via muxsel values */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004454}
4455
4456
4457/* PXC200 muxsel helper
4458 * luke@syseng.anu.edu.au
4459 * another transplant
4460 * from Alessandro Rubini (rubini@linux.it)
4461 *
4462 * There are 4 kinds of cards:
4463 * PXC200L which is bt848
4464 * PXC200F which is bt848 with PIC controlling mux
4465 * PXC200AL which is bt878
4466 * PXC200AF which is bt878 with PIC controlling mux
4467 */
4468#define PX_CFG_PXC200F 0x01
4469#define PX_FLAG_PXC200A 0x00001000 /* a pxc200A is bt-878 based */
4470#define PX_I2C_PIC 0x0f
4471#define PX_PXC200A_CARDID 0x200a1295
4472#define PX_I2C_CMD_CFG 0x00
4473
4474static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4475{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004476 int rc;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004477 long mux;
4478 int bitmask;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004479 unsigned char buf[2];
Linus Torvalds1da177e2005-04-16 15:20:36 -07004480
4481 /* Read PIC config to determine if this is a PXC200F */
4482 /* PX_I2C_CMD_CFG*/
4483 buf[0]=0;
4484 buf[1]=0;
4485 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4486 if (rc) {
4487 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4488 /* not PXC ? do nothing */
4489 return;
4490 }
4491
4492 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4493 if (!(rc & PX_CFG_PXC200F)) {
4494 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4495 return;
4496 }
4497
4498
4499 /* The multiplexer in the 200F is handled by the GPIO port */
4500 /* get correct mapping between inputs */
4501 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4502 /* ** not needed!? */
4503 mux = input;
4504
4505 /* make sure output pins are enabled */
4506 /* bitmask=0x30f; */
4507 bitmask=0x302;
4508 /* check whether we have a PXC200A */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004509 if (btv->cardid == PX_PXC200A_CARDID) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07004510 bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
4511 bitmask |= 7<<4; /* the DAC */
4512 }
4513 btwrite(bitmask, BT848_GPIO_OUT_EN);
4514
4515 bitmask = btread(BT848_GPIO_DATA);
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004516 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004517 bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
4518 else /* older device */
4519 bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
4520 btwrite(bitmask,BT848_GPIO_DATA);
4521
4522 /*
4523 * Was "to be safe, set the bt848 to input 0"
4524 * Actually, since it's ok at load time, better not messing
4525 * with these bits (on PXC200AF you need to set mux 2 here)
4526 *
4527 * needed because bttv-driver sets mux before calling this function
4528 */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004529 if (btv->cardid == PX_PXC200A_CARDID)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004530 btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
4531 else /* older device */
4532 btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
4533
4534 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4535}
4536
Trent Piepho15f8eeb2009-01-28 21:32:59 -03004537static void phytec_muxsel(struct bttv *btv, unsigned int input)
4538{
4539 unsigned int mux = input % 4;
4540
4541 if (input == btv->svhs)
4542 mux = 0;
4543
4544 gpio_bits(0x3, mux);
4545}
4546
Linus Torvalds1da177e2005-04-16 15:20:36 -07004547/* ----------------------------------------------------------------------- */
4548/* motherboard chipset specific stuff */
4549
Adrian Bunk7d44e892007-12-11 19:23:43 -03004550void __init bttv_check_chipset(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -07004551{
4552 int pcipci_fail = 0;
4553 struct pci_dev *dev = NULL;
4554
Alan Cox3d265c92006-09-14 11:53:16 -03004555 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
Linus Torvalds1da177e2005-04-16 15:20:36 -07004556 pcipci_fail = 1;
4557 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4558 triton1 = 1;
4559 if (pci_pci_problems & PCIPCI_VSFX)
4560 vsfx = 1;
4561#ifdef PCIPCI_ALIMAGIK
4562 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4563 latency = 0x0A;
4564#endif
4565
Linus Torvalds1da177e2005-04-16 15:20:36 -07004566
4567 /* print warnings about any quirks found */
4568 if (triton1)
4569 printk(KERN_INFO "bttv: Host bridge needs ETBF enabled.\n");
4570 if (vsfx)
4571 printk(KERN_INFO "bttv: Host bridge needs VSFX enabled.\n");
4572 if (pcipci_fail) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004573 printk(KERN_INFO "bttv: bttv and your chipset may not work "
4574 "together.\n");
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004575 if (!no_overlay) {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004576 printk(KERN_INFO "bttv: overlay will be disabled.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004577 no_overlay = 1;
Mauro Carvalho Chehab4dcef522005-08-04 12:53:30 -07004578 } else {
Mauro Carvalho Chehab9050d942006-03-10 16:46:50 -03004579 printk(KERN_INFO "bttv: overlay forced. Use this "
4580 "option at your own risk.\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -07004581 }
4582 }
4583 if (UNSET != latency)
4584 printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
Mauro Carvalho Chehab2bfa1ac2005-11-08 21:36:51 -08004585 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
Linus Torvalds1da177e2005-04-16 15:20:36 -07004586 PCI_DEVICE_ID_INTEL_82441, dev))) {
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004587 unsigned char b;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004588 pci_read_config_byte(dev, 0x53, &b);
4589 if (bttv_debug)
4590 printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
4591 "bufcon=0x%02x\n",b);
4592 }
4593}
4594
4595int __devinit bttv_handle_chipset(struct bttv *btv)
4596{
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004597 unsigned char command;
Linus Torvalds1da177e2005-04-16 15:20:36 -07004598
4599 if (!triton1 && !vsfx && UNSET == latency)
4600 return 0;
4601
4602 if (bttv_verbose) {
4603 if (triton1)
4604 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4605 if (vsfx && btv->id >= 878)
4606 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4607 if (UNSET != latency)
4608 printk(KERN_INFO "bttv%d: setting pci timer to %d\n",
4609 btv->c.nr,latency);
4610 }
4611
4612 if (btv->id < 878) {
4613 /* bt848 (mis)uses a bit in the irq mask for etbf */
4614 if (triton1)
4615 btv->triton1 = BT848_INT_ETBF;
4616 } else {
4617 /* bt878 has a bit in the pci config space for it */
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004618 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
Linus Torvalds1da177e2005-04-16 15:20:36 -07004619 if (triton1)
4620 command |= BT878_EN_TBFX;
4621 if (vsfx)
4622 command |= BT878_EN_VSFX;
Mauro Carvalho Chehab4ac97912005-11-08 21:37:43 -08004623 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4624 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07004625 if (UNSET != latency)
4626 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
4627 return 0;
4628}
4629
4630
4631/*
4632 * Local variables:
4633 * c-basic-offset: 8
4634 * End:
4635 */