1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for the Conexant CX23885 PCIe bridge
5 * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
10 #include <linux/init.h>
11 #include <linux/module.h>
12 #include <linux/pci.h>
13 #include <linux/delay.h>
14 #include <media/drv-intf/cx25840.h>
15 #include <linux/firmware.h>
16 #include <misc/altera.h>
18 #include "tuner-xc2028.h"
19 #include "netup-eeprom.h"
20 #include "netup-init.h"
21 #include "altera-ci.h"
24 #include "cx23888-ir.h"
26 static unsigned int netup_card_rev
= 4;
27 module_param(netup_card_rev
, int, 0644);
28 MODULE_PARM_DESC(netup_card_rev
,
29 "NetUP Dual DVB-T/C CI card revision");
30 static unsigned int enable_885_ir
;
31 module_param(enable_885_ir
, int, 0644);
32 MODULE_PARM_DESC(enable_885_ir
,
33 "Enable integrated IR controller for supported\n"
34 "\t\t CX2388[57] boards that are wired for it:\n"
35 "\t\t\tHVR-1250 (reported safe)\n"
36 "\t\t\tTerraTec Cinergy T PCIe Dual (not well tested, appears to be safe)\n"
37 "\t\t\tTeVii S470 (reported unsafe)\n"
38 "\t\t This can cause an interrupt storm with some cards.\n"
39 "\t\t Default: 0 [Disabled]");
41 /* ------------------------------------------------------------------ */
42 /* board config info */
44 struct cx23885_board cx23885_boards
[] = {
45 [CX23885_BOARD_UNKNOWN
] = {
46 .name
= "UNKNOWN/GENERIC",
47 /* Ensure safe default for unknown boards */
50 .type
= CX23885_VMUX_COMPOSITE1
,
53 .type
= CX23885_VMUX_COMPOSITE2
,
56 .type
= CX23885_VMUX_COMPOSITE3
,
59 .type
= CX23885_VMUX_COMPOSITE4
,
63 [CX23885_BOARD_HAUPPAUGE_HVR1800lp
] = {
64 .name
= "Hauppauge WinTV-HVR1800lp",
65 .portc
= CX23885_MPEG_DVB
,
67 .type
= CX23885_VMUX_TELEVISION
,
71 .type
= CX23885_VMUX_DEBUG
,
75 .type
= CX23885_VMUX_COMPOSITE1
,
79 .type
= CX23885_VMUX_SVIDEO
,
84 [CX23885_BOARD_HAUPPAUGE_HVR1800
] = {
85 .name
= "Hauppauge WinTV-HVR1800",
86 .porta
= CX23885_ANALOG_VIDEO
,
87 .portb
= CX23885_MPEG_ENCODER
,
88 .portc
= CX23885_MPEG_DVB
,
89 .tuner_type
= TUNER_PHILIPS_TDA8290
,
90 .tuner_addr
= 0x42, /* 0x84 >> 1 */
93 .type
= CX23885_VMUX_TELEVISION
,
94 .vmux
= CX25840_VIN7_CH3
|
97 .amux
= CX25840_AUDIO8
,
100 .type
= CX23885_VMUX_COMPOSITE1
,
101 .vmux
= CX25840_VIN7_CH3
|
104 .amux
= CX25840_AUDIO7
,
107 .type
= CX23885_VMUX_SVIDEO
,
108 .vmux
= CX25840_VIN7_CH3
|
112 .amux
= CX25840_AUDIO7
,
116 [CX23885_BOARD_HAUPPAUGE_HVR1250
] = {
117 .name
= "Hauppauge WinTV-HVR1250",
118 .porta
= CX23885_ANALOG_VIDEO
,
119 .portc
= CX23885_MPEG_DVB
,
120 #ifdef MT2131_NO_ANALOG_SUPPORT_YET
121 .tuner_type
= TUNER_PHILIPS_TDA8290
,
122 .tuner_addr
= 0x42, /* 0x84 >> 1 */
127 #ifdef MT2131_NO_ANALOG_SUPPORT_YET
128 .type
= CX23885_VMUX_TELEVISION
,
129 .vmux
= CX25840_VIN7_CH3
|
132 .amux
= CX25840_AUDIO8
,
136 .type
= CX23885_VMUX_COMPOSITE1
,
137 .vmux
= CX25840_VIN7_CH3
|
140 .amux
= CX25840_AUDIO7
,
143 .type
= CX23885_VMUX_SVIDEO
,
144 .vmux
= CX25840_VIN7_CH3
|
148 .amux
= CX25840_AUDIO7
,
152 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
] = {
153 .name
= "DViCO FusionHDTV5 Express",
154 .portb
= CX23885_MPEG_DVB
,
156 [CX23885_BOARD_HAUPPAUGE_HVR1500Q
] = {
157 .name
= "Hauppauge WinTV-HVR1500Q",
158 .portc
= CX23885_MPEG_DVB
,
160 [CX23885_BOARD_HAUPPAUGE_HVR1500
] = {
161 .name
= "Hauppauge WinTV-HVR1500",
162 .porta
= CX23885_ANALOG_VIDEO
,
163 .portc
= CX23885_MPEG_DVB
,
164 .tuner_type
= TUNER_XC2028
,
165 .tuner_addr
= 0x61, /* 0xc2 >> 1 */
167 .type
= CX23885_VMUX_TELEVISION
,
168 .vmux
= CX25840_VIN7_CH3
|
173 .type
= CX23885_VMUX_COMPOSITE1
,
174 .vmux
= CX25840_VIN7_CH3
|
179 .type
= CX23885_VMUX_SVIDEO
,
180 .vmux
= CX25840_VIN7_CH3
|
187 [CX23885_BOARD_HAUPPAUGE_HVR1200
] = {
188 .name
= "Hauppauge WinTV-HVR1200",
189 .portc
= CX23885_MPEG_DVB
,
191 [CX23885_BOARD_HAUPPAUGE_HVR1700
] = {
192 .name
= "Hauppauge WinTV-HVR1700",
193 .portc
= CX23885_MPEG_DVB
,
195 [CX23885_BOARD_HAUPPAUGE_HVR1400
] = {
196 .name
= "Hauppauge WinTV-HVR1400",
197 .portc
= CX23885_MPEG_DVB
,
199 [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
] = {
200 .name
= "DViCO FusionHDTV7 Dual Express",
201 .portb
= CX23885_MPEG_DVB
,
202 .portc
= CX23885_MPEG_DVB
,
204 [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
] = {
205 .name
= "DViCO FusionHDTV DVB-T Dual Express",
206 .portb
= CX23885_MPEG_DVB
,
207 .portc
= CX23885_MPEG_DVB
,
209 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
] = {
210 .name
= "Leadtek Winfast PxDVR3200 H",
211 .portc
= CX23885_MPEG_DVB
,
213 [CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
] = {
214 .name
= "Leadtek Winfast PxPVR2200",
215 .porta
= CX23885_ANALOG_VIDEO
,
216 .tuner_type
= TUNER_XC2028
,
220 .type
= CX23885_VMUX_TELEVISION
,
221 .vmux
= CX25840_VIN2_CH1
|
223 .amux
= CX25840_AUDIO8
,
226 .type
= CX23885_VMUX_COMPOSITE1
,
227 .vmux
= CX25840_COMPOSITE1
,
228 .amux
= CX25840_AUDIO7
,
231 .type
= CX23885_VMUX_SVIDEO
,
232 .vmux
= CX25840_SVIDEO_LUMA3
|
233 CX25840_SVIDEO_CHROMA4
,
234 .amux
= CX25840_AUDIO7
,
237 .type
= CX23885_VMUX_COMPONENT
,
238 .vmux
= CX25840_VIN7_CH1
|
241 CX25840_COMPONENT_ON
,
242 .amux
= CX25840_AUDIO7
,
246 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
] = {
247 .name
= "Leadtek Winfast PxDVR3200 H XC4000",
248 .porta
= CX23885_ANALOG_VIDEO
,
249 .portc
= CX23885_MPEG_DVB
,
250 .tuner_type
= TUNER_XC4000
,
253 .radio_addr
= ADDR_UNSET
,
255 .type
= CX23885_VMUX_TELEVISION
,
256 .vmux
= CX25840_VIN2_CH1
|
260 .type
= CX23885_VMUX_COMPOSITE1
,
261 .vmux
= CX25840_COMPOSITE1
,
263 .type
= CX23885_VMUX_SVIDEO
,
264 .vmux
= CX25840_SVIDEO_LUMA3
|
265 CX25840_SVIDEO_CHROMA4
,
267 .type
= CX23885_VMUX_COMPONENT
,
268 .vmux
= CX25840_VIN7_CH1
|
271 CX25840_COMPONENT_ON
,
274 [CX23885_BOARD_COMPRO_VIDEOMATE_E650F
] = {
275 .name
= "Compro VideoMate E650F",
276 .portc
= CX23885_MPEG_DVB
,
278 [CX23885_BOARD_TBS_6920
] = {
279 .name
= "TurboSight TBS 6920",
280 .portb
= CX23885_MPEG_DVB
,
282 [CX23885_BOARD_TBS_6980
] = {
283 .name
= "TurboSight TBS 6980",
284 .portb
= CX23885_MPEG_DVB
,
285 .portc
= CX23885_MPEG_DVB
,
287 [CX23885_BOARD_TBS_6981
] = {
288 .name
= "TurboSight TBS 6981",
289 .portb
= CX23885_MPEG_DVB
,
290 .portc
= CX23885_MPEG_DVB
,
292 [CX23885_BOARD_TEVII_S470
] = {
293 .name
= "TeVii S470",
294 .portb
= CX23885_MPEG_DVB
,
296 [CX23885_BOARD_DVBWORLD_2005
] = {
297 .name
= "DVBWorld DVB-S2 2005",
298 .portb
= CX23885_MPEG_DVB
,
300 [CX23885_BOARD_NETUP_DUAL_DVBS2_CI
] = {
302 .name
= "NetUP Dual DVB-S2 CI",
303 .portb
= CX23885_MPEG_DVB
,
304 .portc
= CX23885_MPEG_DVB
,
306 [CX23885_BOARD_HAUPPAUGE_HVR1270
] = {
307 .name
= "Hauppauge WinTV-HVR1270",
308 .portc
= CX23885_MPEG_DVB
,
310 [CX23885_BOARD_HAUPPAUGE_HVR1275
] = {
311 .name
= "Hauppauge WinTV-HVR1275",
312 .portc
= CX23885_MPEG_DVB
,
314 [CX23885_BOARD_HAUPPAUGE_HVR1255
] = {
315 .name
= "Hauppauge WinTV-HVR1255",
316 .porta
= CX23885_ANALOG_VIDEO
,
317 .portc
= CX23885_MPEG_DVB
,
318 .tuner_type
= TUNER_ABSENT
,
319 .tuner_addr
= 0x42, /* 0x84 >> 1 */
322 .type
= CX23885_VMUX_TELEVISION
,
323 .vmux
= CX25840_VIN7_CH3
|
327 .amux
= CX25840_AUDIO8
,
329 .type
= CX23885_VMUX_COMPOSITE1
,
330 .vmux
= CX25840_VIN7_CH3
|
333 .amux
= CX25840_AUDIO7
,
335 .type
= CX23885_VMUX_SVIDEO
,
336 .vmux
= CX25840_VIN7_CH3
|
340 .amux
= CX25840_AUDIO7
,
343 [CX23885_BOARD_HAUPPAUGE_HVR1255_22111
] = {
344 .name
= "Hauppauge WinTV-HVR1255",
345 .porta
= CX23885_ANALOG_VIDEO
,
346 .portc
= CX23885_MPEG_DVB
,
347 .tuner_type
= TUNER_ABSENT
,
348 .tuner_addr
= 0x42, /* 0x84 >> 1 */
351 .type
= CX23885_VMUX_TELEVISION
,
352 .vmux
= CX25840_VIN7_CH3
|
356 .amux
= CX25840_AUDIO8
,
358 .type
= CX23885_VMUX_SVIDEO
,
359 .vmux
= CX25840_VIN7_CH3
|
363 .amux
= CX25840_AUDIO7
,
366 [CX23885_BOARD_HAUPPAUGE_HVR1210
] = {
367 .name
= "Hauppauge WinTV-HVR1210",
368 .portc
= CX23885_MPEG_DVB
,
370 [CX23885_BOARD_MYGICA_X8506
] = {
371 .name
= "Mygica X8506 DMB-TH",
372 .tuner_type
= TUNER_XC5000
,
375 .porta
= CX23885_ANALOG_VIDEO
,
376 .portb
= CX23885_MPEG_DVB
,
379 .type
= CX23885_VMUX_TELEVISION
,
380 .vmux
= CX25840_COMPOSITE2
,
383 .type
= CX23885_VMUX_COMPOSITE1
,
384 .vmux
= CX25840_COMPOSITE8
,
387 .type
= CX23885_VMUX_SVIDEO
,
388 .vmux
= CX25840_SVIDEO_LUMA3
|
389 CX25840_SVIDEO_CHROMA4
,
392 .type
= CX23885_VMUX_COMPONENT
,
393 .vmux
= CX25840_COMPONENT_ON
|
400 [CX23885_BOARD_MAGICPRO_PROHDTVE2
] = {
401 .name
= "Magic-Pro ProHDTV Extreme 2",
402 .tuner_type
= TUNER_XC5000
,
405 .porta
= CX23885_ANALOG_VIDEO
,
406 .portb
= CX23885_MPEG_DVB
,
409 .type
= CX23885_VMUX_TELEVISION
,
410 .vmux
= CX25840_COMPOSITE2
,
413 .type
= CX23885_VMUX_COMPOSITE1
,
414 .vmux
= CX25840_COMPOSITE8
,
417 .type
= CX23885_VMUX_SVIDEO
,
418 .vmux
= CX25840_SVIDEO_LUMA3
|
419 CX25840_SVIDEO_CHROMA4
,
422 .type
= CX23885_VMUX_COMPONENT
,
423 .vmux
= CX25840_COMPONENT_ON
|
430 [CX23885_BOARD_HAUPPAUGE_HVR1850
] = {
431 .name
= "Hauppauge WinTV-HVR1850",
432 .porta
= CX23885_ANALOG_VIDEO
,
433 .portb
= CX23885_MPEG_ENCODER
,
434 .portc
= CX23885_MPEG_DVB
,
435 .tuner_type
= TUNER_ABSENT
,
436 .tuner_addr
= 0x42, /* 0x84 >> 1 */
439 .type
= CX23885_VMUX_TELEVISION
,
440 .vmux
= CX25840_VIN7_CH3
|
444 .amux
= CX25840_AUDIO8
,
446 .type
= CX23885_VMUX_COMPOSITE1
,
447 .vmux
= CX25840_VIN7_CH3
|
450 .amux
= CX25840_AUDIO7
,
452 .type
= CX23885_VMUX_SVIDEO
,
453 .vmux
= CX25840_VIN7_CH3
|
457 .amux
= CX25840_AUDIO7
,
460 [CX23885_BOARD_COMPRO_VIDEOMATE_E800
] = {
461 .name
= "Compro VideoMate E800",
462 .portc
= CX23885_MPEG_DVB
,
464 [CX23885_BOARD_HAUPPAUGE_HVR1290
] = {
465 .name
= "Hauppauge WinTV-HVR1290",
466 .portc
= CX23885_MPEG_DVB
,
468 [CX23885_BOARD_MYGICA_X8558PRO
] = {
469 .name
= "Mygica X8558 PRO DMB-TH",
470 .portb
= CX23885_MPEG_DVB
,
471 .portc
= CX23885_MPEG_DVB
,
473 [CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
] = {
474 .name
= "LEADTEK WinFast PxTV1200",
475 .porta
= CX23885_ANALOG_VIDEO
,
476 .tuner_type
= TUNER_XC2028
,
480 .type
= CX23885_VMUX_TELEVISION
,
481 .vmux
= CX25840_VIN2_CH1
|
485 .type
= CX23885_VMUX_COMPOSITE1
,
486 .vmux
= CX25840_COMPOSITE1
,
488 .type
= CX23885_VMUX_SVIDEO
,
489 .vmux
= CX25840_SVIDEO_LUMA3
|
490 CX25840_SVIDEO_CHROMA4
,
492 .type
= CX23885_VMUX_COMPONENT
,
493 .vmux
= CX25840_VIN7_CH1
|
496 CX25840_COMPONENT_ON
,
499 [CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
] = {
500 .name
= "GoTView X5 3D Hybrid",
501 .tuner_type
= TUNER_XC5000
,
504 .porta
= CX23885_ANALOG_VIDEO
,
505 .portb
= CX23885_MPEG_DVB
,
507 .type
= CX23885_VMUX_TELEVISION
,
508 .vmux
= CX25840_VIN2_CH1
|
512 .type
= CX23885_VMUX_COMPOSITE1
,
513 .vmux
= CX23885_VMUX_COMPOSITE1
,
515 .type
= CX23885_VMUX_SVIDEO
,
516 .vmux
= CX25840_SVIDEO_LUMA3
|
517 CX25840_SVIDEO_CHROMA4
,
520 [CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
] = {
522 .name
= "NetUP Dual DVB-T/C-CI RF",
523 .porta
= CX23885_ANALOG_VIDEO
,
524 .portb
= CX23885_MPEG_DVB
,
525 .portc
= CX23885_MPEG_DVB
,
528 .tuner_type
= TUNER_XC5000
,
531 .type
= CX23885_VMUX_TELEVISION
,
532 .vmux
= CX25840_COMPOSITE1
,
535 [CX23885_BOARD_MPX885
] = {
537 .porta
= CX23885_ANALOG_VIDEO
,
539 .type
= CX23885_VMUX_COMPOSITE1
,
540 .vmux
= CX25840_COMPOSITE1
,
541 .amux
= CX25840_AUDIO6
,
544 .type
= CX23885_VMUX_COMPOSITE2
,
545 .vmux
= CX25840_COMPOSITE2
,
546 .amux
= CX25840_AUDIO6
,
549 .type
= CX23885_VMUX_COMPOSITE3
,
550 .vmux
= CX25840_COMPOSITE3
,
551 .amux
= CX25840_AUDIO7
,
554 .type
= CX23885_VMUX_COMPOSITE4
,
555 .vmux
= CX25840_COMPOSITE4
,
556 .amux
= CX25840_AUDIO7
,
560 [CX23885_BOARD_MYGICA_X8507
] = {
561 .name
= "Mygica X8502/X8507 ISDB-T",
562 .tuner_type
= TUNER_XC5000
,
565 .porta
= CX23885_ANALOG_VIDEO
,
566 .portb
= CX23885_MPEG_DVB
,
569 .type
= CX23885_VMUX_TELEVISION
,
570 .vmux
= CX25840_COMPOSITE2
,
571 .amux
= CX25840_AUDIO8
,
574 .type
= CX23885_VMUX_COMPOSITE1
,
575 .vmux
= CX25840_COMPOSITE8
,
576 .amux
= CX25840_AUDIO7
,
579 .type
= CX23885_VMUX_SVIDEO
,
580 .vmux
= CX25840_SVIDEO_LUMA3
|
581 CX25840_SVIDEO_CHROMA4
,
582 .amux
= CX25840_AUDIO7
,
585 .type
= CX23885_VMUX_COMPONENT
,
586 .vmux
= CX25840_COMPONENT_ON
|
590 .amux
= CX25840_AUDIO7
,
594 [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
] = {
595 .name
= "TerraTec Cinergy T PCIe Dual",
596 .portb
= CX23885_MPEG_DVB
,
597 .portc
= CX23885_MPEG_DVB
,
599 [CX23885_BOARD_TEVII_S471
] = {
600 .name
= "TeVii S471",
601 .portb
= CX23885_MPEG_DVB
,
603 [CX23885_BOARD_PROF_8000
] = {
604 .name
= "Prof Revolution DVB-S2 8000",
605 .portb
= CX23885_MPEG_DVB
,
607 [CX23885_BOARD_HAUPPAUGE_HVR4400
] = {
608 .name
= "Hauppauge WinTV-HVR4400/HVR5500",
609 .porta
= CX23885_ANALOG_VIDEO
,
610 .portb
= CX23885_MPEG_DVB
,
611 .portc
= CX23885_MPEG_DVB
,
612 .tuner_type
= TUNER_NXP_TDA18271
,
613 .tuner_addr
= 0x60, /* 0xc0 >> 1 */
616 [CX23885_BOARD_HAUPPAUGE_STARBURST
] = {
617 .name
= "Hauppauge WinTV Starburst",
618 .portb
= CX23885_MPEG_DVB
,
620 [CX23885_BOARD_AVERMEDIA_HC81R
] = {
621 .name
= "AVerTV Hybrid Express Slim HC81R",
622 .tuner_type
= TUNER_XC2028
,
623 .tuner_addr
= 0x61, /* 0xc2 >> 1 */
625 .porta
= CX23885_ANALOG_VIDEO
,
627 .type
= CX23885_VMUX_TELEVISION
,
628 .vmux
= CX25840_VIN2_CH1
|
632 .amux
= CX25840_AUDIO8
,
634 .type
= CX23885_VMUX_SVIDEO
,
635 .vmux
= CX25840_VIN8_CH1
|
639 .amux
= CX25840_AUDIO6
,
641 .type
= CX23885_VMUX_COMPONENT
,
642 .vmux
= CX25840_VIN1_CH1
|
646 .amux
= CX25840_AUDIO6
,
649 [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
] = {
650 .name
= "DViCO FusionHDTV DVB-T Dual Express2",
651 .portb
= CX23885_MPEG_DVB
,
652 .portc
= CX23885_MPEG_DVB
,
654 [CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
] = {
655 .name
= "Hauppauge ImpactVCB-e",
656 .tuner_type
= TUNER_ABSENT
,
657 .porta
= CX23885_ANALOG_VIDEO
,
659 .type
= CX23885_VMUX_COMPOSITE1
,
660 .vmux
= CX25840_VIN7_CH3
|
663 .amux
= CX25840_AUDIO7
,
665 .type
= CX23885_VMUX_SVIDEO
,
666 .vmux
= CX25840_VIN7_CH3
|
670 .amux
= CX25840_AUDIO7
,
673 [CX23885_BOARD_DVBSKY_T9580
] = {
674 .name
= "DVBSky T9580",
675 .portb
= CX23885_MPEG_DVB
,
676 .portc
= CX23885_MPEG_DVB
,
678 [CX23885_BOARD_DVBSKY_T980C
] = {
679 .name
= "DVBSky T980C",
680 .portb
= CX23885_MPEG_DVB
,
682 [CX23885_BOARD_DVBSKY_S950C
] = {
683 .name
= "DVBSky S950C",
684 .portb
= CX23885_MPEG_DVB
,
686 [CX23885_BOARD_TT_CT2_4500_CI
] = {
687 .name
= "Technotrend TT-budget CT2-4500 CI",
688 .portb
= CX23885_MPEG_DVB
,
690 [CX23885_BOARD_DVBSKY_S950
] = {
691 .name
= "DVBSky S950",
692 .portb
= CX23885_MPEG_DVB
,
694 [CX23885_BOARD_DVBSKY_S952
] = {
695 .name
= "DVBSky S952",
696 .portb
= CX23885_MPEG_DVB
,
697 .portc
= CX23885_MPEG_DVB
,
699 [CX23885_BOARD_DVBSKY_T982
] = {
700 .name
= "DVBSky T982",
701 .portb
= CX23885_MPEG_DVB
,
702 .portc
= CX23885_MPEG_DVB
,
704 [CX23885_BOARD_HAUPPAUGE_HVR5525
] = {
705 .name
= "Hauppauge WinTV-HVR5525",
706 .portb
= CX23885_MPEG_DVB
,
707 .portc
= CX23885_MPEG_DVB
,
709 [CX23885_BOARD_VIEWCAST_260E
] = {
710 .name
= "ViewCast 260e",
711 .porta
= CX23885_ANALOG_VIDEO
,
714 .type
= CX23885_VMUX_COMPOSITE1
,
715 .vmux
= CX25840_VIN6_CH1
,
716 .amux
= CX25840_AUDIO7
,
718 .type
= CX23885_VMUX_SVIDEO
,
719 .vmux
= CX25840_VIN7_CH3
|
722 .amux
= CX25840_AUDIO7
,
724 .type
= CX23885_VMUX_COMPONENT
,
725 .vmux
= CX25840_VIN7_CH3
|
728 CX25840_COMPONENT_ON
,
729 .amux
= CX25840_AUDIO7
,
732 [CX23885_BOARD_VIEWCAST_460E
] = {
733 .name
= "ViewCast 460e",
734 .porta
= CX23885_ANALOG_VIDEO
,
737 .type
= CX23885_VMUX_COMPOSITE1
,
738 .vmux
= CX25840_VIN4_CH1
,
739 .amux
= CX25840_AUDIO7
,
741 .type
= CX23885_VMUX_SVIDEO
,
742 .vmux
= CX25840_VIN7_CH3
|
745 .amux
= CX25840_AUDIO7
,
747 .type
= CX23885_VMUX_COMPONENT
,
748 .vmux
= CX25840_VIN7_CH3
|
751 CX25840_COMPONENT_ON
,
752 .amux
= CX25840_AUDIO7
,
754 .type
= CX23885_VMUX_COMPOSITE2
,
755 .vmux
= CX25840_VIN6_CH1
,
756 .amux
= CX25840_AUDIO7
,
759 [CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
] = {
760 .name
= "Hauppauge WinTV-QuadHD-DVB",
761 .portb
= CX23885_MPEG_DVB
,
762 .portc
= CX23885_MPEG_DVB
,
764 [CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885
] = {
765 .name
= "Hauppauge WinTV-QuadHD-DVB(885)",
766 .portb
= CX23885_MPEG_DVB
,
767 .portc
= CX23885_MPEG_DVB
,
769 [CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
] = {
770 .name
= "Hauppauge WinTV-QuadHD-ATSC",
771 .portb
= CX23885_MPEG_DVB
,
772 .portc
= CX23885_MPEG_DVB
,
774 [CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885
] = {
775 .name
= "Hauppauge WinTV-QuadHD-ATSC(885)",
776 .portb
= CX23885_MPEG_DVB
,
777 .portc
= CX23885_MPEG_DVB
,
779 [CX23885_BOARD_HAUPPAUGE_HVR1265_K4
] = {
780 .name
= "Hauppauge WinTV-HVR-1265(161111)",
781 .porta
= CX23885_ANALOG_VIDEO
,
782 .portc
= CX23885_MPEG_DVB
,
783 .tuner_type
= TUNER_ABSENT
,
786 .type
= CX23885_VMUX_COMPOSITE1
,
787 .vmux
= CX25840_VIN7_CH3
|
790 .amux
= CX25840_AUDIO7
,
792 .type
= CX23885_VMUX_SVIDEO
,
793 .vmux
= CX25840_VIN7_CH3
|
797 .amux
= CX25840_AUDIO7
,
800 [CX23885_BOARD_HAUPPAUGE_STARBURST2
] = {
801 .name
= "Hauppauge WinTV-Starburst2",
802 .portb
= CX23885_MPEG_DVB
,
804 [CX23885_BOARD_AVERMEDIA_CE310B
] = {
805 .name
= "AVerMedia CE310B",
806 .porta
= CX23885_ANALOG_VIDEO
,
809 .type
= CX23885_VMUX_COMPOSITE1
,
810 .vmux
= CX25840_VIN1_CH1
|
813 .amux
= CX25840_AUDIO7
,
815 .type
= CX23885_VMUX_SVIDEO
,
816 .vmux
= CX25840_VIN8_CH1
|
820 .amux
= CX25840_AUDIO7
,
824 const unsigned int cx23885_bcount
= ARRAY_SIZE(cx23885_boards
);
826 /* ------------------------------------------------------------------ */
827 /* PCI subsystem IDs */
829 struct cx23885_subid cx23885_subids
[] = {
833 .card
= CX23885_BOARD_UNKNOWN
,
837 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800lp
,
841 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
845 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
849 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
853 .card
= CX23885_BOARD_HAUPPAUGE_HVR1250
,
857 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
,
861 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
865 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
869 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
873 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
877 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
881 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
885 .card
= CX23885_BOARD_HAUPPAUGE_HVR1700
,
889 .card
= CX23885_BOARD_HAUPPAUGE_HVR1400
,
893 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
,
897 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
,
901 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
,
905 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
,
909 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
,
913 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E650F
,
917 .card
= CX23885_BOARD_TBS_6920
,
921 .card
= CX23885_BOARD_TBS_6980
,
925 .card
= CX23885_BOARD_TBS_6981
,
929 .card
= CX23885_BOARD_TEVII_S470
,
933 .card
= CX23885_BOARD_DVBWORLD_2005
,
937 .card
= CX23885_BOARD_NETUP_DUAL_DVBS2_CI
,
941 .card
= CX23885_BOARD_HAUPPAUGE_HVR1270
,
945 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
949 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
953 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
957 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255_22111
,
961 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
965 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
969 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
973 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
977 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
981 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
985 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
989 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
993 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
997 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
1000 .subdevice
= 0x8651,
1001 .card
= CX23885_BOARD_MYGICA_X8506
,
1003 .subvendor
= 0x14f1,
1004 .subdevice
= 0x8657,
1005 .card
= CX23885_BOARD_MAGICPRO_PROHDTVE2
,
1007 .subvendor
= 0x0070,
1008 .subdevice
= 0x8541,
1009 .card
= CX23885_BOARD_HAUPPAUGE_HVR1850
,
1011 .subvendor
= 0x1858,
1012 .subdevice
= 0xe800,
1013 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E800
,
1015 .subvendor
= 0x0070,
1016 .subdevice
= 0x8551,
1017 .card
= CX23885_BOARD_HAUPPAUGE_HVR1290
,
1019 .subvendor
= 0x14f1,
1020 .subdevice
= 0x8578,
1021 .card
= CX23885_BOARD_MYGICA_X8558PRO
,
1023 .subvendor
= 0x107d,
1024 .subdevice
= 0x6f22,
1025 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
,
1027 .subvendor
= 0x5654,
1028 .subdevice
= 0x2390,
1029 .card
= CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
,
1031 .subvendor
= 0x1b55,
1032 .subdevice
= 0xe2e4,
1033 .card
= CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
,
1035 .subvendor
= 0x14f1,
1036 .subdevice
= 0x8502,
1037 .card
= CX23885_BOARD_MYGICA_X8507
,
1039 .subvendor
= 0x153b,
1040 .subdevice
= 0x117e,
1041 .card
= CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
,
1043 .subvendor
= 0xd471,
1044 .subdevice
= 0x9022,
1045 .card
= CX23885_BOARD_TEVII_S471
,
1047 .subvendor
= 0x8000,
1048 .subdevice
= 0x3034,
1049 .card
= CX23885_BOARD_PROF_8000
,
1051 .subvendor
= 0x0070,
1052 .subdevice
= 0xc108,
1053 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
, /* Hauppauge WinTV HVR-4400 (Model 121xxx, Hybrid DVB-T/S2, IR) */
1055 .subvendor
= 0x0070,
1056 .subdevice
= 0xc138,
1057 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2, IR) */
1059 .subvendor
= 0x0070,
1060 .subdevice
= 0xc12a,
1061 .card
= CX23885_BOARD_HAUPPAUGE_STARBURST
, /* Hauppauge WinTV Starburst (Model 121x00, DVB-S2, IR) */
1063 .subvendor
= 0x0070,
1064 .subdevice
= 0xc1f8,
1065 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2, IR) */
1067 .subvendor
= 0x1461,
1068 .subdevice
= 0xd939,
1069 .card
= CX23885_BOARD_AVERMEDIA_HC81R
,
1071 .subvendor
= 0x0070,
1072 .subdevice
= 0x7133,
1073 .card
= CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
,
1075 .subvendor
= 0x0070,
1076 .subdevice
= 0x7137,
1077 .card
= CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
,
1079 .subvendor
= 0x18ac,
1080 .subdevice
= 0xdb98,
1081 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
,
1083 .subvendor
= 0x4254,
1084 .subdevice
= 0x9580,
1085 .card
= CX23885_BOARD_DVBSKY_T9580
,
1087 .subvendor
= 0x4254,
1088 .subdevice
= 0x980c,
1089 .card
= CX23885_BOARD_DVBSKY_T980C
,
1091 .subvendor
= 0x4254,
1092 .subdevice
= 0x950c,
1093 .card
= CX23885_BOARD_DVBSKY_S950C
,
1095 .subvendor
= 0x13c2,
1096 .subdevice
= 0x3013,
1097 .card
= CX23885_BOARD_TT_CT2_4500_CI
,
1099 .subvendor
= 0x4254,
1100 .subdevice
= 0x0950,
1101 .card
= CX23885_BOARD_DVBSKY_S950
,
1103 .subvendor
= 0x4254,
1104 .subdevice
= 0x0952,
1105 .card
= CX23885_BOARD_DVBSKY_S952
,
1107 .subvendor
= 0x4254,
1108 .subdevice
= 0x0982,
1109 .card
= CX23885_BOARD_DVBSKY_T982
,
1111 .subvendor
= 0x0070,
1112 .subdevice
= 0xf038,
1113 .card
= CX23885_BOARD_HAUPPAUGE_HVR5525
,
1115 .subvendor
= 0x1576,
1116 .subdevice
= 0x0260,
1117 .card
= CX23885_BOARD_VIEWCAST_260E
,
1119 .subvendor
= 0x1576,
1120 .subdevice
= 0x0460,
1121 .card
= CX23885_BOARD_VIEWCAST_460E
,
1123 .subvendor
= 0x0070,
1124 .subdevice
= 0x6a28,
1125 .card
= CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
, /* Tuner Pair 1 */
1127 .subvendor
= 0x0070,
1128 .subdevice
= 0x6b28,
1129 .card
= CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
, /* Tuner Pair 2 */
1131 .subvendor
= 0x0070,
1132 .subdevice
= 0x6a18,
1133 .card
= CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
, /* Tuner Pair 1 */
1135 .subvendor
= 0x0070,
1136 .subdevice
= 0x6b18,
1137 .card
= CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
, /* Tuner Pair 2 */
1139 .subvendor
= 0x0070,
1140 .subdevice
= 0x2a18,
1141 .card
= CX23885_BOARD_HAUPPAUGE_HVR1265_K4
, /* Hauppauge WinTV HVR-1265 (Model 161xx1, Hybrid ATSC/QAM-B) */
1143 .subvendor
= 0x0070,
1144 .subdevice
= 0xf02a,
1145 .card
= CX23885_BOARD_HAUPPAUGE_STARBURST2
,
1147 .subvendor
= 0x1461,
1148 .subdevice
= 0x3100,
1149 .card
= CX23885_BOARD_AVERMEDIA_CE310B
,
1152 const unsigned int cx23885_idcount
= ARRAY_SIZE(cx23885_subids
);
1154 void cx23885_card_list(struct cx23885_dev
*dev
)
1158 if (0 == dev
->pci
->subsystem_vendor
&&
1159 0 == dev
->pci
->subsystem_device
) {
1160 pr_info("%s: Board has no valid PCIe Subsystem ID and can't\n"
1161 "%s: be autodetected. Pass card=<n> insmod option\n"
1162 "%s: to workaround that. Redirect complaints to the\n"
1163 "%s: vendor of the TV card. Best regards,\n"
1165 dev
->name
, dev
->name
, dev
->name
, dev
->name
, dev
->name
);
1167 pr_info("%s: Your board isn't known (yet) to the driver.\n"
1168 "%s: Try to pick one of the existing card configs via\n"
1169 "%s: card=<n> insmod option. Updating to the latest\n"
1170 "%s: version might help as well.\n",
1171 dev
->name
, dev
->name
, dev
->name
, dev
->name
);
1173 pr_info("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1175 for (i
= 0; i
< cx23885_bcount
; i
++)
1176 pr_info("%s: card=%d -> %s\n",
1177 dev
->name
, i
, cx23885_boards
[i
].name
);
1180 static void viewcast_eeprom(struct cx23885_dev
*dev
, u8
*eeprom_data
)
1184 /* The serial number record begins with tag 0x59 */
1185 if (*(eeprom_data
+ 0x00) != 0x59) {
1186 pr_info("%s() eeprom records are undefined, no serial number\n",
1191 sn
= (*(eeprom_data
+ 0x06) << 24) |
1192 (*(eeprom_data
+ 0x05) << 16) |
1193 (*(eeprom_data
+ 0x04) << 8) |
1194 (*(eeprom_data
+ 0x03));
1196 pr_info("%s: card '%s' sn# MM%d\n",
1198 cx23885_boards
[dev
->board
].name
,
1202 static void hauppauge_eeprom(struct cx23885_dev
*dev
, u8
*eeprom_data
)
1206 tveeprom_hauppauge_analog(&tv
, eeprom_data
);
1208 /* Make sure we support the board model */
1211 /* WinTV-HVR1270 (PCIe, Retail, half height)
1212 * ATSC/QAM and basic analog, IR Blast */
1214 /* WinTV-HVR1210 (PCIe, Retail, half height)
1215 * DVB-T and basic analog, IR Blast */
1217 /* WinTV-HVR1270 (PCIe, Retail, half height)
1218 * ATSC/QAM and basic analog, IR Recv */
1220 /* WinTV-HVR1210 (PCIe, Retail, half height)
1221 * DVB-T and basic analog, IR Recv */
1223 /* WinTV-HVR1275 (PCIe, Retail, half height)
1224 * ATSC/QAM and basic analog, IR Recv */
1226 /* WinTV-HVR1210 (PCIe, Retail, half height)
1227 * DVB-T and basic analog, IR Recv */
1229 /* WinTV-HVR1270 (PCIe, Retail, full height)
1230 * ATSC/QAM and basic analog, IR Blast */
1232 /* WinTV-HVR1210 (PCIe, Retail, full height)
1233 * DVB-T and basic analog, IR Blast */
1235 /* WinTV-HVR1270 (PCIe, Retail, full height)
1236 * ATSC/QAM and basic analog, IR Recv */
1238 /* WinTV-HVR1210 (PCIe, Retail, full height)
1239 * DVB-T and basic analog, IR Recv */
1241 /* WinTV-HVR1275 (PCIe, Retail, full height)
1242 * ATSC/QAM and basic analog, IR Recv */
1244 /* WinTV-HVR1210 (PCIe, Retail, full height)
1245 * DVB-T and basic analog, IR Recv */
1247 /* WinTV-HVR1200 (PCIe, Retail, full height)
1248 * DVB-T and basic analog */
1250 /* WinTV-ImpactVCB-e (PCIe, Retail, half height)
1253 /* WinTV-HVR1200 (PCIe, OEM, half height)
1254 * DVB-T and basic analog */
1256 /* WinTV-HVR1200 (PCIe, OEM, half height)
1257 * DVB-T and basic analog */
1259 /* WinTV-HVR1200 (PCIe, OEM, full height)
1260 * DVB-T and basic analog */
1262 /* WinTV-HVR1200 (PCIe, OEM, half height)
1263 * DVB-T and basic analog */
1265 /* WinTV-HVR1200 (PCIe, OEM, full height)
1266 * DVB-T and basic analog */
1268 /* WinTV-HVR1200 (PCIe, OEM, full height)
1269 * DVB-T and basic analog */
1271 /* WinTV-HVR1200 (PCIe, OEM, half height)
1272 * DVB-T and basic analog */
1274 /* WinTV-HVR1200 (PCIe, OEM, full height)
1275 * DVB-T and basic analog */
1277 /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual
1278 channel ATSC and MPEG2 HW Encoder */
1280 /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC
1283 /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC
1286 /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM
1289 /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM
1292 /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM,
1293 Dual channel ATSC and MPEG2 HW Encoder */
1295 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
1296 Dual channel ATSC and MPEG2 HW Encoder */
1298 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
1299 Dual channel ATSC and MPEG2 HW Encoder */
1301 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM,
1302 Dual channel ATSC and MPEG2 HW Encoder */
1304 /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM,
1305 Dual channel ATSC and MPEG2 HW Encoder */
1307 /* WinTV-HVR1250 (PCIe, Retail, IR, full height,
1308 ATSC and Basic analog */
1310 /* WinTV-HVR1250 (PCIe, Retail, IR, half height,
1311 ATSC and Basic analog */
1313 /* WinTV-HVR1250 (PCIe, No IR, half height,
1314 ATSC [at least] and Basic analog) */
1316 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
1317 ATSC and Basic analog */
1319 /* WinTV-HVR1250 (PCIe, OEM, No IR, full height,
1320 ATSC and Basic analog */
1322 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
1323 ATSC and Basic analog */
1325 /* WinTV-HVR1400 (Express Card, Retail, IR,
1326 * DVB-T and Basic analog */
1328 /* WinTV-HVR1700 (PCIe, OEM, No IR, half height)
1329 * DVB-T and MPEG2 HW Encoder */
1331 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height)
1332 * DVB-T and MPEG2 HW Encoder */
1335 /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM,
1336 Dual channel ATSC and MPEG2 HW Encoder */
1339 /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR,
1340 Dual channel ATSC and Basic analog */
1342 /* WinTV-HVR4400 (PCIe, DVB-S2, DVB-C/T) */
1345 /* WinTV-HVR5500 (PCIe, DVB-S2, DVB-C/T) */
1348 /* WinTV-HVR5525 (PCIe, DVB-S/S2, DVB-T/T2/C) */
1351 /* WinTV-HVR-1265 K4 (PCIe, Analog/ATSC/QAM-B) */
1353 case 166100: /* 888 version, hybrid */
1354 case 166200: /* 885 version, DVB only */
1355 /* WinTV-QuadHD (DVB) Tuner Pair 1 (PCIe, IR, half height,
1356 DVB-T/T2/C, DVB-T/T2/C */
1358 case 166101: /* 888 version, hybrid */
1359 case 166201: /* 885 version, DVB only */
1360 /* WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height,
1361 DVB-T/T2/C, DVB-T/T2/C */
1363 case 165100: /* 888 version, hybrid */
1364 case 165200: /* 885 version, digital only */
1365 /* WinTV-QuadHD (ATSC) Tuner Pair 1 (PCIe, IR, half height,
1366 * ATSC/QAM-B, ATSC/QAM-B */
1368 case 165101: /* 888 version, hybrid */
1369 case 165201: /* 885 version, digital only */
1370 /* WinTV-QuadHD (ATSC) Tuner Pair 2 (PCIe, IR, half height,
1371 * ATSC/QAM-B, ATSC/QAM-B */
1374 pr_warn("%s: warning: unknown hauppauge model #%d\n",
1375 dev
->name
, tv
.model
);
1379 pr_info("%s: hauppauge eeprom: model=%d\n",
1380 dev
->name
, tv
.model
);
1383 /* Some TBS cards require initing a chip using a bitbanged SPI attached
1384 to the cx23885 gpio's. If this chip doesn't get init'ed the demod
1385 doesn't respond to any command. */
1386 static void tbs_card_init(struct cx23885_dev
*dev
)
1389 static const u8 buf
[] = {
1390 0xe0, 0x06, 0x66, 0x33, 0x65,
1391 0x01, 0x17, 0x06, 0xde};
1393 switch (dev
->board
) {
1394 case CX23885_BOARD_TBS_6980
:
1395 case CX23885_BOARD_TBS_6981
:
1396 cx_set(GP0_IO
, 0x00070007);
1397 usleep_range(1000, 10000);
1398 cx_clear(GP0_IO
, 2);
1399 usleep_range(1000, 10000);
1400 for (i
= 0; i
< 9 * 8; i
++) {
1401 cx_clear(GP0_IO
, 7);
1402 usleep_range(1000, 10000);
1404 ((buf
[i
>> 3] >> (7 - (i
& 7))) & 1) | 4);
1405 usleep_range(1000, 10000);
1412 int cx23885_tuner_callback(void *priv
, int component
, int command
, int arg
)
1414 struct cx23885_tsport
*port
= priv
;
1415 struct cx23885_dev
*dev
= port
->dev
;
1418 if ((command
== XC2028_RESET_CLK
) || (command
== XC2028_I2C_FLUSH
))
1422 pr_err("%s(): Unknown command 0x%x.\n",
1427 switch (dev
->board
) {
1428 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1429 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1430 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1431 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1432 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1433 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1434 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1435 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1436 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1437 /* Tuner Reset Command */
1440 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1441 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1442 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
:
1443 /* Two identical tuners on two different i2c buses,
1444 * we need to reset the correct gpio. */
1447 else if (port
->nr
== 2)
1450 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1451 /* Tuner Reset Command */
1454 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1455 altera_ci_tuner_reset(dev
, port
->nr
);
1457 case CX23885_BOARD_AVERMEDIA_HC81R
:
1458 /* XC3028L Reset Command */
1464 /* Drive the tuner into reset and back out */
1465 cx_clear(GP0_IO
, bitmask
);
1467 cx_set(GP0_IO
, bitmask
);
1473 void cx23885_gpio_setup(struct cx23885_dev
*dev
)
1475 switch (dev
->board
) {
1476 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1477 /* GPIO-0 cx24227 demodulator reset */
1478 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
1480 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1481 /* GPIO-0 cx24227 demodulator */
1482 /* GPIO-2 xc3028 tuner */
1484 /* Put the parts into reset */
1485 cx_set(GP0_IO
, 0x00050000);
1486 cx_clear(GP0_IO
, 0x00000005);
1489 /* Bring the parts out of reset */
1490 cx_set(GP0_IO
, 0x00050005);
1492 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1493 /* GPIO-0 cx24227 demodulator reset */
1494 /* GPIO-2 xc5000 tuner reset */
1495 cx_set(GP0_IO
, 0x00050005); /* Bring the part out of reset */
1497 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1498 /* GPIO-0 656_CLK */
1500 /* GPIO-2 8295A Reset */
1501 /* GPIO-3-10 cx23417 data0-7 */
1502 /* GPIO-11-14 cx23417 addr0-3 */
1503 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1506 /* CX23417 GPIO's */
1507 /* EIO15 Zilog Reset */
1508 /* EIO14 S5H1409/CX24227 Reset */
1509 mc417_gpio_enable(dev
, GPIO_15
| GPIO_14
, 1);
1511 /* Put the demod into reset and protect the eeprom */
1512 mc417_gpio_clear(dev
, GPIO_15
| GPIO_14
);
1515 /* Bring the demod and blaster out of reset */
1516 mc417_gpio_set(dev
, GPIO_15
| GPIO_14
);
1519 /* Force the TDA8295A into reset and back */
1520 cx23885_gpio_enable(dev
, GPIO_2
, 1);
1521 cx23885_gpio_set(dev
, GPIO_2
);
1523 cx23885_gpio_clear(dev
, GPIO_2
);
1525 cx23885_gpio_set(dev
, GPIO_2
);
1528 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1529 /* GPIO-0 tda10048 demodulator reset */
1530 /* GPIO-2 tda18271 tuner reset */
1532 /* Put the parts into reset and back */
1533 cx_set(GP0_IO
, 0x00050000);
1535 cx_clear(GP0_IO
, 0x00000005);
1537 cx_set(GP0_IO
, 0x00050005);
1539 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1540 /* GPIO-0 TDA10048 demodulator reset */
1541 /* GPIO-2 TDA8295A Reset */
1542 /* GPIO-3-10 cx23417 data0-7 */
1543 /* GPIO-11-14 cx23417 addr0-3 */
1544 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1546 /* The following GPIO's are on the interna AVCore (cx25840) */
1548 /* GPIO-20 IR_TX 416/DVBT Select */
1549 /* GPIO-21 IIS DAT */
1550 /* GPIO-22 IIS WCLK */
1551 /* GPIO-23 IIS BCLK */
1553 /* Put the parts into reset and back */
1554 cx_set(GP0_IO
, 0x00050000);
1556 cx_clear(GP0_IO
, 0x00000005);
1558 cx_set(GP0_IO
, 0x00050005);
1560 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1561 /* GPIO-0 Dibcom7000p demodulator reset */
1562 /* GPIO-2 xc3028L tuner reset */
1565 /* Put the parts into reset and back */
1566 cx_set(GP0_IO
, 0x00050000);
1568 cx_clear(GP0_IO
, 0x00000005);
1570 cx_set(GP0_IO
, 0x00050005);
1572 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1573 /* GPIO-0 xc5000 tuner reset i2c bus 0 */
1574 /* GPIO-1 s5h1409 demod reset i2c bus 0 */
1575 /* GPIO-2 xc5000 tuner reset i2c bus 1 */
1576 /* GPIO-3 s5h1409 demod reset i2c bus 0 */
1578 /* Put the parts into reset and back */
1579 cx_set(GP0_IO
, 0x000f0000);
1581 cx_clear(GP0_IO
, 0x0000000f);
1583 cx_set(GP0_IO
, 0x000f000f);
1585 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1586 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
:
1587 /* GPIO-0 portb xc3028 reset */
1588 /* GPIO-1 portb zl10353 reset */
1589 /* GPIO-2 portc xc3028 reset */
1590 /* GPIO-3 portc zl10353 reset */
1592 /* Put the parts into reset and back */
1593 cx_set(GP0_IO
, 0x000f0000);
1595 cx_clear(GP0_IO
, 0x0000000f);
1597 cx_set(GP0_IO
, 0x000f000f);
1599 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1600 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1601 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1602 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1603 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1604 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1605 /* GPIO-2 xc3028 tuner reset */
1607 /* The following GPIO's are on the internal AVCore (cx25840) */
1608 /* GPIO-? zl10353 demod reset */
1610 /* Put the parts into reset and back */
1611 cx_set(GP0_IO
, 0x00040000);
1613 cx_clear(GP0_IO
, 0x00000004);
1615 cx_set(GP0_IO
, 0x00040004);
1617 case CX23885_BOARD_TBS_6920
:
1618 case CX23885_BOARD_TBS_6980
:
1619 case CX23885_BOARD_TBS_6981
:
1620 case CX23885_BOARD_PROF_8000
:
1621 cx_write(MC417_CTL
, 0x00000036);
1622 cx_write(MC417_OEN
, 0x00001000);
1623 cx_set(MC417_RWD
, 0x00000002);
1625 cx_clear(MC417_RWD
, 0x00000800);
1627 cx_set(MC417_RWD
, 0x00000800);
1630 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1631 /* GPIO-0 INTA from CiMax1
1632 GPIO-1 INTB from CiMax2
1634 GPIO-3 to GPIO-10 data/addr for CA
1635 GPIO-11 ~CS0 to CiMax1
1636 GPIO-12 ~CS1 to CiMax2
1637 GPIO-13 ADL0 load LSB addr
1638 GPIO-14 ADL1 load MSB addr
1639 GPIO-15 ~RDY from CiMax
1640 GPIO-17 ~RD to CiMax
1641 GPIO-18 ~WR to CiMax
1643 cx_set(GP0_IO
, 0x00040000); /* GPIO as out */
1644 /* GPIO1 and GPIO2 as INTA and INTB from CiMaxes, reset low */
1645 cx_clear(GP0_IO
, 0x00030004);
1646 msleep(100);/* reset delay */
1647 cx_set(GP0_IO
, 0x00040004); /* GPIO as out, reset high */
1648 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO3-18 pins */
1649 /* GPIO-15 IN as ~ACK, rest as OUT */
1650 cx_write(MC417_OEN
, 0x00001000);
1651 /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */
1652 cx_write(MC417_RWD
, 0x0000c300);
1654 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
1656 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1657 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1658 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1659 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1660 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1661 /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */
1662 /* GPIO-6 I2C Gate which can isolate the demod from the bus */
1663 /* GPIO-9 Demod reset */
1665 /* Put the parts into reset and back */
1666 cx23885_gpio_enable(dev
, GPIO_9
| GPIO_6
| GPIO_5
, 1);
1667 cx23885_gpio_set(dev
, GPIO_9
| GPIO_6
| GPIO_5
);
1668 cx23885_gpio_clear(dev
, GPIO_9
);
1670 cx23885_gpio_set(dev
, GPIO_9
);
1672 case CX23885_BOARD_MYGICA_X8506
:
1673 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1674 case CX23885_BOARD_MYGICA_X8507
:
1675 /* GPIO-0 (0)Analog / (1)Digital TV */
1676 /* GPIO-1 reset XC5000 */
1677 /* GPIO-2 demod reset */
1678 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
| GPIO_2
, 1);
1679 cx23885_gpio_clear(dev
, GPIO_1
| GPIO_2
);
1681 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
| GPIO_2
);
1684 case CX23885_BOARD_MYGICA_X8558PRO
:
1685 /* GPIO-0 reset first ATBM8830 */
1686 /* GPIO-1 reset second ATBM8830 */
1687 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
, 1);
1688 cx23885_gpio_clear(dev
, GPIO_0
| GPIO_1
);
1690 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
);
1693 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1694 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1695 /* GPIO-0 656_CLK */
1698 /* GPIO-3-10 cx23417 data0-7 */
1699 /* GPIO-11-14 cx23417 addr0-3 */
1700 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1702 /* GPIO-20 C_IR_TX */
1703 /* GPIO-21 I2S DAT */
1704 /* GPIO-22 I2S WCLK */
1705 /* GPIO-23 I2S BCLK */
1706 /* ALT GPIO: EXP GPIO LATCH */
1708 /* CX23417 GPIO's */
1709 /* GPIO-14 S5H1411/CX24228 Reset */
1710 /* GPIO-13 EEPROM write protect */
1711 mc417_gpio_enable(dev
, GPIO_14
| GPIO_13
, 1);
1713 /* Put the demod into reset and protect the eeprom */
1714 mc417_gpio_clear(dev
, GPIO_14
| GPIO_13
);
1717 /* Bring the demod out of reset */
1718 mc417_gpio_set(dev
, GPIO_14
);
1722 /* Connected to IF / Mux */
1724 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1725 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
1727 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1730 GPIO-2 ~reset chips out
1731 GPIO-3 to GPIO-10 data/addr for CA in/out
1741 cx_set(GP0_IO
, 0x00060000); /* GPIO-1,2 as out */
1742 /* GPIO-0 as INT, reset & TMS low */
1743 cx_clear(GP0_IO
, 0x00010006);
1744 msleep(100);/* reset delay */
1745 cx_set(GP0_IO
, 0x00000004); /* reset high */
1746 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO-3..18 pins */
1747 /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */
1748 cx_write(MC417_OEN
, 0x00005000);
1749 /* ~RD, ~WR high; ADDR low; ~CS high */
1750 cx_write(MC417_RWD
, 0x00000d00);
1752 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
1754 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
1755 case CX23885_BOARD_HAUPPAUGE_STARBURST
:
1756 /* GPIO-8 tda10071 demod reset */
1757 /* GPIO-9 si2165 demod reset (only HVR4400/HVR5500)*/
1759 /* Put the parts into reset and back */
1760 cx23885_gpio_enable(dev
, GPIO_8
| GPIO_9
, 1);
1762 cx23885_gpio_clear(dev
, GPIO_8
| GPIO_9
);
1764 cx23885_gpio_set(dev
, GPIO_8
| GPIO_9
);
1768 case CX23885_BOARD_AVERMEDIA_HC81R
:
1769 cx_clear(MC417_CTL
, 1);
1770 /* GPIO-0,1,2 setup direction as output */
1771 cx_set(GP0_IO
, 0x00070000);
1772 usleep_range(10000, 11000);
1773 /* AF9013 demod reset */
1774 cx_set(GP0_IO
, 0x00010001);
1775 usleep_range(10000, 11000);
1776 cx_clear(GP0_IO
, 0x00010001);
1777 usleep_range(10000, 11000);
1778 cx_set(GP0_IO
, 0x00010001);
1779 usleep_range(10000, 11000);
1781 cx_clear(GP0_IO
, 0x00030003);
1782 usleep_range(10000, 11000);
1783 cx_set(GP0_IO
, 0x00020002);
1784 usleep_range(10000, 11000);
1785 cx_set(GP0_IO
, 0x00010001);
1786 usleep_range(10000, 11000);
1787 cx_clear(GP0_IO
, 0x00020002);
1788 /* XC3028L tuner reset */
1789 cx_set(GP0_IO
, 0x00040004);
1790 cx_clear(GP0_IO
, 0x00040004);
1791 cx_set(GP0_IO
, 0x00040004);
1794 case CX23885_BOARD_DVBSKY_T9580
:
1795 case CX23885_BOARD_DVBSKY_S952
:
1796 case CX23885_BOARD_DVBSKY_T982
:
1797 /* enable GPIO3-18 pins */
1798 cx_write(MC417_CTL
, 0x00000037);
1799 cx23885_gpio_enable(dev
, GPIO_2
| GPIO_11
, 1);
1800 cx23885_gpio_clear(dev
, GPIO_2
| GPIO_11
);
1802 cx23885_gpio_set(dev
, GPIO_2
| GPIO_11
);
1804 case CX23885_BOARD_DVBSKY_T980C
:
1805 case CX23885_BOARD_DVBSKY_S950C
:
1806 case CX23885_BOARD_TT_CT2_4500_CI
:
1808 * GPIO-0 INTA from CiMax, input
1809 * GPIO-1 reset CiMax, output, high active
1810 * GPIO-2 reset demod, output, low active
1811 * GPIO-3 to GPIO-10 data/addr for CAM
1812 * GPIO-11 ~CS0 to CiMax1
1813 * GPIO-12 ~CS1 to CiMax2
1814 * GPIO-13 ADL0 load LSB addr
1815 * GPIO-14 ADL1 load MSB addr
1816 * GPIO-15 ~RDY from CiMax
1817 * GPIO-17 ~RD to CiMax
1818 * GPIO-18 ~WR to CiMax
1821 cx_set(GP0_IO
, 0x00060002); /* GPIO 1/2 as output */
1822 cx_clear(GP0_IO
, 0x00010004); /* GPIO 0 as input */
1823 msleep(100); /* reset delay */
1824 cx_set(GP0_IO
, 0x00060004); /* GPIO as out, reset high */
1825 cx_clear(GP0_IO
, 0x00010002);
1826 cx_write(MC417_CTL
, 0x00000037); /* enable GPIO3-18 pins */
1828 /* GPIO-15 IN as ~ACK, rest as OUT */
1829 cx_write(MC417_OEN
, 0x00001000);
1831 /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */
1832 cx_write(MC417_RWD
, 0x0000c300);
1835 cx_write(GPIO_ISM
, 0x00000000); /* INTERRUPTS active low */
1837 case CX23885_BOARD_DVBSKY_S950
:
1838 cx23885_gpio_enable(dev
, GPIO_2
, 1);
1839 cx23885_gpio_clear(dev
, GPIO_2
);
1841 cx23885_gpio_set(dev
, GPIO_2
);
1843 case CX23885_BOARD_HAUPPAUGE_HVR5525
:
1844 case CX23885_BOARD_HAUPPAUGE_STARBURST2
:
1846 * HVR5525 GPIO Details:
1849 * GPIO-03 VAUX Pres.
1855 * GPIO-15 IR_LED_STATUS
1858 * ALTGPIO VAUX_SWITCH
1859 * AUX_PLL_CLK : Blaster2
1861 /* Put the parts into reset and back */
1862 cx23885_gpio_enable(dev
, GPIO_8
| GPIO_9
, 1);
1863 cx23885_gpio_clear(dev
, GPIO_8
| GPIO_9
);
1865 cx23885_gpio_set(dev
, GPIO_8
| GPIO_9
);
1868 case CX23885_BOARD_VIEWCAST_260E
:
1869 case CX23885_BOARD_VIEWCAST_460E
:
1870 /* For documentation purposes, it's worth noting that this
1871 * card does not have any GPIO's connected to subcomponents.
1874 case CX23885_BOARD_HAUPPAUGE_HVR1265_K4
:
1875 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
:
1876 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885
:
1877 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
:
1878 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885
:
1883 /* Put the parts into reset and back */
1884 cx23885_gpio_enable(dev
, GPIO_8
| GPIO_9
, 1);
1885 cx23885_gpio_clear(dev
, GPIO_8
| GPIO_9
);
1887 cx23885_gpio_set(dev
, GPIO_8
| GPIO_9
);
1893 int cx23885_ir_init(struct cx23885_dev
*dev
)
1895 static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg
[] = {
1897 .flags
= BIT(V4L2_SUBDEV_IO_PIN_INPUT
),
1898 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1899 .function
= CX23885_PAD_IR_RX
,
1901 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1903 .flags
= BIT(V4L2_SUBDEV_IO_PIN_OUTPUT
),
1904 .pin
= CX23885_PIN_IR_TX_GPIO20
,
1905 .function
= CX23885_PAD_IR_TX
,
1907 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1910 const size_t ir_rxtx_pin_cfg_count
= ARRAY_SIZE(ir_rxtx_pin_cfg
);
1912 static struct v4l2_subdev_io_pin_config ir_rx_pin_cfg
[] = {
1914 .flags
= BIT(V4L2_SUBDEV_IO_PIN_INPUT
),
1915 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1916 .function
= CX23885_PAD_IR_RX
,
1918 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1921 const size_t ir_rx_pin_cfg_count
= ARRAY_SIZE(ir_rx_pin_cfg
);
1923 struct v4l2_subdev_ir_parameters params
;
1925 switch (dev
->board
) {
1926 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1927 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1928 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1929 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1930 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1931 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1932 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1933 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1934 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1935 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
:
1936 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
:
1937 /* FIXME: Implement me */
1939 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1940 ret
= cx23888_ir_probe(dev
);
1943 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_888_IR
);
1944 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1945 ir_rx_pin_cfg_count
, ir_rx_pin_cfg
);
1947 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1948 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1949 ret
= cx23888_ir_probe(dev
);
1952 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_888_IR
);
1953 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1954 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
1956 * For these boards we need to invert the Tx output via the
1957 * IR controller to have the LED off while idle
1959 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_g_parameters
, ¶ms
);
1960 params
.enable
= false;
1961 params
.shutdown
= false;
1962 params
.invert_level
= true;
1963 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1964 params
.shutdown
= true;
1965 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1967 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1968 case CX23885_BOARD_TEVII_S470
:
1969 case CX23885_BOARD_MYGICA_X8507
:
1970 case CX23885_BOARD_TBS_6980
:
1971 case CX23885_BOARD_TBS_6981
:
1972 case CX23885_BOARD_DVBSKY_T9580
:
1973 case CX23885_BOARD_DVBSKY_T980C
:
1974 case CX23885_BOARD_DVBSKY_S950C
:
1975 case CX23885_BOARD_TT_CT2_4500_CI
:
1976 case CX23885_BOARD_DVBSKY_S950
:
1977 case CX23885_BOARD_DVBSKY_S952
:
1978 case CX23885_BOARD_DVBSKY_T982
:
1981 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1982 if (dev
->sd_ir
== NULL
) {
1986 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1987 ir_rx_pin_cfg_count
, ir_rx_pin_cfg
);
1989 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1992 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1993 if (dev
->sd_ir
== NULL
) {
1997 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1998 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
2000 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
2001 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
:
2002 request_module("ir-kbd-i2c");
2009 void cx23885_ir_fini(struct cx23885_dev
*dev
)
2011 switch (dev
->board
) {
2012 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
2013 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
2014 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
2015 cx23885_irq_remove(dev
, PCI_MSK_IR
);
2016 cx23888_ir_remove(dev
);
2019 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
2020 case CX23885_BOARD_TEVII_S470
:
2021 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
2022 case CX23885_BOARD_MYGICA_X8507
:
2023 case CX23885_BOARD_TBS_6980
:
2024 case CX23885_BOARD_TBS_6981
:
2025 case CX23885_BOARD_DVBSKY_T9580
:
2026 case CX23885_BOARD_DVBSKY_T980C
:
2027 case CX23885_BOARD_DVBSKY_S950C
:
2028 case CX23885_BOARD_TT_CT2_4500_CI
:
2029 case CX23885_BOARD_DVBSKY_S950
:
2030 case CX23885_BOARD_DVBSKY_S952
:
2031 case CX23885_BOARD_DVBSKY_T982
:
2032 cx23885_irq_remove(dev
, PCI_MSK_AV_CORE
);
2033 /* sd_ir is a duplicate pointer to the AV Core, just clear it */
2039 static int netup_jtag_io(void *device
, int tms
, int tdi
, int read_tdo
)
2043 struct cx23885_dev
*dev
= (struct cx23885_dev
*)device
;
2045 data
= ((cx_read(GP0_IO
)) & (~0x00000002));
2046 data
|= (tms
? 0x00020002 : 0x00020000);
2047 cx_write(GP0_IO
, data
);
2050 data
= ((cx_read(MC417_RWD
)) & (~0x0000a000));
2051 data
|= (tdi
? 0x00008000 : 0);
2052 cx_write(MC417_RWD
, data
);
2054 tdo
= (data
& 0x00004000) ? 1 : 0; /*TDO*/
2056 cx_write(MC417_RWD
, data
| 0x00002000);
2059 cx_write(MC417_RWD
, data
);
2064 void cx23885_ir_pci_int_enable(struct cx23885_dev
*dev
)
2066 switch (dev
->board
) {
2067 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
2068 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
2069 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
2071 cx23885_irq_add_enable(dev
, PCI_MSK_IR
);
2073 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
2074 case CX23885_BOARD_TEVII_S470
:
2075 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
2076 case CX23885_BOARD_MYGICA_X8507
:
2077 case CX23885_BOARD_TBS_6980
:
2078 case CX23885_BOARD_TBS_6981
:
2079 case CX23885_BOARD_DVBSKY_T9580
:
2080 case CX23885_BOARD_DVBSKY_T980C
:
2081 case CX23885_BOARD_DVBSKY_S950C
:
2082 case CX23885_BOARD_TT_CT2_4500_CI
:
2083 case CX23885_BOARD_DVBSKY_S950
:
2084 case CX23885_BOARD_DVBSKY_S952
:
2085 case CX23885_BOARD_DVBSKY_T982
:
2087 cx23885_irq_add_enable(dev
, PCI_MSK_AV_CORE
);
2092 void cx23885_card_setup(struct cx23885_dev
*dev
)
2094 struct cx23885_tsport
*ts1
= &dev
->ts1
;
2095 struct cx23885_tsport
*ts2
= &dev
->ts2
;
2097 static u8 eeprom
[256];
2099 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
2100 dev
->i2c_bus
[0].i2c_client
.addr
= 0xa0 >> 1;
2101 tveeprom_read(&dev
->i2c_bus
[0].i2c_client
,
2102 eeprom
, sizeof(eeprom
));
2105 switch (dev
->board
) {
2106 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
2107 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
2108 if (eeprom
[0x80] != 0x84)
2109 hauppauge_eeprom(dev
, eeprom
+0xc0);
2111 hauppauge_eeprom(dev
, eeprom
+0x80);
2114 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
2115 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
2116 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
2117 if (dev
->i2c_bus
[0].i2c_rc
== 0)
2118 hauppauge_eeprom(dev
, eeprom
+0x80);
2120 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
2121 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
2122 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
2123 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
2124 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
2125 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
2126 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
2127 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
2128 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
2129 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
2130 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
2131 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
2132 case CX23885_BOARD_HAUPPAUGE_STARBURST
:
2133 case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
:
2134 case CX23885_BOARD_HAUPPAUGE_HVR5525
:
2135 case CX23885_BOARD_HAUPPAUGE_HVR1265_K4
:
2136 case CX23885_BOARD_HAUPPAUGE_STARBURST2
:
2137 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
:
2138 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885
:
2139 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
:
2140 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885
:
2141 if (dev
->i2c_bus
[0].i2c_rc
== 0)
2142 hauppauge_eeprom(dev
, eeprom
+0xc0);
2144 case CX23885_BOARD_VIEWCAST_260E
:
2145 case CX23885_BOARD_VIEWCAST_460E
:
2146 dev
->i2c_bus
[1].i2c_client
.addr
= 0xa0 >> 1;
2147 tveeprom_read(&dev
->i2c_bus
[1].i2c_client
,
2148 eeprom
, sizeof(eeprom
));
2149 if (dev
->i2c_bus
[0].i2c_rc
== 0)
2150 viewcast_eeprom(dev
, eeprom
);
2154 switch (dev
->board
) {
2155 case CX23885_BOARD_AVERMEDIA_HC81R
:
2156 /* Defaults for VID B */
2157 ts1
->gen_ctrl_val
= 0x4; /* Parallel */
2158 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2159 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2160 /* Defaults for VID C */
2161 /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
2162 ts2
->gen_ctrl_val
= 0x10e;
2163 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2164 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2166 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
2167 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
2168 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP2
:
2169 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2170 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2171 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2173 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
:
2174 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2175 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2176 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2178 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
2179 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
2180 /* Defaults for VID B - Analog encoder */
2181 /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
2182 ts1
->gen_ctrl_val
= 0x10e;
2183 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2184 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2186 /* APB_TSVALERR_POL (active low)*/
2187 ts1
->vld_misc_val
= 0x2000;
2188 ts1
->hw_sop_ctrl_val
= (0x47 << 16 | 188 << 4 | 0xc);
2189 cx_write(0x130184, 0xc);
2191 /* Defaults for VID C */
2192 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2193 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2194 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2196 case CX23885_BOARD_TBS_6920
:
2197 ts1
->gen_ctrl_val
= 0x4; /* Parallel */
2198 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2199 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2201 case CX23885_BOARD_TEVII_S470
:
2202 case CX23885_BOARD_TEVII_S471
:
2203 case CX23885_BOARD_DVBWORLD_2005
:
2204 case CX23885_BOARD_PROF_8000
:
2205 case CX23885_BOARD_DVBSKY_T980C
:
2206 case CX23885_BOARD_DVBSKY_S950C
:
2207 case CX23885_BOARD_TT_CT2_4500_CI
:
2208 case CX23885_BOARD_DVBSKY_S950
:
2209 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2210 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2211 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2213 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
2214 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
2215 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
2216 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2217 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2218 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2219 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2220 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2221 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2223 case CX23885_BOARD_TBS_6980
:
2224 case CX23885_BOARD_TBS_6981
:
2225 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2226 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2227 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2228 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2229 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2230 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2233 case CX23885_BOARD_MYGICA_X8506
:
2234 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
2235 case CX23885_BOARD_MYGICA_X8507
:
2236 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2237 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2238 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2240 case CX23885_BOARD_MYGICA_X8558PRO
:
2241 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2242 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2243 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2244 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2245 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2246 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2248 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
2249 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2250 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2251 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2252 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2253 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2254 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2256 case CX23885_BOARD_HAUPPAUGE_STARBURST
:
2257 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2258 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2259 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2261 case CX23885_BOARD_DVBSKY_T9580
:
2262 case CX23885_BOARD_DVBSKY_T982
:
2263 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2264 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2265 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2266 ts2
->gen_ctrl_val
= 0x8; /* Serial bus */
2267 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2268 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2270 case CX23885_BOARD_DVBSKY_S952
:
2271 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2272 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2273 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2274 ts2
->gen_ctrl_val
= 0xe; /* Serial bus */
2275 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2276 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2278 case CX23885_BOARD_HAUPPAUGE_HVR5525
:
2279 case CX23885_BOARD_HAUPPAUGE_STARBURST2
:
2280 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
2281 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2282 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2283 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2284 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2285 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2287 case CX23885_BOARD_HAUPPAUGE_HVR1265_K4
:
2288 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
:
2289 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885
:
2290 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
:
2291 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885
:
2292 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2293 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2294 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2295 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2296 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2297 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2299 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
2300 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
2301 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
2302 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
2303 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
2304 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
2305 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
2306 case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
:
2307 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
2308 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
2309 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
2310 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
2311 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
2312 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
2313 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
2314 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
2315 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
2316 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
2317 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
2318 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
2320 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
2321 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
2322 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
2325 /* Certain boards support analog, or require the avcore to be
2326 * loaded, ensure this happens.
2328 switch (dev
->board
) {
2329 case CX23885_BOARD_TEVII_S470
:
2330 /* Currently only enabled for the integrated IR controller */
2334 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
2335 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
2336 case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE
:
2337 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
2338 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
2339 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
2340 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
2341 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
2342 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
2343 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
2344 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
2345 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
2346 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
2347 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
2348 case CX23885_BOARD_HAUPPAUGE_HVR1265_K4
:
2349 case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB
:
2350 case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC
:
2351 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
2352 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
2353 case CX23885_BOARD_MYGICA_X8506
:
2354 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
2355 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
2356 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
2357 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
2358 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
2359 case CX23885_BOARD_MPX885
:
2360 case CX23885_BOARD_MYGICA_X8507
:
2361 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
2362 case CX23885_BOARD_AVERMEDIA_HC81R
:
2363 case CX23885_BOARD_TBS_6980
:
2364 case CX23885_BOARD_TBS_6981
:
2365 case CX23885_BOARD_DVBSKY_T9580
:
2366 case CX23885_BOARD_DVBSKY_T980C
:
2367 case CX23885_BOARD_DVBSKY_S950C
:
2368 case CX23885_BOARD_TT_CT2_4500_CI
:
2369 case CX23885_BOARD_DVBSKY_S950
:
2370 case CX23885_BOARD_DVBSKY_S952
:
2371 case CX23885_BOARD_DVBSKY_T982
:
2372 case CX23885_BOARD_VIEWCAST_260E
:
2373 case CX23885_BOARD_VIEWCAST_460E
:
2374 case CX23885_BOARD_AVERMEDIA_CE310B
:
2375 dev
->sd_cx25840
= v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2376 &dev
->i2c_bus
[2].i2c_adap
,
2377 "cx25840", 0x88 >> 1, NULL
);
2378 if (dev
->sd_cx25840
) {
2379 /* set host data for clk_freq configuration */
2380 v4l2_set_subdev_hostdata(dev
->sd_cx25840
,
2383 dev
->sd_cx25840
->grp_id
= CX23885_HW_AV_CORE
;
2384 v4l2_subdev_call(dev
->sd_cx25840
, core
, load_fw
);
2389 switch (dev
->board
) {
2390 case CX23885_BOARD_VIEWCAST_260E
:
2391 v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2392 &dev
->i2c_bus
[0].i2c_adap
,
2393 "cs3308", 0x82 >> 1, NULL
);
2395 case CX23885_BOARD_VIEWCAST_460E
:
2396 /* This cs3308 controls the audio from the breakout cable */
2397 v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2398 &dev
->i2c_bus
[0].i2c_adap
,
2399 "cs3308", 0x80 >> 1, NULL
);
2400 /* This cs3308 controls the audio from the onboard header */
2401 v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2402 &dev
->i2c_bus
[0].i2c_adap
,
2403 "cs3308", 0x82 >> 1, NULL
);
2407 /* AUX-PLL 27MHz CLK */
2408 switch (dev
->board
) {
2409 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
2410 netup_initialize(dev
);
2412 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
: {
2414 const struct firmware
*fw
;
2415 const char *filename
= "dvb-netup-altera-01.fw";
2416 char *action
= "configure";
2417 static struct netup_card_info cinfo
;
2418 struct altera_config netup_config
= {
2421 .jtag_io
= netup_jtag_io
,
2424 netup_initialize(dev
);
2426 netup_get_card_info(&dev
->i2c_bus
[0].i2c_adap
, &cinfo
);
2428 cinfo
.rev
= netup_card_rev
;
2430 switch (cinfo
.rev
) {
2432 filename
= "dvb-netup-altera-04.fw";
2435 filename
= "dvb-netup-altera-01.fw";
2438 pr_info("NetUP card rev=0x%x fw_filename=%s\n",
2439 cinfo
.rev
, filename
);
2441 ret
= request_firmware(&fw
, filename
, &dev
->pci
->dev
);
2443 pr_err("did not find the firmware file '%s'. You can use <kernel_dir>/scripts/get_dvb_firmware to get the firmware.",
2446 altera_init(&netup_config
, fw
);
2448 release_firmware(fw
);