saa7134-cards.c 39.2 KB
Newer Older
1 2 3 4
/*
 * device driver for philips saa7134 based TV cards
 * card-specific stuff.
 *
5
 * (c) 2001-04 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <linux/init.h>
#include <linux/module.h>

#include "saa7134-reg.h"
#include "saa7134.h"

/* commly used strings */
static char name_mute[]    = "mute";
static char name_radio[]   = "Radio";
static char name_tv[]      = "Television";
32
static char name_tv_mono[] = "TV (mono only)";
33 34
static char name_comp1[]   = "Composite1";
static char name_comp2[]   = "Composite2";
Gerd Knorr's avatar
Gerd Knorr committed
35 36
static char name_comp3[]   = "Composite3";
static char name_comp4[]   = "Composite4";
37 38 39 40 41 42 43
static char name_svideo[]  = "S-Video";

/* ------------------------------------------------------------------ */
/* board config info                                                  */

struct saa7134_board saa7134_boards[] = {
	[SAA7134_BOARD_UNKNOWN] = {
44 45 46 47 48 49 50
		.name		= "UNKNOWN/GENERIC",
		.audio_clock	= 0x00187de7,
		.tuner_type	= TUNER_ABSENT,
		.inputs         = {{
			.name = "default",
			.vmux = 0,
			.amux = LINE1,
51 52 53 54
		}},
	},
	[SAA7134_BOARD_PROTEUS_PRO] = {
		/* /me */
55 56 57 58 59 60 61
		.name		= "Proteus Pro [philips reference design]",
		.audio_clock	= 0x00187de7,
		.tuner_type	= TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE1,
62
		},{
63 64 65 66
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
67 68 69 70 71
		},{
			.name = name_tv_mono,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
72
		}},
73 74 75 76
		.radio = {
			.name = name_radio,
			.amux = LINE2,
		},
77 78 79
	},
	[SAA7134_BOARD_FLYVIDEO3000] = {
		/* "Marco d'Itri" <md@Linux.IT> */
80 81 82
		.name		= "LifeView FlyVIDEO3000",
		.audio_clock	= 0x00200000,
		.tuner_type	= TUNER_PHILIPS_PAL,
83
		.gpiomask       = 0xe000,
84 85 86 87
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
88 89 90 91 92 93 94
			.gpio = 0x8000,
			.tv   = 1,
                },{
			.name = name_tv_mono,
			.vmux = 1,
			.amux = LINE2,
			.gpio = 0x0000,
95
			.tv   = 1,
96
		},{
97 98
			.name = name_comp1,
			.vmux = 0,
99 100
			.amux = LINE2,
			.gpio = 0x4000,
101
		},{
102 103
			.name = name_comp2,
			.vmux = 3,
104 105
			.amux = LINE2,
			.gpio = 0x4000,
106
		},{
107 108
			.name = name_svideo,
			.vmux = 8,
109 110
			.amux = LINE2,
			.gpio = 0x4000,
111
		}},
112 113 114
		.radio = {
			.name = name_radio,
			.amux = LINE2,
115
			.gpio = 0x2000,
116 117 118 119
		},
	},
	[SAA7134_BOARD_FLYVIDEO2000] = {
		/* "TC Wan" <tcwan@cs.usm.my> */
120 121 122
		.name           = "LifeView FlyVIDEO2000",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_LG_PAL_NEW_TAPC,
123
		.gpiomask       = 0xe000,
124 125 126 127 128 129
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.gpio = 0x0000,
			.tv   = 1,
130
		},{
131 132 133 134
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
			.gpio = 0x4000,
135
		},{
136 137 138 139
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
			.gpio = 0x4000,
140
		},{
141 142 143 144
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
			.gpio = 0x4000,
145
		}},
146 147 148
                .radio = {
                        .name = name_radio,
                        .amux = LINE2,
149
			.gpio = 0x2000,
150
                },
151 152
		.mute = {
			.name = name_mute,
153 154
                        .amux = LINE2,
			.gpio = 0x8000,
155 156
		},
	},
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
	[SAA7134_BOARD_FLYTVPLATINUM] = {
		/* "Arnaud Quette" <aquette@free.fr> */
		.name           = "LifeView FlyTV Platinum",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_PHILIPS_SECAM,
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
		}},
	},
177 178
	[SAA7134_BOARD_EMPRESS] = {
		/* "Gert Vervoort" <gert.vervoort@philips.com> */
179 180 181 182 183 184 185
		.name		= "EMPRESS",
		.audio_clock	= 0x00187de7,
		.tuner_type	= TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE1,
186
		},{
187 188 189
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
190
		},{
191 192 193 194
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
195
		}},
196 197 198
		.radio = {
			.name = name_radio,
			.amux = LINE2,
199
		},
200 201
		.has_ts    = 1,
		.video_out = CCIR656,
