[PATCH] v4l: common part Updates and tuner additions
[deliverable/linux.git] / drivers / media / video / bttv-cards.c
CommitLineData
1da177e4 1/*
7fd0f3ac 2 $Id: bttv-cards.c,v 1.54 2005/07/19 18:26:46 mkrufky Exp $
1da177e4
LT
3
4 bttv-cards.c
5
6 this file has configuration informations - card-specific stuff
7 like the big tvcards array for the most part
8
9 Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
10 & Marcus Metzler (mocm@thp.uni-koeln.de)
11 (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
27*/
28
29#include <linux/config.h>
30#include <linux/delay.h>
31#include <linux/module.h>
32#include <linux/moduleparam.h>
33#include <linux/kmod.h>
34#include <linux/init.h>
35#include <linux/pci.h>
36#include <linux/vmalloc.h>
37#include <linux/firmware.h>
38
39#include <asm/io.h>
40
41#include "bttvp.h"
1da177e4
LT
42
43/* fwd decl */
44static void boot_msp34xx(struct bttv *btv, int pin);
45static void boot_bt832(struct bttv *btv);
46static void hauppauge_eeprom(struct bttv *btv);
47static void avermedia_eeprom(struct bttv *btv);
48static void osprey_eeprom(struct bttv *btv);
49static void modtec_eeprom(struct bttv *btv);
50static void init_PXC200(struct bttv *btv);
93b43f13 51static void init_RTV24(struct bttv *btv);
1da177e4
LT
52
53static void winview_audio(struct bttv *btv, struct video_audio *v, int set);
54static void lt9415_audio(struct bttv *btv, struct video_audio *v, int set);
55static void avermedia_tvphone_audio(struct bttv *btv, struct video_audio *v,
56 int set);
57static void avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v,
58 int set);
59static void terratv_audio(struct bttv *btv, struct video_audio *v, int set);
60static void gvbctv3pci_audio(struct bttv *btv, struct video_audio *v, int set);
61static void gvbctv5pci_audio(struct bttv *btv, struct video_audio *v, int set);
62static void winfast2000_audio(struct bttv *btv, struct video_audio *v, int set);
63static void pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set);
64static void fv2000s_audio(struct bttv *btv, struct video_audio *v, int set);
65static void windvr_audio(struct bttv *btv, struct video_audio *v, int set);
66static void adtvk503_audio(struct bttv *btv, struct video_audio *v, int set);
67static void rv605_muxsel(struct bttv *btv, unsigned int input);
68static void eagle_muxsel(struct bttv *btv, unsigned int input);
69static void xguard_muxsel(struct bttv *btv, unsigned int input);
70static void ivc120_muxsel(struct bttv *btv, unsigned int input);
71static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
72
73static void PXC200_muxsel(struct bttv *btv, unsigned int input);
74
75static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
76static void picolo_tetra_init(struct bttv *btv);
77
78static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
79static void tibetCS16_init(struct bttv *btv);
80
81static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
82static void kodicom4400r_init(struct bttv *btv);
83
84static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
85static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
86
87static int terratec_active_radio_upgrade(struct bttv *btv);
88static int tea5757_read(struct bttv *btv);
89static int tea5757_write(struct bttv *btv, int value);
90static void identify_by_eeprom(struct bttv *btv,
91 unsigned char eeprom_data[256]);
92static int __devinit pvr_boot(struct bttv *btv);
93
94/* config variables */
95static unsigned int triton1=0;
96static unsigned int vsfx=0;
97static unsigned int latency = UNSET;
4dcef524 98int no_overlay=-1;
1da177e4
LT
99
100static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
101static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
102static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
103static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
104static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
105static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
106#ifdef MODULE
107static unsigned int autoload = 1;
108#else
109static unsigned int autoload = 0;
110#endif
111static unsigned int gpiomask = UNSET;
112static unsigned int audioall = UNSET;
113static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
114
115/* insmod options */
116module_param(triton1, int, 0444);
117module_param(vsfx, int, 0444);
118module_param(no_overlay, int, 0444);
119module_param(latency, int, 0444);
120module_param(gpiomask, int, 0444);
121module_param(audioall, int, 0444);
122module_param(autoload, int, 0444);
123
124module_param_array(card, int, NULL, 0444);
125module_param_array(pll, int, NULL, 0444);
126module_param_array(tuner, int, NULL, 0444);
127module_param_array(svhs, int, NULL, 0444);
128module_param_array(remote, int, NULL, 0444);
129module_param_array(audiomux, int, NULL, 0444);
130
131MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
132 "[enable bug compatibility for triton1 + others]");
133MODULE_PARM_DESC(vsfx,"set VSFX pci config bit "
134 "[yet another chipset flaw workaround]");
135MODULE_PARM_DESC(latency,"pci latency timer");
136MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
137MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
138MODULE_PARM_DESC(tuner,"specify installed tuner type");
139MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
140
141/* ----------------------------------------------------------------------- */
142/* list of card IDs for bt878+ cards */
143
144static struct CARD {
145 unsigned id;
146 int cardnr;
147 char *name;
148} cards[] __devinitdata = {
149 { 0x13eb0070, BTTV_HAUPPAUGE878, "Hauppauge WinTV" },
150 { 0x39000070, BTTV_HAUPPAUGE878, "Hauppauge WinTV-D" },
151 { 0x45000070, BTTV_HAUPPAUGEPVR, "Hauppauge WinTV/PVR" },
152 { 0xff000070, BTTV_OSPREY1x0, "Osprey-100" },
153 { 0xff010070, BTTV_OSPREY2x0_SVID,"Osprey-200" },
154 { 0xff020070, BTTV_OSPREY500, "Osprey-500" },
155 { 0xff030070, BTTV_OSPREY2000, "Osprey-2000" },
156 { 0xff040070, BTTV_OSPREY540, "Osprey-540" },
157
158 { 0x00011002, BTTV_ATI_TVWONDER, "ATI TV Wonder" },
159 { 0x00031002, BTTV_ATI_TVWONDERVE,"ATI TV Wonder/VE" },
160
161 { 0x6606107d, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" },
162 { 0x6607107d, BTTV_WINFASTVC100, "Leadtek WinFast VC 100" },
163 { 0x6609107d, BTTV_WINFAST2000, "Leadtek TV 2000 XP" },
164 { 0x263610b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
165 { 0x264510b4, BTTV_STB2, "STB TV PCI FM, Gateway P/N 6000704" },
166 { 0x402010fc, BTTV_GVBCTV3PCI, "I-O Data Co. GV-BCTV3/PCI" },
167 { 0x405010fc, BTTV_GVBCTV4PCI, "I-O Data Co. GV-BCTV4/PCI" },
168 { 0x407010fc, BTTV_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
169 { 0xd01810fc, BTTV_GVBCTV5PCI, "I-O Data Co. GV-BCTV5/PCI" },
170
171 { 0x001211bd, BTTV_PINNACLE, "Pinnacle PCTV" },
172 // some cards ship with byteswapped IDs ...
173 { 0x1200bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" },
174 { 0xff00bd11, BTTV_PINNACLE, "Pinnacle PCTV [bswap]" },
175 // this seems to happen as well ...
176 { 0xff1211bd, BTTV_PINNACLE, "Pinnacle PCTV" },
177
178 { 0x3000121a, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
179 { 0x263710b4, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
180 { 0x3060121a, BTTV_STB2, "3Dfx VoodooTV 100/ STB OEM" },
181
182 { 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
183 { 0xa005144f, BTTV_MAGICTVIEW063, "CPH06X TView99-Card" },
184 { 0x3002144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
185 { 0x3005144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
186 { 0x5000144f, BTTV_MAGICTVIEW061, "Askey CPH050" },
187 { 0x300014ff, BTTV_MAGICTVIEW061, "TView 99 (CPH061)" },
188 { 0x300214ff, BTTV_PHOEBE_TVMAS, "Phoebe TV Master (CPH060)" },
189
190 { 0x00011461, BTTV_AVPHONE98, "AVerMedia TVPhone98" },
191 { 0x00021461, BTTV_AVERMEDIA98, "AVermedia TVCapture 98" },
192 { 0x00031461, BTTV_AVPHONE98, "AVerMedia TVPhone98" },
193 { 0x00041461, BTTV_AVERMEDIA98, "AVerMedia TVCapture 98" },
194 { 0x03001461, BTTV_AVERMEDIA98, "VDOMATE TV TUNER CARD" },
195
196 { 0x1117153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL B/G)" },
197 { 0x1118153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
198 { 0x1119153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
199 { 0x111a153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
200
201 { 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV Radio+" },
202 { 0x1127153b, BTTV_TERRATV, "Terratec TV+ (V1.05)" },
203 // clashes with FlyVideo
204 //{ 0x18521852, BTTV_TERRATV, "Terratec TV+ (V1.10)" },
205 { 0x1134153b, BTTV_TERRATVALUE, "Terratec TValue (LR102)" },
206 { 0x1135153b, BTTV_TERRATVALUER, "Terratec TValue Radio" }, // LR102
207 { 0x5018153b, BTTV_TERRATVALUE, "Terratec TValue" }, // ??
208 { 0xff3b153b, BTTV_TERRATVALUER, "Terratec TValue Radio" }, // ??
209
210 { 0x400015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
211 { 0x400a15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV" },
212 { 0x400d15b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
213 { 0x401015b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
214 { 0x401615b0, BTTV_ZOLTRIX_GENIE, "Zoltrix Genie TV / Radio" },
215
216 { 0x1430aa00, BTTV_PV143, "Provideo PV143A" },
217 { 0x1431aa00, BTTV_PV143, "Provideo PV143B" },
218 { 0x1432aa00, BTTV_PV143, "Provideo PV143C" },
219 { 0x1433aa00, BTTV_PV143, "Provideo PV143D" },
220 { 0x1433aa03, BTTV_PV143, "Security Eyes" },
221
222 { 0x1460aa00, BTTV_PV150, "Provideo PV150A-1" },
223 { 0x1461aa01, BTTV_PV150, "Provideo PV150A-2" },
224 { 0x1462aa02, BTTV_PV150, "Provideo PV150A-3" },
225 { 0x1463aa03, BTTV_PV150, "Provideo PV150A-4" },
226
227 { 0x1464aa04, BTTV_PV150, "Provideo PV150B-1" },
228 { 0x1465aa05, BTTV_PV150, "Provideo PV150B-2" },
229 { 0x1466aa06, BTTV_PV150, "Provideo PV150B-3" },
230 { 0x1467aa07, BTTV_PV150, "Provideo PV150B-4" },
231
232 { 0xa132ff00, BTTV_IVC100, "IVC-100" },
233 { 0xa1550000, BTTV_IVC200, "IVC-200" },
234 { 0xa1550001, BTTV_IVC200, "IVC-200" },
235 { 0xa1550002, BTTV_IVC200, "IVC-200" },
236 { 0xa1550003, BTTV_IVC200, "IVC-200" },
237 { 0xa1550100, BTTV_IVC200, "IVC-200G" },
238 { 0xa1550101, BTTV_IVC200, "IVC-200G" },
239 { 0xa1550102, BTTV_IVC200, "IVC-200G" },
240 { 0xa1550103, BTTV_IVC200, "IVC-200G" },
241 { 0xa182ff00, BTTV_IVC120, "IVC-120G" },
242 { 0xa182ff01, BTTV_IVC120, "IVC-120G" },
243 { 0xa182ff02, BTTV_IVC120, "IVC-120G" },
244 { 0xa182ff03, BTTV_IVC120, "IVC-120G" },
245 { 0xa182ff04, BTTV_IVC120, "IVC-120G" },
246 { 0xa182ff05, BTTV_IVC120, "IVC-120G" },
247 { 0xa182ff06, BTTV_IVC120, "IVC-120G" },
248 { 0xa182ff07, BTTV_IVC120, "IVC-120G" },
249 { 0xa182ff08, BTTV_IVC120, "IVC-120G" },
250 { 0xa182ff09, BTTV_IVC120, "IVC-120G" },
251 { 0xa182ff0a, BTTV_IVC120, "IVC-120G" },
252 { 0xa182ff0b, BTTV_IVC120, "IVC-120G" },
253 { 0xa182ff0c, BTTV_IVC120, "IVC-120G" },
254 { 0xa182ff0d, BTTV_IVC120, "IVC-120G" },
255 { 0xa182ff0e, BTTV_IVC120, "IVC-120G" },
256 { 0xa182ff0f, BTTV_IVC120, "IVC-120G" },
257
258 { 0x41424344, BTTV_GRANDTEC, "GrandTec Multi Capture" },
259 { 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" },
260
261 { 0x18501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
262 { 0xa0501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
263 { 0x18511851, BTTV_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
264 { 0x18521852, BTTV_TYPHOON_TVIEW, "FlyVideo 98FM (LR50)/ Typhoon TView TV/FM Tuner" },
265 { 0x41a0a051, BTTV_FLYVIDEO_98FM, "Lifeview FlyVideo 98 LR50 Rev Q" },
266 { 0x18501f7f, BTTV_FLYVIDEO_98, "Lifeview Flyvideo 98" },
267
268 { 0x010115cb, BTTV_GMV1, "AG GMV1" },
269 { 0x010114c7, BTTV_MODTEC_205, "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV" },
270
271 { 0x10b42636, BTTV_HAUPPAUGE878, "STB ???" },
272 { 0x217d6606, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" },
273 { 0xfff6f6ff, BTTV_WINFAST2000, "Leadtek WinFast TV 2000" },
274 { 0x03116000, BTTV_SENSORAY311, "Sensoray 311" },
275 { 0x00790e11, BTTV_WINDVR, "Canopus WinDVR PCI" },
276 { 0xa0fca1a0, BTTV_ZOLTRIX, "Face to Face Tvmax" },
277 { 0x20007063, BTTV_PC_HDTV, "pcHDTV HD-2000 TV"},
278 { 0x82b2aa6a, BTTV_SIMUS_GVC1100, "SIMUS GVC1100" },
279 { 0x146caa0c, BTTV_PV951, "ituner spectra8" },
280 { 0x200a1295, BTTV_PXC200, "ImageNation PXC200A" },
281
282 { 0x40111554, BTTV_PV_BT878P_9B, "Prolink Pixelview PV-BT" },
283 { 0x17de0a01, BTTV_KWORLD, "Mecer TV/FM/Video Tuner" },
284
285 { 0x01051805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #1" },
286 { 0x01061805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #2" },
287 { 0x01071805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #3" },
288 { 0x01081805, BTTV_PICOLO_TETRA_CHIP, "Picolo Tetra Chip #4" },
289
290 // likely broken, vendor id doesn't match the other magic views ...
291 //{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" },
292
293 // DVB cards (using pci function .1 for mpeg data xfer)
294 { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
295 { 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T 761" },
296 { 0x001c11bd, BTTV_PINNACLESAT, "Pinnacle PCTV Sat" },
297 { 0x002611bd, BTTV_TWINHAN_DST, "Pinnacle PCTV SAT CI" },
298 { 0x00011822, BTTV_TWINHAN_DST, "Twinhan VisionPlus DVB" },
299 { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
300 { 0x07711461, BTTV_AVDVBT_771, "AVermedia AverTV DVB-T 771" },
301 { 0xdb1018ac, BTTV_DVICO_DVBT_LITE, "DVICO FusionHDTV DVB-T Lite" },
302
303 { 0, -1, NULL }
304};
305
306/* ----------------------------------------------------------------------- */
307/* array with description for bt848 / bt878 tv/grabber cards */
308
309struct tvcard bttv_tvcards[] = {
310{
311/* ---- card 0x00 ---------------------------------- */
312 .name = " *** UNKNOWN/GENERIC *** ",
313 .video_inputs = 4,
314 .audio_inputs = 1,
315 .tuner = 0,
316 .svhs = 2,
317 .muxsel = { 2, 3, 1, 0},
318 .tuner_type = -1,
319},{
320 .name = "MIRO PCTV",
321 .video_inputs = 4,
322 .audio_inputs = 1,
323 .tuner = 0,
324 .svhs = 2,
325 .gpiomask = 15,
326 .muxsel = { 2, 3, 1, 1},
327 .audiomux = { 2, 0, 0, 0, 10},
328 .needs_tvaudio = 1,
329 .tuner_type = -1,
330},{
331 .name = "Hauppauge (bt848)",
332 .video_inputs = 4,
333 .audio_inputs = 1,
334 .tuner = 0,
335 .svhs = 2,
336 .gpiomask = 7,
337 .muxsel = { 2, 3, 1, 1},
338 .audiomux = { 0, 1, 2, 3, 4},
339 .needs_tvaudio = 1,
340 .tuner_type = -1,
341},{
342 .name = "STB, Gateway P/N 6000699 (bt848)",
343 .video_inputs = 3,
344 .audio_inputs = 1,
345 .tuner = 0,
346 .svhs = 2,
347 .gpiomask = 7,
348 .muxsel = { 2, 3, 1, 1},
349 .audiomux = { 4, 0, 2, 3, 1},
350 .no_msp34xx = 1,
351 .needs_tvaudio = 1,
352 .tuner_type = TUNER_PHILIPS_NTSC,
353 .pll = PLL_28,
354 .has_radio = 1,
355},{
356
357/* ---- card 0x04 ---------------------------------- */
358 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
359 .video_inputs = 4,
360 .audio_inputs = 0,
361 .tuner = -1,
362 .svhs = 2,
363 .gpiomask = 0,
364 .muxsel = { 2, 3, 1, 1},
365 .audiomux = { 0 },
366 .needs_tvaudio = 0,
367 .tuner_type = 4,
368},{
369 .name = "Diamond DTV2000",
370 .video_inputs = 4,
371 .audio_inputs = 1,
372 .tuner = 0,
373 .svhs = 2,
374 .gpiomask = 3,
375 .muxsel = { 2, 3, 1, 0},
376 .audiomux = { 0, 1, 0, 1, 3},
377 .needs_tvaudio = 1,
378 .tuner_type = -1,
379},{
380 .name = "AVerMedia TVPhone",
381 .video_inputs = 3,
382 .audio_inputs = 1,
383 .tuner = 0,
384 .svhs = 3,
385 .muxsel = { 2, 3, 1, 1},
386 .gpiomask = 0x0f,
387 .audiomux = { 0x0c, 0x04, 0x08, 0x04, 0},
388 /* 0x04 for some cards ?? */
389 .needs_tvaudio = 1,
390 .tuner_type = -1,
391 .audio_hook = avermedia_tvphone_audio,
392 .has_remote = 1,
393},{
394 .name = "MATRIX-Vision MV-Delta",
395 .video_inputs = 5,
396 .audio_inputs = 1,
397 .tuner = -1,
398 .svhs = 3,
399 .gpiomask = 0,
400 .muxsel = { 2, 3, 1, 0, 0},
401 .audiomux = {0 },
402 .needs_tvaudio = 1,
403 .tuner_type = -1,
404},{
405
406/* ---- card 0x08 ---------------------------------- */
407 .name = "Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26",
408 .video_inputs = 4,
409 .audio_inputs = 1,
410 .tuner = 0,
411 .svhs = 2,
412 .gpiomask = 0xc00,
413 .muxsel = { 2, 3, 1, 1},
414 .audiomux = { 0, 0xc00, 0x800, 0x400, 0xc00, 0},
415 .needs_tvaudio = 1,
416 .pll = PLL_28,
417 .tuner_type = -1,
418},{
419 .name = "IMS/IXmicro TurboTV",
420 .video_inputs = 3,
421 .audio_inputs = 1,
422 .tuner = 0,
423 .svhs = 2,
424 .gpiomask = 3,
425 .muxsel = { 2, 3, 1, 1},
426 .audiomux = { 1, 1, 2, 3, 0},
427 .needs_tvaudio = 0,
428 .pll = PLL_28,
429 .tuner_type = TUNER_TEMIC_PAL,
430},{
431 .name = "Hauppauge (bt878)",
432 .video_inputs = 4,
433 .audio_inputs = 1,
434 .tuner = 0,
435 .svhs = 2,
436 .gpiomask = 0x0f, /* old: 7 */
437 .muxsel = { 2, 0, 1, 1},
438 .audiomux = { 0, 1, 2, 3, 4},
439 .needs_tvaudio = 1,
440 .pll = PLL_28,
441 .tuner_type = -1,
442},{
443 .name = "MIRO PCTV pro",
444 .video_inputs = 3,
445 .audio_inputs = 1,
446 .tuner = 0,
447 .svhs = 2,
448 .gpiomask = 0x3014f,
449 .muxsel = { 2, 3, 1, 1},
450 .audiomux = { 0x20001,0x10001, 0, 0,10},
451 .needs_tvaudio = 1,
452 .tuner_type = -1,
453},{
454
455/* ---- card 0x0c ---------------------------------- */
456 .name = "ADS Technologies Channel Surfer TV (bt848)",
457 .video_inputs = 3,
458 .audio_inputs = 1,
459 .tuner = 0,
460 .svhs = 2,
461 .gpiomask = 15,
462 .muxsel = { 2, 3, 1, 1},
463 .audiomux = { 13, 14, 11, 7, 0, 0},
464 .needs_tvaudio = 1,
465 .tuner_type = -1,
466},{
467 .name = "AVerMedia TVCapture 98",
468 .video_inputs = 3,
469 .audio_inputs = 4,
470 .tuner = 0,
471 .svhs = 2,
472 .gpiomask = 15,
473 .muxsel = { 2, 3, 1, 1},
474 .audiomux = { 13, 14, 11, 7, 0, 0},
475 .needs_tvaudio = 1,
476 .msp34xx_alt = 1,
477 .pll = PLL_28,
478 .tuner_type = TUNER_PHILIPS_PAL,
479 .audio_hook = avermedia_tv_stereo_audio,
480},{
481 .name = "Aimslab Video Highway Xtreme (VHX)",
482 .video_inputs = 3,
483 .audio_inputs = 1,
484 .tuner = 0,
485 .svhs = 2,
486 .gpiomask = 7,
487 .muxsel = { 2, 3, 1, 1},
488 .audiomux = { 0, 2, 1, 3, 4}, /* old: { 0, 1, 2, 3, 4} */
489 .needs_tvaudio = 1,
490 .pll = PLL_28,
491 .tuner_type = -1,
492},{
493 .name = "Zoltrix TV-Max",
494 .video_inputs = 3,
495 .audio_inputs = 1,
496 .tuner = 0,
497 .svhs = 2,
498 .gpiomask = 15,
499 .muxsel = { 2, 3, 1, 1},
500 .audiomux = {0 , 0, 1 , 0, 10},
501 .needs_tvaudio = 1,
502 .tuner_type = -1,
503},{
504
505/* ---- card 0x10 ---------------------------------- */
506 .name = "Prolink Pixelview PlayTV (bt878)",
507 .video_inputs = 3,
508 .audio_inputs = 1,
509 .tuner = 0,
510 .svhs = 2,
511 .gpiomask = 0x01fe00,
512 .muxsel = { 2, 3, 1, 1},
1da177e4
LT
513 // 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru>
514 .audiomux = { 0x001e00, 0, 0x018000, 0x014000, 0x002000, 0 },
1da177e4
LT
515 .needs_tvaudio = 1,
516 .pll = PLL_28,
517 .tuner_type = -1,
518},{
519 .name = "Leadtek WinView 601",
520 .video_inputs = 3,
521 .audio_inputs = 1,
522 .tuner = 0,
523 .svhs = 2,
524 .gpiomask = 0x8300f8,
525 .muxsel = { 2, 3, 1, 1,0},
526 .audiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007,0xcfa007},
527 .needs_tvaudio = 1,
528 .tuner_type = -1,
529 .audio_hook = winview_audio,
530 .has_radio = 1,
531},{
532 .name = "AVEC Intercapture",
533 .video_inputs = 3,
534 .audio_inputs = 2,
535 .tuner = 0,
536 .svhs = 2,
537 .gpiomask = 0,
538 .muxsel = {2, 3, 1, 1},
539 .audiomux = {1, 0, 0, 0, 0},
540 .needs_tvaudio = 1,
541 .tuner_type = -1,
542},{
543 .name = "Lifeview FlyVideo II EZ /FlyKit LR38 Bt848 (capture only)",
544 .video_inputs = 4,
545 .audio_inputs = 1,
546 .tuner = -1,
547 .svhs = -1,
548 .gpiomask = 0x8dff00,
549 .muxsel = { 2, 3, 1, 1},
550 .audiomux = { 0 },
551 .no_msp34xx = 1,
552 .tuner_type = -1,
553},{
554
555/* ---- card 0x14 ---------------------------------- */
556 .name = "CEI Raffles Card",
557 .video_inputs = 3,
558 .audio_inputs = 3,
559 .tuner = 0,
560 .svhs = 2,
561 .muxsel = {2, 3, 1, 1},
562 .tuner_type = -1,
563},{
564 .name = "Lifeview FlyVideo 98/ Lucky Star Image World ConferenceTV LR50",
565 .video_inputs = 4,
566 .audio_inputs = 2, // tuner, line in
567 .tuner = 0,
568 .svhs = 2,
569 .gpiomask = 0x1800,
570 .muxsel = { 2, 3, 1, 1},
571 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800},
572 .pll = PLL_28,
573 .tuner_type = TUNER_PHILIPS_PAL_I,
574},{
575 .name = "Askey CPH050/ Phoebe Tv Master + FM",
576 .video_inputs = 3,
577 .audio_inputs = 1,
578 .tuner = 0,
579 .svhs = 2,
580 .gpiomask = 0xc00,
581 .muxsel = { 2, 3, 1, 1},
582 .audiomux = {0, 1, 0x800, 0x400, 0xc00, 0},
583 .needs_tvaudio = 1,
584 .pll = PLL_28,
585 .tuner_type = -1,
586},{
587 .name = "Modular Technology MM201/MM202/MM205/MM210/MM215 PCTV, bt878",
588 .video_inputs = 3,
589 .audio_inputs = 1,
590 .tuner = 0,
591 .svhs = -1,
592 .gpiomask = 7,
593 .muxsel = { 2, 3, -1 },
594 .digital_mode = DIGITAL_MODE_CAMERA,
595 .audiomux = { 0, 0, 0, 0, 0 },
596 .no_msp34xx = 1,
597 .pll = PLL_28,
598 .tuner_type = TUNER_ALPS_TSBB5_PAL_I,
599},{
600
601/* ---- card 0x18 ---------------------------------- */
602 .name = "Askey CPH05X/06X (bt878) [many vendors]",
603 .video_inputs = 3,
604 .audio_inputs = 1,
605 .tuner = 0,
606 .svhs = 2,
607 .gpiomask = 0xe00,
608 .muxsel = { 2, 3, 1, 1},
609 .audiomux = {0x400, 0x400, 0x400, 0x400, 0xc00},
610 .needs_tvaudio = 1,
611 .pll = PLL_28,
612 .tuner_type = -1,
613 .has_remote = 1,
614},{
615 .name = "Terratec TerraTV+ Version 1.0 (Bt848)/ Terra TValue Version 1.0/ Vobis TV-Boostar",
616 .video_inputs = 3,
617 .audio_inputs = 1,
618 .tuner = 0,
619 .svhs = 2,
620 .gpiomask = 0x1f0fff,
621 .muxsel = { 2, 3, 1, 1},
622 .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000},
623 .needs_tvaudio = 0,
624 .tuner_type = TUNER_PHILIPS_PAL,
625 .audio_hook = terratv_audio,
626},{
627 .name = "Hauppauge WinCam newer (bt878)",
628 .video_inputs = 4,
629 .audio_inputs = 1,
630 .tuner = 0,
631 .svhs = 3,
632 .gpiomask = 7,
633 .muxsel = { 2, 0, 1, 1},
634 .audiomux = { 0, 1, 2, 3, 4},
635 .needs_tvaudio = 1,
636 .tuner_type = -1,
637},{
638 .name = "Lifeview FlyVideo 98/ MAXI TV Video PCI2 LR50",
639 .video_inputs = 4,
640 .audio_inputs = 2,
641 .tuner = 0,
642 .svhs = 2,
643 .gpiomask = 0x1800,
644 .muxsel = { 2, 3, 1, 1},
645 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800},
646 .pll = PLL_28,
647 .tuner_type = TUNER_PHILIPS_SECAM,
648},{
649
650/* ---- card 0x1c ---------------------------------- */
651 .name = "Terratec TerraTV+ Version 1.1 (bt878)",
652 .video_inputs = 3,
653 .audio_inputs = 1,
654 .tuner = 0,
655 .svhs = 2,
656 .gpiomask = 0x1f0fff,
657 .muxsel = { 2, 3, 1, 1},
658 .audiomux = { 0x20000, 0x30000, 0x10000, 0x00000, 0x40000},
659 .needs_tvaudio = 0,
660 .tuner_type = TUNER_PHILIPS_PAL,
661 .audio_hook = terratv_audio,
662 /* GPIO wiring:
663 External 20 pin connector (for Active Radio Upgrade board)
664 gpio00: i2c-sda
665 gpio01: i2c-scl
666 gpio02: om5610-data
667 gpio03: om5610-clk
668 gpio04: om5610-wre
669 gpio05: om5610-stereo
670 gpio06: rds6588-davn
671 gpio07: Pin 7 n.c.
672 gpio08: nIOW
673 gpio09+10: nIOR, nSEL ?? (bt878)
674 gpio09: nIOR (bt848)
675 gpio10: nSEL (bt848)
676 Sound Routing:
677 gpio16: u2-A0 (1st 4052bt)
678 gpio17: u2-A1
679 gpio18: u2-nEN
680 gpio19: u4-A0 (2nd 4052)
681 gpio20: u4-A1
682 u4-nEN - GND
683 Btspy:
684 00000 : Cdrom (internal audio input)
685 10000 : ext. Video audio input
686 20000 : TV Mono
687 a0000 : TV Mono/2
688 1a0000 : TV Stereo
689 30000 : Radio
690 40000 : Mute
691 */
692
693},{
694 /* Jannik Fritsch <jannik@techfak.uni-bielefeld.de> */
695 .name = "Imagenation PXC200",
696 .video_inputs = 5,
697 .audio_inputs = 1,
698 .tuner = -1,
699 .svhs = 1, /* was: 4 */
700 .gpiomask = 0,
701 .muxsel = { 2, 3, 1, 0, 0},
702 .audiomux = { 0 },
703 .needs_tvaudio = 1,
704 .tuner_type = -1,
705 .muxsel_hook = PXC200_muxsel,
706
707},{
708 .name = "Lifeview FlyVideo 98 LR50",
709 .video_inputs = 4,
710 .audio_inputs = 1,
711 .tuner = 0,
712 .svhs = 2,
713 .gpiomask = 0x1800, //0x8dfe00
714 .muxsel = { 2, 3, 1, 1},
715 .audiomux = { 0, 0x0800, 0x1000, 0x1000, 0x1800, 0 },
716 .pll = PLL_28,
717 .tuner_type = -1,
718},{
719 .name = "Formac iProTV, Formac ProTV I (bt848)",
720 .video_inputs = 4,
721 .audio_inputs = 1,
722 .tuner = 0,
723 .svhs = 3,
724 .gpiomask = 1,
725 .muxsel = { 2, 3, 1, 1},
726 .audiomux = { 1, 0, 0, 0, 0 },
727 .pll = PLL_28,
728 .tuner_type = TUNER_PHILIPS_PAL,
729},{
730
731/* ---- card 0x20 ---------------------------------- */
732 .name = "Intel Create and Share PCI/ Smart Video Recorder III",
733 .video_inputs = 4,
734 .audio_inputs = 0,
735 .tuner = -1,
736 .svhs = 2,
737 .gpiomask = 0,
738 .muxsel = { 2, 3, 1, 1},
739 .audiomux = { 0 },
740 .needs_tvaudio = 0,
741 .tuner_type = 4,
742},{
743 .name = "Terratec TerraTValue Version Bt878",
744 .video_inputs = 3,
745 .audio_inputs = 1,
746 .tuner = 0,
747 .svhs = 2,
748 .gpiomask = 0xffff00,
749 .muxsel = { 2, 3, 1, 1},
750 .audiomux = { 0x500, 0, 0x300, 0x900, 0x900},
751 .needs_tvaudio = 1,
752 .pll = PLL_28,
753 .tuner_type = TUNER_PHILIPS_PAL,
754},{
755 .name = "Leadtek WinFast 2000/ WinFast 2000 XP",
756 .video_inputs = 4,
757 .audio_inputs = 1,
758 .tuner = 0,
759 .svhs = 2,
760 .muxsel = { 2, 3, 1, 1, 0}, // TV, CVid, SVid, CVid over SVid connector
1da177e4
LT
761 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
762 .gpiomask = 0xb33000,
763 .audiomux = { 0x122000,0x1000,0x0000,0x620000,0x800000 },
1da177e4
LT
764 /* Audio Routing for "WinFast 2000 XP" (no tv stereo !)
765 gpio23 -- hef4052:nEnable (0x800000)
766 gpio12 -- hef4052:A1
767 gpio13 -- hef4052:A0
768 0x0000: external audio
769 0x1000: FM
770 0x2000: TV
771 0x3000: n.c.
772 Note: There exists another variant "Winfast 2000" with tv stereo !?
773 Note: eeprom only contains FF and pci subsystem id 107d:6606
774 */
775 .needs_tvaudio = 0,
776 .pll = PLL_28,
777 .has_radio = 1,
778 .tuner_type = 5, // default for now, gpio reads BFFF06 for Pal bg+dk
779 .audio_hook = winfast2000_audio,
780 .has_remote = 1,
781},{
782 .name = "Lifeview FlyVideo 98 LR50 / Chronos Video Shuttle II",
783 .video_inputs = 4,
784 .audio_inputs = 3,
785 .tuner = 0,
786 .svhs = 2,
787 .gpiomask = 0x1800,
788 .muxsel = { 2, 3, 1, 1},
789 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800},
790 .pll = PLL_28,
791 .tuner_type = -1,
792},{
793
794/* ---- card 0x24 ---------------------------------- */
795 .name = "Lifeview FlyVideo 98FM LR50 / Typhoon TView TV/FM Tuner",
796 .video_inputs = 4,
797 .audio_inputs = 3,
798 .tuner = 0,
799 .svhs = 2,
800 .gpiomask = 0x1800,
801 .muxsel = { 2, 3, 1, 1},
802 .audiomux = { 0, 0x800, 0x1000, 0x1000, 0x1800, 0 },
803 .pll = PLL_28,
804 .tuner_type = -1,
805 .has_radio = 1,
806},{
807 .name = "Prolink PixelView PlayTV pro",
808 .video_inputs = 3,
809 .audio_inputs = 1,
810 .tuner = 0,
811 .svhs = 2,
812 .gpiomask = 0xff,
813 .muxsel = { 2, 3, 1, 1 },
814 .audiomux = { 0x21, 0x20, 0x24, 0x2c, 0x29, 0x29 },
815 .no_msp34xx = 1,
816 .pll = PLL_28,
817 .tuner_type = -1,
818},{
819 .name = "Askey CPH06X TView99",
820 .video_inputs = 4,
821 .audio_inputs = 1,
822 .tuner = 0,
823 .svhs = 2,
824 .gpiomask = 0x551e00,
825 .muxsel = { 2, 3, 1, 0},
826 .audiomux = { 0x551400, 0x551200, 0, 0, 0x551c00, 0x551200 },
827 .needs_tvaudio = 1,
828 .pll = PLL_28,
829 .tuner_type = 1,
830 .has_remote = 1,
831},{
832 .name = "Pinnacle PCTV Studio/Rave",
833 .video_inputs = 3,
834 .audio_inputs = 1,
835 .tuner = 0,
836 .svhs = 2,
837 .gpiomask = 0x03000F,
838 .muxsel = { 2, 3, 1, 1},
839 .audiomux = { 2, 0xd0001, 0, 0, 1},
840 .needs_tvaudio = 0,
841 .pll = PLL_28,
842 .tuner_type = -1,
843},{
844
845/* ---- card 0x28 ---------------------------------- */
846 .name = "STB TV PCI FM, Gateway P/N 6000704 (bt878), 3Dfx VoodooTV 100",
847 .video_inputs = 3,
848 .audio_inputs = 1,
849 .tuner = 0,
850 .svhs = 2,
851 .gpiomask = 7,
852 .muxsel = { 2, 3, 1, 1},
853 .audiomux = { 4, 0, 2, 3, 1},
854 .no_msp34xx = 1,
855 .needs_tvaudio = 1,
856 .tuner_type = TUNER_PHILIPS_NTSC,
857 .pll = PLL_28,
858 .has_radio = 1,
859},{
860 .name = "AVerMedia TVPhone 98",
861 .video_inputs = 3,
862 .audio_inputs = 4,
863 .tuner = 0,
864 .svhs = 2,
865 .gpiomask = 15,
866 .muxsel = { 2, 3, 1, 1},
867 .audiomux = { 13, 4, 11, 7, 0, 0},
868 .needs_tvaudio = 1,
869 .pll = PLL_28,
870 .tuner_type = -1,
871 .has_radio = 1,
872 .audio_hook = avermedia_tvphone_audio,
873},{
874 .name = "ProVideo PV951", /* pic16c54 */
875 .video_inputs = 3,
876 .audio_inputs = 1,
877 .tuner = 0,
878 .svhs = 2,
879 .gpiomask = 0,
880 .muxsel = { 2, 3, 1, 1},
881 .audiomux = { 0, 0, 0, 0, 0},
882 .needs_tvaudio = 1,
883 .no_msp34xx = 1,
884 .pll = PLL_28,
885 .tuner_type = 1,
886},{
887 .name = "Little OnAir TV",
888 .video_inputs = 3,
889 .audio_inputs = 1,
890 .tuner = 0,
891 .svhs = 2,
892 .gpiomask = 0xe00b,
893 .muxsel = {2, 3, 1, 1},
894 .audiomux = {0xff9ff6, 0xff9ff6, 0xff1ff7, 0, 0xff3ffc},
895 .no_msp34xx = 1,
896 .tuner_type = -1,
897},{
898
899/* ---- card 0x2c ---------------------------------- */
900 .name = "Sigma TVII-FM",
901 .video_inputs = 2,
902 .audio_inputs = 1,
903 .tuner = 0,
904 .svhs = -1,
905 .gpiomask = 3,
906 .muxsel = {2, 3, 1, 1},
907 .audiomux = {1, 1, 0, 2, 3},
908 .no_msp34xx = 1,
909 .pll = PLL_NONE,
910 .tuner_type = -1,
911},{
912 .name = "MATRIX-Vision MV-Delta 2",
913 .video_inputs = 5,
914 .audio_inputs = 1,
915 .tuner = -1,
916 .svhs = 3,
917 .gpiomask = 0,
918 .muxsel = { 2, 3, 1, 0, 0},
919 .audiomux = {0 },
920 .no_msp34xx = 1,
921 .pll = PLL_28,
922 .tuner_type = -1,
923},{
924 .name = "Zoltrix Genie TV/FM",
925 .video_inputs = 3,
926 .audio_inputs = 1,
927 .tuner = 0,
928 .svhs = 2,
929 .gpiomask = 0xbcf03f,
930 .muxsel = { 2, 3, 1, 1},
931 .audiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0, 0xbcb03f},
932 .no_msp34xx = 1,
933 .pll = PLL_28,
934 .tuner_type = 21,
935},{
936 .name = "Terratec TV/Radio+",
937 .video_inputs = 3,
938 .audio_inputs = 1,
939 .tuner = 0,
940 .svhs = 2,
941 .gpiomask = 0x70000,
942 .muxsel = { 2, 3, 1, 1},
943 .audiomux = { 0x20000, 0x30000, 0x10000, 0, 0x40000, 0x20000 },
944 .needs_tvaudio = 1,
945 .no_msp34xx = 1,
946 .pll = PLL_35,
947 .tuner_type = 1,
948 .has_radio = 1,
949},{
950
951/* ---- card 0x30 ---------------------------------- */
952 .name = "Askey CPH03x/ Dynalink Magic TView",
953 .video_inputs = 3,
954 .audio_inputs = 1,
955 .tuner = 0,
956 .svhs = 2,
957 .gpiomask = 15,
958 .muxsel = { 2, 3, 1, 1},
959 .audiomux = {2,0,0,0,1},
960 .needs_tvaudio = 1,
961 .pll = PLL_28,
962 .tuner_type = -1,
963},{
964 .name = "IODATA GV-BCTV3/PCI",
965 .video_inputs = 3,
966 .audio_inputs = 1,
967 .tuner = 0,
968 .svhs = 2,
969 .gpiomask = 0x010f00,
970 .muxsel = {2, 3, 0, 0},
971 .audiomux = {0x10000, 0, 0x10000, 0, 0, 0},
972 .no_msp34xx = 1,
973 .pll = PLL_28,
974 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
975 .audio_hook = gvbctv3pci_audio,
976},{
977 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
978 .video_inputs = 5,
979 .audio_inputs = 1,
980 .tuner = 0,
981 .svhs = 3,
982 .gpiomask = 0xAA0000,
983 .muxsel = { 2,3,1,1,-1 },
984 .digital_mode = DIGITAL_MODE_CAMERA,
985 .audiomux = { 0x20000, 0, 0x80000, 0x80000, 0xa8000, 0x46000 },
986 .no_msp34xx = 1,
987 .pll = PLL_28,
988 .tuner_type = TUNER_PHILIPS_PAL_I,
989 .has_remote = 1,
990 /* GPIO wiring: (different from Rev.4C !)
991 GPIO17: U4.A0 (first hef4052bt)
992 GPIO19: U4.A1
993 GPIO20: U5.A1 (second hef4052bt)
994 GPIO21: U4.nEN
995 GPIO22: BT832 Reset Line
996 GPIO23: A5,A0, U5,nEN
997 Note: At i2c=0x8a is a Bt832 chip, which changes to 0x88 after being reset via GPIO22
998 */
999},{
1000 .name = "Eagle Wireless Capricorn2 (bt878A)",
1001 .video_inputs = 4,
1002 .audio_inputs = 1,
1003 .tuner = 0,
1004 .svhs = 2,
1005 .gpiomask = 7,
1006 .muxsel = { 2, 0, 1, 1},
1007 .audiomux = { 0, 1, 2, 3, 4},
1008 .pll = PLL_28,
1009 .tuner_type = -1 /* TUNER_ALPS_TMDH2_NTSC */,
1010},{
1011
1012/* ---- card 0x34 ---------------------------------- */