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