202 203 204
	},
	[SAA7134_BOARD_MONSTERTV] = {
               /* "K.Ohta" <alpha292@bremen.or.jp> */
205 206 207 208 209 210 211 212
               .name           = "SKNet Monster TV",
               .audio_clock    = 0x00187de7,
               .tuner_type     = TUNER_PHILIPS_NTSC_M,
               .inputs         = {{
                       .name = name_tv,
                       .vmux = 1,
                       .amux = TV,
                       .tv   = 1,
213
               },{
214 215 216
                       .name = name_comp1,
                       .vmux = 0,
                       .amux = LINE1,
217
               },{
218 219 220
                       .name = name_svideo,
                       .vmux = 8,
                       .amux = LINE1,
221
               }},
222 223 224
               .radio = {
                       .name = name_radio,
                       .amux = LINE2,
225 226 227
               },
	},
	[SAA7134_BOARD_MD9717] = {
228 229 230 231 232 233 234 235
		.name		= "Tevion MD 9717",
		.audio_clock	= 0x00200000,
		.tuner_type	= TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
236 237
		},{
			/* workaround for problems with normal TV sound */
238
			.name = name_tv_mono,
239 240 241
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
242
		},{
243 244 245
			.name = name_comp1,
			.vmux = 2,
			.amux = LINE1,
246
		},{
247 248 249
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE1,
250
		},{
251 252 253
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
254
		}},
255 256 257
		.radio = {
			.name = name_radio,
			.amux = LINE2,
258 259 260
		},
	},
	[SAA7134_BOARD_TVSTATION_RDS] = {
261 262
                /* Typhoon TV Tuner RDS: Art.Nr. 50694 */
		.name		= "KNC One TV-Station RDS / Typhoon TV Tuner RDS",
263 264
		.audio_clock	= 0x00200000,
		.tuner_type	= TUNER_PHILIPS_FM1216ME_MK3,
265
		.tda9887_conf   = TDA9887_PRESENT,
266 267 268 269 270
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
271 272 273 274 275 276 277 278 279 280
		},{
			.name = name_tv_mono,
                        .vmux = 1,
                        .amux   = LINE2,
                        .tv   = 1,
                },{

			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
281
		},{
282
			.name = name_comp1,
283
			.vmux = 3,
284
			.amux = LINE1,
285
		},{
286 287 288 289 290 291 292 293 294 295 296 297 298 299

                        .name = "CVid over SVid",
                        .vmux = 0,
                        .amux = LINE1,
                }},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
		},
	},
	[SAA7134_BOARD_TVSTATION_DVR] = {
		.name		= "KNC One TV-Station DVR",
		.audio_clock	= 0x00200000,
		.tuner_type	= TUNER_PHILIPS_FM1216ME_MK3,
300
		.tda9887_conf	= TDA9887_PRESENT,
301 302 303 304 305 306 307 308 309 310 311 312 313 314
		.gpiomask	= 0x820000,
		.inputs		= {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
			.gpio = 0x20000,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
			.gpio = 0x20000,
		},{
			.name = name_comp1,
315 316
			.vmux = 3,
			.amux = LINE1,
317
			.gpio = 0x20000,
318
		}},
319
		.radio		= {
320 321
			.name = name_radio,
			.amux = LINE2,
322
			.gpio = 0x20000,
323
		},
324 325
		.has_ts		= 1,
		.video_out	= CCIR656,
326 327
	},
	[SAA7134_BOARD_CINERGY400] = {
328 329 330 331 332 333 334 335
                .name           = "Terratec Cinergy 400 TV",
                .audio_clock    = 0x00200000,
                .tuner_type     = TUNER_PHILIPS_PAL,
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
336
                },{
337 338 339
                        .name = name_comp1,
                        .vmux = 4,
                        .amux = LINE1,
340
                },{
341 342 343
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
344
                },{
345 346 347
                        .name = name_comp2, // CVideo over SVideo Connector
                        .vmux = 0,
                        .amux = LINE1,
348 349 350
                }}
        },
	[SAA7134_BOARD_MD5044] = {
351
		.name           = "Medion 5044",
352
		.audio_clock    = 0x00187de7, // was: 0x00200000,
353
		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
354
		.tda9887_conf   = TDA9887_PRESENT,
355 356 357 358 359
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
360 361 362 363 364 365
		},{
			/* workaround for problems with normal TV sound */
			.name = name_tv_mono,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
366
		},{
367 368 369
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
370
		},{
371 372 373
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
374
		},{
375 376 377
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
378
		}},
379 380 381
		.radio = {
			.name = name_radio,
			.amux = LINE2,
382 383
		},
	},
