Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
[linux-2.6] / drivers / media / video / saa7134 / saa7134-cards.c
1 /*
2  *
3  * device driver for philips saa7134 based TV cards
4  * card-specific stuff.
5  *
6  * (c) 2001-04 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
26 #include "saa7134-reg.h"
27 #include "saa7134.h"
28
29 /* commly used strings */
30 static char name_mute[]    = "mute";
31 static char name_radio[]   = "Radio";
32 static char name_tv[]      = "Television";
33 static char name_tv_mono[] = "TV (mono only)";
34 static char name_comp1[]   = "Composite1";
35 static char name_comp2[]   = "Composite2";
36 static char name_comp3[]   = "Composite3";
37 static char name_comp4[]   = "Composite4";
38 static char name_svideo[]  = "S-Video";
39
40 /* ------------------------------------------------------------------ */
41 /* board config info                                                  */
42
43 struct saa7134_board saa7134_boards[] = {
44         [SAA7134_BOARD_UNKNOWN] = {
45                 .name           = "UNKNOWN/GENERIC",
46                 .audio_clock    = 0x00187de7,
47                 .tuner_type     = TUNER_ABSENT,
48                 .radio_type     = UNSET,
49                 .tuner_addr     = ADDR_UNSET,
50                 .radio_addr     = ADDR_UNSET,
51
52                 .inputs         = {{
53                         .name = "default",
54                         .vmux = 0,
55                         .amux = LINE1,
56                 }},
57         },
58         [SAA7134_BOARD_PROTEUS_PRO] = {
59                 /* /me */
60                 .name           = "Proteus Pro [philips reference design]",
61                 .audio_clock    = 0x00187de7,
62                 .tuner_type     = TUNER_PHILIPS_PAL,
63                 .radio_type     = UNSET,
64                 .tuner_addr     = ADDR_UNSET,
65                 .radio_addr     = ADDR_UNSET,
66
67                 .inputs         = {{
68                         .name = name_comp1,
69                         .vmux = 0,
70                         .amux = LINE1,
71                 },{
72                         .name = name_tv,
73                         .vmux = 1,
74                         .amux = TV,
75                         .tv   = 1,
76                 },{
77                         .name = name_tv_mono,
78                         .vmux = 1,
79                         .amux = LINE2,
80                         .tv   = 1,
81                 }},
82                 .radio = {
83                         .name = name_radio,
84                         .amux = LINE2,
85                 },
86         },
87         [SAA7134_BOARD_FLYVIDEO3000] = {
88                 /* "Marco d'Itri" <md@Linux.IT> */
89                 .name           = "LifeView FlyVIDEO3000",
90                 .audio_clock    = 0x00200000,
91                 .tuner_type     = TUNER_PHILIPS_PAL,
92                 .radio_type     = UNSET,
93                 .tuner_addr     = ADDR_UNSET,
94                 .radio_addr     = ADDR_UNSET,
95
96                 .gpiomask       = 0xe000,
97                 .inputs         = {{
98                         .name = name_tv,
99                         .vmux = 1,
100                         .amux = TV,
101                         .gpio = 0x8000,
102                         .tv   = 1,
103                 },{
104                         .name = name_tv_mono,
105                         .vmux = 1,
106                         .amux = LINE2,
107                         .gpio = 0x0000,
108                         .tv   = 1,
109                 },{
110                         .name = name_comp1,
111                         .vmux = 0,
112                         .amux = LINE2,
113                         .gpio = 0x4000,
114                 },{
115                         .name = name_comp2,
116                         .vmux = 3,
117                         .amux = LINE2,
118                         .gpio = 0x4000,
119                 },{
120                         .name = name_svideo,
121                         .vmux = 8,
122                         .amux = LINE2,
123                         .gpio = 0x4000,
124                 }},
125                 .radio = {
126                         .name = name_radio,
127                         .amux = LINE2,
128                         .gpio = 0x2000,
129                 },
130                 .mute = {
131                         .name = name_mute,
132                         .amux = TV,
133                         .gpio = 0x8000,
134                 },
135         },
136         [SAA7134_BOARD_FLYVIDEO2000] = {
137                 /* "TC Wan" <tcwan@cs.usm.my> */
138                 .name           = "LifeView FlyVIDEO2000",
139                 .audio_clock    = 0x00200000,
140                 .tuner_type     = TUNER_LG_PAL_NEW_TAPC,
141                 .radio_type     = UNSET,
142                 .tuner_addr     = ADDR_UNSET,
143                 .radio_addr     = ADDR_UNSET,
144
145                 .gpiomask       = 0xe000,
146                 .inputs         = {{
147                         .name = name_tv,
148                         .vmux = 1,
149                         .amux = LINE2,
150                         .gpio = 0x0000,
151                         .tv   = 1,
152                 },{
153                         .name = name_comp1,
154                         .vmux = 0,
155                         .amux = LINE2,
156                         .gpio = 0x4000,
157                 },{
158                         .name = name_comp2,
159                         .vmux = 3,
160                         .amux = LINE2,
161                         .gpio = 0x4000,
162                 },{
163                         .name = name_svideo,
164                         .vmux = 8,
165                         .amux = LINE2,
166                         .gpio = 0x4000,
167                 }},
168                 .radio = {
169                         .name = name_radio,
170                         .amux = LINE2,
171                         .gpio = 0x2000,
172                 },
173                 .mute = {
174                         .name = name_mute,
175                         .amux = LINE2,
176                         .gpio = 0x8000,
177                 },
178         },
179         [SAA7134_BOARD_FLYTVPLATINUM_MINI] = {
180                 /* "Arnaud Quette" <aquette@free.fr> */
181                 .name           = "LifeView FlyTV Platinum Mini",
182                 .audio_clock    = 0x00200000,
183                 .tuner_type     = TUNER_PHILIPS_TDA8290,
184                 .radio_type     = UNSET,
185                 .tuner_addr     = ADDR_UNSET,
186                 .radio_addr     = ADDR_UNSET,
187
188                 .inputs         = {{
189                         .name = name_tv,
190                         .vmux = 1,
191                         .amux = TV,
192                         .tv   = 1,
193                 },{
194                         .name = name_comp1,
195                         .vmux = 0,
196                         .amux = LINE2,
197                 },{
198                         .name = name_svideo,
199                         .vmux = 8,
200                         .amux = LINE2,
201                 }},
202         },
203         [SAA7134_BOARD_FLYTVPLATINUM_FM] = {
204                 /* LifeView FlyTV Platinum FM (LR214WF) */
205                 /* "Peter Missel <peter.missel@onlinehome.de> */
206                 .name           = "LifeView FlyTV Platinum FM",
207                 .audio_clock    = 0x00200000,
208                 .tuner_type     = TUNER_PHILIPS_TDA8290,
209                 .radio_type     = UNSET,
210                 .tuner_addr     = ADDR_UNSET,
211                 .radio_addr     = ADDR_UNSET,
212
213                 .gpiomask       = 0x1E000,      /* Set GP16 and unused 15,14,13 to Output */
214                 .inputs         = {{
215                         .name = name_tv,
216                         .vmux = 1,
217                         .amux = TV,
218                         .gpio = 0x10000,        /* GP16=1 selects TV input */
219                         .tv   = 1,
220                 },{
221 /*                      .name = name_tv_mono,
222                         .vmux = 1,
223                         .amux = LINE2,
224                         .gpio = 0x0000,
225                         .tv   = 1,
226                 },{
227 */                      .name = name_comp1,     /* Composite signal on S-Video input */
228                         .vmux = 0,
229                         .amux = LINE2,
230 /*                      .gpio = 0x4000,         */
231                 },{
232                         .name = name_comp2,     /* Composite input */
233                         .vmux = 3,
234                         .amux = LINE2,
235 /*                      .gpio = 0x4000,         */
236                 },{
237                         .name = name_svideo,    /* S-Video signal on S-Video input */
238                         .vmux = 8,
239                         .amux = LINE2,
240 /*                      .gpio = 0x4000,         */
241                 }},
242                 .radio = {
243                         .name = name_radio,
244                         .amux = TV,
245                         .gpio = 0x00000,        /* GP16=0 selects FM radio antenna */
246                 },
247                 .mute = {
248                         .name = name_mute,
249                         .amux = TV,
250                         .gpio = 0x10000,
251                 },
252         },
253         [SAA7134_BOARD_EMPRESS] = {
254                 /* "Gert Vervoort" <gert.vervoort@philips.com> */
255                 .name           = "EMPRESS",
256                 .audio_clock    = 0x00187de7,
257                 .tuner_type     = TUNER_PHILIPS_PAL,
258                 .radio_type     = UNSET,
259                 .tuner_addr     = ADDR_UNSET,
260                 .radio_addr     = ADDR_UNSET,
261
262                 .inputs         = {{
263                         .name = name_comp1,
264                         .vmux = 0,
265                         .amux = LINE1,
266                 },{
267                         .name = name_svideo,
268                         .vmux = 8,
269                         .amux = LINE1,
270                 },{
271                         .name = name_tv,
272                         .vmux = 1,
273                         .amux = LINE2,
274                         .tv   = 1,
275                 }},
276                 .radio = {
277                         .name = name_radio,
278                         .amux = LINE2,
279                 },
280                 .mpeg      = SAA7134_MPEG_EMPRESS,
281                 .video_out = CCIR656,
282         },
283         [SAA7134_BOARD_MONSTERTV] = {
284                 /* "K.Ohta" <alpha292@bremen.or.jp> */
285                 .name           = "SKNet Monster TV",
286                 .audio_clock    = 0x00187de7,
287                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
288                 .radio_type     = UNSET,
289                 .tuner_addr     = ADDR_UNSET,
290                 .radio_addr     = ADDR_UNSET,
291
292                 .inputs         = {{
293                         .name = name_tv,
294                         .vmux = 1,
295                         .amux = TV,
296                         .tv   = 1,
297                 },{
298                         .name = name_comp1,
299                         .vmux = 0,
300                         .amux = LINE1,
301                 },{
302                         .name = name_svideo,
303                         .vmux = 8,
304                         .amux = LINE1,
305                 }},
306                 .radio = {
307                         .name = name_radio,
308                         .amux = LINE2,
309                 },
310         },
311         [SAA7134_BOARD_MD9717] = {
312                 .name           = "Tevion MD 9717",
313                 .audio_clock    = 0x00200000,
314                 .tuner_type     = TUNER_PHILIPS_PAL,
315                 .radio_type     = UNSET,
316                 .tuner_addr     = ADDR_UNSET,
317                 .radio_addr     = ADDR_UNSET,
318                 .inputs         = {{
319                         .name = name_tv,
320                         .vmux = 1,
321                         .amux = TV,
322                         .tv   = 1,
323                 },{
324                         /* workaround for problems with normal TV sound */
325                         .name = name_tv_mono,
326                         .vmux = 1,
327                         .amux = LINE2,
328                         .tv   = 1,
329                 },{
330                         .name = name_comp1,
331                         .vmux = 2,
332                         .amux = LINE1,
333                 },{
334                         .name = name_comp2,
335                         .vmux = 3,
336                         .amux = LINE1,
337                 },{
338                         .name = name_svideo,
339                         .vmux = 8,
340                         .amux = LINE1,
341                 }},
342                 .radio = {
343                         .name = name_radio,
344                         .amux = LINE2,
345                 },
346         },
347         [SAA7134_BOARD_TVSTATION_RDS] = {
348                 /* Typhoon TV Tuner RDS: Art.Nr. 50694 */
349                 .name           = "KNC One TV-Station RDS / Typhoon TV Tuner RDS",
350                 .audio_clock    = 0x00200000,
351                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
352                 .radio_type     = UNSET,
353                 .tuner_addr     = ADDR_UNSET,
354                 .radio_addr     = ADDR_UNSET,
355                 .tda9887_conf   = TDA9887_PRESENT,
356                 .inputs         = {{
357                         .name = name_tv,
358                         .vmux = 1,
359                         .amux = TV,
360                         .tv   = 1,
361                 },{
362                         .name = name_tv_mono,
363                         .vmux = 1,
364                         .amux   = LINE2,
365                         .tv   = 1,
366                 },{
367
368                         .name = name_svideo,
369                         .vmux = 8,
370                         .amux = LINE1,
371                 },{
372                         .name = name_comp1,
373                         .vmux = 3,
374                         .amux = LINE1,
375                 },{
376
377                         .name = "CVid over SVid",
378                         .vmux = 0,
379                         .amux = LINE1,
380                 }},
381                 .radio = {
382                         .name = name_radio,
383                         .amux = LINE2,
384                 },
385         },
386         [SAA7134_BOARD_TVSTATION_DVR] = {
387                 .name           = "KNC One TV-Station DVR",
388                 .audio_clock    = 0x00200000,
389                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
390                 .radio_type     = UNSET,
391                 .tuner_addr     = ADDR_UNSET,
392                 .radio_addr     = ADDR_UNSET,
393                 .tda9887_conf   = TDA9887_PRESENT,
394                 .gpiomask       = 0x820000,
395                 .inputs         = {{
396                         .name = name_tv,
397                         .vmux = 1,
398                         .amux = LINE2,
399                         .tv   = 1,
400                         .gpio = 0x20000,
401                 },{
402                         .name = name_svideo,
403                         .vmux = 8,
404                         .amux = LINE1,
405                         .gpio = 0x20000,
406                 },{
407                         .name = name_comp1,
408                         .vmux = 3,
409                         .amux = LINE1,
410                         .gpio = 0x20000,
411                 }},
412                 .radio          = {
413                         .name = name_radio,
414                         .amux = LINE2,
415                         .gpio = 0x20000,
416                 },
417                 .mpeg           = SAA7134_MPEG_EMPRESS,
418                 .video_out      = CCIR656,
419         },
420         [SAA7134_BOARD_CINERGY400] = {
421                 .name           = "Terratec Cinergy 400 TV",
422                 .audio_clock    = 0x00200000,
423                 .tuner_type     = TUNER_PHILIPS_PAL,
424                 .radio_type     = UNSET,
425                 .tuner_addr     = ADDR_UNSET,
426                 .radio_addr     = ADDR_UNSET,
427                 .inputs         = {{
428                         .name = name_tv,
429                         .vmux = 1,
430                         .amux = TV,
431                         .tv   = 1,
432                 },{
433                         .name = name_comp1,
434                         .vmux = 4,
435                         .amux = LINE1,
436                 },{
437                         .name = name_svideo,
438                         .vmux = 8,
439                         .amux = LINE1,
440                 },{
441                         .name = name_comp2, /* CVideo over SVideo Connector */
442                         .vmux = 0,
443                         .amux = LINE1,
444                 }}
445         },
446         [SAA7134_BOARD_MD5044] = {
447                 .name           = "Medion 5044",
448                 .audio_clock    = 0x00187de7, /* was: 0x00200000, */
449                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
450                 .radio_type     = UNSET,
451                 .tuner_addr     = ADDR_UNSET,
452                 .radio_addr     = ADDR_UNSET,
453                 .tda9887_conf   = TDA9887_PRESENT,
454                 .inputs         = {{
455                         .name = name_tv,
456                         .vmux = 1,
457                         .amux = TV,
458                         .tv   = 1,
459                 },{
460                         /* workaround for problems with normal TV sound */
461                         .name = name_tv_mono,
462                         .vmux = 1,
463                         .amux = LINE2,
464                         .tv   = 1,
465                 },{
466                         .name = name_comp1,
467                         .vmux = 0,
468                         .amux = LINE2,
469                 },{
470                         .name = name_comp2,
471                         .vmux = 3,
472                         .amux = LINE2,
473                 },{
474                         .name = name_svideo,
475                         .vmux = 8,
476                         .amux = LINE2,
477                 }},
478                 .radio = {
479                         .name = name_radio,
480                         .amux = LINE2,
481                 },
482         },
483         [SAA7134_BOARD_KWORLD] = {
484                 .name           = "Kworld/KuroutoShikou SAA7130-TVPCI",
485                 .audio_clock    = 0x00187de7,
486                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
487                 .radio_type     = UNSET,
488                 .tuner_addr     = ADDR_UNSET,
489                 .radio_addr     = ADDR_UNSET,
490                 .inputs         = {{
491                         .name = name_svideo,
492                         .vmux = 8,
493                         .amux = LINE1,
494                 },{
495                         .name = name_comp1,
496                         .vmux = 3,
497                         .amux = LINE1,
498                 },{
499                         .name = name_tv,
500                         .vmux = 1,
501                         .amux = LINE2,
502                         .tv   = 1,
503                 }},
504         },
505         [SAA7134_BOARD_CINERGY600] = {
506                 .name           = "Terratec Cinergy 600 TV",
507                 .audio_clock    = 0x00200000,
508                 .tuner_type     = TUNER_PHILIPS_PAL,
509                 .radio_type     = UNSET,
510                 .tuner_addr     = ADDR_UNSET,
511                 .radio_addr     = ADDR_UNSET,
512                 .tda9887_conf   = TDA9887_PRESENT,
513                 .inputs         = {{
514                         .name = name_tv,
515                         .vmux = 1,
516                         .amux = TV,
517                         .tv   = 1,
518                 },{
519                         .name = name_comp1,
520                         .vmux = 4,
521                         .amux = LINE1,
522                 },{
523                         .name = name_svideo,
524                         .vmux = 8,
525                         .amux = LINE1,
526                 },{
527                         .name = name_comp2, /* CVideo over SVideo Connector */
528                         .vmux = 0,
529                         .amux = LINE1,
530                 }},
531                 .radio = {
532                         .name = name_radio,
533                         .amux = LINE2,
534         },
535         },
536         [SAA7134_BOARD_MD7134] = {
537                 .name           = "Medion 7134",
538                 .audio_clock    = 0x00187de7,
539                 .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
540                 .radio_type     = UNSET,
541                 .tuner_addr     = ADDR_UNSET,
542                 .radio_addr     = ADDR_UNSET,
543                 .tda9887_conf   = TDA9887_PRESENT,
544                 .mpeg           = SAA7134_MPEG_DVB,
545                 .inputs = {{
546                         .name   = name_tv,
547                         .vmux   = 1,
548                         .amux   = TV,
549                         .tv     = 1,
550                 },{
551                         .name   = name_comp1,
552                         .vmux   = 0,
553                         .amux   = LINE1,
554                 },{
555                         .name   = name_svideo,
556                         .vmux   = 8,
557                         .amux   = LINE1,
558                 }},
559                 .radio = {
560                         .name   = name_radio,
561                         .amux   = LINE2,
562                 },
563         },
564         [SAA7134_BOARD_TYPHOON_90031] = {
565                 /* aka Typhoon "TV+Radio", Art.Nr 90031 */
566                 /* Tom Zoerner <tomzo at users sourceforge net> */
567                 .name           = "Typhoon TV+Radio 90031",
568                 .audio_clock    = 0x00200000,
569                 .tuner_type     = TUNER_PHILIPS_PAL,
570                 .radio_type     = UNSET,
571                 .tuner_addr     = ADDR_UNSET,
572                 .radio_addr     = ADDR_UNSET,
573                 .tda9887_conf   = TDA9887_PRESENT,
574                 .inputs         = {{
575                         .name   = name_tv,
576                         .vmux   = 1,
577                         .amux   = TV,
578                         .tv     = 1,
579                 },{
580                         .name   = name_comp1,
581                         .vmux   = 3,
582                         .amux   = LINE1,
583                 },{
584                         .name   = name_svideo,
585                         .vmux   = 8,
586                         .amux   = LINE1,
587                 }},
588                 .radio = {
589                         .name   = name_radio,
590                         .amux   = LINE2,
591                 },
592         },
593         [SAA7134_BOARD_ELSA] = {
594                 .name           = "ELSA EX-VISION 300TV",
595                 .audio_clock    = 0x00187de7,
596                 .tuner_type     = TUNER_HITACHI_NTSC,
597                 .radio_type     = UNSET,
598                 .tuner_addr     = ADDR_UNSET,
599                 .radio_addr     = ADDR_UNSET,
600                 .inputs         = {{
601                         .name = name_svideo,
602                         .vmux = 8,
603                         .amux = LINE1,
604                 },{
605                         .name   = name_comp1,
606                         .vmux   = 0,
607                         .amux   = LINE1,
608                 },{
609                         .name = name_tv,
610                         .vmux = 4,
611                         .amux = LINE2,
612                         .tv   = 1,
613                 }},
614         },
615         [SAA7134_BOARD_ELSA_500TV] = {
616                 .name           = "ELSA EX-VISION 500TV",
617                 .audio_clock    = 0x00187de7,
618                 .tuner_type     = TUNER_HITACHI_NTSC,
619                 .radio_type     = UNSET,
620                 .tuner_addr     = ADDR_UNSET,
621                 .radio_addr     = ADDR_UNSET,
622                 .inputs         = {{
623                         .name = name_svideo,
624                         .vmux = 7,
625                         .amux = LINE1,
626                 },{
627                         .name = name_tv,
628                         .vmux = 8,
629                         .amux = TV,
630                         .tv   = 1,
631                 },{
632                         .name = name_tv_mono,
633                         .vmux = 8,
634                         .amux = LINE2,
635                         .tv   = 1,
636                 }},
637         },
638         [SAA7134_BOARD_ASUSTeK_TVFM7134] = {
639                 .name           = "ASUS TV-FM 7134",
640                 .audio_clock    = 0x00187de7,
641                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
642                 .radio_type     = UNSET,
643                 .tuner_addr     = ADDR_UNSET,
644                 .radio_addr     = ADDR_UNSET,
645                 .tda9887_conf   = TDA9887_PRESENT,
646                 .inputs         = {{
647                         .name = name_tv,
648                         .vmux = 1,
649                         .amux = TV,
650                         .tv   = 1,
651                 },{
652                         .name = name_comp1,
653                         .vmux = 4,
654                         .amux = LINE2,
655                 },{
656                         .name = name_svideo,
657                         .vmux = 6,
658                         .amux = LINE2,
659                 }},
660                 .radio = {
661                         .name = name_radio,
662                         .amux = LINE1,
663                 },
664         },
665         [SAA7134_BOARD_ASUSTeK_TVFM7135] = {
666                 .name           = "ASUS TV-FM 7135",
667                 .audio_clock    = 0x00187de7,
668                 .tuner_type     = TUNER_PHILIPS_TDA8290,
669                 .radio_type     = UNSET,
670                 .tuner_addr     = ADDR_UNSET,
671                 .radio_addr     = ADDR_UNSET,
672                 .gpiomask       = 0x200000,
673                 .inputs         = {{
674                         .name = name_tv,
675                         .vmux = 1,
676                         .amux = TV,
677                         .gpio = 0x0000,
678                         .tv   = 1,
679                 },{
680                         .name = name_comp1,
681                         .vmux = 4,
682                         .amux = LINE2,
683                         .gpio = 0x0000,
684                 },{
685                         .name = name_svideo,
686                         .vmux = 6,
687                         .amux = LINE2,
688                         .gpio = 0x0000,
689                 }},
690                 .radio = {
691                         .name = name_radio,
692                         .amux = TV,
693                         .gpio = 0x200000,
694                 },
695                 .mute  = {
696                         .name = name_mute,
697                         .gpio = 0x0000,
698                 },
699
700         },
701         [SAA7134_BOARD_VA1000POWER] = {
702                 .name           = "AOPEN VA1000 POWER",
703                 .audio_clock    = 0x00187de7,
704                 .tuner_type     = TUNER_PHILIPS_NTSC,
705                 .radio_type     = UNSET,
706                 .tuner_addr     = ADDR_UNSET,
707                 .radio_addr     = ADDR_UNSET,
708                 .inputs         = {{
709                         .name = name_svideo,
710                         .vmux = 8,
711                         .amux = LINE1,
712                 },{
713                         .name = name_comp1,
714                         .vmux = 3,
715                         .amux = LINE1,
716                 },{
717                         .name = name_tv,
718                         .vmux = 1,
719                         .amux = LINE2,
720                         .tv   = 1,
721                 }},
722         },
723         [SAA7134_BOARD_10MOONSTVMASTER] = {
724                 /* "lilicheng" <llc@linuxfans.org> */
725                 .name           = "10MOONS PCI TV CAPTURE CARD",
726                 .audio_clock    = 0x00200000,
727                 .tuner_type     = TUNER_LG_PAL_NEW_TAPC,
728                 .radio_type     = UNSET,
729                 .tuner_addr     = ADDR_UNSET,
730                 .radio_addr     = ADDR_UNSET,
731                 .gpiomask       = 0xe000,
732                 .inputs         = {{
733                         .name = name_tv,
734                         .vmux = 1,
735                         .amux = LINE2,
736                         .gpio = 0x0000,
737                         .tv   = 1,
738                 },{
739                         .name = name_comp1,
740                         .vmux = 0,
741                         .amux = LINE2,
742                         .gpio = 0x4000,
743                 },{
744                         .name = name_comp2,
745                         .vmux = 3,
746                         .amux = LINE2,
747                         .gpio = 0x4000,
748                 },{
749                         .name = name_svideo,
750                         .vmux = 8,
751                         .amux = LINE2,
752                         .gpio = 0x4000,
753                 }},
754                 .radio = {
755                         .name = name_radio,
756                         .amux = LINE2,
757                         .gpio = 0x2000,
758                 },
759                 .mute = {
760                         .name = name_mute,
761                         .amux = LINE2,
762                         .gpio = 0x8000,
763                 },
764         },
765         [SAA7134_BOARD_BMK_MPEX_NOTUNER] = {
766                 /* "Andrew de Quincey" <adq@lidskialf.net> */
767                 .name           = "BMK MPEX No Tuner",
768                 .audio_clock    = 0x200000,
769                 .tuner_type     = TUNER_ABSENT,
770                 .radio_type     = UNSET,
771                 .tuner_addr     = ADDR_UNSET,
772                 .radio_addr     = ADDR_UNSET,
773                 .inputs         = {{
774                         .name = name_comp1,
775                         .vmux = 4,
776                         .amux = LINE1,
777                 },{
778                         .name = name_comp2,
779                         .vmux = 3,
780                         .amux = LINE1,
781                 },{
782                         .name = name_comp3,
783                         .vmux = 0,
784                         .amux = LINE1,
785                 },{
786                         .name = name_comp4,
787                         .vmux = 1,
788                         .amux = LINE1,
789                 },{
790                         .name = name_svideo,
791                         .vmux = 8,
792                         .amux = LINE1,
793                 }},
794                 .mpeg      = SAA7134_MPEG_EMPRESS,
795                 .video_out = CCIR656,
796         },
797         [SAA7134_BOARD_VIDEOMATE_TV] = {
798                 .name           = "Compro VideoMate TV",
799                 .audio_clock    = 0x00187de7,
800                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
801                 .radio_type     = UNSET,
802                 .tuner_addr     = ADDR_UNSET,
803                 .radio_addr     = ADDR_UNSET,
804                 .inputs         = {{
805                         .name = name_svideo,
806                         .vmux = 8,
807                         .amux = LINE1,
808                 },{
809                         .name = name_comp1,
810                         .vmux = 3,
811                         .amux = LINE1,
812                 },{
813                         .name = name_tv,
814                         .vmux = 1,
815                         .amux = LINE2,
816                         .tv   = 1,
817                 }},
818         },
819         [SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS] = {
820                 .name           = "Compro VideoMate TV Gold+",
821                 .audio_clock    = 0x00187de7,
822                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
823                 .gpiomask       = 0x800c0000,
824                 .radio_type     = UNSET,
825                 .tuner_addr     = ADDR_UNSET,
826                 .radio_addr     = ADDR_UNSET,
827                 .inputs         = {{
828                         .name = name_svideo,
829                         .vmux = 8,
830                         .amux = LINE1,
831                         .gpio = 0x06c00012,
832                 },{
833                         .name = name_comp1,
834                         .vmux = 3,
835                         .amux = LINE1,
836                         .gpio = 0x0ac20012,
837                 },{
838                         .name = name_tv,
839                         .vmux = 1,
840                         .amux = LINE2,
841                         .gpio = 0x08c20012,
842                         .tv   = 1,
843                 }},                             /* radio and probably mute is missing */
844         },
845         [SAA7134_BOARD_CRONOS_PLUS] = {
846                 /*
847                 gpio pins:
848                         0  .. 3   BASE_ID
849                         4  .. 7   PROTECT_ID
850                         8  .. 11  USER_OUT
851                         12 .. 13  USER_IN
852                         14 .. 15  VIDIN_SEL
853                 */
854                 .name           = "Matrox CronosPlus",
855                 .tuner_type     = TUNER_ABSENT,
856                 .radio_type     = UNSET,
857                 .tuner_addr     = ADDR_UNSET,
858                 .radio_addr     = ADDR_UNSET,
859                 .gpiomask       = 0xcf00,
860                 .inputs         = {{
861                         .name = name_comp1,
862                         .vmux = 0,
863                         .gpio = 2 << 14,
864                 },{
865                         .name = name_comp2,
866                         .vmux = 0,
867                         .gpio = 1 << 14,
868                 },{
869                         .name = name_comp3,
870                         .vmux = 0,
871                         .gpio = 0 << 14,
872                 },{
873                         .name = name_comp4,
874                         .vmux = 0,
875                         .gpio = 3 << 14,
876                 },{
877                         .name = name_svideo,
878                         .vmux = 8,
879                         .gpio = 2 << 14,
880                 }},
881         },
882         [SAA7134_BOARD_MD2819] = {
883                 .name           = "AverMedia M156 / Medion 2819",
884                 .audio_clock    = 0x00187de7,
885                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
886                 .radio_type     = UNSET,
887                 .tuner_addr     = ADDR_UNSET,
888                 .radio_addr     = ADDR_UNSET,
889                 .tda9887_conf   = TDA9887_PRESENT,
890                 .inputs         = {{
891                         .name = name_tv,
892                         .vmux = 1,
893                         .amux = TV,
894                         .tv   = 1,
895                 },{
896                         .name = name_comp1,
897                         .vmux = 0,
898                         .amux = LINE2,
899                 },{
900                         .name = name_comp2,
901                         .vmux = 3,
902                         .amux = LINE2,
903                 },{
904                         .name = name_svideo,
905                         .vmux = 8,
906                         .amux = LINE2,
907                 }},
908                 .radio = {
909                         .name = name_radio,
910                         .amux = LINE2,
911                 },
912         },
913         [SAA7134_BOARD_BMK_MPEX_TUNER] = {
914                 /* "Greg Wickham <greg.wickham@grangenet.net> */
915                 .name           = "BMK MPEX Tuner",
916                 .audio_clock    = 0x200000,
917                 .tuner_type     = TUNER_PHILIPS_PAL,
918                 .radio_type     = UNSET,
919                 .tuner_addr     = ADDR_UNSET,
920                 .radio_addr     = ADDR_UNSET,
921                 .inputs         = {{
922                         .name = name_comp1,
923                         .vmux = 1,
924                         .amux = LINE1,
925                 },{
926                         .name = name_svideo,
927                         .vmux = 8,
928                         .amux = LINE1,
929                 },{
930                         .name = name_tv,
931                         .vmux = 3,
932                         .amux = TV,
933                         .tv   = 1,
934                 }},
935                 .mpeg      = SAA7134_MPEG_EMPRESS,
936                 .video_out = CCIR656,
937         },
938         [SAA7134_BOARD_ASUSTEK_TVFM7133] = {
939                 .name           = "ASUS TV-FM 7133",
940                 .audio_clock    = 0x00187de7,
941                 /* probably wrong, the 7133 one is the NTSC version ...
942                 * .tuner_type  = TUNER_PHILIPS_FM1236_MK3 */
943                 .tuner_type     = TUNER_LG_NTSC_NEW_TAPC,
944                 .radio_type     = UNSET,
945                 .tuner_addr     = ADDR_UNSET,
946                 .radio_addr     = ADDR_UNSET,
947                 .tda9887_conf   = TDA9887_PRESENT,
948                 .inputs         = {{
949                         .name = name_tv,
950                         .vmux = 1,
951                         .amux = TV,
952                         .tv   = 1,
953
954                 },{
955                         .name = name_comp1,
956                         .vmux = 4,
957                         .amux = LINE2,
958                 },{
959                         .name = name_svideo,
960                         .vmux = 6,
961                         .amux = LINE2,
962                 }},
963                 .radio = {
964                         .name = name_radio,
965                         .amux = LINE1,
966                 },
967         },
968         [SAA7134_BOARD_PINNACLE_PCTV_STEREO] = {
969                 .name           = "Pinnacle PCTV Stereo (saa7134)",
970                 .audio_clock    = 0x00187de7,
971                 .tuner_type     = TUNER_MT2032,
972                 .radio_type     = UNSET,
973                 .tuner_addr     = ADDR_UNSET,
974                 .radio_addr     = ADDR_UNSET,
975                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER,
976                 .inputs         = {{
977                         .name = name_tv,
978                         .vmux = 3,
979                         .amux = TV,
980                         .tv   = 1,
981                 },{
982                         .name = name_comp1,
983                         .vmux = 0,
984                         .amux = LINE2,
985                 },{
986                         .name = name_comp2,
987                         .vmux = 1,
988                         .amux = LINE2,
989                 },{
990                         .name = name_svideo,
991                         .vmux = 8,
992                         .amux = LINE2,
993                 }},
994         },
995         [SAA7134_BOARD_MANLI_MTV002] = {
996                 /* Ognjen Nastic <ognjen@logosoft.ba> */
997                 .name           = "Manli MuchTV M-TV002/Behold TV 403 FM",
998                 .audio_clock    = 0x00200000,
999                 .tuner_type     = TUNER_PHILIPS_PAL,
1000                 .radio_type     = UNSET,
1001                 .tuner_addr     = ADDR_UNSET,
1002                 .radio_addr     = ADDR_UNSET,
1003                 .inputs         = {{
1004                         .name = name_svideo,
1005                         .vmux = 8,
1006                         .amux = LINE1,
1007                 },{
1008                         .name   = name_comp1,
1009                         .vmux   = 1,
1010                         .amux   = LINE1,
1011                 },{
1012                         .name = name_tv,
1013                         .vmux = 3,
1014                         .amux = LINE2,
1015                         .tv   = 1,
1016                 }},
1017                 .radio = {
1018                         .name = name_radio,
1019                         .amux = LINE2,
1020                 },
1021         },
1022         [SAA7134_BOARD_MANLI_MTV001] = {
1023                 /* Ognjen Nastic <ognjen@logosoft.ba> UNTESTED */
1024                 .name           = "Manli MuchTV M-TV001/Behold TV 401",
1025                 .audio_clock    = 0x00200000,
1026                 .tuner_type     = TUNER_PHILIPS_PAL,
1027                 .radio_type     = UNSET,
1028                 .tuner_addr     = ADDR_UNSET,
1029                 .radio_addr     = ADDR_UNSET,
1030                 .inputs         = {{
1031                         .name = name_svideo,
1032                         .vmux = 8,
1033                         .amux = LINE1,
1034                 },{
1035                         .name = name_comp1,
1036                         .vmux = 1,
1037                         .amux = LINE1,
1038                 },{
1039                         .name = name_tv,
1040                         .vmux = 3,
1041                         .amux = LINE2,
1042                         .tv   = 1,
1043                 }},
1044                 .mute = {
1045                         .name = name_mute,
1046                         .amux = LINE1,
1047                 },
1048         },
1049         [SAA7134_BOARD_TG3000TV] = {
1050                 /* TransGear 3000TV */
1051                 .name           = "Nagase Sangyo TransGear 3000TV",
1052                 .audio_clock    = 0x00187de7,
1053                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
1054                 .radio_type     = UNSET,
1055                 .tuner_addr     = ADDR_UNSET,
1056                 .radio_addr     = ADDR_UNSET,
1057                 .inputs         = {{
1058                         .name = name_tv,
1059                         .vmux = 1,
1060                         .amux = LINE2,
1061                         .tv   = 1,
1062                 },{
1063                         .name = name_comp1,
1064                         .vmux = 3,
1065                         .amux = LINE2,
1066                 },{
1067                         .name = name_svideo,
1068                         .vmux = 8,
1069                         .amux = LINE2,
1070                 }},
1071         },
1072         [SAA7134_BOARD_ECS_TVP3XP] = {
1073                 .name           = "Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) ",
1074                 .audio_clock    = 0x187de7,  /* xtal 32.1 MHz */
1075                 .tuner_type     = TUNER_PHILIPS_PAL,
1076                 .radio_type     = UNSET,
1077                 .tuner_addr     = ADDR_UNSET,
1078                 .radio_addr     = ADDR_UNSET,
1079                 .inputs         = {{
1080                         .name   = name_tv,
1081                         .vmux   = 1,
1082                         .amux   = TV,
1083                         .tv     = 1,
1084                 },{
1085                         .name   = name_tv_mono,
1086                         .vmux   = 1,
1087                         .amux   = LINE2,
1088                         .tv     = 1,
1089                 },{
1090                         .name   = name_comp1,
1091                         .vmux   = 3,
1092                         .amux   = LINE1,
1093                 },{
1094                         .name   = name_svideo,
1095                         .vmux   = 8,
1096                         .amux   = LINE1,
1097                 },{
1098                         .name   = "CVid over SVid",
1099                         .vmux   = 0,
1100                         .amux   = LINE1,
1101                 }},
1102                 .radio = {
1103                         .name   = name_radio,
1104                         .amux   = LINE2,
1105                 },
1106         },
1107         [SAA7134_BOARD_ECS_TVP3XP_4CB5] = {
1108                 .name           = "Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
1109                 .audio_clock    = 0x187de7,
1110                 .tuner_type     = TUNER_PHILIPS_NTSC,
1111                 .radio_type     = UNSET,
1112                 .tuner_addr     = ADDR_UNSET,
1113                 .radio_addr     = ADDR_UNSET,
1114                 .inputs         = {{
1115                         .name   = name_tv,
1116                         .vmux   = 1,
1117                         .amux   = TV,
1118                         .tv     = 1,
1119                 },{
1120                         .name   = name_tv_mono,
1121                         .vmux   = 1,
1122                         .amux   = LINE2,
1123                         .tv     = 1,
1124                 },{
1125                         .name   = name_comp1,
1126                         .vmux   = 3,
1127                         .amux   = LINE1,
1128                 },{
1129                         .name   = name_svideo,
1130                         .vmux   = 8,
1131                         .amux   = LINE1,
1132                 },{
1133                         .name   = "CVid over SVid",
1134                         .vmux   = 0,
1135                         .amux   = LINE1,
1136                 }},
1137                 .radio = {
1138                         .name   = name_radio,
1139                         .amux   = LINE2,
1140                 },
1141         },
1142         [SAA7134_BOARD_AVACSSMARTTV] = {
1143                 /* Roman Pszonczenko <romka@kolos.math.uni.lodz.pl> */
1144                 .name           = "AVACS SmartTV",
1145                 .audio_clock    = 0x00187de7,
1146                 .tuner_type     = TUNER_PHILIPS_PAL,
1147                 .radio_type     = UNSET,
1148                 .tuner_addr     = ADDR_UNSET,
1149                 .radio_addr     = ADDR_UNSET,
1150                 .inputs         = {{
1151                         .name = name_tv,
1152                         .vmux = 1,
1153                         .amux = TV,
1154                         .tv   = 1,
1155                 },{
1156                         .name = name_tv_mono,
1157                         .vmux = 1,
1158                         .amux = LINE2,
1159                         .tv   = 1,
1160                 },{
1161                         .name = name_comp1,
1162                         .vmux = 0,
1163                         .amux = LINE2,
1164                 },{
1165                         .name = name_comp2,
1166                         .vmux = 3,
1167                         .amux = LINE2,
1168                 },{
1169                         .name = name_svideo,
1170                         .vmux = 8,
1171                         .amux = LINE2,
1172                 }},
1173                 .radio = {
1174                         .name = name_radio,
1175                         .amux = LINE2,
1176                         .gpio = 0x200000,
1177                 },
1178         },
1179         [SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER] = {
1180                 /* Michael Smith <msmith@cbnco.com> */
1181                 .name           = "AVerMedia DVD EZMaker",
1182                 .audio_clock    = 0x00187de7,
1183                 .tuner_type     = TUNER_ABSENT,
1184                 .radio_type     = UNSET,
1185                 .tuner_addr     = ADDR_UNSET,
1186                 .radio_addr     = ADDR_UNSET,
1187                 .inputs         = {{
1188                         .name = name_comp1,
1189                         .vmux = 3,
1190                 },{
1191                         .name = name_svideo,
1192                         .vmux = 8,
1193                 }},
1194         },
1195         [SAA7134_BOARD_NOVAC_PRIMETV7133] = {
1196                 /* toshii@netbsd.org */
1197                 .name           = "Noval Prime TV 7133",
1198                 .audio_clock    = 0x00200000,
1199                 .tuner_type     = TUNER_ALPS_TSBH1_NTSC,
1200                 .radio_type     = UNSET,
1201                 .tuner_addr     = ADDR_UNSET,
1202                 .radio_addr     = ADDR_UNSET,
1203                 .inputs         = {{
1204                         .name = name_comp1,
1205                         .vmux = 3,
1206                 },{
1207                         .name = name_tv,
1208                         .vmux = 1,
1209                         .amux = TV,
1210                         .tv   = 1,
1211                 },{
1212                         .name = name_svideo,
1213                         .vmux = 8,
1214                 }},
1215         },
1216         [SAA7134_BOARD_AVERMEDIA_STUDIO_305] = {
1217                 .name           = "AverMedia AverTV Studio 305",
1218                 .audio_clock    = 0x00187de7,
1219                 .tuner_type     = TUNER_PHILIPS_FM1256_IH3,
1220                 .radio_type     = UNSET,
1221                 .tuner_addr     = ADDR_UNSET,
1222                 .radio_addr     = ADDR_UNSET,
1223                 .tda9887_conf   = TDA9887_PRESENT,
1224                 .inputs         = {{
1225                         .name = name_tv,
1226                         .vmux = 1,
1227                         .amux = LINE2,
1228                         .tv   = 1,
1229                 },{
1230                         .name = name_comp1,
1231                         .vmux = 0,
1232                         .amux = LINE2,
1233                 },{
1234                         .name = name_comp2,
1235                         .vmux = 3,
1236                         .amux = LINE2,
1237                 },{
1238                         .name = name_svideo,
1239                         .vmux = 8,
1240                         .amux = LINE2,
1241                 }},
1242                 .radio = {
1243                         .name = name_radio,
1244                         .amux = LINE2,
1245                 },
1246                 .mute = {
1247                         .name = name_mute,
1248                         .amux = LINE1,
1249                 },
1250         },
1251         [SAA7134_BOARD_UPMOST_PURPLE_TV] = {
1252                 .name           = "UPMOST PURPLE TV",
1253                 .audio_clock    = 0x00187de7,
1254                 .tuner_type     = TUNER_PHILIPS_FM1236_MK3,
1255                 .radio_type     = UNSET,
1256                 .tuner_addr     = ADDR_UNSET,
1257                 .radio_addr     = ADDR_UNSET,
1258                 .tda9887_conf   = TDA9887_PRESENT,
1259                 .inputs         = {{
1260                         .name = name_tv,
1261                         .vmux = 7,
1262                         .amux = TV,
1263                         .tv   = 1,
1264                 },{
1265                         .name = name_svideo,
1266                         .vmux = 7,
1267                         .amux = LINE1,
1268                 }},
1269         },
1270         [SAA7134_BOARD_ITEMS_MTV005] = {
1271                 /* Norman Jonas <normanjonas@arcor.de> */
1272                 .name           = "Items MuchTV Plus / IT-005",
1273                 .audio_clock    = 0x00187de7,
1274                 .tuner_type     = TUNER_PHILIPS_PAL,
1275                 .radio_type     = UNSET,
1276                 .tuner_addr     = ADDR_UNSET,
1277                 .radio_addr     = ADDR_UNSET,
1278                 .inputs         = {{
1279                         .name = name_tv,
1280                         .vmux = 3,
1281                         .amux = TV,
1282                         .tv   = 1,
1283                 },{
1284                         .name   = name_comp1,
1285                         .vmux   = 1,
1286                         .amux   = LINE1,
1287                 },{
1288                         .name = name_svideo,
1289                         .vmux = 8,
1290                         .amux = LINE1,
1291                 }},
1292                 .radio = {
1293                         .name = name_radio,
1294                         .amux = LINE2,
1295                 },
1296         },
1297         [SAA7134_BOARD_CINERGY200] = {
1298                 .name           = "Terratec Cinergy 200 TV",
1299                 .audio_clock    = 0x00200000,
1300                 .tuner_type     = TUNER_PHILIPS_PAL,
1301                 .radio_type     = UNSET,
1302                 .tuner_addr     = ADDR_UNSET,
1303                 .radio_addr     = ADDR_UNSET,
1304                 .inputs         = {{
1305                         .name = name_tv,
1306                         .vmux = 1,
1307                         .amux = LINE2,
1308                         .tv   = 1,
1309                 },{
1310                         .name = name_comp1,
1311                         .vmux = 4,
1312                         .amux = LINE1,
1313                 },{
1314                         .name = name_svideo,
1315                         .vmux = 8,
1316                         .amux = LINE1,
1317                 },{
1318                         .name = name_comp2, /* CVideo over SVideo Connector */
1319                         .vmux = 0,
1320                         .amux = LINE1,
1321                 }},
1322                 .mute = {
1323                         .name = name_mute,
1324                         .amux = LINE2,
1325                 },
1326         },
1327         [SAA7134_BOARD_VIDEOMATE_TV_PVR] = {
1328                 /* Alain St-Denis <alain@topaze.homeip.net> */
1329                 .name           = "Compro VideoMate TV PVR/FM",
1330                 .audio_clock    = 0x00187de7,
1331                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
1332                 .radio_type     = UNSET,
1333                 .tuner_addr     = ADDR_UNSET,
1334                 .radio_addr     = ADDR_UNSET,
1335                 .gpiomask       = 0x808c0080,
1336                 .inputs         = {{
1337                         .name = name_svideo,
1338                         .vmux = 8,
1339                         .amux = LINE1,
1340                         .gpio = 0x00080,
1341                 },{
1342                         .name = name_comp1,
1343                         .vmux = 3,
1344                         .amux = LINE1,
1345                         .gpio = 0x00080,
1346                 },{
1347                         .name = name_tv,
1348                         .vmux = 1,
1349                         .amux = LINE2_LEFT,
1350                         .tv   = 1,
1351                         .gpio = 0x00080,
1352                 }},
1353                 .radio = {
1354                         .name = name_radio,
1355                         .amux = LINE2,
1356                         .gpio = 0x80000,
1357                 },
1358                 .mute = {
1359                         .name = name_mute,
1360                         .amux = LINE2,
1361                         .gpio = 0x40000,
1362                 },
1363         },
1364         [SAA7134_BOARD_SABRENT_SBTTVFM] = {
1365                 /* Michael Rodriguez-Torrent <mrtorrent@asu.edu> */
1366                 .name           = "Sabrent SBT-TVFM (saa7130)",
1367                 .audio_clock    = 0x00187de7,
1368                 .tuner_type     = TUNER_PHILIPS_NTSC_M,
1369                 .radio_type     = UNSET,
1370                 .tuner_addr     = ADDR_UNSET,
1371                 .radio_addr     = ADDR_UNSET,
1372                 .inputs         = {{
1373                         .name = name_comp1,
1374                         .vmux = 1,
1375                         .amux = LINE1,
1376                 },{
1377                         .name = name_tv,
1378                         .vmux = 3,
1379                         .amux = LINE2,
1380                         .tv   = 1,
1381                 },{
1382                         .name = name_svideo,
1383                         .vmux = 8,
1384                         .amux = LINE1,
1385                 }},
1386                 .radio = {
1387                         .name   = name_radio,
1388                         .amux   = LINE2,
1389                 },
1390         },
1391         [SAA7134_BOARD_ZOLID_XPERT_TV7134] = {
1392                 /* Helge Jensen <helge.jensen@slog.dk> */
1393                 .name           = ":Zolid Xpert TV7134",
1394                 .audio_clock    = 0x00187de7,
1395                 .tuner_type     = TUNER_PHILIPS_NTSC,
1396                 .radio_type     = UNSET,
1397                 .tuner_addr     = ADDR_UNSET,
1398                 .radio_addr     = ADDR_UNSET,
1399                 .inputs         = {{
1400                         .name = name_svideo,
1401                         .vmux = 8,
1402                         .amux = LINE1,
1403                 },{
1404                         .name = name_comp1,
1405                         .vmux = 3,
1406                         .amux = LINE1,
1407                 },{
1408                         .name = name_tv,
1409                         .vmux = 1,
1410                         .amux = LINE2,
1411                         .tv   = 1,
1412                 }},
1413         },
1414         [SAA7134_BOARD_EMPIRE_PCI_TV_RADIO_LE] = {
1415                 /* "Matteo Az" <matte.az@nospam.libero.it> ;-) */
1416                 .name           = "Empire PCI TV-Radio LE",
1417                 .audio_clock    = 0x00187de7,
1418                 .tuner_type     = TUNER_PHILIPS_PAL,
1419                 .radio_type     = UNSET,
1420                 .tuner_addr     = ADDR_UNSET,
1421                 .radio_addr     = ADDR_UNSET,
1422                 .gpiomask       = 0x4000,
1423                 .inputs         = {{
1424                         .name = name_tv_mono,
1425                         .vmux = 1,
1426                         .amux = LINE2,
1427                         .gpio = 0x8000,
1428                         .tv   = 1,
1429                 },{
1430                         .name = name_comp1,
1431                         .vmux = 3,
1432                         .amux = LINE1,
1433                         .gpio = 0x8000,
1434                 },{
1435                         .name = name_svideo,
1436                         .vmux = 6,
1437                         .amux = LINE1,
1438                         .gpio = 0x8000,
1439                 }},
1440                 .radio = {
1441                         .name = name_radio,
1442                         .amux = LINE1,
1443                         .gpio = 0x8000,
1444                 },
1445                 .mute = {
1446                         .name = name_mute,
1447                         .amux = TV,
1448                         .gpio =0x8000,
1449                 }
1450         },
1451         [SAA7134_BOARD_AVERMEDIA_STUDIO_307] = {
1452                 /*
1453                 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
1454                 Lots of thanks to Andrey Zolotarev <zolotarev_andrey@mail.ru>
1455                 */
1456                 .name           = "Avermedia AVerTV Studio 307",
1457                 .audio_clock    = 0x00187de7,
1458                 .tuner_type     = TUNER_PHILIPS_FM1256_IH3,
1459                 .radio_type     = UNSET,
1460                 .tuner_addr     = ADDR_UNSET,
1461                 .radio_addr     = ADDR_UNSET,
1462                 .tda9887_conf   = TDA9887_PRESENT,
1463                 .gpiomask       = 0x03,
1464                 .inputs         = {{
1465                         .name = name_tv,
1466                         .vmux = 1,
1467                         .amux = TV,
1468                         .tv   = 1,
1469                         .gpio = 0x00,
1470                 },{
1471                         .name = name_comp1,
1472                         .vmux = 0,
1473                         .amux = LINE2,
1474                         .gpio = 0x00,
1475                 },{
1476                         .name = name_comp2,
1477                         .vmux = 3,
1478                         .amux = LINE2,
1479                         .gpio = 0x00,
1480                 },{
1481                         .name = name_svideo,
1482                         .vmux = 8,
1483                         .amux = LINE2,
1484                         .gpio = 0x00,
1485                 }},
1486                 .radio = {
1487                         .name = name_radio,
1488                         .amux = LINE1,
1489                         .gpio = 0x01,
1490                 },
1491                 .mute  = {
1492                         .name = name_mute,
1493                         .amux = LINE1,
1494                         .gpio = 0x00,
1495                 },
1496         },
1497         [SAA7134_BOARD_AVERMEDIA_GO_007_FM] = {
1498                 .name           = "Avermedia AVerTV GO 007 FM",
1499                 .audio_clock    = 0x00187de7,
1500                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1501                 .radio_type     = UNSET,
1502                 .tuner_addr     = ADDR_UNSET,
1503                 .radio_addr     = ADDR_UNSET,
1504                 .gpiomask       = 0x00300003,
1505                 /* .gpiomask       = 0x8c240003, */
1506                 .inputs         = {{
1507                         .name = name_tv,
1508                         .vmux = 1,
1509                         .amux = TV,
1510                         .tv   = 1,
1511                         .gpio = 0x01,
1512                 },{
1513                         .name = name_comp1,
1514                         .vmux = 0,
1515                         .amux = LINE2,
1516                         .gpio = 0x02,
1517                 },{
1518                         .name = name_svideo,
1519                         .vmux = 6,
1520                         .amux = LINE2,
1521                         .gpio = 0x02,
1522                 }},
1523                 .radio = {
1524                         .name = name_radio,
1525                         .amux = LINE1,
1526                         .gpio = 0x00300001,
1527                 },
1528                 .mute = {
1529                         .name = name_mute,
1530                         .amux = TV,
1531                         .gpio = 0x01,
1532                 },
1533         },
1534         [SAA7134_BOARD_AVERMEDIA_CARDBUS] = {
1535                 /* Kees.Blom@cwi.nl */
1536                 .name           = "AVerMedia Cardbus TV/Radio (E500)",
1537                 .audio_clock    = 0x187de7,
1538                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1539                 .radio_type     = UNSET,
1540                 .tuner_addr     = ADDR_UNSET,
1541                 .radio_addr     = ADDR_UNSET,
1542                 .inputs         = {{
1543                         .name = name_tv,
1544                         .vmux = 1,
1545                         .amux = TV,
1546                         .tv   = 1,
1547                 },{
1548                         .name = name_comp1,
1549                         .vmux = 3,
1550                         .amux = LINE2,
1551                 },{
1552                         .name = name_svideo,
1553                         .vmux = 8,
1554                         .amux = LINE1,
1555                 }},
1556                 .radio = {
1557                         .name = name_radio,
1558                         .amux = LINE1,
1559                 },
1560         },
1561         [SAA7134_BOARD_CINERGY400_CARDBUS] = {
1562                 .name           = "Terratec Cinergy 400 mobile",
1563                 .audio_clock    = 0x187de7,
1564                 .tuner_type     = TUNER_ALPS_TSBE5_PAL,
1565                 .radio_type     = UNSET,
1566                 .tuner_addr     = ADDR_UNSET,
1567                 .radio_addr     = ADDR_UNSET,
1568                 .tda9887_conf   = TDA9887_PRESENT,
1569                 .inputs         = {{
1570                         .name = name_tv,
1571                         .vmux = 1,
1572                         .amux = TV,
1573                         .tv   = 1,
1574                 },{
1575                         .name = name_tv_mono,
1576                         .vmux = 1,
1577                         .amux = LINE2,
1578                         .tv   = 1,
1579                 },{
1580                         .name = name_comp1,
1581                         .vmux = 3,
1582                         .amux = LINE1,
1583                 },{
1584                         .name = name_svideo,
1585                         .vmux = 8,
1586                         .amux = LINE1,
1587                 }},
1588         },
1589         [SAA7134_BOARD_CINERGY600_MK3] = {
1590                 .name           = "Terratec Cinergy 600 TV MK3",
1591                 .audio_clock    = 0x00200000,
1592                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
1593                 .radio_type     = UNSET,
1594                 .tuner_addr     = ADDR_UNSET,
1595                 .radio_addr     = ADDR_UNSET,
1596                 .tda9887_conf   = TDA9887_PRESENT,
1597                 .inputs         = {{
1598                         .name = name_tv,
1599                         .vmux = 1,
1600                         .amux = TV,
1601                         .tv   = 1,
1602                 },{
1603                         .name = name_comp1,
1604                         .vmux = 4,
1605                         .amux = LINE1,
1606                 },{
1607                         .name = name_svideo,
1608                         .vmux = 8,
1609                         .amux = LINE1,
1610                 },{
1611                         .name = name_comp2, /* CVideo over SVideo Connector */
1612                         .vmux = 0,
1613                         .amux = LINE1,
1614                 }},
1615                 .radio = {
1616                         .name = name_radio,
1617                         .amux = LINE2,
1618                 },
1619         },
1620         [SAA7134_BOARD_VIDEOMATE_GOLD_PLUS] = {
1621                 /* Dylan Walkden <dylan_walkden@hotmail.com> */
1622                 .name           = "Compro VideoMate Gold+ Pal",
1623                 .audio_clock    = 0x00187de7,
1624                 .tuner_type     = TUNER_PHILIPS_PAL,
1625                 .radio_type     = UNSET,
1626                 .tuner_addr     = ADDR_UNSET,
1627                 .radio_addr     = ADDR_UNSET,
1628                 .gpiomask       = 0x1ce780,
1629                 .inputs         = {{
1630                         .name = name_svideo,
1631                         .vmux = 0,              /* CVideo over SVideo Connector - ok? */
1632                         .amux = LINE1,
1633                         .gpio = 0x008080,
1634                 },{
1635                         .name = name_comp1,
1636                         .vmux = 3,
1637                         .amux = LINE1,
1638                         .gpio = 0x008080,
1639                 },{
1640                         .name = name_tv,
1641                         .vmux = 1,
1642                         .amux = TV,
1643                         .tv   = 1,
1644                         .gpio = 0x008080,
1645                 }},
1646                 .radio = {
1647                         .name = name_radio,
1648                         .amux = LINE2,
1649                         .gpio = 0x80000,
1650                 },
1651                 .mute = {
1652                         .name = name_mute,
1653                         .amux = LINE2,
1654                         .gpio = 0x0c8000,
1655                 },
1656         },
1657         [SAA7134_BOARD_PINNACLE_300I_DVBT_PAL] = {
1658                 .name           = "Pinnacle PCTV 300i DVB-T + PAL",
1659                 .audio_clock    = 0x00187de7,
1660                 .tuner_type     = TUNER_MT2032,
1661                 .radio_type     = UNSET,
1662                 .tuner_addr     = ADDR_UNSET,
1663                 .radio_addr     = ADDR_UNSET,
1664                 .tda9887_conf   = TDA9887_PRESENT | TDA9887_INTERCARRIER,
1665                 .mpeg           = SAA7134_MPEG_DVB,
1666                 .inputs         = {{
1667                         .name = name_tv,
1668                         .vmux = 3,
1669                         .amux = TV,
1670                         .tv   = 1,
1671                 },{
1672                         .name = name_comp1,
1673                         .vmux = 0,
1674                         .amux = LINE2,
1675                 },{
1676                         .name = name_comp2,
1677                         .vmux = 1,
1678                         .amux = LINE2,
1679                 },{
1680                         .name = name_svideo,
1681                         .vmux = 8,
1682                         .amux = LINE2,
1683                 }},
1684         },
1685         [SAA7134_BOARD_PROVIDEO_PV952] = {
1686                 /* andreas.kretschmer@web.de */
1687                 .name           = "ProVideo PV952",
1688                 .audio_clock    = 0x00187de7,
1689                 .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
1690                 .radio_type     = UNSET,
1691                 .tuner_addr     = ADDR_UNSET,
1692                 .radio_addr     = ADDR_UNSET,
1693                 .tda9887_conf   = TDA9887_PRESENT,
1694                 .inputs         = {{
1695                         .name = name_comp1,
1696                         .vmux = 0,
1697                         .amux = LINE1,
1698                 },{
1699                         .name = name_tv,
1700                         .vmux = 1,
1701                         .amux = TV,
1702                         .tv   = 1,
1703                 },{
1704                         .name = name_tv_mono,
1705                         .vmux = 1,
1706                         .amux = LINE2,
1707                         .tv   = 1,
1708                 }},
1709                 .radio = {
1710                         .name = name_radio,
1711                         .amux = LINE2,
1712                 },
1713         },
1714         [SAA7134_BOARD_AVERMEDIA_305] = {
1715                 /* much like the "studio" version but without radio
1716                 * and another tuner (sirspiritus@yandex.ru) */
1717                 .name           = "AverMedia AverTV/305",
1718                 .audio_clock    = 0x00187de7,
1719                 .tuner_type     = TUNER_PHILIPS_FQ1216ME,
1720                 .radio_type     = UNSET,
1721                 .tuner_addr     = ADDR_UNSET,
1722                 .radio_addr     = ADDR_UNSET,
1723                 .tda9887_conf   = TDA9887_PRESENT,
1724                 .inputs         = {{
1725                         .name = name_tv,
1726                         .vmux = 1,
1727                         .amux = LINE2,
1728                         .tv   = 1,
1729                 },{
1730                         .name = name_comp1,
1731                         .vmux = 0,
1732                         .amux = LINE2,
1733                 },{
1734                         .name = name_comp2,
1735                         .vmux = 3,
1736                         .amux = LINE2,
1737                 },{
1738                         .name = name_svideo,
1739                         .vmux = 8,
1740                         .amux = LINE2,
1741                 }},
1742                 .mute = {
1743                         .name = name_mute,
1744                         .amux = LINE1,
1745                 },
1746         },
1747         [SAA7134_BOARD_FLYDVBTDUO] = {
1748                 /* LifeView FlyDVB-T DUO */
1749                 /* "Nico Sabbi <nsabbi@tiscali.it>  Hartmut Hackmann hartmut.hackmann@t-online.de*/
1750                 .name           = "LifeView FlyDVB-T DUO",
1751                 .audio_clock    = 0x00200000,
1752                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1753                 .radio_type     = UNSET,
1754                 .tuner_addr     = ADDR_UNSET,
1755                 .radio_addr     = ADDR_UNSET,
1756                 .mpeg           = SAA7134_MPEG_DVB,
1757                 .inputs         = {{
1758                         .name = name_tv,
1759                         .vmux = 1,
1760                         .amux = TV,
1761                         .tv   = 1,
1762                 },{
1763                         .name = name_comp1,     /* Composite signal on S-Video input */
1764                         .vmux = 0,
1765                         .amux = LINE2,
1766                 },{
1767                         .name = name_comp2,     /* Composite input */
1768                         .vmux = 3,
1769                         .amux = LINE2,
1770                 },{
1771                         .name = name_svideo,    /* S-Video signal on S-Video input */
1772                         .vmux = 8,
1773                         .amux = LINE2,
1774                 }},
1775         },
1776         [SAA7134_BOARD_PHILIPS_TOUGH] = {
1777                 .name           = "Philips TOUGH DVB-T reference design",
1778                 .tuner_type     = TUNER_ABSENT,
1779                 .audio_clock    = 0x00187de7,
1780                 .radio_type     = UNSET,
1781                 .tuner_addr     = ADDR_UNSET,
1782                 .radio_addr     = ADDR_UNSET,
1783                 .mpeg           = SAA7134_MPEG_DVB,
1784                 .inputs = {{
1785                         .name   = name_comp1,
1786                         .vmux   = 0,
1787                         .amux   = LINE1,
1788                 },{
1789                         .name   = name_svideo,
1790                         .vmux   = 8,
1791                         .amux   = LINE1,
1792                 }},
1793         },
1794         [SAA7134_BOARD_AVERMEDIA_307] = {
1795                 /*
1796                 Davydov Vladimir <vladimir@iqmedia.com>
1797                 */
1798                 .name           = "Avermedia AVerTV 307",
1799                 .audio_clock    = 0x00187de7,
1800                 .tuner_type     = TUNER_PHILIPS_FQ1216ME,
1801                 .radio_type     = UNSET,
1802                 .tuner_addr     = ADDR_UNSET,
1803                 .radio_addr     = ADDR_UNSET,
1804                 .tda9887_conf   = TDA9887_PRESENT,
1805                 .inputs         = {{
1806                         .name = name_tv,
1807                         .vmux = 1,
1808                         .amux = TV,
1809                         .tv   = 1,
1810                 },{
1811                         .name = name_comp1,
1812                         .vmux = 0,
1813                         .amux = LINE1,
1814                 },{
1815                         .name = name_comp2,
1816                         .vmux = 3,
1817                         .amux = LINE1,
1818                 },{
1819                         .name = name_svideo,
1820                         .vmux = 8,
1821                         .amux = LINE1,
1822                 }},
1823         },
1824         [SAA7134_BOARD_ADS_INSTANT_TV] = {
1825                 .name           = "ADS Tech Instant TV (saa7135)",
1826                 .audio_clock    = 0x00187de7,
1827                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1828                 .radio_type     = UNSET,
1829                 .tuner_addr     = ADDR_UNSET,
1830                 .radio_addr     = ADDR_UNSET,
1831                 .inputs         = {{
1832                         .name = name_tv,
1833                         .vmux = 1,
1834                         .amux = TV,
1835                         .tv   = 1,
1836                 },{
1837                         .name = name_comp1,
1838                         .vmux = 3,
1839                         .amux = LINE2,
1840                 },{
1841                         .name = name_svideo,
1842                         .vmux = 8,
1843                         .amux = LINE2,
1844                 }},
1845         },
1846         [SAA7134_BOARD_KWORLD_VSTREAM_XPERT] = {
1847                 .name           = "Kworld/Tevion V-Stream Xpert TV PVR7134",
1848                 .audio_clock    = 0x00187de7,
1849                 .tuner_type     = TUNER_PHILIPS_PAL_I,
1850                 .radio_type     = UNSET,
1851                 .tuner_addr     = ADDR_UNSET,
1852                 .radio_addr     = ADDR_UNSET,
1853                 .gpiomask       = 0x0700,
1854                 .inputs = {{
1855                         .name   = name_tv,
1856                         .vmux   = 1,
1857                         .amux   = TV,
1858                         .tv     = 1,
1859                         .gpio   = 0x000,
1860                 },{
1861                         .name   = name_comp1,
1862                         .vmux   = 3,
1863                         .amux   = LINE1,
1864                         .gpio   = 0x200,                /* gpio by DScaler */
1865                 },{
1866                         .name   = name_svideo,
1867                         .vmux   = 0,
1868                         .amux   = LINE1,
1869                         .gpio   = 0x200,
1870                 }},
1871                 .radio = {
1872                         .name   = name_radio,
1873                         .amux   = LINE1,
1874                         .gpio   = 0x100,
1875                 },
1876                 .mute  = {
1877                         .name = name_mute,
1878                         .amux = TV,
1879                         .gpio = 0x000,
1880                 },
1881         },
1882         [SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS] = {
1883                 .name           = "Typhoon DVB-T Duo Digital/Analog Cardbus",
1884                 .audio_clock    = 0x00200000,
1885                 .tuner_type     = TUNER_PHILIPS_TDA8290,
1886                 .radio_type     = UNSET,
1887                 .tuner_addr     = ADDR_UNSET,
1888                 .radio_addr     = ADDR_UNSET,
1889                 .mpeg           = SAA7134_MPEG_DVB,
1890                 /* .gpiomask       = 0xe000, */
1891                 .inputs         = {{
1892                         .name = name_tv,
1893                         .vmux = 1,
1894                         .amux = TV,
1895                 /*      .gpio = 0x0000,      */
1896                         .tv   = 1,
1897                 },{
1898                         .name = name_comp1,     /* Composite signal on S-Video input */
1899                         .vmux = 0,
1900                         .amux = LINE2,
1901                 /*      .gpio = 0x4000,      */
1902                 },{
1903                         .name = name_comp2,     /* Composite input */
1904                         .vmux = 3,
1905                         .amux = LINE2,
1906                 /*      .gpio = 0x4000,      */
1907                 },{
1908                         .name = name_svideo,    /* S-Video signal on S-Video input */
1909                         .vmux = 8,
1910                         .amux = LINE2,
1911                 /*      .gpio = 0x4000,      */
1912                 }},
1913                 .radio = {
1914                         .name = name_radio,
1915                         .amux = LINE2,
1916                 },
1917                 .mute = {
1918                         .name = name_mute,
1919                         .amux = LINE1,
1920                 },
1921         },
1922         [SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII] = {
1923                 .name           = "Compro VideoMate TV Gold+II",
1924                 .audio_clock    = 0x002187de7,
1925                 .tuner_type     = TUNER_LG_PAL_NEW_TAPC,
1926                 .radio_type     = TUNER_TEA5767,
1927                 .tuner_addr     = 0x63,
1928                 .radio_addr     = 0x60,
1929                 .gpiomask       = 0x8c1880,
1930                 .inputs         = {{
1931                         .name = name_svideo,
1932                         .vmux = 0,
1933                         .amux = LINE1,
1934                         .gpio = 0x800800,
1935                 },{
1936                         .name = name_comp1,
1937                         .vmux = 3,
1938                         .amux = LINE1,
1939                         .gpio = 0x801000,
1940                 },{
1941                         .name = name_tv,
1942                         .vmux = 1,
1943                         .amux = TV,
1944                         .tv   = 1,
1945                         .gpio = 0x800000,
1946                 }},
1947                 .radio = {
1948                         .name = name_radio,
1949                         .amux = TV,
1950                         .gpio = 0x880000,
1951                 },
1952                 .mute = {
1953                         .name = name_mute,
1954                         .amux = LINE2,
1955                         .gpio = 0x840000,
1956                 },
1957         },
1958         [SAA7134_BOARD_KWORLD_XPERT] = {
1959                 /*
1960                 FIXME:
1961                 - Remote control doesn't initialize properly.
1962                 - Audio volume starts muted,
1963                 then gradually increases after channel change.
1964                 - Overlay scaling problems (application error?)
1965                 - Composite S-Video untested.
1966                 From: Konrad Rzepecki <hannibal@megapolis.pl>
1967                 */
1968                 .name           = "Kworld Xpert TV PVR7134",
1969                 .audio_clock    = 0x00187de7,
1970                 .tuner_type     = TUNER_TENA_9533_DI,
1971                 .radio_type     = TUNER_TEA5767,
1972                 .tuner_addr     = 0x61,
1973                 .radio_addr     = 0x60,
1974                 .gpiomask       = 0x0700,
1975                 .inputs = {{
1976                         .name   = name_tv,
1977                         .vmux   = 1,
1978                         .amux   = TV,
1979                         .tv     = 1,
1980                         .gpio   = 0x000,
1981                 },{
1982                         .name   = name_comp1,
1983                         .vmux   = 3,
1984                         .amux   = LINE1,
1985                         .gpio   = 0x200,                /* gpio by DScaler */
1986                 },{
1987                         .name   = name_svideo,
1988                         .vmux   = 0,
1989                         .amux   = LINE1,
1990                         .gpio   = 0x200,
1991                 }},
1992                 .radio = {
1993                         .name   = name_radio,
1994                         .amux   = LINE1,
1995                         .gpio   = 0x100,
1996                 },
1997                 .mute = {
1998                         .name = name_mute,
1999                         .amux = TV,
2000                         .gpio = 0x000,
2001                 },
2002         },
2003         [SAA7134_BOARD_FLYTV_DIGIMATRIX] = {
2004                 .name           = "FlyTV mini Asus Digimatrix",
2005                 .audio_clock    = 0x00200000,
2006                 .tuner_type     = TUNER_LG_NTSC_TALN_MINI,
2007                 .radio_type     = UNSET,
2008                 .tuner_addr     = ADDR_UNSET,
2009                 .radio_addr     = ADDR_UNSET,
2010                 .inputs         = {{
2011                         .name = name_tv,
2012                         .vmux = 1,
2013                         .amux = TV,
2014                         .tv   = 1,
2015                 },{
2016                         .name = name_tv_mono,
2017                         .vmux = 1,
2018                         .amux = LINE2,
2019                         .tv   = 1,
2020                 },{
2021                         .name = name_comp1,
2022                         .vmux = 0,
2023                         .amux = LINE2,
2024                 },{
2025                         .name = name_comp2,
2026                         .vmux = 3,
2027                         .amux = LINE2,
2028                 },{
2029                         .name = name_svideo,
2030                         .vmux = 8,
2031                         .amux = LINE2,
2032                 }},
2033                 .radio = {
2034                         .name = name_radio,             /* radio unconfirmed */
2035                         .amux = LINE2,
2036                 },
2037         },
2038         [SAA7134_BOARD_KWORLD_TERMINATOR] = {
2039                 /* Kworld V-Stream Studio TV Terminator */
2040                 /* "James Webb <jrwebb@qwest.net> */
2041                 .name           = "V-Stream Studio TV Terminator",
2042                 .audio_clock    = 0x00187de7,
2043                 .tuner_type     = TUNER_PHILIPS_TDA8290,
2044                 .radio_type     = UNSET,
2045                 .tuner_addr     = ADDR_UNSET,
2046                 .radio_addr     = ADDR_UNSET,
2047                 .gpiomask       = 1 << 21,
2048                 .inputs         = {{
2049                         .name = name_tv,
2050                         .vmux = 1,
2051                         .amux = TV,
2052                         .gpio = 0x0000000,
2053                         .tv   = 1,
2054                 },{
2055                         .name = name_comp1,     /* Composite input */
2056                         .vmux = 3,
2057                         .amux = LINE2,
2058                         .gpio = 0x0000000,
2059                 },{
2060                         .name = name_svideo,    /* S-Video input */
2061                         .vmux = 8,
2062                         .amux = LINE2,
2063                         .gpio = 0x0000000,
2064                 }},
2065                 .radio = {
2066                         .name = name_radio,
2067                         .amux = TV,
2068                         .gpio = 0x0200000,
2069                 },
2070         },
2071         [SAA7134_BOARD_YUAN_TUN900] = {
2072                 /* FIXME:
2073                  * S-Video and composite sources untested.
2074                  * Radio not working.
2075                  * Remote control not yet implemented.
2076                  * From : codemaster@webgeeks.be */
2077                 .name           = "Yuan TUN-900 (saa7135)",
2078                 .audio_clock    = 0x00187de7,
2079                 .tuner_type     = TUNER_PHILIPS_TDA8290,
2080                 .radio_type     = UNSET,
2081                 .tuner_addr= ADDR_UNSET,
2082                 .radio_addr= ADDR_UNSET,
2083                 .gpiomask       = 0x00010003,
2084                 .inputs         = {{
2085                         .name = name_tv,
2086                         .vmux = 1,
2087                         .amux = TV,
2088                         .tv   = 1,
2089                         .gpio = 0x01,
2090                 },{
2091                         .name = name_comp1,
2092                         .vmux = 0,
2093                         .amux = LINE2,
2094                         .gpio = 0x02,
2095                 },{
2096                         .name = name_svideo,
2097                         .vmux = 6,
2098                         .amux = LINE2,
2099                         .gpio = 0x02,
2100                 }},
2101                 .radio = {
2102                         .name = name_radio,
2103                         .amux = LINE1,
2104                         .gpio = 0x00010003,
2105                 },
2106                 .mute = {
2107                         .name = name_mute,
2108                         .amux = TV,
2109                         .gpio = 0x01,
2110                 },
2111         },
2112 };
2113
2114
2115 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
2116
2117 /* ------------------------------------------------------------------ */
2118 /* PCI ids + subsystem IDs                                            */
2119
2120 struct pci_device_id saa7134_pci_tbl[] = {
2121         {
2122                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2123                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2124                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2125                 .subdevice    = 0x2001,
2126                 .driver_data  = SAA7134_BOARD_PROTEUS_PRO,
2127         },{
2128                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2129                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2130                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2131                 .subdevice    = 0x2001,
2132                 .driver_data  = SAA7134_BOARD_PROTEUS_PRO,
2133         },{
2134                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2135                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2136                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2137                 .subdevice    = 0x6752,
2138                 .driver_data  = SAA7134_BOARD_EMPRESS,
2139         },{
2140                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2141                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2142                 .subvendor    = 0x1131,
2143                 .subdevice    = 0x4e85,
2144                 .driver_data  = SAA7134_BOARD_MONSTERTV,
2145         },{
2146                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2147                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2148                 .subvendor    = 0x153B,
2149                 .subdevice    = 0x1142,
2150                 .driver_data  = SAA7134_BOARD_CINERGY400,
2151         },{
2152                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2153                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2154                 .subvendor    = 0x153B,
2155                 .subdevice    = 0x1143,
2156                 .driver_data  = SAA7134_BOARD_CINERGY600,
2157         },{
2158                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2159                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2160                 .subvendor    = 0x153B,
2161                 .subdevice    = 0x1158,
2162                 .driver_data  = SAA7134_BOARD_CINERGY600_MK3,
2163         },{
2164                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2165                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2166                 .subvendor    = 0x153b,
2167                 .subdevice    = 0x1162,
2168                 .driver_data  = SAA7134_BOARD_CINERGY400_CARDBUS,
2169         },{
2170                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2171                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2172                 .subvendor    = 0x5168,
2173                 .subdevice    = 0x0138,
2174                 .driver_data  = SAA7134_BOARD_FLYVIDEO3000,
2175         },{
2176                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2177                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2178                 .subvendor    = 0x4e42,                         /* "Typhoon PCI Capture TV Card" Art.No. 50673 */
2179                 .subdevice    = 0x0138,
2180                 .driver_data  = SAA7134_BOARD_FLYVIDEO3000,
2181         },{
2182                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2183                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2184                 .subvendor    = 0x5168,
2185                 .subdevice    = 0x0138,
2186                 .driver_data  = SAA7134_BOARD_FLYVIDEO2000,
2187         },{
2188                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2189                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2190                 .subvendor    = 0x5168,
2191                 .subdevice    = 0x0212, /* minipci, LR212 */
2192                 .driver_data  = SAA7134_BOARD_FLYTVPLATINUM_MINI,
2193         },{
2194                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2195                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2196                 .subvendor    = 0x5168, /* Animation Technologies (LifeView) */
2197                 .subdevice    = 0x0214, /* Standard PCI, LR214WF */
2198                 .driver_data  = SAA7134_BOARD_FLYTVPLATINUM_FM,
2199         },{
2200                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2201                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2202                 .subvendor    = 0x1489, /* KYE */
2203                 .subdevice    = 0x0214, /* Genius VideoWonder ProTV */
2204                 .driver_data  = SAA7134_BOARD_FLYTVPLATINUM_FM, /* is an LR214WF actually */
2205         },{
2206                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2207                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2208                 .subvendor    = 0x16be,
2209                 .subdevice    = 0x0003,
2210                 .driver_data  = SAA7134_BOARD_MD7134,
2211         },{
2212                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2213                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2214                 .subvendor    = 0x1048,
2215                 .subdevice    = 0x226b,
2216                 .driver_data  = SAA7134_BOARD_ELSA,
2217         },{
2218                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2219                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2220                 .subvendor    = 0x1048,
2221                 .subdevice    = 0x226b,
2222                 .driver_data  = SAA7134_BOARD_ELSA_500TV,
2223         },{
2224                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2225                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2226                 .subvendor    = PCI_VENDOR_ID_ASUSTEK,
2227                 .subdevice    = 0x4842,
2228                 .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
2229         },{
2230                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2231                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2232                 .subvendor    = PCI_VENDOR_ID_ASUSTEK,
2233                 .subdevice    = 0x4845,
2234                 .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7135,
2235         },{
2236                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2237                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2238                 .subvendor    = PCI_VENDOR_ID_ASUSTEK,
2239                 .subdevice    = 0x4830,
2240                 .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
2241         },{
2242                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2243                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2244                 .subvendor    = PCI_VENDOR_ID_ASUSTEK,
2245                 .subdevice    = 0x4843,
2246                 .driver_data  = SAA7134_BOARD_ASUSTEK_TVFM7133,
2247         },{
2248                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2249                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2250                 .subvendor    = PCI_VENDOR_ID_ASUSTEK,
2251                 .subdevice    = 0x4840,
2252                 .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
2253         },{
2254                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2255                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2256                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2257                 .subdevice    = 0xfe01,
2258                 .driver_data  = SAA7134_BOARD_TVSTATION_RDS,
2259         },{
2260                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2261                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2262                 .subvendor    = 0x1894,
2263                 .subdevice    = 0xfe01,
2264                 .driver_data  = SAA7134_BOARD_TVSTATION_RDS,
2265         },{
2266                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2267                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2268                 .subvendor    = 0x1894,
2269                 .subdevice    = 0xa006,
2270                 .driver_data  = SAA7134_BOARD_TVSTATION_DVR,
2271         },{
2272                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2273                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2274                 .subvendor    = 0x1131,
2275                 .subdevice    = 0x7133,
2276                 .driver_data  = SAA7134_BOARD_VA1000POWER,
2277         },{
2278                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2279                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2280                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2281                 .subdevice    = 0x2001,
2282                 .driver_data  = SAA7134_BOARD_10MOONSTVMASTER,
2283         },{
2284                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2285                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2286                 .subvendor    = 0x185b,
2287                 .subdevice    = 0xc100,
2288                 .driver_data  = SAA7134_BOARD_VIDEOMATE_TV,
2289         },{
2290                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2291                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2292                 .subvendor    = 0x185b,
2293                 .subdevice    = 0xc100,
2294                 .driver_data  = SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS,
2295         },{
2296                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2297                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2298                 .subvendor    = PCI_VENDOR_ID_MATROX,
2299                 .subdevice    = 0x48d0,
2300                 .driver_data  = SAA7134_BOARD_CRONOS_PLUS,
2301         },{
2302                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2303                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2304                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2305                 .subdevice    = 0xa70b,
2306                 .driver_data  = SAA7134_BOARD_MD2819,
2307         },{
2308                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2309                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2310                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2311                 .subdevice    = 0x2115,
2312                 .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_305,
2313         },{
2314                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2315                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2316                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2317                 .subdevice    = 0x2108,
2318                 .driver_data  = SAA7134_BOARD_AVERMEDIA_305,
2319         },{
2320                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2321                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2322                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2323                 .subdevice    = 0x10ff,
2324                 .driver_data  = SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER,
2325         },{
2326                 /* AVerMedia CardBus */
2327                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2328                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2329                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2330                 .subdevice    = 0xd6ee,
2331                 .driver_data  = SAA7134_BOARD_AVERMEDIA_CARDBUS,
2332         },{
2333                 /* TransGear 3000TV */
2334                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2335                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2336                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2337                 .subdevice    = 0x050c,
2338                 .driver_data  = SAA7134_BOARD_TG3000TV,
2339         },{
2340                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2341                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2342                 .subvendor    = 0x11bd,
2343                 .subdevice    = 0x002b,
2344                 .driver_data  = SAA7134_BOARD_PINNACLE_PCTV_STEREO,
2345         },{
2346                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2347                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2348                 .subvendor    = 0x11bd,
2349                 .subdevice    = 0x002d,
2350                 .driver_data  = SAA7134_BOARD_PINNACLE_300I_DVBT_PAL,
2351         },{
2352                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2353                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2354                 .subvendor    = 0x1019,
2355                 .subdevice    = 0x4cb4,
2356                 .driver_data  = SAA7134_BOARD_ECS_TVP3XP,
2357         },{
2358                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2359                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2360                 .subvendor    = 0x1019,
2361                 .subdevice    = 0x4cb5,
2362                 .driver_data  = SAA7134_BOARD_ECS_TVP3XP_4CB5,
2363         },{
2364                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2365                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2366                 .subvendor    = 0x12ab,
2367                 .subdevice    = 0x0800,
2368                 .driver_data  = SAA7134_BOARD_UPMOST_PURPLE_TV,
2369         },{
2370                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2371                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2372                 .subvendor    = 0x153B,
2373                 .subdevice    = 0x1152,
2374                 .driver_data  = SAA7134_BOARD_CINERGY200,
2375         },{
2376                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2377                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2378                 .subvendor    = 0x185b,
2379                 .subdevice    = 0xc100,
2380                 .driver_data  = SAA7134_BOARD_VIDEOMATE_TV_PVR,
2381         },{
2382                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2383                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2384                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2385                 .subdevice    = 0x9715,
2386                 .driver_data  = SAA7134_BOARD_AVERMEDIA_STUDIO_307,
2387         },{
2388                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2389                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2390                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2391                 .subdevice    = 0xa70a,
2392                 .driver_data  = SAA7134_BOARD_AVERMEDIA_307,
2393         },{
2394                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2395                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2396                 .subvendor    = 0x185b,
2397                 .subdevice    = 0xc200,
2398                 .driver_data  = SAA7134_BOARD_VIDEOMATE_GOLD_PLUS,
2399         },{
2400                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2401                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2402                 .subvendor    = 0x1540,
2403                 .subdevice    = 0x9524,
2404                 .driver_data  = SAA7134_BOARD_PROVIDEO_PV952,
2405
2406         },{
2407                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2408                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2409                 .subvendor    = 0x5168,
2410                 .subdevice    = 0x0502,                /* Cardbus version */
2411                 .driver_data  = SAA7134_BOARD_FLYDVBTDUO,
2412         },{
2413                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2414                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2415                 .subvendor    = 0x5168,
2416                 .subdevice    = 0x0306,                /* PCI version */
2417                 .driver_data  = SAA7134_BOARD_FLYDVBTDUO,
2418         },{
2419                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2420                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2421                 .subvendor    = 0x1461, /* Avermedia Technologies Inc */
2422                 .subdevice    = 0xf31f,
2423                 .driver_data  = SAA7134_BOARD_AVERMEDIA_GO_007_FM,
2424
2425         },{
2426                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2427                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2428                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2429                 .subdevice    = 0x2004,
2430                 .driver_data  = SAA7134_BOARD_PHILIPS_TOUGH,
2431         },{
2432                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2433                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2434                 .subvendor    = 0x1421,
2435                 .subdevice    = 0x0350,         /* PCI version */
2436                 .driver_data  = SAA7134_BOARD_ADS_INSTANT_TV,
2437
2438         },{
2439                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2440                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2441                 .subvendor    = 0x1421,
2442                 .subdevice    = 0x0370,         /* cardbus version */
2443                 .driver_data  = SAA7134_BOARD_ADS_INSTANT_TV,
2444
2445         },{     /* Typhoon DVB-T Duo Digital/Analog Cardbus */
2446                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2447                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2448                 .subvendor    = 0x4e42,
2449                 .subdevice    = 0x0502,
2450                 .driver_data  = SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS,
2451         },{
2452                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2453                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2454                 .subvendor    = 0x1043,
2455                 .subdevice    = 0x0210,         /* mini pci NTSC version */
2456                 .driver_data  = SAA7134_BOARD_FLYTV_DIGIMATRIX,
2457         },{
2458                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2459                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2460                 .subvendor    = 0x1043,
2461                 .subdevice    = 0x0210,         /* mini pci PAL/SECAM version */
2462                 .driver_data  = SAA7134_BOARD_FLYTV_DIGIMATRIX,
2463
2464         },{
2465                 /* --- boards without eeprom + subsystem ID --- */
2466                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2467                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2468                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2469                 .subdevice    = 0,
2470                 .driver_data  = SAA7134_BOARD_NOAUTO,
2471         },{
2472                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2473                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2474                 .subvendor    = PCI_VENDOR_ID_PHILIPS,
2475                 .subdevice    = 0,
2476                 .driver_data  = SAA7134_BOARD_NOAUTO,
2477         },{
2478
2479                 /* --- default catch --- */
2480                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2481                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
2482                 .subvendor    = PCI_ANY_ID,
2483                 .subdevice    = PCI_ANY_ID,
2484                 .driver_data  = SAA7134_BOARD_UNKNOWN,
2485         },{
2486                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2487                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
2488                 .subvendor    = PCI_ANY_ID,
2489                 .subdevice    = PCI_ANY_ID,
2490                 .driver_data  = SAA7134_BOARD_UNKNOWN,
2491         },{
2492                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2493                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
2494                 .subvendor    = PCI_ANY_ID,
2495                 .subdevice    = PCI_ANY_ID,
2496                 .driver_data  = SAA7134_BOARD_UNKNOWN,
2497         },{
2498                 .vendor       = PCI_VENDOR_ID_PHILIPS,
2499                 .device       = PCI_DEVICE_ID_PHILIPS_SAA7135,
2500                 .subvendor    = PCI_ANY_ID,
2501                 .subdevice    = PCI_ANY_ID,
2502                 .driver_data  = SAA7134_BOARD_UNKNOWN,
2503         },{
2504                 /* --- end of list --- */
2505         }
2506 };
2507 MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl);
2508
2509 /* ----------------------------------------------------------- */
2510 /* flyvideo tweaks                                             */
2511
2512
2513 static void board_flyvideo(struct saa7134_dev *dev)
2514 {
2515         printk("%s: there are different flyvideo cards with different tuners\n"
2516                "%s: out there, you might have to use the tuner=<nr> insmod\n"
2517                "%s: option to override the default value.\n",
2518                dev->name, dev->name, dev->name);
2519 }
2520
2521 /* ----------------------------------------------------------- */
2522
2523 int saa7134_board_init1(struct saa7134_dev *dev)
2524 {
2525         /* Always print gpio, often manufacturers encode tuner type and other info. */
2526         saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0);
2527         dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
2528         printk(KERN_INFO "%s: board init: gpio is %x\n", dev->name, dev->gpio_value);
2529
2530         switch (dev->board) {
2531         case SAA7134_BOARD_FLYVIDEO2000:
2532         case SAA7134_BOARD_FLYVIDEO3000:
2533                 dev->has_remote = 1;
2534                 board_flyvideo(dev);
2535                 break;
2536         case SAA7134_BOARD_FLYTVPLATINUM_FM:
2537         case SAA7134_BOARD_CINERGY400:
2538         case SAA7134_BOARD_CINERGY600:
2539         case SAA7134_BOARD_CINERGY600_MK3:
2540         case SAA7134_BOARD_ECS_TVP3XP:
2541         case SAA7134_BOARD_ECS_TVP3XP_4CB5:
2542         case SAA7134_BOARD_MD2819:
2543         case SAA7134_BOARD_KWORLD_VSTREAM_XPERT:
2544         case SAA7134_BOARD_KWORLD_XPERT:
2545         case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
2546         case SAA7134_BOARD_AVERMEDIA_305:
2547         case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
2548         case SAA7134_BOARD_AVERMEDIA_307:
2549         case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
2550 /*      case SAA7134_BOARD_SABRENT_SBTTVFM:  */ /* not finished yet */
2551         case SAA7134_BOARD_VIDEOMATE_TV_PVR:
2552         case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
2553         case SAA7134_BOARD_MANLI_MTV001:
2554         case SAA7134_BOARD_MANLI_MTV002:
2555         case SAA7134_BOARD_AVACSSMARTTV:
2556                 dev->has_remote = 1;
2557                 break;
2558         case SAA7134_BOARD_MD5044:
2559                 printk("%s: seems there are two different versions of the MD5044\n"
2560                 "%s: (with the same ID) out there.  If sound doesn't work for\n"
2561                 "%s: you try the audio_clock_override=0x200000 insmod option.\n",
2562                 dev->name,dev->name,dev->name);
2563                 break;
2564         case SAA7134_BOARD_CINERGY400_CARDBUS:
2565                 /* power-up tuner chip */
2566                 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0x00040000, 0x00040000);
2567                 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000);
2568                 msleep(1);
2569                 break;
2570         case SAA7134_BOARD_FLYDVBTDUO:
2571         case SAA7134_BOARD_THYPHOON_DVBT_DUO_CARDBUS:
2572         /* turn the fan on Hac: static for the time being */
2573                 saa_writeb(SAA7134_GPIO_GPMODE3, 0x08);
2574                 saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x06);
2575                 break;
2576         case SAA7134_BOARD_AVERMEDIA_CARDBUS:
2577                 /* power-up tuner chip */
2578                 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2,   0xffffffff, 0xffffffff);
2579                 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
2580                 msleep(1);
2581                 break;
2582         }
2583         return 0;
2584 }
2585
2586 /* stuff which needs working i2c */
2587 int saa7134_board_init2(struct saa7134_dev *dev)
2588 {
2589         unsigned char buf;
2590         int board;
2591
2592         switch (dev->board) {
2593         case SAA7134_BOARD_BMK_MPEX_NOTUNER:
2594         case SAA7134_BOARD_BMK_MPEX_TUNER:
2595                 dev->i2c_client.addr = 0x60;
2596                 board = (i2c_master_recv(&dev->i2c_client,&buf,0) < 0)
2597                         ? SAA7134_BOARD_BMK_MPEX_NOTUNER
2598                         : SAA7134_BOARD_BMK_MPEX_TUNER;
2599                 if (board == dev->board)
2600                         break;
2601                 dev->board = board;
2602                 printk("%s: board type fixup: %s\n", dev->name,
2603                 saa7134_boards[dev->board].name);
2604                 dev->tuner_type = saa7134_boards[dev->board].tuner_type;
2605
2606                 if (TUNER_ABSENT != dev->tuner_type) {
2607                                 struct tuner_setup tun_setup;
2608
2609                                 tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
2610                                 tun_setup.type = dev->tuner_type;
2611                                 tun_setup.addr = ADDR_UNSET;
2612
2613                                 saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR, &tun_setup);
2614                 }
2615                 break;
2616 case SAA7134_BOARD_MD7134:
2617                 {
2618                 struct tuner_setup tun_setup;
2619                 u8 subaddr;
2620                 u8 data[3];
2621                 int ret, tuner_t;
2622
2623                 struct i2c_msg msg[] = {{.addr=0x50, .flags=0, .buf=&subaddr, .len = 1},
2624                                         {.addr=0x50, .flags=I2C_M_RD, .buf=data, .len = 3}};
2625                 subaddr= 0x14;
2626                 tuner_t = 0;
2627                 ret = i2c_transfer(&dev->i2c_adap, msg, 2);
2628                 if (ret != 2) {
2629                         printk(KERN_ERR "EEPROM read failure\n");
2630                 } else if ((data[0] != 0) && (data[0] != 0xff)) {
2631                         /* old config structure */
2632                         subaddr = data[0] + 2;
2633                         msg[1].len = 2;
2634                         i2c_transfer(&dev->i2c_adap, msg, 2);
2635                         tuner_t = (data[0] << 8) + data[1];
2636                         switch (tuner_t){
2637                         case 0x0103:
2638                                 dev->tuner_type = TUNER_PHILIPS_PAL;
2639                                 break;
2640                         case 0x010C:
2641                                 dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2642                                 break;
2643                         default:
2644                                 printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
2645                         }
2646                 } else if ((data[1] != 0) && (data[1] != 0xff)) {
2647                         /* new config structure */
2648                         subaddr = data[1] + 1;
2649                         msg[1].len = 1;
2650                         i2c_transfer(&dev->i2c_adap, msg, 2);
2651                         subaddr = data[0] + 1;
2652                         msg[1].len = 2;
2653                         i2c_transfer(&dev->i2c_adap, msg, 2);
2654                         tuner_t = (data[1] << 8) + data[0];
2655                         switch (tuner_t) {
2656                         case 0x0005:
2657                                 dev->tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2658                                 break;
2659                         case 0x001d:
2660                                 dev->tuner_type = TUNER_PHILIPS_FMD1216ME_MK3;
2661                                         printk(KERN_INFO "%s Board has DVB-T\n", dev->name);
2662                                 break;
2663                         default:
2664                                 printk(KERN_ERR "%s Cant determine tuner type %x from EEPROM\n", dev->name, tuner_t);
2665                         }
2666                 } else {
2667                         printk(KERN_ERR "%s unexpected config structure\n", dev->name);
2668                 }
2669
2670                 printk(KERN_INFO "%s Tuner type is %d\n", dev->name, dev->tuner_type);
2671                 if (dev->tuner_type == TUNER_PHILIPS_FMD1216ME_MK3) {
2672                         dev->tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE;
2673                         saa7134_i2c_call_clients(dev,TDA9887_SET_CONFIG, &dev->tda9887_conf);
2674                 }
2675
2676                 tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
2677                 tun_setup.type = dev->tuner_type;
2678                 tun_setup.addr = ADDR_UNSET;
2679
2680                 saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
2681                 }
2682                 break;
2683         }
2684         return 0;
2685 }
2686
2687 /* ----------------------------------------------------------- */
2688 /*
2689  * Local variables:
2690  * c-basic-offset: 8
2691  * End:
2692  */