Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / media / video / cx88 / cx88-cards.c
1 /*
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 #include "tea5767.h"
30
31 static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
32 static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33 static unsigned int card[]  = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34
35 module_param_array(tuner, int, NULL, 0444);
36 module_param_array(radio, int, NULL, 0444);
37 module_param_array(card,  int, NULL, 0444);
38
39 MODULE_PARM_DESC(tuner,"tuner type");
40 MODULE_PARM_DESC(radio,"radio tuner type");
41 MODULE_PARM_DESC(card,"card type");
42
43 static unsigned int latency = UNSET;
44 module_param(latency,int,0444);
45 MODULE_PARM_DESC(latency,"pci latency timer");
46
47 /* ------------------------------------------------------------------ */
48 /* board config info                                                  */
49
50 static const struct cx88_board cx88_boards[] = {
51         [CX88_BOARD_UNKNOWN] = {
52                 .name           = "UNKNOWN/GENERIC",
53                 .tuner_type     = UNSET,
54                 .radio_type     = UNSET,
55                 .tuner_addr     = ADDR_UNSET,
56                 .radio_addr     = ADDR_UNSET,
57                 .input          = {{
58                         .type   = CX88_VMUX_COMPOSITE1,
59                         .vmux   = 0,
60                 },{
61                         .type   = CX88_VMUX_COMPOSITE2,
62                         .vmux   = 1,
63                 },{
64                         .type   = CX88_VMUX_COMPOSITE3,
65                         .vmux   = 2,
66                 },{
67                         .type   = CX88_VMUX_COMPOSITE4,
68                         .vmux   = 3,
69                 }},
70         },
71         [CX88_BOARD_HAUPPAUGE] = {
72                 .name           = "Hauppauge WinTV 34xxx models",
73                 .tuner_type     = UNSET,
74                 .radio_type     = UNSET,
75                 .tuner_addr     = ADDR_UNSET,
76                 .radio_addr     = ADDR_UNSET,
77                 .tda9887_conf   = TDA9887_PRESENT,
78                 .input          = {{
79                         .type   = CX88_VMUX_TELEVISION,
80                         .vmux   = 0,
81                         .gpio0  = 0xff00,  // internal decoder
82                 },{
83                         .type   = CX88_VMUX_DEBUG,
84                         .vmux   = 0,
85                         .gpio0  = 0xff01,  // mono from tuner chip
86                 },{
87                         .type   = CX88_VMUX_COMPOSITE1,
88                         .vmux   = 1,
89                         .gpio0  = 0xff02,
90                 },{
91                         .type   = CX88_VMUX_SVIDEO,
92                         .vmux   = 2,
93                         .gpio0  = 0xff02,
94                 }},
95                 .radio = {
96                         .type   = CX88_RADIO,
97                         .gpio0  = 0xff01,
98                 },
99         },
100         [CX88_BOARD_GDI] = {
101                 .name           = "GDI Black Gold",
102                 .tuner_type     = UNSET,
103                 .radio_type     = UNSET,
104                 .tuner_addr     = ADDR_UNSET,
105                 .radio_addr     = ADDR_UNSET,
106                 .input          = {{
107                         .type   = CX88_VMUX_TELEVISION,
108                         .vmux   = 0,
109                 },{
110                         .type   = CX88_VMUX_SVIDEO,
111                         .vmux   = 2,
112                 }},
113         },
114         [CX88_BOARD_PIXELVIEW] = {
115                 .name           = "PixelView",
116                 .tuner_type     = TUNER_PHILIPS_PAL,
117                 .radio_type     = UNSET,
118                 .tuner_addr     = ADDR_UNSET,
119                 .radio_addr     = ADDR_UNSET,
120                 .input          = {{
121                         .type   = CX88_VMUX_TELEVISION,
122                         .vmux   = 0,
123                         .gpio0  = 0xff00,  // internal decoder
124                 },{
125                         .type   = CX88_VMUX_COMPOSITE1,
126                         .vmux   = 1,
127                 },{
128                         .type   = CX88_VMUX_SVIDEO,
129                         .vmux   = 2,
130                 }},
131                 .radio = {
132                          .type  = CX88_RADIO,
133                          .gpio0 = 0xff10,
134                 },
135         },
136         [CX88_BOARD_ATI_WONDER_PRO] = {
137                 .name           = "ATI TV Wonder Pro",
138                 .tuner_type     = TUNER_PHILIPS_4IN1,
139                 .radio_type     = UNSET,
140                 .tuner_addr     = ADDR_UNSET,
141                 .radio_addr     = ADDR_UNSET,
142                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER,
143                 .input          = {{
144                         .type   = CX88_VMUX_TELEVISION,
145                         .vmux   = 0,
146                         .gpio0  = 0x03ff,
147                 },{
148                         .type   = CX88_VMUX_COMPOSITE1,
149                         .vmux   = 1,
150                         .gpio0  = 0x03fe,
151                 },{
152                         .type   = CX88_VMUX_SVIDEO,
153                         .vmux   = 2,
154                         .gpio0  = 0x03fe,
155                 }},
156         },
157         [CX88_BOARD_WINFAST2000XP_EXPERT] = {
158                 .name           = "Leadtek Winfast 2000XP Expert",
159                 .tuner_type     = TUNER_PHILIPS_4IN1,
160                 .radio_type     = UNSET,
161                 .tuner_addr     = ADDR_UNSET,
162                 .radio_addr     = ADDR_UNSET,
163                 .tda9887_conf   = TDA9887_PRESENT,
164                 .input          = {{
165                         .type   = CX88_VMUX_TELEVISION,
166                         .vmux   = 0,
167                         .gpio0  = 0x00F5e700,
168                         .gpio1  = 0x00003004,
169                         .gpio2  = 0x00F5e700,
170                         .gpio3  = 0x02000000,
171                 },{
172                         .type   = CX88_VMUX_COMPOSITE1,
173                         .vmux   = 1,
174                         .gpio0  = 0x00F5c700,
175                         .gpio1  = 0x00003004,
176                         .gpio2  = 0x00F5c700,
177                         .gpio3  = 0x02000000,
178                 },{
179                         .type   = CX88_VMUX_SVIDEO,
180                         .vmux   = 2,
181                         .gpio0  = 0x00F5c700,
182                         .gpio1  = 0x00003004,
183                         .gpio2  = 0x00F5c700,
184                         .gpio3  = 0x02000000,
185                 }},
186                 .radio = {
187                         .type   = CX88_RADIO,
188                         .gpio0  = 0x00F5d700,
189                         .gpio1  = 0x00003004,
190                         .gpio2  = 0x00F5d700,
191                         .gpio3  = 0x02000000,
192                 },
193         },
194         [CX88_BOARD_AVERTV_STUDIO_303] = {
195                 .name           = "AverTV Studio 303 (M126)",
196                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
197                 .radio_type     = UNSET,
198                 .tuner_addr     = ADDR_UNSET,
199                 .radio_addr     = ADDR_UNSET,
200                 .tda9887_conf   = TDA9887_PRESENT,
201                 .input          = {{
202                         .type   = CX88_VMUX_TELEVISION,
203                         .vmux   = 0,
204                         .gpio1  = 0xe09f,
205                 },{
206                         .type   = CX88_VMUX_COMPOSITE1,
207                         .vmux   = 1,
208                         .gpio1  = 0xe05f,
209                 },{
210                         .type   = CX88_VMUX_SVIDEO,
211                         .vmux   = 2,
212                         .gpio1  = 0xe05f,
213                 }},
214                 .radio = {
215                         .gpio1  = 0xe0df,
216                         .type   = CX88_RADIO,
217                 },
218         },
219         [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
220                 // added gpio values thanks to Michal
221                 // values for PAL from DScaler
222                 .name           = "MSI TV-@nywhere Master",
223                 .tuner_type     = TUNER_MT2032,
224                 .radio_type     = UNSET,
225                 .tuner_addr     = ADDR_UNSET,
226                 .radio_addr     = ADDR_UNSET,
227                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
228                 .input          = {{
229                         .type   = CX88_VMUX_TELEVISION,
230                         .vmux   = 0,
231                         .gpio0  = 0x000040bf,
232                         .gpio1  = 0x000080c0,
233                         .gpio2  = 0x0000ff40,
234                 },{
235                         .type   = CX88_VMUX_COMPOSITE1,
236                         .vmux   = 1,
237                         .gpio0  = 0x000040bf,
238                         .gpio1  = 0x000080c0,
239                         .gpio2  = 0x0000ff40,
240                 },{
241                         .type   = CX88_VMUX_SVIDEO,
242                         .vmux   = 2,
243                         .gpio0  = 0x000040bf,
244                         .gpio1  = 0x000080c0,
245                         .gpio2  = 0x0000ff40,
246                 }},
247                 .radio = {
248                          .type   = CX88_RADIO,
249                          .vmux   = 3,
250                          .gpio0  = 0x000040bf,
251                          .gpio1  = 0x000080c0,
252                          .gpio2  = 0x0000ff20,
253                 },
254         },
255         [CX88_BOARD_WINFAST_DV2000] = {
256                 .name           = "Leadtek Winfast DV2000",
257                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
258                 .radio_type     = UNSET,
259                 .tuner_addr     = ADDR_UNSET,
260                 .radio_addr     = ADDR_UNSET,
261                 .tda9887_conf   = TDA9887_PRESENT,
262                 .input          = {{
263                         .type   = CX88_VMUX_TELEVISION,
264                         .vmux   = 0,
265                         .gpio0  = 0x0035e700,
266                         .gpio1  = 0x00003004,
267                         .gpio2  = 0x0035e700,
268                         .gpio3  = 0x02000000,
269                 },{
270
271                         .type   = CX88_VMUX_COMPOSITE1,
272                         .vmux   = 1,
273                         .gpio0  = 0x0035c700,
274                         .gpio1  = 0x00003004,
275                         .gpio2  = 0x0035c700,
276                         .gpio3  = 0x02000000,
277                 },{
278                         .type   = CX88_VMUX_SVIDEO,
279                         .vmux   = 2,
280                         .gpio0  = 0x0035c700,
281                         .gpio1  = 0x0035c700,
282                         .gpio2  = 0x02000000,
283                         .gpio3  = 0x02000000,
284                 }},
285                 .radio = {
286                         .type   = CX88_RADIO,
287                         .gpio0  = 0x0035d700,
288                         .gpio1  = 0x00007004,
289                         .gpio2  = 0x0035d700,
290                         .gpio3  = 0x02000000,
291                 },
292         },
293         [CX88_BOARD_LEADTEK_PVR2000] = {
294                 // gpio values for PAL version from regspy by DScaler
295                 .name           = "Leadtek PVR 2000",
296                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
297                 .radio_type     = UNSET,
298                 .tuner_addr     = ADDR_UNSET,
299                 .radio_addr     = ADDR_UNSET,
300                 .tda9887_conf   = TDA9887_PRESENT,
301                 .input          = {{
302                         .type   = CX88_VMUX_TELEVISION,
303                         .vmux   = 0,
304                         .gpio0  = 0x0000bde2,
305                         .audioroute = 1,
306                 },{
307                         .type   = CX88_VMUX_COMPOSITE1,
308                         .vmux   = 1,
309                         .gpio0  = 0x0000bde6,
310                         .audioroute = 1,
311                 },{
312                         .type   = CX88_VMUX_SVIDEO,
313                         .vmux   = 2,
314                         .gpio0  = 0x0000bde6,
315                         .audioroute = 1,
316                 }},
317                 .radio = {
318                         .type   = CX88_RADIO,
319                         .gpio0  = 0x0000bd62,
320                         .audioroute = 1,
321                 },
322                 .mpeg           = CX88_MPEG_BLACKBIRD,
323         },
324         [CX88_BOARD_IODATA_GVVCP3PCI] = {
325                 .name           = "IODATA GV-VCP3/PCI",
326                 .tuner_type     = TUNER_ABSENT,
327                 .radio_type     = UNSET,
328                 .tuner_addr     = ADDR_UNSET,
329                 .radio_addr     = ADDR_UNSET,
330                 .input          = {{
331                         .type   = CX88_VMUX_COMPOSITE1,
332                         .vmux   = 0,
333                 },{
334                         .type   = CX88_VMUX_COMPOSITE2,
335                         .vmux   = 1,
336                 },{
337                         .type   = CX88_VMUX_SVIDEO,
338                         .vmux   = 2,
339                 }},
340         },
341         [CX88_BOARD_PROLINK_PLAYTVPVR] = {
342                 .name           = "Prolink PlayTV PVR",
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,
348                 .input          = {{
349                         .type   = CX88_VMUX_TELEVISION,
350                         .vmux   = 0,
351                         .gpio0  = 0xbff0,
352                 },{
353                         .type   = CX88_VMUX_COMPOSITE1,
354                         .vmux   = 1,
355                         .gpio0  = 0xbff3,
356                 },{
357                         .type   = CX88_VMUX_SVIDEO,
358                         .vmux   = 2,
359                         .gpio0  = 0xbff3,
360                 }},
361                 .radio = {
362                         .type   = CX88_RADIO,
363                         .gpio0  = 0xbff0,
364                 },
365         },
366         [CX88_BOARD_ASUS_PVR_416] = {
367                 .name           = "ASUS PVR-416",
368                 .tuner_type     = TUNER_PHILIPS_FM1236_MK3,
369                 .radio_type     = UNSET,
370                 .tuner_addr     = ADDR_UNSET,
371                 .radio_addr     = ADDR_UNSET,
372                 .tda9887_conf   = TDA9887_PRESENT,
373                 .input          = {{
374                         .type   = CX88_VMUX_TELEVISION,
375                         .vmux   = 0,
376                         .gpio0  = 0x0000fde6,
377                 },{
378                         .type   = CX88_VMUX_SVIDEO,
379                         .vmux   = 2,
380                         .gpio0  = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
381                         .audioroute = 1,
382                 }},
383                 .radio = {
384                         .type   = CX88_RADIO,
385                         .gpio0  = 0x0000fde2,
386                 },
387                 .mpeg           = CX88_MPEG_BLACKBIRD,
388         },
389         [CX88_BOARD_MSI_TVANYWHERE] = {
390                 .name           = "MSI TV-@nywhere",
391                 .tuner_type     = TUNER_MT2032,
392                 .radio_type     = UNSET,
393                 .tuner_addr     = ADDR_UNSET,
394                 .radio_addr     = ADDR_UNSET,
395                 .tda9887_conf   = TDA9887_PRESENT,
396                 .input          = {{
397                         .type   = CX88_VMUX_TELEVISION,
398                         .vmux   = 0,
399                         .gpio0  = 0x00000fbf,
400                         .gpio2  = 0x0000fc08,
401                 },{
402                         .type   = CX88_VMUX_COMPOSITE1,
403                         .vmux   = 1,
404                         .gpio0  = 0x00000fbf,
405                         .gpio2  = 0x0000fc68,
406                 },{
407                         .type   = CX88_VMUX_SVIDEO,
408                         .vmux   = 2,
409                         .gpio0  = 0x00000fbf,
410                         .gpio2  = 0x0000fc68,
411                 }},
412         },
413         [CX88_BOARD_KWORLD_DVB_T] = {
414                 .name           = "KWorld/VStream XPert DVB-T",
415                 .tuner_type     = TUNER_ABSENT,
416                 .radio_type     = UNSET,
417                 .tuner_addr     = ADDR_UNSET,
418                 .radio_addr     = ADDR_UNSET,
419                 .input          = {{
420                         .type   = CX88_VMUX_COMPOSITE1,
421                         .vmux   = 1,
422                         .gpio0  = 0x0700,
423                         .gpio2  = 0x0101,
424                 },{
425                         .type   = CX88_VMUX_SVIDEO,
426                         .vmux   = 2,
427                         .gpio0  = 0x0700,
428                         .gpio2  = 0x0101,
429                 }},
430                 .mpeg           = CX88_MPEG_DVB,
431         },
432         [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
433                 .name           = "DViCO FusionHDTV DVB-T1",
434                 .tuner_type     = TUNER_ABSENT, /* No analog tuner */
435                 .radio_type     = UNSET,
436                 .tuner_addr     = ADDR_UNSET,
437                 .radio_addr     = ADDR_UNSET,
438                 .input          = {{
439                         .type   = CX88_VMUX_COMPOSITE1,
440                         .vmux   = 1,
441                         .gpio0  = 0x000027df,
442                 },{
443                         .type   = CX88_VMUX_SVIDEO,
444                         .vmux   = 2,
445                         .gpio0  = 0x000027df,
446                 }},
447                 .mpeg           = CX88_MPEG_DVB,
448         },
449         [CX88_BOARD_KWORLD_LTV883] = {
450                 .name           = "KWorld LTV883RF",
451                 .tuner_type     = TUNER_TNF_8831BGFF,
452                 .radio_type     = UNSET,
453                 .tuner_addr     = ADDR_UNSET,
454                 .radio_addr     = ADDR_UNSET,
455                 .input          = {{
456                         .type   = CX88_VMUX_TELEVISION,
457                         .vmux   = 0,
458                         .gpio0  = 0x07f8,
459                 },{
460                         .type   = CX88_VMUX_DEBUG,
461                         .vmux   = 0,
462                         .gpio0  = 0x07f9,  // mono from tuner chip
463                 },{
464                         .type   = CX88_VMUX_COMPOSITE1,
465                         .vmux   = 1,
466                         .gpio0  = 0x000007fa,
467                 },{
468                         .type   = CX88_VMUX_SVIDEO,
469                         .vmux   = 2,
470                         .gpio0  = 0x000007fa,
471                 }},
472                 .radio = {
473                         .type   = CX88_RADIO,
474                         .gpio0  = 0x000007f8,
475                 },
476         },
477         [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
478                 .name           = "DViCO FusionHDTV 3 Gold-Q",
479                 .tuner_type     = TUNER_MICROTUNE_4042FI5,
480                 .radio_type     = UNSET,
481                 .tuner_addr     = ADDR_UNSET,
482                 .radio_addr     = ADDR_UNSET,
483                 /*
484                    GPIO[0] resets DT3302 DTV receiver
485                     0 - reset asserted
486                     1 - normal operation
487                    GPIO[1] mutes analog audio output connector
488                     0 - enable selected source
489                     1 - mute
490                    GPIO[2] selects source for analog audio output connector
491                     0 - analog audio input connector on tab
492                     1 - analog DAC output from CX23881 chip
493                    GPIO[3] selects RF input connector on tuner module
494                     0 - RF connector labeled CABLE
495                     1 - RF connector labeled ANT
496                    GPIO[4] selects high RF for QAM256 mode
497                     0 - normal RF
498                     1 - high RF
499                 */
500                 .input          = {{
501                         .type   = CX88_VMUX_TELEVISION,
502                         .vmux   = 0,
503                         .gpio0  = 0x0f0d,
504                 },{
505                         .type   = CX88_VMUX_CABLE,
506                         .vmux   = 0,
507                         .gpio0  = 0x0f05,
508                 },{
509                         .type   = CX88_VMUX_COMPOSITE1,
510                         .vmux   = 1,
511                         .gpio0  = 0x0f00,
512                 },{
513                         .type   = CX88_VMUX_SVIDEO,
514                         .vmux   = 2,
515                         .gpio0  = 0x0f00,
516                 }},
517                 .mpeg           = CX88_MPEG_DVB,
518         },
519         [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
520                 .name           = "Hauppauge Nova-T DVB-T",
521                 .tuner_type     = TUNER_ABSENT,
522                 .radio_type     = UNSET,
523                 .tuner_addr     = ADDR_UNSET,
524                 .radio_addr     = ADDR_UNSET,
525                 .input          = {{
526                         .type   = CX88_VMUX_DVB,
527                         .vmux   = 0,
528                 }},
529                 .mpeg           = CX88_MPEG_DVB,
530         },
531         [CX88_BOARD_CONEXANT_DVB_T1] = {
532                 .name           = "Conexant DVB-T reference design",
533                 .tuner_type     = TUNER_ABSENT,
534                 .radio_type     = UNSET,
535                 .tuner_addr     = ADDR_UNSET,
536                 .radio_addr     = ADDR_UNSET,
537                 .input          = {{
538                         .type   = CX88_VMUX_DVB,
539                         .vmux   = 0,
540                 }},
541                 .mpeg           = CX88_MPEG_DVB,
542         },
543         [CX88_BOARD_PROVIDEO_PV259] = {
544                 .name           = "Provideo PV259",
545                 .tuner_type     = TUNER_PHILIPS_FQ1216ME,
546                 .radio_type     = UNSET,
547                 .tuner_addr     = ADDR_UNSET,
548                 .radio_addr     = ADDR_UNSET,
549                 .input          = {{
550                         .type   = CX88_VMUX_TELEVISION,
551                         .vmux   = 0,
552                         .audioroute = 1,
553                 }},
554                 .mpeg           = CX88_MPEG_BLACKBIRD,
555         },
556         [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
557                 .name           = "DViCO FusionHDTV DVB-T Plus",
558                 .tuner_type     = TUNER_ABSENT, /* No analog tuner */
559                 .radio_type     = UNSET,
560                 .tuner_addr     = ADDR_UNSET,
561                 .radio_addr     = ADDR_UNSET,
562                 .input          = {{
563                         .type   = CX88_VMUX_COMPOSITE1,
564                         .vmux   = 1,
565                         .gpio0  = 0x000027df,
566                 },{
567                         .type   = CX88_VMUX_SVIDEO,
568                         .vmux   = 2,
569                         .gpio0  = 0x000027df,
570                 }},
571                 .mpeg           = CX88_MPEG_DVB,
572         },
573         [CX88_BOARD_DNTV_LIVE_DVB_T] = {
574                 .name           = "digitalnow DNTV Live! DVB-T",
575                 .tuner_type     = TUNER_ABSENT,
576                 .radio_type     = UNSET,
577                 .tuner_addr     = ADDR_UNSET,
578                 .radio_addr     = ADDR_UNSET,
579                 .input          = {{
580                         .type   = CX88_VMUX_COMPOSITE1,
581                         .vmux   = 1,
582                         .gpio0  = 0x00000700,
583                         .gpio2  = 0x00000101,
584                 },{
585                         .type   = CX88_VMUX_SVIDEO,
586                         .vmux   = 2,
587                         .gpio0  = 0x00000700,
588                         .gpio2  = 0x00000101,
589                 }},
590                 .mpeg           = CX88_MPEG_DVB,
591         },
592         [CX88_BOARD_PCHDTV_HD3000] = {
593                 .name           = "pcHDTV HD3000 HDTV",
594                 .tuner_type     = TUNER_THOMSON_DTT761X,
595                 .radio_type     = UNSET,
596                 .tuner_addr     = ADDR_UNSET,
597                 .radio_addr     = ADDR_UNSET,
598                 .tda9887_conf   = TDA9887_PRESENT,
599                 /* GPIO[2] = audio source for analog audio out connector
600                  *  0 = analog audio input connector
601                  *  1 = CX88 audio DACs
602                  *
603                  * GPIO[7] = input to CX88's audio/chroma ADC
604                  *  0 = FM 10.7 MHz IF
605                  *  1 = Sound 4.5 MHz IF
606                  *
607                  * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
608                  *
609                  * GPIO[16] = Remote control input
610                  */
611                 .input          = {{
612                         .type   = CX88_VMUX_TELEVISION,
613                         .vmux   = 0,
614                         .gpio0  = 0x00008484,
615                 },{
616                         .type   = CX88_VMUX_COMPOSITE1,
617                         .vmux   = 1,
618                         .gpio0  = 0x00008400,
619                 },{
620                         .type   = CX88_VMUX_SVIDEO,
621                         .vmux   = 2,
622                         .gpio0  = 0x00008400,
623                 }},
624                 .radio = {
625                         .type   = CX88_RADIO,
626                         .gpio0  = 0x00008404,
627                 },
628                 .mpeg           = CX88_MPEG_DVB,
629         },
630         [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
631                 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
632                 // GPIO values obtained from regspy, courtesy Sean Covel
633                 .name           = "Hauppauge WinTV 28xxx (Roslyn) models",
634                 .tuner_type     = UNSET,
635                 .radio_type     = UNSET,
636                 .tuner_addr     = ADDR_UNSET,
637                 .radio_addr     = ADDR_UNSET,
638                 .input          = {{
639                         .type   = CX88_VMUX_TELEVISION,
640                         .vmux   = 0,
641                         .gpio0  = 0xed1a,
642                         .gpio2  = 0x00ff,
643                 },{
644                         .type   = CX88_VMUX_DEBUG,
645                         .vmux   = 0,
646                         .gpio0  = 0xff01,
647                 },{
648                         .type   = CX88_VMUX_COMPOSITE1,
649                         .vmux   = 1,
650                         .gpio0  = 0xff02,
651                 },{
652                         .type   = CX88_VMUX_SVIDEO,
653                         .vmux   = 2,
654                         .gpio0  = 0xed92,
655                         .gpio2  = 0x00ff,
656                 }},
657                 .radio = {
658                          .type   = CX88_RADIO,
659                          .gpio0  = 0xed96,
660                          .gpio2  = 0x00ff,
661                  },
662                 .mpeg           = CX88_MPEG_BLACKBIRD,
663         },
664         [CX88_BOARD_DIGITALLOGIC_MEC] = {
665                 .name           = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
666                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
667                 .radio_type     = UNSET,
668                 .tuner_addr     = ADDR_UNSET,
669                 .radio_addr     = ADDR_UNSET,
670                 .tda9887_conf   = TDA9887_PRESENT,
671                 .input          = {{
672                         .type   = CX88_VMUX_TELEVISION,
673                         .vmux   = 0,
674                         .gpio0  = 0x00009d80,
675                         .audioroute = 1,
676                 },{
677                         .type   = CX88_VMUX_COMPOSITE1,
678                         .vmux   = 1,
679                         .gpio0  = 0x00009d76,
680                         .audioroute = 1,
681                 },{
682                         .type   = CX88_VMUX_SVIDEO,
683                         .vmux   = 2,
684                         .gpio0  = 0x00009d76,
685                         .audioroute = 1,
686                 }},
687                 .radio = {
688                         .type   = CX88_RADIO,
689                         .gpio0  = 0x00009d00,
690                         .audioroute = 1,
691                 },
692                 .mpeg           = CX88_MPEG_BLACKBIRD,
693         },
694         [CX88_BOARD_IODATA_GVBCTV7E] = {
695                 .name           = "IODATA GV/BCTV7E",
696                 .tuner_type     = TUNER_PHILIPS_FQ1286,
697                 .radio_type     = UNSET,
698                 .tuner_addr     = ADDR_UNSET,
699                 .radio_addr     = ADDR_UNSET,
700                 .tda9887_conf   = TDA9887_PRESENT,
701                 .input          = {{
702                         .type   = CX88_VMUX_TELEVISION,
703                         .vmux   = 1,
704                         .gpio1  = 0x0000e03f,
705                 },{
706                         .type   = CX88_VMUX_COMPOSITE1,
707                         .vmux   = 2,
708                         .gpio1  = 0x0000e07f,
709                 },{
710                         .type   = CX88_VMUX_SVIDEO,
711                         .vmux   = 3,
712                         .gpio1  = 0x0000e07f,
713                 }}
714         },
715         [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
716                 .name           = "PixelView PlayTV Ultra Pro (Stereo)",
717                 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
718                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
719                 .radio_type     = UNSET,
720                 .tuner_addr     = ADDR_UNSET,
721                 .radio_addr     = ADDR_UNSET,
722                 .input          = {{
723                         .type   = CX88_VMUX_TELEVISION,
724                         .vmux   = 0,
725                         .gpio0  = 0xbf61,  /* internal decoder */
726                 },{
727                         .type   = CX88_VMUX_COMPOSITE1,
728                         .vmux   = 1,
729                         .gpio0  = 0xbf63,
730                 },{
731                         .type   = CX88_VMUX_SVIDEO,
732                         .vmux   = 2,
733                         .gpio0  = 0xbf63,
734                 }},
735                 .radio = {
736                          .type  = CX88_RADIO,
737                          .gpio0 = 0xbf60,
738                  },
739         },
740         [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
741                 .name           = "DViCO FusionHDTV 3 Gold-T",
742                 .tuner_type     = TUNER_THOMSON_DTT761X,
743                 .radio_type     = UNSET,
744                 .tuner_addr     = ADDR_UNSET,
745                 .radio_addr     = ADDR_UNSET,
746                 .tda9887_conf   = TDA9887_PRESENT,
747                 .input          = {{
748                         .type   = CX88_VMUX_TELEVISION,
749                         .vmux   = 0,
750                         .gpio0  = 0x97ed,
751                 },{
752                         .type   = CX88_VMUX_COMPOSITE1,
753                         .vmux   = 1,
754                         .gpio0  = 0x97e9,
755                 },{
756                         .type   = CX88_VMUX_SVIDEO,
757                         .vmux   = 2,
758                         .gpio0  = 0x97e9,
759                 }},
760                 .mpeg           = CX88_MPEG_DVB,
761         },
762         [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
763                 .name           = "ADS Tech Instant TV DVB-T PCI",
764                 .tuner_type     = TUNER_ABSENT,
765                 .radio_type     = UNSET,
766                 .tuner_addr     = ADDR_UNSET,
767                 .radio_addr     = ADDR_UNSET,
768                 .input          = {{
769                         .type   = CX88_VMUX_COMPOSITE1,
770                         .vmux   = 1,
771                         .gpio0  = 0x0700,
772                         .gpio2  = 0x0101,
773                 },{
774                         .type   = CX88_VMUX_SVIDEO,
775                         .vmux   = 2,
776                         .gpio0  = 0x0700,
777                         .gpio2  = 0x0101,
778                 }},
779                 .mpeg           = CX88_MPEG_DVB,
780         },
781         [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
782                 .name           = "TerraTec Cinergy 1400 DVB-T",
783                 .tuner_type     = TUNER_ABSENT,
784                 .input          = {{
785                         .type   = CX88_VMUX_DVB,
786                         .vmux   = 0,
787                 },{
788                         .type   = CX88_VMUX_COMPOSITE1,
789                         .vmux   = 2,
790                 },{
791                         .type   = CX88_VMUX_SVIDEO,
792                         .vmux   = 2,
793                 }},
794                 .mpeg           = CX88_MPEG_DVB,
795         },
796         [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
797                 .name           = "DViCO FusionHDTV 5 Gold",
798                 .tuner_type     = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
799                 .radio_type     = UNSET,
800                 .tuner_addr     = ADDR_UNSET,
801                 .radio_addr     = ADDR_UNSET,
802                 .tda9887_conf   = TDA9887_PRESENT,
803                 .input          = {{
804                         .type   = CX88_VMUX_TELEVISION,
805                         .vmux   = 0,
806                         .gpio0  = 0x87fd,
807                 },{
808                         .type   = CX88_VMUX_COMPOSITE1,
809                         .vmux   = 1,
810                         .gpio0  = 0x87f9,
811                 },{
812                         .type   = CX88_VMUX_SVIDEO,
813                         .vmux   = 2,
814                         .gpio0  = 0x87f9,
815                 }},
816                 .mpeg           = CX88_MPEG_DVB,
817         },
818         [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
819                 .name           = "AverMedia UltraTV Media Center PCI 550",
820                 .tuner_type     = TUNER_PHILIPS_FM1236_MK3,
821                 .radio_type     = UNSET,
822                 .tuner_addr     = ADDR_UNSET,
823                 .radio_addr     = ADDR_UNSET,
824                 .tda9887_conf   = TDA9887_PRESENT,
825                 .input          = {{
826                         .type   = CX88_VMUX_COMPOSITE1,
827                         .vmux   = 0,
828                         .gpio0  = 0x0000cd73,
829                         .audioroute = 1,
830                 },{
831                         .type   = CX88_VMUX_SVIDEO,
832                         .vmux   = 1,
833                         .gpio0  = 0x0000cd73,
834                         .audioroute = 1,
835                 },{
836                         .type   = CX88_VMUX_TELEVISION,
837                         .vmux   = 3,
838                         .gpio0  = 0x0000cdb3,
839                         .audioroute = 1,
840                 }},
841                 .radio = {
842                         .type   = CX88_RADIO,
843                         .vmux   = 2,
844                         .gpio0  = 0x0000cdf3,
845                         .audioroute = 1,
846                 },
847                 .mpeg           = CX88_MPEG_BLACKBIRD,
848         },
849         [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
850                  /* Alexander Wold <awold@bigfoot.com> */
851                  .name           = "Kworld V-Stream Xpert DVD",
852                  .tuner_type     = UNSET,
853                  .input          = {{
854                          .type   = CX88_VMUX_COMPOSITE1,
855                          .vmux   = 1,
856                          .gpio0  = 0x03000000,
857                          .gpio1  = 0x01000000,
858                          .gpio2  = 0x02000000,
859                          .gpio3  = 0x00100000,
860                  },{
861                          .type   = CX88_VMUX_SVIDEO,
862                          .vmux   = 2,
863                          .gpio0  = 0x03000000,
864                          .gpio1  = 0x01000000,
865                          .gpio2  = 0x02000000,
866                          .gpio3  = 0x00100000,
867                  }},
868         },
869         [CX88_BOARD_ATI_HDTVWONDER] = {
870                 .name           = "ATI HDTV Wonder",
871                 .tuner_type     = TUNER_PHILIPS_TUV1236D,
872                 .radio_type     = UNSET,
873                 .tuner_addr     = ADDR_UNSET,
874                 .radio_addr     = ADDR_UNSET,
875                 .input          = {{
876                         .type   = CX88_VMUX_TELEVISION,
877                         .vmux   = 0,
878                         .gpio0  = 0x00000ff7,
879                         .gpio1  = 0x000000ff,
880                         .gpio2  = 0x00000001,
881                         .gpio3  = 0x00000000,
882                 },{
883                         .type   = CX88_VMUX_COMPOSITE1,
884                         .vmux   = 1,
885                         .gpio0  = 0x00000ffe,
886                         .gpio1  = 0x000000ff,
887                         .gpio2  = 0x00000001,
888                         .gpio3  = 0x00000000,
889                 },{
890                         .type   = CX88_VMUX_SVIDEO,
891                         .vmux   = 2,
892                         .gpio0  = 0x00000ffe,
893                         .gpio1  = 0x000000ff,
894                         .gpio2  = 0x00000001,
895                         .gpio3  = 0x00000000,
896                 }},
897                 .mpeg           = CX88_MPEG_DVB,
898         },
899         [CX88_BOARD_WINFAST_DTV1000] = {
900                 .name           = "WinFast DTV1000-T",
901                 .tuner_type     = TUNER_ABSENT,
902                 .radio_type     = UNSET,
903                 .tuner_addr     = ADDR_UNSET,
904                 .radio_addr     = ADDR_UNSET,
905                 .input          = {{
906                         .type   = CX88_VMUX_DVB,
907                         .vmux   = 0,
908                 },{
909                         .type   = CX88_VMUX_COMPOSITE1,
910                         .vmux   = 1,
911                 },{
912                         .type   = CX88_VMUX_SVIDEO,
913                         .vmux   = 2,
914                 }},
915                 .mpeg           = CX88_MPEG_DVB,
916         },
917         [CX88_BOARD_AVERTV_303] = {
918                 .name           = "AVerTV 303 (M126)",
919                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
920                 .radio_type     = UNSET,
921                 .tuner_addr     = ADDR_UNSET,
922                 .radio_addr     = ADDR_UNSET,
923                 .tda9887_conf   = TDA9887_PRESENT,
924                 .input          = {{
925                         .type   = CX88_VMUX_TELEVISION,
926                         .vmux   = 0,
927                         .gpio0  = 0x00ff,
928                         .gpio1  = 0xe09f,
929                         .gpio2  = 0x0010,
930                         .gpio3  = 0x0000,
931                 },{
932                         .type   = CX88_VMUX_COMPOSITE1,
933                         .vmux   = 1,
934                         .gpio0  = 0x00ff,
935                         .gpio1  = 0xe05f,
936                         .gpio2  = 0x0010,
937                         .gpio3  = 0x0000,
938                 },{
939                         .type   = CX88_VMUX_SVIDEO,
940                         .vmux   = 2,
941                         .gpio0  = 0x00ff,
942                         .gpio1  = 0xe05f,
943                         .gpio2  = 0x0010,
944                         .gpio3  = 0x0000,
945                 }},
946         },
947         [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
948                 .name           = "Hauppauge Nova-S-Plus DVB-S",
949                 .tuner_type     = TUNER_ABSENT,
950                 .radio_type     = UNSET,
951                 .tuner_addr     = ADDR_UNSET,
952                 .radio_addr     = ADDR_UNSET,
953                 .input          = {{
954                         .type   = CX88_VMUX_DVB,
955                         .vmux   = 0,
956                 },{
957                         .type   = CX88_VMUX_COMPOSITE1,
958                         .vmux   = 1,
959                 },{
960                         .type   = CX88_VMUX_SVIDEO,
961                         .vmux   = 2,
962                 }},
963                 .mpeg           = CX88_MPEG_DVB,
964         },
965         [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
966                 .name           = "Hauppauge Nova-SE2 DVB-S",
967                 .tuner_type     = TUNER_ABSENT,
968                 .radio_type     = UNSET,
969                 .tuner_addr     = ADDR_UNSET,
970                 .radio_addr     = ADDR_UNSET,
971                 .input          = {{
972                         .type   = CX88_VMUX_DVB,
973                         .vmux   = 0,
974                 }},
975                 .mpeg           = CX88_MPEG_DVB,
976         },
977         [CX88_BOARD_KWORLD_DVBS_100] = {
978                 .name           = "KWorld DVB-S 100",
979                 .tuner_type     = TUNER_ABSENT,
980                 .radio_type     = UNSET,
981                 .tuner_addr     = ADDR_UNSET,
982                 .radio_addr     = ADDR_UNSET,
983                 .input          = {{
984                         .type   = CX88_VMUX_DVB,
985                         .vmux   = 0,
986                 },{
987                         .type   = CX88_VMUX_COMPOSITE1,
988                         .vmux   = 1,
989                 },{
990                         .type   = CX88_VMUX_SVIDEO,
991                         .vmux   = 2,
992                 }},
993                 .mpeg           = CX88_MPEG_DVB,
994         },
995         [CX88_BOARD_HAUPPAUGE_HVR1100] = {
996                 .name           = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
997                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
998                 .radio_type     = UNSET,
999                 .tuner_addr     = ADDR_UNSET,
1000                 .radio_addr     = ADDR_UNSET,
1001                 .tda9887_conf   = TDA9887_PRESENT,
1002                 .input          = {{
1003                         .type   = CX88_VMUX_TELEVISION,
1004                         .vmux   = 0,
1005                 },{
1006                         .type   = CX88_VMUX_COMPOSITE1,
1007                         .vmux   = 1,
1008                 },{
1009                         .type   = CX88_VMUX_SVIDEO,
1010                         .vmux   = 2,
1011                 }},
1012                 /* fixme: Add radio support */
1013                 .mpeg           = CX88_MPEG_DVB,
1014         },
1015         [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1016                 .name           = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1017                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
1018                 .radio_type     = UNSET,
1019                 .tuner_addr     = ADDR_UNSET,
1020                 .radio_addr     = ADDR_UNSET,
1021                 .tda9887_conf   = TDA9887_PRESENT,
1022                 .input          = {{
1023                         .type   = CX88_VMUX_TELEVISION,
1024                         .vmux   = 0,
1025                 },{
1026                         .type   = CX88_VMUX_COMPOSITE1,
1027                         .vmux   = 1,
1028                 }},
1029                 /* fixme: Add radio support */
1030                 .mpeg           = CX88_MPEG_DVB,
1031         },
1032         [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1033                 .name           = "digitalnow DNTV Live! DVB-T Pro",
1034                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
1035                 .radio_type     = UNSET,
1036                 .tuner_addr     = ADDR_UNSET,
1037                 .radio_addr     = ADDR_UNSET,
1038                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1039                                   TDA9887_PORT2_ACTIVE,
1040                 .input          = {{
1041                         .type   = CX88_VMUX_TELEVISION,
1042                         .vmux   = 0,
1043                         .gpio0  = 0xf80808,
1044                 },{
1045                         .type   = CX88_VMUX_COMPOSITE1,
1046                         .vmux   = 1,
1047                         .gpio0  = 0xf80808,
1048                 },{
1049                         .type   = CX88_VMUX_SVIDEO,
1050                         .vmux   = 2,
1051                         .gpio0  = 0xf80808,
1052                 }},
1053                 .radio = {
1054                          .type  = CX88_RADIO,
1055                          .gpio0 = 0xf80808,
1056                 },
1057                 .mpeg           = CX88_MPEG_DVB,
1058         },
1059         [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1060                 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1061                 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x  */
1062                 /* Manenti Marco <marco_manenti@colman.it> */
1063                 .name           = "KWorld/VStream XPert DVB-T with cx22702",
1064                 .tuner_type     = TUNER_ABSENT,
1065                 .radio_type     = UNSET,
1066                 .tuner_addr     = ADDR_UNSET,
1067                 .radio_addr     = ADDR_UNSET,
1068                 .input          = {{
1069                         .type   = CX88_VMUX_COMPOSITE1,
1070                         .vmux   = 1,
1071                         .gpio0  = 0x0700,
1072                         .gpio2  = 0x0101,
1073                 },{
1074                         .type   = CX88_VMUX_SVIDEO,
1075                         .vmux   = 2,
1076                         .gpio0  = 0x0700,
1077                         .gpio2  = 0x0101,
1078                 }},
1079                 .mpeg           = CX88_MPEG_DVB,
1080         },
1081         [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1082                 .name           = "DViCO FusionHDTV DVB-T Dual Digital",
1083                 .tuner_type     = TUNER_ABSENT, /* No analog tuner */
1084                 .radio_type     = UNSET,
1085                 .tuner_addr     = ADDR_UNSET,
1086                 .radio_addr     = ADDR_UNSET,
1087                 .input          = {{
1088                         .type   = CX88_VMUX_COMPOSITE1,
1089                         .vmux   = 1,
1090                         .gpio0  = 0x000067df,
1091                  },{
1092                         .type   = CX88_VMUX_SVIDEO,
1093                         .vmux   = 2,
1094                         .gpio0  = 0x000067df,
1095                 }},
1096                 .mpeg           = CX88_MPEG_DVB,
1097         },
1098         [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1099                 .name           = "KWorld HardwareMpegTV XPert",
1100                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1101                 .radio_type     = UNSET,
1102                 .tuner_addr     = ADDR_UNSET,
1103                 .radio_addr     = ADDR_UNSET,
1104                 .input          = {{
1105                         .type   = CX88_VMUX_TELEVISION,
1106                         .vmux   = 0,
1107                         .gpio0  = 0x3de2,
1108                         .gpio2  = 0x00ff,
1109                 },{
1110                         .type   = CX88_VMUX_COMPOSITE1,
1111                         .vmux   = 1,
1112                         .gpio0  = 0x3de6,
1113                         .audioroute = 1,
1114                 },{
1115                         .type   = CX88_VMUX_SVIDEO,
1116                         .vmux   = 2,
1117                         .gpio0  = 0x3de6,
1118                         .audioroute = 1,
1119                 }},
1120                 .radio = {
1121                         .type   = CX88_RADIO,
1122                         .gpio0  = 0x3de6,
1123                         .gpio2  = 0x00ff,
1124                 },
1125                 .mpeg           = CX88_MPEG_BLACKBIRD,
1126         },
1127         [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1128                 .name           = "DViCO FusionHDTV DVB-T Hybrid",
1129                 .tuner_type     = TUNER_THOMSON_FE6600,
1130                 .radio_type     = UNSET,
1131                 .tuner_addr     = ADDR_UNSET,
1132                 .radio_addr     = ADDR_UNSET,
1133                 .input          = {{
1134                         .type   = CX88_VMUX_TELEVISION,
1135                         .vmux   = 0,
1136                         .gpio0  = 0x0000a75f,
1137                 },{
1138                         .type   = CX88_VMUX_COMPOSITE1,
1139                         .vmux   = 1,
1140                         .gpio0  = 0x0000a75b,
1141                 },{
1142                         .type   = CX88_VMUX_SVIDEO,
1143                         .vmux   = 2,
1144                         .gpio0  = 0x0000a75b,
1145                 }},
1146                 .mpeg           = CX88_MPEG_DVB,
1147         },
1148         [CX88_BOARD_PCHDTV_HD5500] = {
1149                 .name           = "pcHDTV HD5500 HDTV",
1150                 .tuner_type     = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
1151                 .radio_type     = UNSET,
1152                 .tuner_addr     = ADDR_UNSET,
1153                 .radio_addr     = ADDR_UNSET,
1154                 .tda9887_conf   = TDA9887_PRESENT,
1155                 .input          = {{
1156                         .type   = CX88_VMUX_TELEVISION,
1157                         .vmux   = 0,
1158                         .gpio0  = 0x87fd,
1159                 },{
1160                         .type   = CX88_VMUX_COMPOSITE1,
1161                         .vmux   = 1,
1162                         .gpio0  = 0x87f9,
1163                 },{
1164                         .type   = CX88_VMUX_SVIDEO,
1165                         .vmux   = 2,
1166                         .gpio0  = 0x87f9,
1167                 }},
1168                 .mpeg           = CX88_MPEG_DVB,
1169         },
1170         [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1171                 /* FIXME: tested TV input only, disabled composite,
1172                    svideo and radio until they can be tested also. */
1173                 .name           = "Kworld MCE 200 Deluxe",
1174                 .tuner_type     = TUNER_TENA_9533_DI,
1175                 .radio_type     = UNSET,
1176                 .tda9887_conf   = TDA9887_PRESENT,
1177                 .tuner_addr     = ADDR_UNSET,
1178                 .radio_addr     = ADDR_UNSET,
1179                 .input          = {{
1180                         .type   = CX88_VMUX_TELEVISION,
1181                         .vmux   = 0,
1182                         .gpio0  = 0x0000BDE6
1183                 }},
1184                 .mpeg           = CX88_MPEG_BLACKBIRD,
1185         },
1186         [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1187                 /* FIXME: SVideo, Composite and FM inputs are untested */
1188                 .name           = "PixelView PlayTV P7000",
1189                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
1190                 .radio_type     = UNSET,
1191                 .tuner_addr     = ADDR_UNSET,
1192                 .radio_addr     = ADDR_UNSET,
1193                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1194                                   TDA9887_PORT2_ACTIVE,
1195                 .input          = {{
1196                         .type   = CX88_VMUX_TELEVISION,
1197                         .vmux   = 0,
1198                         .gpio0  = 0x5da6,
1199                 }},
1200                 .mpeg           = CX88_MPEG_BLACKBIRD,
1201         },
1202         [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1203                 .name           = "NPG Tech Real TV FM Top 10",
1204                 .tuner_type     = TUNER_TNF_5335MF, /* Actually a TNF9535 */
1205                 .radio_type     = UNSET,
1206                 .tuner_addr     = ADDR_UNSET,
1207                 .radio_addr     = ADDR_UNSET,
1208                 .input          = {{
1209                         .type   = CX88_VMUX_TELEVISION,
1210                         .vmux   = 0,
1211                         .gpio0  = 0x0788,
1212                 },{
1213                         .type   = CX88_VMUX_COMPOSITE1,
1214                         .vmux   = 1,
1215                         .gpio0  = 0x078b,
1216                 },{
1217                         .type   = CX88_VMUX_SVIDEO,
1218                         .vmux   = 2,
1219                         .gpio0  = 0x078b,
1220                 }},
1221                 .radio = {
1222                          .type  = CX88_RADIO,
1223                          .gpio0 = 0x074a,
1224                 },
1225         },
1226         [CX88_BOARD_WINFAST_DTV2000H] = {
1227                 /* video inputs and radio still in testing */
1228                 .name           = "WinFast DTV2000 H",
1229                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
1230                 .radio_type     = UNSET,
1231                 .tuner_addr     = ADDR_UNSET,
1232                 .radio_addr     = ADDR_UNSET,
1233                 .tda9887_conf   = TDA9887_PRESENT,
1234                 .input          = {{
1235                         .type   = CX88_VMUX_TELEVISION,
1236                         .vmux   = 0,
1237                         .gpio0  = 0x00017304,
1238                         .gpio1  = 0x00008203,
1239                         .gpio2  = 0x00017304,
1240                         .gpio3  = 0x02000000,
1241                 }},
1242                 .mpeg           = CX88_MPEG_DVB,
1243         },
1244         [CX88_BOARD_GENIATECH_DVBS] = {
1245                 .name          = "Geniatech DVB-S",
1246                 .tuner_type    = TUNER_ABSENT,
1247                 .radio_type    = UNSET,
1248                 .tuner_addr    = ADDR_UNSET,
1249                 .radio_addr    = ADDR_UNSET,
1250                 .input  = {{
1251                         .type  = CX88_VMUX_DVB,
1252                         .vmux  = 0,
1253                 },{
1254                         .type  = CX88_VMUX_COMPOSITE1,
1255                         .vmux  = 1,
1256                 }},
1257                 .mpeg           = CX88_MPEG_DVB,
1258         },
1259         [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1260                 /* FIXME: Add dvb & radio support */
1261                 .name           = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1262                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
1263                 .radio_type     = UNSET,
1264                 .tuner_addr     = ADDR_UNSET,
1265                 .radio_addr     = ADDR_UNSET,
1266                 .tda9887_conf   = TDA9887_PRESENT,
1267                 .input          = {{
1268                         .type   = CX88_VMUX_TELEVISION,
1269                         .vmux   = 0,
1270                         .gpio0  = 0x84bf,
1271                 },{
1272                         .type   = CX88_VMUX_COMPOSITE1,
1273                         .vmux   = 1,
1274                         .gpio0  = 0x84bf,
1275                 },{
1276                         .type   = CX88_VMUX_SVIDEO,
1277                         .vmux   = 2,
1278                         .gpio0  = 0x84bf,
1279                 }},
1280                 .mpeg           = CX88_MPEG_DVB,
1281         },
1282         [CX88_BOARD_NORWOOD_MICRO] = {
1283                 .name           = "Norwood Micro TV Tuner",
1284                 .tuner_type     = TUNER_TNF_5335MF,
1285                 .radio_type     = UNSET,
1286                 .tuner_addr     = ADDR_UNSET,
1287                 .radio_addr     = ADDR_UNSET,
1288                 .input          = {{
1289                         .type   = CX88_VMUX_TELEVISION,
1290                         .vmux   = 0,
1291                         .gpio0  = 0x0709,
1292                 },{
1293                         .type   = CX88_VMUX_COMPOSITE1,
1294                         .vmux   = 1,
1295                         .gpio0  = 0x070b,
1296                 },{
1297                         .type   = CX88_VMUX_SVIDEO,
1298                         .vmux   = 2,
1299                         .gpio0  = 0x070b,
1300                 }},
1301         },
1302         [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1303                 .name           = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1304                 .tuner_type     = TUNER_LG_PAL_NEW_TAPC,
1305                 .radio_type     = UNSET,
1306                 .tuner_addr     = ADDR_UNSET,
1307                 .radio_addr     = ADDR_UNSET,
1308                 .input          = {{
1309                         .type   = CX88_VMUX_TELEVISION,
1310                         .vmux   = 0,
1311                         .gpio0  = 0x003fffff,
1312                         .gpio1  = 0x00e00000,
1313                         .gpio2  = 0x003fffff,
1314                         .gpio3  = 0x02000000,
1315                 },{
1316                         .type   = CX88_VMUX_COMPOSITE1,
1317                         .vmux   = 1,
1318                         .gpio0  = 0x003fffff,
1319                         .gpio1  = 0x00e00000,
1320                         .gpio2  = 0x003fffff,
1321                         .gpio3  = 0x02000000,
1322                 },{
1323                         .type   = CX88_VMUX_SVIDEO,
1324                         .vmux   = 2,
1325                         .gpio0  = 0x003fffff,
1326                         .gpio1  = 0x00e00000,
1327                         .gpio2  = 0x003fffff,
1328                         .gpio3  = 0x02000000,
1329                 }},
1330         },
1331         [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1332                 .name           = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1333                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
1334                 .radio_type     = UNSET,
1335                 .tuner_addr     = ADDR_UNSET,
1336                 .radio_addr     = ADDR_UNSET,
1337                 .tda9887_conf   = TDA9887_PRESENT,
1338                 .audio_chip     = AUDIO_CHIP_WM8775,
1339                 .input          = {{
1340                         .type   = CX88_VMUX_TELEVISION,
1341                         .vmux   = 0,
1342                         .gpio0  = 0xe780,
1343                         .audioroute = 1,
1344                 },{
1345                         .type   = CX88_VMUX_COMPOSITE1,
1346                         .vmux   = 1,
1347                         .gpio0  = 0xe780,
1348                         .audioroute = 2,
1349                 },{
1350                         .type   = CX88_VMUX_SVIDEO,
1351                         .vmux   = 2,
1352                         .gpio0  = 0xe780,
1353                         .audioroute = 2,
1354                 }},
1355                 /* fixme: Add radio support */
1356                 .mpeg           = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
1357         },
1358         [CX88_BOARD_ADSTECH_PTV_390] = {
1359                 .name           = "ADS Tech Instant Video PCI",
1360                 .tuner_type     = TUNER_ABSENT,
1361                 .radio_type     = UNSET,
1362                 .tuner_addr     = ADDR_UNSET,
1363                 .radio_addr     = ADDR_UNSET,
1364                 .input          = {{
1365                         .type   = CX88_VMUX_DEBUG,
1366                         .vmux   = 3,
1367                         .gpio0  = 0x04ff,
1368                 },{
1369                         .type   = CX88_VMUX_COMPOSITE1,
1370                         .vmux   = 1,
1371                         .gpio0  = 0x07fa,
1372                 },{
1373                         .type   = CX88_VMUX_SVIDEO,
1374                         .vmux   = 2,
1375                         .gpio0  = 0x07fa,
1376                 }},
1377         },
1378         [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1379                 .name           = "Pinnacle PCTV HD 800i",
1380                 .tuner_type     = TUNER_XC5000,
1381                 .radio_type     = UNSET,
1382                 .tuner_addr     = ADDR_UNSET,
1383                 .radio_addr     = ADDR_UNSET,
1384                 .input          = {{
1385                         .type   = CX88_VMUX_TELEVISION,
1386                         .vmux   = 0,
1387                         .gpio0  = 0x04fb,
1388                         .gpio1  = 0x10ff,
1389                 },{
1390                         .type   = CX88_VMUX_COMPOSITE1,
1391                         .vmux   = 1,
1392                         .gpio0  = 0x04fb,
1393                         .gpio1  = 0x10ef,
1394                         .audioroute = 1,
1395                 },{
1396                         .type   = CX88_VMUX_SVIDEO,
1397                         .vmux   = 2,
1398                         .gpio0  = 0x04fb,
1399                         .gpio1  = 0x10ef,
1400                         .audioroute = 1,
1401                 }},
1402                 .mpeg           = CX88_MPEG_DVB,
1403         },
1404 };
1405
1406 /* ------------------------------------------------------------------ */
1407 /* PCI subsystem IDs                                                  */
1408
1409 static const struct cx88_subid cx88_subids[] = {
1410         {
1411                 .subvendor = 0x0070,
1412                 .subdevice = 0x3400,
1413                 .card      = CX88_BOARD_HAUPPAUGE,
1414         },{
1415                 .subvendor = 0x0070,
1416                 .subdevice = 0x3401,
1417                 .card      = CX88_BOARD_HAUPPAUGE,
1418         },{
1419                 .subvendor = 0x14c7,
1420                 .subdevice = 0x0106,
1421                 .card      = CX88_BOARD_GDI,
1422         },{
1423                 .subvendor = 0x14c7,
1424                 .subdevice = 0x0107, /* with mpeg encoder */
1425                 .card      = CX88_BOARD_GDI,
1426         },{
1427                 .subvendor = PCI_VENDOR_ID_ATI,
1428                 .subdevice = 0x00f8,
1429                 .card      = CX88_BOARD_ATI_WONDER_PRO,
1430         },{
1431                 .subvendor = 0x107d,
1432                 .subdevice = 0x6611,
1433                 .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
1434         },{
1435                 .subvendor = 0x107d,
1436                 .subdevice = 0x6613,    /* NTSC */
1437                 .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
1438         },{
1439                 .subvendor = 0x107d,
1440                 .subdevice = 0x6620,
1441                 .card      = CX88_BOARD_WINFAST_DV2000,
1442         },{
1443                 .subvendor = 0x107d,
1444                 .subdevice = 0x663b,
1445                 .card      = CX88_BOARD_LEADTEK_PVR2000,
1446         },{
1447                 .subvendor = 0x107d,
1448                 .subdevice = 0x663c,
1449                 .card      = CX88_BOARD_LEADTEK_PVR2000,
1450         },{
1451                 .subvendor = 0x1461,
1452                 .subdevice = 0x000b,
1453                 .card      = CX88_BOARD_AVERTV_STUDIO_303,
1454         },{
1455                 .subvendor = 0x1462,
1456                 .subdevice = 0x8606,
1457                 .card      = CX88_BOARD_MSI_TVANYWHERE_MASTER,
1458         },{
1459                 .subvendor = 0x10fc,
1460                 .subdevice = 0xd003,
1461                 .card      = CX88_BOARD_IODATA_GVVCP3PCI,
1462         },{
1463                 .subvendor = 0x1043,
1464                 .subdevice = 0x4823,  /* with mpeg encoder */
1465                 .card      = CX88_BOARD_ASUS_PVR_416,
1466         },{
1467                 .subvendor = 0x17de,
1468                 .subdevice = 0x08a6,
1469                 .card      = CX88_BOARD_KWORLD_DVB_T,
1470         },{
1471                 .subvendor = 0x18ac,
1472                 .subdevice = 0xd810,
1473                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
1474         },{
1475                 .subvendor = 0x18ac,
1476                 .subdevice = 0xd820,
1477                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
1478         },{
1479                 .subvendor = 0x18ac,
1480                 .subdevice = 0xdb00,
1481                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
1482         },{
1483                 .subvendor = 0x0070,
1484                 .subdevice = 0x9002,
1485                 .card      = CX88_BOARD_HAUPPAUGE_DVB_T1,
1486         },{
1487                 .subvendor = 0x14f1,
1488                 .subdevice = 0x0187,
1489                 .card      = CX88_BOARD_CONEXANT_DVB_T1,
1490         },{
1491                 .subvendor = 0x1540,
1492                 .subdevice = 0x2580,
1493                 .card      = CX88_BOARD_PROVIDEO_PV259,
1494         },{
1495                 .subvendor = 0x18ac,
1496                 .subdevice = 0xdb10,
1497                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1498         },{
1499                 .subvendor = 0x1554,
1500                 .subdevice = 0x4811,
1501                 .card      = CX88_BOARD_PIXELVIEW,
1502         },{
1503                 .subvendor = 0x7063,
1504                 .subdevice = 0x3000, /* HD-3000 card */
1505                 .card      = CX88_BOARD_PCHDTV_HD3000,
1506         },{
1507                 .subvendor = 0x17de,
1508                 .subdevice = 0xa8a6,
1509                 .card      = CX88_BOARD_DNTV_LIVE_DVB_T,
1510         },{
1511                 .subvendor = 0x0070,
1512                 .subdevice = 0x2801,
1513                 .card      = CX88_BOARD_HAUPPAUGE_ROSLYN,
1514         },{
1515                 .subvendor = 0x14f1,
1516                 .subdevice = 0x0342,
1517                 .card      = CX88_BOARD_DIGITALLOGIC_MEC,
1518         },{
1519                 .subvendor = 0x10fc,
1520                 .subdevice = 0xd035,
1521                 .card      = CX88_BOARD_IODATA_GVBCTV7E,
1522         },{
1523                 .subvendor = 0x1421,
1524                 .subdevice = 0x0334,
1525                 .card      = CX88_BOARD_ADSTECH_DVB_T_PCI,
1526         },{
1527                 .subvendor = 0x153b,
1528                 .subdevice = 0x1166,
1529                 .card      = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
1530         },{
1531                 .subvendor = 0x18ac,
1532                 .subdevice = 0xd500,
1533                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
1534         },{
1535                 .subvendor = 0x1461,
1536                 .subdevice = 0x8011,
1537                 .card      = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
1538         },{
1539                 .subvendor = PCI_VENDOR_ID_ATI,
1540                 .subdevice = 0xa101,
1541                 .card      = CX88_BOARD_ATI_HDTVWONDER,
1542         },{
1543                 .subvendor = 0x107d,
1544                 .subdevice = 0x665f,
1545                 .card      = CX88_BOARD_WINFAST_DTV1000,
1546         },{
1547                 .subvendor = 0x1461,
1548                 .subdevice = 0x000a,
1549                 .card      = CX88_BOARD_AVERTV_303,
1550         },{
1551                 .subvendor = 0x0070,
1552                 .subdevice = 0x9200,
1553                 .card      = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
1554         },{
1555                 .subvendor = 0x0070,
1556                 .subdevice = 0x9201,
1557                 .card      = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1558         },{
1559                 .subvendor = 0x0070,
1560                 .subdevice = 0x9202,
1561                 .card      = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1562         },{
1563                 .subvendor = 0x17de,
1564                 .subdevice = 0x08b2,
1565                 .card      = CX88_BOARD_KWORLD_DVBS_100,
1566         },{
1567                 .subvendor = 0x0070,
1568                 .subdevice = 0x9400,
1569                 .card      = CX88_BOARD_HAUPPAUGE_HVR1100,
1570         },{
1571                 .subvendor = 0x0070,
1572                 .subdevice = 0x9402,
1573                 .card      = CX88_BOARD_HAUPPAUGE_HVR1100,
1574         },{
1575                 .subvendor = 0x0070,
1576                 .subdevice = 0x9800,
1577                 .card      = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1578         },{
1579                 .subvendor = 0x0070,
1580                 .subdevice = 0x9802,
1581                 .card      = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1582         },{
1583                 .subvendor = 0x0070,
1584                 .subdevice = 0x9001,
1585                 .card      = CX88_BOARD_HAUPPAUGE_DVB_T1,
1586         },{
1587                 .subvendor = 0x1822,
1588                 .subdevice = 0x0025,
1589                 .card      = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
1590         },{
1591                 .subvendor = 0x17de,
1592                 .subdevice = 0x08a1,
1593                 .card      = CX88_BOARD_KWORLD_DVB_T_CX22702,
1594         },{
1595                 .subvendor = 0x18ac,
1596                 .subdevice = 0xdb50,
1597                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
1598         },{
1599                 .subvendor = 0x18ac,
1600                 .subdevice = 0xdb54,
1601                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
1602                 /* Re-branded DViCO: DigitalNow DVB-T Dual */
1603         },{
1604                 .subvendor = 0x18ac,
1605                 .subdevice = 0xdb11,
1606                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1607                 /* Re-branded DViCO: UltraView DVB-T Plus */
1608         },{
1609                 .subvendor = 0x17de,
1610                 .subdevice = 0x0840,
1611                 .card      = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
1612         },{
1613                 .subvendor = 0x1421,
1614                 .subdevice = 0x0305,
1615                 .card      = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
1616         },{
1617                 .subvendor = 0x18ac,
1618                 .subdevice = 0xdb40,
1619                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1620         },{
1621                 .subvendor = 0x18ac,
1622                 .subdevice = 0xdb44,
1623                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1624         },{
1625                 .subvendor = 0x7063,
1626                 .subdevice = 0x5500,
1627                 .card      = CX88_BOARD_PCHDTV_HD5500,
1628         },{
1629                 .subvendor = 0x17de,
1630                 .subdevice = 0x0841,
1631                 .card      = CX88_BOARD_KWORLD_MCE200_DELUXE,
1632         },{
1633                 .subvendor = 0x1822,
1634                 .subdevice = 0x0019,
1635                 .card      = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
1636         },{
1637                 .subvendor = 0x1554,
1638                 .subdevice = 0x4813,
1639                 .card      = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
1640         },{
1641                 .subvendor = 0x14f1,
1642                 .subdevice = 0x0842,
1643                 .card      = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
1644         },{
1645                 .subvendor = 0x107d,
1646                 .subdevice = 0x665e,
1647                 .card      = CX88_BOARD_WINFAST_DTV2000H,
1648         },{
1649                 .subvendor = 0x18ac,
1650                 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
1651                 .card      = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
1652         },{
1653                 .subvendor = 0x14f1,
1654                 .subdevice = 0x0084,
1655                 .card      = CX88_BOARD_GENIATECH_DVBS,
1656         },{
1657                 .subvendor = 0x0070,
1658                 .subdevice = 0x1404,
1659                 .card      = CX88_BOARD_HAUPPAUGE_HVR3000,
1660         },{
1661                 .subvendor = 0x1461,
1662                 .subdevice = 0xc111, /* AverMedia M150-D */
1663                 /* This board is known to work with the ASUS PVR416 config */
1664                 .card      = CX88_BOARD_ASUS_PVR_416,
1665         },{
1666                 .subvendor = 0xc180,
1667                 .subdevice = 0xc980,
1668                 .card      = CX88_BOARD_TE_DTV_250_OEM_SWANN,
1669         },{
1670                 .subvendor = 0x0070,
1671                 .subdevice = 0x9600,
1672                 .card      = CX88_BOARD_HAUPPAUGE_HVR1300,
1673         },{
1674                 .subvendor = 0x0070,
1675                 .subdevice = 0x9601,
1676                 .card      = CX88_BOARD_HAUPPAUGE_HVR1300,
1677         },{
1678                 .subvendor = 0x0070,
1679                 .subdevice = 0x9602,
1680                 .card      = CX88_BOARD_HAUPPAUGE_HVR1300,
1681         },{
1682                 .subvendor = 0x107d,
1683                 .subdevice = 0x6632,
1684                 .card      = CX88_BOARD_LEADTEK_PVR2000,
1685         },{
1686                 .subvendor = 0x12ab,
1687                 .subdevice = 0x2300, /* Club3D Zap TV2100 */
1688                 .card      = CX88_BOARD_KWORLD_DVB_T_CX22702,
1689         },{
1690                 .subvendor = 0x0070,
1691                 .subdevice = 0x9000,
1692                 .card      = CX88_BOARD_HAUPPAUGE_DVB_T1,
1693         },{
1694                 .subvendor = 0x0070,
1695                 .subdevice = 0x1400,
1696                 .card      = CX88_BOARD_HAUPPAUGE_HVR3000,
1697         },{
1698                 .subvendor = 0x0070,
1699                 .subdevice = 0x1401,
1700                 .card      = CX88_BOARD_HAUPPAUGE_HVR3000,
1701         },{
1702                 .subvendor = 0x0070,
1703                 .subdevice = 0x1402,
1704                 .card      = CX88_BOARD_HAUPPAUGE_HVR3000,
1705         },{
1706                 .subvendor = 0x1421,
1707                 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
1708                 .card      = CX88_BOARD_KWORLD_DVBS_100,
1709         },{
1710                 .subvendor = 0x1421,
1711                 .subdevice = 0x0390,
1712                 .card      = CX88_BOARD_ADSTECH_PTV_390,
1713         },{
1714                 .subvendor = 0x11bd,
1715                 .subdevice = 0x0051,
1716                 .card      = CX88_BOARD_PINNACLE_PCTV_HD_800i,
1717         },
1718 };
1719
1720 /* ----------------------------------------------------------------------- */
1721 /* some leadtek specific stuff                                             */
1722
1723 static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
1724 {
1725         /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
1726          * any others.
1727          *
1728          * Byte 0 is 1 on the NTSC board.
1729          */
1730
1731         if (eeprom_data[4] != 0x7d ||
1732             eeprom_data[5] != 0x10 ||
1733             eeprom_data[7] != 0x66) {
1734                 printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
1735                        core->name);
1736                 return;
1737         }
1738
1739         core->board.tuner_type = (eeprom_data[6] == 0x13) ?
1740                 TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
1741
1742         printk(KERN_INFO "%s: Leadtek Winfast 2000XP Expert config: "
1743                "tuner=%d, eeprom[0]=0x%02x\n",
1744                core->name, core->board.tuner_type, eeprom_data[0]);
1745 }
1746
1747 static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
1748 {
1749         struct tveeprom tv;
1750
1751         tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
1752         core->board.tuner_type = tv.tuner_type;
1753         core->tuner_formats = tv.tuner_formats;
1754         core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
1755
1756         /* Make sure we support the board model */
1757         switch (tv.model)
1758         {
1759         case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
1760         case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
1761         case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
1762         case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
1763         case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
1764         case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
1765         case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
1766         case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
1767         case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
1768         case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
1769         case 34519: /* WinTV-PCI-FM */
1770         case 90002: /* Nova-T-PCI (9002) */
1771         case 92001: /* Nova-S-Plus (Video and IR) */
1772         case 92002: /* Nova-S-Plus (Video and IR) */
1773         case 90003: /* Nova-T-PCI (9002 No RF out) */
1774         case 90500: /* Nova-T-PCI (oem) */
1775         case 90501: /* Nova-T-PCI (oem/IR) */
1776         case 92000: /* Nova-SE2 (OEM, No Video or IR) */
1777         case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
1778         case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
1779         case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
1780         case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
1781         case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
1782         case 96569: /* WinTV-HVR1300 () */
1783         case 96659: /* WinTV-HVR1300 () */
1784         case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1785                 /* known */
1786                 break;
1787         default:
1788                 printk("%s: warning: unknown hauppauge model #%d\n",
1789                        core->name, tv.model);
1790                 break;
1791         }
1792
1793         printk(KERN_INFO "%s: hauppauge eeprom: model=%d\n",
1794                         core->name, tv.model);
1795 }
1796
1797 /* ----------------------------------------------------------------------- */
1798 /* some GDI (was: Modular Technology) specific stuff                       */
1799
1800 static struct {
1801         int  id;
1802         int  fm;
1803         char *name;
1804 } gdi_tuner[] = {
1805         [ 0x01 ] = { .id   = TUNER_ABSENT,
1806                      .name = "NTSC_M" },
1807         [ 0x02 ] = { .id   = TUNER_ABSENT,
1808                      .name = "PAL_B" },
1809         [ 0x03 ] = { .id   = TUNER_ABSENT,
1810                      .name = "PAL_I" },
1811         [ 0x04 ] = { .id   = TUNER_ABSENT,
1812                      .name = "PAL_D" },
1813         [ 0x05 ] = { .id   = TUNER_ABSENT,
1814                      .name = "SECAM" },
1815
1816         [ 0x10 ] = { .id   = TUNER_ABSENT,
1817                      .fm   = 1,
1818                      .name = "TEMIC_4049" },
1819         [ 0x11 ] = { .id   = TUNER_TEMIC_4136FY5,
1820                      .name = "TEMIC_4136" },
1821         [ 0x12 ] = { .id   = TUNER_ABSENT,
1822                      .name = "TEMIC_4146" },
1823
1824         [ 0x20 ] = { .id   = TUNER_PHILIPS_FQ1216ME,
1825                      .fm   = 1,
1826                      .name = "PHILIPS_FQ1216_MK3" },
1827         [ 0x21 ] = { .id   = TUNER_ABSENT, .fm = 1,
1828                      .name = "PHILIPS_FQ1236_MK3" },
1829         [ 0x22 ] = { .id   = TUNER_ABSENT,
1830                      .name = "PHILIPS_FI1236_MK3" },
1831         [ 0x23 ] = { .id   = TUNER_ABSENT,
1832                      .name = "PHILIPS_FI1216_MK3" },
1833 };
1834
1835 static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
1836 {
1837         char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
1838                 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
1839
1840         printk(KERN_INFO "%s: GDI: tuner=%s\n", core->name,
1841                name ? name : "unknown");
1842         if (NULL == name)
1843                 return;
1844         core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
1845         core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
1846                 CX88_RADIO : 0;
1847 }
1848
1849 /* ----------------------------------------------------------------------- */
1850 /* some DViCO specific stuff                                               */
1851
1852 static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
1853 {
1854         struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
1855         int i, err;
1856         static u8 init_bufs[13][5] = {
1857                 { 0x10, 0x00, 0x20, 0x01, 0x03 },
1858                 { 0x10, 0x10, 0x01, 0x00, 0x21 },
1859                 { 0x10, 0x10, 0x10, 0x00, 0xCA },
1860                 { 0x10, 0x10, 0x12, 0x00, 0x08 },
1861                 { 0x10, 0x10, 0x13, 0x00, 0x0A },
1862                 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
1863                 { 0x10, 0x10, 0x22, 0x01, 0x3D },
1864                 { 0x10, 0x10, 0x73, 0x01, 0x2E },
1865                 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
1866                 { 0x10, 0x10, 0x71, 0x01, 0x97 },
1867                 { 0x10, 0x10, 0x70, 0x00, 0x0F },
1868                 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
1869                 { 0x03, 0x0C },
1870         };
1871
1872         for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
1873                 msg.buf = init_bufs[i];
1874                 msg.len = (i != 12 ? 5 : 2);
1875                 err = i2c_transfer(&core->i2c_adap, &msg, 1);
1876                 if (err != 1) {
1877                         printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i, err);
1878                         return;
1879                 }
1880         }
1881 }
1882
1883 /* ----------------------------------------------------------------------- */
1884 /* Tuner callback function. Currently only needed for the Pinnacle         *
1885  * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both       *
1886  * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c)    */
1887
1888 int cx88_tuner_callback(void *priv, int command, int arg)
1889 {
1890         struct i2c_algo_bit_data *i2c_algo = priv;
1891         struct cx88_core *core = i2c_algo->data;
1892
1893         switch(core->boardnr) {
1894         case CX88_BOARD_PINNACLE_PCTV_HD_800i:
1895                 if(command == 0) { /* This is the reset command from xc5000 */
1896                         /* Reset XC5000 tuner via SYS_RSTO_pin */
1897                         cx_write(MO_SRST_IO, 0);
1898                         msleep(10);
1899                         cx_write(MO_SRST_IO, 1);
1900                         return 0;
1901                 }
1902                 else {
1903                         printk(KERN_ERR
1904                                 "xc5000: unknown tuner callback command.\n");
1905                         return -EINVAL;
1906                 }
1907                 break;
1908         }
1909         return 0; /* Should never be here */
1910 }
1911 EXPORT_SYMBOL(cx88_tuner_callback);
1912
1913 /* ----------------------------------------------------------------------- */
1914
1915 static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1916 {
1917         int i;
1918
1919         if (0 == pci->subsystem_vendor &&
1920             0 == pci->subsystem_device) {
1921                 printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1922                        "%s: be autodetected.  Please pass card=<n> insmod option to\n"
1923                        "%s: workaround that.  Redirect complaints to the vendor of\n"
1924                        "%s: the TV card.  Best regards,\n"
1925                        "%s:         -- tux\n",
1926                        core->name,core->name,core->name,core->name,core->name);
1927         } else {
1928                 printk("%s: Your board isn't known (yet) to the driver.  You can\n"
1929                        "%s: try to pick one of the existing card configs via\n"
1930                        "%s: card=<n> insmod option.  Updating to the latest\n"
1931                        "%s: version might help as well.\n",
1932                        core->name,core->name,core->name,core->name);
1933         }
1934         printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1935                core->name);
1936         for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
1937                 printk("%s:    card=%d -> %s\n",
1938                        core->name, i, cx88_boards[i].name);
1939 }
1940
1941 static void cx88_card_setup_pre_i2c(struct cx88_core *core)
1942 {
1943         switch (core->boardnr) {
1944         case CX88_BOARD_HAUPPAUGE_HVR1300:
1945                 /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
1946                 /* We leave here with the 702 on the bus */
1947                 cx_write(MO_GP0_IO, 0x0000e780);
1948                 udelay(1000);
1949                 cx_clear(MO_GP0_IO, 0x00000080);
1950                 udelay(50);
1951                 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
1952                 udelay(1000);
1953                 break;
1954         }
1955 }
1956
1957 static void cx88_card_setup(struct cx88_core *core)
1958 {
1959         static u8 eeprom[256];
1960
1961         if (0 == core->i2c_rc) {
1962                 core->i2c_client.addr = 0xa0 >> 1;
1963                 tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
1964         }
1965
1966         switch (core->boardnr) {
1967         case CX88_BOARD_HAUPPAUGE:
1968         case CX88_BOARD_HAUPPAUGE_ROSLYN:
1969                 if (0 == core->i2c_rc)
1970                         hauppauge_eeprom(core,eeprom+8);
1971                 break;
1972         case CX88_BOARD_GDI:
1973                 if (0 == core->i2c_rc)
1974                         gdi_eeprom(core,eeprom);
1975                 break;
1976         case CX88_BOARD_WINFAST2000XP_EXPERT:
1977                 if (0 == core->i2c_rc)
1978                         leadtek_eeprom(core,eeprom);
1979                 break;
1980         case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
1981         case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
1982         case CX88_BOARD_HAUPPAUGE_DVB_T1:
1983         case CX88_BOARD_HAUPPAUGE_HVR1100:
1984         case CX88_BOARD_HAUPPAUGE_HVR1100LP:
1985         case CX88_BOARD_HAUPPAUGE_HVR3000:
1986         case CX88_BOARD_HAUPPAUGE_HVR1300:
1987                 if (0 == core->i2c_rc)
1988                         hauppauge_eeprom(core,eeprom);
1989                 break;
1990         case CX88_BOARD_KWORLD_DVBS_100:
1991                 cx_write(MO_GP0_IO, 0x000007f8);
1992                 cx_write(MO_GP1_IO, 0x00000001);
1993                 break;
1994         case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
1995                 /* GPIO0:6 is hooked to FX2 reset pin */
1996                 cx_set(MO_GP0_IO, 0x00004040);
1997                 cx_clear(MO_GP0_IO, 0x00000040);
1998                 msleep(1000);
1999                 cx_set(MO_GP0_IO, 0x00004040);
2000                 /* FALLTHROUGH */
2001         case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
2002         case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
2003         case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
2004                 /* GPIO0:0 is hooked to mt352 reset pin */
2005                 cx_set(MO_GP0_IO, 0x00000101);
2006                 cx_clear(MO_GP0_IO, 0x00000001);
2007                 msleep(1);
2008                 cx_set(MO_GP0_IO, 0x00000101);
2009                 if (0 == core->i2c_rc &&
2010                     core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
2011                         dvico_fusionhdtv_hybrid_init(core);
2012                 break;
2013         case CX88_BOARD_KWORLD_DVB_T:
2014         case CX88_BOARD_DNTV_LIVE_DVB_T:
2015                 cx_set(MO_GP0_IO, 0x00000707);
2016                 cx_set(MO_GP2_IO, 0x00000101);
2017                 cx_clear(MO_GP2_IO, 0x00000001);
2018                 msleep(1);
2019                 cx_clear(MO_GP0_IO, 0x00000007);
2020                 cx_set(MO_GP2_IO, 0x00000101);
2021                 break;
2022         case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
2023                 cx_write(MO_GP0_IO, 0x00080808);
2024                 break;
2025         case CX88_BOARD_ATI_HDTVWONDER:
2026                 if (0 == core->i2c_rc) {
2027                         /* enable tuner */
2028                         int i;
2029                         static const u8 buffer [][2] = {
2030                                 {0x10,0x12},
2031                                 {0x13,0x04},
2032                                 {0x16,0x00},
2033                                 {0x14,0x04},
2034                                 {0x17,0x00}
2035                         };
2036                         core->i2c_client.addr = 0x0a;
2037
2038                         for (i = 0; i < ARRAY_SIZE(buffer); i++)
2039                                 if (2 != i2c_master_send(&core->i2c_client,
2040                                                         buffer[i],2))
2041                                         printk(KERN_WARNING
2042                                                 "%s: Unable to enable "
2043                                                 "tuner(%i).\n",
2044                                                 core->name, i);
2045                 }
2046                 break;
2047         case CX88_BOARD_MSI_TVANYWHERE_MASTER:
2048         {
2049                 struct v4l2_priv_tun_config tea5767_cfg;
2050                 struct tea5767_ctrl ctl;
2051
2052                 memset(&ctl, 0, sizeof(ctl));
2053
2054                 ctl.high_cut  = 1;
2055                 ctl.st_noise  = 1;
2056                 ctl.deemph_75 = 1;
2057                 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
2058
2059                 tea5767_cfg.tuner = TUNER_TEA5767;
2060                 tea5767_cfg.priv  = &ctl;
2061
2062                 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
2063         }
2064         }
2065 }
2066
2067 /* ------------------------------------------------------------------ */
2068
2069 static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
2070 {
2071         unsigned int lat = UNSET;
2072         u8 ctrl = 0;
2073         u8 value;
2074
2075         /* check pci quirks */
2076         if (pci_pci_problems & PCIPCI_TRITON) {
2077                 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
2078                        name);
2079                 ctrl |= CX88X_EN_TBFX;
2080         }
2081         if (pci_pci_problems & PCIPCI_NATOMA) {
2082                 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
2083                        name);
2084                 ctrl |= CX88X_EN_TBFX;
2085         }
2086         if (pci_pci_problems & PCIPCI_VIAETBF) {
2087                 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
2088                        name);
2089                 ctrl |= CX88X_EN_TBFX;
2090         }
2091         if (pci_pci_problems & PCIPCI_VSFX) {
2092                 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
2093                        name);
2094                 ctrl |= CX88X_EN_VSFX;
2095         }
2096 #ifdef PCIPCI_ALIMAGIK
2097         if (pci_pci_problems & PCIPCI_ALIMAGIK) {
2098                 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
2099                        name);
2100                 lat = 0x0A;
2101         }
2102 #endif
2103
2104         /* check insmod options */
2105         if (UNSET != latency)
2106                 lat = latency;
2107
2108         /* apply stuff */
2109         if (ctrl) {
2110                 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
2111                 value |= ctrl;
2112                 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
2113         }
2114         if (UNSET != lat) {
2115                 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
2116                        name, latency);
2117                 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
2118         }
2119         return 0;
2120 }
2121
2122 int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
2123 {
2124         if (request_mem_region(pci_resource_start(pci,0),
2125                                pci_resource_len(pci,0),
2126                                core->name))
2127                 return 0;
2128         printk(KERN_ERR
2129                "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
2130                core->name, PCI_FUNC(pci->devfn),
2131                (unsigned long long)pci_resource_start(pci, 0),
2132                pci->subsystem_vendor, pci->subsystem_device);
2133         return -EBUSY;
2134 }
2135
2136 /* Allocate and initialize the cx88 core struct.  One should hold the
2137  * devlist mutex before calling this.  */
2138 struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
2139 {
2140         struct cx88_core *core;
2141         int i;
2142
2143         core = kzalloc(sizeof(*core), GFP_KERNEL);
2144
2145         atomic_inc(&core->refcount);
2146         core->pci_bus  = pci->bus->number;
2147         core->pci_slot = PCI_SLOT(pci->devfn);
2148         core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
2149                             PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
2150                             PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
2151         mutex_init(&core->lock);
2152
2153         core->nr = nr;
2154         sprintf(core->name, "cx88[%d]", core->nr);
2155         if (0 != cx88_get_resources(core, pci)) {
2156                 kfree(core);
2157                 return NULL;
2158         }
2159
2160         /* PCI stuff */
2161         cx88_pci_quirks(core->name, pci);
2162         core->lmmio = ioremap(pci_resource_start(pci, 0),
2163                               pci_resource_len(pci, 0));
2164         core->bmmio = (u8 __iomem *)core->lmmio;
2165
2166         /* board config */
2167         core->boardnr = UNSET;
2168         if (card[core->nr] < ARRAY_SIZE(cx88_boards))
2169                 core->boardnr = card[core->nr];
2170         for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
2171                 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
2172                     pci->subsystem_device == cx88_subids[i].subdevice)
2173                         core->boardnr = cx88_subids[i].card;
2174         if (UNSET == core->boardnr) {
2175                 core->boardnr = CX88_BOARD_UNKNOWN;
2176                 cx88_card_list(core, pci);
2177         }
2178
2179         memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
2180
2181         printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
2182                 core->name,pci->subsystem_vendor,
2183                 pci->subsystem_device, core->board.name,
2184                 core->boardnr, card[core->nr] == core->boardnr ?
2185                 "insmod option" : "autodetected");
2186
2187         if (tuner[core->nr] != UNSET)
2188                 core->board.tuner_type = tuner[core->nr];
2189         if (radio[core->nr] != UNSET)
2190                 core->board.radio_type = radio[core->nr];
2191
2192         printk(KERN_INFO "%s: TV tuner type %d, Radio tuner type %d\n",
2193                core->name, core->board.tuner_type, core->board.radio_type);
2194
2195         /* init hardware */
2196         cx88_reset(core);
2197         cx88_card_setup_pre_i2c(core);
2198         cx88_i2c_init(core, pci);
2199
2200         /* load tuner module, if needed */
2201         if (TUNER_ABSENT != core->board.tuner_type)
2202                 request_module("tuner");
2203
2204         cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
2205         cx88_card_setup(core);
2206         cx88_ir_init(core, pci);
2207
2208         return core;
2209 }
2210
2211 /* ------------------------------------------------------------------ */
2212
2213 /*
2214  * Local variables:
2215  * c-basic-offset: 8
2216  * End:
2217  * 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
2218  */