Gerd Knorr's avatar
Gerd Knorr committed
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
	[SAA7134_BOARD_KWORLD] = {
                .name           = "Kworld/KuroutoShikou SAA7130-TVPCI",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_NTSC_M,
                .inputs         = {{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
                },{
                        .name = name_comp1,
                        .vmux = 3,
                        .amux = LINE1,
                },{
                        .name = name_tv,
                        .vmux = 1,
399
                        .amux = LINE2,
Gerd Knorr's avatar
Gerd Knorr committed
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
                        .tv   = 1,
                }},
        },
	[SAA7134_BOARD_CINERGY600] = {
                .name           = "Terratec Cinergy 600 TV",
                .audio_clock    = 0x00200000,
                .tuner_type     = TUNER_PHILIPS_PAL,
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
                },{
                        .name = name_comp1,
                        .vmux = 4,
                        .amux = LINE1,
                },{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
                },{
                        .name = name_comp2, // CVideo over SVideo Connector
                        .vmux = 0,
                        .amux = LINE1,
                }},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
               },
        },
	[SAA7134_BOARD_MD7134] = {
		.name           = "Medion 7134",
Gerd Knorr's avatar
Gerd Knorr committed
432 433
		//.audio_clock    = 0x00200000,
		.audio_clock    = 0x00187de7,
Gerd Knorr's avatar
Gerd Knorr committed
434
		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
435
		.tda9887_conf   = TDA9887_PRESENT,
Gerd Knorr's avatar
Gerd Knorr committed
436 437 438
		.inputs = {{
			.name   = name_tv,
			.vmux   = 1,
Gerd Knorr's avatar
Gerd Knorr committed
439
			.amux   = TV,
440
			.tv     = 1,
Gerd Knorr's avatar
Gerd Knorr committed
441 442 443 444 445 446 447 448 449 450 451 452 453
		},{
			.name   = name_comp1,
			.vmux   = 0,
			.amux   = LINE2,
		},{
			.name   = name_svideo,
			.vmux   = 8,
			.amux   = LINE2,
		}},
		.radio = {
			.name   = name_radio,
			.amux   = LINE2,
		},
454 455
	},
	[SAA7134_BOARD_TYPHOON_90031] = {
456 457
		/* aka Typhoon "TV+Radio", Art.Nr 90031 */
		/* Tom Zoerner <tomzo at users sourceforge net> */
458 459
		.name           = "Typhoon TV+Radio 90031",
		.audio_clock    = 0x00200000,
460
		.tuner_type     = TUNER_PHILIPS_PAL,
461
		.tda9887_conf   = TDA9887_PRESENT,
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
		.inputs         = {{
			.name   = name_tv,
			.vmux   = 1,
			.amux   = TV,
			.tv     = 1,
		},{
			.name   = name_comp1,
			.vmux   = 3,
			.amux   = LINE1,
		},{
			.name   = name_svideo,
			.vmux   = 8,
			.amux   = LINE1,
		}},
		.radio = {
			.name   = name_radio,
			.amux   = LINE2,
		},
Gerd Knorr's avatar
Gerd Knorr committed
480
        },
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
	[SAA7134_BOARD_ELSA] = {
		.name           = "ELSA EX-VISION 300TV",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_HITACHI_NTSC,
		.inputs         = {{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		},{
			.name   = name_comp1,
			.vmux   = 0,
			.amux   = LINE1,
		},{
			.name = name_tv,
			.vmux = 4,
			.amux = LINE2,
			.tv   = 1,
		}},
        },
	[SAA7134_BOARD_ELSA_500TV] = {
		.name           = "ELSA EX-VISION 500TV",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_HITACHI_NTSC,
		.inputs         = {{
			.name = name_svideo,
			.vmux = 7,
			.amux = LINE1,
		},{
			.name = name_tv,
			.vmux = 8,
			.amux = TV,
			.tv   = 1,
513 514 515 516 517
		},{
			.name = name_tv_mono,
			.vmux = 8,
			.amux = LINE2,
			.tv   = 1,
518 519
		}},
        },
Gerd Knorr's avatar
Gerd Knorr committed
520 521 522 523
	[SAA7134_BOARD_ASUSTeK_TVFM7134] = {
                .name           = "ASUS TV-FM 7134",
                .audio_clock    = 0x00187de7,
                .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
524
                .tda9887_conf   = TDA9887_PRESENT,
Gerd Knorr's avatar
Gerd Knorr committed
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
                },{
                        .name = name_comp1,
                        .vmux = 4,
                        .amux = LINE2,
                },{
                        .name = name_svideo,
                        .vmux = 6,
                        .amux = LINE2,
                }},
                .radio = {
                        .name = name_radio,
                        .amux = LINE1,
                },
	},
	[SAA7134_BOARD_VA1000POWER] = {
                .name           = "AOPEN VA1000 POWER",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_NTSC,
                .inputs         = {{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
                },{
                        .name = name_comp1,
                        .vmux = 3,
                        .amux = LINE1,
                },{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = LINE2,
                        .tv   = 1,
                }},
	},
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601
	[SAA7134_BOARD_10MOONSTVMASTER] = {
		/* "lilicheng" <llc@linuxfans.org> */
		.name           = "10MOONS PCI TV CAPTURE CARD",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_LG_PAL_NEW_TAPC,
		.gpiomask       = 0xe000,
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.gpio = 0x0000,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
			.gpio = 0x4000,
		},{
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
			.gpio = 0x4000,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
			.gpio = 0x4000,
		}},
                .radio = {
                        .name = name_radio,
                        .amux = LINE2,
			.gpio = 0x2000,
                },
		.mute = {
			.name = name_mute,
                        .amux = LINE2,
			.gpio = 0x8000,
		},
	},
