V4L/DVB (9062): Add support for Prolink Pixelview Global Extreme
[deliverable/linux.git] / drivers / media / video / cx88 / cx88-cards.c
CommitLineData
1da177e4 1/*
1da177e4
LT
2 *
3 * device driver for Conexant 2388x based TV cards
4 * card-specific stuff.
5 *
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/init.h>
24#include <linux/module.h>
25#include <linux/pci.h>
26#include <linux/delay.h>
27
28#include "cx88.h"
55c88610 29#include "tea5767.h"
1da177e4 30
bbc83597
TP
31static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
32static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34
35module_param_array(tuner, int, NULL, 0444);
36module_param_array(radio, int, NULL, 0444);
37module_param_array(card, int, NULL, 0444);
38
39MODULE_PARM_DESC(tuner,"tuner type");
40MODULE_PARM_DESC(radio,"radio tuner type");
41MODULE_PARM_DESC(card,"card type");
42
43static unsigned int latency = UNSET;
44module_param(latency,int,0444);
45MODULE_PARM_DESC(latency,"pci latency timer");
46
0f19e65b
MCC
47#define info_printk(core, fmt, arg...) \
48 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
49
50#define warn_printk(core, fmt, arg...) \
51 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
52
53#define err_printk(core, fmt, arg...) \
54 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
55
56
1da177e4
LT
57/* ------------------------------------------------------------------ */
58/* board config info */
59
4bf1226a
MCC
60/* If radio_type !=UNSET, radio_addr should be specified
61 */
62
bbc83597 63static const struct cx88_board cx88_boards[] = {
1da177e4
LT
64 [CX88_BOARD_UNKNOWN] = {
65 .name = "UNKNOWN/GENERIC",
66 .tuner_type = UNSET,
b45009b0
MCC
67 .radio_type = UNSET,
68 .tuner_addr = ADDR_UNSET,
69 .radio_addr = ADDR_UNSET,
1da177e4
LT
70 .input = {{
71 .type = CX88_VMUX_COMPOSITE1,
72 .vmux = 0,
73 },{
74 .type = CX88_VMUX_COMPOSITE2,
75 .vmux = 1,
76 },{
77 .type = CX88_VMUX_COMPOSITE3,
78 .vmux = 2,
79 },{
80 .type = CX88_VMUX_COMPOSITE4,
81 .vmux = 3,
82 }},
83 },
84 [CX88_BOARD_HAUPPAUGE] = {
85 .name = "Hauppauge WinTV 34xxx models",
86 .tuner_type = UNSET,
b45009b0
MCC
87 .radio_type = UNSET,
88 .tuner_addr = ADDR_UNSET,
89 .radio_addr = ADDR_UNSET,
1da177e4
LT
90 .tda9887_conf = TDA9887_PRESENT,
91 .input = {{
92 .type = CX88_VMUX_TELEVISION,
93 .vmux = 0,
94 .gpio0 = 0xff00, // internal decoder
95 },{
96 .type = CX88_VMUX_DEBUG,
97 .vmux = 0,
98 .gpio0 = 0xff01, // mono from tuner chip
99 },{
100 .type = CX88_VMUX_COMPOSITE1,
101 .vmux = 1,
102 .gpio0 = 0xff02,
103 },{
104 .type = CX88_VMUX_SVIDEO,
105 .vmux = 2,
106 .gpio0 = 0xff02,
107 }},
108 .radio = {
109 .type = CX88_RADIO,
110 .gpio0 = 0xff01,
111 },
112 },
113 [CX88_BOARD_GDI] = {
114 .name = "GDI Black Gold",
115 .tuner_type = UNSET,
b45009b0
MCC
116 .radio_type = UNSET,
117 .tuner_addr = ADDR_UNSET,
118 .radio_addr = ADDR_UNSET,
1da177e4
LT
119 .input = {{
120 .type = CX88_VMUX_TELEVISION,
121 .vmux = 0,
fd3113e8
MCC
122 },{
123 .type = CX88_VMUX_SVIDEO,
124 .vmux = 2,
1da177e4
LT
125 }},
126 },
127 [CX88_BOARD_PIXELVIEW] = {
128 .name = "PixelView",
b45009b0
MCC
129 .tuner_type = TUNER_PHILIPS_PAL,
130 .radio_type = UNSET,
131 .tuner_addr = ADDR_UNSET,
132 .radio_addr = ADDR_UNSET,
1da177e4
LT
133 .input = {{
134 .type = CX88_VMUX_TELEVISION,
135 .vmux = 0,
136 .gpio0 = 0xff00, // internal decoder
137 },{
138 .type = CX88_VMUX_COMPOSITE1,
139 .vmux = 1,
140 },{
141 .type = CX88_VMUX_SVIDEO,
142 .vmux = 2,
143 }},
144 .radio = {
145 .type = CX88_RADIO,
146 .gpio0 = 0xff10,
47ee2f38 147 },
1da177e4
LT
148 },
149 [CX88_BOARD_ATI_WONDER_PRO] = {
150 .name = "ATI TV Wonder Pro",
b45009b0
MCC
151 .tuner_type = TUNER_PHILIPS_4IN1,
152 .radio_type = UNSET,
153 .tuner_addr = ADDR_UNSET,
154 .radio_addr = ADDR_UNSET,
1da177e4
LT
155 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
156 .input = {{
157 .type = CX88_VMUX_TELEVISION,
158 .vmux = 0,
4ac97914 159 .gpio0 = 0x03ff,
1da177e4
LT
160 },{
161 .type = CX88_VMUX_COMPOSITE1,
162 .vmux = 1,
4ac97914 163 .gpio0 = 0x03fe,
1da177e4
LT
164 },{
165 .type = CX88_VMUX_SVIDEO,
166 .vmux = 2,
4ac97914 167 .gpio0 = 0x03fe,
1da177e4
LT
168 }},
169 },
4ac97914
MCC
170 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
171 .name = "Leadtek Winfast 2000XP Expert",
172 .tuner_type = TUNER_PHILIPS_4IN1,
b45009b0
MCC
173 .radio_type = UNSET,
174 .tuner_addr = ADDR_UNSET,
175 .radio_addr = ADDR_UNSET,
1da177e4 176 .tda9887_conf = TDA9887_PRESENT,
4ac97914
MCC
177 .input = {{
178 .type = CX88_VMUX_TELEVISION,
179 .vmux = 0,
1da177e4
LT
180 .gpio0 = 0x00F5e700,
181 .gpio1 = 0x00003004,
182 .gpio2 = 0x00F5e700,
183 .gpio3 = 0x02000000,
184 },{
185 .type = CX88_VMUX_COMPOSITE1,
186 .vmux = 1,
187 .gpio0 = 0x00F5c700,
188 .gpio1 = 0x00003004,
189 .gpio2 = 0x00F5c700,
190 .gpio3 = 0x02000000,
191 },{
192 .type = CX88_VMUX_SVIDEO,
193 .vmux = 2,
194 .gpio0 = 0x00F5c700,
195 .gpio1 = 0x00003004,
196 .gpio2 = 0x00F5c700,
197 .gpio3 = 0x02000000,
4ac97914
MCC
198 }},
199 .radio = {
200 .type = CX88_RADIO,
1da177e4
LT
201 .gpio0 = 0x00F5d700,
202 .gpio1 = 0x00003004,
203 .gpio2 = 0x00F5d700,
204 .gpio3 = 0x02000000,
4ac97914
MCC
205 },
206 },
7418f346 207 [CX88_BOARD_AVERTV_STUDIO_303] = {
1da177e4 208 .name = "AverTV Studio 303 (M126)",
b45009b0
MCC
209 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
210 .radio_type = UNSET,
211 .tuner_addr = ADDR_UNSET,
212 .radio_addr = ADDR_UNSET,
1da177e4
LT
213 .tda9887_conf = TDA9887_PRESENT,
214 .input = {{
215 .type = CX88_VMUX_TELEVISION,
216 .vmux = 0,
4aca4831 217 .gpio1 = 0xe09f,
1da177e4
LT
218 },{
219 .type = CX88_VMUX_COMPOSITE1,
220 .vmux = 1,
4aca4831 221 .gpio1 = 0xe05f,
1da177e4
LT
222 },{
223 .type = CX88_VMUX_SVIDEO,
224 .vmux = 2,
4aca4831 225 .gpio1 = 0xe05f,
1da177e4
LT
226 }},
227 .radio = {
4aca4831 228 .gpio1 = 0xe0df,
1da177e4
LT
229 .type = CX88_RADIO,
230 },
231 },
232 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
233 // added gpio values thanks to Michal
234 // values for PAL from DScaler
235 .name = "MSI TV-@nywhere Master",
b45009b0
MCC
236 .tuner_type = TUNER_MT2032,
237 .radio_type = UNSET,
238 .tuner_addr = ADDR_UNSET,
239 .radio_addr = ADDR_UNSET,
3ae1adc6 240 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
1da177e4
LT
241 .input = {{
242 .type = CX88_VMUX_TELEVISION,
243 .vmux = 0,
244 .gpio0 = 0x000040bf,
245 .gpio1 = 0x000080c0,
246 .gpio2 = 0x0000ff40,
247 },{
4ac97914
MCC
248 .type = CX88_VMUX_COMPOSITE1,
249 .vmux = 1,
1da177e4
LT
250 .gpio0 = 0x000040bf,
251 .gpio1 = 0x000080c0,
252 .gpio2 = 0x0000ff40,
253 },{
4ac97914
MCC
254 .type = CX88_VMUX_SVIDEO,
255 .vmux = 2,
1da177e4
LT
256 .gpio0 = 0x000040bf,
257 .gpio1 = 0x000080c0,
258 .gpio2 = 0x0000ff40,
4ac97914
MCC
259 }},
260 .radio = {
1da177e4 261 .type = CX88_RADIO,
55c88610
MCC
262 .vmux = 3,
263 .gpio0 = 0x000040bf,
264 .gpio1 = 0x000080c0,
265 .gpio2 = 0x0000ff20,
4ac97914 266 },
1da177e4
LT
267 },
268 [CX88_BOARD_WINFAST_DV2000] = {
4ac97914
MCC
269 .name = "Leadtek Winfast DV2000",
270 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
b45009b0
MCC
271 .radio_type = UNSET,
272 .tuner_addr = ADDR_UNSET,
273 .radio_addr = ADDR_UNSET,
1da177e4 274 .tda9887_conf = TDA9887_PRESENT,
4ac97914
MCC
275 .input = {{
276 .type = CX88_VMUX_TELEVISION,
277 .vmux = 0,
1da177e4
LT
278 .gpio0 = 0x0035e700,
279 .gpio1 = 0x00003004,
280 .gpio2 = 0x0035e700,
281 .gpio3 = 0x02000000,
282 },{
283
284 .type = CX88_VMUX_COMPOSITE1,
285 .vmux = 1,
286 .gpio0 = 0x0035c700,
287 .gpio1 = 0x00003004,
288 .gpio2 = 0x0035c700,
289 .gpio3 = 0x02000000,
290 },{
291 .type = CX88_VMUX_SVIDEO,
292 .vmux = 2,
293 .gpio0 = 0x0035c700,
294 .gpio1 = 0x0035c700,
295 .gpio2 = 0x02000000,
296 .gpio3 = 0x02000000,
297 }},
4ac97914 298 .radio = {
1da177e4
LT
299 .type = CX88_RADIO,
300 .gpio0 = 0x0035d700,
301 .gpio1 = 0x00007004,
302 .gpio2 = 0x0035d700,
303 .gpio3 = 0x02000000,
47ee2f38 304 },
4ac97914 305 },
b45009b0 306 [CX88_BOARD_LEADTEK_PVR2000] = {
1da177e4 307 // gpio values for PAL version from regspy by DScaler
b45009b0
MCC
308 .name = "Leadtek PVR 2000",
309 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
310 .radio_type = UNSET,
311 .tuner_addr = ADDR_UNSET,
312 .radio_addr = ADDR_UNSET,
1da177e4 313 .tda9887_conf = TDA9887_PRESENT,
b45009b0
MCC
314 .input = {{
315 .type = CX88_VMUX_TELEVISION,
316 .vmux = 0,
317 .gpio0 = 0x0000bde2,
7b27d45b 318 .audioroute = 1,
b45009b0
MCC
319 },{
320 .type = CX88_VMUX_COMPOSITE1,
321 .vmux = 1,
322 .gpio0 = 0x0000bde6,
7b27d45b 323 .audioroute = 1,
b45009b0
MCC
324 },{
325 .type = CX88_VMUX_SVIDEO,
326 .vmux = 2,
327 .gpio0 = 0x0000bde6,
7b27d45b 328 .audioroute = 1,
b45009b0
MCC
329 }},
330 .radio = {
331 .type = CX88_RADIO,
332 .gpio0 = 0x0000bd62,
7b27d45b 333 .audioroute = 1,
b45009b0 334 },
48d5e803 335 .mpeg = CX88_MPEG_BLACKBIRD,
b45009b0 336 },
1da177e4 337 [CX88_BOARD_IODATA_GVVCP3PCI] = {
4ac97914 338 .name = "IODATA GV-VCP3/PCI",
1da177e4 339 .tuner_type = TUNER_ABSENT,
4ac97914 340 .radio_type = UNSET,
b45009b0
MCC
341 .tuner_addr = ADDR_UNSET,
342 .radio_addr = ADDR_UNSET,
343 .input = {{
4ac97914
MCC
344 .type = CX88_VMUX_COMPOSITE1,
345 .vmux = 0,
346 },{
347 .type = CX88_VMUX_COMPOSITE2,
348 .vmux = 1,
349 },{
350 .type = CX88_VMUX_SVIDEO,
351 .vmux = 2,
352 }},
353 },
1da177e4 354 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
4ac97914
MCC
355 .name = "Prolink PlayTV PVR",
356 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
b45009b0
MCC
357 .radio_type = UNSET,
358 .tuner_addr = ADDR_UNSET,
359 .radio_addr = ADDR_UNSET,
1da177e4
LT
360 .tda9887_conf = TDA9887_PRESENT,
361 .input = {{
362 .type = CX88_VMUX_TELEVISION,
363 .vmux = 0,
fc34f165 364 .gpio0 = 0xbff0,
1da177e4
LT
365 },{
366 .type = CX88_VMUX_COMPOSITE1,
367 .vmux = 1,
fc34f165 368 .gpio0 = 0xbff3,
1da177e4
LT
369 },{
370 .type = CX88_VMUX_SVIDEO,
371 .vmux = 2,
fc34f165 372 .gpio0 = 0xbff3,
1da177e4
LT
373 }},
374 .radio = {
375 .type = CX88_RADIO,
fc34f165 376 .gpio0 = 0xbff0,
1da177e4
LT
377 },
378 },
379 [CX88_BOARD_ASUS_PVR_416] = {
380 .name = "ASUS PVR-416",
b45009b0
MCC
381 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
382 .radio_type = UNSET,
383 .tuner_addr = ADDR_UNSET,
384 .radio_addr = ADDR_UNSET,
385 .tda9887_conf = TDA9887_PRESENT,
1da177e4
LT
386 .input = {{
387 .type = CX88_VMUX_TELEVISION,
388 .vmux = 0,
389 .gpio0 = 0x0000fde6,
4ac97914 390 },{
1da177e4
LT
391 .type = CX88_VMUX_SVIDEO,
392 .vmux = 2,
393 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
7b27d45b 394 .audioroute = 1,
1da177e4 395 }},
4ac97914
MCC
396 .radio = {
397 .type = CX88_RADIO,
1da177e4 398 .gpio0 = 0x0000fde2,
4ac97914 399 },
48d5e803 400 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
401 },
402 [CX88_BOARD_MSI_TVANYWHERE] = {
403 .name = "MSI TV-@nywhere",
b45009b0
MCC
404 .tuner_type = TUNER_MT2032,
405 .radio_type = UNSET,
406 .tuner_addr = ADDR_UNSET,
407 .radio_addr = ADDR_UNSET,
1da177e4
LT
408 .tda9887_conf = TDA9887_PRESENT,
409 .input = {{
410 .type = CX88_VMUX_TELEVISION,
411 .vmux = 0,
412 .gpio0 = 0x00000fbf,
413 .gpio2 = 0x0000fc08,
414 },{
4ac97914
MCC
415 .type = CX88_VMUX_COMPOSITE1,
416 .vmux = 1,
1da177e4
LT
417 .gpio0 = 0x00000fbf,
418 .gpio2 = 0x0000fc68,
419 },{
4ac97914
MCC
420 .type = CX88_VMUX_SVIDEO,
421 .vmux = 2,
1da177e4
LT
422 .gpio0 = 0x00000fbf,
423 .gpio2 = 0x0000fc68,
4ac97914 424 }},
1da177e4 425 },
4ac97914
MCC
426 [CX88_BOARD_KWORLD_DVB_T] = {
427 .name = "KWorld/VStream XPert DVB-T",
1da177e4 428 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
429 .radio_type = UNSET,
430 .tuner_addr = ADDR_UNSET,
431 .radio_addr = ADDR_UNSET,
4ac97914
MCC
432 .input = {{
433 .type = CX88_VMUX_COMPOSITE1,
434 .vmux = 1,
1da177e4
LT
435 .gpio0 = 0x0700,
436 .gpio2 = 0x0101,
4ac97914
MCC
437 },{
438 .type = CX88_VMUX_SVIDEO,
439 .vmux = 2,
1da177e4
LT
440 .gpio0 = 0x0700,
441 .gpio2 = 0x0101,
4ac97914 442 }},
48d5e803 443 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
444 },
445 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
a82decf6 446 .name = "DViCO FusionHDTV DVB-T1",
1da177e4 447 .tuner_type = TUNER_ABSENT, /* No analog tuner */
b45009b0
MCC
448 .radio_type = UNSET,
449 .tuner_addr = ADDR_UNSET,
450 .radio_addr = ADDR_UNSET,
1da177e4
LT
451 .input = {{
452 .type = CX88_VMUX_COMPOSITE1,
453 .vmux = 1,
454 .gpio0 = 0x000027df,
47ee2f38 455 },{
1da177e4
LT
456 .type = CX88_VMUX_SVIDEO,
457 .vmux = 2,
458 .gpio0 = 0x000027df,
459 }},
48d5e803 460 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
461 },
462 [CX88_BOARD_KWORLD_LTV883] = {
463 .name = "KWorld LTV883RF",
b45009b0
MCC
464 .tuner_type = TUNER_TNF_8831BGFF,
465 .radio_type = UNSET,
466 .tuner_addr = ADDR_UNSET,
467 .radio_addr = ADDR_UNSET,
4ac97914
MCC
468 .input = {{
469 .type = CX88_VMUX_TELEVISION,
470 .vmux = 0,
471 .gpio0 = 0x07f8,
1da177e4
LT
472 },{
473 .type = CX88_VMUX_DEBUG,
474 .vmux = 0,
475 .gpio0 = 0x07f9, // mono from tuner chip
4ac97914
MCC
476 },{
477 .type = CX88_VMUX_COMPOSITE1,
478 .vmux = 1,
479 .gpio0 = 0x000007fa,
480 },{
481 .type = CX88_VMUX_SVIDEO,
482 .vmux = 2,
483 .gpio0 = 0x000007fa,
484 }},
485 .radio = {
486 .type = CX88_RADIO,
487 .gpio0 = 0x000007f8,
488 },
1da177e4 489 },
a82decf6
MCC
490 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
491 .name = "DViCO FusionHDTV 3 Gold-Q",
1da177e4 492 .tuner_type = TUNER_MICROTUNE_4042FI5,
b45009b0
MCC
493 .radio_type = UNSET,
494 .tuner_addr = ADDR_UNSET,
495 .radio_addr = ADDR_UNSET,
1da177e4
LT
496 /*
497 GPIO[0] resets DT3302 DTV receiver
498 0 - reset asserted
499 1 - normal operation
500 GPIO[1] mutes analog audio output connector
501 0 - enable selected source
502 1 - mute
503 GPIO[2] selects source for analog audio output connector
504 0 - analog audio input connector on tab
505 1 - analog DAC output from CX23881 chip
506 GPIO[3] selects RF input connector on tuner module
507 0 - RF connector labeled CABLE
508 1 - RF connector labeled ANT
a82decf6
MCC
509 GPIO[4] selects high RF for QAM256 mode
510 0 - normal RF
511 1 - high RF
1da177e4
LT
512 */
513 .input = {{
514 .type = CX88_VMUX_TELEVISION,
515 .vmux = 0,
516 .gpio0 = 0x0f0d,
517 },{
518 .type = CX88_VMUX_CABLE,
519 .vmux = 0,
520 .gpio0 = 0x0f05,
521 },{
522 .type = CX88_VMUX_COMPOSITE1,
523 .vmux = 1,
524 .gpio0 = 0x0f00,
525 },{
526 .type = CX88_VMUX_SVIDEO,
527 .vmux = 2,
528 .gpio0 = 0x0f00,
529 }},
48d5e803 530 .mpeg = CX88_MPEG_DVB,
1da177e4 531 },
4ac97914 532 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
b45009b0 533 .name = "Hauppauge Nova-T DVB-T",
1da177e4 534 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
535 .radio_type = UNSET,
536 .tuner_addr = ADDR_UNSET,
537 .radio_addr = ADDR_UNSET,
538 .input = {{
4ac97914
MCC
539 .type = CX88_VMUX_DVB,
540 .vmux = 0,
541 }},
48d5e803 542 .mpeg = CX88_MPEG_DVB,
1da177e4 543 },
4ac97914 544 [CX88_BOARD_CONEXANT_DVB_T1] = {
1da177e4
LT
545 .name = "Conexant DVB-T reference design",
546 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
547 .radio_type = UNSET,
548 .tuner_addr = ADDR_UNSET,
549 .radio_addr = ADDR_UNSET,
4ac97914
MCC
550 .input = {{
551 .type = CX88_VMUX_DVB,
552 .vmux = 0,
553 }},
48d5e803 554 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
555 },
556 [CX88_BOARD_PROVIDEO_PV259] = {
557 .name = "Provideo PV259",
558 .tuner_type = TUNER_PHILIPS_FQ1216ME,
b45009b0
MCC
559 .radio_type = UNSET,
560 .tuner_addr = ADDR_UNSET,
561 .radio_addr = ADDR_UNSET,
1da177e4
LT
562 .input = {{
563 .type = CX88_VMUX_TELEVISION,
564 .vmux = 0,
7b27d45b 565 .audioroute = 1,
1da177e4 566 }},
48d5e803 567 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
568 },
569 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
a82decf6 570 .name = "DViCO FusionHDTV DVB-T Plus",
1da177e4 571 .tuner_type = TUNER_ABSENT, /* No analog tuner */
b45009b0
MCC
572 .radio_type = UNSET,
573 .tuner_addr = ADDR_UNSET,
574 .radio_addr = ADDR_UNSET,
1da177e4
LT
575 .input = {{
576 .type = CX88_VMUX_COMPOSITE1,
577 .vmux = 1,
578 .gpio0 = 0x000027df,
47ee2f38 579 },{
1da177e4
LT
580 .type = CX88_VMUX_SVIDEO,
581 .vmux = 2,
582 .gpio0 = 0x000027df,
583 }},
48d5e803 584 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
585 },
586 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
4ac97914 587 .name = "digitalnow DNTV Live! DVB-T",
1da177e4 588 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
589 .radio_type = UNSET,
590 .tuner_addr = ADDR_UNSET,
591 .radio_addr = ADDR_UNSET,
4ac97914 592 .input = {{
1da177e4
LT
593 .type = CX88_VMUX_COMPOSITE1,
594 .vmux = 1,
595 .gpio0 = 0x00000700,
596 .gpio2 = 0x00000101,
597 },{
598 .type = CX88_VMUX_SVIDEO,
599 .vmux = 2,
600 .gpio0 = 0x00000700,
601 .gpio2 = 0x00000101,
602 }},
48d5e803 603 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
604 },
605 [CX88_BOARD_PCHDTV_HD3000] = {
606 .name = "pcHDTV HD3000 HDTV",
9175b854 607 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
608 .radio_type = UNSET,
609 .tuner_addr = ADDR_UNSET,
610 .radio_addr = ADDR_UNSET,
e4f5c82a 611 .tda9887_conf = TDA9887_PRESENT,
19dc74b7
TP
612 /* GPIO[2] = audio source for analog audio out connector
613 * 0 = analog audio input connector
614 * 1 = CX88 audio DACs
615 *
616 * GPIO[7] = input to CX88's audio/chroma ADC
617 * 0 = FM 10.7 MHz IF
618 * 1 = Sound 4.5 MHz IF
619 *
620 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
621 *
622 * GPIO[16] = Remote control input
623 */
1da177e4
LT
624 .input = {{
625 .type = CX88_VMUX_TELEVISION,
626 .vmux = 0,
627 .gpio0 = 0x00008484,
1da177e4
LT
628 },{
629 .type = CX88_VMUX_COMPOSITE1,
630 .vmux = 1,
631 .gpio0 = 0x00008400,
1da177e4
LT
632 },{
633 .type = CX88_VMUX_SVIDEO,
634 .vmux = 2,
635 .gpio0 = 0x00008400,
1da177e4
LT
636 }},
637 .radio = {
638 .type = CX88_RADIO,
19dc74b7 639 .gpio0 = 0x00008404,
1da177e4 640 },
48d5e803 641 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
642 },
643 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
644 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
645 // GPIO values obtained from regspy, courtesy Sean Covel
b45009b0
MCC
646 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
647 .tuner_type = UNSET,
648 .radio_type = UNSET,
649 .tuner_addr = ADDR_UNSET,
650 .radio_addr = ADDR_UNSET,
1da177e4
LT
651 .input = {{
652 .type = CX88_VMUX_TELEVISION,
653 .vmux = 0,
0345c387 654 .gpio0 = 0xed1a,
1da177e4
LT
655 .gpio2 = 0x00ff,
656 },{
657 .type = CX88_VMUX_DEBUG,
658 .vmux = 0,
0345c387 659 .gpio0 = 0xff01,
1da177e4
LT
660 },{
661 .type = CX88_VMUX_COMPOSITE1,
662 .vmux = 1,
663 .gpio0 = 0xff02,
664 },{
665 .type = CX88_VMUX_SVIDEO,
666 .vmux = 2,
667 .gpio0 = 0xed92,
668 .gpio2 = 0x00ff,
669 }},
670 .radio = {
671 .type = CX88_RADIO,
672 .gpio0 = 0xed96,
673 .gpio2 = 0x00ff,
674 },
48d5e803 675 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
676 },
677 [CX88_BOARD_DIGITALLOGIC_MEC] = {
1da177e4 678 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
b45009b0
MCC
679 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
680 .radio_type = UNSET,
681 .tuner_addr = ADDR_UNSET,
682 .radio_addr = ADDR_UNSET,
1da177e4
LT
683 .tda9887_conf = TDA9887_PRESENT,
684 .input = {{
685 .type = CX88_VMUX_TELEVISION,
686 .vmux = 0,
b45009b0 687 .gpio0 = 0x00009d80,
7b27d45b 688 .audioroute = 1,
1da177e4
LT
689 },{
690 .type = CX88_VMUX_COMPOSITE1,
691 .vmux = 1,
b45009b0 692 .gpio0 = 0x00009d76,
7b27d45b 693 .audioroute = 1,
1da177e4
LT
694 },{
695 .type = CX88_VMUX_SVIDEO,
696 .vmux = 2,
b45009b0 697 .gpio0 = 0x00009d76,
7b27d45b 698 .audioroute = 1,
1da177e4
LT
699 }},
700 .radio = {
701 .type = CX88_RADIO,
b45009b0 702 .gpio0 = 0x00009d00,
7b27d45b 703 .audioroute = 1,
1da177e4 704 },
48d5e803 705 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
706 },
707 [CX88_BOARD_IODATA_GVBCTV7E] = {
708 .name = "IODATA GV/BCTV7E",
709 .tuner_type = TUNER_PHILIPS_FQ1286,
b45009b0
MCC
710 .radio_type = UNSET,
711 .tuner_addr = ADDR_UNSET,
712 .radio_addr = ADDR_UNSET,
1da177e4
LT
713 .tda9887_conf = TDA9887_PRESENT,
714 .input = {{
715 .type = CX88_VMUX_TELEVISION,
716 .vmux = 1,
717 .gpio1 = 0x0000e03f,
718 },{
719 .type = CX88_VMUX_COMPOSITE1,
720 .vmux = 2,
721 .gpio1 = 0x0000e07f,
722 },{
723 .type = CX88_VMUX_SVIDEO,
724 .vmux = 3,
725 .gpio1 = 0x0000e07f,
726 }}
727 },
239df2e2
MC
728 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
729 .name = "PixelView PlayTV Ultra Pro (Stereo)",
b45009b0
MCC
730 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
731 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
c5287ba1
MCC
732 .radio_type = UNSET,
733 .tuner_addr = ADDR_UNSET,
734 .radio_addr = ADDR_UNSET,
239df2e2
MC
735 .input = {{
736 .type = CX88_VMUX_TELEVISION,
737 .vmux = 0,
b45009b0 738 .gpio0 = 0xbf61, /* internal decoder */
239df2e2
MC
739 },{
740 .type = CX88_VMUX_COMPOSITE1,
741 .vmux = 1,
b45009b0 742 .gpio0 = 0xbf63,
239df2e2
MC
743 },{
744 .type = CX88_VMUX_SVIDEO,
745 .vmux = 2,
b45009b0 746 .gpio0 = 0xbf63,
239df2e2
MC
747 }},
748 .radio = {
b45009b0
MCC
749 .type = CX88_RADIO,
750 .gpio0 = 0xbf60,
751 },
239df2e2 752 },
4ac97914 753 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
a82decf6 754 .name = "DViCO FusionHDTV 3 Gold-T",
83ac8722 755 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
756 .radio_type = UNSET,
757 .tuner_addr = ADDR_UNSET,
758 .radio_addr = ADDR_UNSET,
e4f5c82a 759 .tda9887_conf = TDA9887_PRESENT,
a82decf6 760 .input = {{
4ac97914
MCC
761 .type = CX88_VMUX_TELEVISION,
762 .vmux = 0,
763 .gpio0 = 0x97ed,
764 },{
765 .type = CX88_VMUX_COMPOSITE1,
766 .vmux = 1,
767 .gpio0 = 0x97e9,
768 },{
769 .type = CX88_VMUX_SVIDEO,
770 .vmux = 2,
771 .gpio0 = 0x97e9,
772 }},
48d5e803 773 .mpeg = CX88_MPEG_DVB,
4ac97914
MCC
774 },
775 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
776 .name = "ADS Tech Instant TV DVB-T PCI",
a82decf6
MCC
777 .tuner_type = TUNER_ABSENT,
778 .radio_type = UNSET,
779 .tuner_addr = ADDR_UNSET,
780 .radio_addr = ADDR_UNSET,
781 .input = {{
4ac97914
MCC
782 .type = CX88_VMUX_COMPOSITE1,
783 .vmux = 1,
a82decf6
MCC
784 .gpio0 = 0x0700,
785 .gpio2 = 0x0101,
4ac97914
MCC
786 },{
787 .type = CX88_VMUX_SVIDEO,
788 .vmux = 2,
a82decf6
MCC
789 .gpio0 = 0x0700,
790 .gpio2 = 0x0101,
4ac97914 791 }},
48d5e803 792 .mpeg = CX88_MPEG_DVB,
a82decf6 793 },
e057ee11
MK
794 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
795 .name = "TerraTec Cinergy 1400 DVB-T",
796 .tuner_type = TUNER_ABSENT,
797 .input = {{
798 .type = CX88_VMUX_DVB,
799 .vmux = 0,
05eda249
HB
800 },{
801 .type = CX88_VMUX_COMPOSITE1,
802 .vmux = 2,
803 },{
804 .type = CX88_VMUX_SVIDEO,
805 .vmux = 2,
e057ee11 806 }},
48d5e803 807 .mpeg = CX88_MPEG_DVB,
e057ee11 808 },
9fef07ca
MK
809 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
810 .name = "DViCO FusionHDTV 5 Gold",
9c26c8b1 811 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
9fef07ca
MK
812 .radio_type = UNSET,
813 .tuner_addr = ADDR_UNSET,
814 .radio_addr = ADDR_UNSET,
e52e98a7 815 .tda9887_conf = TDA9887_PRESENT,
9fef07ca 816 .input = {{
4ac97914
MCC
817 .type = CX88_VMUX_TELEVISION,
818 .vmux = 0,
819 .gpio0 = 0x87fd,
820 },{
821 .type = CX88_VMUX_COMPOSITE1,
822 .vmux = 1,
823 .gpio0 = 0x87f9,
824 },{
825 .type = CX88_VMUX_SVIDEO,
826 .vmux = 2,
827 .gpio0 = 0x87f9,
828 }},
48d5e803 829 .mpeg = CX88_MPEG_DVB,
9fef07ca 830 },
d45170ed
NS
831 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
832 .name = "AverMedia UltraTV Media Center PCI 550",
833 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
834 .radio_type = UNSET,
835 .tuner_addr = ADDR_UNSET,
836 .radio_addr = ADDR_UNSET,
837 .tda9887_conf = TDA9887_PRESENT,
d45170ed
NS
838 .input = {{
839 .type = CX88_VMUX_COMPOSITE1,
840 .vmux = 0,
841 .gpio0 = 0x0000cd73,
7b27d45b 842 .audioroute = 1,
d45170ed
NS
843 },{
844 .type = CX88_VMUX_SVIDEO,
845 .vmux = 1,
846 .gpio0 = 0x0000cd73,
7b27d45b 847 .audioroute = 1,
d45170ed
NS
848 },{
849 .type = CX88_VMUX_TELEVISION,
850 .vmux = 3,
851 .gpio0 = 0x0000cdb3,
7b27d45b 852 .audioroute = 1,
d45170ed
NS
853 }},
854 .radio = {
855 .type = CX88_RADIO,
856 .vmux = 2,
857 .gpio0 = 0x0000cdf3,
7b27d45b 858 .audioroute = 1,
d45170ed 859 },
5b26c82f 860 .mpeg = CX88_MPEG_BLACKBIRD,
d45170ed 861 },
0bcc37c3
AW
862 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
863 /* Alexander Wold <awold@bigfoot.com> */
4ac97914
MCC
864 .name = "Kworld V-Stream Xpert DVD",
865 .tuner_type = UNSET,
866 .input = {{
867 .type = CX88_VMUX_COMPOSITE1,
868 .vmux = 1,
869 .gpio0 = 0x03000000,
0bcc37c3
AW
870 .gpio1 = 0x01000000,
871 .gpio2 = 0x02000000,
872 .gpio3 = 0x00100000,
4ac97914
MCC
873 },{
874 .type = CX88_VMUX_SVIDEO,
875 .vmux = 2,
876 .gpio0 = 0x03000000,
877 .gpio1 = 0x01000000,
878 .gpio2 = 0x02000000,
879 .gpio3 = 0x00100000,
880 }},
0bcc37c3 881 },
e976f937
KL
882 [CX88_BOARD_ATI_HDTVWONDER] = {
883 .name = "ATI HDTV Wonder",
884 .tuner_type = TUNER_PHILIPS_TUV1236D,
885 .radio_type = UNSET,
886 .tuner_addr = ADDR_UNSET,
887 .radio_addr = ADDR_UNSET,
888 .input = {{
889 .type = CX88_VMUX_TELEVISION,
890 .vmux = 0,
891 .gpio0 = 0x00000ff7,
892 .gpio1 = 0x000000ff,
893 .gpio2 = 0x00000001,
894 .gpio3 = 0x00000000,
895 },{
896 .type = CX88_VMUX_COMPOSITE1,
897 .vmux = 1,
898 .gpio0 = 0x00000ffe,
899 .gpio1 = 0x000000ff,
900 .gpio2 = 0x00000001,
901 .gpio3 = 0x00000000,
902 },{
903 .type = CX88_VMUX_SVIDEO,
904 .vmux = 2,
905 .gpio0 = 0x00000ffe,
906 .gpio1 = 0x000000ff,
907 .gpio2 = 0x00000001,
908 .gpio3 = 0x00000000,
909 }},
48d5e803 910 .mpeg = CX88_MPEG_DVB,
e976f937 911 },
2b5200a7
DS
912 [CX88_BOARD_WINFAST_DTV1000] = {
913 .name = "WinFast DTV1000-T",
914 .tuner_type = TUNER_ABSENT,
915 .radio_type = UNSET,
916 .tuner_addr = ADDR_UNSET,
917 .radio_addr = ADDR_UNSET,
918 .input = {{
919 .type = CX88_VMUX_DVB,
920 .vmux = 0,
e8f4e752
JD
921 },{
922 .type = CX88_VMUX_COMPOSITE1,
923 .vmux = 1,
924 },{
925 .type = CX88_VMUX_SVIDEO,
926 .vmux = 2,
2b5200a7 927 }},
48d5e803 928 .mpeg = CX88_MPEG_DVB,
2b5200a7 929 },
7418f346
LB
930 [CX88_BOARD_AVERTV_303] = {
931 .name = "AVerTV 303 (M126)",
932 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
933 .radio_type = UNSET,
934 .tuner_addr = ADDR_UNSET,
935 .radio_addr = ADDR_UNSET,
936 .tda9887_conf = TDA9887_PRESENT,
937 .input = {{
938 .type = CX88_VMUX_TELEVISION,
939 .vmux = 0,
940 .gpio0 = 0x00ff,
941 .gpio1 = 0xe09f,
942 .gpio2 = 0x0010,
943 .gpio3 = 0x0000,
944 },{
945 .type = CX88_VMUX_COMPOSITE1,
946 .vmux = 1,
947 .gpio0 = 0x00ff,
948 .gpio1 = 0xe05f,
949 .gpio2 = 0x0010,
950 .gpio3 = 0x0000,
951 },{
952 .type = CX88_VMUX_SVIDEO,
953 .vmux = 2,
954 .gpio0 = 0x00ff,
955 .gpio1 = 0xe05f,
956 .gpio2 = 0x0010,
957 .gpio3 = 0x0000,
958 }},
959 },
0fa14aa6
ST
960 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
961 .name = "Hauppauge Nova-S-Plus DVB-S",
962 .tuner_type = TUNER_ABSENT,
963 .radio_type = UNSET,
964 .tuner_addr = ADDR_UNSET,
965 .radio_addr = ADDR_UNSET,
0fa14aa6
ST
966 .input = {{
967 .type = CX88_VMUX_DVB,
968 .vmux = 0,
969 },{
970 .type = CX88_VMUX_COMPOSITE1,
971 .vmux = 1,
972 },{
973 .type = CX88_VMUX_SVIDEO,
974 .vmux = 2,
975 }},
48d5e803 976 .mpeg = CX88_MPEG_DVB,
0fa14aa6
ST
977 },
978 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
979 .name = "Hauppauge Nova-SE2 DVB-S",
980 .tuner_type = TUNER_ABSENT,
981 .radio_type = UNSET,
982 .tuner_addr = ADDR_UNSET,
983 .radio_addr = ADDR_UNSET,
984 .input = {{
985 .type = CX88_VMUX_DVB,
986 .vmux = 0,
987 }},
48d5e803 988 .mpeg = CX88_MPEG_DVB,
0fa14aa6 989 },
0e0351e3
VC
990 [CX88_BOARD_KWORLD_DVBS_100] = {
991 .name = "KWorld DVB-S 100",
992 .tuner_type = TUNER_ABSENT,
993 .radio_type = UNSET,
994 .tuner_addr = ADDR_UNSET,
995 .radio_addr = ADDR_UNSET,
996 .input = {{
997 .type = CX88_VMUX_DVB,
998 .vmux = 0,
999 },{
1000 .type = CX88_VMUX_COMPOSITE1,
1001 .vmux = 1,
1002 },{
1003 .type = CX88_VMUX_SVIDEO,
1004 .vmux = 2,
1005 }},
48d5e803 1006 .mpeg = CX88_MPEG_DVB,
0e0351e3 1007 },
611900c1
ST
1008 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1009 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1010 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1011 .radio_type = UNSET,
1012 .tuner_addr = ADDR_UNSET,
1013 .radio_addr = ADDR_UNSET,
1014 .tda9887_conf = TDA9887_PRESENT,
1015 .input = {{
1016 .type = CX88_VMUX_TELEVISION,
1017 .vmux = 0,
1018 },{
1019 .type = CX88_VMUX_COMPOSITE1,
1020 .vmux = 1,
1021 },{
1022 .type = CX88_VMUX_SVIDEO,
1023 .vmux = 2,
1024 }},
1025 /* fixme: Add radio support */
48d5e803 1026 .mpeg = CX88_MPEG_DVB,
611900c1
ST
1027 },
1028 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1029 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1030 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1031 .radio_type = UNSET,
1032 .tuner_addr = ADDR_UNSET,
1033 .radio_addr = ADDR_UNSET,
1034 .tda9887_conf = TDA9887_PRESENT,
1035 .input = {{
1036 .type = CX88_VMUX_TELEVISION,
1037 .vmux = 0,
1038 },{
1039 .type = CX88_VMUX_COMPOSITE1,
1040 .vmux = 1,
1041 }},
1042 /* fixme: Add radio support */
48d5e803 1043 .mpeg = CX88_MPEG_DVB,
611900c1 1044 },
fc40b261
CP
1045 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1046 .name = "digitalnow DNTV Live! DVB-T Pro",
1047 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1048 .radio_type = UNSET,
1049 .tuner_addr = ADDR_UNSET,
1050 .radio_addr = ADDR_UNSET,
1051 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1052 TDA9887_PORT2_ACTIVE,
1053 .input = {{
1054 .type = CX88_VMUX_TELEVISION,
1055 .vmux = 0,
1056 .gpio0 = 0xf80808,
1057 },{
1058 .type = CX88_VMUX_COMPOSITE1,
1059 .vmux = 1,
1060 .gpio0 = 0xf80808,
1061 },{
1062 .type = CX88_VMUX_SVIDEO,
1063 .vmux = 2,
1064 .gpio0 = 0xf80808,
1065 }},
1066 .radio = {
1067 .type = CX88_RADIO,
1068 .gpio0 = 0xf80808,
1069 },
48d5e803 1070 .mpeg = CX88_MPEG_DVB,
fc40b261 1071 },
f39624fd
MM
1072 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1073 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1074 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1075 /* Manenti Marco <marco_manenti@colman.it> */
1076 .name = "KWorld/VStream XPert DVB-T with cx22702",
1077 .tuner_type = TUNER_ABSENT,
1078 .radio_type = UNSET,
1079 .tuner_addr = ADDR_UNSET,
1080 .radio_addr = ADDR_UNSET,
1081 .input = {{
1082 .type = CX88_VMUX_COMPOSITE1,
1083 .vmux = 1,
1084 .gpio0 = 0x0700,
1085 .gpio2 = 0x0101,
1086 },{
1087 .type = CX88_VMUX_SVIDEO,
1088 .vmux = 2,
1089 .gpio0 = 0x0700,
1090 .gpio2 = 0x0101,
1091 }},
48d5e803 1092 .mpeg = CX88_MPEG_DVB,
f39624fd 1093 },
43eabb4e
CP
1094 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1095 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1096 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1097 .radio_type = UNSET,
1098 .tuner_addr = ADDR_UNSET,
1099 .radio_addr = ADDR_UNSET,
1100 .input = {{
1101 .type = CX88_VMUX_COMPOSITE1,
1102 .vmux = 1,
d536e9c4 1103 .gpio0 = 0x000067df,
43eabb4e
CP
1104 },{
1105 .type = CX88_VMUX_SVIDEO,
1106 .vmux = 2,
d536e9c4 1107 .gpio0 = 0x000067df,
43eabb4e 1108 }},
48d5e803 1109 .mpeg = CX88_MPEG_DVB,
43eabb4e 1110 },
44256de1 1111 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
44256de1
MK
1112 .name = "KWorld HardwareMpegTV XPert",
1113 .tuner_type = TUNER_PHILIPS_TDA8290,
1114 .radio_type = UNSET,
1115 .tuner_addr = ADDR_UNSET,
1116 .radio_addr = ADDR_UNSET,
1117 .input = {{
1118 .type = CX88_VMUX_TELEVISION,
1119 .vmux = 0,
e2798212 1120 .gpio0 = 0x3de2,
24da4e4b 1121 .gpio2 = 0x00ff,
bc53f783
MK
1122 },{
1123 .type = CX88_VMUX_COMPOSITE1,
1124 .vmux = 1,
1125 .gpio0 = 0x3de6,
7b27d45b 1126 .audioroute = 1,
bc53f783
MK
1127 },{
1128 .type = CX88_VMUX_SVIDEO,
1129 .vmux = 2,
1130 .gpio0 = 0x3de6,
7b27d45b 1131 .audioroute = 1,
44256de1 1132 }},
e2798212
MK
1133 .radio = {
1134 .type = CX88_RADIO,
1135 .gpio0 = 0x3de6,
24da4e4b 1136 .gpio2 = 0x00ff,
e2798212 1137 },
48d5e803 1138 .mpeg = CX88_MPEG_BLACKBIRD,
44256de1 1139 },
780dfef3
CP
1140 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1141 .name = "DViCO FusionHDTV DVB-T Hybrid",
91ae3299 1142 .tuner_type = TUNER_THOMSON_FE6600,
780dfef3
CP
1143 .radio_type = UNSET,
1144 .tuner_addr = ADDR_UNSET,
1145 .radio_addr = ADDR_UNSET,
1146 .input = {{
1147 .type = CX88_VMUX_TELEVISION,
1148 .vmux = 0,
1149 .gpio0 = 0x0000a75f,
1150 },{
1151 .type = CX88_VMUX_COMPOSITE1,
1152 .vmux = 1,
1153 .gpio0 = 0x0000a75b,
1154 },{
1155 .type = CX88_VMUX_SVIDEO,
1156 .vmux = 2,
1157 .gpio0 = 0x0000a75b,
1158 }},
48d5e803 1159 .mpeg = CX88_MPEG_DVB,
780dfef3 1160 },
e142e7c4
MK
1161 [CX88_BOARD_PCHDTV_HD5500] = {
1162 .name = "pcHDTV HD5500 HDTV",
9c26c8b1 1163 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
e142e7c4
MK
1164 .radio_type = UNSET,
1165 .tuner_addr = ADDR_UNSET,
1166 .radio_addr = ADDR_UNSET,
1167 .tda9887_conf = TDA9887_PRESENT,
1168 .input = {{
1169 .type = CX88_VMUX_TELEVISION,
1170 .vmux = 0,
1171 .gpio0 = 0x87fd,
1172 },{
1173 .type = CX88_VMUX_COMPOSITE1,
1174 .vmux = 1,
1175 .gpio0 = 0x87f9,
1176 },{
1177 .type = CX88_VMUX_SVIDEO,
1178 .vmux = 2,
1179 .gpio0 = 0x87f9,
1180 }},
48d5e803 1181 .mpeg = CX88_MPEG_DVB,
e142e7c4 1182 },
b3038304
VZ
1183 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1184 /* FIXME: tested TV input only, disabled composite,
1185 svideo and radio until they can be tested also. */
1186 .name = "Kworld MCE 200 Deluxe",
1187 .tuner_type = TUNER_TENA_9533_DI,
1188 .radio_type = UNSET,
1189 .tda9887_conf = TDA9887_PRESENT,
1190 .tuner_addr = ADDR_UNSET,
1191 .radio_addr = ADDR_UNSET,
1192 .input = {{
1193 .type = CX88_VMUX_TELEVISION,
1194 .vmux = 0,
1195 .gpio0 = 0x0000BDE6
1196 }},
48d5e803 1197 .mpeg = CX88_MPEG_BLACKBIRD,
b3038304 1198 },
a3124622
AM
1199 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1200 /* FIXME: SVideo, Composite and FM inputs are untested */
1201 .name = "PixelView PlayTV P7000",
1202 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1203 .radio_type = UNSET,
1204 .tuner_addr = ADDR_UNSET,
1205 .radio_addr = ADDR_UNSET,
1206 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1207 TDA9887_PORT2_ACTIVE,
1208 .input = {{
1209 .type = CX88_VMUX_TELEVISION,
1210 .vmux = 0,
1211 .gpio0 = 0x5da6,
1212 }},
48d5e803 1213 .mpeg = CX88_MPEG_BLACKBIRD,
a3124622 1214 },
be4f4519
RC
1215 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1216 .name = "NPG Tech Real TV FM Top 10",
1217 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
680543c5
RC
1218 .radio_type = UNSET,
1219 .tuner_addr = ADDR_UNSET,
1220 .radio_addr = ADDR_UNSET,
1221 .input = {{
1222 .type = CX88_VMUX_TELEVISION,
1223 .vmux = 0,
1224 .gpio0 = 0x0788,
1225 },{
1226 .type = CX88_VMUX_COMPOSITE1,
1227 .vmux = 1,
1228 .gpio0 = 0x078b,
1229 },{
1230 .type = CX88_VMUX_SVIDEO,
1231 .vmux = 2,
be4f4519 1232 .gpio0 = 0x078b,
680543c5
RC
1233 }},
1234 .radio = {
1235 .type = CX88_RADIO,
1236 .gpio0 = 0x074a,
1237 },
1238 },
4bd6e9d9
MV
1239 [CX88_BOARD_WINFAST_DTV2000H] = {
1240 /* video inputs and radio still in testing */
1241 .name = "WinFast DTV2000 H",
1242 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1243 .radio_type = UNSET,
1244 .tuner_addr = ADDR_UNSET,
1245 .radio_addr = ADDR_UNSET,
1246 .tda9887_conf = TDA9887_PRESENT,
1247 .input = {{
1248 .type = CX88_VMUX_TELEVISION,
1249 .vmux = 0,
1250 .gpio0 = 0x00017304,
1251 .gpio1 = 0x00008203,
1252 .gpio2 = 0x00017304,
1253 .gpio3 = 0x02000000,
1254 }},
48d5e803 1255 .mpeg = CX88_MPEG_DVB,
4bd6e9d9 1256 },
c02a34f4
SA
1257 [CX88_BOARD_GENIATECH_DVBS] = {
1258 .name = "Geniatech DVB-S",
1259 .tuner_type = TUNER_ABSENT,
1260 .radio_type = UNSET,
1261 .tuner_addr = ADDR_UNSET,
1262 .radio_addr = ADDR_UNSET,
1263 .input = {{
1264 .type = CX88_VMUX_DVB,
1265 .vmux = 0,
1266 },{
1267 .type = CX88_VMUX_COMPOSITE1,
1268 .vmux = 1,
1269 }},
48d5e803 1270 .mpeg = CX88_MPEG_DVB,
c02a34f4 1271 },
ad10c930
ET
1272 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1273 /* FIXME: Add dvb & radio support */
1274 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1275 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1276 .radio_type = UNSET,
1277 .tuner_addr = ADDR_UNSET,
1278 .radio_addr = ADDR_UNSET,
1279 .tda9887_conf = TDA9887_PRESENT,
1280 .input = {{
1281 .type = CX88_VMUX_TELEVISION,
1282 .vmux = 0,
1283 .gpio0 = 0x84bf,
1284 },{
1285 .type = CX88_VMUX_COMPOSITE1,
1286 .vmux = 1,
1287 .gpio0 = 0x84bf,
1288 },{
1289 .type = CX88_VMUX_SVIDEO,
1290 .vmux = 2,
1291 .gpio0 = 0x84bf,
1292 }},
76dc82ab 1293 .mpeg = CX88_MPEG_DVB,
ad10c930 1294 },
d1009bd7
PN
1295 [CX88_BOARD_NORWOOD_MICRO] = {
1296 .name = "Norwood Micro TV Tuner",
1297 .tuner_type = TUNER_TNF_5335MF,
1298 .radio_type = UNSET,
1299 .tuner_addr = ADDR_UNSET,
1300 .radio_addr = ADDR_UNSET,
1301 .input = {{
1302 .type = CX88_VMUX_TELEVISION,
1303 .vmux = 0,
1304 .gpio0 = 0x0709,
1305 },{
1306 .type = CX88_VMUX_COMPOSITE1,
1307 .vmux = 1,
1308 .gpio0 = 0x070b,
1309 },{
1310 .type = CX88_VMUX_SVIDEO,
1311 .vmux = 2,
1312 .gpio0 = 0x070b,
1313 }},
1314 },
5b26c82f
MK
1315 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1316 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1317 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1318 .radio_type = UNSET,
1319 .tuner_addr = ADDR_UNSET,
1320 .radio_addr = ADDR_UNSET,
1321 .input = {{
1322 .type = CX88_VMUX_TELEVISION,
1323 .vmux = 0,
1324 .gpio0 = 0x003fffff,
1325 .gpio1 = 0x00e00000,
1326 .gpio2 = 0x003fffff,
1327 .gpio3 = 0x02000000,
1328 },{
1329 .type = CX88_VMUX_COMPOSITE1,
1330 .vmux = 1,
1331 .gpio0 = 0x003fffff,
1332 .gpio1 = 0x00e00000,
1333 .gpio2 = 0x003fffff,
1334 .gpio3 = 0x02000000,
1335 },{
1336 .type = CX88_VMUX_SVIDEO,
1337 .vmux = 2,
1338 .gpio0 = 0x003fffff,
1339 .gpio1 = 0x00e00000,
1340 .gpio2 = 0x003fffff,
1341 .gpio3 = 0x02000000,
1342 }},
1343 },
aa481a65
ST
1344 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1345 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1346 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1347 .radio_type = UNSET,
1348 .tuner_addr = ADDR_UNSET,
1349 .radio_addr = ADDR_UNSET,
1350 .tda9887_conf = TDA9887_PRESENT,
38f9d308 1351 .audio_chip = V4L2_IDENT_WM8775,
2491fbb7
ST
1352 /*
1353 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1354 */
aa481a65
ST
1355 .input = {{
1356 .type = CX88_VMUX_TELEVISION,
1357 .vmux = 0,
2491fbb7 1358 .gpio0 = 0xef88,
7b27d45b 1359 .audioroute = 1,
aa481a65
ST
1360 },{
1361 .type = CX88_VMUX_COMPOSITE1,
1362 .vmux = 1,
2491fbb7 1363 .gpio0 = 0xef88,
7b27d45b 1364 .audioroute = 2,
aa481a65
ST
1365 },{
1366 .type = CX88_VMUX_SVIDEO,
1367 .vmux = 2,
2491fbb7 1368 .gpio0 = 0xef88,
7b27d45b 1369 .audioroute = 2,
aa481a65
ST
1370 }},
1371 /* fixme: Add radio support */
6c5be74c 1372 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
6b92b3bd
ST
1373 .radio = {
1374 .type = CX88_RADIO,
2491fbb7 1375 .gpio0 = 0xef88,
6b92b3bd 1376 },
aa481a65 1377 },
7cb47a14
DG
1378 [CX88_BOARD_ADSTECH_PTV_390] = {
1379 .name = "ADS Tech Instant Video PCI",
1380 .tuner_type = TUNER_ABSENT,
1381 .radio_type = UNSET,
1382 .tuner_addr = ADDR_UNSET,
1383 .radio_addr = ADDR_UNSET,
1384 .input = {{
1385 .type = CX88_VMUX_DEBUG,
1386 .vmux = 3,
1387 .gpio0 = 0x04ff,
1388 },{
1389 .type = CX88_VMUX_COMPOSITE1,
1390 .vmux = 1,
1391 .gpio0 = 0x07fa,
1392 },{
1393 .type = CX88_VMUX_SVIDEO,
1394 .vmux = 2,
1395 .gpio0 = 0x07fa,
1396 }},
1397 },
60464da8
ST
1398 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1399 .name = "Pinnacle PCTV HD 800i",
1400 .tuner_type = TUNER_XC5000,
1401 .radio_type = UNSET,
1402 .tuner_addr = ADDR_UNSET,
1403 .radio_addr = ADDR_UNSET,
1404 .input = {{
1405 .type = CX88_VMUX_TELEVISION,
1406 .vmux = 0,
1407 .gpio0 = 0x04fb,
1408 .gpio1 = 0x10ff,
1409 },{
1410 .type = CX88_VMUX_COMPOSITE1,
1411 .vmux = 1,
1412 .gpio0 = 0x04fb,
1413 .gpio1 = 0x10ef,
1414 .audioroute = 1,
1415 },{
1416 .type = CX88_VMUX_SVIDEO,
1417 .vmux = 2,
1418 .gpio0 = 0x04fb,
1419 .gpio1 = 0x10ef,
1420 .audioroute = 1,
1421 }},
1422 .mpeg = CX88_MPEG_DVB,
1423 },
5c00fac0 1424 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
8efd2e28
MK
1425 .name = "DViCO FusionHDTV 5 PCI nano",
1426 /* xc3008 tuner, digital only for now */
5c00fac0
ST
1427 .tuner_type = TUNER_ABSENT,
1428 .radio_type = UNSET,
1429 .tuner_addr = ADDR_UNSET,
1430 .radio_addr = ADDR_UNSET,
1431 .input = {{
1432 .type = CX88_VMUX_TELEVISION,
1433 .vmux = 0,
1434 .gpio0 = 0x000027df, /* Unconfirmed */
1435 }, {
1436 .type = CX88_VMUX_COMPOSITE1,
1437 .vmux = 1,
1438 .gpio0 = 0x000027df, /* Unconfirmed */
1439 .audioroute = 1,
1440 }, {
1441 .type = CX88_VMUX_SVIDEO,
1442 .vmux = 2,
1443 .gpio0 = 0x000027df, /* Unconfirmed */
1444 .audioroute = 1,
1445 } },
1446 .mpeg = CX88_MPEG_DVB,
1447 },
9507901e 1448 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
000e27a6
MCC
1449 .name = "Pinnacle Hybrid PCTV",
1450 .tuner_type = TUNER_XC2028,
1451 .tuner_addr = 0x61,
1452 .input = { {
1453 .type = CX88_VMUX_TELEVISION,
1454 .vmux = 0,
1455 }, {
1456 .type = CX88_VMUX_COMPOSITE1,
1457 .vmux = 1,
1458 }, {
1459 .type = CX88_VMUX_SVIDEO,
1460 .vmux = 2,
1461 } },
1462 .radio = {
1463 .type = CX88_RADIO,
1464 .gpio0 = 0x004ff,
1465 .gpio1 = 0x010ff,
1466 .gpio2 = 0x0ff,
1467 },
1468 },
1469 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
1470 .name = "Winfast TV2000 XP Global",
1471 .tuner_type = TUNER_XC2028,
1472 .tuner_addr = 0x61,
1473 .input = { {
1474 .type = CX88_VMUX_TELEVISION,
1475 .vmux = 0,
1476 .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
1477 .gpio1 = 0x0000,
1478 .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
9507901e 1479
000e27a6
MCC
1480 }, {
1481 .type = CX88_VMUX_COMPOSITE1,
1482 .vmux = 1,
1483 .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
1484 .gpio1 = 0x0000,
1485 .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
9507901e 1486
000e27a6
MCC
1487 }, {
1488 .type = CX88_VMUX_SVIDEO,
1489 .vmux = 2,
1490 } },
1491 .radio = {
1492 .type = CX88_RADIO,
1493 .gpio0 = 0x004ff,
1494 .gpio1 = 0x010ff,
1495 .gpio2 = 0x0ff,
1496 },
1497 },
1498 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
a9606ce6 1499 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
000e27a6
MCC
1500 .tuner_type = TUNER_XC2028,
1501 .tuner_addr = 0x61,
1502 .input = { {
a9606ce6
DG
1503 .type = CX88_VMUX_DEBUG,
1504 .vmux = 3, /* Due to the way the cx88 driver is written, */
1505 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1506 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1507 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1508 }, { /* from the tuner on boot for a little while. */
000e27a6
MCC
1509 .type = CX88_VMUX_TELEVISION,
1510 .vmux = 0,
ab364983 1511 .gpio0 = 0x00ff,
000e27a6 1512 .gpio1 = 0xf35d,
ab364983 1513 .gpio3 = 0x0000,
000e27a6
MCC
1514 }, {
1515 .type = CX88_VMUX_COMPOSITE1,
1516 .vmux = 1,
ab364983
DF
1517 .gpio0 = 0x00ff,
1518 .gpio1 = 0xf37d,
1519 .gpio3 = 0x0000,
000e27a6
MCC
1520 }, {
1521 .type = CX88_VMUX_SVIDEO,
1522 .vmux = 2,
1523 .gpio0 = 0x000ff,
1524 .gpio1 = 0x0f37d,
000e27a6
MCC
1525 .gpio3 = 0x00000,
1526 } },
1527 .radio = {
1528 .type = CX88_RADIO,
1529 .gpio0 = 0x000ff,
1530 .gpio1 = 0x0f35d,
000e27a6
MCC
1531 .gpio3 = 0x00000,
1532 },
1533 },
1534 [CX88_BOARD_GENIATECH_X8000_MT] = {
9507901e 1535 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
000e27a6
MCC
1536 .name = "Geniatech X8000-MT DVBT",
1537 .tuner_type = TUNER_XC2028,
1538 .tuner_addr = 0x61,
1539 .input = { {
1540 .type = CX88_VMUX_TELEVISION,
1541 .vmux = 0,
1542 .gpio0 = 0x00000000,
1543 .gpio1 = 0x00e3e341,
1544 .gpio2 = 0x00000000,
1545 .gpio3 = 0x00000000,
1546 }, {
1547 .type = CX88_VMUX_COMPOSITE1,
1548 .vmux = 1,
1549 .gpio0 = 0x00000000,
1550 .gpio1 = 0x00e3e361,
1551 .gpio2 = 0x00000000,
1552 .gpio3 = 0x00000000,
1553 }, {
1554 .type = CX88_VMUX_SVIDEO,
1555 .vmux = 2,
1556 .gpio0 = 0x00000000,
1557 .gpio1 = 0x00e3e361,
1558 .gpio2 = 0x00000000,
1559 .gpio3 = 0x00000000,
1560 } },
1561 .radio = {
1562 .type = CX88_RADIO,
1563 .gpio0 = 0x00000000,
1564 .gpio1 = 0x00e3e341,
1565 .gpio2 = 0x00000000,
1566 .gpio3 = 0x00000000,
1567 },
1568 .mpeg = CX88_MPEG_DVB,
1569 },
1570 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1571 .name = "DViCO FusionHDTV DVB-T PRO",
1572 .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
1573 .radio_type = UNSET,
1574 .tuner_addr = ADDR_UNSET,
1575 .radio_addr = ADDR_UNSET,
1576 .input = { {
1577 .type = CX88_VMUX_COMPOSITE1,
1578 .vmux = 1,
1579 .gpio0 = 0x000067df,
b3fb91d2 1580 }, {
000e27a6
MCC
1581 .type = CX88_VMUX_SVIDEO,
1582 .vmux = 2,
1583 .gpio0 = 0x000067df,
1584 } },
1585 .mpeg = CX88_MPEG_DVB,
1586 },
1117d6ba 1587 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
76464d41 1588 .name = "DViCO FusionHDTV 7 Gold",
1117d6ba
ST
1589 .tuner_type = TUNER_XC5000,
1590 .radio_type = UNSET,
1591 .tuner_addr = ADDR_UNSET,
1592 .radio_addr = ADDR_UNSET,
1593 .input = {{
1594 .type = CX88_VMUX_TELEVISION,
1595 .vmux = 0,
76464d41 1596 .gpio0 = 0x10df,
1117d6ba
ST
1597 },{
1598 .type = CX88_VMUX_COMPOSITE1,
1599 .vmux = 1,
76464d41 1600 .gpio0 = 0x16d9,
1117d6ba
ST
1601 },{
1602 .type = CX88_VMUX_SVIDEO,
1603 .vmux = 2,
76464d41 1604 .gpio0 = 0x16d9,
1117d6ba 1605 }},
d893d5dc 1606 .mpeg = CX88_MPEG_DVB,
1117d6ba 1607 },
2422a9b3
MCC
1608 [CX88_BOARD_PROLINK_PV_8000GT] = {
1609 .name = "Prolink Pixelview MPEG 8000GT",
1610 .tuner_type = TUNER_XC2028,
1611 .tuner_addr = 0x61,
1612 .input = { {
1613 .type = CX88_VMUX_TELEVISION,
1614 .vmux = 0,
1615 .gpio0 = 0x0ff,
1616 .gpio2 = 0x0cfb,
1617 }, {
1618 .type = CX88_VMUX_COMPOSITE1,
1619 .vmux = 1,
1620 .gpio2 = 0x0cfb,
1621 }, {
1622 .type = CX88_VMUX_SVIDEO,
1623 .vmux = 2,
1624 .gpio2 = 0x0cfb,
1625 } },
1626 .radio = {
1627 .type = CX88_RADIO,
1628 .gpio2 = 0x0cfb,
1629 },
1630 },
a31d2bb7
MCC
1631 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1632 .name = "Prolink Pixelview Global Extreme",
1633 .tuner_type = TUNER_XC2028,
1634 .tuner_addr = 0x61,
1635 .input = { {
1636 .type = CX88_VMUX_TELEVISION,
1637 .vmux = 0,
1638 .gpio0 = 0x04fb,
1639 .gpio1 = 0x04080,
1640 .gpio2 = 0x0cf7,
1641 }, {
1642 .type = CX88_VMUX_COMPOSITE1,
1643 .vmux = 1,
1644 .gpio0 = 0x04fb,
1645 .gpio1 = 0x04080,
1646 .gpio2 = 0x0cfb,
1647 }, {
1648 .type = CX88_VMUX_SVIDEO,
1649 .vmux = 2,
1650 .gpio0 = 0x04fb,
1651 .gpio1 = 0x04080,
1652 .gpio2 = 0x0cfb,
1653 } },
1654 .radio = {
1655 .type = CX88_RADIO,
1656 .gpio0 = 0x04ff,
1657 .gpio1 = 0x04080,
1658 .gpio2 = 0x0cf7,
1659 },
1660 },
99e09eac
MCC
1661 /* Both radio, analog and ATSC work with this board.
1662 However, for analog to work, s5h1409 gate should be open,
1663 otherwise, tuner-xc3028 won't be detected.
1664 A proper fix require using the newer i2c methods to add
1665 tuner-xc3028 without doing an i2c probe.
1666 */
1667 [CX88_BOARD_KWORLD_ATSC_120] = {
1668 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1669 .tuner_type = TUNER_XC2028,
1670 .radio_type = UNSET,
1671 .tuner_addr = ADDR_UNSET,
1672 .radio_addr = ADDR_UNSET,
1673 .input = { {
1674 .type = CX88_VMUX_TELEVISION,
1675 .vmux = 0,
1676 .gpio0 = 0x000000ff,
1677 .gpio1 = 0x0000f35d,
1678 .gpio2 = 0x00000000,
1679 }, {
1680 .type = CX88_VMUX_COMPOSITE1,
1681 .vmux = 1,
1682 .gpio0 = 0x000000ff,
1683 .gpio1 = 0x0000f37e,
1684 .gpio2 = 0x00000000,
1685 }, {
1686 .type = CX88_VMUX_SVIDEO,
1687 .vmux = 2,
1688 .gpio0 = 0x000000ff,
1689 .gpio1 = 0x0000f37e,
1690 .gpio2 = 0x00000000,
1691 } },
1692 .radio = {
1693 .type = CX88_RADIO,
1694 .gpio0 = 0x000000ff,
1695 .gpio1 = 0x0000f35d,
1696 .gpio2 = 0x00000000,
1697 },
1698 .mpeg = CX88_MPEG_DVB,
1699 },
5bd1b663
ST
1700 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1701 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1702 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1703 .radio_type = UNSET,
1704 .tuner_addr = ADDR_UNSET,
1705 .radio_addr = ADDR_UNSET,
1706 .tda9887_conf = TDA9887_PRESENT,
1707 /*
1708 * GPIO0 (WINTV2000)
1709 *
1710 * Analogue SAT DVB-T
1711 * Antenna 0xc4bf 0xc4bb
1712 * Composite 0xc4bf 0xc4bb
1713 * S-Video 0xc4bf 0xc4bb
1714 * Composite1 0xc4ff 0xc4fb
1715 * S-Video1 0xc4ff 0xc4fb
2491fbb7
ST
1716 *
1717 * BIT VALUE FUNCTION GP{x}_IO
1718 * 0 1 I:?
1719 * 1 1 I:?
1720 * 2 1 O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
1721 * 3 1 I:?
1722 * 4 1 I:?
1723 * 5 1 I:?
1724 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1725 * 7 1 O:DVB-T DEMOD RESET LOW
1726 *
1727 * BIT VALUE FUNCTION GP{x}_OE
1728 * 8 0 I
1729 * 9 0 I
1730 * a 1 O
1731 * b 0 I
1732 * c 0 I
1733 * d 0 I
1734 * e 1 O
1735 * f 1 O
5bd1b663
ST
1736 */
1737 .input = {{
1738 .type = CX88_VMUX_TELEVISION,
1739 .vmux = 0,
1740 .gpio0 = 0xc4bf,
1741 }, {
1742 .type = CX88_VMUX_COMPOSITE1,
1743 .vmux = 1,
1744 .gpio0 = 0xc4bf,
1745 }, {
1746 .type = CX88_VMUX_SVIDEO,
1747 .vmux = 2,
1748 .gpio0 = 0xc4bf,
1749 } },
1750 /* fixme: Add radio support */
1751 .mpeg = CX88_MPEG_DVB,
1752 },
1753 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1754 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1755 .tuner_type = UNSET,
1756 .radio_type = UNSET,
1757 .tuner_addr = ADDR_UNSET,
1758 .radio_addr = ADDR_UNSET,
1759 .input = {{
1760 .type = CX88_VMUX_DVB,
1761 .vmux = 0,
1762 } },
1763 .mpeg = CX88_MPEG_DVB,
1764 },
e4aab64c
IL
1765 [CX88_BOARD_TEVII_S420] = {
1766 .name = "TeVii S420 DVB-S",
1767 .tuner_type = UNSET,
1768 .radio_type = UNSET,
1769 .tuner_addr = ADDR_UNSET,
1770 .radio_addr = ADDR_UNSET,
1771 .input = {{
1772 .type = CX88_VMUX_DVB,
1773 .vmux = 0,
1774 } },
1775 .mpeg = CX88_MPEG_DVB,
1776 },
af832623
IL
1777 [CX88_BOARD_TEVII_S460] = {
1778 .name = "TeVii S460 DVB-S/S2",
1779 .tuner_type = UNSET,
1780 .radio_type = UNSET,
1781 .tuner_addr = ADDR_UNSET,
1782 .radio_addr = ADDR_UNSET,
1783 .input = {{
1784 .type = CX88_VMUX_DVB,
1785 .vmux = 0,
1786 } },
1787 .mpeg = CX88_MPEG_DVB,
1788 },
4cd7fb87
OR
1789 [CX88_BOARD_OMICOM_SS4_PCI] = {
1790 .name = "Omicom SS4 DVB-S/S2 PCI",
1791 .tuner_type = UNSET,
1792 .radio_type = UNSET,
1793 .tuner_addr = ADDR_UNSET,
1794 .radio_addr = ADDR_UNSET,
1795 .input = {{
1796 .type = CX88_VMUX_DVB,
1797 .vmux = 0,
1798 } },
1799 .mpeg = CX88_MPEG_DVB,
1800 },
ee73042c
OR
1801 [CX88_BOARD_TBS_8920] = {
1802 .name = "TBS 8920 DVB-S/S2",
1803 .tuner_type = TUNER_ABSENT,
1804 .radio_type = UNSET,
1805 .tuner_addr = ADDR_UNSET,
1806 .radio_addr = ADDR_UNSET,
1807 .input = {{
1808 .type = CX88_VMUX_DVB,
1809 .vmux = 1,
1810 } },
1811 .mpeg = CX88_MPEG_DVB,
1812 },
1da177e4 1813};
1da177e4
LT
1814
1815/* ------------------------------------------------------------------ */
1816/* PCI subsystem IDs */
1817
bbc83597 1818static const struct cx88_subid cx88_subids[] = {
1da177e4
LT
1819 {
1820 .subvendor = 0x0070,
1821 .subdevice = 0x3400,
1822 .card = CX88_BOARD_HAUPPAUGE,
1823 },{
1824 .subvendor = 0x0070,
1825 .subdevice = 0x3401,
1826 .card = CX88_BOARD_HAUPPAUGE,
1827 },{
1828 .subvendor = 0x14c7,
1829 .subdevice = 0x0106,
1830 .card = CX88_BOARD_GDI,
1831 },{
1832 .subvendor = 0x14c7,
1833 .subdevice = 0x0107, /* with mpeg encoder */
1834 .card = CX88_BOARD_GDI,
1835 },{
1836 .subvendor = PCI_VENDOR_ID_ATI,
1837 .subdevice = 0x00f8,
1838 .card = CX88_BOARD_ATI_WONDER_PRO,
1839 },{
4ac97914
MCC
1840 .subvendor = 0x107d,
1841 .subdevice = 0x6611,
1842 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1843 },{
1844 .subvendor = 0x107d,
1845 .subdevice = 0x6613, /* NTSC */
1846 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1847 },{
1848 .subvendor = 0x107d,
1849 .subdevice = 0x6620,
1850 .card = CX88_BOARD_WINFAST_DV2000,
1da177e4 1851 },{
4ac97914
MCC
1852 .subvendor = 0x107d,
1853 .subdevice = 0x663b,
1854 .card = CX88_BOARD_LEADTEK_PVR2000,
1da177e4
LT
1855 },{
1856 .subvendor = 0x107d,
8dd86eeb 1857 .subdevice = 0x663c,
4ac97914
MCC
1858 .card = CX88_BOARD_LEADTEK_PVR2000,
1859 },{
1da177e4
LT
1860 .subvendor = 0x1461,
1861 .subdevice = 0x000b,
7418f346 1862 .card = CX88_BOARD_AVERTV_STUDIO_303,
1da177e4
LT
1863 },{
1864 .subvendor = 0x1462,
1865 .subdevice = 0x8606,
1866 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
1867 },{
4ac97914
MCC
1868 .subvendor = 0x10fc,
1869 .subdevice = 0xd003,
1870 .card = CX88_BOARD_IODATA_GVVCP3PCI,
1da177e4 1871 },{
4ac97914
MCC
1872 .subvendor = 0x1043,
1873 .subdevice = 0x4823, /* with mpeg encoder */
1874 .card = CX88_BOARD_ASUS_PVR_416,
1da177e4
LT
1875 },{
1876 .subvendor = 0x17de,
1877 .subdevice = 0x08a6,
1878 .card = CX88_BOARD_KWORLD_DVB_T,
1879 },{
1880 .subvendor = 0x18ac,
1881 .subdevice = 0xd810,
a82decf6 1882 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
097b750e
MK
1883 },{
1884 .subvendor = 0x18ac,
1885 .subdevice = 0xd820,
80d34362 1886 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
1da177e4 1887 },{
7df64e8c
MK
1888 .subvendor = 0x18ac,
1889 .subdevice = 0xdb00,
1da177e4 1890 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
4ac97914 1891 },{
1da177e4
LT
1892 .subvendor = 0x0070,
1893 .subdevice = 0x9002,
1894 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
4ac97914 1895 },{
1da177e4
LT
1896 .subvendor = 0x14f1,
1897 .subdevice = 0x0187,
1898 .card = CX88_BOARD_CONEXANT_DVB_T1,
4ac97914 1899 },{
1da177e4
LT
1900 .subvendor = 0x1540,
1901 .subdevice = 0x2580,
1902 .card = CX88_BOARD_PROVIDEO_PV259,
1903 },{
7df64e8c
MK
1904 .subvendor = 0x18ac,
1905 .subdevice = 0xdb10,
1da177e4
LT
1906 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1907 },{
4ac97914
MCC
1908 .subvendor = 0x1554,
1909 .subdevice = 0x4811,
1910 .card = CX88_BOARD_PIXELVIEW,
1da177e4
LT
1911 },{
1912 .subvendor = 0x7063,
1913 .subdevice = 0x3000, /* HD-3000 card */
1914 .card = CX88_BOARD_PCHDTV_HD3000,
1915 },{
7df64e8c
MK
1916 .subvendor = 0x17de,
1917 .subdevice = 0xa8a6,
1da177e4
LT
1918 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
1919 },{
1920 .subvendor = 0x0070,
1921 .subdevice = 0x2801,
1922 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
1923 },{
7df64e8c 1924 .subvendor = 0x14f1,
1da177e4
LT
1925 .subdevice = 0x0342,
1926 .card = CX88_BOARD_DIGITALLOGIC_MEC,
1927 },{
1928 .subvendor = 0x10fc,
1929 .subdevice = 0xd035,
1930 .card = CX88_BOARD_IODATA_GVBCTV7E,
a82decf6
MCC
1931 },{
1932 .subvendor = 0x1421,
1933 .subdevice = 0x0334,
1934 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
4ac97914 1935 },{
e057ee11
MK
1936 .subvendor = 0x153b,
1937 .subdevice = 0x1166,
1938 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
4ac97914 1939 },{
9fef07ca
MK
1940 .subvendor = 0x18ac,
1941 .subdevice = 0xd500,
1942 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
4ac97914 1943 },{
d45170ed
NS
1944 .subvendor = 0x1461,
1945 .subdevice = 0x8011,
1946 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
4ac97914 1947 },{
e976f937
KL
1948 .subvendor = PCI_VENDOR_ID_ATI,
1949 .subdevice = 0xa101,
1950 .card = CX88_BOARD_ATI_HDTVWONDER,
4ac97914 1951 },{
2b5200a7
DS
1952 .subvendor = 0x107d,
1953 .subdevice = 0x665f,
1954 .card = CX88_BOARD_WINFAST_DTV1000,
7418f346
LB
1955 },{
1956 .subvendor = 0x1461,
1957 .subdevice = 0x000a,
1958 .card = CX88_BOARD_AVERTV_303,
0fa14aa6
ST
1959 },{
1960 .subvendor = 0x0070,
1961 .subdevice = 0x9200,
fb56cb65
ST
1962 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
1963 },{
1964 .subvendor = 0x0070,
1965 .subdevice = 0x9201,
0fa14aa6
ST
1966 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1967 },{
1968 .subvendor = 0x0070,
1969 .subdevice = 0x9202,
fb56cb65 1970 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
0e0351e3
VC
1971 },{
1972 .subvendor = 0x17de,
1973 .subdevice = 0x08b2,
1974 .card = CX88_BOARD_KWORLD_DVBS_100,
611900c1
ST
1975 },{
1976 .subvendor = 0x0070,
1977 .subdevice = 0x9400,
1978 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1979 },{
1980 .subvendor = 0x0070,
1981 .subdevice = 0x9402,
1982 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1983 },{
1984 .subvendor = 0x0070,
1985 .subdevice = 0x9800,
1986 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1987 },{
1988 .subvendor = 0x0070,
1989 .subdevice = 0x9802,
1990 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
c432a072
ST
1991 },{
1992 .subvendor = 0x0070,
1993 .subdevice = 0x9001,
1994 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
fc40b261
CP
1995 },{
1996 .subvendor = 0x1822,
1997 .subdevice = 0x0025,
1998 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
f39624fd 1999 },{
b9f4ad57
CP
2000 .subvendor = 0x17de,
2001 .subdevice = 0x08a1,
2002 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
43eabb4e
CP
2003 },{
2004 .subvendor = 0x18ac,
2005 .subdevice = 0xdb50,
2006 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
f74a6b39
MK
2007 },{
2008 .subvendor = 0x18ac,
2009 .subdevice = 0xdb54,
2010 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2011 /* Re-branded DViCO: DigitalNow DVB-T Dual */
6bfb2e1f
MK
2012 },{
2013 .subvendor = 0x18ac,
2014 .subdevice = 0xdb11,
2015 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2016 /* Re-branded DViCO: UltraView DVB-T Plus */
b3fb91d2
CP
2017 }, {
2018 .subvendor = 0x18ac,
2019 .subdevice = 0xdb30,
2020 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2021 }, {
44256de1
MK
2022 .subvendor = 0x17de,
2023 .subdevice = 0x0840,
923da8a7
MK
2024 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2025 },{
2026 .subvendor = 0x1421,
2027 .subdevice = 0x0305,
44256de1 2028 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
780dfef3
CP
2029 },{
2030 .subvendor = 0x18ac,
2031 .subdevice = 0xdb40,
2032 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2033 },{
2034 .subvendor = 0x18ac,
2035 .subdevice = 0xdb44,
2036 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
da215d22
RS
2037 },{
2038 .subvendor = 0x7063,
2039 .subdevice = 0x5500,
2040 .card = CX88_BOARD_PCHDTV_HD5500,
b3038304
VZ
2041 },{
2042 .subvendor = 0x17de,
2043 .subdevice = 0x0841,
2044 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
fc066478
MK
2045 },{
2046 .subvendor = 0x1822,
2047 .subdevice = 0x0019,
2048 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
a3124622
AM
2049 },{
2050 .subvendor = 0x1554,
2051 .subdevice = 0x4813,
2052 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
680543c5
RC
2053 },{
2054 .subvendor = 0x14f1,
2055 .subdevice = 0x0842,
be4f4519 2056 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
4bd6e9d9
MV
2057 },{
2058 .subvendor = 0x107d,
2059 .subdevice = 0x665e,
2060 .card = CX88_BOARD_WINFAST_DTV2000H,
65271bff
MK
2061 },{
2062 .subvendor = 0x18ac,
2063 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2064 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
c02a34f4
SA
2065 },{
2066 .subvendor = 0x14f1,
2067 .subdevice = 0x0084,
2068 .card = CX88_BOARD_GENIATECH_DVBS,
ad10c930
ET
2069 },{
2070 .subvendor = 0x0070,
2071 .subdevice = 0x1404,
2072 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
5dbaa2cb
MK
2073 },{
2074 .subvendor = 0x1461,
2075 .subdevice = 0xc111, /* AverMedia M150-D */
2076 /* This board is known to work with the ASUS PVR416 config */
2077 .card = CX88_BOARD_ASUS_PVR_416,
2acadefa
DB
2078 },{
2079 .subvendor = 0xc180,
2080 .subdevice = 0xc980,
2081 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
aa481a65
ST
2082 },{
2083 .subvendor = 0x0070,
2084 .subdevice = 0x9600,
2085 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2086 },{
2087 .subvendor = 0x0070,
2088 .subdevice = 0x9601,
2089 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2090 },{
2091 .subvendor = 0x0070,
2092 .subdevice = 0x9602,
2093 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
dab489df
MK
2094 },{
2095 .subvendor = 0x107d,
2096 .subdevice = 0x6632,
2097 .card = CX88_BOARD_LEADTEK_PVR2000,
4508f598
MK
2098 },{
2099 .subvendor = 0x12ab,
2100 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2101 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
3979ecc7
ST
2102 },{
2103 .subvendor = 0x0070,
2104 .subdevice = 0x9000,
2105 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
76dc82ab
ST
2106 },{
2107 .subvendor = 0x0070,
2108 .subdevice = 0x1400,
2109 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2110 },{
2111 .subvendor = 0x0070,
2112 .subdevice = 0x1401,
2113 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2114 },{
2115 .subvendor = 0x0070,
2116 .subdevice = 0x1402,
2117 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
733aeaf4
MK
2118 },{
2119 .subvendor = 0x1421,
2120 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2121 .card = CX88_BOARD_KWORLD_DVBS_100,
7cb47a14
DG
2122 },{
2123 .subvendor = 0x1421,
2124 .subdevice = 0x0390,
2125 .card = CX88_BOARD_ADSTECH_PTV_390,
60464da8
ST
2126 },{
2127 .subvendor = 0x11bd,
2128 .subdevice = 0x0051,
2129 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
5c00fac0
ST
2130 }, {
2131 .subvendor = 0x18ac,
2132 .subdevice = 0xd530,
2133 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
9507901e
MCC
2134 }, {
2135 .subvendor = 0x12ab,
2136 .subdevice = 0x1788,
2137 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2138 }, {
2139 .subvendor = 0x14f1,
2140 .subdevice = 0xea3d,
2141 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2142 }, {
2143 .subvendor = 0x107d,
2144 .subdevice = 0x6f18,
2145 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2146 }, {
2147 .subvendor = 0x14f1,
2148 .subdevice = 0x8852,
2149 .card = CX88_BOARD_GENIATECH_X8000_MT,
2422a9b3 2150 }, {
1117d6ba
ST
2151 .subvendor = 0x18ac,
2152 .subdevice = 0xd610,
2153 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
2422a9b3
MCC
2154 }, {
2155 .subvendor = 0x1554,
2156 .subdevice = 0x4935,
2157 .card = CX88_BOARD_PROLINK_PV_8000GT,
a31d2bb7
MCC
2158 }, {
2159 .subvendor = 0x1554,
2160 .subdevice = 0x4976,
2161 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
99e09eac
MCC
2162 }, {
2163 .subvendor = 0x17de,
2164 .subdevice = 0x08c1,
2165 .card = CX88_BOARD_KWORLD_ATSC_120,
5bd1b663
ST
2166 }, {
2167 .subvendor = 0x0070,
2168 .subdevice = 0x6900,
2169 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2170 }, {
2171 .subvendor = 0x0070,
2172 .subdevice = 0x6904,
2173 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2174 }, {
2175 .subvendor = 0x0070,
2176 .subdevice = 0x6902,
2177 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2178 }, {
2179 .subvendor = 0x0070,
2180 .subdevice = 0x6905,
2181 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2182 }, {
2183 .subvendor = 0x0070,
2184 .subdevice = 0x6906,
2185 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
af832623 2186 }, {
e4aab64c
IL
2187 .subvendor = 0xd420,
2188 .subdevice = 0x9022,
2189 .card = CX88_BOARD_TEVII_S420,
2190 }, {
2191 .subvendor = 0xd460,
af832623
IL
2192 .subdevice = 0x9022,
2193 .card = CX88_BOARD_TEVII_S460,
4cd7fb87
OR
2194 }, {
2195 .subvendor = 0xA044,
2196 .subdevice = 0x2011,
2197 .card = CX88_BOARD_OMICOM_SS4_PCI,
ee73042c
OR
2198 }, {
2199 .subvendor = 0x8920,
2200 .subdevice = 0x8888,
2201 .card = CX88_BOARD_TBS_8920,
2422a9b3 2202 },
1da177e4 2203};
1da177e4
LT
2204
2205/* ----------------------------------------------------------------------- */
2206/* some leadtek specific stuff */
2207
69f7e75a 2208static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
1da177e4
LT
2209{
2210 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
2211 * any others.
2212 *
2213 * Byte 0 is 1 on the NTSC board.
2214 */
2215
2216 if (eeprom_data[4] != 0x7d ||
2217 eeprom_data[5] != 0x10 ||
2218 eeprom_data[7] != 0x66) {
0f19e65b 2219 warn_printk(core, "Leadtek eeprom invalid.\n");
1da177e4
LT
2220 return;
2221 }
2222
6a59d64c
TP
2223 core->board.tuner_type = (eeprom_data[6] == 0x13) ?
2224 TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
1da177e4 2225
0f19e65b
MCC
2226 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2227 "tuner=%d, eeprom[0]=0x%02x\n",
2228 core->board.tuner_type, eeprom_data[0]);
1da177e4
LT
2229}
2230
1da177e4
LT
2231static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2232{
2233 struct tveeprom tv;
2234
0f97a931 2235 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
6a59d64c 2236 core->board.tuner_type = tv.tuner_type;
0345c387 2237 core->tuner_formats = tv.tuner_formats;
6a59d64c 2238 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
1da177e4
LT
2239
2240 /* Make sure we support the board model */
3ca0ea98
ST
2241 switch (tv.model)
2242 {
76dc82ab
ST
2243 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2244 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2245 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2246 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2247 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2248 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
ad10c930 2249 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
76dc82ab
ST
2250 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2251 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
0345c387 2252 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
42d2b6ef 2253 case 34519: /* WinTV-PCI-FM */
5bd1b663
ST
2254 case 69009:
2255 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2256 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2257 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2258 case 69559:
2259 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2260 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
759324c3 2261 case 90002: /* Nova-T-PCI (9002) */
0fe22865
ST
2262 case 92001: /* Nova-S-Plus (Video and IR) */
2263 case 92002: /* Nova-S-Plus (Video and IR) */
2264 case 90003: /* Nova-T-PCI (9002 No RF out) */
759324c3
ST
2265 case 90500: /* Nova-T-PCI (oem) */
2266 case 90501: /* Nova-T-PCI (oem/IR) */
3ca0ea98 2267 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
611900c1
ST
2268 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2269 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
aa481a65
ST
2270 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2271 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2272 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2273 case 96569: /* WinTV-HVR1300 () */
2274 case 96659: /* WinTV-HVR1300 () */
611900c1 2275 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1da177e4
LT
2276 /* known */
2277 break;
2278 default:
0f19e65b
MCC
2279 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2280 tv.model);
1da177e4
LT
2281 break;
2282 }
2283
0f19e65b 2284 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
1da177e4
LT
2285}
2286
2287/* ----------------------------------------------------------------------- */
2288/* some GDI (was: Modular Technology) specific stuff */
2289
2290static struct {
2291 int id;
2292 int fm;
2293 char *name;
2294} gdi_tuner[] = {
2295 [ 0x01 ] = { .id = TUNER_ABSENT,
2296 .name = "NTSC_M" },
2297 [ 0x02 ] = { .id = TUNER_ABSENT,
2298 .name = "PAL_B" },
2299 [ 0x03 ] = { .id = TUNER_ABSENT,
2300 .name = "PAL_I" },
2301 [ 0x04 ] = { .id = TUNER_ABSENT,
2302 .name = "PAL_D" },
2303 [ 0x05 ] = { .id = TUNER_ABSENT,
2304 .name = "SECAM" },
2305
2306 [ 0x10 ] = { .id = TUNER_ABSENT,
2307 .fm = 1,
2308 .name = "TEMIC_4049" },
2309 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2310 .name = "TEMIC_4136" },
2311 [ 0x12 ] = { .id = TUNER_ABSENT,
2312 .name = "TEMIC_4146" },
2313
2314 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2315 .fm = 1,
2316 .name = "PHILIPS_FQ1216_MK3" },
2317 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2318 .name = "PHILIPS_FQ1236_MK3" },
2319 [ 0x22 ] = { .id = TUNER_ABSENT,
2320 .name = "PHILIPS_FI1236_MK3" },
2321 [ 0x23 ] = { .id = TUNER_ABSENT,
2322 .name = "PHILIPS_FI1216_MK3" },
2323};
2324
2325static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2326{
2327 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2328 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2329
0f19e65b 2330 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
1da177e4
LT
2331 if (NULL == name)
2332 return;
6a59d64c
TP
2333 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2334 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2335 CX88_RADIO : 0;
1da177e4
LT
2336}
2337
b3fb91d2
CP
2338/* ------------------------------------------------------------------- */
2339/* some Divco specific stuff */
0be51b46
MCC
2340static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2341 int command, int arg)
b3fb91d2 2342{
b3fb91d2
CP
2343 switch (command) {
2344 case XC2028_TUNER_RESET:
d7cba043
MK
2345 switch (core->boardnr) {
2346 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2347 /* GPIO-4 xc3028 tuner */
2348
2349 cx_set(MO_GP0_IO, 0x00001000);
2350 cx_clear(MO_GP0_IO, 0x00000010);
2351 msleep(100);
2352 cx_set(MO_GP0_IO, 0x00000010);
2353 msleep(100);
2354 break;
2355 default:
2356 cx_write(MO_GP0_IO, 0x101000);
2357 mdelay(5);
2358 cx_set(MO_GP0_IO, 0x101010);
2359 }
b3fb91d2
CP
2360 break;
2361 default:
2362 return -EINVAL;
2363 }
2364
2365 return 0;
2366}
2367
2368
9507901e
MCC
2369/* ----------------------------------------------------------------------- */
2370/* some Geniatech specific stuff */
2371
0be51b46
MCC
2372static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2373 int command, int mode)
9507901e 2374{
9507901e
MCC
2375 switch (command) {
2376 case XC2028_TUNER_RESET:
2377 switch (INPUT(core->input).type) {
2378 case CX88_RADIO:
c450e50e 2379 break;
9507901e
MCC
2380 case CX88_VMUX_DVB:
2381 cx_write(MO_GP1_IO, 0x030302);
2382 mdelay(50);
c450e50e 2383 break;
9507901e
MCC
2384 default:
2385 cx_write(MO_GP1_IO, 0x030301);
2386 mdelay(50);
c450e50e
MCC
2387 }
2388 cx_write(MO_GP1_IO, 0x101010);
2389 mdelay(50);
2390 cx_write(MO_GP1_IO, 0x101000);
2391 mdelay(50);
2392 cx_write(MO_GP1_IO, 0x101010);
2393 mdelay(50);
2394 return 0;
9507901e
MCC
2395 }
2396 return -EINVAL;
2397}
2398
2422a9b3
MCC
2399/* ------------------------------------------------------------------- */
2400/* some Divco specific stuff */
0be51b46
MCC
2401static int cx88_pv_8000gt_callback(struct cx88_core *core,
2402 int command, int arg)
2422a9b3 2403{
2422a9b3
MCC
2404 switch (command) {
2405 case XC2028_TUNER_RESET:
2406 cx_write(MO_GP2_IO, 0xcf7);
2407 mdelay(50);
2408 cx_write(MO_GP2_IO, 0xef5);
2409 mdelay(50);
2410 cx_write(MO_GP2_IO, 0xcf7);
2411 break;
2412 default:
2413 return -EINVAL;
2414 }
2415
2416 return 0;
2417}
2418
780dfef3
CP
2419/* ----------------------------------------------------------------------- */
2420/* some DViCO specific stuff */
2421
2422static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2423{
2424 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2425 int i, err;
69b27e3d 2426 static u8 init_bufs[13][5] = {
780dfef3
CP
2427 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2428 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2429 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2430 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2431 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2432 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2433 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2434 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2435 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2436 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2437 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2438 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2439 { 0x03, 0x0C },
2440 };
2441
5b9c4e6d 2442 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
780dfef3
CP
2443 msg.buf = init_bufs[i];
2444 msg.len = (i != 12 ? 5 : 2);
2445 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2446 if (err != 1) {
0f19e65b
MCC
2447 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2448 "failed (err = %d)!\n", i, err);
780dfef3
CP
2449 return;
2450 }
2451 }
2452}
2453
0be51b46
MCC
2454static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2455 int command, int arg)
c2cb8fcc 2456{
9507901e
MCC
2457 /* Board-specific callbacks */
2458 switch (core->boardnr) {
2459 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
2460 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2461 case CX88_BOARD_GENIATECH_X8000_MT:
99e09eac 2462 case CX88_BOARD_KWORLD_ATSC_120:
0be51b46
MCC
2463 return cx88_xc3028_geniatech_tuner_callback(core,
2464 command, arg);
2422a9b3 2465 case CX88_BOARD_PROLINK_PV_8000GT:
a31d2bb7 2466 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
0be51b46 2467 return cx88_pv_8000gt_callback(core, command, arg);
b3fb91d2 2468 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
d7cba043 2469 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
0be51b46 2470 return cx88_dvico_xc2028_callback(core, command, arg);
9507901e
MCC
2471 }
2472
c2cb8fcc
MCC
2473 switch (command) {
2474 case XC2028_TUNER_RESET:
c2cb8fcc
MCC
2475 switch (INPUT(core->input).type) {
2476 case CX88_RADIO:
0f19e65b 2477 info_printk(core, "setting GPIO to radio!\n");
c2cb8fcc
MCC
2478 cx_write(MO_GP0_IO, 0x4ff);
2479 mdelay(250);
2480 cx_write(MO_GP2_IO, 0xff);
2481 mdelay(250);
c450e50e 2482 break;
c2cb8fcc
MCC
2483 case CX88_VMUX_DVB: /* Digital TV*/
2484 default: /* Analog TV */
0f19e65b 2485 info_printk(core, "setting GPIO to TV!\n");
c450e50e 2486 break;
c2cb8fcc 2487 }
c450e50e
MCC
2488 cx_write(MO_GP1_IO, 0x101010);
2489 mdelay(250);
2490 cx_write(MO_GP1_IO, 0x101000);
2491 mdelay(250);
2492 cx_write(MO_GP1_IO, 0x101010);
2493 mdelay(250);
2494 return 0;
c2cb8fcc
MCC
2495 }
2496 return -EINVAL;
2497}
2498
60464da8
ST
2499/* ----------------------------------------------------------------------- */
2500/* Tuner callback function. Currently only needed for the Pinnacle *
2501 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2502 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2503
0be51b46
MCC
2504static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2505 int command, int arg)
60464da8 2506{
c2cb8fcc 2507 switch (core->boardnr) {
60464da8 2508 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
c2cb8fcc 2509 if (command == 0) { /* This is the reset command from xc5000 */
72e04f72
ST
2510 /* Reset XC5000 tuner via SYS_RSTO_pin */
2511 cx_write(MO_SRST_IO, 0);
2512 msleep(10);
2513 cx_write(MO_SRST_IO, 1);
60464da8 2514 return 0;
c2cb8fcc 2515 } else {
0f19e65b
MCC
2516 err_printk(core, "xc5000: unknown tuner "
2517 "callback command.\n");
60464da8
ST
2518 return -EINVAL;
2519 }
2520 break;
1117d6ba
ST
2521 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2522 if (command == 0) { /* This is the reset command from xc5000 */
2523 cx_clear(MO_GP0_IO, 0x00000010);
2524 msleep(10);
2525 cx_set(MO_GP0_IO, 0x00000010);
2526 return 0;
2527 } else {
2528 printk(KERN_ERR
2529 "xc5000: unknown tuner callback command.\n");
2530 return -EINVAL;
2531 }
2532 break;
60464da8
ST
2533 }
2534 return 0; /* Should never be here */
2535}
c2cb8fcc 2536
d7cba043 2537int cx88_tuner_callback(void *priv, int component, int command, int arg)
c2cb8fcc
MCC
2538{
2539 struct i2c_algo_bit_data *i2c_algo = priv;
0be51b46
MCC
2540 struct cx88_core *core;
2541
2542 if (!i2c_algo) {
2543 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
2544 return -EINVAL;
2545 }
2546
2547 core = i2c_algo->data;
2548
2549 if (!core) {
2550 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
2551 return -EINVAL;
2552 }
c2cb8fcc 2553
d7cba043
MK
2554 if (component != DVB_FRONTEND_COMPONENT_TUNER)
2555 return -EINVAL;
2556
c2cb8fcc
MCC
2557 switch (core->board.tuner_type) {
2558 case TUNER_XC2028:
0f19e65b 2559 info_printk(core, "Calling XC2028/3028 callback\n");
0be51b46 2560 return cx88_xc2028_tuner_callback(core, command, arg);
c2cb8fcc 2561 case TUNER_XC5000:
0f19e65b 2562 info_printk(core, "Calling XC5000 callback\n");
0be51b46 2563 return cx88_xc5000_tuner_callback(core, command, arg);
c2cb8fcc 2564 }
0f19e65b
MCC
2565 err_printk(core, "Error: Calling callback for tuner %d\n",
2566 core->board.tuner_type);
c2cb8fcc
MCC
2567 return -EINVAL;
2568}
60464da8
ST
2569EXPORT_SYMBOL(cx88_tuner_callback);
2570
1da177e4
LT
2571/* ----------------------------------------------------------------------- */
2572
bbc83597 2573static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1da177e4
LT
2574{
2575 int i;
2576
2577 if (0 == pci->subsystem_vendor &&
2578 0 == pci->subsystem_device) {
0f19e65b
MCC
2579 printk(KERN_ERR
2580 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1da177e4
LT
2581 "%s: be autodetected. Please pass card=<n> insmod option to\n"
2582 "%s: workaround that. Redirect complaints to the vendor of\n"
2583 "%s: the TV card. Best regards,\n"
2584 "%s: -- tux\n",
2585 core->name,core->name,core->name,core->name,core->name);
2586 } else {
0f19e65b
MCC
2587 printk(KERN_ERR
2588 "%s: Your board isn't known (yet) to the driver. You can\n"
1da177e4
LT
2589 "%s: try to pick one of the existing card configs via\n"
2590 "%s: card=<n> insmod option. Updating to the latest\n"
2591 "%s: version might help as well.\n",
2592 core->name,core->name,core->name,core->name);
2593 }
0f19e65b
MCC
2594 err_printk(core, "Here is a list of valid choices for the card=<n> "
2595 "insmod option:\n");
bbc83597 2596 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
0f19e65b 2597 printk(KERN_ERR "%s: card=%d -> %s\n",
1da177e4
LT
2598 core->name, i, cx88_boards[i].name);
2599}
2600
bbc83597 2601static void cx88_card_setup_pre_i2c(struct cx88_core *core)
aa481a65 2602{
6a59d64c 2603 switch (core->boardnr) {
aa481a65 2604 case CX88_BOARD_HAUPPAUGE_HVR1300:
2491fbb7
ST
2605 /*
2606 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
2607 * We leave here with the 702 on the bus
2608 *
2609 * "reset the IR receiver on GPIO[3]"
2610 * Reported by Mike Crash <mike AT mikecrash.com>
2611 */
2612 cx_write(MO_GP0_IO, 0x0000ef88);
aa481a65 2613 udelay(1000);
2491fbb7 2614 cx_clear(MO_GP0_IO, 0x00000088);
aa481a65 2615 udelay(50);
2491fbb7 2616 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
aa481a65
ST
2617 udelay(1000);
2618 break;
2422a9b3 2619
a31d2bb7 2620 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2422a9b3
MCC
2621 case CX88_BOARD_PROLINK_PV_8000GT:
2622 cx_write(MO_GP2_IO, 0xcf7);
2623 mdelay(50);
2624 cx_write(MO_GP2_IO, 0xef5);
2625 mdelay(50);
2626 cx_write(MO_GP2_IO, 0xcf7);
2627 msleep(10);
2628 break;
2629
2491fbb7 2630 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
1117d6ba
ST
2631 /* Enable the xc5000 tuner */
2632 cx_set(MO_GP0_IO, 0x00001010);
2633 break;
2491fbb7
ST
2634
2635 case CX88_BOARD_HAUPPAUGE_HVR3000:
5bd1b663
ST
2636 case CX88_BOARD_HAUPPAUGE_HVR4000:
2637 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
2491fbb7
ST
2638 /* Init GPIO */
2639 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
5bd1b663 2640 udelay(1000);
2491fbb7 2641 break;
aa481a65
ST
2642 }
2643}
2644
99e09eac
MCC
2645/*
2646 * Sets board-dependent xc3028 configuration
2647 */
2648void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
2649{
2650 memset(ctl, 0, sizeof(*ctl));
2651
2652 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2653 ctl->max_len = 64;
2654
2655 switch (core->boardnr) {
2656 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
a9606ce6
DG
2657 /* Now works with firmware version 2.7 */
2658 if (core->i2c_algo.udelay < 16)
2659 core->i2c_algo.udelay = 16;
99e09eac
MCC
2660 break;
2661 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2662 ctl->scode_table = XC3028_FE_ZARLINK456;
2663 break;
2664 case CX88_BOARD_KWORLD_ATSC_120:
2665 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2666 ctl->demod = XC3028_FE_OREN538;
2667 break;
a31d2bb7 2668 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
99e09eac
MCC
2669 case CX88_BOARD_PROLINK_PV_8000GT:
2670 /*
a31d2bb7 2671 * Those boards uses non-MTS firmware
99e09eac
MCC
2672 */
2673 break;
2674 default:
2675 ctl->demod = XC3028_FE_OREN538;
2676 ctl->mts = 1;
2677 }
2678}
2679EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
2680
bbc83597 2681static void cx88_card_setup(struct cx88_core *core)
1da177e4 2682{
3ca0ea98 2683 static u8 eeprom[256];
4bf1226a
MCC
2684 struct tuner_setup tun_setup;
2685 unsigned int mode_mask = T_RADIO |
2686 T_ANALOG_TV |
2687 T_DIGITAL_TV;
2688
2689 memset(&tun_setup, 0, sizeof(tun_setup));
1da177e4
LT
2690
2691 if (0 == core->i2c_rc) {
2692 core->i2c_client.addr = 0xa0 >> 1;
4bf1226a 2693 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
1da177e4
LT
2694 }
2695
6a59d64c 2696 switch (core->boardnr) {
1da177e4
LT
2697 case CX88_BOARD_HAUPPAUGE:
2698 case CX88_BOARD_HAUPPAUGE_ROSLYN:
2699 if (0 == core->i2c_rc)
4bf1226a 2700 hauppauge_eeprom(core, eeprom+8);
1da177e4
LT
2701 break;
2702 case CX88_BOARD_GDI:
2703 if (0 == core->i2c_rc)
4bf1226a 2704 gdi_eeprom(core, eeprom);
1da177e4
LT
2705 break;
2706 case CX88_BOARD_WINFAST2000XP_EXPERT:
2707 if (0 == core->i2c_rc)
4bf1226a 2708 leadtek_eeprom(core, eeprom);
1da177e4 2709 break;
0fa14aa6
ST
2710 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
2711 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
1da177e4 2712 case CX88_BOARD_HAUPPAUGE_DVB_T1:
611900c1
ST
2713 case CX88_BOARD_HAUPPAUGE_HVR1100:
2714 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
ad10c930 2715 case CX88_BOARD_HAUPPAUGE_HVR3000:
aa481a65 2716 case CX88_BOARD_HAUPPAUGE_HVR1300:
5bd1b663
ST
2717 case CX88_BOARD_HAUPPAUGE_HVR4000:
2718 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
1da177e4 2719 if (0 == core->i2c_rc)
4bf1226a 2720 hauppauge_eeprom(core, eeprom);
1da177e4 2721 break;
0e0351e3
VC
2722 case CX88_BOARD_KWORLD_DVBS_100:
2723 cx_write(MO_GP0_IO, 0x000007f8);
2724 cx_write(MO_GP1_IO, 0x00000001);
2725 break;
8765561f
CP
2726 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2727 /* GPIO0:0 is hooked to demod reset */
2728 /* GPIO0:4 is hooked to xc3028 reset */
2729 cx_write(MO_GP0_IO, 0x00111100);
2730 msleep(1);
2731 cx_write(MO_GP0_IO, 0x00111111);
2732 break;
d536e9c4
CP
2733 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
2734 /* GPIO0:6 is hooked to FX2 reset pin */
2735 cx_set(MO_GP0_IO, 0x00004040);
2736 cx_clear(MO_GP0_IO, 0x00000040);
2737 msleep(1000);
2738 cx_set(MO_GP0_IO, 0x00004040);
2739 /* FALLTHROUGH */
1da177e4
LT
2740 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
2741 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
780dfef3 2742 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
1da177e4
LT
2743 /* GPIO0:0 is hooked to mt352 reset pin */
2744 cx_set(MO_GP0_IO, 0x00000101);
2745 cx_clear(MO_GP0_IO, 0x00000001);
2746 msleep(1);
2747 cx_set(MO_GP0_IO, 0x00000101);
780dfef3 2748 if (0 == core->i2c_rc &&
6a59d64c 2749 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
780dfef3 2750 dvico_fusionhdtv_hybrid_init(core);
1da177e4
LT
2751 break;
2752 case CX88_BOARD_KWORLD_DVB_T:
2753 case CX88_BOARD_DNTV_LIVE_DVB_T:
2754 cx_set(MO_GP0_IO, 0x00000707);
2755 cx_set(MO_GP2_IO, 0x00000101);
2756 cx_clear(MO_GP2_IO, 0x00000001);
2757 msleep(1);
2758 cx_clear(MO_GP0_IO, 0x00000007);
2759 cx_set(MO_GP2_IO, 0x00000101);
2760 break;
fc40b261
CP
2761 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
2762 cx_write(MO_GP0_IO, 0x00080808);
2763 break;
e976f937
KL
2764 case CX88_BOARD_ATI_HDTVWONDER:
2765 if (0 == core->i2c_rc) {
2766 /* enable tuner */
2767 int i;
5b9c4e6d
MCC
2768 static const u8 buffer [][2] = {
2769 {0x10,0x12},
2770 {0x13,0x04},
2771 {0x16,0x00},
2772 {0x14,0x04},
2773 {0x17,0x00}
2774 };
e976f937 2775 core->i2c_client.addr = 0x0a;
e976f937 2776
5b9c4e6d
MCC
2777 for (i = 0; i < ARRAY_SIZE(buffer); i++)
2778 if (2 != i2c_master_send(&core->i2c_client,
2779 buffer[i],2))
0f19e65b
MCC
2780 warn_printk(core, "Unable to enable "
2781 "tuner(%i).\n", i);
e976f937
KL
2782 }
2783 break;
55c88610
MCC
2784 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
2785 {
2786 struct v4l2_priv_tun_config tea5767_cfg;
2787 struct tea5767_ctrl ctl;
2788
2789 memset(&ctl, 0, sizeof(ctl));
2790
2791 ctl.high_cut = 1;
2792 ctl.st_noise = 1;
2793 ctl.deemph_75 = 1;
2794 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
2795
2796 tea5767_cfg.tuner = TUNER_TEA5767;
2797 tea5767_cfg.priv = &ctl;
2798
2799 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
af832623 2800 break;
55c88610 2801 }
e4aab64c 2802 case CX88_BOARD_TEVII_S420:
af832623
IL
2803 case CX88_BOARD_TEVII_S460:
2804 cx_write(MO_SRST_IO, 0);
2805 msleep(100);
2806 cx_write(MO_SRST_IO, 1);
2807 msleep(100);
2808 break;
4cd7fb87
OR
2809 case CX88_BOARD_OMICOM_SS4_PCI:
2810 cx_write(MO_SRST_IO, 0);
2811 msleep(100);
2812 cx_write(MO_SRST_IO, 1);
2813 msleep(100);
2814 break;
ee73042c
OR
2815 case CX88_BOARD_TBS_8920:
2816 cx_write(MO_SRST_IO, 0);
2817 msleep(100);
2818 cx_write(MO_SRST_IO, 1);
2819 msleep(100);
2820 break;
4bf1226a
MCC
2821 } /*end switch() */
2822
2823
2824 /* Setup tuners */
2825 if ((core->board.radio_type != UNSET)) {
2826 tun_setup.mode_mask = T_RADIO;
2827 tun_setup.type = core->board.radio_type;
2828 tun_setup.addr = core->board.radio_addr;
2829 tun_setup.tuner_callback = cx88_tuner_callback;
2830 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
2831 mode_mask &= ~T_RADIO;
2832 }
2833
2834 if (core->board.tuner_type != TUNER_ABSENT) {
2835 tun_setup.mode_mask = mode_mask;
2836 tun_setup.type = core->board.tuner_type;
2837 tun_setup.addr = core->board.tuner_addr;
2838 tun_setup.tuner_callback = cx88_tuner_callback;
2839
2840 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
2841 }
2842
2843 if (core->board.tda9887_conf) {
2844 struct v4l2_priv_tun_config tda9887_cfg;
2845
2846 tda9887_cfg.tuner = TUNER_TDA9887;
2847 tda9887_cfg.priv = &core->board.tda9887_conf;
2848
2849 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
1da177e4 2850 }
c2cb8fcc
MCC
2851
2852 if (core->board.tuner_type == TUNER_XC2028) {
2853 struct v4l2_priv_tun_config xc2028_cfg;
2854 struct xc2028_ctrl ctl;
2855
99e09eac
MCC
2856 /* Fills device-dependent initialization parameters */
2857 cx88_setup_xc3028(core, &ctl);
c2cb8fcc 2858
99e09eac
MCC
2859 /* Sends parameters to xc2028/3028 tuner */
2860 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
c2cb8fcc
MCC
2861 xc2028_cfg.tuner = TUNER_XC2028;
2862 xc2028_cfg.priv = &ctl;
64016330
MCC
2863 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
2864 ctl.fname);
c2cb8fcc
MCC
2865 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
2866 }
4bf1226a 2867 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
1da177e4
LT
2868}
2869
2870/* ------------------------------------------------------------------ */
2871
bbc83597
TP
2872static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
2873{
2874 unsigned int lat = UNSET;
2875 u8 ctrl = 0;
2876 u8 value;
2877
2878 /* check pci quirks */
2879 if (pci_pci_problems & PCIPCI_TRITON) {
2880 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
2881 name);
2882 ctrl |= CX88X_EN_TBFX;
2883 }
2884 if (pci_pci_problems & PCIPCI_NATOMA) {
2885 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
2886 name);
2887 ctrl |= CX88X_EN_TBFX;
2888 }
2889 if (pci_pci_problems & PCIPCI_VIAETBF) {
2890 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
2891 name);
2892 ctrl |= CX88X_EN_TBFX;
2893 }
2894 if (pci_pci_problems & PCIPCI_VSFX) {
2895 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
2896 name);
2897 ctrl |= CX88X_EN_VSFX;
2898 }
2899#ifdef PCIPCI_ALIMAGIK
2900 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
2901 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
2902 name);
2903 lat = 0x0A;
2904 }
2905#endif
2906
2907 /* check insmod options */
2908 if (UNSET != latency)
2909 lat = latency;
2910
2911 /* apply stuff */
2912 if (ctrl) {
2913 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
2914 value |= ctrl;
2915 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
2916 }
2917 if (UNSET != lat) {
2918 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
2919 name, latency);
2920 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
2921 }
2922 return 0;
2923}
2924
2925int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
2926{
2927 if (request_mem_region(pci_resource_start(pci,0),
2928 pci_resource_len(pci,0),
2929 core->name))
2930 return 0;
2931 printk(KERN_ERR
2932 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
2933 core->name, PCI_FUNC(pci->devfn),
2934 (unsigned long long)pci_resource_start(pci, 0),
2935 pci->subsystem_vendor, pci->subsystem_device);
2936 return -EBUSY;
2937}
2938
2939/* Allocate and initialize the cx88 core struct. One should hold the
2940 * devlist mutex before calling this. */
2941struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
2942{
2943 struct cx88_core *core;
2944 int i;
2945
2946 core = kzalloc(sizeof(*core), GFP_KERNEL);
2947
2948 atomic_inc(&core->refcount);
2949 core->pci_bus = pci->bus->number;
2950 core->pci_slot = PCI_SLOT(pci->devfn);
8ddac9ee
TP
2951 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
2952 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
2953 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
bbc83597
TP
2954 mutex_init(&core->lock);
2955
2956 core->nr = nr;
2957 sprintf(core->name, "cx88[%d]", core->nr);
2958 if (0 != cx88_get_resources(core, pci)) {
2959 kfree(core);
2960 return NULL;
2961 }
2962
2963 /* PCI stuff */
2964 cx88_pci_quirks(core->name, pci);
2965 core->lmmio = ioremap(pci_resource_start(pci, 0),
2966 pci_resource_len(pci, 0));
2967 core->bmmio = (u8 __iomem *)core->lmmio;
2968
2969 /* board config */
2970 core->boardnr = UNSET;
2971 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
2972 core->boardnr = card[core->nr];
2973 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
2974 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
2975 pci->subsystem_device == cx88_subids[i].subdevice)
2976 core->boardnr = cx88_subids[i].card;
2977 if (UNSET == core->boardnr) {
2978 core->boardnr = CX88_BOARD_UNKNOWN;
2979 cx88_card_list(core, pci);
2980 }
2981
2982 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
2983
0f19e65b
MCC
2984 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
2985 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
bbc83597
TP
2986 core->boardnr, card[core->nr] == core->boardnr ?
2987 "insmod option" : "autodetected");
2988
2989 if (tuner[core->nr] != UNSET)
2990 core->board.tuner_type = tuner[core->nr];
2991 if (radio[core->nr] != UNSET)
2992 core->board.radio_type = radio[core->nr];
2993
0f19e65b
MCC
2994 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
2995 core->board.tuner_type, core->board.radio_type);
bbc83597
TP
2996
2997 /* init hardware */
2998 cx88_reset(core);
2999 cx88_card_setup_pre_i2c(core);
3000 cx88_i2c_init(core, pci);
189bf5f0
MCC
3001
3002 /* load tuner module, if needed */
3003 if (TUNER_ABSENT != core->board.tuner_type)
3004 request_module("tuner");
3005
bbc83597
TP
3006 cx88_card_setup(core);
3007 cx88_ir_init(core, pci);
3008
3009 return core;
3010}
This page took 0.57954 seconds and 5 git commands to generate.