]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/media/pci/cx88/cx88-cards.c
[media] cx88: make checkpatch.pl happy
[mirror_ubuntu-bionic-kernel.git] / drivers / media / pci / cx88 / cx88-cards.c
CommitLineData
1da177e4 1/*
1da177e4
LT
2 * device driver for Conexant 2388x based TV cards
3 * card-specific stuff.
4 *
5 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
1da177e4
LT
16 */
17
65bc2fe8
MCC
18#include "cx88.h"
19#include "tea5767.h"
20#include "xc4000.h"
21
1da177e4
LT
22#include <linux/init.h>
23#include <linux/module.h>
24#include <linux/pci.h>
25#include <linux/delay.h>
5a0e3ad6 26#include <linux/slab.h>
1da177e4 27
bbc83597
TP
28static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
29static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
30static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
31
32module_param_array(tuner, int, NULL, 0444);
33module_param_array(radio, int, NULL, 0444);
34module_param_array(card, int, NULL, 0444);
35
7b61ba8f
MCC
36MODULE_PARM_DESC(tuner, "tuner type");
37MODULE_PARM_DESC(radio, "radio tuner type");
38MODULE_PARM_DESC(card, "card type");
bbc83597
TP
39
40static unsigned int latency = UNSET;
7b61ba8f
MCC
41module_param(latency, int, 0444);
42MODULE_PARM_DESC(latency, "pci latency timer");
bbc83597 43
89c3bc78
JD
44static int disable_ir;
45module_param(disable_ir, int, 0444);
97108cf6 46MODULE_PARM_DESC(disable_ir, "Disable IR support");
89c3bc78 47
7b61ba8f 48#define dprintk(level, fmt, arg...) do { \
02615ed5 49 if (cx88_core_debug >= level) \
65bc2fe8
MCC
50 printk(KERN_DEBUG pr_fmt("%s: core:" fmt), \
51 __func__, ##arg); \
52} while (0)
02615ed5 53
1da177e4
LT
54/* ------------------------------------------------------------------ */
55/* board config info */
56
4bf1226a
MCC
57/* If radio_type !=UNSET, radio_addr should be specified
58 */
59
bbc83597 60static const struct cx88_board cx88_boards[] = {
1da177e4
LT
61 [CX88_BOARD_UNKNOWN] = {
62 .name = "UNKNOWN/GENERIC",
63 .tuner_type = UNSET,
b45009b0
MCC
64 .radio_type = UNSET,
65 .tuner_addr = ADDR_UNSET,
66 .radio_addr = ADDR_UNSET,
e2392d34 67 .input = { {
1da177e4
LT
68 .type = CX88_VMUX_COMPOSITE1,
69 .vmux = 0,
e2392d34 70 }, {
1da177e4
LT
71 .type = CX88_VMUX_COMPOSITE2,
72 .vmux = 1,
e2392d34 73 }, {
1da177e4
LT
74 .type = CX88_VMUX_COMPOSITE3,
75 .vmux = 2,
e2392d34 76 }, {
1da177e4
LT
77 .type = CX88_VMUX_COMPOSITE4,
78 .vmux = 3,
e2392d34 79 } },
1da177e4
LT
80 },
81 [CX88_BOARD_HAUPPAUGE] = {
82 .name = "Hauppauge WinTV 34xxx models",
83 .tuner_type = UNSET,
b45009b0
MCC
84 .radio_type = UNSET,
85 .tuner_addr = ADDR_UNSET,
86 .radio_addr = ADDR_UNSET,
1da177e4 87 .tda9887_conf = TDA9887_PRESENT,
e2392d34 88 .input = { {
1da177e4
LT
89 .type = CX88_VMUX_TELEVISION,
90 .vmux = 0,
91 .gpio0 = 0xff00, // internal decoder
e2392d34 92 }, {
1da177e4
LT
93 .type = CX88_VMUX_DEBUG,
94 .vmux = 0,
95 .gpio0 = 0xff01, // mono from tuner chip
e2392d34 96 }, {
1da177e4
LT
97 .type = CX88_VMUX_COMPOSITE1,
98 .vmux = 1,
99 .gpio0 = 0xff02,
e2392d34 100 }, {
1da177e4
LT
101 .type = CX88_VMUX_SVIDEO,
102 .vmux = 2,
103 .gpio0 = 0xff02,
e2392d34 104 } },
1da177e4
LT
105 .radio = {
106 .type = CX88_RADIO,
107 .gpio0 = 0xff01,
108 },
109 },
110 [CX88_BOARD_GDI] = {
111 .name = "GDI Black Gold",
112 .tuner_type = UNSET,
b45009b0
MCC
113 .radio_type = UNSET,
114 .tuner_addr = ADDR_UNSET,
115 .radio_addr = ADDR_UNSET,
e2392d34 116 .input = { {
1da177e4
LT
117 .type = CX88_VMUX_TELEVISION,
118 .vmux = 0,
e2392d34 119 }, {
fd3113e8
MCC
120 .type = CX88_VMUX_SVIDEO,
121 .vmux = 2,
e2392d34 122 } },
1da177e4
LT
123 },
124 [CX88_BOARD_PIXELVIEW] = {
125 .name = "PixelView",
b45009b0
MCC
126 .tuner_type = TUNER_PHILIPS_PAL,
127 .radio_type = UNSET,
128 .tuner_addr = ADDR_UNSET,
129 .radio_addr = ADDR_UNSET,
e2392d34 130 .input = { {
1da177e4
LT
131 .type = CX88_VMUX_TELEVISION,
132 .vmux = 0,
133 .gpio0 = 0xff00, // internal decoder
e2392d34 134 }, {
1da177e4
LT
135 .type = CX88_VMUX_COMPOSITE1,
136 .vmux = 1,
e2392d34 137 }, {
1da177e4
LT
138 .type = CX88_VMUX_SVIDEO,
139 .vmux = 2,
e2392d34 140 } },
1da177e4
LT
141 .radio = {
142 .type = CX88_RADIO,
143 .gpio0 = 0xff10,
47ee2f38 144 },
1da177e4
LT
145 },
146 [CX88_BOARD_ATI_WONDER_PRO] = {
147 .name = "ATI TV Wonder Pro",
b45009b0
MCC
148 .tuner_type = TUNER_PHILIPS_4IN1,
149 .radio_type = UNSET,
150 .tuner_addr = ADDR_UNSET,
151 .radio_addr = ADDR_UNSET,
1da177e4 152 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
e2392d34 153 .input = { {
1da177e4
LT
154 .type = CX88_VMUX_TELEVISION,
155 .vmux = 0,
4ac97914 156 .gpio0 = 0x03ff,
e2392d34 157 }, {
1da177e4
LT
158 .type = CX88_VMUX_COMPOSITE1,
159 .vmux = 1,
4ac97914 160 .gpio0 = 0x03fe,
e2392d34 161 }, {
1da177e4
LT
162 .type = CX88_VMUX_SVIDEO,
163 .vmux = 2,
4ac97914 164 .gpio0 = 0x03fe,
e2392d34 165 } },
1da177e4 166 },
4ac97914
MCC
167 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
168 .name = "Leadtek Winfast 2000XP Expert",
169 .tuner_type = TUNER_PHILIPS_4IN1,
b45009b0
MCC
170 .radio_type = UNSET,
171 .tuner_addr = ADDR_UNSET,
172 .radio_addr = ADDR_UNSET,
1da177e4 173 .tda9887_conf = TDA9887_PRESENT,
e2392d34 174 .input = { {
4ac97914
MCC
175 .type = CX88_VMUX_TELEVISION,
176 .vmux = 0,
1da177e4
LT
177 .gpio0 = 0x00F5e700,
178 .gpio1 = 0x00003004,
179 .gpio2 = 0x00F5e700,
180 .gpio3 = 0x02000000,
e2392d34 181 }, {
1da177e4
LT
182 .type = CX88_VMUX_COMPOSITE1,
183 .vmux = 1,
184 .gpio0 = 0x00F5c700,
185 .gpio1 = 0x00003004,
186 .gpio2 = 0x00F5c700,
187 .gpio3 = 0x02000000,
e2392d34 188 }, {
1da177e4
LT
189 .type = CX88_VMUX_SVIDEO,
190 .vmux = 2,
191 .gpio0 = 0x00F5c700,
192 .gpio1 = 0x00003004,
193 .gpio2 = 0x00F5c700,
194 .gpio3 = 0x02000000,
e2392d34 195 } },
4ac97914
MCC
196 .radio = {
197 .type = CX88_RADIO,
1da177e4
LT
198 .gpio0 = 0x00F5d700,
199 .gpio1 = 0x00003004,
200 .gpio2 = 0x00F5d700,
201 .gpio3 = 0x02000000,
4ac97914
MCC
202 },
203 },
7418f346 204 [CX88_BOARD_AVERTV_STUDIO_303] = {
1da177e4 205 .name = "AverTV Studio 303 (M126)",
b45009b0
MCC
206 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
207 .radio_type = UNSET,
208 .tuner_addr = ADDR_UNSET,
209 .radio_addr = ADDR_UNSET,
1da177e4 210 .tda9887_conf = TDA9887_PRESENT,
e2392d34 211 .input = { {
1da177e4
LT
212 .type = CX88_VMUX_TELEVISION,
213 .vmux = 0,
4aca4831 214 .gpio1 = 0xe09f,
e2392d34 215 }, {
1da177e4
LT
216 .type = CX88_VMUX_COMPOSITE1,
217 .vmux = 1,
4aca4831 218 .gpio1 = 0xe05f,
e2392d34 219 }, {
1da177e4
LT
220 .type = CX88_VMUX_SVIDEO,
221 .vmux = 2,
4aca4831 222 .gpio1 = 0xe05f,
e2392d34 223 } },
1da177e4 224 .radio = {
4aca4831 225 .gpio1 = 0xe0df,
1da177e4
LT
226 .type = CX88_RADIO,
227 },
228 },
229 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
230 // added gpio values thanks to Michal
231 // values for PAL from DScaler
232 .name = "MSI TV-@nywhere Master",
b45009b0
MCC
233 .tuner_type = TUNER_MT2032,
234 .radio_type = UNSET,
235 .tuner_addr = ADDR_UNSET,
236 .radio_addr = ADDR_UNSET,
3ae1adc6 237 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
e2392d34 238 .input = { {
1da177e4
LT
239 .type = CX88_VMUX_TELEVISION,
240 .vmux = 0,
241 .gpio0 = 0x000040bf,
242 .gpio1 = 0x000080c0,
243 .gpio2 = 0x0000ff40,
e2392d34 244 }, {
4ac97914
MCC
245 .type = CX88_VMUX_COMPOSITE1,
246 .vmux = 1,
1da177e4
LT
247 .gpio0 = 0x000040bf,
248 .gpio1 = 0x000080c0,
249 .gpio2 = 0x0000ff40,
e2392d34 250 }, {
4ac97914
MCC
251 .type = CX88_VMUX_SVIDEO,
252 .vmux = 2,
1da177e4
LT
253 .gpio0 = 0x000040bf,
254 .gpio1 = 0x000080c0,
255 .gpio2 = 0x0000ff40,
e2392d34 256 } },
4ac97914 257 .radio = {
1da177e4 258 .type = CX88_RADIO,
55c88610
MCC
259 .vmux = 3,
260 .gpio0 = 0x000040bf,
261 .gpio1 = 0x000080c0,
262 .gpio2 = 0x0000ff20,
4ac97914 263 },
1da177e4
LT
264 },
265 [CX88_BOARD_WINFAST_DV2000] = {
4ac97914
MCC
266 .name = "Leadtek Winfast DV2000",
267 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
b45009b0
MCC
268 .radio_type = UNSET,
269 .tuner_addr = ADDR_UNSET,
270 .radio_addr = ADDR_UNSET,
1da177e4 271 .tda9887_conf = TDA9887_PRESENT,
e2392d34 272 .input = { {
4ac97914
MCC
273 .type = CX88_VMUX_TELEVISION,
274 .vmux = 0,
1da177e4
LT
275 .gpio0 = 0x0035e700,
276 .gpio1 = 0x00003004,
277 .gpio2 = 0x0035e700,
278 .gpio3 = 0x02000000,
e2392d34 279 }, {
1da177e4
LT
280 .type = CX88_VMUX_COMPOSITE1,
281 .vmux = 1,
282 .gpio0 = 0x0035c700,
283 .gpio1 = 0x00003004,
284 .gpio2 = 0x0035c700,
285 .gpio3 = 0x02000000,
e2392d34 286 }, {
1da177e4
LT
287 .type = CX88_VMUX_SVIDEO,
288 .vmux = 2,
289 .gpio0 = 0x0035c700,
290 .gpio1 = 0x0035c700,
291 .gpio2 = 0x02000000,
292 .gpio3 = 0x02000000,
e2392d34 293 } },
4ac97914 294 .radio = {
1da177e4
LT
295 .type = CX88_RADIO,
296 .gpio0 = 0x0035d700,
297 .gpio1 = 0x00007004,
298 .gpio2 = 0x0035d700,
299 .gpio3 = 0x02000000,
47ee2f38 300 },
4ac97914 301 },
b45009b0 302 [CX88_BOARD_LEADTEK_PVR2000] = {
1da177e4 303 // gpio values for PAL version from regspy by DScaler
b45009b0
MCC
304 .name = "Leadtek PVR 2000",
305 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
306 .radio_type = UNSET,
307 .tuner_addr = ADDR_UNSET,
308 .radio_addr = ADDR_UNSET,
1da177e4 309 .tda9887_conf = TDA9887_PRESENT,
e2392d34 310 .input = { {
b45009b0
MCC
311 .type = CX88_VMUX_TELEVISION,
312 .vmux = 0,
313 .gpio0 = 0x0000bde2,
7b27d45b 314 .audioroute = 1,
e2392d34 315 }, {
b45009b0
MCC
316 .type = CX88_VMUX_COMPOSITE1,
317 .vmux = 1,
318 .gpio0 = 0x0000bde6,
7b27d45b 319 .audioroute = 1,
e2392d34 320 }, {
b45009b0
MCC
321 .type = CX88_VMUX_SVIDEO,
322 .vmux = 2,
323 .gpio0 = 0x0000bde6,
7b27d45b 324 .audioroute = 1,
e2392d34 325 } },
b45009b0
MCC
326 .radio = {
327 .type = CX88_RADIO,
328 .gpio0 = 0x0000bd62,
7b27d45b 329 .audioroute = 1,
b45009b0 330 },
48d5e803 331 .mpeg = CX88_MPEG_BLACKBIRD,
b45009b0 332 },
1da177e4 333 [CX88_BOARD_IODATA_GVVCP3PCI] = {
4ac97914 334 .name = "IODATA GV-VCP3/PCI",
c39ba330 335 .tuner_type = UNSET,
4ac97914 336 .radio_type = UNSET,
b45009b0
MCC
337 .tuner_addr = ADDR_UNSET,
338 .radio_addr = ADDR_UNSET,
e2392d34 339 .input = { {
4ac97914
MCC
340 .type = CX88_VMUX_COMPOSITE1,
341 .vmux = 0,
e2392d34 342 }, {
4ac97914
MCC
343 .type = CX88_VMUX_COMPOSITE2,
344 .vmux = 1,
e2392d34 345 }, {
4ac97914
MCC
346 .type = CX88_VMUX_SVIDEO,
347 .vmux = 2,
e2392d34 348 } },
4ac97914 349 },
1da177e4 350 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
4ac97914
MCC
351 .name = "Prolink PlayTV PVR",
352 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
b45009b0
MCC
353 .radio_type = UNSET,
354 .tuner_addr = ADDR_UNSET,
355 .radio_addr = ADDR_UNSET,
1da177e4 356 .tda9887_conf = TDA9887_PRESENT,
e2392d34 357 .input = { {
1da177e4
LT
358 .type = CX88_VMUX_TELEVISION,
359 .vmux = 0,
fc34f165 360 .gpio0 = 0xbff0,
e2392d34 361 }, {
1da177e4
LT
362 .type = CX88_VMUX_COMPOSITE1,
363 .vmux = 1,
fc34f165 364 .gpio0 = 0xbff3,
e2392d34 365 }, {
1da177e4
LT
366 .type = CX88_VMUX_SVIDEO,
367 .vmux = 2,
fc34f165 368 .gpio0 = 0xbff3,
e2392d34 369 } },
1da177e4
LT
370 .radio = {
371 .type = CX88_RADIO,
fc34f165 372 .gpio0 = 0xbff0,
1da177e4
LT
373 },
374 },
375 [CX88_BOARD_ASUS_PVR_416] = {
376 .name = "ASUS PVR-416",
b45009b0
MCC
377 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
378 .radio_type = UNSET,
379 .tuner_addr = ADDR_UNSET,
380 .radio_addr = ADDR_UNSET,
381 .tda9887_conf = TDA9887_PRESENT,
e2392d34 382 .input = { {
1da177e4
LT
383 .type = CX88_VMUX_TELEVISION,
384 .vmux = 0,
385 .gpio0 = 0x0000fde6,
e2392d34 386 }, {
1da177e4
LT
387 .type = CX88_VMUX_SVIDEO,
388 .vmux = 2,
389 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
7b27d45b 390 .audioroute = 1,
e2392d34 391 } },
4ac97914
MCC
392 .radio = {
393 .type = CX88_RADIO,
1da177e4 394 .gpio0 = 0x0000fde2,
4ac97914 395 },
48d5e803 396 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
397 },
398 [CX88_BOARD_MSI_TVANYWHERE] = {
399 .name = "MSI TV-@nywhere",
b45009b0
MCC
400 .tuner_type = TUNER_MT2032,
401 .radio_type = UNSET,
402 .tuner_addr = ADDR_UNSET,
403 .radio_addr = ADDR_UNSET,
1da177e4 404 .tda9887_conf = TDA9887_PRESENT,
e2392d34 405 .input = { {
1da177e4
LT
406 .type = CX88_VMUX_TELEVISION,
407 .vmux = 0,
408 .gpio0 = 0x00000fbf,
409 .gpio2 = 0x0000fc08,
e2392d34 410 }, {
4ac97914
MCC
411 .type = CX88_VMUX_COMPOSITE1,
412 .vmux = 1,
1da177e4
LT
413 .gpio0 = 0x00000fbf,
414 .gpio2 = 0x0000fc68,
e2392d34 415 }, {
4ac97914
MCC
416 .type = CX88_VMUX_SVIDEO,
417 .vmux = 2,
1da177e4
LT
418 .gpio0 = 0x00000fbf,
419 .gpio2 = 0x0000fc68,
e2392d34 420 } },
1da177e4 421 },
4ac97914
MCC
422 [CX88_BOARD_KWORLD_DVB_T] = {
423 .name = "KWorld/VStream XPert DVB-T",
c39ba330 424 .tuner_type = UNSET,
b45009b0
MCC
425 .radio_type = UNSET,
426 .tuner_addr = ADDR_UNSET,
427 .radio_addr = ADDR_UNSET,
e2392d34 428 .input = { {
4ac97914
MCC
429 .type = CX88_VMUX_COMPOSITE1,
430 .vmux = 1,
1da177e4
LT
431 .gpio0 = 0x0700,
432 .gpio2 = 0x0101,
e2392d34 433 }, {
4ac97914
MCC
434 .type = CX88_VMUX_SVIDEO,
435 .vmux = 2,
1da177e4
LT
436 .gpio0 = 0x0700,
437 .gpio2 = 0x0101,
e2392d34 438 } },
48d5e803 439 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
440 },
441 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
a82decf6 442 .name = "DViCO FusionHDTV DVB-T1",
c39ba330 443 .tuner_type = UNSET, /* No analog tuner */
b45009b0
MCC
444 .radio_type = UNSET,
445 .tuner_addr = ADDR_UNSET,
446 .radio_addr = ADDR_UNSET,
e2392d34 447 .input = { {
1da177e4
LT
448 .type = CX88_VMUX_COMPOSITE1,
449 .vmux = 1,
450 .gpio0 = 0x000027df,
e2392d34 451 }, {
1da177e4
LT
452 .type = CX88_VMUX_SVIDEO,
453 .vmux = 2,
454 .gpio0 = 0x000027df,
e2392d34 455 } },
48d5e803 456 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
457 },
458 [CX88_BOARD_KWORLD_LTV883] = {
459 .name = "KWorld LTV883RF",
b45009b0
MCC
460 .tuner_type = TUNER_TNF_8831BGFF,
461 .radio_type = UNSET,
462 .tuner_addr = ADDR_UNSET,
463 .radio_addr = ADDR_UNSET,
e2392d34 464 .input = { {
4ac97914
MCC
465 .type = CX88_VMUX_TELEVISION,
466 .vmux = 0,
467 .gpio0 = 0x07f8,
e2392d34 468 }, {
1da177e4
LT
469 .type = CX88_VMUX_DEBUG,
470 .vmux = 0,
471 .gpio0 = 0x07f9, // mono from tuner chip
e2392d34 472 }, {
4ac97914
MCC
473 .type = CX88_VMUX_COMPOSITE1,
474 .vmux = 1,
475 .gpio0 = 0x000007fa,
e2392d34 476 }, {
4ac97914
MCC
477 .type = CX88_VMUX_SVIDEO,
478 .vmux = 2,
479 .gpio0 = 0x000007fa,
e2392d34 480 } },
4ac97914
MCC
481 .radio = {
482 .type = CX88_RADIO,
483 .gpio0 = 0x000007f8,
484 },
1da177e4 485 },
a82decf6
MCC
486 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
487 .name = "DViCO FusionHDTV 3 Gold-Q",
1da177e4 488 .tuner_type = TUNER_MICROTUNE_4042FI5,
b45009b0
MCC
489 .radio_type = UNSET,
490 .tuner_addr = ADDR_UNSET,
491 .radio_addr = ADDR_UNSET,
1da177e4 492 /*
399426ca
MCC
493 * GPIO[0] resets DT3302 DTV receiver
494 * 0 - reset asserted
495 * 1 - normal operation
496 * GPIO[1] mutes analog audio output connector
497 * 0 - enable selected source
498 * 1 - mute
499 * GPIO[2] selects source for analog audio output connector
500 * 0 - analog audio input connector on tab
501 * 1 - analog DAC output from CX23881 chip
502 * GPIO[3] selects RF input connector on tuner module
503 * 0 - RF connector labeled CABLE
504 * 1 - RF connector labeled ANT
505 * GPIO[4] selects high RF for QAM256 mode
506 * 0 - normal RF
507 * 1 - high RF
508 */
e2392d34 509 .input = { {
1da177e4
LT
510 .type = CX88_VMUX_TELEVISION,
511 .vmux = 0,
512 .gpio0 = 0x0f0d,
e2392d34 513 }, {
1da177e4
LT
514 .type = CX88_VMUX_CABLE,
515 .vmux = 0,
516 .gpio0 = 0x0f05,
e2392d34 517 }, {
1da177e4
LT
518 .type = CX88_VMUX_COMPOSITE1,
519 .vmux = 1,
520 .gpio0 = 0x0f00,
e2392d34 521 }, {
1da177e4
LT
522 .type = CX88_VMUX_SVIDEO,
523 .vmux = 2,
524 .gpio0 = 0x0f00,
e2392d34 525 } },
48d5e803 526 .mpeg = CX88_MPEG_DVB,
1da177e4 527 },
4ac97914 528 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
b45009b0 529 .name = "Hauppauge Nova-T DVB-T",
c39ba330 530 .tuner_type = UNSET,
b45009b0
MCC
531 .radio_type = UNSET,
532 .tuner_addr = ADDR_UNSET,
533 .radio_addr = ADDR_UNSET,
e2392d34 534 .input = { {
4ac97914
MCC
535 .type = CX88_VMUX_DVB,
536 .vmux = 0,
e2392d34 537 } },
48d5e803 538 .mpeg = CX88_MPEG_DVB,
1da177e4 539 },
4ac97914 540 [CX88_BOARD_CONEXANT_DVB_T1] = {
1da177e4 541 .name = "Conexant DVB-T reference design",
c39ba330 542 .tuner_type = UNSET,
b45009b0
MCC
543 .radio_type = UNSET,
544 .tuner_addr = ADDR_UNSET,
545 .radio_addr = ADDR_UNSET,
e2392d34 546 .input = { {
4ac97914
MCC
547 .type = CX88_VMUX_DVB,
548 .vmux = 0,
e2392d34 549 } },
48d5e803 550 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
551 },
552 [CX88_BOARD_PROVIDEO_PV259] = {
553 .name = "Provideo PV259",
554 .tuner_type = TUNER_PHILIPS_FQ1216ME,
b45009b0
MCC
555 .radio_type = UNSET,
556 .tuner_addr = ADDR_UNSET,
557 .radio_addr = ADDR_UNSET,
e2392d34 558 .input = { {
1da177e4
LT
559 .type = CX88_VMUX_TELEVISION,
560 .vmux = 0,
7b27d45b 561 .audioroute = 1,
e2392d34 562 } },
48d5e803 563 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
564 },
565 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
a82decf6 566 .name = "DViCO FusionHDTV DVB-T Plus",
c39ba330 567 .tuner_type = UNSET, /* No analog tuner */
b45009b0
MCC
568 .radio_type = UNSET,
569 .tuner_addr = ADDR_UNSET,
570 .radio_addr = ADDR_UNSET,
e2392d34 571 .input = { {
1da177e4
LT
572 .type = CX88_VMUX_COMPOSITE1,
573 .vmux = 1,
574 .gpio0 = 0x000027df,
e2392d34 575 }, {
1da177e4
LT
576 .type = CX88_VMUX_SVIDEO,
577 .vmux = 2,
578 .gpio0 = 0x000027df,
e2392d34 579 } },
48d5e803 580 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
581 },
582 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
4ac97914 583 .name = "digitalnow DNTV Live! DVB-T",
c39ba330 584 .tuner_type = UNSET,
b45009b0
MCC
585 .radio_type = UNSET,
586 .tuner_addr = ADDR_UNSET,
587 .radio_addr = ADDR_UNSET,
e2392d34 588 .input = { {
1da177e4
LT
589 .type = CX88_VMUX_COMPOSITE1,
590 .vmux = 1,
591 .gpio0 = 0x00000700,
592 .gpio2 = 0x00000101,
e2392d34 593 }, {
1da177e4
LT
594 .type = CX88_VMUX_SVIDEO,
595 .vmux = 2,
596 .gpio0 = 0x00000700,
597 .gpio2 = 0x00000101,
e2392d34 598 } },
48d5e803 599 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
600 },
601 [CX88_BOARD_PCHDTV_HD3000] = {
602 .name = "pcHDTV HD3000 HDTV",
9175b854 603 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
604 .radio_type = UNSET,
605 .tuner_addr = ADDR_UNSET,
606 .radio_addr = ADDR_UNSET,
e4f5c82a 607 .tda9887_conf = TDA9887_PRESENT,
19dc74b7
TP
608 /* GPIO[2] = audio source for analog audio out connector
609 * 0 = analog audio input connector
610 * 1 = CX88 audio DACs
611 *
612 * GPIO[7] = input to CX88's audio/chroma ADC
613 * 0 = FM 10.7 MHz IF
614 * 1 = Sound 4.5 MHz IF
615 *
616 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
617 *
618 * GPIO[16] = Remote control input
619 */
e2392d34 620 .input = { {
1da177e4
LT
621 .type = CX88_VMUX_TELEVISION,
622 .vmux = 0,
623 .gpio0 = 0x00008484,
e2392d34 624 }, {
1da177e4
LT
625 .type = CX88_VMUX_COMPOSITE1,
626 .vmux = 1,
627 .gpio0 = 0x00008400,
e2392d34 628 }, {
1da177e4
LT
629 .type = CX88_VMUX_SVIDEO,
630 .vmux = 2,
631 .gpio0 = 0x00008400,
e2392d34 632 } },
1da177e4
LT
633 .radio = {
634 .type = CX88_RADIO,
19dc74b7 635 .gpio0 = 0x00008404,
1da177e4 636 },
48d5e803 637 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
638 },
639 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
640 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
641 // GPIO values obtained from regspy, courtesy Sean Covel
b45009b0
MCC
642 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
643 .tuner_type = UNSET,
644 .radio_type = UNSET,
645 .tuner_addr = ADDR_UNSET,
646 .radio_addr = ADDR_UNSET,
e2392d34 647 .input = { {
1da177e4
LT
648 .type = CX88_VMUX_TELEVISION,
649 .vmux = 0,
0345c387 650 .gpio0 = 0xed1a,
1da177e4 651 .gpio2 = 0x00ff,
e2392d34 652 }, {
1da177e4
LT
653 .type = CX88_VMUX_DEBUG,
654 .vmux = 0,
0345c387 655 .gpio0 = 0xff01,
e2392d34 656 }, {
1da177e4
LT
657 .type = CX88_VMUX_COMPOSITE1,
658 .vmux = 1,
659 .gpio0 = 0xff02,
e2392d34 660 }, {
1da177e4
LT
661 .type = CX88_VMUX_SVIDEO,
662 .vmux = 2,
663 .gpio0 = 0xed92,
664 .gpio2 = 0x00ff,
e2392d34 665 } },
1da177e4
LT
666 .radio = {
667 .type = CX88_RADIO,
668 .gpio0 = 0xed96,
669 .gpio2 = 0x00ff,
670 },
48d5e803 671 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
672 },
673 [CX88_BOARD_DIGITALLOGIC_MEC] = {
1da177e4 674 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
b45009b0
MCC
675 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
676 .radio_type = UNSET,
677 .tuner_addr = ADDR_UNSET,
678 .radio_addr = ADDR_UNSET,
1da177e4 679 .tda9887_conf = TDA9887_PRESENT,
e2392d34 680 .input = { {
1da177e4
LT
681 .type = CX88_VMUX_TELEVISION,
682 .vmux = 0,
b45009b0 683 .gpio0 = 0x00009d80,
7b27d45b 684 .audioroute = 1,
e2392d34 685 }, {
1da177e4
LT
686 .type = CX88_VMUX_COMPOSITE1,
687 .vmux = 1,
b45009b0 688 .gpio0 = 0x00009d76,
7b27d45b 689 .audioroute = 1,
e2392d34 690 }, {
1da177e4
LT
691 .type = CX88_VMUX_SVIDEO,
692 .vmux = 2,
b45009b0 693 .gpio0 = 0x00009d76,
7b27d45b 694 .audioroute = 1,
e2392d34 695 } },
1da177e4
LT
696 .radio = {
697 .type = CX88_RADIO,
b45009b0 698 .gpio0 = 0x00009d00,
7b27d45b 699 .audioroute = 1,
1da177e4 700 },
48d5e803 701 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
702 },
703 [CX88_BOARD_IODATA_GVBCTV7E] = {
704 .name = "IODATA GV/BCTV7E",
705 .tuner_type = TUNER_PHILIPS_FQ1286,
b45009b0
MCC
706 .radio_type = UNSET,
707 .tuner_addr = ADDR_UNSET,
708 .radio_addr = ADDR_UNSET,
1da177e4 709 .tda9887_conf = TDA9887_PRESENT,
e2392d34 710 .input = { {
1da177e4
LT
711 .type = CX88_VMUX_TELEVISION,
712 .vmux = 1,
713 .gpio1 = 0x0000e03f,
e2392d34 714 }, {
1da177e4
LT
715 .type = CX88_VMUX_COMPOSITE1,
716 .vmux = 2,
717 .gpio1 = 0x0000e07f,
e2392d34 718 }, {
1da177e4
LT
719 .type = CX88_VMUX_SVIDEO,
720 .vmux = 3,
721 .gpio1 = 0x0000e07f,
e2392d34 722 } }
1da177e4 723 },
239df2e2
MC
724 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
725 .name = "PixelView PlayTV Ultra Pro (Stereo)",
b45009b0
MCC
726 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
727 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
c5287ba1
MCC
728 .radio_type = UNSET,
729 .tuner_addr = ADDR_UNSET,
730 .radio_addr = ADDR_UNSET,
399426ca
MCC
731 /*
732 * Some variants use a tda9874 and so need the
733 * tvaudio module.
734 */
facd2366 735 .audio_chip = CX88_AUDIO_TVAUDIO,
e2392d34 736 .input = { {
239df2e2
MC
737 .type = CX88_VMUX_TELEVISION,
738 .vmux = 0,
b45009b0 739 .gpio0 = 0xbf61, /* internal decoder */
e2392d34 740 }, {
239df2e2
MC
741 .type = CX88_VMUX_COMPOSITE1,
742 .vmux = 1,
b45009b0 743 .gpio0 = 0xbf63,
e2392d34 744 }, {
239df2e2
MC
745 .type = CX88_VMUX_SVIDEO,
746 .vmux = 2,
b45009b0 747 .gpio0 = 0xbf63,
e2392d34 748 } },
239df2e2 749 .radio = {
b45009b0
MCC
750 .type = CX88_RADIO,
751 .gpio0 = 0xbf60,
752 },
239df2e2 753 },
4ac97914 754 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
a82decf6 755 .name = "DViCO FusionHDTV 3 Gold-T",
83ac8722 756 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
757 .radio_type = UNSET,
758 .tuner_addr = ADDR_UNSET,
759 .radio_addr = ADDR_UNSET,
e4f5c82a 760 .tda9887_conf = TDA9887_PRESENT,
e2392d34 761 .input = { {
4ac97914
MCC
762 .type = CX88_VMUX_TELEVISION,
763 .vmux = 0,
764 .gpio0 = 0x97ed,
e2392d34 765 }, {
4ac97914
MCC
766 .type = CX88_VMUX_COMPOSITE1,
767 .vmux = 1,
768 .gpio0 = 0x97e9,
e2392d34 769 }, {
4ac97914
MCC
770 .type = CX88_VMUX_SVIDEO,
771 .vmux = 2,
772 .gpio0 = 0x97e9,
e2392d34 773 } },
48d5e803 774 .mpeg = CX88_MPEG_DVB,
4ac97914
MCC
775 },
776 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
777 .name = "ADS Tech Instant TV DVB-T PCI",
c39ba330 778 .tuner_type = UNSET,
a82decf6
MCC
779 .radio_type = UNSET,
780 .tuner_addr = ADDR_UNSET,
781 .radio_addr = ADDR_UNSET,
e2392d34 782 .input = { {
4ac97914
MCC
783 .type = CX88_VMUX_COMPOSITE1,
784 .vmux = 1,
a82decf6
MCC
785 .gpio0 = 0x0700,
786 .gpio2 = 0x0101,
e2392d34 787 }, {
4ac97914
MCC
788 .type = CX88_VMUX_SVIDEO,
789 .vmux = 2,
a82decf6
MCC
790 .gpio0 = 0x0700,
791 .gpio2 = 0x0101,
e2392d34 792 } },
48d5e803 793 .mpeg = CX88_MPEG_DVB,
a82decf6 794 },
e057ee11
MK
795 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
796 .name = "TerraTec Cinergy 1400 DVB-T",
c39ba330 797 .tuner_type = UNSET,
e2392d34 798 .input = { {
e057ee11
MK
799 .type = CX88_VMUX_DVB,
800 .vmux = 0,
e2392d34 801 }, {
05eda249
HB
802 .type = CX88_VMUX_COMPOSITE1,
803 .vmux = 2,
e2392d34 804 }, {
05eda249
HB
805 .type = CX88_VMUX_SVIDEO,
806 .vmux = 2,
e2392d34 807 } },
48d5e803 808 .mpeg = CX88_MPEG_DVB,
e057ee11 809 },
9fef07ca
MK
810 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
811 .name = "DViCO FusionHDTV 5 Gold",
9c26c8b1 812 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
9fef07ca
MK
813 .radio_type = UNSET,
814 .tuner_addr = ADDR_UNSET,
815 .radio_addr = ADDR_UNSET,
e52e98a7 816 .tda9887_conf = TDA9887_PRESENT,
e2392d34 817 .input = { {
4ac97914
MCC
818 .type = CX88_VMUX_TELEVISION,
819 .vmux = 0,
820 .gpio0 = 0x87fd,
e2392d34 821 }, {
4ac97914
MCC
822 .type = CX88_VMUX_COMPOSITE1,
823 .vmux = 1,
824 .gpio0 = 0x87f9,
e2392d34 825 }, {
4ac97914
MCC
826 .type = CX88_VMUX_SVIDEO,
827 .vmux = 2,
828 .gpio0 = 0x87f9,
e2392d34 829 } },
48d5e803 830 .mpeg = CX88_MPEG_DVB,
9fef07ca 831 },
d45170ed
NS
832 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
833 .name = "AverMedia UltraTV Media Center PCI 550",
834 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
835 .radio_type = UNSET,
836 .tuner_addr = ADDR_UNSET,
837 .radio_addr = ADDR_UNSET,
838 .tda9887_conf = TDA9887_PRESENT,
e2392d34 839 .input = { {
d45170ed
NS
840 .type = CX88_VMUX_COMPOSITE1,
841 .vmux = 0,
842 .gpio0 = 0x0000cd73,
7b27d45b 843 .audioroute = 1,
e2392d34 844 }, {
d45170ed
NS
845 .type = CX88_VMUX_SVIDEO,
846 .vmux = 1,
847 .gpio0 = 0x0000cd73,
7b27d45b 848 .audioroute = 1,
e2392d34 849 }, {
d45170ed
NS
850 .type = CX88_VMUX_TELEVISION,
851 .vmux = 3,
852 .gpio0 = 0x0000cdb3,
7b27d45b 853 .audioroute = 1,
e2392d34 854 } },
d45170ed
NS
855 .radio = {
856 .type = CX88_RADIO,
857 .vmux = 2,
858 .gpio0 = 0x0000cdf3,
7b27d45b 859 .audioroute = 1,
d45170ed 860 },
5b26c82f 861 .mpeg = CX88_MPEG_BLACKBIRD,
d45170ed 862 },
0bcc37c3
AW
863 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
864 /* Alexander Wold <awold@bigfoot.com> */
4ac97914
MCC
865 .name = "Kworld V-Stream Xpert DVD",
866 .tuner_type = UNSET,
e2392d34 867 .input = { {
4ac97914
MCC
868 .type = CX88_VMUX_COMPOSITE1,
869 .vmux = 1,
870 .gpio0 = 0x03000000,
0bcc37c3
AW
871 .gpio1 = 0x01000000,
872 .gpio2 = 0x02000000,
873 .gpio3 = 0x00100000,
e2392d34 874 }, {
4ac97914
MCC
875 .type = CX88_VMUX_SVIDEO,
876 .vmux = 2,
877 .gpio0 = 0x03000000,
878 .gpio1 = 0x01000000,
879 .gpio2 = 0x02000000,
880 .gpio3 = 0x00100000,
e2392d34 881 } },
0bcc37c3 882 },
e976f937
KL
883 [CX88_BOARD_ATI_HDTVWONDER] = {
884 .name = "ATI HDTV Wonder",
885 .tuner_type = TUNER_PHILIPS_TUV1236D,
886 .radio_type = UNSET,
887 .tuner_addr = ADDR_UNSET,
888 .radio_addr = ADDR_UNSET,
e2392d34 889 .input = { {
e976f937
KL
890 .type = CX88_VMUX_TELEVISION,
891 .vmux = 0,
892 .gpio0 = 0x00000ff7,
893 .gpio1 = 0x000000ff,
894 .gpio2 = 0x00000001,
895 .gpio3 = 0x00000000,
e2392d34 896 }, {
e976f937
KL
897 .type = CX88_VMUX_COMPOSITE1,
898 .vmux = 1,
899 .gpio0 = 0x00000ffe,
900 .gpio1 = 0x000000ff,
901 .gpio2 = 0x00000001,
902 .gpio3 = 0x00000000,
e2392d34 903 }, {
e976f937
KL
904 .type = CX88_VMUX_SVIDEO,
905 .vmux = 2,
906 .gpio0 = 0x00000ffe,
907 .gpio1 = 0x000000ff,
908 .gpio2 = 0x00000001,
909 .gpio3 = 0x00000000,
e2392d34 910 } },
48d5e803 911 .mpeg = CX88_MPEG_DVB,
e976f937 912 },
2b5200a7
DS
913 [CX88_BOARD_WINFAST_DTV1000] = {
914 .name = "WinFast DTV1000-T",
c39ba330 915 .tuner_type = UNSET,
2b5200a7
DS
916 .radio_type = UNSET,
917 .tuner_addr = ADDR_UNSET,
918 .radio_addr = ADDR_UNSET,
e2392d34 919 .input = { {
2b5200a7
DS
920 .type = CX88_VMUX_DVB,
921 .vmux = 0,
e2392d34 922 }, {
e8f4e752
JD
923 .type = CX88_VMUX_COMPOSITE1,
924 .vmux = 1,
e2392d34 925 }, {
e8f4e752
JD
926 .type = CX88_VMUX_SVIDEO,
927 .vmux = 2,
e2392d34 928 } },
48d5e803 929 .mpeg = CX88_MPEG_DVB,
2b5200a7 930 },
7418f346
LB
931 [CX88_BOARD_AVERTV_303] = {
932 .name = "AVerTV 303 (M126)",
933 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
934 .radio_type = UNSET,
935 .tuner_addr = ADDR_UNSET,
936 .radio_addr = ADDR_UNSET,
937 .tda9887_conf = TDA9887_PRESENT,
e2392d34 938 .input = { {
7418f346
LB
939 .type = CX88_VMUX_TELEVISION,
940 .vmux = 0,
941 .gpio0 = 0x00ff,
942 .gpio1 = 0xe09f,
943 .gpio2 = 0x0010,
944 .gpio3 = 0x0000,
e2392d34 945 }, {
7418f346
LB
946 .type = CX88_VMUX_COMPOSITE1,
947 .vmux = 1,
948 .gpio0 = 0x00ff,
949 .gpio1 = 0xe05f,
950 .gpio2 = 0x0010,
951 .gpio3 = 0x0000,
e2392d34 952 }, {
7418f346
LB
953 .type = CX88_VMUX_SVIDEO,
954 .vmux = 2,
955 .gpio0 = 0x00ff,
956 .gpio1 = 0xe05f,
957 .gpio2 = 0x0010,
958 .gpio3 = 0x0000,
e2392d34 959 } },
7418f346 960 },
0fa14aa6
ST
961 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
962 .name = "Hauppauge Nova-S-Plus DVB-S",
c39ba330 963 .tuner_type = UNSET,
0fa14aa6
ST
964 .radio_type = UNSET,
965 .tuner_addr = ADDR_UNSET,
966 .radio_addr = ADDR_UNSET,
facd2366 967 .audio_chip = CX88_AUDIO_WM8775,
6951803c 968 .i2sinputcntl = 2,
e2392d34 969 .input = { {
0fa14aa6
ST
970 .type = CX88_VMUX_DVB,
971 .vmux = 0,
fcb97573 972 /* 2: Line-In */
973 .audioroute = 2,
e2392d34 974 }, {
0fa14aa6
ST
975 .type = CX88_VMUX_COMPOSITE1,
976 .vmux = 1,
fcb97573 977 /* 2: Line-In */
978 .audioroute = 2,
e2392d34 979 }, {
0fa14aa6
ST
980 .type = CX88_VMUX_SVIDEO,
981 .vmux = 2,
fcb97573 982 /* 2: Line-In */
983 .audioroute = 2,
e2392d34 984 } },
48d5e803 985 .mpeg = CX88_MPEG_DVB,
0fa14aa6
ST
986 },
987 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
988 .name = "Hauppauge Nova-SE2 DVB-S",
c39ba330 989 .tuner_type = UNSET,
0fa14aa6
ST
990 .radio_type = UNSET,
991 .tuner_addr = ADDR_UNSET,
992 .radio_addr = ADDR_UNSET,
e2392d34 993 .input = { {
0fa14aa6
ST
994 .type = CX88_VMUX_DVB,
995 .vmux = 0,
e2392d34 996 } },
48d5e803 997 .mpeg = CX88_MPEG_DVB,
0fa14aa6 998 },
0e0351e3
VC
999 [CX88_BOARD_KWORLD_DVBS_100] = {
1000 .name = "KWorld DVB-S 100",
c39ba330 1001 .tuner_type = UNSET,
0e0351e3
VC
1002 .radio_type = UNSET,
1003 .tuner_addr = ADDR_UNSET,
1004 .radio_addr = ADDR_UNSET,
facd2366 1005 .audio_chip = CX88_AUDIO_WM8775,
e2392d34 1006 .input = { {
0e0351e3
VC
1007 .type = CX88_VMUX_DVB,
1008 .vmux = 0,
46e67acd
MCC
1009 /* 2: Line-In */
1010 .audioroute = 2,
e2392d34 1011 }, {
0e0351e3
VC
1012 .type = CX88_VMUX_COMPOSITE1,
1013 .vmux = 1,
46e67acd
MCC
1014 /* 2: Line-In */
1015 .audioroute = 2,
e2392d34 1016 }, {
0e0351e3
VC
1017 .type = CX88_VMUX_SVIDEO,
1018 .vmux = 2,
46e67acd
MCC
1019 /* 2: Line-In */
1020 .audioroute = 2,
e2392d34 1021 } },
48d5e803 1022 .mpeg = CX88_MPEG_DVB,
0e0351e3 1023 },
611900c1
ST
1024 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1025 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1026 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1027 .radio_type = UNSET,
1028 .tuner_addr = ADDR_UNSET,
1029 .radio_addr = ADDR_UNSET,
1030 .tda9887_conf = TDA9887_PRESENT,
e2392d34 1031 .input = { {
611900c1
ST
1032 .type = CX88_VMUX_TELEVISION,
1033 .vmux = 0,
e2392d34 1034 }, {
611900c1
ST
1035 .type = CX88_VMUX_COMPOSITE1,
1036 .vmux = 1,
e2392d34 1037 }, {
611900c1
ST
1038 .type = CX88_VMUX_SVIDEO,
1039 .vmux = 2,
e2392d34 1040 } },
611900c1 1041 /* fixme: Add radio support */
48d5e803 1042 .mpeg = CX88_MPEG_DVB,
611900c1
ST
1043 },
1044 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1045 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1046 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1047 .radio_type = UNSET,
1048 .tuner_addr = ADDR_UNSET,
1049 .radio_addr = ADDR_UNSET,
1050 .tda9887_conf = TDA9887_PRESENT,
e2392d34 1051 .input = { {
611900c1
ST
1052 .type = CX88_VMUX_TELEVISION,
1053 .vmux = 0,
e2392d34 1054 }, {
611900c1
ST
1055 .type = CX88_VMUX_COMPOSITE1,
1056 .vmux = 1,
e2392d34 1057 } },
611900c1 1058 /* fixme: Add radio support */
48d5e803 1059 .mpeg = CX88_MPEG_DVB,
611900c1 1060 },
fc40b261
CP
1061 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1062 .name = "digitalnow DNTV Live! DVB-T Pro",
1063 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1064 .radio_type = UNSET,
1065 .tuner_addr = ADDR_UNSET,
1066 .radio_addr = ADDR_UNSET,
1067 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1068 TDA9887_PORT2_ACTIVE,
e2392d34 1069 .input = { {
fc40b261
CP
1070 .type = CX88_VMUX_TELEVISION,
1071 .vmux = 0,
1072 .gpio0 = 0xf80808,
e2392d34 1073 }, {
fc40b261
CP
1074 .type = CX88_VMUX_COMPOSITE1,
1075 .vmux = 1,
1076 .gpio0 = 0xf80808,
e2392d34 1077 }, {
fc40b261
CP
1078 .type = CX88_VMUX_SVIDEO,
1079 .vmux = 2,
1080 .gpio0 = 0xf80808,
e2392d34 1081 } },
fc40b261
CP
1082 .radio = {
1083 .type = CX88_RADIO,
1084 .gpio0 = 0xf80808,
1085 },
48d5e803 1086 .mpeg = CX88_MPEG_DVB,
fc40b261 1087 },
f39624fd
MM
1088 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1089 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1090 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1091 /* Manenti Marco <marco_manenti@colman.it> */
1092 .name = "KWorld/VStream XPert DVB-T with cx22702",
c39ba330 1093 .tuner_type = UNSET,
f39624fd
MM
1094 .radio_type = UNSET,
1095 .tuner_addr = ADDR_UNSET,
1096 .radio_addr = ADDR_UNSET,
e2392d34 1097 .input = { {
f39624fd
MM
1098 .type = CX88_VMUX_COMPOSITE1,
1099 .vmux = 1,
1100 .gpio0 = 0x0700,
1101 .gpio2 = 0x0101,
e2392d34 1102 }, {
f39624fd
MM
1103 .type = CX88_VMUX_SVIDEO,
1104 .vmux = 2,
1105 .gpio0 = 0x0700,
1106 .gpio2 = 0x0101,
e2392d34 1107 } },
48d5e803 1108 .mpeg = CX88_MPEG_DVB,
f39624fd 1109 },
43eabb4e
CP
1110 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1111 .name = "DViCO FusionHDTV DVB-T Dual Digital",
c39ba330 1112 .tuner_type = UNSET, /* No analog tuner */
43eabb4e
CP
1113 .radio_type = UNSET,
1114 .tuner_addr = ADDR_UNSET,
1115 .radio_addr = ADDR_UNSET,
e2392d34 1116 .input = { {
43eabb4e
CP
1117 .type = CX88_VMUX_COMPOSITE1,
1118 .vmux = 1,
d536e9c4 1119 .gpio0 = 0x000067df,
e2392d34 1120 }, {
43eabb4e
CP
1121 .type = CX88_VMUX_SVIDEO,
1122 .vmux = 2,
d536e9c4 1123 .gpio0 = 0x000067df,
e2392d34 1124 } },
48d5e803 1125 .mpeg = CX88_MPEG_DVB,
43eabb4e 1126 },
44256de1 1127 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
44256de1
MK
1128 .name = "KWorld HardwareMpegTV XPert",
1129 .tuner_type = TUNER_PHILIPS_TDA8290,
1130 .radio_type = UNSET,
1131 .tuner_addr = ADDR_UNSET,
1132 .radio_addr = ADDR_UNSET,
e2392d34 1133 .input = { {
44256de1
MK
1134 .type = CX88_VMUX_TELEVISION,
1135 .vmux = 0,
e2798212 1136 .gpio0 = 0x3de2,
24da4e4b 1137 .gpio2 = 0x00ff,
e2392d34 1138 }, {
bc53f783
MK
1139 .type = CX88_VMUX_COMPOSITE1,
1140 .vmux = 1,
1141 .gpio0 = 0x3de6,
7b27d45b 1142 .audioroute = 1,
e2392d34 1143 }, {
bc53f783
MK
1144 .type = CX88_VMUX_SVIDEO,
1145 .vmux = 2,
1146 .gpio0 = 0x3de6,
7b27d45b 1147 .audioroute = 1,
e2392d34 1148 } },
e2798212
MK
1149 .radio = {
1150 .type = CX88_RADIO,
1151 .gpio0 = 0x3de6,
24da4e4b 1152 .gpio2 = 0x00ff,
e2798212 1153 },
48d5e803 1154 .mpeg = CX88_MPEG_BLACKBIRD,
44256de1 1155 },
780dfef3
CP
1156 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1157 .name = "DViCO FusionHDTV DVB-T Hybrid",
91ae3299 1158 .tuner_type = TUNER_THOMSON_FE6600,
780dfef3
CP
1159 .radio_type = UNSET,
1160 .tuner_addr = ADDR_UNSET,
1161 .radio_addr = ADDR_UNSET,
e2392d34 1162 .input = { {
780dfef3
CP
1163 .type = CX88_VMUX_TELEVISION,
1164 .vmux = 0,
1165 .gpio0 = 0x0000a75f,
e2392d34 1166 }, {
780dfef3
CP
1167 .type = CX88_VMUX_COMPOSITE1,
1168 .vmux = 1,
1169 .gpio0 = 0x0000a75b,
e2392d34 1170 }, {
780dfef3
CP
1171 .type = CX88_VMUX_SVIDEO,
1172 .vmux = 2,
1173 .gpio0 = 0x0000a75b,
e2392d34 1174 } },
48d5e803 1175 .mpeg = CX88_MPEG_DVB,
780dfef3 1176 },
e142e7c4
MK
1177 [CX88_BOARD_PCHDTV_HD5500] = {
1178 .name = "pcHDTV HD5500 HDTV",
9c26c8b1 1179 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
e142e7c4
MK
1180 .radio_type = UNSET,
1181 .tuner_addr = ADDR_UNSET,
1182 .radio_addr = ADDR_UNSET,
1183 .tda9887_conf = TDA9887_PRESENT,
e2392d34 1184 .input = { {
e142e7c4
MK
1185 .type = CX88_VMUX_TELEVISION,
1186 .vmux = 0,
1187 .gpio0 = 0x87fd,
e2392d34 1188 }, {
e142e7c4
MK
1189 .type = CX88_VMUX_COMPOSITE1,
1190 .vmux = 1,
1191 .gpio0 = 0x87f9,
e2392d34 1192 }, {
e142e7c4
MK
1193 .type = CX88_VMUX_SVIDEO,
1194 .vmux = 2,
1195 .gpio0 = 0x87f9,
e2392d34 1196 } },
48d5e803 1197 .mpeg = CX88_MPEG_DVB,
e142e7c4 1198 },
b3038304 1199 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
399426ca
MCC
1200 /*
1201 * FIXME: tested TV input only, disabled composite,
1202 * svideo and radio until they can be tested also.
1203 */
b3038304
VZ
1204 .name = "Kworld MCE 200 Deluxe",
1205 .tuner_type = TUNER_TENA_9533_DI,
1206 .radio_type = UNSET,
1207 .tda9887_conf = TDA9887_PRESENT,
1208 .tuner_addr = ADDR_UNSET,
1209 .radio_addr = ADDR_UNSET,
e2392d34 1210 .input = { {
b3038304
VZ
1211 .type = CX88_VMUX_TELEVISION,
1212 .vmux = 0,
1213 .gpio0 = 0x0000BDE6
e2392d34 1214 } },
48d5e803 1215 .mpeg = CX88_MPEG_BLACKBIRD,
b3038304 1216 },
a3124622
AM
1217 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1218 /* FIXME: SVideo, Composite and FM inputs are untested */
1219 .name = "PixelView PlayTV P7000",
1220 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1221 .radio_type = UNSET,
1222 .tuner_addr = ADDR_UNSET,
1223 .radio_addr = ADDR_UNSET,
1224 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1225 TDA9887_PORT2_ACTIVE,
e2392d34 1226 .input = { {
a3124622
AM
1227 .type = CX88_VMUX_TELEVISION,
1228 .vmux = 0,
1229 .gpio0 = 0x5da6,
e2392d34 1230 } },
48d5e803 1231 .mpeg = CX88_MPEG_BLACKBIRD,
a3124622 1232 },
be4f4519
RC
1233 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1234 .name = "NPG Tech Real TV FM Top 10",
1235 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
680543c5
RC
1236 .radio_type = UNSET,
1237 .tuner_addr = ADDR_UNSET,
1238 .radio_addr = ADDR_UNSET,
e2392d34 1239 .input = { {
680543c5
RC
1240 .type = CX88_VMUX_TELEVISION,
1241 .vmux = 0,
1242 .gpio0 = 0x0788,
e2392d34 1243 }, {
680543c5
RC
1244 .type = CX88_VMUX_COMPOSITE1,
1245 .vmux = 1,
1246 .gpio0 = 0x078b,
e2392d34 1247 }, {
680543c5
RC
1248 .type = CX88_VMUX_SVIDEO,
1249 .vmux = 2,
be4f4519 1250 .gpio0 = 0x078b,
e2392d34 1251 } },
680543c5
RC
1252 .radio = {
1253 .type = CX88_RADIO,
1254 .gpio0 = 0x074a,
1255 },
1256 },
4bd6e9d9 1257 [CX88_BOARD_WINFAST_DTV2000H] = {
4bd6e9d9
MV
1258 .name = "WinFast DTV2000 H",
1259 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1260 .radio_type = UNSET,
1261 .tuner_addr = ADDR_UNSET,
1262 .radio_addr = ADDR_UNSET,
1263 .tda9887_conf = TDA9887_PRESENT,
e2392d34 1264 .input = { {
4bd6e9d9
MV
1265 .type = CX88_VMUX_TELEVISION,
1266 .vmux = 0,
1267 .gpio0 = 0x00017304,
1268 .gpio1 = 0x00008203,
1269 .gpio2 = 0x00017304,
1270 .gpio3 = 0x02000000,
5cff91a0
VP
1271 }, {
1272 .type = CX88_VMUX_COMPOSITE1,
1273 .vmux = 1,
1274 .gpio0 = 0x0001d701,
1275 .gpio1 = 0x0000b207,
1276 .gpio2 = 0x0001d701,
1277 .gpio3 = 0x02000000,
1278 }, {
1279 .type = CX88_VMUX_COMPOSITE2,
1280 .vmux = 2,
1281 .gpio0 = 0x0001d503,
1282 .gpio1 = 0x0000b207,
1283 .gpio2 = 0x0001d503,
1284 .gpio3 = 0x02000000,
1285 }, {
1286 .type = CX88_VMUX_SVIDEO,
1287 .vmux = 3,
1288 .gpio0 = 0x0001d701,
1289 .gpio1 = 0x0000b207,
1290 .gpio2 = 0x0001d701,
1291 .gpio3 = 0x02000000,
e2392d34 1292 } },
5cff91a0
VP
1293 .radio = {
1294 .type = CX88_RADIO,
1295 .gpio0 = 0x00015702,
1296 .gpio1 = 0x0000f207,
1297 .gpio2 = 0x00015702,
1298 .gpio3 = 0x02000000,
1299 },
48d5e803 1300 .mpeg = CX88_MPEG_DVB,
4bd6e9d9 1301 },
4d14c833
VL
1302 [CX88_BOARD_WINFAST_DTV2000H_J] = {
1303 .name = "WinFast DTV2000 H rev. J",
27b93d8a 1304 .tuner_type = TUNER_PHILIPS_FMD1216MEX_MK3,
4d14c833
VL
1305 .radio_type = UNSET,
1306 .tuner_addr = ADDR_UNSET,
1307 .radio_addr = ADDR_UNSET,
1308 .tda9887_conf = TDA9887_PRESENT,
e2392d34 1309 .input = { {
4d14c833
VL
1310 .type = CX88_VMUX_TELEVISION,
1311 .vmux = 0,
1312 .gpio0 = 0x00017300,
1313 .gpio1 = 0x00008207,
1314 .gpio2 = 0x00000000,
1315 .gpio3 = 0x02000000,
e2392d34 1316 }, {
4d14c833
VL
1317 .type = CX88_VMUX_TELEVISION,
1318 .vmux = 0,
1319 .gpio0 = 0x00018300,
1320 .gpio1 = 0x0000f207,
1321 .gpio2 = 0x00017304,
1322 .gpio3 = 0x02000000,
e2392d34 1323 }, {
4d14c833
VL
1324 .type = CX88_VMUX_COMPOSITE1,
1325 .vmux = 1,
1326 .gpio0 = 0x00018301,
1327 .gpio1 = 0x0000f207,
1328 .gpio2 = 0x00017304,
1329 .gpio3 = 0x02000000,
e2392d34 1330 }, {
4d14c833
VL
1331 .type = CX88_VMUX_SVIDEO,
1332 .vmux = 2,
1333 .gpio0 = 0x00018301,
1334 .gpio1 = 0x0000f207,
1335 .gpio2 = 0x00017304,
1336 .gpio3 = 0x02000000,
e2392d34 1337 } },
4d14c833
VL
1338 .radio = {
1339 .type = CX88_RADIO,
1340 .gpio0 = 0x00015702,
1341 .gpio1 = 0x0000f207,
1342 .gpio2 = 0x00015702,
1343 .gpio3 = 0x02000000,
1344 },
1345 .mpeg = CX88_MPEG_DVB,
1346 },
c02a34f4
SA
1347 [CX88_BOARD_GENIATECH_DVBS] = {
1348 .name = "Geniatech DVB-S",
c39ba330 1349 .tuner_type = UNSET,
c02a34f4
SA
1350 .radio_type = UNSET,
1351 .tuner_addr = ADDR_UNSET,
1352 .radio_addr = ADDR_UNSET,
e2392d34 1353 .input = { {
c02a34f4
SA
1354 .type = CX88_VMUX_DVB,
1355 .vmux = 0,
e2392d34 1356 }, {
c02a34f4
SA
1357 .type = CX88_VMUX_COMPOSITE1,
1358 .vmux = 1,
e2392d34 1359 } },
48d5e803 1360 .mpeg = CX88_MPEG_DVB,
c02a34f4 1361 },
ad10c930 1362 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
ad10c930
ET
1363 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1364 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1365 .radio_type = UNSET,
1366 .tuner_addr = ADDR_UNSET,
1367 .radio_addr = ADDR_UNSET,
1368 .tda9887_conf = TDA9887_PRESENT,
facd2366 1369 .audio_chip = CX88_AUDIO_WM8775,
e2392d34 1370 .input = { {
ad10c930
ET
1371 .type = CX88_VMUX_TELEVISION,
1372 .vmux = 0,
1373 .gpio0 = 0x84bf,
649e13a9 1374 /* 1: TV Audio / FM Mono */
923ac7f7 1375 .audioroute = 1,
e2392d34 1376 }, {
ad10c930
ET
1377 .type = CX88_VMUX_COMPOSITE1,
1378 .vmux = 1,
1379 .gpio0 = 0x84bf,
649e13a9 1380 /* 2: Line-In */
923ac7f7 1381 .audioroute = 2,
e2392d34 1382 }, {
ad10c930
ET
1383 .type = CX88_VMUX_SVIDEO,
1384 .vmux = 2,
1385 .gpio0 = 0x84bf,
649e13a9 1386 /* 2: Line-In */
923ac7f7 1387 .audioroute = 2,
e2392d34 1388 } },
63248f26
DB
1389 .radio = {
1390 .type = CX88_RADIO,
1391 .gpio0 = 0x84bf,
649e13a9
DB
1392 /* 4: FM Stereo (untested) */
1393 .audioroute = 8,
63248f26 1394 },
76dc82ab 1395 .mpeg = CX88_MPEG_DVB,
363c35fc 1396 .num_frontends = 2,
ad10c930 1397 },
d1009bd7
PN
1398 [CX88_BOARD_NORWOOD_MICRO] = {
1399 .name = "Norwood Micro TV Tuner",
1400 .tuner_type = TUNER_TNF_5335MF,
1401 .radio_type = UNSET,
1402 .tuner_addr = ADDR_UNSET,
1403 .radio_addr = ADDR_UNSET,
e2392d34 1404 .input = { {
d1009bd7
PN
1405 .type = CX88_VMUX_TELEVISION,
1406 .vmux = 0,
1407 .gpio0 = 0x0709,
e2392d34 1408 }, {
d1009bd7
PN
1409 .type = CX88_VMUX_COMPOSITE1,
1410 .vmux = 1,
1411 .gpio0 = 0x070b,
e2392d34 1412 }, {
d1009bd7
PN
1413 .type = CX88_VMUX_SVIDEO,
1414 .vmux = 2,
1415 .gpio0 = 0x070b,
e2392d34 1416 } },
d1009bd7 1417 },
5b26c82f
MK
1418 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1419 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1420 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1421 .radio_type = UNSET,
1422 .tuner_addr = ADDR_UNSET,
1423 .radio_addr = ADDR_UNSET,
e2392d34 1424 .input = { {
5b26c82f
MK
1425 .type = CX88_VMUX_TELEVISION,
1426 .vmux = 0,
1427 .gpio0 = 0x003fffff,
1428 .gpio1 = 0x00e00000,
1429 .gpio2 = 0x003fffff,
1430 .gpio3 = 0x02000000,
e2392d34 1431 }, {
5b26c82f
MK
1432 .type = CX88_VMUX_COMPOSITE1,
1433 .vmux = 1,
1434 .gpio0 = 0x003fffff,
1435 .gpio1 = 0x00e00000,
1436 .gpio2 = 0x003fffff,
1437 .gpio3 = 0x02000000,
e2392d34 1438 }, {
5b26c82f
MK
1439 .type = CX88_VMUX_SVIDEO,
1440 .vmux = 2,
1441 .gpio0 = 0x003fffff,
1442 .gpio1 = 0x00e00000,
1443 .gpio2 = 0x003fffff,
1444 .gpio3 = 0x02000000,
e2392d34 1445 } },
5b26c82f 1446 },
aa481a65
ST
1447 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1448 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1449 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1450 .radio_type = UNSET,
1451 .tuner_addr = ADDR_UNSET,
1452 .radio_addr = ADDR_UNSET,
1453 .tda9887_conf = TDA9887_PRESENT,
facd2366 1454 .audio_chip = CX88_AUDIO_WM8775,
2491fbb7
ST
1455 /*
1456 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1457 */
e2392d34 1458 .input = { {
aa481a65
ST
1459 .type = CX88_VMUX_TELEVISION,
1460 .vmux = 0,
2491fbb7 1461 .gpio0 = 0xef88,
649e13a9 1462 /* 1: TV Audio / FM Mono */
7b27d45b 1463 .audioroute = 1,
e2392d34 1464 }, {
aa481a65
ST
1465 .type = CX88_VMUX_COMPOSITE1,
1466 .vmux = 1,
2491fbb7 1467 .gpio0 = 0xef88,
649e13a9 1468 /* 2: Line-In */
7b27d45b 1469 .audioroute = 2,
e2392d34 1470 }, {
aa481a65
ST
1471 .type = CX88_VMUX_SVIDEO,
1472 .vmux = 2,
2491fbb7 1473 .gpio0 = 0xef88,
649e13a9 1474 /* 2: Line-In */
7b27d45b 1475 .audioroute = 2,
e2392d34 1476 } },
6c5be74c 1477 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
6b92b3bd
ST
1478 .radio = {
1479 .type = CX88_RADIO,
2491fbb7 1480 .gpio0 = 0xef88,
649e13a9
DB
1481 /* 4: FM Stereo (untested) */
1482 .audioroute = 8,
6b92b3bd 1483 },
aa481a65 1484 },
4f3ca2f1
DH
1485 [CX88_BOARD_SAMSUNG_SMT_7020] = {
1486 .name = "Samsung SMT 7020 DVB-S",
c39ba330 1487 .tuner_type = UNSET,
4f3ca2f1
DH
1488 .radio_type = UNSET,
1489 .tuner_addr = ADDR_UNSET,
1490 .radio_addr = ADDR_UNSET,
1491 .input = { {
1492 .type = CX88_VMUX_DVB,
1493 .vmux = 0,
1494 } },
1495 .mpeg = CX88_MPEG_DVB,
1496 },
7cb47a14
DG
1497 [CX88_BOARD_ADSTECH_PTV_390] = {
1498 .name = "ADS Tech Instant Video PCI",
c39ba330 1499 .tuner_type = UNSET,
7cb47a14
DG
1500 .radio_type = UNSET,
1501 .tuner_addr = ADDR_UNSET,
1502 .radio_addr = ADDR_UNSET,
e2392d34 1503 .input = { {
7cb47a14
DG
1504 .type = CX88_VMUX_DEBUG,
1505 .vmux = 3,
1506 .gpio0 = 0x04ff,
e2392d34 1507 }, {
7cb47a14
DG
1508 .type = CX88_VMUX_COMPOSITE1,
1509 .vmux = 1,
1510 .gpio0 = 0x07fa,
e2392d34 1511 }, {
7cb47a14
DG
1512 .type = CX88_VMUX_SVIDEO,
1513 .vmux = 2,
1514 .gpio0 = 0x07fa,
e2392d34 1515 } },
7cb47a14 1516 },
60464da8
ST
1517 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1518 .name = "Pinnacle PCTV HD 800i",
1519 .tuner_type = TUNER_XC5000,
1520 .radio_type = UNSET,
1521 .tuner_addr = ADDR_UNSET,
1522 .radio_addr = ADDR_UNSET,
e2392d34 1523 .input = { {
60464da8
ST
1524 .type = CX88_VMUX_TELEVISION,
1525 .vmux = 0,
1526 .gpio0 = 0x04fb,
1527 .gpio1 = 0x10ff,
e2392d34 1528 }, {
60464da8
ST
1529 .type = CX88_VMUX_COMPOSITE1,
1530 .vmux = 1,
1531 .gpio0 = 0x04fb,
1532 .gpio1 = 0x10ef,
1533 .audioroute = 1,
e2392d34 1534 }, {
60464da8
ST
1535 .type = CX88_VMUX_SVIDEO,
1536 .vmux = 2,
1537 .gpio0 = 0x04fb,
1538 .gpio1 = 0x10ef,
1539 .audioroute = 1,
e2392d34 1540 } },
60464da8
ST
1541 .mpeg = CX88_MPEG_DVB,
1542 },
5c00fac0 1543 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
8efd2e28
MK
1544 .name = "DViCO FusionHDTV 5 PCI nano",
1545 /* xc3008 tuner, digital only for now */
c39ba330 1546 .tuner_type = UNSET,
5c00fac0
ST
1547 .radio_type = UNSET,
1548 .tuner_addr = ADDR_UNSET,
1549 .radio_addr = ADDR_UNSET,
e2392d34 1550 .input = { {
5c00fac0
ST
1551 .type = CX88_VMUX_TELEVISION,
1552 .vmux = 0,
1553 .gpio0 = 0x000027df, /* Unconfirmed */
1554 }, {
1555 .type = CX88_VMUX_COMPOSITE1,
1556 .vmux = 1,
1557 .gpio0 = 0x000027df, /* Unconfirmed */
1558 .audioroute = 1,
1559 }, {
1560 .type = CX88_VMUX_SVIDEO,
1561 .vmux = 2,
1562 .gpio0 = 0x000027df, /* Unconfirmed */
1563 .audioroute = 1,
1564 } },
1565 .mpeg = CX88_MPEG_DVB,
1566 },
9507901e 1567 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
000e27a6
MCC
1568 .name = "Pinnacle Hybrid PCTV",
1569 .tuner_type = TUNER_XC2028,
1570 .tuner_addr = 0x61,
b6854e3f
MS
1571 .radio_type = UNSET,
1572 .radio_addr = ADDR_UNSET,
000e27a6
MCC
1573 .input = { {
1574 .type = CX88_VMUX_TELEVISION,
1575 .vmux = 0,
3f6014fc
SV
1576 .gpio0 = 0x004ff,
1577 .gpio1 = 0x010ff,
1578 .gpio2 = 0x00001,
000e27a6
MCC
1579 }, {
1580 .type = CX88_VMUX_COMPOSITE1,
1581 .vmux = 1,
3f6014fc
SV
1582 .gpio0 = 0x004fb,
1583 .gpio1 = 0x010ef,
1584 .audioroute = 1,
000e27a6
MCC
1585 }, {
1586 .type = CX88_VMUX_SVIDEO,
1587 .vmux = 2,
3f6014fc
SV
1588 .gpio0 = 0x004fb,
1589 .gpio1 = 0x010ef,
1590 .audioroute = 1,
000e27a6
MCC
1591 } },
1592 .radio = {
1593 .type = CX88_RADIO,
1594 .gpio0 = 0x004ff,
1595 .gpio1 = 0x010ff,
1596 .gpio2 = 0x0ff,
1597 },
3f6014fc 1598 .mpeg = CX88_MPEG_DVB,
000e27a6 1599 },
14422f9d
MCC
1600 /* Terry Wu <terrywu2009@gmail.com> */
1601 /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
1602 /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
1603 /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
1604 /* Mute Audio : set GPIO 2 value to 1 */
000e27a6 1605 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
14422f9d 1606 .name = "Leadtek TV2000 XP Global",
000e27a6
MCC
1607 .tuner_type = TUNER_XC2028,
1608 .tuner_addr = 0x61,
b6854e3f
MS
1609 .radio_type = UNSET,
1610 .radio_addr = ADDR_UNSET,
000e27a6
MCC
1611 .input = { {
1612 .type = CX88_VMUX_TELEVISION,
1613 .vmux = 0,
14422f9d 1614 .gpio0 = 0x0400, /* pin 2 = 0 */
000e27a6 1615 .gpio1 = 0x0000,
14422f9d
MCC
1616 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1617 .gpio3 = 0x0000,
000e27a6
MCC
1618 }, {
1619 .type = CX88_VMUX_COMPOSITE1,
1620 .vmux = 1,
14422f9d 1621 .gpio0 = 0x0400, /* pin 2 = 0 */
000e27a6 1622 .gpio1 = 0x0000,
14422f9d
MCC
1623 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1624 .gpio3 = 0x0000,
000e27a6
MCC
1625 }, {
1626 .type = CX88_VMUX_SVIDEO,
1627 .vmux = 2,
14422f9d
MCC
1628 .gpio0 = 0x0400, /* pin 2 = 0 */
1629 .gpio1 = 0x0000,
1630 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1631 .gpio3 = 0x0000,
000e27a6
MCC
1632 } },
1633 .radio = {
1634 .type = CX88_RADIO,
14422f9d
MCC
1635 .gpio0 = 0x0400, /* pin 2 = 0 */
1636 .gpio1 = 0x0000,
1637 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1638 .gpio3 = 0x0000,
000e27a6
MCC
1639 },
1640 },
84463d5f
IV
1641 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36] = {
1642 .name = "Leadtek TV2000 XP Global (SC4100)",
1643 .tuner_type = TUNER_XC4000,
1644 .tuner_addr = 0x61,
1645 .radio_type = UNSET,
1646 .radio_addr = ADDR_UNSET,
1647 .input = { {
1648 .type = CX88_VMUX_TELEVISION,
1649 .vmux = 0,
1650 .gpio0 = 0x0400, /* pin 2 = 0 */
1651 .gpio1 = 0x0000,
1652 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1653 .gpio3 = 0x0000,
1654 }, {
1655 .type = CX88_VMUX_COMPOSITE1,
1656 .vmux = 1,
1657 .gpio0 = 0x0400, /* pin 2 = 0 */
1658 .gpio1 = 0x0000,
1659 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1660 .gpio3 = 0x0000,
1661 }, {
1662 .type = CX88_VMUX_SVIDEO,
1663 .vmux = 2,
1664 .gpio0 = 0x0400, /* pin 2 = 0 */
1665 .gpio1 = 0x0000,
1666 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1667 .gpio3 = 0x0000,
1668 } },
1669 .radio = {
1670 .type = CX88_RADIO,
1671 .gpio0 = 0x0400, /* pin 2 = 0 */
1672 .gpio1 = 0x0000,
1673 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1674 .gpio3 = 0x0000,
1675 },
1676 },
1677 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43] = {
1678 .name = "Leadtek TV2000 XP Global (XC4100)",
1679 .tuner_type = TUNER_XC4000,
1680 .tuner_addr = 0x61,
1681 .radio_type = UNSET,
1682 .radio_addr = ADDR_UNSET,
1683 .input = { {
1684 .type = CX88_VMUX_TELEVISION,
1685 .vmux = 0,
1686 .gpio0 = 0x0400, /* pin 2 = 0 */
1687 .gpio1 = 0x6040, /* pin 14 = 1, pin 13 = 0 */
1688 .gpio2 = 0x0000,
1689 .gpio3 = 0x0000,
1690 }, {
1691 .type = CX88_VMUX_COMPOSITE1,
1692 .vmux = 1,
1693 .gpio0 = 0x0400, /* pin 2 = 0 */
1694 .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
1695 .gpio2 = 0x0000,
1696 .gpio3 = 0x0000,
1697 }, {
1698 .type = CX88_VMUX_SVIDEO,
1699 .vmux = 2,
1700 .gpio0 = 0x0400, /* pin 2 = 0 */
1701 .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */
1702 .gpio2 = 0x0000,
1703 .gpio3 = 0x0000,
1704 } },
1705 .radio = {
1706 .type = CX88_RADIO,
1707 .gpio0 = 0x0400, /* pin 2 = 0 */
1708 .gpio1 = 0x6000, /* pin 14 = 1, pin 13 = 0 */
1709 .gpio2 = 0x0000,
1710 .gpio3 = 0x0000,
1711 },
1712 },
000e27a6 1713 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
399426ca
MCC
1714 /* Long names may confuse LIRC. */
1715 .name = "PowerColor RA330",
000e27a6
MCC
1716 .tuner_type = TUNER_XC2028,
1717 .tuner_addr = 0x61,
1718 .input = { {
399426ca
MCC
1719 /*
1720 * Due to the way the cx88 driver is written,
1721 * there is no way to deactivate audio pass-
1722 * through without this entry. Furthermore, if
1723 * the TV mux entry is first, you get audio
1724 * from the tuner on boot for a little while.
1725 */
a9606ce6 1726 .type = CX88_VMUX_DEBUG,
399426ca
MCC
1727 .vmux = 3,
1728 .gpio0 = 0x00ff,
1729 .gpio1 = 0xf39d,
1730 .gpio3 = 0x0000,
1731 }, {
000e27a6
MCC
1732 .type = CX88_VMUX_TELEVISION,
1733 .vmux = 0,
ab364983 1734 .gpio0 = 0x00ff,
000e27a6 1735 .gpio1 = 0xf35d,
ab364983 1736 .gpio3 = 0x0000,
000e27a6
MCC
1737 }, {
1738 .type = CX88_VMUX_COMPOSITE1,
1739 .vmux = 1,
ab364983
DF
1740 .gpio0 = 0x00ff,
1741 .gpio1 = 0xf37d,
1742 .gpio3 = 0x0000,
000e27a6
MCC
1743 }, {
1744 .type = CX88_VMUX_SVIDEO,
1745 .vmux = 2,
1746 .gpio0 = 0x000ff,
1747 .gpio1 = 0x0f37d,
000e27a6
MCC
1748 .gpio3 = 0x00000,
1749 } },
1750 .radio = {
1751 .type = CX88_RADIO,
1752 .gpio0 = 0x000ff,
1753 .gpio1 = 0x0f35d,
000e27a6
MCC
1754 .gpio3 = 0x00000,
1755 },
1756 },
1757 [CX88_BOARD_GENIATECH_X8000_MT] = {
9507901e 1758 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
000e27a6
MCC
1759 .name = "Geniatech X8000-MT DVBT",
1760 .tuner_type = TUNER_XC2028,
1761 .tuner_addr = 0x61,
1762 .input = { {
1763 .type = CX88_VMUX_TELEVISION,
1764 .vmux = 0,
1765 .gpio0 = 0x00000000,
1766 .gpio1 = 0x00e3e341,
1767 .gpio2 = 0x00000000,
1768 .gpio3 = 0x00000000,
1769 }, {
1770 .type = CX88_VMUX_COMPOSITE1,
1771 .vmux = 1,
1772 .gpio0 = 0x00000000,
1773 .gpio1 = 0x00e3e361,
1774 .gpio2 = 0x00000000,
1775 .gpio3 = 0x00000000,
1776 }, {
1777 .type = CX88_VMUX_SVIDEO,
1778 .vmux = 2,
1779 .gpio0 = 0x00000000,
1780 .gpio1 = 0x00e3e361,
1781 .gpio2 = 0x00000000,
1782 .gpio3 = 0x00000000,
1783 } },
1784 .radio = {
1785 .type = CX88_RADIO,
1786 .gpio0 = 0x00000000,
1787 .gpio1 = 0x00e3e341,
1788 .gpio2 = 0x00000000,
1789 .gpio3 = 0x00000000,
1790 },
1791 .mpeg = CX88_MPEG_DVB,
1792 },
1793 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1794 .name = "DViCO FusionHDTV DVB-T PRO",
19c309e3
TF
1795 .tuner_type = TUNER_XC2028,
1796 .tuner_addr = 0x61,
000e27a6 1797 .radio_type = UNSET,
000e27a6
MCC
1798 .radio_addr = ADDR_UNSET,
1799 .input = { {
1800 .type = CX88_VMUX_COMPOSITE1,
1801 .vmux = 1,
1802 .gpio0 = 0x000067df,
b3fb91d2 1803 }, {
000e27a6
MCC
1804 .type = CX88_VMUX_SVIDEO,
1805 .vmux = 2,
1806 .gpio0 = 0x000067df,
1807 } },
1808 .mpeg = CX88_MPEG_DVB,
1809 },
1117d6ba 1810 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
76464d41 1811 .name = "DViCO FusionHDTV 7 Gold",
1117d6ba
ST
1812 .tuner_type = TUNER_XC5000,
1813 .radio_type = UNSET,
1814 .tuner_addr = ADDR_UNSET,
1815 .radio_addr = ADDR_UNSET,
e2392d34 1816 .input = { {
1117d6ba
ST
1817 .type = CX88_VMUX_TELEVISION,
1818 .vmux = 0,
76464d41 1819 .gpio0 = 0x10df,
e2392d34 1820 }, {
1117d6ba
ST
1821 .type = CX88_VMUX_COMPOSITE1,
1822 .vmux = 1,
76464d41 1823 .gpio0 = 0x16d9,
e2392d34 1824 }, {
1117d6ba
ST
1825 .type = CX88_VMUX_SVIDEO,
1826 .vmux = 2,
76464d41 1827 .gpio0 = 0x16d9,
e2392d34 1828 } },
d893d5dc 1829 .mpeg = CX88_MPEG_DVB,
1117d6ba 1830 },
2422a9b3
MCC
1831 [CX88_BOARD_PROLINK_PV_8000GT] = {
1832 .name = "Prolink Pixelview MPEG 8000GT",
1833 .tuner_type = TUNER_XC2028,
1834 .tuner_addr = 0x61,
1835 .input = { {
1836 .type = CX88_VMUX_TELEVISION,
1837 .vmux = 0,
1838 .gpio0 = 0x0ff,
1839 .gpio2 = 0x0cfb,
1840 }, {
1841 .type = CX88_VMUX_COMPOSITE1,
1842 .vmux = 1,
1843 .gpio2 = 0x0cfb,
1844 }, {
1845 .type = CX88_VMUX_SVIDEO,
1846 .vmux = 2,
1847 .gpio2 = 0x0cfb,
1848 } },
1849 .radio = {
1850 .type = CX88_RADIO,
1851 .gpio2 = 0x0cfb,
1852 },
1853 },
a31d2bb7
MCC
1854 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1855 .name = "Prolink Pixelview Global Extreme",
1856 .tuner_type = TUNER_XC2028,
1857 .tuner_addr = 0x61,
1858 .input = { {
1859 .type = CX88_VMUX_TELEVISION,
1860 .vmux = 0,
1861 .gpio0 = 0x04fb,
1862 .gpio1 = 0x04080,
1863 .gpio2 = 0x0cf7,
1864 }, {
1865 .type = CX88_VMUX_COMPOSITE1,
1866 .vmux = 1,
1867 .gpio0 = 0x04fb,
1868 .gpio1 = 0x04080,
1869 .gpio2 = 0x0cfb,
1870 }, {
1871 .type = CX88_VMUX_SVIDEO,
1872 .vmux = 2,
1873 .gpio0 = 0x04fb,
1874 .gpio1 = 0x04080,
1875 .gpio2 = 0x0cfb,
1876 } },
1877 .radio = {
1878 .type = CX88_RADIO,
1879 .gpio0 = 0x04ff,
1880 .gpio1 = 0x04080,
1881 .gpio2 = 0x0cf7,
1882 },
1883 },
399426ca
MCC
1884 /*
1885 * Both radio, analog and ATSC work with this board.
1886 * However, for analog to work, s5h1409 gate should be open,
1887 * otherwise, tuner-xc3028 won't be detected.
1888 * A proper fix require using the newer i2c methods to add
1889 * tuner-xc3028 without doing an i2c probe.
99e09eac
MCC
1890 */
1891 [CX88_BOARD_KWORLD_ATSC_120] = {
1892 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1893 .tuner_type = TUNER_XC2028,
1894 .radio_type = UNSET,
1895 .tuner_addr = ADDR_UNSET,
1896 .radio_addr = ADDR_UNSET,
1897 .input = { {
1898 .type = CX88_VMUX_TELEVISION,
1899 .vmux = 0,
1900 .gpio0 = 0x000000ff,
1901 .gpio1 = 0x0000f35d,
1902 .gpio2 = 0x00000000,
1903 }, {
1904 .type = CX88_VMUX_COMPOSITE1,
1905 .vmux = 1,
1906 .gpio0 = 0x000000ff,
1907 .gpio1 = 0x0000f37e,
1908 .gpio2 = 0x00000000,
1909 }, {
1910 .type = CX88_VMUX_SVIDEO,
1911 .vmux = 2,
1912 .gpio0 = 0x000000ff,
1913 .gpio1 = 0x0000f37e,
1914 .gpio2 = 0x00000000,
1915 } },
1916 .radio = {
1917 .type = CX88_RADIO,
1918 .gpio0 = 0x000000ff,
1919 .gpio1 = 0x0000f35d,
1920 .gpio2 = 0x00000000,
1921 },
1922 .mpeg = CX88_MPEG_DVB,
1923 },
5bd1b663
ST
1924 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1925 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1926 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1927 .radio_type = UNSET,
1928 .tuner_addr = ADDR_UNSET,
1929 .radio_addr = ADDR_UNSET,
1930 .tda9887_conf = TDA9887_PRESENT,
facd2366 1931 .audio_chip = CX88_AUDIO_WM8775,
5bd1b663
ST
1932 /*
1933 * GPIO0 (WINTV2000)
1934 *
1935 * Analogue SAT DVB-T
1936 * Antenna 0xc4bf 0xc4bb
1937 * Composite 0xc4bf 0xc4bb
1938 * S-Video 0xc4bf 0xc4bb
1939 * Composite1 0xc4ff 0xc4fb
1940 * S-Video1 0xc4ff 0xc4fb
2491fbb7
ST
1941 *
1942 * BIT VALUE FUNCTION GP{x}_IO
1943 * 0 1 I:?
1944 * 1 1 I:?
63248f26 1945 * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
2491fbb7
ST
1946 * 3 1 I:?
1947 * 4 1 I:?
1948 * 5 1 I:?
1949 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1950 * 7 1 O:DVB-T DEMOD RESET LOW
1951 *
1952 * BIT VALUE FUNCTION GP{x}_OE
1953 * 8 0 I
1954 * 9 0 I
1955 * a 1 O
1956 * b 0 I
1957 * c 0 I
1958 * d 0 I
1959 * e 1 O
1960 * f 1 O
649e13a9
DB
1961 *
1962 * WM8775 ADC
1963 *
1964 * 1: TV Audio / FM Mono
1965 * 2: Line-In
1966 * 3: Line-In Expansion
1967 * 4: FM Stereo
5bd1b663 1968 */
e2392d34 1969 .input = { {
5bd1b663
ST
1970 .type = CX88_VMUX_TELEVISION,
1971 .vmux = 0,
1972 .gpio0 = 0xc4bf,
649e13a9 1973 /* 1: TV Audio / FM Mono */
923ac7f7 1974 .audioroute = 1,
5bd1b663
ST
1975 }, {
1976 .type = CX88_VMUX_COMPOSITE1,
1977 .vmux = 1,
1978 .gpio0 = 0xc4bf,
649e13a9 1979 /* 2: Line-In */
923ac7f7 1980 .audioroute = 2,
5bd1b663
ST
1981 }, {
1982 .type = CX88_VMUX_SVIDEO,
1983 .vmux = 2,
1984 .gpio0 = 0xc4bf,
649e13a9 1985 /* 2: Line-In */
923ac7f7 1986 .audioroute = 2,
5bd1b663 1987 } },
63248f26
DB
1988 .radio = {
1989 .type = CX88_RADIO,
1990 .gpio0 = 0xc4bf,
649e13a9
DB
1991 /* 4: FM Stereo */
1992 .audioroute = 8,
63248f26 1993 },
5bd1b663 1994 .mpeg = CX88_MPEG_DVB,
363c35fc 1995 .num_frontends = 2,
5bd1b663
ST
1996 },
1997 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1998 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1999 .tuner_type = UNSET,
2000 .radio_type = UNSET,
2001 .tuner_addr = ADDR_UNSET,
2002 .radio_addr = ADDR_UNSET,
e2392d34 2003 .input = { {
5bd1b663
ST
2004 .type = CX88_VMUX_DVB,
2005 .vmux = 0,
2006 } },
2007 .mpeg = CX88_MPEG_DVB,
2008 },
e4aab64c
IL
2009 [CX88_BOARD_TEVII_S420] = {
2010 .name = "TeVii S420 DVB-S",
2011 .tuner_type = UNSET,
2012 .radio_type = UNSET,
2013 .tuner_addr = ADDR_UNSET,
2014 .radio_addr = ADDR_UNSET,
e2392d34 2015 .input = { {
e4aab64c
IL
2016 .type = CX88_VMUX_DVB,
2017 .vmux = 0,
2018 } },
2019 .mpeg = CX88_MPEG_DVB,
2020 },
af832623
IL
2021 [CX88_BOARD_TEVII_S460] = {
2022 .name = "TeVii S460 DVB-S/S2",
2023 .tuner_type = UNSET,
2024 .radio_type = UNSET,
2025 .tuner_addr = ADDR_UNSET,
2026 .radio_addr = ADDR_UNSET,
e2392d34 2027 .input = { {
af832623
IL
2028 .type = CX88_VMUX_DVB,
2029 .vmux = 0,
2030 } },
2031 .mpeg = CX88_MPEG_DVB,
2032 },
0cb73639
IL
2033 [CX88_BOARD_TEVII_S464] = {
2034 .name = "TeVii S464 DVB-S/S2",
2035 .tuner_type = UNSET,
2036 .radio_type = UNSET,
2037 .tuner_addr = ADDR_UNSET,
2038 .radio_addr = ADDR_UNSET,
e2392d34 2039 .input = { {
0cb73639
IL
2040 .type = CX88_VMUX_DVB,
2041 .vmux = 0,
2042 } },
2043 .mpeg = CX88_MPEG_DVB,
2044 },
4cd7fb87
OR
2045 [CX88_BOARD_OMICOM_SS4_PCI] = {
2046 .name = "Omicom SS4 DVB-S/S2 PCI",
2047 .tuner_type = UNSET,
2048 .radio_type = UNSET,
2049 .tuner_addr = ADDR_UNSET,
2050 .radio_addr = ADDR_UNSET,
e2392d34 2051 .input = { {
4cd7fb87
OR
2052 .type = CX88_VMUX_DVB,
2053 .vmux = 0,
2054 } },
2055 .mpeg = CX88_MPEG_DVB,
2056 },
4b29631d
IL
2057 [CX88_BOARD_TBS_8910] = {
2058 .name = "TBS 8910 DVB-S",
2059 .tuner_type = UNSET,
2060 .radio_type = UNSET,
2061 .tuner_addr = ADDR_UNSET,
2062 .radio_addr = ADDR_UNSET,
e2392d34 2063 .input = { {
4b29631d
IL
2064 .type = CX88_VMUX_DVB,
2065 .vmux = 0,
2066 } },
2067 .mpeg = CX88_MPEG_DVB,
2068 },
ee73042c
OR
2069 [CX88_BOARD_TBS_8920] = {
2070 .name = "TBS 8920 DVB-S/S2",
c39ba330 2071 .tuner_type = UNSET,
ee73042c
OR
2072 .radio_type = UNSET,
2073 .tuner_addr = ADDR_UNSET,
2074 .radio_addr = ADDR_UNSET,
e2392d34 2075 .input = { {
ee73042c 2076 .type = CX88_VMUX_DVB,
ad5f74c0
IL
2077 .vmux = 0,
2078 .gpio0 = 0x8080,
ee73042c
OR
2079 } },
2080 .mpeg = CX88_MPEG_DVB,
2081 },
cd3cde12
IL
2082 [CX88_BOARD_PROF_6200] = {
2083 .name = "Prof 6200 DVB-S",
2084 .tuner_type = UNSET,
2085 .radio_type = UNSET,
2086 .tuner_addr = ADDR_UNSET,
2087 .radio_addr = ADDR_UNSET,
e2392d34 2088 .input = { {
cd3cde12
IL
2089 .type = CX88_VMUX_DVB,
2090 .vmux = 0,
2091 } },
2092 .mpeg = CX88_MPEG_DVB,
2093 },
57f51dbc
OR
2094 [CX88_BOARD_PROF_7300] = {
2095 .name = "PROF 7300 DVB-S/S2",
2096 .tuner_type = UNSET,
2097 .radio_type = UNSET,
2098 .tuner_addr = ADDR_UNSET,
2099 .radio_addr = ADDR_UNSET,
e2392d34 2100 .input = { {
57f51dbc
OR
2101 .type = CX88_VMUX_DVB,
2102 .vmux = 0,
2103 } },
2104 .mpeg = CX88_MPEG_DVB,
2105 },
4b29631d
IL
2106 [CX88_BOARD_SATTRADE_ST4200] = {
2107 .name = "SATTRADE ST4200 DVB-S/S2",
2108 .tuner_type = UNSET,
2109 .radio_type = UNSET,
2110 .tuner_addr = ADDR_UNSET,
2111 .radio_addr = ADDR_UNSET,
e2392d34 2112 .input = { {
4b29631d
IL
2113 .type = CX88_VMUX_DVB,
2114 .vmux = 0,
2115 } },
2116 .mpeg = CX88_MPEG_DVB,
2117 },
70101a27
SW
2118 [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
2119 .name = "Terratec Cinergy HT PCI MKII",
2120 .tuner_type = TUNER_XC2028,
2121 .tuner_addr = 0x61,
b6854e3f
MS
2122 .radio_type = UNSET,
2123 .radio_addr = ADDR_UNSET,
70101a27
SW
2124 .input = { {
2125 .type = CX88_VMUX_TELEVISION,
2126 .vmux = 0,
2127 .gpio0 = 0x004ff,
2128 .gpio1 = 0x010ff,
2129 .gpio2 = 0x00001,
2130 }, {
2131 .type = CX88_VMUX_COMPOSITE1,
2132 .vmux = 1,
2133 .gpio0 = 0x004fb,
2134 .gpio1 = 0x010ef,
2135 .audioroute = 1,
2136 }, {
2137 .type = CX88_VMUX_SVIDEO,
2138 .vmux = 2,
2139 .gpio0 = 0x004fb,
2140 .gpio1 = 0x010ef,
2141 .audioroute = 1,
2142 } },
2143 .radio = {
2144 .type = CX88_RADIO,
2145 .gpio0 = 0x004ff,
2146 .gpio1 = 0x010ff,
2147 .gpio2 = 0x0ff,
2148 },
2149 .mpeg = CX88_MPEG_DVB,
2150 },
501d8cd4
ST
2151 [CX88_BOARD_HAUPPAUGE_IRONLY] = {
2152 .name = "Hauppauge WinTV-IR Only",
2153 .tuner_type = UNSET,
2154 .radio_type = UNSET,
2155 .tuner_addr = ADDR_UNSET,
2156 .radio_addr = ADDR_UNSET,
2157 },
3047a176
MS
2158 [CX88_BOARD_WINFAST_DTV1800H] = {
2159 .name = "Leadtek WinFast DTV1800 Hybrid",
2160 .tuner_type = TUNER_XC2028,
b6854e3f 2161 .radio_type = UNSET,
3047a176 2162 .tuner_addr = 0x61,
b6854e3f 2163 .radio_addr = ADDR_UNSET,
3047a176
MS
2164 /*
2165 * GPIO setting
2166 *
2167 * 2: mute (0=off,1=on)
2168 * 12: tuner reset pin
2169 * 13: audio source (0=tuner audio,1=line in)
2170 * 14: FM (0=on,1=off ???)
2171 */
e2392d34 2172 .input = { {
3047a176
MS
2173 .type = CX88_VMUX_TELEVISION,
2174 .vmux = 0,
2175 .gpio0 = 0x0400, /* pin 2 = 0 */
2176 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2177 .gpio2 = 0x0000,
2178 }, {
2179 .type = CX88_VMUX_COMPOSITE1,
2180 .vmux = 1,
2181 .gpio0 = 0x0400, /* pin 2 = 0 */
2182 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2183 .gpio2 = 0x0000,
2184 }, {
2185 .type = CX88_VMUX_SVIDEO,
2186 .vmux = 2,
2187 .gpio0 = 0x0400, /* pin 2 = 0 */
2188 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2189 .gpio2 = 0x0000,
2190 } },
2191 .radio = {
2192 .type = CX88_RADIO,
2193 .gpio0 = 0x0400, /* pin 2 = 0 */
2194 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2195 .gpio2 = 0x0000,
2196 },
2197 .mpeg = CX88_MPEG_DVB,
2198 },
8eb79c0b 2199 [CX88_BOARD_WINFAST_DTV1800H_XC4000] = {
2200 .name = "Leadtek WinFast DTV1800 H (XC4000)",
2201 .tuner_type = TUNER_XC4000,
b6854e3f 2202 .radio_type = UNSET,
8eb79c0b 2203 .tuner_addr = 0x61,
b6854e3f 2204 .radio_addr = ADDR_UNSET,
8eb79c0b 2205 /*
2206 * GPIO setting
2207 *
2208 * 2: mute (0=off,1=on)
2209 * 12: tuner reset pin
2210 * 13: audio source (0=tuner audio,1=line in)
2211 * 14: FM (0=on,1=off ???)
2212 */
e2392d34 2213 .input = { {
8eb79c0b 2214 .type = CX88_VMUX_TELEVISION,
2215 .vmux = 0,
2216 .gpio0 = 0x0400, /* pin 2 = 0 */
2217 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2218 .gpio2 = 0x0000,
2219 }, {
2220 .type = CX88_VMUX_COMPOSITE1,
2221 .vmux = 1,
2222 .gpio0 = 0x0400, /* pin 2 = 0 */
2223 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2224 .gpio2 = 0x0000,
2225 }, {
2226 .type = CX88_VMUX_SVIDEO,
2227 .vmux = 2,
2228 .gpio0 = 0x0400, /* pin 2 = 0 */
2229 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2230 .gpio2 = 0x0000,
e2392d34 2231 } },
8eb79c0b 2232 .radio = {
2233 .type = CX88_RADIO,
2234 .gpio0 = 0x0400, /* pin 2 = 0 */
2235 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2236 .gpio2 = 0x0000,
2237 },
2238 .mpeg = CX88_MPEG_DVB,
2239 },
f271a3af 2240 [CX88_BOARD_WINFAST_DTV2000H_PLUS] = {
2241 .name = "Leadtek WinFast DTV2000 H PLUS",
2242 .tuner_type = TUNER_XC4000,
b6854e3f 2243 .radio_type = UNSET,
f271a3af 2244 .tuner_addr = 0x61,
b6854e3f 2245 .radio_addr = ADDR_UNSET,
f271a3af 2246 /*
2247 * GPIO
2248 * 2: 1: mute audio
2249 * 12: 0: reset XC4000
2250 * 13: 1: audio input is line in (0: tuner)
2251 * 14: 0: FM radio
2252 * 16: 0: RF input is cable
2253 */
e2392d34 2254 .input = { {
f271a3af 2255 .type = CX88_VMUX_TELEVISION,
2256 .vmux = 0,
2257 .gpio0 = 0x0403,
2258 .gpio1 = 0xF0D7,
2259 .gpio2 = 0x0101,
2260 .gpio3 = 0x0000,
2261 }, {
2262 .type = CX88_VMUX_CABLE,
2263 .vmux = 0,
2264 .gpio0 = 0x0403,
2265 .gpio1 = 0xF0D7,
2266 .gpio2 = 0x0100,
2267 .gpio3 = 0x0000,
2268 }, {
2269 .type = CX88_VMUX_COMPOSITE1,
2270 .vmux = 1,
2271 .gpio0 = 0x0403, /* was 0x0407 */
2272 .gpio1 = 0xF0F7,
2273 .gpio2 = 0x0101,
2274 .gpio3 = 0x0000,
2275 }, {
2276 .type = CX88_VMUX_SVIDEO,
2277 .vmux = 2,
2278 .gpio0 = 0x0403, /* was 0x0407 */
2279 .gpio1 = 0xF0F7,
2280 .gpio2 = 0x0101,
2281 .gpio3 = 0x0000,
e2392d34 2282 } },
f271a3af 2283 .radio = {
2284 .type = CX88_RADIO,
2285 .gpio0 = 0x0403,
2286 .gpio1 = 0xF097,
2287 .gpio2 = 0x0100,
2288 .gpio3 = 0x0000,
2289 },
2290 .mpeg = CX88_MPEG_DVB,
2291 },
b699c271
IL
2292 [CX88_BOARD_PROF_7301] = {
2293 .name = "Prof 7301 DVB-S/S2",
2294 .tuner_type = UNSET,
2295 .radio_type = UNSET,
2296 .tuner_addr = ADDR_UNSET,
2297 .radio_addr = ADDR_UNSET,
2298 .input = { {
2299 .type = CX88_VMUX_DVB,
2300 .vmux = 0,
2301 } },
2302 .mpeg = CX88_MPEG_DVB,
2303 },
111ac84a
SI
2304 [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
2305 .name = "Twinhan VP-1027 DVB-S",
c39ba330 2306 .tuner_type = UNSET,
111ac84a
SI
2307 .radio_type = UNSET,
2308 .tuner_addr = ADDR_UNSET,
2309 .radio_addr = ADDR_UNSET,
e2392d34 2310 .input = { {
111ac84a
SI
2311 .type = CX88_VMUX_DVB,
2312 .vmux = 0,
2313 } },
2314 .mpeg = CX88_MPEG_DVB,
2315 },
1da177e4 2316};
1da177e4
LT
2317
2318/* ------------------------------------------------------------------ */
2319/* PCI subsystem IDs */
2320
bbc83597 2321static const struct cx88_subid cx88_subids[] = {
1da177e4
LT
2322 {
2323 .subvendor = 0x0070,
2324 .subdevice = 0x3400,
2325 .card = CX88_BOARD_HAUPPAUGE,
e2392d34 2326 }, {
1da177e4
LT
2327 .subvendor = 0x0070,
2328 .subdevice = 0x3401,
2329 .card = CX88_BOARD_HAUPPAUGE,
e2392d34 2330 }, {
1da177e4
LT
2331 .subvendor = 0x14c7,
2332 .subdevice = 0x0106,
2333 .card = CX88_BOARD_GDI,
e2392d34 2334 }, {
1da177e4
LT
2335 .subvendor = 0x14c7,
2336 .subdevice = 0x0107, /* with mpeg encoder */
2337 .card = CX88_BOARD_GDI,
e2392d34 2338 }, {
1da177e4
LT
2339 .subvendor = PCI_VENDOR_ID_ATI,
2340 .subdevice = 0x00f8,
2341 .card = CX88_BOARD_ATI_WONDER_PRO,
bc13ae11
PL
2342 }, {
2343 .subvendor = PCI_VENDOR_ID_ATI,
2344 .subdevice = 0x00f9,
2345 .card = CX88_BOARD_ATI_WONDER_PRO,
2346 }, {
4ac97914
MCC
2347 .subvendor = 0x107d,
2348 .subdevice = 0x6611,
2349 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
e2392d34 2350 }, {
4ac97914
MCC
2351 .subvendor = 0x107d,
2352 .subdevice = 0x6613, /* NTSC */
2353 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
e2392d34 2354 }, {
4ac97914
MCC
2355 .subvendor = 0x107d,
2356 .subdevice = 0x6620,
2357 .card = CX88_BOARD_WINFAST_DV2000,
e2392d34 2358 }, {
4ac97914
MCC
2359 .subvendor = 0x107d,
2360 .subdevice = 0x663b,
2361 .card = CX88_BOARD_LEADTEK_PVR2000,
e2392d34 2362 }, {
1da177e4 2363 .subvendor = 0x107d,
8dd86eeb 2364 .subdevice = 0x663c,
4ac97914 2365 .card = CX88_BOARD_LEADTEK_PVR2000,
e2392d34 2366 }, {
1da177e4
LT
2367 .subvendor = 0x1461,
2368 .subdevice = 0x000b,
7418f346 2369 .card = CX88_BOARD_AVERTV_STUDIO_303,
e2392d34 2370 }, {
1da177e4
LT
2371 .subvendor = 0x1462,
2372 .subdevice = 0x8606,
2373 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
e2392d34 2374 }, {
4ac97914
MCC
2375 .subvendor = 0x10fc,
2376 .subdevice = 0xd003,
2377 .card = CX88_BOARD_IODATA_GVVCP3PCI,
e2392d34 2378 }, {
4ac97914
MCC
2379 .subvendor = 0x1043,
2380 .subdevice = 0x4823, /* with mpeg encoder */
2381 .card = CX88_BOARD_ASUS_PVR_416,
e2392d34 2382 }, {
1da177e4
LT
2383 .subvendor = 0x17de,
2384 .subdevice = 0x08a6,
2385 .card = CX88_BOARD_KWORLD_DVB_T,
e2392d34 2386 }, {
1da177e4
LT
2387 .subvendor = 0x18ac,
2388 .subdevice = 0xd810,
a82decf6 2389 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
e2392d34 2390 }, {
097b750e
MK
2391 .subvendor = 0x18ac,
2392 .subdevice = 0xd820,
80d34362 2393 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
e2392d34 2394 }, {
7df64e8c
MK
2395 .subvendor = 0x18ac,
2396 .subdevice = 0xdb00,
1da177e4 2397 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
e2392d34 2398 }, {
1da177e4
LT
2399 .subvendor = 0x0070,
2400 .subdevice = 0x9002,
2401 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
e2392d34 2402 }, {
1da177e4
LT
2403 .subvendor = 0x14f1,
2404 .subdevice = 0x0187,
2405 .card = CX88_BOARD_CONEXANT_DVB_T1,
e2392d34 2406 }, {
1da177e4
LT
2407 .subvendor = 0x1540,
2408 .subdevice = 0x2580,
2409 .card = CX88_BOARD_PROVIDEO_PV259,
e2392d34 2410 }, {
7df64e8c
MK
2411 .subvendor = 0x18ac,
2412 .subdevice = 0xdb10,
1da177e4 2413 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
e2392d34 2414 }, {
4ac97914
MCC
2415 .subvendor = 0x1554,
2416 .subdevice = 0x4811,
2417 .card = CX88_BOARD_PIXELVIEW,
e2392d34 2418 }, {
1da177e4
LT
2419 .subvendor = 0x7063,
2420 .subdevice = 0x3000, /* HD-3000 card */
2421 .card = CX88_BOARD_PCHDTV_HD3000,
e2392d34 2422 }, {
7df64e8c
MK
2423 .subvendor = 0x17de,
2424 .subdevice = 0xa8a6,
1da177e4 2425 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
e2392d34 2426 }, {
1da177e4
LT
2427 .subvendor = 0x0070,
2428 .subdevice = 0x2801,
2429 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
e2392d34 2430 }, {
7df64e8c 2431 .subvendor = 0x14f1,
1da177e4
LT
2432 .subdevice = 0x0342,
2433 .card = CX88_BOARD_DIGITALLOGIC_MEC,
e2392d34 2434 }, {
1da177e4
LT
2435 .subvendor = 0x10fc,
2436 .subdevice = 0xd035,
2437 .card = CX88_BOARD_IODATA_GVBCTV7E,
e2392d34 2438 }, {
a82decf6
MCC
2439 .subvendor = 0x1421,
2440 .subdevice = 0x0334,
2441 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
e2392d34 2442 }, {
e057ee11
MK
2443 .subvendor = 0x153b,
2444 .subdevice = 0x1166,
2445 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
e2392d34 2446 }, {
9fef07ca
MK
2447 .subvendor = 0x18ac,
2448 .subdevice = 0xd500,
2449 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
e2392d34 2450 }, {
d45170ed
NS
2451 .subvendor = 0x1461,
2452 .subdevice = 0x8011,
2453 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
e2392d34 2454 }, {
e976f937
KL
2455 .subvendor = PCI_VENDOR_ID_ATI,
2456 .subdevice = 0xa101,
2457 .card = CX88_BOARD_ATI_HDTVWONDER,
e2392d34 2458 }, {
2b5200a7
DS
2459 .subvendor = 0x107d,
2460 .subdevice = 0x665f,
2461 .card = CX88_BOARD_WINFAST_DTV1000,
e2392d34 2462 }, {
7418f346
LB
2463 .subvendor = 0x1461,
2464 .subdevice = 0x000a,
2465 .card = CX88_BOARD_AVERTV_303,
e2392d34 2466 }, {
0fa14aa6
ST
2467 .subvendor = 0x0070,
2468 .subdevice = 0x9200,
fb56cb65 2469 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
e2392d34 2470 }, {
fb56cb65
ST
2471 .subvendor = 0x0070,
2472 .subdevice = 0x9201,
0fa14aa6 2473 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
e2392d34 2474 }, {
0fa14aa6
ST
2475 .subvendor = 0x0070,
2476 .subdevice = 0x9202,
fb56cb65 2477 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
e2392d34 2478 }, {
0e0351e3
VC
2479 .subvendor = 0x17de,
2480 .subdevice = 0x08b2,
2481 .card = CX88_BOARD_KWORLD_DVBS_100,
e2392d34 2482 }, {
611900c1
ST
2483 .subvendor = 0x0070,
2484 .subdevice = 0x9400,
2485 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
e2392d34 2486 }, {
611900c1
ST
2487 .subvendor = 0x0070,
2488 .subdevice = 0x9402,
2489 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
e2392d34 2490 }, {
611900c1
ST
2491 .subvendor = 0x0070,
2492 .subdevice = 0x9800,
2493 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
e2392d34 2494 }, {
611900c1
ST
2495 .subvendor = 0x0070,
2496 .subdevice = 0x9802,
2497 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
e2392d34 2498 }, {
c432a072
ST
2499 .subvendor = 0x0070,
2500 .subdevice = 0x9001,
2501 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
e2392d34 2502 }, {
fc40b261
CP
2503 .subvendor = 0x1822,
2504 .subdevice = 0x0025,
2505 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
e2392d34 2506 }, {
b9f4ad57
CP
2507 .subvendor = 0x17de,
2508 .subdevice = 0x08a1,
2509 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
e2392d34 2510 }, {
43eabb4e
CP
2511 .subvendor = 0x18ac,
2512 .subdevice = 0xdb50,
2513 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
e2392d34 2514 }, {
f74a6b39
MK
2515 .subvendor = 0x18ac,
2516 .subdevice = 0xdb54,
2517 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2518 /* Re-branded DViCO: DigitalNow DVB-T Dual */
e2392d34 2519 }, {
6bfb2e1f
MK
2520 .subvendor = 0x18ac,
2521 .subdevice = 0xdb11,
2522 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2523 /* Re-branded DViCO: UltraView DVB-T Plus */
b3fb91d2
CP
2524 }, {
2525 .subvendor = 0x18ac,
2526 .subdevice = 0xdb30,
2527 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2528 }, {
44256de1
MK
2529 .subvendor = 0x17de,
2530 .subdevice = 0x0840,
923da8a7 2531 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
e2392d34 2532 }, {
923da8a7
MK
2533 .subvendor = 0x1421,
2534 .subdevice = 0x0305,
44256de1 2535 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
e2392d34 2536 }, {
780dfef3
CP
2537 .subvendor = 0x18ac,
2538 .subdevice = 0xdb40,
2539 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
e2392d34 2540 }, {
780dfef3
CP
2541 .subvendor = 0x18ac,
2542 .subdevice = 0xdb44,
2543 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
e2392d34 2544 }, {
da215d22
RS
2545 .subvendor = 0x7063,
2546 .subdevice = 0x5500,
2547 .card = CX88_BOARD_PCHDTV_HD5500,
e2392d34 2548 }, {
b3038304
VZ
2549 .subvendor = 0x17de,
2550 .subdevice = 0x0841,
2551 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
e2392d34 2552 }, {
fc066478
MK
2553 .subvendor = 0x1822,
2554 .subdevice = 0x0019,
2555 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
e2392d34 2556 }, {
a3124622
AM
2557 .subvendor = 0x1554,
2558 .subdevice = 0x4813,
2559 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
e2392d34 2560 }, {
680543c5
RC
2561 .subvendor = 0x14f1,
2562 .subdevice = 0x0842,
be4f4519 2563 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
e2392d34 2564 }, {
4bd6e9d9
MV
2565 .subvendor = 0x107d,
2566 .subdevice = 0x665e,
2567 .card = CX88_BOARD_WINFAST_DTV2000H,
e2392d34 2568 }, {
4d14c833
VL
2569 .subvendor = 0x107d,
2570 .subdevice = 0x6f2b,
2571 .card = CX88_BOARD_WINFAST_DTV2000H_J,
e2392d34 2572 }, {
65271bff
MK
2573 .subvendor = 0x18ac,
2574 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2575 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
e2392d34 2576 }, {
c02a34f4
SA
2577 .subvendor = 0x14f1,
2578 .subdevice = 0x0084,
2579 .card = CX88_BOARD_GENIATECH_DVBS,
e2392d34 2580 }, {
ad10c930
ET
2581 .subvendor = 0x0070,
2582 .subdevice = 0x1404,
2583 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
4f3ca2f1
DH
2584 }, {
2585 .subvendor = 0x18ac,
2586 .subdevice = 0xdc00,
2587 .card = CX88_BOARD_SAMSUNG_SMT_7020,
2588 }, {
2589 .subvendor = 0x18ac,
2590 .subdevice = 0xdccd,
2591 .card = CX88_BOARD_SAMSUNG_SMT_7020,
e2392d34 2592 }, {
5dbaa2cb
MK
2593 .subvendor = 0x1461,
2594 .subdevice = 0xc111, /* AverMedia M150-D */
2595 /* This board is known to work with the ASUS PVR416 config */
2596 .card = CX88_BOARD_ASUS_PVR_416,
e2392d34 2597 }, {
2acadefa
DB
2598 .subvendor = 0xc180,
2599 .subdevice = 0xc980,
2600 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
e2392d34 2601 }, {
aa481a65
ST
2602 .subvendor = 0x0070,
2603 .subdevice = 0x9600,
2604 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
e2392d34 2605 }, {
aa481a65
ST
2606 .subvendor = 0x0070,
2607 .subdevice = 0x9601,
2608 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
e2392d34 2609 }, {
aa481a65
ST
2610 .subvendor = 0x0070,
2611 .subdevice = 0x9602,
2612 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
e2392d34 2613 }, {
dab489df
MK
2614 .subvendor = 0x107d,
2615 .subdevice = 0x6632,
2616 .card = CX88_BOARD_LEADTEK_PVR2000,
e2392d34 2617 }, {
4508f598
MK
2618 .subvendor = 0x12ab,
2619 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2620 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
e2392d34 2621 }, {
3979ecc7
ST
2622 .subvendor = 0x0070,
2623 .subdevice = 0x9000,
2624 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
e2392d34 2625 }, {
76dc82ab
ST
2626 .subvendor = 0x0070,
2627 .subdevice = 0x1400,
2628 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
e2392d34 2629 }, {
76dc82ab
ST
2630 .subvendor = 0x0070,
2631 .subdevice = 0x1401,
2632 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
e2392d34 2633 }, {
76dc82ab
ST
2634 .subvendor = 0x0070,
2635 .subdevice = 0x1402,
2636 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
e2392d34 2637 }, {
733aeaf4
MK
2638 .subvendor = 0x1421,
2639 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2640 .card = CX88_BOARD_KWORLD_DVBS_100,
e2392d34 2641 }, {
7cb47a14
DG
2642 .subvendor = 0x1421,
2643 .subdevice = 0x0390,
2644 .card = CX88_BOARD_ADSTECH_PTV_390,
e2392d34 2645 }, {
60464da8
ST
2646 .subvendor = 0x11bd,
2647 .subdevice = 0x0051,
2648 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
5c00fac0
ST
2649 }, {
2650 .subvendor = 0x18ac,
2651 .subdevice = 0xd530,
2652 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
9507901e
MCC
2653 }, {
2654 .subvendor = 0x12ab,
2655 .subdevice = 0x1788,
2656 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2657 }, {
2658 .subvendor = 0x14f1,
2659 .subdevice = 0xea3d,
2660 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2661 }, {
2662 .subvendor = 0x107d,
2663 .subdevice = 0x6f18,
2664 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2665 }, {
2666 .subvendor = 0x14f1,
2667 .subdevice = 0x8852,
2668 .card = CX88_BOARD_GENIATECH_X8000_MT,
2422a9b3 2669 }, {
1117d6ba
ST
2670 .subvendor = 0x18ac,
2671 .subdevice = 0xd610,
2672 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
2422a9b3
MCC
2673 }, {
2674 .subvendor = 0x1554,
2675 .subdevice = 0x4935,
2676 .card = CX88_BOARD_PROLINK_PV_8000GT,
a31d2bb7
MCC
2677 }, {
2678 .subvendor = 0x1554,
2679 .subdevice = 0x4976,
2680 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
99e09eac
MCC
2681 }, {
2682 .subvendor = 0x17de,
2683 .subdevice = 0x08c1,
2684 .card = CX88_BOARD_KWORLD_ATSC_120,
5bd1b663
ST
2685 }, {
2686 .subvendor = 0x0070,
2687 .subdevice = 0x6900,
2688 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2689 }, {
2690 .subvendor = 0x0070,
2691 .subdevice = 0x6904,
2692 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2693 }, {
2694 .subvendor = 0x0070,
2695 .subdevice = 0x6902,
2696 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2697 }, {
2698 .subvendor = 0x0070,
2699 .subdevice = 0x6905,
2700 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2701 }, {
2702 .subvendor = 0x0070,
2703 .subdevice = 0x6906,
2704 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
af832623 2705 }, {
e4aab64c
IL
2706 .subvendor = 0xd420,
2707 .subdevice = 0x9022,
2708 .card = CX88_BOARD_TEVII_S420,
2709 }, {
2710 .subvendor = 0xd460,
af832623
IL
2711 .subdevice = 0x9022,
2712 .card = CX88_BOARD_TEVII_S460,
0cb73639
IL
2713 }, {
2714 .subvendor = 0xd464,
2715 .subdevice = 0x9022,
2716 .card = CX88_BOARD_TEVII_S464,
4cd7fb87
OR
2717 }, {
2718 .subvendor = 0xA044,
2719 .subdevice = 0x2011,
2720 .card = CX88_BOARD_OMICOM_SS4_PCI,
4b29631d
IL
2721 }, {
2722 .subvendor = 0x8910,
2723 .subdevice = 0x8888,
2724 .card = CX88_BOARD_TBS_8910,
ee73042c
OR
2725 }, {
2726 .subvendor = 0x8920,
2727 .subdevice = 0x8888,
2728 .card = CX88_BOARD_TBS_8920,
cd3cde12
IL
2729 }, {
2730 .subvendor = 0xb022,
2731 .subdevice = 0x3022,
2732 .card = CX88_BOARD_PROF_6200,
57f51dbc
OR
2733 }, {
2734 .subvendor = 0xB033,
2735 .subdevice = 0x3033,
2736 .card = CX88_BOARD_PROF_7300,
4b29631d
IL
2737 }, {
2738 .subvendor = 0xb200,
2739 .subdevice = 0x4200,
2740 .card = CX88_BOARD_SATTRADE_ST4200,
70101a27
SW
2741 }, {
2742 .subvendor = 0x153b,
2743 .subdevice = 0x1177,
2744 .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
501d8cd4
ST
2745 }, {
2746 .subvendor = 0x0070,
2747 .subdevice = 0x9290,
2748 .card = CX88_BOARD_HAUPPAUGE_IRONLY,
3047a176
MS
2749 }, {
2750 .subvendor = 0x107d,
2751 .subdevice = 0x6654,
2752 .card = CX88_BOARD_WINFAST_DTV1800H,
8eb79c0b 2753 }, {
2754 /* WinFast DTV1800 H with XC4000 tuner */
2755 .subvendor = 0x107d,
2756 .subdevice = 0x6f38,
2757 .card = CX88_BOARD_WINFAST_DTV1800H_XC4000,
f271a3af 2758 }, {
2759 .subvendor = 0x107d,
2760 .subdevice = 0x6f42,
2761 .card = CX88_BOARD_WINFAST_DTV2000H_PLUS,
14422f9d
MCC
2762 }, {
2763 /* PVR2000 PAL Model [107d:6630] */
2764 .subvendor = 0x107d,
2765 .subdevice = 0x6630,
2766 .card = CX88_BOARD_LEADTEK_PVR2000,
2767 }, {
2768 /* PVR2000 PAL Model [107d:6638] */
2769 .subvendor = 0x107d,
2770 .subdevice = 0x6638,
2771 .card = CX88_BOARD_LEADTEK_PVR2000,
2772 }, {
2773 /* PVR2000 NTSC Model [107d:6631] */
2774 .subvendor = 0x107d,
2775 .subdevice = 0x6631,
2776 .card = CX88_BOARD_LEADTEK_PVR2000,
2777 }, {
2778 /* PVR2000 NTSC Model [107d:6637] */
2779 .subvendor = 0x107d,
2780 .subdevice = 0x6637,
2781 .card = CX88_BOARD_LEADTEK_PVR2000,
2782 }, {
2783 /* PVR2000 NTSC Model [107d:663d] */
2784 .subvendor = 0x107d,
2785 .subdevice = 0x663d,
2786 .card = CX88_BOARD_LEADTEK_PVR2000,
2787 }, {
2788 /* DV2000 NTSC Model [107d:6621] */
2789 .subvendor = 0x107d,
2790 .subdevice = 0x6621,
2791 .card = CX88_BOARD_WINFAST_DV2000,
2792 }, {
2793 /* TV2000 XP Global [107d:6618] */
2794 .subvendor = 0x107d,
2795 .subdevice = 0x6618,
2796 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
84463d5f
IV
2797 }, {
2798 /* TV2000 XP Global [107d:6618] */
2799 .subvendor = 0x107d,
2800 .subdevice = 0x6619,
2801 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2802 }, {
2803 /* WinFast TV2000 XP Global with XC4000 tuner */
2804 .subvendor = 0x107d,
2805 .subdevice = 0x6f36,
2806 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36,
2807 }, {
2808 /* WinFast TV2000 XP Global with XC4000 tuner and different GPIOs */
2809 .subvendor = 0x107d,
2810 .subdevice = 0x6f43,
2811 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43,
b699c271
IL
2812 }, {
2813 .subvendor = 0xb034,
2814 .subdevice = 0x3034,
2815 .card = CX88_BOARD_PROF_7301,
111ac84a
SI
2816 }, {
2817 .subvendor = 0x1822,
2818 .subdevice = 0x0023,
2819 .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
2422a9b3 2820 },
1da177e4 2821};
1da177e4 2822
399426ca
MCC
2823/*
2824 * some leadtek specific stuff
2825 */
69f7e75a 2826static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
1da177e4 2827{
1da177e4
LT
2828 if (eeprom_data[4] != 0x7d ||
2829 eeprom_data[5] != 0x10 ||
2830 eeprom_data[7] != 0x66) {
65bc2fe8 2831 pr_warn("Leadtek eeprom invalid.\n");
1da177e4
LT
2832 return;
2833 }
2834
14422f9d
MCC
2835 /* Terry Wu <terrywu2009@gmail.com> */
2836 switch (eeprom_data[6]) {
2837 case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
2838 case 0x21: /* SSID 6621 for DV2000 NTSC Model */
2839 case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
2840 case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
2841 case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
2842 core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
2843 break;
2844 default:
2845 core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2846 break;
2847 }
1da177e4 2848
65bc2fe8
MCC
2849 pr_info("Leadtek Winfast 2000XP Expert config: tuner=%d, eeprom[0]=0x%02x\n",
2850 core->board.tuner_type, eeprom_data[0]);
1da177e4
LT
2851}
2852
1da177e4
LT
2853static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2854{
2855 struct tveeprom tv;
2856
0f97a931 2857 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
6a59d64c 2858 core->board.tuner_type = tv.tuner_type;
0345c387 2859 core->tuner_formats = tv.tuner_formats;
6a59d64c 2860 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
48a8a03b 2861 core->model = tv.model;
1da177e4
LT
2862
2863 /* Make sure we support the board model */
399426ca 2864 switch (tv.model) {
76dc82ab
ST
2865 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2866 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2867 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2868 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2869 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2870 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
ad10c930 2871 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
76dc82ab
ST
2872 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2873 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
0345c387 2874 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
42d2b6ef 2875 case 34519: /* WinTV-PCI-FM */
5bd1b663
ST
2876 case 69009:
2877 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2878 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2879 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2880 case 69559:
2881 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2882 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
759324c3 2883 case 90002: /* Nova-T-PCI (9002) */
0fe22865
ST
2884 case 92001: /* Nova-S-Plus (Video and IR) */
2885 case 92002: /* Nova-S-Plus (Video and IR) */
2886 case 90003: /* Nova-T-PCI (9002 No RF out) */
759324c3
ST
2887 case 90500: /* Nova-T-PCI (oem) */
2888 case 90501: /* Nova-T-PCI (oem/IR) */
3ca0ea98 2889 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
501d8cd4 2890 case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
611900c1
ST
2891 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2892 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
aa481a65
ST
2893 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2894 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2895 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2896 case 96569: /* WinTV-HVR1300 () */
2897 case 96659: /* WinTV-HVR1300 () */
611900c1 2898 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1da177e4
LT
2899 /* known */
2900 break;
4f3ca2f1
DH
2901 case CX88_BOARD_SAMSUNG_SMT_7020:
2902 cx_set(MO_GP0_IO, 0x008989FF);
2903 break;
1da177e4 2904 default:
65bc2fe8 2905 pr_warn("warning: unknown hauppauge model #%d\n", tv.model);
1da177e4
LT
2906 break;
2907 }
2908
65bc2fe8 2909 pr_info("hauppauge eeprom: model=%d\n", tv.model);
1da177e4
LT
2910}
2911
399426ca
MCC
2912/*
2913 * some GDI (was: Modular Technology) specific stuff
2914 */
1da177e4 2915
2e4e98e7 2916static const struct {
1da177e4
LT
2917 int id;
2918 int fm;
2e4e98e7 2919 const char *name;
1da177e4 2920} gdi_tuner[] = {
7b61ba8f 2921 [0x01] = { .id = UNSET,
399426ca 2922 .name = "NTSC_M" },
7b61ba8f 2923 [0x02] = { .id = UNSET,
399426ca 2924 .name = "PAL_B" },
7b61ba8f 2925 [0x03] = { .id = UNSET,
399426ca 2926 .name = "PAL_I" },
7b61ba8f 2927 [0x04] = { .id = UNSET,
399426ca 2928 .name = "PAL_D" },
7b61ba8f 2929 [0x05] = { .id = UNSET,
399426ca 2930 .name = "SECAM" },
1da177e4 2931
7b61ba8f 2932 [0x10] = { .id = UNSET,
399426ca
MCC
2933 .fm = 1,
2934 .name = "TEMIC_4049" },
7b61ba8f 2935 [0x11] = { .id = TUNER_TEMIC_4136FY5,
399426ca 2936 .name = "TEMIC_4136" },
7b61ba8f 2937 [0x12] = { .id = UNSET,
399426ca 2938 .name = "TEMIC_4146" },
1da177e4 2939
7b61ba8f 2940 [0x20] = { .id = TUNER_PHILIPS_FQ1216ME,
399426ca
MCC
2941 .fm = 1,
2942 .name = "PHILIPS_FQ1216_MK3" },
7b61ba8f 2943 [0x21] = { .id = UNSET, .fm = 1,
399426ca 2944 .name = "PHILIPS_FQ1236_MK3" },
7b61ba8f 2945 [0x22] = { .id = UNSET,
399426ca 2946 .name = "PHILIPS_FI1236_MK3" },
7b61ba8f 2947 [0x23] = { .id = UNSET,
399426ca 2948 .name = "PHILIPS_FI1216_MK3" },
1da177e4
LT
2949};
2950
2951static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2952{
2e4e98e7 2953 const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
1da177e4
LT
2954 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2955
65bc2fe8 2956 pr_info("GDI: tuner=%s\n", name ? name : "unknown");
399426ca 2957 if (!name)
1da177e4 2958 return;
6a59d64c
TP
2959 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2960 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2961 CX88_RADIO : 0;
1da177e4
LT
2962}
2963
399426ca
MCC
2964/*
2965 * some Divco specific stuff
2966 */
0be51b46
MCC
2967static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2968 int command, int arg)
b3fb91d2 2969{
b3fb91d2
CP
2970 switch (command) {
2971 case XC2028_TUNER_RESET:
d7cba043
MK
2972 switch (core->boardnr) {
2973 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2974 /* GPIO-4 xc3028 tuner */
2975
2976 cx_set(MO_GP0_IO, 0x00001000);
2977 cx_clear(MO_GP0_IO, 0x00000010);
2978 msleep(100);
2979 cx_set(MO_GP0_IO, 0x00000010);
2980 msleep(100);
2981 break;
2982 default:
2983 cx_write(MO_GP0_IO, 0x101000);
2984 mdelay(5);
2985 cx_set(MO_GP0_IO, 0x101010);
2986 }
b3fb91d2
CP
2987 break;
2988 default:
2989 return -EINVAL;
2990 }
2991
2992 return 0;
2993}
2994
399426ca
MCC
2995/*
2996 * some Geniatech specific stuff
2997 */
9507901e 2998
0be51b46
MCC
2999static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
3000 int command, int mode)
9507901e 3001{
9507901e
MCC
3002 switch (command) {
3003 case XC2028_TUNER_RESET:
3004 switch (INPUT(core->input).type) {
3005 case CX88_RADIO:
c450e50e 3006 break;
9507901e
MCC
3007 case CX88_VMUX_DVB:
3008 cx_write(MO_GP1_IO, 0x030302);
3009 mdelay(50);
c450e50e 3010 break;
9507901e
MCC
3011 default:
3012 cx_write(MO_GP1_IO, 0x030301);
3013 mdelay(50);
c450e50e
MCC
3014 }
3015 cx_write(MO_GP1_IO, 0x101010);
3016 mdelay(50);
3017 cx_write(MO_GP1_IO, 0x101000);
3018 mdelay(50);
3019 cx_write(MO_GP1_IO, 0x101010);
3020 mdelay(50);
3021 return 0;
9507901e
MCC
3022 }
3023 return -EINVAL;
3024}
3025
3047a176
MS
3026static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
3027 int command, int arg)
3028{
3029 switch (command) {
3030 case XC2028_TUNER_RESET:
3031 /* GPIO 12 (xc3028 tuner reset) */
3032 cx_set(MO_GP1_IO, 0x1010);
3033 mdelay(50);
3034 cx_clear(MO_GP1_IO, 0x10);
4699903e 3035 mdelay(75);
3047a176 3036 cx_set(MO_GP1_IO, 0x10);
4699903e 3037 mdelay(75);
3047a176
MS
3038 return 0;
3039 }
3040 return -EINVAL;
3041}
3042
f271a3af 3043static int cx88_xc4000_winfast2000h_plus_callback(struct cx88_core *core,
3044 int command, int arg)
3045{
3046 switch (command) {
3047 case XC4000_TUNER_RESET:
3048 /* GPIO 12 (xc4000 tuner reset) */
3049 cx_set(MO_GP1_IO, 0x1010);
3050 mdelay(50);
3051 cx_clear(MO_GP1_IO, 0x10);
3052 mdelay(75);
3053 cx_set(MO_GP1_IO, 0x10);
3054 mdelay(75);
3055 return 0;
3056 }
3057 return -EINVAL;
3058}
3059
399426ca
MCC
3060/*
3061 * some Divco specific stuff
3062 */
0be51b46
MCC
3063static int cx88_pv_8000gt_callback(struct cx88_core *core,
3064 int command, int arg)
2422a9b3 3065{
2422a9b3
MCC
3066 switch (command) {
3067 case XC2028_TUNER_RESET:
3068 cx_write(MO_GP2_IO, 0xcf7);
3069 mdelay(50);
3070 cx_write(MO_GP2_IO, 0xef5);
3071 mdelay(50);
3072 cx_write(MO_GP2_IO, 0xcf7);
3073 break;
3074 default:
3075 return -EINVAL;
3076 }
3077
3078 return 0;
3079}
3080
399426ca
MCC
3081/*
3082 * some DViCO specific stuff
3083 */
780dfef3
CP
3084
3085static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
3086{
3087 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
3088 int i, err;
69b27e3d 3089 static u8 init_bufs[13][5] = {
780dfef3
CP
3090 { 0x10, 0x00, 0x20, 0x01, 0x03 },
3091 { 0x10, 0x10, 0x01, 0x00, 0x21 },
3092 { 0x10, 0x10, 0x10, 0x00, 0xCA },
3093 { 0x10, 0x10, 0x12, 0x00, 0x08 },
3094 { 0x10, 0x10, 0x13, 0x00, 0x0A },
3095 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
3096 { 0x10, 0x10, 0x22, 0x01, 0x3D },
3097 { 0x10, 0x10, 0x73, 0x01, 0x2E },
3098 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
3099 { 0x10, 0x10, 0x71, 0x01, 0x97 },
3100 { 0x10, 0x10, 0x70, 0x00, 0x0F },
3101 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
3102 { 0x03, 0x0C },
3103 };
3104
5b9c4e6d 3105 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
780dfef3
CP
3106 msg.buf = init_bufs[i];
3107 msg.len = (i != 12 ? 5 : 2);
3108 err = i2c_transfer(&core->i2c_adap, &msg, 1);
3109 if (err != 1) {
65bc2fe8
MCC
3110 pr_warn("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n",
3111 i, err);
780dfef3
CP
3112 return;
3113 }
3114 }
3115}
3116
0be51b46
MCC
3117static int cx88_xc2028_tuner_callback(struct cx88_core *core,
3118 int command, int arg)
c2cb8fcc 3119{
9507901e
MCC
3120 /* Board-specific callbacks */
3121 switch (core->boardnr) {
9507901e
MCC
3122 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
3123 case CX88_BOARD_GENIATECH_X8000_MT:
99e09eac 3124 case CX88_BOARD_KWORLD_ATSC_120:
0be51b46
MCC
3125 return cx88_xc3028_geniatech_tuner_callback(core,
3126 command, arg);
2422a9b3 3127 case CX88_BOARD_PROLINK_PV_8000GT:
a31d2bb7 3128 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
0be51b46 3129 return cx88_pv_8000gt_callback(core, command, arg);
b3fb91d2 3130 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
d7cba043 3131 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
0be51b46 3132 return cx88_dvico_xc2028_callback(core, command, arg);
14422f9d 3133 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
3047a176
MS
3134 case CX88_BOARD_WINFAST_DTV1800H:
3135 return cx88_xc3028_winfast1800h_callback(core, command, arg);
9507901e
MCC
3136 }
3137
c2cb8fcc
MCC
3138 switch (command) {
3139 case XC2028_TUNER_RESET:
c2cb8fcc
MCC
3140 switch (INPUT(core->input).type) {
3141 case CX88_RADIO:
02615ed5 3142 dprintk(1, "setting GPIO to radio!\n");
c2cb8fcc
MCC
3143 cx_write(MO_GP0_IO, 0x4ff);
3144 mdelay(250);
3145 cx_write(MO_GP2_IO, 0xff);
3146 mdelay(250);
c450e50e 3147 break;
c2cb8fcc
MCC
3148 case CX88_VMUX_DVB: /* Digital TV*/
3149 default: /* Analog TV */
02615ed5 3150 dprintk(1, "setting GPIO to TV!\n");
c450e50e 3151 break;
c2cb8fcc 3152 }
c450e50e
MCC
3153 cx_write(MO_GP1_IO, 0x101010);
3154 mdelay(250);
3155 cx_write(MO_GP1_IO, 0x101000);
3156 mdelay(250);
3157 cx_write(MO_GP1_IO, 0x101010);
3158 mdelay(250);
3159 return 0;
c2cb8fcc
MCC
3160 }
3161 return -EINVAL;
3162}
3163
c21973e8 3164static int cx88_xc4000_tuner_callback(struct cx88_core *core,
3165 int command, int arg)
3166{
3167 /* Board-specific callbacks */
3168 switch (core->boardnr) {
8eb79c0b 3169 case CX88_BOARD_WINFAST_DTV1800H_XC4000:
f271a3af 3170 case CX88_BOARD_WINFAST_DTV2000H_PLUS:
84463d5f
IV
3171 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
3172 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
f271a3af 3173 return cx88_xc4000_winfast2000h_plus_callback(core,
3174 command, arg);
c21973e8 3175 }
3176 return -EINVAL;
3177}
3178
399426ca
MCC
3179/*
3180 * Tuner callback function. Currently only needed for the Pinnacle
3181 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both
3182 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c)
3183 */
0be51b46
MCC
3184static int cx88_xc5000_tuner_callback(struct cx88_core *core,
3185 int command, int arg)
60464da8 3186{
c2cb8fcc 3187 switch (core->boardnr) {
60464da8 3188 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
c2cb8fcc 3189 if (command == 0) { /* This is the reset command from xc5000 */
b8d91986 3190
399426ca
MCC
3191 /*
3192 * djh - According to the engineer at PCTV Systems,
3193 * the xc5000 reset pin is supposed to be on GPIO12.
3194 * However, despite three nights of effort, pulling
3195 * that GPIO low didn't reset the xc5000. While
3196 * pulling MO_SRST_IO low does reset the xc5000, this
3197 * also resets in the s5h1409 being reset as well.
3198 * This causes tuning to always fail since the internal
3199 * state of the s5h1409 does not match the driver's
3200 * state. Given that the only two conditions in which
3201 * the driver performs a reset is during firmware load
3202 * and powering down the chip, I am taking out the
3203 * reset. We know that the chip is being reset
3204 * when the cx88 comes online, and not being able to
3205 * do power management for this board is worse than
3206 * not having any tuning at all.
3207 */
60464da8 3208 return 0;
60464da8 3209 }
399426ca
MCC
3210
3211 dprintk(1, "xc5000: unknown tuner callback command.\n");
3212 return -EINVAL;
1117d6ba
ST
3213 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
3214 if (command == 0) { /* This is the reset command from xc5000 */
3215 cx_clear(MO_GP0_IO, 0x00000010);
399426ca 3216 usleep_range(10000, 20000);
1117d6ba
ST
3217 cx_set(MO_GP0_IO, 0x00000010);
3218 return 0;
1117d6ba 3219 }
399426ca
MCC
3220
3221 dprintk(1, "xc5000: unknown tuner callback command.\n");
3222 return -EINVAL;
60464da8
ST
3223 }
3224 return 0; /* Should never be here */
3225}
c2cb8fcc 3226
d7cba043 3227int cx88_tuner_callback(void *priv, int component, int command, int arg)
c2cb8fcc
MCC
3228{
3229 struct i2c_algo_bit_data *i2c_algo = priv;
0be51b46
MCC
3230 struct cx88_core *core;
3231
3232 if (!i2c_algo) {
65bc2fe8 3233 pr_err("Error - i2c private data undefined.\n");
0be51b46
MCC
3234 return -EINVAL;
3235 }
3236
3237 core = i2c_algo->data;
3238
3239 if (!core) {
65bc2fe8 3240 pr_err("Error - device struct undefined.\n");
0be51b46
MCC
3241 return -EINVAL;
3242 }
c2cb8fcc 3243
d7cba043
MK
3244 if (component != DVB_FRONTEND_COMPONENT_TUNER)
3245 return -EINVAL;
3246
c2cb8fcc 3247 switch (core->board.tuner_type) {
399426ca
MCC
3248 case TUNER_XC2028:
3249 dprintk(1, "Calling XC2028/3028 callback\n");
3250 return cx88_xc2028_tuner_callback(core, command, arg);
3251 case TUNER_XC4000:
3252 dprintk(1, "Calling XC4000 callback\n");
3253 return cx88_xc4000_tuner_callback(core, command, arg);
3254 case TUNER_XC5000:
3255 dprintk(1, "Calling XC5000 callback\n");
3256 return cx88_xc5000_tuner_callback(core, command, arg);
c2cb8fcc 3257 }
65bc2fe8
MCC
3258 pr_err("Error: Calling callback for tuner %d\n",
3259 core->board.tuner_type);
c2cb8fcc
MCC
3260 return -EINVAL;
3261}
60464da8
ST
3262EXPORT_SYMBOL(cx88_tuner_callback);
3263
1da177e4
LT
3264/* ----------------------------------------------------------------------- */
3265
bbc83597 3266static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1da177e4
LT
3267{
3268 int i;
3269
399426ca 3270 if (!pci->subsystem_vendor && !pci->subsystem_device) {
65bc2fe8
MCC
3271 pr_err("Your board has no valid PCI Subsystem ID and thus can't\n");
3272 pr_err("be autodetected. Please pass card=<n> insmod option to\n");
3273 pr_err("workaround that. Redirect complaints to the vendor of\n");
3274 pr_err("the TV card\n");
1da177e4 3275 } else {
65bc2fe8
MCC
3276 pr_err("Your board isn't known (yet) to the driver. You can\n");
3277 pr_err("try to pick one of the existing card configs via\n");
3278 pr_err("card=<n> insmod option. Updating to the latest\n");
3279 pr_err("version might help as well.\n");
1da177e4 3280 }
65bc2fe8 3281 pr_err("Here is a list of valid choices for the card=<n> insmod option:\n");
bbc83597 3282 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
65bc2fe8 3283 pr_err(" card=%d -> %s\n", i, cx88_boards[i].name);
1da177e4
LT
3284}
3285
bbc83597 3286static void cx88_card_setup_pre_i2c(struct cx88_core *core)
aa481a65 3287{
6a59d64c 3288 switch (core->boardnr) {
aa481a65 3289 case CX88_BOARD_HAUPPAUGE_HVR1300:
2491fbb7 3290 /*
399426ca
MCC
3291 * Bring the 702 demod up before i2c scanning/attach or
3292 * devices are hidden.
3293 *
2491fbb7
ST
3294 * We leave here with the 702 on the bus
3295 *
3296 * "reset the IR receiver on GPIO[3]"
3297 * Reported by Mike Crash <mike AT mikecrash.com>
3298 */
3299 cx_write(MO_GP0_IO, 0x0000ef88);
aa481a65 3300 udelay(1000);
2491fbb7 3301 cx_clear(MO_GP0_IO, 0x00000088);
aa481a65 3302 udelay(50);
2491fbb7 3303 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
aa481a65
ST
3304 udelay(1000);
3305 break;
2422a9b3 3306
a31d2bb7 3307 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2422a9b3
MCC
3308 case CX88_BOARD_PROLINK_PV_8000GT:
3309 cx_write(MO_GP2_IO, 0xcf7);
3310 mdelay(50);
3311 cx_write(MO_GP2_IO, 0xef5);
3312 mdelay(50);
3313 cx_write(MO_GP2_IO, 0xcf7);
399426ca 3314 usleep_range(10000, 20000);
2422a9b3
MCC
3315 break;
3316
2491fbb7 3317 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
1117d6ba
ST
3318 /* Enable the xc5000 tuner */
3319 cx_set(MO_GP0_IO, 0x00001010);
3320 break;
2491fbb7 3321
27b93d8a 3322 case CX88_BOARD_WINFAST_DTV2000H_J:
2491fbb7 3323 case CX88_BOARD_HAUPPAUGE_HVR3000:
5bd1b663 3324 case CX88_BOARD_HAUPPAUGE_HVR4000:
2491fbb7
ST
3325 /* Init GPIO */
3326 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
5bd1b663 3327 udelay(1000);
2f3af9e6
DB
3328 cx_clear(MO_GP0_IO, 0x00000080);
3329 udelay(50);
3330 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
3331 udelay(1000);
2491fbb7 3332 break;
3047a176 3333
14422f9d 3334 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
3047a176 3335 case CX88_BOARD_WINFAST_DTV1800H:
79a5b9a2 3336 cx88_xc3028_winfast1800h_callback(core, XC2028_TUNER_RESET, 0);
3047a176 3337 break;
111ac84a 3338
8eb79c0b 3339 case CX88_BOARD_WINFAST_DTV1800H_XC4000:
f271a3af 3340 case CX88_BOARD_WINFAST_DTV2000H_PLUS:
84463d5f
IV
3341 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36:
3342 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43:
f271a3af 3343 cx88_xc4000_winfast2000h_plus_callback(core,
3344 XC4000_TUNER_RESET, 0);
3345 break;
3346
111ac84a
SI
3347 case CX88_BOARD_TWINHAN_VP1027_DVBS:
3348 cx_write(MO_GP0_IO, 0x00003230);
3349 cx_write(MO_GP0_IO, 0x00003210);
399426ca 3350 usleep_range(10000, 20000);
111ac84a
SI
3351 cx_write(MO_GP0_IO, 0x00001230);
3352 break;
aa481a65
ST
3353 }
3354}
3355
99e09eac
MCC
3356/*
3357 * Sets board-dependent xc3028 configuration
3358 */
3359void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
3360{
3361 memset(ctl, 0, sizeof(*ctl));
3362
3363 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3364 ctl->max_len = 64;
3365
3366 switch (core->boardnr) {
3367 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
a9606ce6
DG
3368 /* Now works with firmware version 2.7 */
3369 if (core->i2c_algo.udelay < 16)
3370 core->i2c_algo.udelay = 16;
99e09eac
MCC
3371 break;
3372 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3047a176 3373 case CX88_BOARD_WINFAST_DTV1800H:
19c309e3 3374 ctl->demod = XC3028_FE_ZARLINK456;
99e09eac
MCC
3375 break;
3376 case CX88_BOARD_KWORLD_ATSC_120:
3377 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
3378 ctl->demod = XC3028_FE_OREN538;
3379 break;
93b99923 3380 case CX88_BOARD_GENIATECH_X8000_MT:
399426ca
MCC
3381 /*
3382 * FIXME: For this board, the xc3028 never recovers after being
3383 * powered down (the reset GPIO probably is not set properly).
3384 * We don't have access to the hardware so we cannot determine
3385 * which GPIO is used for xc3028, so just disable power xc3028
3386 * power management for now
3387 */
93b99923
DH
3388 ctl->disable_power_mgmt = 1;
3389 break;
14422f9d 3390 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
a31d2bb7 3391 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
99e09eac
MCC
3392 case CX88_BOARD_PROLINK_PV_8000GT:
3393 /*
a31d2bb7 3394 * Those boards uses non-MTS firmware
99e09eac
MCC
3395 */
3396 break;
3f6014fc 3397 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
70101a27 3398 case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
3f6014fc
SV
3399 ctl->demod = XC3028_FE_ZARLINK456;
3400 ctl->mts = 1;
3401 break;
99e09eac
MCC
3402 default:
3403 ctl->demod = XC3028_FE_OREN538;
3404 ctl->mts = 1;
3405 }
3406}
3407EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
3408
bbc83597 3409static void cx88_card_setup(struct cx88_core *core)
1da177e4 3410{
3ca0ea98 3411 static u8 eeprom[256];
4bf1226a 3412 struct tuner_setup tun_setup;
ad020dc2 3413 unsigned int mode_mask = T_RADIO | T_ANALOG_TV;
4bf1226a
MCC
3414
3415 memset(&tun_setup, 0, sizeof(tun_setup));
1da177e4 3416
399426ca 3417 if (!core->i2c_rc) {
1da177e4 3418 core->i2c_client.addr = 0xa0 >> 1;
4bf1226a 3419 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
1da177e4
LT
3420 }
3421
6a59d64c 3422 switch (core->boardnr) {
1da177e4
LT
3423 case CX88_BOARD_HAUPPAUGE:
3424 case CX88_BOARD_HAUPPAUGE_ROSLYN:
399426ca
MCC
3425 if (!core->i2c_rc)
3426 hauppauge_eeprom(core, eeprom + 8);
1da177e4
LT
3427 break;
3428 case CX88_BOARD_GDI:
399426ca 3429 if (!core->i2c_rc)
4bf1226a 3430 gdi_eeprom(core, eeprom);
1da177e4 3431 break;
14422f9d
MCC
3432 case CX88_BOARD_LEADTEK_PVR2000:
3433 case CX88_BOARD_WINFAST_DV2000:
1da177e4 3434 case CX88_BOARD_WINFAST2000XP_EXPERT:
399426ca 3435 if (!core->i2c_rc)
4bf1226a 3436 leadtek_eeprom(core, eeprom);
1da177e4 3437 break;
0fa14aa6
ST
3438 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
3439 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
1da177e4 3440 case CX88_BOARD_HAUPPAUGE_DVB_T1:
611900c1
ST
3441 case CX88_BOARD_HAUPPAUGE_HVR1100:
3442 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
ad10c930 3443 case CX88_BOARD_HAUPPAUGE_HVR3000:
aa481a65 3444 case CX88_BOARD_HAUPPAUGE_HVR1300:
5bd1b663
ST
3445 case CX88_BOARD_HAUPPAUGE_HVR4000:
3446 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
501d8cd4 3447 case CX88_BOARD_HAUPPAUGE_IRONLY:
399426ca 3448 if (!core->i2c_rc)
4bf1226a 3449 hauppauge_eeprom(core, eeprom);
1da177e4 3450 break;
0e0351e3
VC
3451 case CX88_BOARD_KWORLD_DVBS_100:
3452 cx_write(MO_GP0_IO, 0x000007f8);
3453 cx_write(MO_GP1_IO, 0x00000001);
3454 break;
8765561f
CP
3455 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3456 /* GPIO0:0 is hooked to demod reset */
3457 /* GPIO0:4 is hooked to xc3028 reset */
3458 cx_write(MO_GP0_IO, 0x00111100);
399426ca 3459 usleep_range(10000, 20000);
8765561f
CP
3460 cx_write(MO_GP0_IO, 0x00111111);
3461 break;
d536e9c4
CP
3462 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
3463 /* GPIO0:6 is hooked to FX2 reset pin */
3464 cx_set(MO_GP0_IO, 0x00004040);
3465 cx_clear(MO_GP0_IO, 0x00000040);
3466 msleep(1000);
3467 cx_set(MO_GP0_IO, 0x00004040);
3468 /* FALLTHROUGH */
1da177e4
LT
3469 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
3470 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
780dfef3 3471 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
1da177e4
LT
3472 /* GPIO0:0 is hooked to mt352 reset pin */
3473 cx_set(MO_GP0_IO, 0x00000101);
3474 cx_clear(MO_GP0_IO, 0x00000001);
399426ca 3475 usleep_range(10000, 20000);
1da177e4 3476 cx_set(MO_GP0_IO, 0x00000101);
399426ca 3477 if (!core->i2c_rc &&
6a59d64c 3478 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
780dfef3 3479 dvico_fusionhdtv_hybrid_init(core);
1da177e4
LT
3480 break;
3481 case CX88_BOARD_KWORLD_DVB_T:
3482 case CX88_BOARD_DNTV_LIVE_DVB_T:
3483 cx_set(MO_GP0_IO, 0x00000707);
3484 cx_set(MO_GP2_IO, 0x00000101);
3485 cx_clear(MO_GP2_IO, 0x00000001);
399426ca 3486 usleep_range(10000, 20000);
1da177e4
LT
3487 cx_clear(MO_GP0_IO, 0x00000007);
3488 cx_set(MO_GP2_IO, 0x00000101);
3489 break;
fc40b261
CP
3490 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
3491 cx_write(MO_GP0_IO, 0x00080808);
3492 break;
e976f937 3493 case CX88_BOARD_ATI_HDTVWONDER:
399426ca 3494 if (!core->i2c_rc) {
e976f937
KL
3495 /* enable tuner */
3496 int i;
7b61ba8f
MCC
3497 static const u8 buffer[][2] = {
3498 {0x10, 0x12},
3499 {0x13, 0x04},
3500 {0x16, 0x00},
3501 {0x14, 0x04},
3502 {0x17, 0x00}
5b9c4e6d 3503 };
e976f937 3504 core->i2c_client.addr = 0x0a;
e976f937 3505
5b9c4e6d 3506 for (i = 0; i < ARRAY_SIZE(buffer); i++)
399426ca
MCC
3507 if (i2c_master_send(&core->i2c_client,
3508 buffer[i], 2) != 2)
65bc2fe8
MCC
3509 pr_warn("Unable to enable tuner(%i).\n",
3510 i);
e976f937
KL
3511 }
3512 break;
55c88610
MCC
3513 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
3514 {
3515 struct v4l2_priv_tun_config tea5767_cfg;
3516 struct tea5767_ctrl ctl;
3517
3518 memset(&ctl, 0, sizeof(ctl));
3519
3520 ctl.high_cut = 1;
3521 ctl.st_noise = 1;
3522 ctl.deemph_75 = 1;
3523 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
3524
3525 tea5767_cfg.tuner = TUNER_TEA5767;
3526 tea5767_cfg.priv = &ctl;
3527
b8341e1d 3528 call_all(core, tuner, s_config, &tea5767_cfg);
af832623 3529 break;
55c88610 3530 }
e4aab64c 3531 case CX88_BOARD_TEVII_S420:
af832623 3532 case CX88_BOARD_TEVII_S460:
0cb73639 3533 case CX88_BOARD_TEVII_S464:
4cd7fb87 3534 case CX88_BOARD_OMICOM_SS4_PCI:
4b29631d 3535 case CX88_BOARD_TBS_8910:
ee73042c 3536 case CX88_BOARD_TBS_8920:
cd3cde12 3537 case CX88_BOARD_PROF_6200:
57f51dbc 3538 case CX88_BOARD_PROF_7300:
b699c271 3539 case CX88_BOARD_PROF_7301:
4b29631d 3540 case CX88_BOARD_SATTRADE_ST4200:
ad5f74c0
IL
3541 cx_write(MO_GP0_IO, 0x8000);
3542 msleep(100);
ee73042c 3543 cx_write(MO_SRST_IO, 0);
399426ca 3544 usleep_range(10000, 20000);
ad5f74c0 3545 cx_write(MO_GP0_IO, 0x8080);
ee73042c
OR
3546 msleep(100);
3547 cx_write(MO_SRST_IO, 1);
3548 msleep(100);
3549 break;
4bf1226a
MCC
3550 } /*end switch() */
3551
4bf1226a 3552 /* Setup tuners */
399426ca 3553 if (core->board.radio_type != UNSET) {
4bf1226a
MCC
3554 tun_setup.mode_mask = T_RADIO;
3555 tun_setup.type = core->board.radio_type;
3556 tun_setup.addr = core->board.radio_addr;
3557 tun_setup.tuner_callback = cx88_tuner_callback;
b8341e1d 3558 call_all(core, tuner, s_type_addr, &tun_setup);
4bf1226a
MCC
3559 mode_mask &= ~T_RADIO;
3560 }
3561
c39ba330 3562 if (core->board.tuner_type != UNSET) {
4bf1226a
MCC
3563 tun_setup.mode_mask = mode_mask;
3564 tun_setup.type = core->board.tuner_type;
3565 tun_setup.addr = core->board.tuner_addr;
3566 tun_setup.tuner_callback = cx88_tuner_callback;
3567
b8341e1d 3568 call_all(core, tuner, s_type_addr, &tun_setup);
4bf1226a
MCC
3569 }
3570
3571 if (core->board.tda9887_conf) {
3572 struct v4l2_priv_tun_config tda9887_cfg;
3573
3574 tda9887_cfg.tuner = TUNER_TDA9887;
3575 tda9887_cfg.priv = &core->board.tda9887_conf;
3576
b8341e1d 3577 call_all(core, tuner, s_config, &tda9887_cfg);
1da177e4 3578 }
c2cb8fcc
MCC
3579
3580 if (core->board.tuner_type == TUNER_XC2028) {
3581 struct v4l2_priv_tun_config xc2028_cfg;
3582 struct xc2028_ctrl ctl;
3583
99e09eac
MCC
3584 /* Fills device-dependent initialization parameters */
3585 cx88_setup_xc3028(core, &ctl);
c2cb8fcc 3586
99e09eac
MCC
3587 /* Sends parameters to xc2028/3028 tuner */
3588 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
c2cb8fcc
MCC
3589 xc2028_cfg.tuner = TUNER_XC2028;
3590 xc2028_cfg.priv = &ctl;
02615ed5
MCC
3591 dprintk(1, "Asking xc2028/3028 to load firmware %s\n",
3592 ctl.fname);
b8341e1d 3593 call_all(core, tuner, s_config, &xc2028_cfg);
c2cb8fcc 3594 }
622b828a 3595 call_all(core, core, s_power, 0);
1da177e4
LT
3596}
3597
3598/* ------------------------------------------------------------------ */
3599
bbc83597
TP
3600static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
3601{
3602 unsigned int lat = UNSET;
3603 u8 ctrl = 0;
3604 u8 value;
3605
3606 /* check pci quirks */
3607 if (pci_pci_problems & PCIPCI_TRITON) {
65bc2fe8 3608 pr_info("quirk: PCIPCI_TRITON -- set TBFX\n");
bbc83597
TP
3609 ctrl |= CX88X_EN_TBFX;
3610 }
3611 if (pci_pci_problems & PCIPCI_NATOMA) {
65bc2fe8 3612 pr_info("quirk: PCIPCI_NATOMA -- set TBFX\n");
bbc83597
TP
3613 ctrl |= CX88X_EN_TBFX;
3614 }
3615 if (pci_pci_problems & PCIPCI_VIAETBF) {
65bc2fe8 3616 pr_info("quirk: PCIPCI_VIAETBF -- set TBFX\n");
bbc83597
TP
3617 ctrl |= CX88X_EN_TBFX;
3618 }
3619 if (pci_pci_problems & PCIPCI_VSFX) {
65bc2fe8 3620 pr_info("quirk: PCIPCI_VSFX -- set VSFX\n");
bbc83597
TP
3621 ctrl |= CX88X_EN_VSFX;
3622 }
3623#ifdef PCIPCI_ALIMAGIK
3624 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
65bc2fe8 3625 pr_info("quirk: PCIPCI_ALIMAGIK -- latency fixup\n");
bbc83597
TP
3626 lat = 0x0A;
3627 }
3628#endif
3629
3630 /* check insmod options */
7b61ba8f 3631 if (latency != UNSET)
bbc83597
TP
3632 lat = latency;
3633
3634 /* apply stuff */
3635 if (ctrl) {
3636 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
3637 value |= ctrl;
3638 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
3639 }
7b61ba8f 3640 if (lat != UNSET) {
399426ca 3641 pr_info("setting pci latency timer to %d\n", latency);
bbc83597
TP
3642 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
3643 }
3644 return 0;
3645}
3646
3647int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
3648{
7b61ba8f
MCC
3649 if (request_mem_region(pci_resource_start(pci, 0),
3650 pci_resource_len(pci, 0),
bbc83597
TP
3651 core->name))
3652 return 0;
65bc2fe8
MCC
3653 pr_err("func %d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
3654 PCI_FUNC(pci->devfn),
bbc83597
TP
3655 (unsigned long long)pci_resource_start(pci, 0),
3656 pci->subsystem_vendor, pci->subsystem_device);
3657 return -EBUSY;
3658}
3659
399426ca
MCC
3660/*
3661 * Allocate and initialize the cx88 core struct. One should hold the
3662 * devlist mutex before calling this.
3663 */
bbc83597
TP
3664struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3665{
3666 struct cx88_core *core;
3667 int i;
3668
3669 core = kzalloc(sizeof(*core), GFP_KERNEL);
399426ca 3670 if (!core)
fbc0ae20 3671 return NULL;
bbc83597
TP
3672
3673 atomic_inc(&core->refcount);
3674 core->pci_bus = pci->bus->number;
3675 core->pci_slot = PCI_SLOT(pci->devfn);
8ddac9ee
TP
3676 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
3677 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
3678 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
bbc83597
TP
3679 mutex_init(&core->lock);
3680
3681 core->nr = nr;
3682 sprintf(core->name, "cx88[%d]", core->nr);
9467fe12 3683
ccd6f1d4
HV
3684 core->tvnorm = V4L2_STD_NTSC_M;
3685 core->width = 320;
3686 core->height = 240;
3687 core->field = V4L2_FIELD_INTERLACED;
3688
9467fe12
HV
3689 strcpy(core->v4l2_dev.name, core->name);
3690 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
3691 kfree(core);
3692 return NULL;
3693 }
3694
8c7cb12a
HV
3695 if (v4l2_ctrl_handler_init(&core->video_hdl, 13)) {
3696 v4l2_device_unregister(&core->v4l2_dev);
3697 kfree(core);
3698 return NULL;
3699 }
3700
3701 if (v4l2_ctrl_handler_init(&core->audio_hdl, 13)) {
3702 v4l2_ctrl_handler_free(&core->video_hdl);
bac63981
HV
3703 v4l2_device_unregister(&core->v4l2_dev);
3704 kfree(core);
3705 return NULL;
3706 }
3707
7b61ba8f 3708 if (cx88_get_resources(core, pci) != 0) {
8c7cb12a
HV
3709 v4l2_ctrl_handler_free(&core->video_hdl);
3710 v4l2_ctrl_handler_free(&core->audio_hdl);
9467fe12 3711 v4l2_device_unregister(&core->v4l2_dev);
bbc83597
TP
3712 kfree(core);
3713 return NULL;
3714 }
3715
3716 /* PCI stuff */
3717 cx88_pci_quirks(core->name, pci);
3718 core->lmmio = ioremap(pci_resource_start(pci, 0),
3719 pci_resource_len(pci, 0));
3720 core->bmmio = (u8 __iomem *)core->lmmio;
3721
399426ca 3722 if (!core->lmmio) {
bac63981 3723 release_mem_region(pci_resource_start(pci, 0),
399426ca 3724 pci_resource_len(pci, 0));
8c7cb12a
HV
3725 v4l2_ctrl_handler_free(&core->video_hdl);
3726 v4l2_ctrl_handler_free(&core->audio_hdl);
bac63981 3727 v4l2_device_unregister(&core->v4l2_dev);
fbc0ae20
AC
3728 kfree(core);
3729 return NULL;
3730 }
3731
bbc83597
TP
3732 /* board config */
3733 core->boardnr = UNSET;
3734 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
3735 core->boardnr = card[core->nr];
399426ca 3736 for (i = 0; core->boardnr == UNSET && i < ARRAY_SIZE(cx88_subids); i++)
bbc83597
TP
3737 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
3738 pci->subsystem_device == cx88_subids[i].subdevice)
3739 core->boardnr = cx88_subids[i].card;
7b61ba8f 3740 if (core->boardnr == UNSET) {
bbc83597
TP
3741 core->boardnr = CX88_BOARD_UNKNOWN;
3742 cx88_card_list(core, pci);
3743 }
3744
b5237747 3745 core->board = cx88_boards[core->boardnr];
bbc83597 3746
3007703d
MCC
3747 if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
3748 core->board.num_frontends = 1;
363c35fc 3749
65bc2fe8 3750 pr_info("subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
0f19e65b 3751 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
bbc83597 3752 core->boardnr, card[core->nr] == core->boardnr ?
363c35fc
ST
3753 "insmod option" : "autodetected",
3754 core->board.num_frontends);
bbc83597
TP
3755
3756 if (tuner[core->nr] != UNSET)
3757 core->board.tuner_type = tuner[core->nr];
3758 if (radio[core->nr] != UNSET)
3759 core->board.radio_type = radio[core->nr];
3760
02615ed5
MCC
3761 dprintk(1, "TV tuner type %d, Radio tuner type %d\n",
3762 core->board.tuner_type, core->board.radio_type);
bbc83597
TP
3763
3764 /* init hardware */
3765 cx88_reset(core);
3766 cx88_card_setup_pre_i2c(core);
3767 cx88_i2c_init(core, pci);
189bf5f0
MCC
3768
3769 /* load tuner module, if needed */
7b61ba8f 3770 if (core->board.tuner_type != UNSET) {
399426ca
MCC
3771 /*
3772 * Ignore 0x6b and 0x6f on cx88 boards.
43d5eab7 3773 * FusionHDTV5 RT Gold has an ir receiver at 0x6b
399426ca
MCC
3774 * and an RTC at 0x6f which can get corrupted if probed.
3775 */
43d5eab7
HV
3776 static const unsigned short tv_addrs[] = {
3777 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
3778 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
3779 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
3780 I2C_CLIENT_END
3781 };
b8341e1d
HV
3782 int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
3783
399426ca
MCC
3784 /*
3785 * I don't trust the radio_type as is stored in the card
3786 * definitions, so we just probe for it.
3787 * The radio_type is sometimes missing, or set to UNSET but
3788 * later code configures a tea5767.
b8341e1d 3789 */
53dacb15 3790 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
399426ca
MCC
3791 "tuner", 0,
3792 v4l2_i2c_tuner_addrs(ADDRS_RADIO));
b8341e1d 3793 if (has_demod)
53dacb15 3794 v4l2_i2c_new_subdev(&core->v4l2_dev,
399426ca 3795 &core->i2c_adap, "tuner",
53dacb15 3796 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
b8341e1d 3797 if (core->board.tuner_addr == ADDR_UNSET) {
53dacb15 3798 v4l2_i2c_new_subdev(&core->v4l2_dev,
399426ca 3799 &core->i2c_adap, "tuner",
53dacb15 3800 0, has_demod ? tv_addrs + 4 : tv_addrs);
b8341e1d 3801 } else {
e6574f2f 3802 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
399426ca
MCC
3803 "tuner", core->board.tuner_addr,
3804 NULL);
b8341e1d
HV
3805 }
3806 }
189bf5f0 3807
bbc83597 3808 cx88_card_setup(core);
89c3bc78
JD
3809 if (!disable_ir) {
3810 cx88_i2c_init_ir(core);
3811 cx88_ir_init(core, pci);
3812 }
bbc83597
TP
3813
3814 return core;
3815}