Gerd Knorr's avatar
Gerd Knorr committed
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650
	[SAA7134_BOARD_BMK_MPEX_NOTUNER] = {
		/* "Andrew de Quincey" <adq@lidskialf.net> */
		.name		= "BMK MPEX No Tuner",
		.audio_clock	= 0x200000,
		.tuner_type	= TUNER_ABSENT,
		.inputs         = {{
			.name = name_comp1,
			.vmux = 4,
			.amux = LINE1,
		},{
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE1,
		},{
			.name = name_comp3,
			.vmux = 0,
			.amux = LINE1,
		},{
			.name = name_comp4,
			.vmux = 1,
			.amux = LINE1,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		}},
		.has_ts    = 1,
		.video_out = CCIR656,
	},
	[SAA7134_BOARD_VIDEOMATE_TV] = {
		.name           = "Compro VideoMate TV",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_NTSC_M,
                .inputs         = {{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
                },{
                        .name = name_comp1,
                        .vmux = 3,
                        .amux = LINE1,
                },{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = LINE2,
                        .tv   = 1,
                }},
        },
	[SAA7134_BOARD_CRONOS_PLUS] = {
651 652 653 654 655 656
		/* gpio pins:
		   0  .. 3   BASE_ID
		   4  .. 7   PROTECT_ID
		   8  .. 11  USER_OUT
		   12 .. 13  USER_IN
		   14 .. 15  VIDIN_SEL */
Gerd Knorr's avatar
Gerd Knorr committed
657 658
		.name           = "Matrox CronosPlus",
		.tuner_type     = TUNER_ABSENT,
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682
		.gpiomask       = 0xcf00,
                .inputs         = {{
                        .name = name_comp1,
                        .vmux = 0,
			.gpio = 2 << 14,
		},{
                        .name = name_comp2,
                        .vmux = 0,
			.gpio = 1 << 14,
		},{
                        .name = name_comp3,
                        .vmux = 0,
			.gpio = 0 << 14,
		},{
                        .name = name_comp4,
                        .vmux = 0,
			.gpio = 3 << 14,
		},{
			.name = name_svideo,
			.vmux = 8,
			.gpio = 2 << 14,
                }},
        },
	[SAA7134_BOARD_MD2819] = {
Gerd Knorr's avatar
Gerd Knorr committed
683
		.name           = "AverMedia M156 / Medion 2819",
684 685
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
686
		.tda9887_conf   = TDA9887_PRESENT,
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
		},{
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
		}},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
		},
	},
	[SAA7134_BOARD_BMK_MPEX_TUNER] = {
		/* "Greg Wickham <greg.wickham@grangenet.net> */
		.name           = "BMK MPEX Tuner",
		.audio_clock    = 0x200000,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_comp1,
			.vmux = 1,
			.amux = LINE1,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		},{
			.name = name_tv,
			.vmux = 3,
			.amux = LINE2,
			.tv   = 1,
		}},
		.has_ts    = 1,
		.video_out = CCIR656,
        },
        [SAA7134_BOARD_ASUSTEK_TVFM7133] = {
                .name           = "ASUS TV-FM 7133",
                .audio_clock    = 0x00187de7,
735 736 737
		// probably wrong, the 7133 one is the NTSC version ...
		// .tuner_type     = TUNER_PHILIPS_FM1236_MK3
                .tuner_type     = TUNER_LG_NTSC_NEW_TAPC,
738
                .tda9887_conf   = TDA9887_PRESENT,
739 740 741 742 743
                .inputs         = {{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
744 745 746 747 748 749 750 751
		},{
                        .name = name_comp1,
                        .vmux = 4,
                        .amux = LINE2,
                },{
                        .name = name_svideo,
                        .vmux = 6,
                        .amux = LINE2,
752 753 754 755 756 757 758 759 760 761
                }},
                .radio = {
                        .name = name_radio,
                        .amux = LINE1,
                },
        },
	[SAA7134_BOARD_PINNACLE_PCTV_STEREO] = {
                .name           = "Pinnacle PCTV Stereo (saa7134)",
                .audio_clock    = 0x00187de7,
                .tuner_type     = TUNER_MT2032,
762
                .tda9887_conf   = TDA9887_PRESENT,
Gerd Knorr's avatar
Gerd Knorr committed
763
                .inputs         = {{
764 765 766 767 768
                        .name = name_tv,
                        .vmux = 3,
                        .amux = TV,
                        .tv   = 1,
                },{
Gerd Knorr's avatar
Gerd Knorr committed
769 770
                        .name = name_comp1,
                        .vmux = 0,
771 772 773 774 775 776 777 778 779
                        .amux = LINE2,
                },{
                        .name = name_comp2,
                        .vmux = 1,
                        .amux = LINE2,
                },{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE2,
Gerd Knorr's avatar
Gerd Knorr committed
780 781
                }},
        },
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846
	[SAA7134_BOARD_MANLI_MTV002] = {
		/* Ognjen Nastic <ognjen@logosoft.ba> */
		.name           = "Manli MuchTV M-TV002",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		},{
			.name   = name_comp1,
			.vmux   = 1,
			.amux   = LINE1,
		},{
			.name = name_tv,
			.vmux = 3,
			.amux = LINE2,
			.tv   = 1,
		}},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
		},
	},
	[SAA7134_BOARD_MANLI_MTV001] = {
		/* Ognjen Nastic <ognjen@logosoft.ba> UNTESTED */
		.name           = "Manli MuchTV M-TV001",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		},{			
			.name = name_comp1,
			.vmux = 1,
			.amux = LINE1,
		},{
			.name = name_tv,
			.vmux = 3,
			.amux = LINE2,
			.tv   = 1,
		}},
        },
	[SAA7134_BOARD_TG3000TV] = {
		/* TransGear 3000TV */
		.name           = "Nagase Sangyo TransGear 3000TV",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_NTSC_M,
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 3,
			.amux = LINE2,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
		}},
	},
        [SAA7134_BOARD_ECS_TVP3XP] = {
847
                .name           = "Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) ",
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877
                .audio_clock    = 0x187de7,  // xtal 32.1 MHz
                .tuner_type     = TUNER_PHILIPS_PAL,
                .inputs         = {{
                        .name   = name_tv,
                        .vmux   = 1,
                        .amux   = TV,
                        .tv     = 1,
                },{
                        .name   = name_tv_mono,
                        .vmux   = 1,
                        .amux   = LINE2,
                        .tv     = 1,
                },{
                        .name   = name_comp1,
                        .vmux   = 3,
                        .amux   = LINE1,
                },{
                        .name   = name_svideo,
                        .vmux   = 8,
                        .amux   = LINE1,
		},{
			.name   = "CVid over SVid",
			.vmux   = 0,
			.amux   = LINE1,
		}},
                .radio = {
                        .name   = name_radio,
                        .amux   = LINE2,
                },
        },
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953
        [SAA7134_BOARD_ECS_TVP3XP_4CB5] = {
                .name           = "Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM)",
                .audio_clock    = 0x187de7,
                .tuner_type     = TUNER_PHILIPS_NTSC,
                .inputs         = {{
                        .name   = name_tv,
                        .vmux   = 1,
                        .amux   = TV,
                        .tv     = 1,
                },{
                        .name   = name_tv_mono,
                        .vmux   = 1,
                        .amux   = LINE2,
                        .tv     = 1,
                },{
                        .name   = name_comp1,
                        .vmux   = 3,
                        .amux   = LINE1,
                },{
                        .name   = name_svideo,
                        .vmux   = 8,
                        .amux   = LINE1,
                },{
                        .name   = "CVid over SVid",
                        .vmux   = 0,
                        .amux   = LINE1,
                }},
                .radio = {
                        .name   = name_radio,
                        .amux   = LINE2,
                },
        },
	[SAA7134_BOARD_AVACSSMARTTV] = {
		/* Roman Pszonczenko <romka@kolos.math.uni.lodz.pl> */
		.name           = "AVACS SmartTV",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = TV,
			.tv   = 1,
                },{
			.name = name_tv_mono,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
		},{
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
		}},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
			.gpio = 0x200000,
		},
	},
	[SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER] = {
		/* Michael Smith <msmith@cbnco.com> */
		.name           = "AVerMedia DVD EZMaker",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_ABSENT,
		.inputs         = {{
			.name = name_comp1,
			.vmux = 3,
		}},
	},
