V4L/DVB (4669): Cx88: autodetect Club3D Zap TV2100 by subsystem id 12ab:2300
[deliverable/linux.git] / drivers / media / video / cx88 / cx88-cards.c
CommitLineData
1da177e4 1/*
1da177e4
LT
2 *
3 * device driver for Conexant 2388x based TV cards
4 * card-specific stuff.
5 *
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23#include <linux/init.h>
24#include <linux/module.h>
25#include <linux/pci.h>
26#include <linux/delay.h>
27
28#include "cx88.h"
29
30/* ------------------------------------------------------------------ */
31/* board config info */
32
33struct cx88_board cx88_boards[] = {
34 [CX88_BOARD_UNKNOWN] = {
35 .name = "UNKNOWN/GENERIC",
36 .tuner_type = UNSET,
b45009b0
MCC
37 .radio_type = UNSET,
38 .tuner_addr = ADDR_UNSET,
39 .radio_addr = ADDR_UNSET,
1da177e4
LT
40 .input = {{
41 .type = CX88_VMUX_COMPOSITE1,
42 .vmux = 0,
43 },{
44 .type = CX88_VMUX_COMPOSITE2,
45 .vmux = 1,
46 },{
47 .type = CX88_VMUX_COMPOSITE3,
48 .vmux = 2,
49 },{
50 .type = CX88_VMUX_COMPOSITE4,
51 .vmux = 3,
52 }},
53 },
54 [CX88_BOARD_HAUPPAUGE] = {
55 .name = "Hauppauge WinTV 34xxx models",
56 .tuner_type = UNSET,
b45009b0
MCC
57 .radio_type = UNSET,
58 .tuner_addr = ADDR_UNSET,
59 .radio_addr = ADDR_UNSET,
1da177e4
LT
60 .tda9887_conf = TDA9887_PRESENT,
61 .input = {{
62 .type = CX88_VMUX_TELEVISION,
63 .vmux = 0,
64 .gpio0 = 0xff00, // internal decoder
65 },{
66 .type = CX88_VMUX_DEBUG,
67 .vmux = 0,
68 .gpio0 = 0xff01, // mono from tuner chip
69 },{
70 .type = CX88_VMUX_COMPOSITE1,
71 .vmux = 1,
72 .gpio0 = 0xff02,
73 },{
74 .type = CX88_VMUX_SVIDEO,
75 .vmux = 2,
76 .gpio0 = 0xff02,
77 }},
78 .radio = {
79 .type = CX88_RADIO,
80 .gpio0 = 0xff01,
81 },
82 },
83 [CX88_BOARD_GDI] = {
84 .name = "GDI Black Gold",
85 .tuner_type = UNSET,
b45009b0
MCC
86 .radio_type = UNSET,
87 .tuner_addr = ADDR_UNSET,
88 .radio_addr = ADDR_UNSET,
1da177e4
LT
89 .input = {{
90 .type = CX88_VMUX_TELEVISION,
91 .vmux = 0,
fd3113e8
MCC
92 },{
93 .type = CX88_VMUX_SVIDEO,
94 .vmux = 2,
1da177e4
LT
95 }},
96 },
97 [CX88_BOARD_PIXELVIEW] = {
98 .name = "PixelView",
b45009b0
MCC
99 .tuner_type = TUNER_PHILIPS_PAL,
100 .radio_type = UNSET,
101 .tuner_addr = ADDR_UNSET,
102 .radio_addr = ADDR_UNSET,
1da177e4
LT
103 .input = {{
104 .type = CX88_VMUX_TELEVISION,
105 .vmux = 0,
106 .gpio0 = 0xff00, // internal decoder
107 },{
108 .type = CX88_VMUX_COMPOSITE1,
109 .vmux = 1,
110 },{
111 .type = CX88_VMUX_SVIDEO,
112 .vmux = 2,
113 }},
114 .radio = {
115 .type = CX88_RADIO,
116 .gpio0 = 0xff10,
47ee2f38 117 },
1da177e4
LT
118 },
119 [CX88_BOARD_ATI_WONDER_PRO] = {
120 .name = "ATI TV Wonder Pro",
b45009b0
MCC
121 .tuner_type = TUNER_PHILIPS_4IN1,
122 .radio_type = UNSET,
123 .tuner_addr = ADDR_UNSET,
124 .radio_addr = ADDR_UNSET,
1da177e4
LT
125 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
126 .input = {{
127 .type = CX88_VMUX_TELEVISION,
128 .vmux = 0,
4ac97914 129 .gpio0 = 0x03ff,
1da177e4
LT
130 },{
131 .type = CX88_VMUX_COMPOSITE1,
132 .vmux = 1,
4ac97914 133 .gpio0 = 0x03fe,
1da177e4
LT
134 },{
135 .type = CX88_VMUX_SVIDEO,
136 .vmux = 2,
4ac97914 137 .gpio0 = 0x03fe,
1da177e4
LT
138 }},
139 },
4ac97914
MCC
140 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
141 .name = "Leadtek Winfast 2000XP Expert",
142 .tuner_type = TUNER_PHILIPS_4IN1,
b45009b0
MCC
143 .radio_type = UNSET,
144 .tuner_addr = ADDR_UNSET,
145 .radio_addr = ADDR_UNSET,
1da177e4 146 .tda9887_conf = TDA9887_PRESENT,
4ac97914
MCC
147 .input = {{
148 .type = CX88_VMUX_TELEVISION,
149 .vmux = 0,
1da177e4
LT
150 .gpio0 = 0x00F5e700,
151 .gpio1 = 0x00003004,
152 .gpio2 = 0x00F5e700,
153 .gpio3 = 0x02000000,
154 },{
155 .type = CX88_VMUX_COMPOSITE1,
156 .vmux = 1,
157 .gpio0 = 0x00F5c700,
158 .gpio1 = 0x00003004,
159 .gpio2 = 0x00F5c700,
160 .gpio3 = 0x02000000,
161 },{
162 .type = CX88_VMUX_SVIDEO,
163 .vmux = 2,
164 .gpio0 = 0x00F5c700,
165 .gpio1 = 0x00003004,
166 .gpio2 = 0x00F5c700,
167 .gpio3 = 0x02000000,
4ac97914
MCC
168 }},
169 .radio = {
170 .type = CX88_RADIO,
1da177e4
LT
171 .gpio0 = 0x00F5d700,
172 .gpio1 = 0x00003004,
173 .gpio2 = 0x00F5d700,
174 .gpio3 = 0x02000000,
4ac97914
MCC
175 },
176 },
7418f346 177 [CX88_BOARD_AVERTV_STUDIO_303] = {
1da177e4 178 .name = "AverTV Studio 303 (M126)",
b45009b0
MCC
179 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
180 .radio_type = UNSET,
181 .tuner_addr = ADDR_UNSET,
182 .radio_addr = ADDR_UNSET,
1da177e4
LT
183 .tda9887_conf = TDA9887_PRESENT,
184 .input = {{
185 .type = CX88_VMUX_TELEVISION,
186 .vmux = 0,
4aca4831 187 .gpio1 = 0xe09f,
1da177e4
LT
188 },{
189 .type = CX88_VMUX_COMPOSITE1,
190 .vmux = 1,
4aca4831 191 .gpio1 = 0xe05f,
1da177e4
LT
192 },{
193 .type = CX88_VMUX_SVIDEO,
194 .vmux = 2,
4aca4831 195 .gpio1 = 0xe05f,
1da177e4
LT
196 }},
197 .radio = {
4aca4831 198 .gpio1 = 0xe0df,
1da177e4
LT
199 .type = CX88_RADIO,
200 },
201 },
202 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
203 // added gpio values thanks to Michal
204 // values for PAL from DScaler
205 .name = "MSI TV-@nywhere Master",
b45009b0
MCC
206 .tuner_type = TUNER_MT2032,
207 .radio_type = UNSET,
208 .tuner_addr = ADDR_UNSET,
209 .radio_addr = ADDR_UNSET,
3ae1adc6 210 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
1da177e4
LT
211 .input = {{
212 .type = CX88_VMUX_TELEVISION,
213 .vmux = 0,
214 .gpio0 = 0x000040bf,
215 .gpio1 = 0x000080c0,
216 .gpio2 = 0x0000ff40,
217 },{
4ac97914
MCC
218 .type = CX88_VMUX_COMPOSITE1,
219 .vmux = 1,
1da177e4
LT
220 .gpio0 = 0x000040bf,
221 .gpio1 = 0x000080c0,
222 .gpio2 = 0x0000ff40,
223 },{
4ac97914
MCC
224 .type = CX88_VMUX_SVIDEO,
225 .vmux = 2,
1da177e4
LT
226 .gpio0 = 0x000040bf,
227 .gpio1 = 0x000080c0,
228 .gpio2 = 0x0000ff40,
4ac97914
MCC
229 }},
230 .radio = {
1da177e4 231 .type = CX88_RADIO,
4ac97914 232 },
1da177e4
LT
233 },
234 [CX88_BOARD_WINFAST_DV2000] = {
4ac97914
MCC
235 .name = "Leadtek Winfast DV2000",
236 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
b45009b0
MCC
237 .radio_type = UNSET,
238 .tuner_addr = ADDR_UNSET,
239 .radio_addr = ADDR_UNSET,
1da177e4 240 .tda9887_conf = TDA9887_PRESENT,
4ac97914
MCC
241 .input = {{
242 .type = CX88_VMUX_TELEVISION,
243 .vmux = 0,
1da177e4
LT
244 .gpio0 = 0x0035e700,
245 .gpio1 = 0x00003004,
246 .gpio2 = 0x0035e700,
247 .gpio3 = 0x02000000,
248 },{
249
250 .type = CX88_VMUX_COMPOSITE1,
251 .vmux = 1,
252 .gpio0 = 0x0035c700,
253 .gpio1 = 0x00003004,
254 .gpio2 = 0x0035c700,
255 .gpio3 = 0x02000000,
256 },{
257 .type = CX88_VMUX_SVIDEO,
258 .vmux = 2,
259 .gpio0 = 0x0035c700,
260 .gpio1 = 0x0035c700,
261 .gpio2 = 0x02000000,
262 .gpio3 = 0x02000000,
263 }},
4ac97914 264 .radio = {
1da177e4
LT
265 .type = CX88_RADIO,
266 .gpio0 = 0x0035d700,
267 .gpio1 = 0x00007004,
268 .gpio2 = 0x0035d700,
269 .gpio3 = 0x02000000,
47ee2f38 270 },
4ac97914 271 },
b45009b0 272 [CX88_BOARD_LEADTEK_PVR2000] = {
1da177e4 273 // gpio values for PAL version from regspy by DScaler
b45009b0
MCC
274 .name = "Leadtek PVR 2000",
275 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
276 .radio_type = UNSET,
277 .tuner_addr = ADDR_UNSET,
278 .radio_addr = ADDR_UNSET,
1da177e4 279 .tda9887_conf = TDA9887_PRESENT,
b45009b0
MCC
280 .input = {{
281 .type = CX88_VMUX_TELEVISION,
282 .vmux = 0,
283 .gpio0 = 0x0000bde2,
284 },{
285 .type = CX88_VMUX_COMPOSITE1,
286 .vmux = 1,
287 .gpio0 = 0x0000bde6,
288 },{
289 .type = CX88_VMUX_SVIDEO,
290 .vmux = 2,
291 .gpio0 = 0x0000bde6,
292 }},
293 .radio = {
294 .type = CX88_RADIO,
295 .gpio0 = 0x0000bd62,
296 },
48d5e803 297 .mpeg = CX88_MPEG_BLACKBIRD,
b45009b0 298 },
1da177e4 299 [CX88_BOARD_IODATA_GVVCP3PCI] = {
4ac97914 300 .name = "IODATA GV-VCP3/PCI",
1da177e4 301 .tuner_type = TUNER_ABSENT,
4ac97914 302 .radio_type = UNSET,
b45009b0
MCC
303 .tuner_addr = ADDR_UNSET,
304 .radio_addr = ADDR_UNSET,
305 .input = {{
4ac97914
MCC
306 .type = CX88_VMUX_COMPOSITE1,
307 .vmux = 0,
308 },{
309 .type = CX88_VMUX_COMPOSITE2,
310 .vmux = 1,
311 },{
312 .type = CX88_VMUX_SVIDEO,
313 .vmux = 2,
314 }},
315 },
1da177e4 316 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
4ac97914
MCC
317 .name = "Prolink PlayTV PVR",
318 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
b45009b0
MCC
319 .radio_type = UNSET,
320 .tuner_addr = ADDR_UNSET,
321 .radio_addr = ADDR_UNSET,
1da177e4
LT
322 .tda9887_conf = TDA9887_PRESENT,
323 .input = {{
324 .type = CX88_VMUX_TELEVISION,
325 .vmux = 0,
fc34f165 326 .gpio0 = 0xbff0,
1da177e4
LT
327 },{
328 .type = CX88_VMUX_COMPOSITE1,
329 .vmux = 1,
fc34f165 330 .gpio0 = 0xbff3,
1da177e4
LT
331 },{
332 .type = CX88_VMUX_SVIDEO,
333 .vmux = 2,
fc34f165 334 .gpio0 = 0xbff3,
1da177e4
LT
335 }},
336 .radio = {
337 .type = CX88_RADIO,
fc34f165 338 .gpio0 = 0xbff0,
1da177e4
LT
339 },
340 },
341 [CX88_BOARD_ASUS_PVR_416] = {
342 .name = "ASUS PVR-416",
b45009b0
MCC
343 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
344 .radio_type = UNSET,
345 .tuner_addr = ADDR_UNSET,
346 .radio_addr = ADDR_UNSET,
347 .tda9887_conf = TDA9887_PRESENT,
1da177e4
LT
348 .input = {{
349 .type = CX88_VMUX_TELEVISION,
350 .vmux = 0,
351 .gpio0 = 0x0000fde6,
4ac97914 352 },{
1da177e4
LT
353 .type = CX88_VMUX_SVIDEO,
354 .vmux = 2,
355 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
356 }},
4ac97914
MCC
357 .radio = {
358 .type = CX88_RADIO,
1da177e4 359 .gpio0 = 0x0000fde2,
4ac97914 360 },
48d5e803 361 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
362 },
363 [CX88_BOARD_MSI_TVANYWHERE] = {
364 .name = "MSI TV-@nywhere",
b45009b0
MCC
365 .tuner_type = TUNER_MT2032,
366 .radio_type = UNSET,
367 .tuner_addr = ADDR_UNSET,
368 .radio_addr = ADDR_UNSET,
1da177e4
LT
369 .tda9887_conf = TDA9887_PRESENT,
370 .input = {{
371 .type = CX88_VMUX_TELEVISION,
372 .vmux = 0,
373 .gpio0 = 0x00000fbf,
374 .gpio2 = 0x0000fc08,
375 },{
4ac97914
MCC
376 .type = CX88_VMUX_COMPOSITE1,
377 .vmux = 1,
1da177e4
LT
378 .gpio0 = 0x00000fbf,
379 .gpio2 = 0x0000fc68,
380 },{
4ac97914
MCC
381 .type = CX88_VMUX_SVIDEO,
382 .vmux = 2,
1da177e4
LT
383 .gpio0 = 0x00000fbf,
384 .gpio2 = 0x0000fc68,
4ac97914 385 }},
1da177e4 386 },
4ac97914
MCC
387 [CX88_BOARD_KWORLD_DVB_T] = {
388 .name = "KWorld/VStream XPert DVB-T",
1da177e4 389 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
390 .radio_type = UNSET,
391 .tuner_addr = ADDR_UNSET,
392 .radio_addr = ADDR_UNSET,
4ac97914
MCC
393 .input = {{
394 .type = CX88_VMUX_COMPOSITE1,
395 .vmux = 1,
1da177e4
LT
396 .gpio0 = 0x0700,
397 .gpio2 = 0x0101,
4ac97914
MCC
398 },{
399 .type = CX88_VMUX_SVIDEO,
400 .vmux = 2,
1da177e4
LT
401 .gpio0 = 0x0700,
402 .gpio2 = 0x0101,
4ac97914 403 }},
48d5e803 404 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
405 },
406 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
a82decf6 407 .name = "DViCO FusionHDTV DVB-T1",
1da177e4 408 .tuner_type = TUNER_ABSENT, /* No analog tuner */
b45009b0
MCC
409 .radio_type = UNSET,
410 .tuner_addr = ADDR_UNSET,
411 .radio_addr = ADDR_UNSET,
1da177e4
LT
412 .input = {{
413 .type = CX88_VMUX_COMPOSITE1,
414 .vmux = 1,
415 .gpio0 = 0x000027df,
47ee2f38 416 },{
1da177e4
LT
417 .type = CX88_VMUX_SVIDEO,
418 .vmux = 2,
419 .gpio0 = 0x000027df,
420 }},
48d5e803 421 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
422 },
423 [CX88_BOARD_KWORLD_LTV883] = {
424 .name = "KWorld LTV883RF",
b45009b0
MCC
425 .tuner_type = TUNER_TNF_8831BGFF,
426 .radio_type = UNSET,
427 .tuner_addr = ADDR_UNSET,
428 .radio_addr = ADDR_UNSET,
4ac97914
MCC
429 .input = {{
430 .type = CX88_VMUX_TELEVISION,
431 .vmux = 0,
432 .gpio0 = 0x07f8,
1da177e4
LT
433 },{
434 .type = CX88_VMUX_DEBUG,
435 .vmux = 0,
436 .gpio0 = 0x07f9, // mono from tuner chip
4ac97914
MCC
437 },{
438 .type = CX88_VMUX_COMPOSITE1,
439 .vmux = 1,
440 .gpio0 = 0x000007fa,
441 },{
442 .type = CX88_VMUX_SVIDEO,
443 .vmux = 2,
444 .gpio0 = 0x000007fa,
445 }},
446 .radio = {
447 .type = CX88_RADIO,
448 .gpio0 = 0x000007f8,
449 },
1da177e4 450 },
a82decf6
MCC
451 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
452 .name = "DViCO FusionHDTV 3 Gold-Q",
1da177e4 453 .tuner_type = TUNER_MICROTUNE_4042FI5,
b45009b0
MCC
454 .radio_type = UNSET,
455 .tuner_addr = ADDR_UNSET,
456 .radio_addr = ADDR_UNSET,
1da177e4
LT
457 /*
458 GPIO[0] resets DT3302 DTV receiver
459 0 - reset asserted
460 1 - normal operation
461 GPIO[1] mutes analog audio output connector
462 0 - enable selected source
463 1 - mute
464 GPIO[2] selects source for analog audio output connector
465 0 - analog audio input connector on tab
466 1 - analog DAC output from CX23881 chip
467 GPIO[3] selects RF input connector on tuner module
468 0 - RF connector labeled CABLE
469 1 - RF connector labeled ANT
a82decf6
MCC
470 GPIO[4] selects high RF for QAM256 mode
471 0 - normal RF
472 1 - high RF
1da177e4
LT
473 */
474 .input = {{
475 .type = CX88_VMUX_TELEVISION,
476 .vmux = 0,
477 .gpio0 = 0x0f0d,
478 },{
479 .type = CX88_VMUX_CABLE,
480 .vmux = 0,
481 .gpio0 = 0x0f05,
482 },{
483 .type = CX88_VMUX_COMPOSITE1,
484 .vmux = 1,
485 .gpio0 = 0x0f00,
486 },{
487 .type = CX88_VMUX_SVIDEO,
488 .vmux = 2,
489 .gpio0 = 0x0f00,
490 }},
48d5e803 491 .mpeg = CX88_MPEG_DVB,
1da177e4 492 },
4ac97914 493 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
b45009b0 494 .name = "Hauppauge Nova-T DVB-T",
1da177e4 495 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
496 .radio_type = UNSET,
497 .tuner_addr = ADDR_UNSET,
498 .radio_addr = ADDR_UNSET,
499 .input = {{
4ac97914
MCC
500 .type = CX88_VMUX_DVB,
501 .vmux = 0,
502 }},
48d5e803 503 .mpeg = CX88_MPEG_DVB,
1da177e4 504 },
4ac97914 505 [CX88_BOARD_CONEXANT_DVB_T1] = {
1da177e4
LT
506 .name = "Conexant DVB-T reference design",
507 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
508 .radio_type = UNSET,
509 .tuner_addr = ADDR_UNSET,
510 .radio_addr = ADDR_UNSET,
4ac97914
MCC
511 .input = {{
512 .type = CX88_VMUX_DVB,
513 .vmux = 0,
514 }},
48d5e803 515 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
516 },
517 [CX88_BOARD_PROVIDEO_PV259] = {
518 .name = "Provideo PV259",
519 .tuner_type = TUNER_PHILIPS_FQ1216ME,
b45009b0
MCC
520 .radio_type = UNSET,
521 .tuner_addr = ADDR_UNSET,
522 .radio_addr = ADDR_UNSET,
1da177e4
LT
523 .input = {{
524 .type = CX88_VMUX_TELEVISION,
525 .vmux = 0,
526 }},
48d5e803 527 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
528 },
529 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
a82decf6 530 .name = "DViCO FusionHDTV DVB-T Plus",
1da177e4 531 .tuner_type = TUNER_ABSENT, /* No analog tuner */
b45009b0
MCC
532 .radio_type = UNSET,
533 .tuner_addr = ADDR_UNSET,
534 .radio_addr = ADDR_UNSET,
1da177e4
LT
535 .input = {{
536 .type = CX88_VMUX_COMPOSITE1,
537 .vmux = 1,
538 .gpio0 = 0x000027df,
47ee2f38 539 },{
1da177e4
LT
540 .type = CX88_VMUX_SVIDEO,
541 .vmux = 2,
542 .gpio0 = 0x000027df,
543 }},
48d5e803 544 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
545 },
546 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
4ac97914 547 .name = "digitalnow DNTV Live! DVB-T",
1da177e4 548 .tuner_type = TUNER_ABSENT,
b45009b0
MCC
549 .radio_type = UNSET,
550 .tuner_addr = ADDR_UNSET,
551 .radio_addr = ADDR_UNSET,
4ac97914 552 .input = {{
1da177e4
LT
553 .type = CX88_VMUX_COMPOSITE1,
554 .vmux = 1,
555 .gpio0 = 0x00000700,
556 .gpio2 = 0x00000101,
557 },{
558 .type = CX88_VMUX_SVIDEO,
559 .vmux = 2,
560 .gpio0 = 0x00000700,
561 .gpio2 = 0x00000101,
562 }},
48d5e803 563 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
564 },
565 [CX88_BOARD_PCHDTV_HD3000] = {
566 .name = "pcHDTV HD3000 HDTV",
9175b854 567 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
568 .radio_type = UNSET,
569 .tuner_addr = ADDR_UNSET,
570 .radio_addr = ADDR_UNSET,
e4f5c82a 571 .tda9887_conf = TDA9887_PRESENT,
1da177e4
LT
572 .input = {{
573 .type = CX88_VMUX_TELEVISION,
574 .vmux = 0,
575 .gpio0 = 0x00008484,
576 .gpio1 = 0x00000000,
577 .gpio2 = 0x00000000,
578 .gpio3 = 0x00000000,
579 },{
580 .type = CX88_VMUX_COMPOSITE1,
581 .vmux = 1,
582 .gpio0 = 0x00008400,
583 .gpio1 = 0x00000000,
584 .gpio2 = 0x00000000,
585 .gpio3 = 0x00000000,
586 },{
587 .type = CX88_VMUX_SVIDEO,
588 .vmux = 2,
589 .gpio0 = 0x00008400,
590 .gpio1 = 0x00000000,
591 .gpio2 = 0x00000000,
592 .gpio3 = 0x00000000,
593 }},
594 .radio = {
595 .type = CX88_RADIO,
596 .vmux = 2,
597 .gpio0 = 0x00008400,
598 .gpio1 = 0x00000000,
599 .gpio2 = 0x00000000,
600 .gpio3 = 0x00000000,
601 },
48d5e803 602 .mpeg = CX88_MPEG_DVB,
1da177e4
LT
603 },
604 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
605 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
606 // GPIO values obtained from regspy, courtesy Sean Covel
b45009b0
MCC
607 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
608 .tuner_type = UNSET,
609 .radio_type = UNSET,
610 .tuner_addr = ADDR_UNSET,
611 .radio_addr = ADDR_UNSET,
1da177e4
LT
612 .input = {{
613 .type = CX88_VMUX_TELEVISION,
614 .vmux = 0,
0345c387 615 .gpio0 = 0xed1a,
1da177e4
LT
616 .gpio2 = 0x00ff,
617 },{
618 .type = CX88_VMUX_DEBUG,
619 .vmux = 0,
0345c387 620 .gpio0 = 0xff01,
1da177e4
LT
621 },{
622 .type = CX88_VMUX_COMPOSITE1,
623 .vmux = 1,
624 .gpio0 = 0xff02,
625 },{
626 .type = CX88_VMUX_SVIDEO,
627 .vmux = 2,
628 .gpio0 = 0xed92,
629 .gpio2 = 0x00ff,
630 }},
631 .radio = {
632 .type = CX88_RADIO,
633 .gpio0 = 0xed96,
634 .gpio2 = 0x00ff,
635 },
48d5e803 636 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
637 },
638 [CX88_BOARD_DIGITALLOGIC_MEC] = {
1da177e4 639 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
b45009b0
MCC
640 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
641 .radio_type = UNSET,
642 .tuner_addr = ADDR_UNSET,
643 .radio_addr = ADDR_UNSET,
1da177e4
LT
644 .tda9887_conf = TDA9887_PRESENT,
645 .input = {{
646 .type = CX88_VMUX_TELEVISION,
647 .vmux = 0,
b45009b0 648 .gpio0 = 0x00009d80,
1da177e4
LT
649 },{
650 .type = CX88_VMUX_COMPOSITE1,
651 .vmux = 1,
b45009b0 652 .gpio0 = 0x00009d76,
1da177e4
LT
653 },{
654 .type = CX88_VMUX_SVIDEO,
655 .vmux = 2,
b45009b0 656 .gpio0 = 0x00009d76,
1da177e4
LT
657 }},
658 .radio = {
659 .type = CX88_RADIO,
b45009b0 660 .gpio0 = 0x00009d00,
1da177e4 661 },
48d5e803 662 .mpeg = CX88_MPEG_BLACKBIRD,
1da177e4
LT
663 },
664 [CX88_BOARD_IODATA_GVBCTV7E] = {
665 .name = "IODATA GV/BCTV7E",
666 .tuner_type = TUNER_PHILIPS_FQ1286,
b45009b0
MCC
667 .radio_type = UNSET,
668 .tuner_addr = ADDR_UNSET,
669 .radio_addr = ADDR_UNSET,
1da177e4
LT
670 .tda9887_conf = TDA9887_PRESENT,
671 .input = {{
672 .type = CX88_VMUX_TELEVISION,
673 .vmux = 1,
674 .gpio1 = 0x0000e03f,
675 },{
676 .type = CX88_VMUX_COMPOSITE1,
677 .vmux = 2,
678 .gpio1 = 0x0000e07f,
679 },{
680 .type = CX88_VMUX_SVIDEO,
681 .vmux = 3,
682 .gpio1 = 0x0000e07f,
683 }}
684 },
239df2e2
MC
685 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
686 .name = "PixelView PlayTV Ultra Pro (Stereo)",
b45009b0
MCC
687 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
688 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
c5287ba1
MCC
689 .radio_type = UNSET,
690 .tuner_addr = ADDR_UNSET,
691 .radio_addr = ADDR_UNSET,
239df2e2
MC
692 .input = {{
693 .type = CX88_VMUX_TELEVISION,
694 .vmux = 0,
b45009b0 695 .gpio0 = 0xbf61, /* internal decoder */
239df2e2
MC
696 },{
697 .type = CX88_VMUX_COMPOSITE1,
698 .vmux = 1,
b45009b0 699 .gpio0 = 0xbf63,
239df2e2
MC
700 },{
701 .type = CX88_VMUX_SVIDEO,
702 .vmux = 2,
b45009b0 703 .gpio0 = 0xbf63,
239df2e2
MC
704 }},
705 .radio = {
b45009b0
MCC
706 .type = CX88_RADIO,
707 .gpio0 = 0xbf60,
708 },
239df2e2 709 },
4ac97914 710 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
a82decf6 711 .name = "DViCO FusionHDTV 3 Gold-T",
83ac8722 712 .tuner_type = TUNER_THOMSON_DTT761X,
b45009b0
MCC
713 .radio_type = UNSET,
714 .tuner_addr = ADDR_UNSET,
715 .radio_addr = ADDR_UNSET,
e4f5c82a 716 .tda9887_conf = TDA9887_PRESENT,
a82decf6 717 .input = {{
4ac97914
MCC
718 .type = CX88_VMUX_TELEVISION,
719 .vmux = 0,
720 .gpio0 = 0x97ed,
721 },{
722 .type = CX88_VMUX_COMPOSITE1,
723 .vmux = 1,
724 .gpio0 = 0x97e9,
725 },{
726 .type = CX88_VMUX_SVIDEO,
727 .vmux = 2,
728 .gpio0 = 0x97e9,
729 }},
48d5e803 730 .mpeg = CX88_MPEG_DVB,
4ac97914
MCC
731 },
732 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
733 .name = "ADS Tech Instant TV DVB-T PCI",
a82decf6
MCC
734 .tuner_type = TUNER_ABSENT,
735 .radio_type = UNSET,
736 .tuner_addr = ADDR_UNSET,
737 .radio_addr = ADDR_UNSET,
738 .input = {{
4ac97914
MCC
739 .type = CX88_VMUX_COMPOSITE1,
740 .vmux = 1,
a82decf6
MCC
741 .gpio0 = 0x0700,
742 .gpio2 = 0x0101,
4ac97914
MCC
743 },{
744 .type = CX88_VMUX_SVIDEO,
745 .vmux = 2,
a82decf6
MCC
746 .gpio0 = 0x0700,
747 .gpio2 = 0x0101,
4ac97914 748 }},
48d5e803 749 .mpeg = CX88_MPEG_DVB,
a82decf6 750 },
e057ee11
MK
751 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
752 .name = "TerraTec Cinergy 1400 DVB-T",
753 .tuner_type = TUNER_ABSENT,
754 .input = {{
755 .type = CX88_VMUX_DVB,
756 .vmux = 0,
757 }},
48d5e803 758 .mpeg = CX88_MPEG_DVB,
e057ee11 759 },
9fef07ca
MK
760 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
761 .name = "DViCO FusionHDTV 5 Gold",
9c26c8b1 762 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
9fef07ca
MK
763 .radio_type = UNSET,
764 .tuner_addr = ADDR_UNSET,
765 .radio_addr = ADDR_UNSET,
e52e98a7 766 .tda9887_conf = TDA9887_PRESENT,
9fef07ca 767 .input = {{
4ac97914
MCC
768 .type = CX88_VMUX_TELEVISION,
769 .vmux = 0,
770 .gpio0 = 0x87fd,
771 },{
772 .type = CX88_VMUX_COMPOSITE1,
773 .vmux = 1,
774 .gpio0 = 0x87f9,
775 },{
776 .type = CX88_VMUX_SVIDEO,
777 .vmux = 2,
778 .gpio0 = 0x87f9,
779 }},
48d5e803 780 .mpeg = CX88_MPEG_DVB,
9fef07ca 781 },
d45170ed
NS
782 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
783 .name = "AverMedia UltraTV Media Center PCI 550",
784 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
785 .radio_type = UNSET,
786 .tuner_addr = ADDR_UNSET,
787 .radio_addr = ADDR_UNSET,
788 .tda9887_conf = TDA9887_PRESENT,
48d5e803 789 .mpeg = CX88_MPEG_BLACKBIRD,
d45170ed
NS
790 .input = {{
791 .type = CX88_VMUX_COMPOSITE1,
792 .vmux = 0,
793 .gpio0 = 0x0000cd73,
794 },{
795 .type = CX88_VMUX_SVIDEO,
796 .vmux = 1,
797 .gpio0 = 0x0000cd73,
798 },{
799 .type = CX88_VMUX_TELEVISION,
800 .vmux = 3,
801 .gpio0 = 0x0000cdb3,
802 }},
803 .radio = {
804 .type = CX88_RADIO,
805 .vmux = 2,
806 .gpio0 = 0x0000cdf3,
807 },
808 },
0bcc37c3
AW
809 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
810 /* Alexander Wold <awold@bigfoot.com> */
4ac97914
MCC
811 .name = "Kworld V-Stream Xpert DVD",
812 .tuner_type = UNSET,
813 .input = {{
814 .type = CX88_VMUX_COMPOSITE1,
815 .vmux = 1,
816 .gpio0 = 0x03000000,
0bcc37c3
AW
817 .gpio1 = 0x01000000,
818 .gpio2 = 0x02000000,
819 .gpio3 = 0x00100000,
4ac97914
MCC
820 },{
821 .type = CX88_VMUX_SVIDEO,
822 .vmux = 2,
823 .gpio0 = 0x03000000,
824 .gpio1 = 0x01000000,
825 .gpio2 = 0x02000000,
826 .gpio3 = 0x00100000,
827 }},
0bcc37c3 828 },
e976f937
KL
829 [CX88_BOARD_ATI_HDTVWONDER] = {
830 .name = "ATI HDTV Wonder",
831 .tuner_type = TUNER_PHILIPS_TUV1236D,
832 .radio_type = UNSET,
833 .tuner_addr = ADDR_UNSET,
834 .radio_addr = ADDR_UNSET,
835 .input = {{
836 .type = CX88_VMUX_TELEVISION,
837 .vmux = 0,
838 .gpio0 = 0x00000ff7,
839 .gpio1 = 0x000000ff,
840 .gpio2 = 0x00000001,
841 .gpio3 = 0x00000000,
842 },{
843 .type = CX88_VMUX_COMPOSITE1,
844 .vmux = 1,
845 .gpio0 = 0x00000ffe,
846 .gpio1 = 0x000000ff,
847 .gpio2 = 0x00000001,
848 .gpio3 = 0x00000000,
849 },{
850 .type = CX88_VMUX_SVIDEO,
851 .vmux = 2,
852 .gpio0 = 0x00000ffe,
853 .gpio1 = 0x000000ff,
854 .gpio2 = 0x00000001,
855 .gpio3 = 0x00000000,
856 }},
48d5e803 857 .mpeg = CX88_MPEG_DVB,
e976f937 858 },
2b5200a7
DS
859 [CX88_BOARD_WINFAST_DTV1000] = {
860 .name = "WinFast DTV1000-T",
861 .tuner_type = TUNER_ABSENT,
862 .radio_type = UNSET,
863 .tuner_addr = ADDR_UNSET,
864 .radio_addr = ADDR_UNSET,
865 .input = {{
866 .type = CX88_VMUX_DVB,
867 .vmux = 0,
868 }},
48d5e803 869 .mpeg = CX88_MPEG_DVB,
2b5200a7 870 },
7418f346
LB
871 [CX88_BOARD_AVERTV_303] = {
872 .name = "AVerTV 303 (M126)",
873 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
874 .radio_type = UNSET,
875 .tuner_addr = ADDR_UNSET,
876 .radio_addr = ADDR_UNSET,
877 .tda9887_conf = TDA9887_PRESENT,
878 .input = {{
879 .type = CX88_VMUX_TELEVISION,
880 .vmux = 0,
881 .gpio0 = 0x00ff,
882 .gpio1 = 0xe09f,
883 .gpio2 = 0x0010,
884 .gpio3 = 0x0000,
885 },{
886 .type = CX88_VMUX_COMPOSITE1,
887 .vmux = 1,
888 .gpio0 = 0x00ff,
889 .gpio1 = 0xe05f,
890 .gpio2 = 0x0010,
891 .gpio3 = 0x0000,
892 },{
893 .type = CX88_VMUX_SVIDEO,
894 .vmux = 2,
895 .gpio0 = 0x00ff,
896 .gpio1 = 0xe05f,
897 .gpio2 = 0x0010,
898 .gpio3 = 0x0000,
899 }},
900 },
0fa14aa6
ST
901 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
902 .name = "Hauppauge Nova-S-Plus DVB-S",
903 .tuner_type = TUNER_ABSENT,
904 .radio_type = UNSET,
905 .tuner_addr = ADDR_UNSET,
906 .radio_addr = ADDR_UNSET,
0fa14aa6
ST
907 .input = {{
908 .type = CX88_VMUX_DVB,
909 .vmux = 0,
910 },{
911 .type = CX88_VMUX_COMPOSITE1,
912 .vmux = 1,
913 },{
914 .type = CX88_VMUX_SVIDEO,
915 .vmux = 2,
916 }},
48d5e803 917 .mpeg = CX88_MPEG_DVB,
0fa14aa6
ST
918 },
919 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
920 .name = "Hauppauge Nova-SE2 DVB-S",
921 .tuner_type = TUNER_ABSENT,
922 .radio_type = UNSET,
923 .tuner_addr = ADDR_UNSET,
924 .radio_addr = ADDR_UNSET,
925 .input = {{
926 .type = CX88_VMUX_DVB,
927 .vmux = 0,
928 }},
48d5e803 929 .mpeg = CX88_MPEG_DVB,
0fa14aa6 930 },
0e0351e3
VC
931 [CX88_BOARD_KWORLD_DVBS_100] = {
932 .name = "KWorld DVB-S 100",
933 .tuner_type = TUNER_ABSENT,
934 .radio_type = UNSET,
935 .tuner_addr = ADDR_UNSET,
936 .radio_addr = ADDR_UNSET,
937 .input = {{
938 .type = CX88_VMUX_DVB,
939 .vmux = 0,
940 },{
941 .type = CX88_VMUX_COMPOSITE1,
942 .vmux = 1,
943 },{
944 .type = CX88_VMUX_SVIDEO,
945 .vmux = 2,
946 }},
48d5e803 947 .mpeg = CX88_MPEG_DVB,
0e0351e3 948 },
611900c1
ST
949 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
950 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
951 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
952 .radio_type = UNSET,
953 .tuner_addr = ADDR_UNSET,
954 .radio_addr = ADDR_UNSET,
955 .tda9887_conf = TDA9887_PRESENT,
956 .input = {{
957 .type = CX88_VMUX_TELEVISION,
958 .vmux = 0,
959 },{
960 .type = CX88_VMUX_COMPOSITE1,
961 .vmux = 1,
962 },{
963 .type = CX88_VMUX_SVIDEO,
964 .vmux = 2,
965 }},
966 /* fixme: Add radio support */
48d5e803 967 .mpeg = CX88_MPEG_DVB,
611900c1
ST
968 },
969 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
970 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
971 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
972 .radio_type = UNSET,
973 .tuner_addr = ADDR_UNSET,
974 .radio_addr = ADDR_UNSET,
975 .tda9887_conf = TDA9887_PRESENT,
976 .input = {{
977 .type = CX88_VMUX_TELEVISION,
978 .vmux = 0,
979 },{
980 .type = CX88_VMUX_COMPOSITE1,
981 .vmux = 1,
982 }},
983 /* fixme: Add radio support */
48d5e803 984 .mpeg = CX88_MPEG_DVB,
611900c1 985 },
fc40b261
CP
986 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
987 .name = "digitalnow DNTV Live! DVB-T Pro",
988 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
989 .radio_type = UNSET,
990 .tuner_addr = ADDR_UNSET,
991 .radio_addr = ADDR_UNSET,
992 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
993 TDA9887_PORT2_ACTIVE,
994 .input = {{
995 .type = CX88_VMUX_TELEVISION,
996 .vmux = 0,
997 .gpio0 = 0xf80808,
998 },{
999 .type = CX88_VMUX_COMPOSITE1,
1000 .vmux = 1,
1001 .gpio0 = 0xf80808,
1002 },{
1003 .type = CX88_VMUX_SVIDEO,
1004 .vmux = 2,
1005 .gpio0 = 0xf80808,
1006 }},
1007 .radio = {
1008 .type = CX88_RADIO,
1009 .gpio0 = 0xf80808,
1010 },
48d5e803 1011 .mpeg = CX88_MPEG_DVB,
fc40b261 1012 },
f39624fd
MM
1013 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1014 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1015 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1016 /* Manenti Marco <marco_manenti@colman.it> */
1017 .name = "KWorld/VStream XPert DVB-T with cx22702",
1018 .tuner_type = TUNER_ABSENT,
1019 .radio_type = UNSET,
1020 .tuner_addr = ADDR_UNSET,
1021 .radio_addr = ADDR_UNSET,
1022 .input = {{
1023 .type = CX88_VMUX_COMPOSITE1,
1024 .vmux = 1,
1025 .gpio0 = 0x0700,
1026 .gpio2 = 0x0101,
1027 },{
1028 .type = CX88_VMUX_SVIDEO,
1029 .vmux = 2,
1030 .gpio0 = 0x0700,
1031 .gpio2 = 0x0101,
1032 }},
48d5e803 1033 .mpeg = CX88_MPEG_DVB,
f39624fd 1034 },
43eabb4e
CP
1035 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1036 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1037 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1038 .radio_type = UNSET,
1039 .tuner_addr = ADDR_UNSET,
1040 .radio_addr = ADDR_UNSET,
1041 .input = {{
1042 .type = CX88_VMUX_COMPOSITE1,
1043 .vmux = 1,
d536e9c4 1044 .gpio0 = 0x000067df,
43eabb4e
CP
1045 },{
1046 .type = CX88_VMUX_SVIDEO,
1047 .vmux = 2,
d536e9c4 1048 .gpio0 = 0x000067df,
43eabb4e 1049 }},
48d5e803 1050 .mpeg = CX88_MPEG_DVB,
43eabb4e 1051 },
44256de1 1052 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
bc53f783 1053 /* FIXME: Audio not working for s-video / composite inputs. */
44256de1
MK
1054 .name = "KWorld HardwareMpegTV XPert",
1055 .tuner_type = TUNER_PHILIPS_TDA8290,
1056 .radio_type = UNSET,
1057 .tuner_addr = ADDR_UNSET,
1058 .radio_addr = ADDR_UNSET,
1059 .input = {{
1060 .type = CX88_VMUX_TELEVISION,
1061 .vmux = 0,
e2798212 1062 .gpio0 = 0x3de2,
24da4e4b 1063 .gpio2 = 0x00ff,
bc53f783
MK
1064 },{
1065 .type = CX88_VMUX_COMPOSITE1,
1066 .vmux = 1,
1067 .gpio0 = 0x3de6,
1068 },{
1069 .type = CX88_VMUX_SVIDEO,
1070 .vmux = 2,
1071 .gpio0 = 0x3de6,
44256de1 1072 }},
e2798212
MK
1073 .radio = {
1074 .type = CX88_RADIO,
1075 .gpio0 = 0x3de6,
24da4e4b 1076 .gpio2 = 0x00ff,
e2798212 1077 },
48d5e803 1078 .mpeg = CX88_MPEG_BLACKBIRD,
44256de1 1079 },
780dfef3
CP
1080 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1081 .name = "DViCO FusionHDTV DVB-T Hybrid",
91ae3299 1082 .tuner_type = TUNER_THOMSON_FE6600,
780dfef3
CP
1083 .radio_type = UNSET,
1084 .tuner_addr = ADDR_UNSET,
1085 .radio_addr = ADDR_UNSET,
1086 .input = {{
1087 .type = CX88_VMUX_TELEVISION,
1088 .vmux = 0,
1089 .gpio0 = 0x0000a75f,
1090 },{
1091 .type = CX88_VMUX_COMPOSITE1,
1092 .vmux = 1,
1093 .gpio0 = 0x0000a75b,
1094 },{
1095 .type = CX88_VMUX_SVIDEO,
1096 .vmux = 2,
1097 .gpio0 = 0x0000a75b,
1098 }},
48d5e803 1099 .mpeg = CX88_MPEG_DVB,
780dfef3 1100 },
e142e7c4
MK
1101 [CX88_BOARD_PCHDTV_HD5500] = {
1102 .name = "pcHDTV HD5500 HDTV",
9c26c8b1 1103 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
e142e7c4
MK
1104 .radio_type = UNSET,
1105 .tuner_addr = ADDR_UNSET,
1106 .radio_addr = ADDR_UNSET,
1107 .tda9887_conf = TDA9887_PRESENT,
1108 .input = {{
1109 .type = CX88_VMUX_TELEVISION,
1110 .vmux = 0,
1111 .gpio0 = 0x87fd,
1112 },{
1113 .type = CX88_VMUX_COMPOSITE1,
1114 .vmux = 1,
1115 .gpio0 = 0x87f9,
1116 },{
1117 .type = CX88_VMUX_SVIDEO,
1118 .vmux = 2,
1119 .gpio0 = 0x87f9,
1120 }},
48d5e803 1121 .mpeg = CX88_MPEG_DVB,
e142e7c4 1122 },
b3038304
VZ
1123 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1124 /* FIXME: tested TV input only, disabled composite,
1125 svideo and radio until they can be tested also. */
1126 .name = "Kworld MCE 200 Deluxe",
1127 .tuner_type = TUNER_TENA_9533_DI,
1128 .radio_type = UNSET,
1129 .tda9887_conf = TDA9887_PRESENT,
1130 .tuner_addr = ADDR_UNSET,
1131 .radio_addr = ADDR_UNSET,
1132 .input = {{
1133 .type = CX88_VMUX_TELEVISION,
1134 .vmux = 0,
1135 .gpio0 = 0x0000BDE6
1136 }},
48d5e803 1137 .mpeg = CX88_MPEG_BLACKBIRD,
b3038304 1138 },
a3124622
AM
1139 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1140 /* FIXME: SVideo, Composite and FM inputs are untested */
1141 .name = "PixelView PlayTV P7000",
1142 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1143 .radio_type = UNSET,
1144 .tuner_addr = ADDR_UNSET,
1145 .radio_addr = ADDR_UNSET,
1146 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1147 TDA9887_PORT2_ACTIVE,
1148 .input = {{
1149 .type = CX88_VMUX_TELEVISION,
1150 .vmux = 0,
1151 .gpio0 = 0x5da6,
1152 }},
48d5e803 1153 .mpeg = CX88_MPEG_BLACKBIRD,
a3124622 1154 },
be4f4519
RC
1155 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1156 .name = "NPG Tech Real TV FM Top 10",
1157 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
680543c5
RC
1158 .radio_type = UNSET,
1159 .tuner_addr = ADDR_UNSET,
1160 .radio_addr = ADDR_UNSET,
1161 .input = {{
1162 .type = CX88_VMUX_TELEVISION,
1163 .vmux = 0,
1164 .gpio0 = 0x0788,
1165 },{
1166 .type = CX88_VMUX_COMPOSITE1,
1167 .vmux = 1,
1168 .gpio0 = 0x078b,
1169 },{
1170 .type = CX88_VMUX_SVIDEO,
1171 .vmux = 2,
be4f4519 1172 .gpio0 = 0x078b,
680543c5
RC
1173 }},
1174 .radio = {
1175 .type = CX88_RADIO,
1176 .gpio0 = 0x074a,
1177 },
1178 },
4bd6e9d9
MV
1179 [CX88_BOARD_WINFAST_DTV2000H] = {
1180 /* video inputs and radio still in testing */
1181 .name = "WinFast DTV2000 H",
1182 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1183 .radio_type = UNSET,
1184 .tuner_addr = ADDR_UNSET,
1185 .radio_addr = ADDR_UNSET,
1186 .tda9887_conf = TDA9887_PRESENT,
1187 .input = {{
1188 .type = CX88_VMUX_TELEVISION,
1189 .vmux = 0,
1190 .gpio0 = 0x00017304,
1191 .gpio1 = 0x00008203,
1192 .gpio2 = 0x00017304,
1193 .gpio3 = 0x02000000,
1194 }},
48d5e803 1195 .mpeg = CX88_MPEG_DVB,
4bd6e9d9 1196 },
c02a34f4
SA
1197 [CX88_BOARD_GENIATECH_DVBS] = {
1198 .name = "Geniatech DVB-S",
1199 .tuner_type = TUNER_ABSENT,
1200 .radio_type = UNSET,
1201 .tuner_addr = ADDR_UNSET,
1202 .radio_addr = ADDR_UNSET,
1203 .input = {{
1204 .type = CX88_VMUX_DVB,
1205 .vmux = 0,
1206 },{
1207 .type = CX88_VMUX_COMPOSITE1,
1208 .vmux = 1,
1209 }},
48d5e803 1210 .mpeg = CX88_MPEG_DVB,
c02a34f4 1211 },
ad10c930
ET
1212 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1213 /* FIXME: Add dvb & radio support */
1214 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1215 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1216 .radio_type = UNSET,
1217 .tuner_addr = ADDR_UNSET,
1218 .radio_addr = ADDR_UNSET,
1219 .tda9887_conf = TDA9887_PRESENT,
1220 .input = {{
1221 .type = CX88_VMUX_TELEVISION,
1222 .vmux = 0,
1223 .gpio0 = 0x84bf,
1224 },{
1225 .type = CX88_VMUX_COMPOSITE1,
1226 .vmux = 1,
1227 .gpio0 = 0x84bf,
1228 },{
1229 .type = CX88_VMUX_SVIDEO,
1230 .vmux = 2,
1231 .gpio0 = 0x84bf,
1232 }},
1233 },
d1009bd7
PN
1234 [CX88_BOARD_NORWOOD_MICRO] = {
1235 .name = "Norwood Micro TV Tuner",
1236 .tuner_type = TUNER_TNF_5335MF,
1237 .radio_type = UNSET,
1238 .tuner_addr = ADDR_UNSET,
1239 .radio_addr = ADDR_UNSET,
1240 .input = {{
1241 .type = CX88_VMUX_TELEVISION,
1242 .vmux = 0,
1243 .gpio0 = 0x0709,
1244 },{
1245 .type = CX88_VMUX_COMPOSITE1,
1246 .vmux = 1,
1247 .gpio0 = 0x070b,
1248 },{
1249 .type = CX88_VMUX_SVIDEO,
1250 .vmux = 2,
1251 .gpio0 = 0x070b,
1252 }},
1253 },
2acadefa
DB
1254 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1255 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1256 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1257 .radio_type = UNSET,
1258 .tuner_addr = ADDR_UNSET,
1259 .radio_addr = ADDR_UNSET,
1260 .input = {{
1261 .type = CX88_VMUX_TELEVISION,
1262 .vmux = 0,
1263 .gpio0 = 0x003fffff,
1264 .gpio1 = 0x00e00000,
1265 .gpio2 = 0x003fffff,
1266 .gpio3 = 0x02000000,
1267 },{
1268 .type = CX88_VMUX_COMPOSITE1,
1269 .vmux = 1,
1270 .gpio0 = 0x003fffff,
1271 .gpio1 = 0x00e00000,
1272 .gpio2 = 0x003fffff,
1273 .gpio3 = 0x02000000,
1274 },{
1275 .type = CX88_VMUX_SVIDEO,
1276 .vmux = 2,
1277 .gpio0 = 0x003fffff,
1278 .gpio1 = 0x00e00000,
1279 .gpio2 = 0x003fffff,
1280 .gpio3 = 0x02000000,
1281 }},
1282 },
aa481a65
ST
1283 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1284 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1285 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1286 .radio_type = UNSET,
1287 .tuner_addr = ADDR_UNSET,
1288 .radio_addr = ADDR_UNSET,
1289 .tda9887_conf = TDA9887_PRESENT,
3057906d 1290 .audio_chip = AUDIO_CHIP_WM8775,
aa481a65
ST
1291 .input = {{
1292 .type = CX88_VMUX_TELEVISION,
1293 .vmux = 0,
1294 .gpio0 = 0xe780,
1295 },{
1296 .type = CX88_VMUX_COMPOSITE1,
1297 .vmux = 1,
1298 .gpio0 = 0xe780,
1299 },{
1300 .type = CX88_VMUX_SVIDEO,
1301 .vmux = 2,
1302 .gpio0 = 0xe780,
1303 }},
1304 /* fixme: Add radio support */
48d5e803 1305 .mpeg = CX88_MPEG_DVB,
aa481a65 1306 },
1da177e4
LT
1307};
1308const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
1309
1310/* ------------------------------------------------------------------ */
1311/* PCI subsystem IDs */
1312
1313struct cx88_subid cx88_subids[] = {
1314 {
1315 .subvendor = 0x0070,
1316 .subdevice = 0x3400,
1317 .card = CX88_BOARD_HAUPPAUGE,
1318 },{
1319 .subvendor = 0x0070,
1320 .subdevice = 0x3401,
1321 .card = CX88_BOARD_HAUPPAUGE,
1322 },{
1323 .subvendor = 0x14c7,
1324 .subdevice = 0x0106,
1325 .card = CX88_BOARD_GDI,
1326 },{
1327 .subvendor = 0x14c7,
1328 .subdevice = 0x0107, /* with mpeg encoder */
1329 .card = CX88_BOARD_GDI,
1330 },{
1331 .subvendor = PCI_VENDOR_ID_ATI,
1332 .subdevice = 0x00f8,
1333 .card = CX88_BOARD_ATI_WONDER_PRO,
1334 },{
4ac97914
MCC
1335 .subvendor = 0x107d,
1336 .subdevice = 0x6611,
1337 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1338 },{
1339 .subvendor = 0x107d,
1340 .subdevice = 0x6613, /* NTSC */
1341 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1342 },{
1343 .subvendor = 0x107d,
1344 .subdevice = 0x6620,
1345 .card = CX88_BOARD_WINFAST_DV2000,
1da177e4 1346 },{
4ac97914
MCC
1347 .subvendor = 0x107d,
1348 .subdevice = 0x663b,
1349 .card = CX88_BOARD_LEADTEK_PVR2000,
1da177e4
LT
1350 },{
1351 .subvendor = 0x107d,
8dd86eeb 1352 .subdevice = 0x663c,
4ac97914
MCC
1353 .card = CX88_BOARD_LEADTEK_PVR2000,
1354 },{
1da177e4
LT
1355 .subvendor = 0x1461,
1356 .subdevice = 0x000b,
7418f346 1357 .card = CX88_BOARD_AVERTV_STUDIO_303,
1da177e4
LT
1358 },{
1359 .subvendor = 0x1462,
1360 .subdevice = 0x8606,
1361 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
1362 },{
4ac97914
MCC
1363 .subvendor = 0x10fc,
1364 .subdevice = 0xd003,
1365 .card = CX88_BOARD_IODATA_GVVCP3PCI,
1da177e4 1366 },{
4ac97914
MCC
1367 .subvendor = 0x1043,
1368 .subdevice = 0x4823, /* with mpeg encoder */
1369 .card = CX88_BOARD_ASUS_PVR_416,
1da177e4
LT
1370 },{
1371 .subvendor = 0x17de,
1372 .subdevice = 0x08a6,
1373 .card = CX88_BOARD_KWORLD_DVB_T,
1374 },{
1375 .subvendor = 0x18ac,
1376 .subdevice = 0xd810,
a82decf6 1377 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
097b750e
MK
1378 },{
1379 .subvendor = 0x18ac,
1380 .subdevice = 0xd820,
80d34362 1381 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
1da177e4 1382 },{
7df64e8c
MK
1383 .subvendor = 0x18ac,
1384 .subdevice = 0xdb00,
1da177e4 1385 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
4ac97914 1386 },{
1da177e4
LT
1387 .subvendor = 0x0070,
1388 .subdevice = 0x9002,
1389 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
4ac97914 1390 },{
1da177e4
LT
1391 .subvendor = 0x14f1,
1392 .subdevice = 0x0187,
1393 .card = CX88_BOARD_CONEXANT_DVB_T1,
4ac97914 1394 },{
1da177e4
LT
1395 .subvendor = 0x1540,
1396 .subdevice = 0x2580,
1397 .card = CX88_BOARD_PROVIDEO_PV259,
1398 },{
7df64e8c
MK
1399 .subvendor = 0x18ac,
1400 .subdevice = 0xdb10,
1da177e4
LT
1401 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1402 },{
4ac97914
MCC
1403 .subvendor = 0x1554,
1404 .subdevice = 0x4811,
1405 .card = CX88_BOARD_PIXELVIEW,
1da177e4
LT
1406 },{
1407 .subvendor = 0x7063,
1408 .subdevice = 0x3000, /* HD-3000 card */
1409 .card = CX88_BOARD_PCHDTV_HD3000,
1410 },{
7df64e8c
MK
1411 .subvendor = 0x17de,
1412 .subdevice = 0xa8a6,
1da177e4
LT
1413 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
1414 },{
1415 .subvendor = 0x0070,
1416 .subdevice = 0x2801,
1417 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
1418 },{
7df64e8c 1419 .subvendor = 0x14f1,
1da177e4
LT
1420 .subdevice = 0x0342,
1421 .card = CX88_BOARD_DIGITALLOGIC_MEC,
1422 },{
1423 .subvendor = 0x10fc,
1424 .subdevice = 0xd035,
1425 .card = CX88_BOARD_IODATA_GVBCTV7E,
a82decf6
MCC
1426 },{
1427 .subvendor = 0x1421,
1428 .subdevice = 0x0334,
1429 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
4ac97914 1430 },{
e057ee11
MK
1431 .subvendor = 0x153b,
1432 .subdevice = 0x1166,
1433 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
4ac97914 1434 },{
9fef07ca
MK
1435 .subvendor = 0x18ac,
1436 .subdevice = 0xd500,
1437 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
4ac97914 1438 },{
d45170ed
NS
1439 .subvendor = 0x1461,
1440 .subdevice = 0x8011,
1441 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
4ac97914 1442 },{
e976f937
KL
1443 .subvendor = PCI_VENDOR_ID_ATI,
1444 .subdevice = 0xa101,
1445 .card = CX88_BOARD_ATI_HDTVWONDER,
4ac97914 1446 },{
2b5200a7
DS
1447 .subvendor = 0x107d,
1448 .subdevice = 0x665f,
1449 .card = CX88_BOARD_WINFAST_DTV1000,
7418f346
LB
1450 },{
1451 .subvendor = 0x1461,
1452 .subdevice = 0x000a,
1453 .card = CX88_BOARD_AVERTV_303,
0fa14aa6
ST
1454 },{
1455 .subvendor = 0x0070,
1456 .subdevice = 0x9200,
fb56cb65
ST
1457 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
1458 },{
1459 .subvendor = 0x0070,
1460 .subdevice = 0x9201,
0fa14aa6
ST
1461 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1462 },{
1463 .subvendor = 0x0070,
1464 .subdevice = 0x9202,
fb56cb65 1465 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
0e0351e3
VC
1466 },{
1467 .subvendor = 0x17de,
1468 .subdevice = 0x08b2,
1469 .card = CX88_BOARD_KWORLD_DVBS_100,
611900c1
ST
1470 },{
1471 .subvendor = 0x0070,
1472 .subdevice = 0x9400,
1473 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1474 },{
1475 .subvendor = 0x0070,
1476 .subdevice = 0x9402,
1477 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1478 },{
1479 .subvendor = 0x0070,
1480 .subdevice = 0x9800,
1481 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1482 },{
1483 .subvendor = 0x0070,
1484 .subdevice = 0x9802,
1485 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
c432a072
ST
1486 },{
1487 .subvendor = 0x0070,
1488 .subdevice = 0x9001,
1489 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
fc40b261
CP
1490 },{
1491 .subvendor = 0x1822,
1492 .subdevice = 0x0025,
1493 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
f39624fd 1494 },{
b9f4ad57
CP
1495 .subvendor = 0x17de,
1496 .subdevice = 0x08a1,
1497 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
43eabb4e
CP
1498 },{
1499 .subvendor = 0x18ac,
1500 .subdevice = 0xdb50,
1501 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
f74a6b39
MK
1502 },{
1503 .subvendor = 0x18ac,
1504 .subdevice = 0xdb54,
1505 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
1506 /* Re-branded DViCO: DigitalNow DVB-T Dual */
6bfb2e1f
MK
1507 },{
1508 .subvendor = 0x18ac,
1509 .subdevice = 0xdb11,
1510 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1511 /* Re-branded DViCO: UltraView DVB-T Plus */
44256de1
MK
1512 },{
1513 .subvendor = 0x17de,
1514 .subdevice = 0x0840,
1515 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
780dfef3
CP
1516 },{
1517 .subvendor = 0x18ac,
1518 .subdevice = 0xdb40,
1519 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1520 },{
1521 .subvendor = 0x18ac,
1522 .subdevice = 0xdb44,
1523 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
da215d22
RS
1524 },{
1525 .subvendor = 0x7063,
1526 .subdevice = 0x5500,
1527 .card = CX88_BOARD_PCHDTV_HD5500,
b3038304
VZ
1528 },{
1529 .subvendor = 0x17de,
1530 .subdevice = 0x0841,
1531 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
fc066478
MK
1532 },{
1533 .subvendor = 0x1822,
1534 .subdevice = 0x0019,
1535 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
a3124622
AM
1536 },{
1537 .subvendor = 0x1554,
1538 .subdevice = 0x4813,
1539 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
680543c5
RC
1540 },{
1541 .subvendor = 0x14f1,
1542 .subdevice = 0x0842,
be4f4519 1543 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
4bd6e9d9
MV
1544 },{
1545 .subvendor = 0x107d,
1546 .subdevice = 0x665e,
1547 .card = CX88_BOARD_WINFAST_DTV2000H,
65271bff
MK
1548 },{
1549 .subvendor = 0x18ac,
1550 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
1551 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
c02a34f4
SA
1552 },{
1553 .subvendor = 0x14f1,
1554 .subdevice = 0x0084,
1555 .card = CX88_BOARD_GENIATECH_DVBS,
ad10c930
ET
1556 },{
1557 .subvendor = 0x0070,
1558 .subdevice = 0x1404,
1559 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
5dbaa2cb
MK
1560 },{
1561 .subvendor = 0x1461,
1562 .subdevice = 0xc111, /* AverMedia M150-D */
1563 /* This board is known to work with the ASUS PVR416 config */
1564 .card = CX88_BOARD_ASUS_PVR_416,
2acadefa
DB
1565 },{
1566 .subvendor = 0xc180,
1567 .subdevice = 0xc980,
1568 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
aa481a65
ST
1569 },{
1570 .subvendor = 0x0070,
1571 .subdevice = 0x9600,
1572 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1573 },{
1574 .subvendor = 0x0070,
1575 .subdevice = 0x9601,
1576 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1577 },{
1578 .subvendor = 0x0070,
1579 .subdevice = 0x9602,
1580 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
dab489df
MK
1581 },{
1582 .subvendor = 0x107d,
1583 .subdevice = 0x6632,
1584 .card = CX88_BOARD_LEADTEK_PVR2000,
4508f598
MK
1585 },{
1586 .subvendor = 0x12ab,
1587 .subdevice = 0x2300, /* Club3D Zap TV2100 */
1588 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
b9f4ad57 1589 },
1da177e4
LT
1590};
1591const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
1592
1593/* ----------------------------------------------------------------------- */
1594/* some leadtek specific stuff */
1595
1596static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
1597{
1598 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
1599 * any others.
1600 *
1601 * Byte 0 is 1 on the NTSC board.
1602 */
1603
1604 if (eeprom_data[4] != 0x7d ||
1605 eeprom_data[5] != 0x10 ||
1606 eeprom_data[7] != 0x66) {
1607 printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
1608 core->name);
1609 return;
1610 }
1611
1612 core->has_radio = 1;
1613 core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
1614
1615 printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
1616 "tuner=%d, eeprom[0]=0x%02x\n",
1617 core->name, core->tuner_type, eeprom_data[0]);
1618}
1619
1da177e4
LT
1620static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
1621{
1622 struct tveeprom tv;
1623
0f97a931 1624 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
1da177e4 1625 core->tuner_type = tv.tuner_type;
0345c387 1626 core->tuner_formats = tv.tuner_formats;
1da177e4 1627 core->has_radio = tv.has_radio;
1da177e4
LT
1628
1629 /* Make sure we support the board model */
3ca0ea98
ST
1630 switch (tv.model)
1631 {
ad10c930 1632 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
0345c387 1633 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
42d2b6ef 1634 case 34519: /* WinTV-PCI-FM */
759324c3 1635 case 90002: /* Nova-T-PCI (9002) */
0fe22865
ST
1636 case 92001: /* Nova-S-Plus (Video and IR) */
1637 case 92002: /* Nova-S-Plus (Video and IR) */
1638 case 90003: /* Nova-T-PCI (9002 No RF out) */
759324c3
ST
1639 case 90500: /* Nova-T-PCI (oem) */
1640 case 90501: /* Nova-T-PCI (oem/IR) */
3ca0ea98 1641 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
611900c1
ST
1642 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
1643 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
aa481a65
ST
1644 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
1645 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
1646 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
1647 case 96569: /* WinTV-HVR1300 () */
1648 case 96659: /* WinTV-HVR1300 () */
611900c1 1649 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1da177e4
LT
1650 /* known */
1651 break;
1652 default:
1653 printk("%s: warning: unknown hauppauge model #%d\n",
3ca0ea98 1654 core->name, tv.model);
1da177e4
LT
1655 break;
1656 }
1657
3ca0ea98
ST
1658 printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
1659 core->name, tv.model);
1da177e4
LT
1660}
1661
1662/* ----------------------------------------------------------------------- */
1663/* some GDI (was: Modular Technology) specific stuff */
1664
1665static struct {
1666 int id;
1667 int fm;
1668 char *name;
1669} gdi_tuner[] = {
1670 [ 0x01 ] = { .id = TUNER_ABSENT,
1671 .name = "NTSC_M" },
1672 [ 0x02 ] = { .id = TUNER_ABSENT,
1673 .name = "PAL_B" },
1674 [ 0x03 ] = { .id = TUNER_ABSENT,
1675 .name = "PAL_I" },
1676 [ 0x04 ] = { .id = TUNER_ABSENT,
1677 .name = "PAL_D" },
1678 [ 0x05 ] = { .id = TUNER_ABSENT,
1679 .name = "SECAM" },
1680
1681 [ 0x10 ] = { .id = TUNER_ABSENT,
1682 .fm = 1,
1683 .name = "TEMIC_4049" },
1684 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
1685 .name = "TEMIC_4136" },
1686 [ 0x12 ] = { .id = TUNER_ABSENT,
1687 .name = "TEMIC_4146" },
1688
1689 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
1690 .fm = 1,
1691 .name = "PHILIPS_FQ1216_MK3" },
1692 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
1693 .name = "PHILIPS_FQ1236_MK3" },
1694 [ 0x22 ] = { .id = TUNER_ABSENT,
1695 .name = "PHILIPS_FI1236_MK3" },
1696 [ 0x23 ] = { .id = TUNER_ABSENT,
1697 .name = "PHILIPS_FI1216_MK3" },
1698};
1699
1700static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
1701{
1702 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
1703 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
1704
1705 printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
1706 name ? name : "unknown");
1707 if (NULL == name)
1708 return;
1709 core->tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
1710 core->has_radio = gdi_tuner[eeprom_data[0x0d]].fm;
1711}
1712
780dfef3
CP
1713/* ----------------------------------------------------------------------- */
1714/* some DViCO specific stuff */
1715
1716static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
1717{
1718 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
1719 int i, err;
69b27e3d 1720 static u8 init_bufs[13][5] = {
780dfef3
CP
1721 { 0x10, 0x00, 0x20, 0x01, 0x03 },
1722 { 0x10, 0x10, 0x01, 0x00, 0x21 },
1723 { 0x10, 0x10, 0x10, 0x00, 0xCA },
1724 { 0x10, 0x10, 0x12, 0x00, 0x08 },
1725 { 0x10, 0x10, 0x13, 0x00, 0x0A },
1726 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
1727 { 0x10, 0x10, 0x22, 0x01, 0x3D },
1728 { 0x10, 0x10, 0x73, 0x01, 0x2E },
1729 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
1730 { 0x10, 0x10, 0x71, 0x01, 0x97 },
1731 { 0x10, 0x10, 0x70, 0x00, 0x0F },
1732 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
1733 { 0x03, 0x0C },
1734 };
1735
1736 for (i = 0; i < 13; i++) {
1737 msg.buf = init_bufs[i];
1738 msg.len = (i != 12 ? 5 : 2);
1739 err = i2c_transfer(&core->i2c_adap, &msg, 1);
1740 if (err != 1) {
1741 printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
1742 return;
1743 }
1744 }
1745}
1746
1da177e4
LT
1747/* ----------------------------------------------------------------------- */
1748
1749void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1750{
1751 int i;
1752
1753 if (0 == pci->subsystem_vendor &&
1754 0 == pci->subsystem_device) {
1755 printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1756 "%s: be autodetected. Please pass card=<n> insmod option to\n"
1757 "%s: workaround that. Redirect complaints to the vendor of\n"
1758 "%s: the TV card. Best regards,\n"
1759 "%s: -- tux\n",
1760 core->name,core->name,core->name,core->name,core->name);
1761 } else {
1762 printk("%s: Your board isn't known (yet) to the driver. You can\n"
1763 "%s: try to pick one of the existing card configs via\n"
1764 "%s: card=<n> insmod option. Updating to the latest\n"
1765 "%s: version might help as well.\n",
1766 core->name,core->name,core->name,core->name);
1767 }
1768 printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1769 core->name);
1770 for (i = 0; i < cx88_bcount; i++)
1771 printk("%s: card=%d -> %s\n",
1772 core->name, i, cx88_boards[i].name);
1773}
1774
aa481a65
ST
1775void cx88_card_setup_pre_i2c(struct cx88_core *core)
1776{
1777 switch (core->board) {
1778 case CX88_BOARD_HAUPPAUGE_HVR1300:
1779 /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
1780 /* We leave here with the 702 on the bus */
1781 cx_write(MO_GP0_IO, 0x0000e780);
1782 udelay(1000);
1783 cx_clear(MO_GP0_IO, 0x00000080);
1784 udelay(50);
1785 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
1786 udelay(1000);
1787 break;
1788 }
1789}
1790
1da177e4
LT
1791void cx88_card_setup(struct cx88_core *core)
1792{
3ca0ea98 1793 static u8 eeprom[256];
1da177e4
LT
1794
1795 if (0 == core->i2c_rc) {
1796 core->i2c_client.addr = 0xa0 >> 1;
1797 tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
1798 }
1799
1800 switch (core->board) {
1801 case CX88_BOARD_HAUPPAUGE:
1802 case CX88_BOARD_HAUPPAUGE_ROSLYN:
1803 if (0 == core->i2c_rc)
1804 hauppauge_eeprom(core,eeprom+8);
1805 break;
1806 case CX88_BOARD_GDI:
1807 if (0 == core->i2c_rc)
1808 gdi_eeprom(core,eeprom);
1809 break;
1810 case CX88_BOARD_WINFAST2000XP_EXPERT:
1811 if (0 == core->i2c_rc)
1812 leadtek_eeprom(core,eeprom);
1813 break;
0fa14aa6
ST
1814 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
1815 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
1da177e4 1816 case CX88_BOARD_HAUPPAUGE_DVB_T1:
611900c1
ST
1817 case CX88_BOARD_HAUPPAUGE_HVR1100:
1818 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
ad10c930 1819 case CX88_BOARD_HAUPPAUGE_HVR3000:
aa481a65 1820 case CX88_BOARD_HAUPPAUGE_HVR1300:
1da177e4 1821 if (0 == core->i2c_rc)
3ca0ea98 1822 hauppauge_eeprom(core,eeprom);
1da177e4 1823 break;
0e0351e3
VC
1824 case CX88_BOARD_KWORLD_DVBS_100:
1825 cx_write(MO_GP0_IO, 0x000007f8);
1826 cx_write(MO_GP1_IO, 0x00000001);
1827 break;
d536e9c4
CP
1828 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
1829 /* GPIO0:6 is hooked to FX2 reset pin */
1830 cx_set(MO_GP0_IO, 0x00004040);
1831 cx_clear(MO_GP0_IO, 0x00000040);
1832 msleep(1000);
1833 cx_set(MO_GP0_IO, 0x00004040);
1834 /* FALLTHROUGH */
1da177e4
LT
1835 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
1836 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
780dfef3 1837 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
1da177e4
LT
1838 /* GPIO0:0 is hooked to mt352 reset pin */
1839 cx_set(MO_GP0_IO, 0x00000101);
1840 cx_clear(MO_GP0_IO, 0x00000001);
1841 msleep(1);
1842 cx_set(MO_GP0_IO, 0x00000101);
780dfef3
CP
1843 if (0 == core->i2c_rc &&
1844 core->board == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
1845 dvico_fusionhdtv_hybrid_init(core);
1da177e4
LT
1846 break;
1847 case CX88_BOARD_KWORLD_DVB_T:
1848 case CX88_BOARD_DNTV_LIVE_DVB_T:
1849 cx_set(MO_GP0_IO, 0x00000707);
1850 cx_set(MO_GP2_IO, 0x00000101);
1851 cx_clear(MO_GP2_IO, 0x00000001);
1852 msleep(1);
1853 cx_clear(MO_GP0_IO, 0x00000007);
1854 cx_set(MO_GP2_IO, 0x00000101);
1855 break;
fc40b261
CP
1856 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
1857 cx_write(MO_GP0_IO, 0x00080808);
1858 break;
e976f937
KL
1859 case CX88_BOARD_ATI_HDTVWONDER:
1860 if (0 == core->i2c_rc) {
1861 /* enable tuner */
1862 int i;
b9ee9ad7 1863 static const u8 buffer [] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
e976f937 1864 core->i2c_client.addr = 0x0a;
e976f937 1865
fde6d31e 1866 for (i = 0; i < 5; i++)
e976f937
KL
1867 if (2 != i2c_master_send(&core->i2c_client,&buffer[i*2],2))
1868 printk(KERN_WARNING "%s: Unable to enable tuner(%i).\n",
1869 core->name, i);
1870 }
1871 break;
1da177e4
LT
1872 }
1873 if (cx88_boards[core->board].radio.type == CX88_RADIO)
1874 core->has_radio = 1;
1875}
1876
1877/* ------------------------------------------------------------------ */
1878
1879EXPORT_SYMBOL(cx88_boards);
1da177e4
LT
1880
1881/*
1882 * Local variables:
1883 * c-basic-offset: 8
1884 * End:
b45009b0 1885 * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off
1da177e4 1886 */
This page took 0.256741 seconds and 5 git commands to generate.