Gerd Knorr's avatar
Gerd Knorr committed
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975
        [SAA7134_BOARD_NOVAC_PRIMETV7133] = {
                /* toshii@netbsd.org */
                .name           = "Noval Prime TV 7133",
                .audio_clock    = 0x00200000,
                .tuner_type     = TUNER_ALPS_TSBH1_NTSC,
                .inputs         = {{
                        .name = name_comp1,
                        .vmux = 3,
                },{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = TV,
                        .tv   = 1,
                },{
                        .name = name_svideo,
                        .vmux = 8,
                }},
        },
	[SAA7134_BOARD_AVERMEDIA_305] = {
		.name           = "AverMedia 305",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
976
		.tda9887_conf   = TDA9887_PRESENT,
Gerd Knorr's avatar
Gerd Knorr committed
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
		.inputs         = {{
			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.tv   = 1,
		},{
			.name = name_comp1,
			.vmux = 0,
			.amux = LINE2,
		},{
			.name = name_comp2,
			.vmux = 3,
			.amux = LINE2,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE2,
		}},
		.radio = {
			 .name = name_radio,
			 .amux = LINE2,
		 },
		.mute = {
			 .name = name_mute,
			 .amux = LINE1,
		},
	},
  	[SAA7133_BOARD_UPMOST_PURPLE_TV] = {
  		.name           = "UPMOST PURPLE TV",
  		.audio_clock    = 0x00187de7,
  		.tuner_type     = TUNER_PHILIPS_FM1236_MK3,
1008
  		.tda9887_conf   = TDA9887_PRESENT,
Gerd Knorr's avatar
Gerd Knorr committed
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018
  		.inputs         = {{
  			.name = name_tv,
  			.vmux = 7,
  			.amux = TV,
  			.tv   = 1,
  		},{
  			.name = name_svideo,
  			.vmux = 7,
  			.amux = LINE1,
  		}},
1019
	},
Gerd Knorr's avatar
Gerd Knorr committed
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043
	[SAA7134_BOARD_ITEMS_MTV005] = {
		/* Norman Jonas <normanjonas@arcor.de> */
		.name           = "Items MuchTV Plus / IT-005",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
			.name = name_tv,
			.vmux = 3,
			.amux = TV,
			.tv   = 1,
		},{
			.name   = name_comp1,
			.vmux   = 1,
			.amux   = LINE1,
		},{
			.name = name_svideo,
			.vmux = 8,
			.amux = LINE1,
		}},
		.radio = {
			.name = name_radio,
			.amux = LINE2,
		},
	},
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093
	[SAA7134_BOARD_CINERGY200] = {
		.name           = "Terratec Cinergy 200 TV",
		.audio_clock    = 0x00200000,
		.tuner_type     = TUNER_PHILIPS_PAL,
		.inputs         = {{
       			.name = name_tv,
			.vmux = 1,
			.amux = LINE2,
			.gpio = 0x0000,
			.tv   = 1,
		}},
		.mute = {
			 .name = name_mute,
			 .amux = LINE2,
		},
	},
	[SAA7134_BOARD_VIDEOMATE_TV_PVR] = {
		/* Alain St-Denis <alain@topaze.homeip.net> */
		.name           = "Compro VideoMate TV PVR/FM",
		.audio_clock    = 0x00187de7,
		.tuner_type     = TUNER_PHILIPS_NTSC_M,
		.gpiomask	= 0x808c0080,
                .inputs         = {{
                        .name = name_svideo,
                        .vmux = 8,
                        .amux = LINE1,
			.gpio = 0x00080
                },{
                        .name = name_comp1,
                        .vmux = 3,
                        .amux = LINE1,
			.gpio = 0x00080
                },{
                        .name = name_tv,
                        .vmux = 1,
                        .amux = LINE2,
                        .tv   = 1,
			.gpio = 0x00080
                }},
		.radio = {
			 .name = name_radio,
			 .amux = LINE2,
			.gpio = 0x80000
		 },
		.mute = {
			.name = name_mute,
                        .amux = LINE2,
			.gpio = 0x40000,
		},
        },
1094
};
1095
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
1096 1097 1098 1099

/* ------------------------------------------------------------------ */
/* PCI ids + subsystem IDs                                            */

Gerd Knorr's avatar
Gerd Knorr committed
1100
struct pci_device_id saa7134_pci_tbl[] = {
1101
	{
1102 1103 1104 1105 1106
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0x2001,
		.driver_data  = SAA7134_BOARD_PROTEUS_PRO,
1107 1108 1109 1110 1111 1112
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
		.subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0x2001,
		.driver_data  = SAA7134_BOARD_PROTEUS_PRO,
1113
        },{
1114 1115 1116 1117 1118
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0x6752,
		.driver_data  = SAA7134_BOARD_EMPRESS,
1119
	},{
1120 1121 1122 1123 1124
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x1131,
                .subdevice    = 0x4e85,
		.driver_data  = SAA7134_BOARD_MONSTERTV,
1125
        },{
1126 1127 1128 1129 1130
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x153B,
                .subdevice    = 0x1142,
                .driver_data  = SAA7134_BOARD_CINERGY400,
1131
        },{
Gerd Knorr's avatar
Gerd Knorr committed
1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x153B,
                .subdevice    = 0x1143,
                .driver_data  = SAA7134_BOARD_CINERGY600,
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = 0x5168,
		.subdevice    = 0x0138,
		.driver_data  = SAA7134_BOARD_FLYVIDEO3000,
1143 1144 1145 1146 1147 1148
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x4e42,				//"Typhoon PCI Capture TV Card" Art.No. 50673
                .subdevice    = 0x0138,
                .driver_data  = SAA7134_BOARD_FLYVIDEO3000,
1149 1150 1151 1152 1153 1154
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
		.subvendor    = 0x5168,
		.subdevice    = 0x0138,
		.driver_data  = SAA7134_BOARD_FLYVIDEO2000,
1155 1156 1157 1158 1159 1160
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7135,
		.subvendor    = 0x5168,
		.subdevice    = 0x0212,
		.driver_data  = SAA7134_BOARD_FLYTVPLATINUM,
Gerd Knorr's avatar
Gerd Knorr committed
1161 1162 1163 1164 1165 1166 1167
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = 0x16be,
		.subdevice    = 0x0003,
		.driver_data  = SAA7134_BOARD_MD7134,
	},{
1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
		.subvendor    = 0x1048,
		.subdevice    = 0x226b,
		.driver_data  = SAA7134_BOARD_ELSA,
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
		.subvendor    = 0x1048,
		.subdevice    = 0x226b,
		.driver_data  = SAA7134_BOARD_ELSA_500TV,
	},{
Gerd Knorr's avatar
Gerd Knorr committed
1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_VENDOR_ID_ASUSTEK,
                .subdevice    = 0x4842,
                .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
	},{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_VENDOR_ID_ASUSTEK,
                .subdevice    = 0x4830,
                .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202
        },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = PCI_VENDOR_ID_ASUSTEK,
                .subdevice    = 0x4843,
                .driver_data  = SAA7134_BOARD_ASUSTEK_TVFM7133,
	},{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_VENDOR_ID_ASUSTEK,
                .subdevice    = 0x4840,
                .driver_data  = SAA7134_BOARD_ASUSTeK_TVFM7134,
Gerd Knorr's avatar
Gerd Knorr committed
1203 1204 1205 1206 1207
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0xfe01,
1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220
		.driver_data  = SAA7134_BOARD_TVSTATION_RDS,
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = 0x1894,
		.subdevice    = 0xfe01,
		.driver_data  = SAA7134_BOARD_TVSTATION_RDS,
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
		.subvendor    = 0x1894,
		.subdevice    = 0xa006,
		.driver_data  = SAA7134_BOARD_TVSTATION_DVR,
Gerd Knorr's avatar
Gerd Knorr committed
1221 1222 1223 1224 1225 1226
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x1131,
                .subdevice    = 0x7133,
		.driver_data  = SAA7134_BOARD_VA1000POWER,
1227 1228 1229 1230 1231 1232
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = PCI_VENDOR_ID_PHILIPS,
                .subdevice    = 0x2001,
		.driver_data  = SAA7134_BOARD_10MOONSTVMASTER,
Gerd Knorr's avatar
Gerd Knorr committed
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = 0x185b,
                .subdevice    = 0xc100,
		.driver_data  = SAA7134_BOARD_VIDEOMATE_TV,
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = PCI_VENDOR_ID_MATROX,
                .subdevice    = 0x48d0,
		.driver_data  = SAA7134_BOARD_CRONOS_PLUS,
	},{
1246 1247 1248 1249 1250 1251 1252
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x1461, /* Avermedia Technologies Inc */
                .subdevice    = 0xa70b,
		.driver_data  = SAA7134_BOARD_MD2819,
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
Gerd Knorr's avatar
Gerd Knorr committed
1253
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
1254 1255
                .subvendor    = 0x1461, /* Avermedia Technologies Inc */
                .subdevice    = 0x2115,
Gerd Knorr's avatar
Gerd Knorr committed
1256
		.driver_data  = SAA7134_BOARD_AVERMEDIA_305,
1257 1258 1259 1260 1261 1262
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = 0x1461, /* Avermedia Technologies Inc */
                .subdevice    = 0x10ff,
		.driver_data  = SAA7134_BOARD_AVERMEDIA_DVD_EZMAKER,
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282
        },{
		/* TransGear 3000TV */
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = 0x1461, /* Avermedia Technologies Inc */
                .subdevice    = 0x050c,
		.driver_data  = SAA7134_BOARD_TG3000TV,
	},{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x11bd,
                .subdevice    = 0x002b,
                .driver_data  = SAA7134_BOARD_PINNACLE_PCTV_STEREO,
        },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x1019,
                .subdevice    = 0x4cb4,
                .driver_data  = SAA7134_BOARD_ECS_TVP3XP,
        },{
1283 1284 1285 1286 1287 1288
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = 0x1019,
                .subdevice    = 0x4cb5,
                .driver_data  = SAA7134_BOARD_ECS_TVP3XP_4CB5,
        },{
Gerd Knorr's avatar
Gerd Knorr committed
1289 1290 1291 1292 1293
		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = 0x12ab,
                .subdevice    = 0x0800,
 		.driver_data  = SAA7133_BOARD_UPMOST_PURPLE_TV,
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306
	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
		.subvendor    = 0x153B,
		.subdevice    = 0x1152,
		.driver_data  = SAA7134_BOARD_CINERGY200,

 	},{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = 0x185b,
                .subdevice    = 0xc100,
		.driver_data  = SAA7134_BOARD_VIDEOMATE_TV_PVR,
Gerd Knorr's avatar
Gerd Knorr committed
1307
		
Gerd Knorr's avatar
Gerd Knorr committed
1308
 	},{
1309
		/* --- boards without eeprom + subsystem ID --- */
1310 1311 1312 1313 1314
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0,
		.driver_data  = SAA7134_BOARD_NOAUTO,
1315
        },{
1316 1317 1318 1319 1320
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = PCI_VENDOR_ID_PHILIPS,
		.subdevice    = 0,
		.driver_data  = SAA7134_BOARD_NOAUTO,
1321 1322 1323
	},{
		
		/* --- default catch --- */
1324 1325 1326 1327 1328
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = PCI_ANY_ID,
                .subdevice    = PCI_ANY_ID,
		.driver_data  = SAA7134_BOARD_UNKNOWN,
1329 1330 1331 1332 1333 1334
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = PCI_ANY_ID,
                .subdevice    = PCI_ANY_ID,
		.driver_data  = SAA7134_BOARD_UNKNOWN,
1335
        },{
1336 1337 1338 1339 1340
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_ANY_ID,
                .subdevice    = PCI_ANY_ID,
		.driver_data  = SAA7134_BOARD_UNKNOWN,
1341 1342 1343 1344 1345 1346
        },{
		.vendor       = PCI_VENDOR_ID_PHILIPS,
		.device       = PCI_DEVICE_ID_PHILIPS_SAA7135,
                .subvendor    = PCI_ANY_ID,
                .subdevice    = PCI_ANY_ID,
		.driver_data  = SAA7134_BOARD_UNKNOWN,
1347 1348 1349 1350 1351 1352
	},{
		/* --- end of list --- */
	}
};
MODULE_DEVICE_TABLE(pci, saa7134_pci_tbl);

1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
/* ----------------------------------------------------------- */
/* flyvideo tweaks                                             */

#if 0
static struct {
	char  *model;
	int   tuner_type;
} fly_list[0x20] = {
	/* default catch ... */
	[ 0 ... 0x1f ] = {
		.model      = "UNKNOWN",
		.tuner_type = TUNER_ABSENT,
	},
	/* ... the ones known so far */
	[ 0x05 ] = {
		.model      = "PAL-BG",
		.tuner_type = TUNER_LG_PAL_NEW_TAPC,
	},
	[ 0x10 ] = {
		.model      = "PAL-BG / PAL-DK",
		.tuner_type = TUNER_PHILIPS_PAL,
	},
	[ 0x15 ] = {
		.model      = "NTSC",
		.tuner_type = TUNER_ABSENT /* FIXME */,
	},
};
#endif

static void board_flyvideo(struct saa7134_dev *dev)
{
Gerd Knorr's avatar
Gerd Knorr committed
1384
#if 0
1385
	/* non-working attempt to detect the correct tuner type ... */
1386
	u32 value;
Gerd Knorr's avatar
Gerd Knorr committed
1387
	int index;
1388

Gerd Knorr's avatar
Gerd Knorr committed
1389 1390 1391 1392 1393 1394
	value = dev->gpio_value;
	index = (value & 0x1f00) >> 8;
	printk(KERN_INFO "%s: flyvideo: gpio is 0x%x [model=%s,tuner=%d]\n",
	       dev->name, value, fly_list[index].model,
	       fly_list[index].tuner_type);
	dev->tuner_type = fly_list[index].tuner_type;
1395
#endif
1396 1397 1398 1399
	printk("%s: there are different flyvideo cards with different tuners\n"
	       "%s: out there, you might have to use the tuner=<nr> insmod\n"
	       "%s: option to override the default value.\n",
	       dev->name, dev->name, dev->name);
1400 1401 1402 1403 1404 1405
}

/* ----------------------------------------------------------- */

int saa7134_board_init(struct saa7134_dev *dev)
{
Gerd Knorr's avatar
Gerd Knorr committed
1406 1407 1408 1409 1410
	// Always print gpio, often manufacturers encode tuner type and other info.
	saa_writel(SAA7134_GPIO_GPMODE0 >> 2, 0);
	dev->gpio_value = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
	printk(KERN_INFO "%s: board init: gpio is %x\n", dev->name, dev->gpio_value);

1411 1412 1413
	switch (dev->board) {
	case SAA7134_BOARD_FLYVIDEO2000:
	case SAA7134_BOARD_FLYVIDEO3000:
Gerd Knorr's avatar
Gerd Knorr committed
1414
		dev->has_remote = 1;
1415 1416 1417
		/* fall throuth */
	case SAA7134_BOARD_FLYTVPLATINUM:
		board_flyvideo(dev);
Gerd Knorr's avatar
Gerd Knorr committed
1418 1419
		break;
	case SAA7134_BOARD_CINERGY400:
1420
	case SAA7134_BOARD_CINERGY600:
1421 1422
	case SAA7134_BOARD_ECS_TVP3XP:
	case SAA7134_BOARD_ECS_TVP3XP_4CB5:
Gerd Knorr's avatar
Gerd Knorr committed
1423
		dev->has_remote = 1;
1424
		break;
Gerd Knorr's avatar
Gerd Knorr committed
1425 1426 1427
	case SAA7134_BOARD_AVACSSMARTTV:
		dev->has_remote = 1;
		break;
1428 1429 1430 1431 1432 1433
	case SAA7134_BOARD_MD5044:
		printk("%s: seems there are two different versions of the MD5044\n"
		       "%s: (with the same ID) out there.  If sound doesn't work for\n"
		       "%s: you try the audio_clock_override=0x200000 insmod option.\n",
		       dev->name,dev->name,dev->name);
		break;
1434 1435 1436 1437
	}
	return 0;
}

1438 1439 1440 1441 1442 1443
/* ----------------------------------------------------------- */
/*
 * Local variables:
 * c-basic-offset: 8
 * End:
 */