aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-cards.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2009-01-28 19:32:59 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:47 -0400
commit6f98700a5bb8d218162b04db1b8a3921a0dcc7ce (patch)
treed1782240b51f6e0f1400187da9af020cd7a25f99 /drivers/media/video/bt8xx/bttv-cards.c
parent430390e67b39ccf56d98286f5e5a72d903c9cf87 (diff)
V4L/DVB (10567): bttv: shrink muxsel data in card database
Over half of the card database was used to store muxsel data. 64 bytes were used to store one 32 bit word for each of up to 16 inputs. The Bt8x8 only has two bits to control its mux, so muxsel data for 16 inputs will fit into a single 32 bit word. There were a couple cards that had special muxsel data that didn't fit in two bits, but I cleaned them up in earlier patches. Unfortunately, C doesn't allow us to have an array of bit fields. This makes initializing the structure more of a pain. But with some cpp magic, we can do it by changing: .muxsel = { 2, 3, 0, 1 }, .muxsel = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 1 }, Into: .muxsel = MUXSEL(2, 3, 0, 1), .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1), That's not so bad. MUXSEL is a fancy macro that packs the arguments (of which there can be one to sixteen!) into a single word two bits at a time. It's a compile time constant (a variadic function wouldn't be) so we can use it to initialize the structure. It's important the the arguments to the macro only be plain decimal integers. Stuff like "0x01", "(2)", or "MUX3" won't work properly. I also created an accessor function, bttv_muxsel(btv, input), that gets the mux bits for the selected input. It makes it cleaner to change the way the muxsel data is stored. This patch doesn't change the code size and decreases the datasegment by 9440 bytes. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-cards.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c316
1 files changed, 160 insertions, 156 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index fc2b796b25fc..fd1ab7a15cd4 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -323,7 +323,7 @@ struct tvcard bttv_tvcards[] = {
323 .name = " *** UNKNOWN/GENERIC *** ", 323 .name = " *** UNKNOWN/GENERIC *** ",
324 .video_inputs = 4, 324 .video_inputs = 4,
325 .svhs = 2, 325 .svhs = 2,
326 .muxsel = { 2, 3, 1, 0 }, 326 .muxsel = MUXSEL(2, 3, 1, 0),
327 .tuner_type = UNSET, 327 .tuner_type = UNSET,
328 .tuner_addr = ADDR_UNSET, 328 .tuner_addr = ADDR_UNSET,
329 }, 329 },
@@ -333,7 +333,7 @@ struct tvcard bttv_tvcards[] = {
333 /* .audio_inputs= 1, */ 333 /* .audio_inputs= 1, */
334 .svhs = 2, 334 .svhs = 2,
335 .gpiomask = 15, 335 .gpiomask = 15,
336 .muxsel = { 2, 3, 1, 1 }, 336 .muxsel = MUXSEL(2, 3, 1, 1),
337 .gpiomux = { 2, 0, 0, 0 }, 337 .gpiomux = { 2, 0, 0, 0 },
338 .gpiomute = 10, 338 .gpiomute = 10,
339 .needs_tvaudio = 1, 339 .needs_tvaudio = 1,
@@ -346,7 +346,7 @@ struct tvcard bttv_tvcards[] = {
346 /* .audio_inputs= 1, */ 346 /* .audio_inputs= 1, */
347 .svhs = 2, 347 .svhs = 2,
348 .gpiomask = 7, 348 .gpiomask = 7,
349 .muxsel = { 2, 3, 1, 1 }, 349 .muxsel = MUXSEL(2, 3, 1, 1),
350 .gpiomux = { 0, 1, 2, 3 }, 350 .gpiomux = { 0, 1, 2, 3 },
351 .gpiomute = 4, 351 .gpiomute = 4,
352 .needs_tvaudio = 1, 352 .needs_tvaudio = 1,
@@ -359,7 +359,7 @@ struct tvcard bttv_tvcards[] = {
359 /* .audio_inputs= 1, */ 359 /* .audio_inputs= 1, */
360 .svhs = 2, 360 .svhs = 2,
361 .gpiomask = 7, 361 .gpiomask = 7,
362 .muxsel = { 2, 3, 1, 1 }, 362 .muxsel = MUXSEL(2, 3, 1, 1),
363 .gpiomux = { 4, 0, 2, 3 }, 363 .gpiomux = { 4, 0, 2, 3 },
364 .gpiomute = 1, 364 .gpiomute = 1,
365 .no_msp34xx = 1, 365 .no_msp34xx = 1,
@@ -377,7 +377,7 @@ struct tvcard bttv_tvcards[] = {
377 /* .audio_inputs= 0, */ 377 /* .audio_inputs= 0, */
378 .svhs = 2, 378 .svhs = 2,
379 .gpiomask = 0, 379 .gpiomask = 0,
380 .muxsel = { 2, 3, 1, 1 }, 380 .muxsel = MUXSEL(2, 3, 1, 1),
381 .gpiomux = { 0 }, 381 .gpiomux = { 0 },
382 .needs_tvaudio = 0, 382 .needs_tvaudio = 0,
383 .tuner_type = TUNER_ABSENT, 383 .tuner_type = TUNER_ABSENT,
@@ -389,7 +389,7 @@ struct tvcard bttv_tvcards[] = {
389 /* .audio_inputs= 1, */ 389 /* .audio_inputs= 1, */
390 .svhs = 2, 390 .svhs = 2,
391 .gpiomask = 3, 391 .gpiomask = 3,
392 .muxsel = { 2, 3, 1, 0 }, 392 .muxsel = MUXSEL(2, 3, 1, 0),
393 .gpiomux = { 0, 1, 0, 1 }, 393 .gpiomux = { 0, 1, 0, 1 },
394 .gpiomute = 3, 394 .gpiomute = 3,
395 .needs_tvaudio = 1, 395 .needs_tvaudio = 1,
@@ -401,7 +401,7 @@ struct tvcard bttv_tvcards[] = {
401 .video_inputs = 3, 401 .video_inputs = 3,
402 /* .audio_inputs= 1, */ 402 /* .audio_inputs= 1, */
403 .svhs = 3, 403 .svhs = 3,
404 .muxsel = { 2, 3, 1, 1 }, 404 .muxsel = MUXSEL(2, 3, 1, 1),
405 .gpiomask = 0x0f, 405 .gpiomask = 0x0f,
406 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 }, 406 .gpiomux = { 0x0c, 0x04, 0x08, 0x04 },
407 /* 0x04 for some cards ?? */ 407 /* 0x04 for some cards ?? */
@@ -417,7 +417,7 @@ struct tvcard bttv_tvcards[] = {
417 /* .audio_inputs= 1, */ 417 /* .audio_inputs= 1, */
418 .svhs = 3, 418 .svhs = 3,
419 .gpiomask = 0, 419 .gpiomask = 0,
420 .muxsel = { 2, 3, 1, 0, 0 }, 420 .muxsel = MUXSEL(2, 3, 1, 0, 0),
421 .gpiomux = { 0 }, 421 .gpiomux = { 0 },
422 .needs_tvaudio = 1, 422 .needs_tvaudio = 1,
423 .tuner_type = TUNER_ABSENT, 423 .tuner_type = TUNER_ABSENT,
@@ -431,7 +431,7 @@ struct tvcard bttv_tvcards[] = {
431 /* .audio_inputs= 1, */ 431 /* .audio_inputs= 1, */
432 .svhs = 2, 432 .svhs = 2,
433 .gpiomask = 0xc00, 433 .gpiomask = 0xc00,
434 .muxsel = { 2, 3, 1, 1 }, 434 .muxsel = MUXSEL(2, 3, 1, 1),
435 .gpiomux = { 0, 0xc00, 0x800, 0x400 }, 435 .gpiomux = { 0, 0xc00, 0x800, 0x400 },
436 .gpiomute = 0xc00, 436 .gpiomute = 0xc00,
437 .needs_tvaudio = 1, 437 .needs_tvaudio = 1,
@@ -445,7 +445,7 @@ struct tvcard bttv_tvcards[] = {
445 /* .audio_inputs= 1, */ 445 /* .audio_inputs= 1, */
446 .svhs = 2, 446 .svhs = 2,
447 .gpiomask = 3, 447 .gpiomask = 3,
448 .muxsel = { 2, 3, 1, 1 }, 448 .muxsel = MUXSEL(2, 3, 1, 1),
449 .gpiomux = { 1, 1, 2, 3 }, 449 .gpiomux = { 1, 1, 2, 3 },
450 .needs_tvaudio = 0, 450 .needs_tvaudio = 0,
451 .pll = PLL_28, 451 .pll = PLL_28,
@@ -458,7 +458,7 @@ struct tvcard bttv_tvcards[] = {
458 /* .audio_inputs= 1, */ 458 /* .audio_inputs= 1, */
459 .svhs = 2, 459 .svhs = 2,
460 .gpiomask = 0x0f, /* old: 7 */ 460 .gpiomask = 0x0f, /* old: 7 */
461 .muxsel = { 2, 0, 1, 1 }, 461 .muxsel = MUXSEL(2, 0, 1, 1),
462 .gpiomux = { 0, 1, 2, 3 }, 462 .gpiomux = { 0, 1, 2, 3 },
463 .gpiomute = 4, 463 .gpiomute = 4,
464 .needs_tvaudio = 1, 464 .needs_tvaudio = 1,
@@ -472,7 +472,7 @@ struct tvcard bttv_tvcards[] = {
472 /* .audio_inputs= 1, */ 472 /* .audio_inputs= 1, */
473 .svhs = 2, 473 .svhs = 2,
474 .gpiomask = 0x3014f, 474 .gpiomask = 0x3014f,
475 .muxsel = { 2, 3, 1, 1 }, 475 .muxsel = MUXSEL(2, 3, 1, 1),
476 .gpiomux = { 0x20001,0x10001, 0, 0 }, 476 .gpiomux = { 0x20001,0x10001, 0, 0 },
477 .gpiomute = 10, 477 .gpiomute = 10,
478 .needs_tvaudio = 1, 478 .needs_tvaudio = 1,
@@ -487,7 +487,7 @@ struct tvcard bttv_tvcards[] = {
487 /* .audio_inputs= 1, */ 487 /* .audio_inputs= 1, */
488 .svhs = 2, 488 .svhs = 2,
489 .gpiomask = 15, 489 .gpiomask = 15,
490 .muxsel = { 2, 3, 1, 1 }, 490 .muxsel = MUXSEL(2, 3, 1, 1),
491 .gpiomux = { 13, 14, 11, 7 }, 491 .gpiomux = { 13, 14, 11, 7 },
492 .needs_tvaudio = 1, 492 .needs_tvaudio = 1,
493 .tuner_type = UNSET, 493 .tuner_type = UNSET,
@@ -499,7 +499,7 @@ struct tvcard bttv_tvcards[] = {
499 /* .audio_inputs= 4, */ 499 /* .audio_inputs= 4, */
500 .svhs = 2, 500 .svhs = 2,
501 .gpiomask = 15, 501 .gpiomask = 15,
502 .muxsel = { 2, 3, 1, 1 }, 502 .muxsel = MUXSEL(2, 3, 1, 1),
503 .gpiomux = { 13, 14, 11, 7 }, 503 .gpiomux = { 13, 14, 11, 7 },
504 .needs_tvaudio = 1, 504 .needs_tvaudio = 1,
505 .msp34xx_alt = 1, 505 .msp34xx_alt = 1,
@@ -515,7 +515,7 @@ struct tvcard bttv_tvcards[] = {
515 /* .audio_inputs= 1, */ 515 /* .audio_inputs= 1, */
516 .svhs = 2, 516 .svhs = 2,
517 .gpiomask = 7, 517 .gpiomask = 7,
518 .muxsel = { 2, 3, 1, 1 }, 518 .muxsel = MUXSEL(2, 3, 1, 1),
519 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */ 519 .gpiomux = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
520 .gpiomute = 4, 520 .gpiomute = 4,
521 .needs_tvaudio = 1, 521 .needs_tvaudio = 1,
@@ -529,7 +529,7 @@ struct tvcard bttv_tvcards[] = {
529 /* .audio_inputs= 1, */ 529 /* .audio_inputs= 1, */
530 .svhs = 2, 530 .svhs = 2,
531 .gpiomask = 15, 531 .gpiomask = 15,
532 .muxsel = { 2, 3, 1, 1 }, 532 .muxsel = MUXSEL(2, 3, 1, 1),
533 .gpiomux = { 0, 0, 1, 0 }, 533 .gpiomux = { 0, 0, 1, 0 },
534 .gpiomute = 10, 534 .gpiomute = 10,
535 .needs_tvaudio = 1, 535 .needs_tvaudio = 1,
@@ -544,7 +544,7 @@ struct tvcard bttv_tvcards[] = {
544 /* .audio_inputs= 1, */ 544 /* .audio_inputs= 1, */
545 .svhs = 2, 545 .svhs = 2,
546 .gpiomask = 0x01fe00, 546 .gpiomask = 0x01fe00,
547 .muxsel = { 2, 3, 1, 1 }, 547 .muxsel = MUXSEL(2, 3, 1, 1),
548 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */ 548 /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
549 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, 549 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
550 .gpiomute = 0x002000, 550 .gpiomute = 0x002000,
@@ -559,7 +559,7 @@ struct tvcard bttv_tvcards[] = {
559 /* .audio_inputs= 1, */ 559 /* .audio_inputs= 1, */
560 .svhs = 2, 560 .svhs = 2,
561 .gpiomask = 0x8300f8, 561 .gpiomask = 0x8300f8,
562 .muxsel = { 2, 3, 1, 1,0 }, 562 .muxsel = MUXSEL(2, 3, 1, 1, 0),
563 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 }, 563 .gpiomux = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
564 .gpiomute = 0xcfa007, 564 .gpiomute = 0xcfa007,
565 .needs_tvaudio = 1, 565 .needs_tvaudio = 1,
@@ -574,7 +574,7 @@ struct tvcard bttv_tvcards[] = {
574 /* .audio_inputs= 2, */ 574 /* .audio_inputs= 2, */
575 .svhs = 2, 575 .svhs = 2,
576 .gpiomask = 0, 576 .gpiomask = 0,
577 .muxsel = { 2, 3, 1, 1 }, 577 .muxsel = MUXSEL(2, 3, 1, 1),
578 .gpiomux = { 1, 0, 0, 0 }, 578 .gpiomux = { 1, 0, 0, 0 },
579 .needs_tvaudio = 1, 579 .needs_tvaudio = 1,
580 .tuner_type = UNSET, 580 .tuner_type = UNSET,
@@ -586,7 +586,7 @@ struct tvcard bttv_tvcards[] = {
586 /* .audio_inputs= 1, */ 586 /* .audio_inputs= 1, */
587 .svhs = NO_SVHS, 587 .svhs = NO_SVHS,
588 .gpiomask = 0x8dff00, 588 .gpiomask = 0x8dff00,
589 .muxsel = { 2, 3, 1, 1 }, 589 .muxsel = MUXSEL(2, 3, 1, 1),
590 .gpiomux = { 0 }, 590 .gpiomux = { 0 },
591 .no_msp34xx = 1, 591 .no_msp34xx = 1,
592 .tuner_type = TUNER_ABSENT, 592 .tuner_type = TUNER_ABSENT,
@@ -599,7 +599,7 @@ struct tvcard bttv_tvcards[] = {
599 .video_inputs = 3, 599 .video_inputs = 3,
600 /* .audio_inputs= 3, */ 600 /* .audio_inputs= 3, */
601 .svhs = 2, 601 .svhs = 2,
602 .muxsel = { 2, 3, 1, 1 }, 602 .muxsel = MUXSEL(2, 3, 1, 1),
603 .tuner_type = UNSET, 603 .tuner_type = UNSET,
604 .tuner_addr = ADDR_UNSET, 604 .tuner_addr = ADDR_UNSET,
605 }, 605 },
@@ -609,7 +609,7 @@ struct tvcard bttv_tvcards[] = {
609 /* .audio_inputs= 2, tuner, line in */ 609 /* .audio_inputs= 2, tuner, line in */
610 .svhs = 2, 610 .svhs = 2,
611 .gpiomask = 0x1800, 611 .gpiomask = 0x1800,
612 .muxsel = { 2, 3, 1, 1 }, 612 .muxsel = MUXSEL(2, 3, 1, 1),
613 .gpiomux = { 0, 0x800, 0x1000, 0x1000 }, 613 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
614 .gpiomute = 0x1800, 614 .gpiomute = 0x1800,
615 .pll = PLL_28, 615 .pll = PLL_28,
@@ -622,7 +622,7 @@ struct tvcard bttv_tvcards[] = {
622 /* .audio_inputs= 1, */ 622 /* .audio_inputs= 1, */
623 .svhs = 2, 623 .svhs = 2,
624 .gpiomask = 0xc00, 624 .gpiomask = 0xc00,
625 .muxsel = { 2, 3, 1, 1 }, 625 .muxsel = MUXSEL(2, 3, 1, 1),
626 .gpiomux = { 0, 1, 0x800, 0x400 }, 626 .gpiomux = { 0, 1, 0x800, 0x400 },
627 .gpiomute = 0xc00, 627 .gpiomute = 0xc00,
628 .needs_tvaudio = 1, 628 .needs_tvaudio = 1,
@@ -637,7 +637,7 @@ struct tvcard bttv_tvcards[] = {
637 .svhs = NO_SVHS, 637 .svhs = NO_SVHS,
638 .has_dig_in = 1, 638 .has_dig_in = 1,
639 .gpiomask = 7, 639 .gpiomask = 7,
640 .muxsel = { 2, 3, 0 }, /* input 2 is digital */ 640 .muxsel = MUXSEL(2, 3, 0), /* input 2 is digital */
641 /* .digital_mode= DIGITAL_MODE_CAMERA, */ 641 /* .digital_mode= DIGITAL_MODE_CAMERA, */
642 .gpiomux = { 0, 0, 0, 0 }, 642 .gpiomux = { 0, 0, 0, 0 },
643 .no_msp34xx = 1, 643 .no_msp34xx = 1,
@@ -653,7 +653,7 @@ struct tvcard bttv_tvcards[] = {
653 /* .audio_inputs= 1, */ 653 /* .audio_inputs= 1, */
654 .svhs = 2, 654 .svhs = 2,
655 .gpiomask = 0xe00, 655 .gpiomask = 0xe00,
656 .muxsel = { 2, 3, 1, 1 }, 656 .muxsel = MUXSEL(2, 3, 1, 1),
657 .gpiomux = {0x400, 0x400, 0x400, 0x400 }, 657 .gpiomux = {0x400, 0x400, 0x400, 0x400 },
658 .gpiomute = 0xc00, 658 .gpiomute = 0xc00,
659 .needs_tvaudio = 1, 659 .needs_tvaudio = 1,
@@ -668,7 +668,7 @@ struct tvcard bttv_tvcards[] = {
668 /* .audio_inputs= 1, */ 668 /* .audio_inputs= 1, */
669 .svhs = 2, 669 .svhs = 2,
670 .gpiomask = 0x1f0fff, 670 .gpiomask = 0x1f0fff,
671 .muxsel = { 2, 3, 1, 1 }, 671 .muxsel = MUXSEL(2, 3, 1, 1),
672 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, 672 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
673 .gpiomute = 0x40000, 673 .gpiomute = 0x40000,
674 .needs_tvaudio = 0, 674 .needs_tvaudio = 0,
@@ -682,7 +682,7 @@ struct tvcard bttv_tvcards[] = {
682 /* .audio_inputs= 1, */ 682 /* .audio_inputs= 1, */
683 .svhs = 3, 683 .svhs = 3,
684 .gpiomask = 7, 684 .gpiomask = 7,
685 .muxsel = { 2, 0, 1, 1 }, 685 .muxsel = MUXSEL(2, 0, 1, 1),
686 .gpiomux = { 0, 1, 2, 3 }, 686 .gpiomux = { 0, 1, 2, 3 },
687 .gpiomute = 4, 687 .gpiomute = 4,
688 .needs_tvaudio = 1, 688 .needs_tvaudio = 1,
@@ -695,7 +695,7 @@ struct tvcard bttv_tvcards[] = {
695 /* .audio_inputs= 2, */ 695 /* .audio_inputs= 2, */
696 .svhs = 2, 696 .svhs = 2,
697 .gpiomask = 0x1800, 697 .gpiomask = 0x1800,
698 .muxsel = { 2, 3, 1, 1 }, 698 .muxsel = MUXSEL(2, 3, 1, 1),
699 .gpiomux = { 0, 0x800, 0x1000, 0x1000 }, 699 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
700 .gpiomute = 0x1800, 700 .gpiomute = 0x1800,
701 .pll = PLL_28, 701 .pll = PLL_28,
@@ -710,7 +710,7 @@ struct tvcard bttv_tvcards[] = {
710 /* .audio_inputs= 1, */ 710 /* .audio_inputs= 1, */
711 .svhs = 2, 711 .svhs = 2,
712 .gpiomask = 0x1f0fff, 712 .gpiomask = 0x1f0fff,
713 .muxsel = { 2, 3, 1, 1 }, 713 .muxsel = MUXSEL(2, 3, 1, 1),
714 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 }, 714 .gpiomux = { 0x20000, 0x30000, 0x10000, 0x00000 },
715 .gpiomute = 0x40000, 715 .gpiomute = 0x40000,
716 .needs_tvaudio = 0, 716 .needs_tvaudio = 0,
@@ -756,7 +756,7 @@ struct tvcard bttv_tvcards[] = {
756 /* .audio_inputs= 1, */ 756 /* .audio_inputs= 1, */
757 .svhs = 1, /* was: 4 */ 757 .svhs = 1, /* was: 4 */
758 .gpiomask = 0, 758 .gpiomask = 0,
759 .muxsel = { 2, 3, 1, 0, 0}, 759 .muxsel = MUXSEL(2, 3, 1, 0, 0),
760 .gpiomux = { 0 }, 760 .gpiomux = { 0 },
761 .needs_tvaudio = 1, 761 .needs_tvaudio = 1,
762 .tuner_type = TUNER_ABSENT, 762 .tuner_type = TUNER_ABSENT,
@@ -770,7 +770,7 @@ struct tvcard bttv_tvcards[] = {
770 /* .audio_inputs= 1, */ 770 /* .audio_inputs= 1, */
771 .svhs = 2, 771 .svhs = 2,
772 .gpiomask = 0x1800, /* 0x8dfe00 */ 772 .gpiomask = 0x1800, /* 0x8dfe00 */
773 .muxsel = { 2, 3, 1, 1 }, 773 .muxsel = MUXSEL(2, 3, 1, 1),
774 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 }, 774 .gpiomux = { 0, 0x0800, 0x1000, 0x1000 },
775 .gpiomute = 0x1800, 775 .gpiomute = 0x1800,
776 .pll = PLL_28, 776 .pll = PLL_28,
@@ -783,7 +783,7 @@ struct tvcard bttv_tvcards[] = {
783 /* .audio_inputs= 1, */ 783 /* .audio_inputs= 1, */
784 .svhs = 3, 784 .svhs = 3,
785 .gpiomask = 1, 785 .gpiomask = 1,
786 .muxsel = { 2, 3, 1, 1 }, 786 .muxsel = MUXSEL(2, 3, 1, 1),
787 .gpiomux = { 1, 0, 0, 0 }, 787 .gpiomux = { 1, 0, 0, 0 },
788 .pll = PLL_28, 788 .pll = PLL_28,
789 .tuner_type = TUNER_PHILIPS_PAL, 789 .tuner_type = TUNER_PHILIPS_PAL,
@@ -797,7 +797,7 @@ struct tvcard bttv_tvcards[] = {
797 /* .audio_inputs= 0, */ 797 /* .audio_inputs= 0, */
798 .svhs = 2, 798 .svhs = 2,
799 .gpiomask = 0, 799 .gpiomask = 0,
800 .muxsel = { 2, 3, 1, 1 }, 800 .muxsel = MUXSEL(2, 3, 1, 1),
801 .gpiomux = { 0 }, 801 .gpiomux = { 0 },
802 .needs_tvaudio = 0, 802 .needs_tvaudio = 0,
803 .tuner_type = TUNER_ABSENT, 803 .tuner_type = TUNER_ABSENT,
@@ -809,7 +809,7 @@ struct tvcard bttv_tvcards[] = {
809 /* .audio_inputs= 1, */ 809 /* .audio_inputs= 1, */
810 .svhs = 2, 810 .svhs = 2,
811 .gpiomask = 0xffff00, 811 .gpiomask = 0xffff00,
812 .muxsel = { 2, 3, 1, 1 }, 812 .muxsel = MUXSEL(2, 3, 1, 1),
813 .gpiomux = { 0x500, 0, 0x300, 0x900 }, 813 .gpiomux = { 0x500, 0, 0x300, 0x900 },
814 .gpiomute = 0x900, 814 .gpiomute = 0x900,
815 .needs_tvaudio = 1, 815 .needs_tvaudio = 1,
@@ -822,7 +822,8 @@ struct tvcard bttv_tvcards[] = {
822 .video_inputs = 4, 822 .video_inputs = 4,
823 /* .audio_inputs= 1, */ 823 /* .audio_inputs= 1, */
824 .svhs = 2, 824 .svhs = 2,
825 .muxsel = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */ 825 /* TV, CVid, SVid, CVid over SVid connector */
826 .muxsel = MUXSEL(2, 3, 1, 1, 0),
826 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */ 827 /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
827 .gpiomask = 0xb33000, 828 .gpiomask = 0xb33000,
828 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 }, 829 .gpiomux = { 0x122000,0x1000,0x0000,0x620000 },
@@ -852,7 +853,7 @@ struct tvcard bttv_tvcards[] = {
852 /* .audio_inputs= 3, */ 853 /* .audio_inputs= 3, */
853 .svhs = 2, 854 .svhs = 2,
854 .gpiomask = 0x1800, 855 .gpiomask = 0x1800,
855 .muxsel = { 2, 3, 1, 1 }, 856 .muxsel = MUXSEL(2, 3, 1, 1),
856 .gpiomux = { 0, 0x800, 0x1000, 0x1000 }, 857 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
857 .gpiomute = 0x1800, 858 .gpiomute = 0x1800,
858 .pll = PLL_28, 859 .pll = PLL_28,
@@ -867,7 +868,7 @@ struct tvcard bttv_tvcards[] = {
867 /* .audio_inputs= 3, */ 868 /* .audio_inputs= 3, */
868 .svhs = 2, 869 .svhs = 2,
869 .gpiomask = 0x1800, 870 .gpiomask = 0x1800,
870 .muxsel = { 2, 3, 1, 1 }, 871 .muxsel = MUXSEL(2, 3, 1, 1),
871 .gpiomux = { 0, 0x800, 0x1000, 0x1000 }, 872 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
872 .gpiomute = 0x1800, 873 .gpiomute = 0x1800,
873 .pll = PLL_28, 874 .pll = PLL_28,
@@ -881,7 +882,7 @@ struct tvcard bttv_tvcards[] = {
881 /* .audio_inputs= 1, */ 882 /* .audio_inputs= 1, */
882 .svhs = 2, 883 .svhs = 2,
883 .gpiomask = 0xff, 884 .gpiomask = 0xff,
884 .muxsel = { 2, 3, 1, 1 }, 885 .muxsel = MUXSEL(2, 3, 1, 1),
885 .gpiomux = { 0x21, 0x20, 0x24, 0x2c }, 886 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
886 .gpiomute = 0x29, 887 .gpiomute = 0x29,
887 .no_msp34xx = 1, 888 .no_msp34xx = 1,
@@ -895,7 +896,7 @@ struct tvcard bttv_tvcards[] = {
895 /* .audio_inputs= 1, */ 896 /* .audio_inputs= 1, */
896 .svhs = 2, 897 .svhs = 2,
897 .gpiomask = 0x551e00, 898 .gpiomask = 0x551e00,
898 .muxsel = { 2, 3, 1, 0 }, 899 .muxsel = MUXSEL(2, 3, 1, 0),
899 .gpiomux = { 0x551400, 0x551200, 0, 0 }, 900 .gpiomux = { 0x551400, 0x551200, 0, 0 },
900 .gpiomute = 0x551c00, 901 .gpiomute = 0x551c00,
901 .needs_tvaudio = 1, 902 .needs_tvaudio = 1,
@@ -910,7 +911,7 @@ struct tvcard bttv_tvcards[] = {
910 /* .audio_inputs= 1, */ 911 /* .audio_inputs= 1, */
911 .svhs = 2, 912 .svhs = 2,
912 .gpiomask = 0x03000F, 913 .gpiomask = 0x03000F,
913 .muxsel = { 2, 3, 1, 1 }, 914 .muxsel = MUXSEL(2, 3, 1, 1),
914 .gpiomux = { 2, 0xd0001, 0, 0 }, 915 .gpiomux = { 2, 0xd0001, 0, 0 },
915 .gpiomute = 1, 916 .gpiomute = 1,
916 .needs_tvaudio = 0, 917 .needs_tvaudio = 0,
@@ -926,7 +927,7 @@ struct tvcard bttv_tvcards[] = {
926 /* .audio_inputs= 1, */ 927 /* .audio_inputs= 1, */
927 .svhs = 2, 928 .svhs = 2,
928 .gpiomask = 7, 929 .gpiomask = 7,
929 .muxsel = { 2, 3, 1, 1 }, 930 .muxsel = MUXSEL(2, 3, 1, 1),
930 .gpiomux = { 4, 0, 2, 3 }, 931 .gpiomux = { 4, 0, 2, 3 },
931 .gpiomute = 1, 932 .gpiomute = 1,
932 .no_msp34xx = 1, 933 .no_msp34xx = 1,
@@ -942,7 +943,7 @@ struct tvcard bttv_tvcards[] = {
942 /* .audio_inputs= 4, */ 943 /* .audio_inputs= 4, */
943 .svhs = 2, 944 .svhs = 2,
944 .gpiomask = 15, 945 .gpiomask = 15,
945 .muxsel = { 2, 3, 1, 1 }, 946 .muxsel = MUXSEL(2, 3, 1, 1),
946 .gpiomux = { 13, 4, 11, 7 }, 947 .gpiomux = { 13, 4, 11, 7 },
947 .needs_tvaudio = 1, 948 .needs_tvaudio = 1,
948 .pll = PLL_28, 949 .pll = PLL_28,
@@ -957,7 +958,7 @@ struct tvcard bttv_tvcards[] = {
957 /* .audio_inputs= 1, */ 958 /* .audio_inputs= 1, */
958 .svhs = 2, 959 .svhs = 2,
959 .gpiomask = 0, 960 .gpiomask = 0,
960 .muxsel = { 2, 3, 1, 1}, 961 .muxsel = MUXSEL(2, 3, 1, 1),
961 .gpiomux = { 0, 0, 0, 0}, 962 .gpiomux = { 0, 0, 0, 0},
962 .needs_tvaudio = 1, 963 .needs_tvaudio = 1,
963 .no_msp34xx = 1, 964 .no_msp34xx = 1,
@@ -971,7 +972,7 @@ struct tvcard bttv_tvcards[] = {
971 /* .audio_inputs= 1, */ 972 /* .audio_inputs= 1, */
972 .svhs = 2, 973 .svhs = 2,
973 .gpiomask = 0xe00b, 974 .gpiomask = 0xe00b,
974 .muxsel = { 2, 3, 1, 1 }, 975 .muxsel = MUXSEL(2, 3, 1, 1),
975 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 }, 976 .gpiomux = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
976 .gpiomute = 0xff3ffc, 977 .gpiomute = 0xff3ffc,
977 .no_msp34xx = 1, 978 .no_msp34xx = 1,
@@ -986,7 +987,7 @@ struct tvcard bttv_tvcards[] = {
986 /* .audio_inputs= 1, */ 987 /* .audio_inputs= 1, */
987 .svhs = NO_SVHS, 988 .svhs = NO_SVHS,
988 .gpiomask = 3, 989 .gpiomask = 3,
989 .muxsel = { 2, 3, 1, 1 }, 990 .muxsel = MUXSEL(2, 3, 1, 1),
990 .gpiomux = { 1, 1, 0, 2 }, 991 .gpiomux = { 1, 1, 0, 2 },
991 .gpiomute = 3, 992 .gpiomute = 3,
992 .no_msp34xx = 1, 993 .no_msp34xx = 1,
@@ -1000,7 +1001,7 @@ struct tvcard bttv_tvcards[] = {
1000 /* .audio_inputs= 1, */ 1001 /* .audio_inputs= 1, */
1001 .svhs = 3, 1002 .svhs = 3,
1002 .gpiomask = 0, 1003 .gpiomask = 0,
1003 .muxsel = { 2, 3, 1, 0, 0 }, 1004 .muxsel = MUXSEL(2, 3, 1, 0, 0),
1004 .gpiomux = { 0 }, 1005 .gpiomux = { 0 },
1005 .no_msp34xx = 1, 1006 .no_msp34xx = 1,
1006 .pll = PLL_28, 1007 .pll = PLL_28,
@@ -1013,7 +1014,7 @@ struct tvcard bttv_tvcards[] = {
1013 /* .audio_inputs= 1, */ 1014 /* .audio_inputs= 1, */
1014 .svhs = 2, 1015 .svhs = 2,
1015 .gpiomask = 0xbcf03f, 1016 .gpiomask = 0xbcf03f,
1016 .muxsel = { 2, 3, 1, 1 }, 1017 .muxsel = MUXSEL(2, 3, 1, 1),
1017 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 }, 1018 .gpiomux = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
1018 .gpiomute = 0xbcb03f, 1019 .gpiomute = 0xbcb03f,
1019 .no_msp34xx = 1, 1020 .no_msp34xx = 1,
@@ -1027,7 +1028,7 @@ struct tvcard bttv_tvcards[] = {
1027 /* .audio_inputs= 1, */ 1028 /* .audio_inputs= 1, */
1028 .svhs = 2, 1029 .svhs = 2,
1029 .gpiomask = 0x70000, 1030 .gpiomask = 0x70000,
1030 .muxsel = { 2, 3, 1, 1 }, 1031 .muxsel = MUXSEL(2, 3, 1, 1),
1031 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 }, 1032 .gpiomux = { 0x20000, 0x30000, 0x10000, 0 },
1032 .gpiomute = 0x40000, 1033 .gpiomute = 0x40000,
1033 .needs_tvaudio = 1, 1034 .needs_tvaudio = 1,
@@ -1045,7 +1046,7 @@ struct tvcard bttv_tvcards[] = {
1045 /* .audio_inputs= 1, */ 1046 /* .audio_inputs= 1, */
1046 .svhs = 2, 1047 .svhs = 2,
1047 .gpiomask = 15, 1048 .gpiomask = 15,
1048 .muxsel = { 2, 3, 1, 1 }, 1049 .muxsel = MUXSEL(2, 3, 1, 1),
1049 .gpiomux = {2,0,0,0 }, 1050 .gpiomux = {2,0,0,0 },
1050 .gpiomute = 1, 1051 .gpiomute = 1,
1051 .needs_tvaudio = 1, 1052 .needs_tvaudio = 1,
@@ -1059,7 +1060,7 @@ struct tvcard bttv_tvcards[] = {
1059 /* .audio_inputs= 1, */ 1060 /* .audio_inputs= 1, */
1060 .svhs = 2, 1061 .svhs = 2,
1061 .gpiomask = 0x010f00, 1062 .gpiomask = 0x010f00,
1062 .muxsel = {2, 3, 0, 0 }, 1063 .muxsel = MUXSEL(2, 3, 0, 0),
1063 .gpiomux = {0x10000, 0, 0x10000, 0 }, 1064 .gpiomux = {0x10000, 0, 0x10000, 0 },
1064 .no_msp34xx = 1, 1065 .no_msp34xx = 1,
1065 .pll = PLL_28, 1066 .pll = PLL_28,
@@ -1074,7 +1075,7 @@ struct tvcard bttv_tvcards[] = {
1074 .svhs = 3, 1075 .svhs = 3,
1075 .has_dig_in = 1, 1076 .has_dig_in = 1,
1076 .gpiomask = 0xAA0000, 1077 .gpiomask = 0xAA0000,
1077 .muxsel = { 2, 3, 1, 1, 0 }, /* input 4 is digital */ 1078 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
1078 /* .digital_mode= DIGITAL_MODE_CAMERA, */ 1079 /* .digital_mode= DIGITAL_MODE_CAMERA, */
1079 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 }, 1080 .gpiomux = { 0x20000, 0, 0x80000, 0x80000 },
1080 .gpiomute = 0xa8000, 1081 .gpiomute = 0xa8000,
@@ -1099,7 +1100,7 @@ struct tvcard bttv_tvcards[] = {
1099 /* .audio_inputs= 1, */ 1100 /* .audio_inputs= 1, */
1100 .svhs = 2, 1101 .svhs = 2,
1101 .gpiomask = 7, 1102 .gpiomask = 7,
1102 .muxsel = { 2, 0, 1, 1 }, 1103 .muxsel = MUXSEL(2, 0, 1, 1),
1103 .gpiomux = { 0, 1, 2, 3 }, 1104 .gpiomux = { 0, 1, 2, 3 },
1104 .gpiomute = 4, 1105 .gpiomute = 4,
1105 .pll = PLL_28, 1106 .pll = PLL_28,
@@ -1115,7 +1116,7 @@ struct tvcard bttv_tvcards[] = {
1115 /* .audio_inputs= 1, */ 1116 /* .audio_inputs= 1, */
1116 .svhs = 3, 1117 .svhs = 3,
1117 .gpiomask = 0x03000F, 1118 .gpiomask = 0x03000F,
1118 .muxsel = { 2, 3, 1, 1 }, 1119 .muxsel = MUXSEL(2, 3, 1, 1),
1119 .gpiomux = { 1, 0xd0001, 0, 0 }, 1120 .gpiomux = { 1, 0xd0001, 0, 0 },
1120 .gpiomute = 10, 1121 .gpiomute = 10,
1121 /* sound path (5 sources): 1122 /* sound path (5 sources):
@@ -1140,7 +1141,7 @@ struct tvcard bttv_tvcards[] = {
1140 /* .audio_inputs= 3, */ 1141 /* .audio_inputs= 3, */
1141 .svhs = 2, 1142 .svhs = 2,
1142 .gpiomask = 0x1c, 1143 .gpiomask = 0x1c,
1143 .muxsel = { 2, 3, 1, 1 }, 1144 .muxsel = MUXSEL(2, 3, 1, 1),
1144 .gpiomux = { 0, 0, 0x10, 8 }, 1145 .gpiomux = { 0, 0, 0x10, 8 },
1145 .gpiomute = 4, 1146 .gpiomute = 4,
1146 .needs_tvaudio = 1, 1147 .needs_tvaudio = 1,
@@ -1160,7 +1161,7 @@ struct tvcard bttv_tvcards[] = {
1160 /* .audio_inputs= 1, */ 1161 /* .audio_inputs= 1, */
1161 .svhs = 2, 1162 .svhs = 2,
1162 .gpiomask = 0x18e0, 1163 .gpiomask = 0x18e0,
1163 .muxsel = { 2, 3, 1, 1 }, 1164 .muxsel = MUXSEL(2, 3, 1, 1),
1164 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 }, 1165 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1165 .gpiomute = 0x18e0, 1166 .gpiomute = 0x18e0,
1166 /* For cards with tda9820/tda9821: 1167 /* For cards with tda9820/tda9821:
@@ -1179,7 +1180,7 @@ struct tvcard bttv_tvcards[] = {
1179 /* .audio_inputs= 1, */ 1180 /* .audio_inputs= 1, */
1180 .svhs = 2, 1181 .svhs = 2,
1181 .gpiomask = 0xF, 1182 .gpiomask = 0xF,
1182 .muxsel = { 2, 3, 1, 0 }, 1183 .muxsel = MUXSEL(2, 3, 1, 0),
1183 .gpiomux = { 2, 0, 0, 0 }, 1184 .gpiomux = { 2, 0, 0, 0 },
1184 .gpiomute = 10, 1185 .gpiomute = 10,
1185 .needs_tvaudio = 0, 1186 .needs_tvaudio = 0,
@@ -1196,7 +1197,7 @@ struct tvcard bttv_tvcards[] = {
1196 /* .audio_inputs= 3, */ 1197 /* .audio_inputs= 3, */
1197 .svhs = 2, 1198 .svhs = 2,
1198 .gpiomask = 0x1800, 1199 .gpiomask = 0x1800,
1199 .muxsel = { 2, 3, 1, 1 }, 1200 .muxsel = MUXSEL(2, 3, 1, 1),
1200 .gpiomux = { 0, 0x800, 0x1000, 0x1000 }, 1201 .gpiomux = { 0, 0x800, 0x1000, 0x1000 },
1201 .gpiomute = 0x1800, 1202 .gpiomute = 0x1800,
1202 .pll = PLL_28, 1203 .pll = PLL_28,
@@ -1212,7 +1213,7 @@ struct tvcard bttv_tvcards[] = {
1212 /* .audio_inputs= 0, */ 1213 /* .audio_inputs= 0, */
1213 .svhs = 1, 1214 .svhs = 1,
1214 .gpiomask = 0, 1215 .gpiomask = 0,
1215 .muxsel = { 3, 1 }, 1216 .muxsel = MUXSEL(3, 1),
1216 .gpiomux = { 0 }, 1217 .gpiomux = { 0 },
1217 .needs_tvaudio = 0, 1218 .needs_tvaudio = 0,
1218 .no_msp34xx = 1, 1219 .no_msp34xx = 1,
@@ -1227,7 +1228,7 @@ struct tvcard bttv_tvcards[] = {
1227 /* .audio_inputs= 1, */ 1228 /* .audio_inputs= 1, */
1228 .svhs = 2, 1229 .svhs = 2,
1229 .gpiomask = 0xe00, 1230 .gpiomask = 0xe00,
1230 .muxsel = { 2, 3, 1, 1}, 1231 .muxsel = MUXSEL(2, 3, 1, 1),
1231 .gpiomux = { 0x400, 0x400, 0x400, 0x400 }, 1232 .gpiomux = { 0x400, 0x400, 0x400, 0x400 },
1232 .gpiomute = 0x800, 1233 .gpiomute = 0x800,
1233 .needs_tvaudio = 1, 1234 .needs_tvaudio = 1,
@@ -1242,7 +1243,7 @@ struct tvcard bttv_tvcards[] = {
1242 /* .audio_inputs= 1, */ 1243 /* .audio_inputs= 1, */
1243 .svhs = 2, 1244 .svhs = 2,
1244 .gpiomask = 0x03000F, 1245 .gpiomask = 0x03000F,
1245 .muxsel = { 2, 3, 1, 0 }, 1246 .muxsel = MUXSEL(2, 3, 1, 0),
1246 .gpiomux = { 2, 0, 0, 0 }, 1247 .gpiomux = { 2, 0, 0, 0 },
1247 .gpiomute = 1, 1248 .gpiomute = 1,
1248 .pll = PLL_28, 1249 .pll = PLL_28,
@@ -1258,7 +1259,7 @@ struct tvcard bttv_tvcards[] = {
1258 /* .audio_inputs= 2, */ 1259 /* .audio_inputs= 2, */
1259 .svhs = NO_SVHS, 1260 .svhs = NO_SVHS,
1260 .gpiomask = 11, 1261 .gpiomask = 11,
1261 .muxsel = { 2, 3, 1, 1 }, 1262 .muxsel = MUXSEL(2, 3, 1, 1),
1262 .gpiomux = { 2, 0, 0, 1 }, 1263 .gpiomux = { 2, 0, 0, 1 },
1263 .gpiomute = 8, 1264 .gpiomute = 8,
1264 .pll = PLL_35, 1265 .pll = PLL_35,
@@ -1272,7 +1273,7 @@ struct tvcard bttv_tvcards[] = {
1272 /* .audio_inputs= 0, */ 1273 /* .audio_inputs= 0, */
1273 .svhs = 1, 1274 .svhs = 1,
1274 .gpiomask = 0xF, 1275 .gpiomask = 0xF,
1275 .muxsel = { 2, 2 }, 1276 .muxsel = MUXSEL(2, 2),
1276 .gpiomux = { }, 1277 .gpiomux = { },
1277 .no_msp34xx = 1, 1278 .no_msp34xx = 1,
1278 .needs_tvaudio = 0, 1279 .needs_tvaudio = 0,
@@ -1289,7 +1290,7 @@ struct tvcard bttv_tvcards[] = {
1289 /* .audio_inputs= 2, */ 1290 /* .audio_inputs= 2, */
1290 .svhs = 2, 1291 .svhs = 2,
1291 .gpiomask = 0xFF, 1292 .gpiomask = 0xFF,
1292 .muxsel = { 2, 3, 1, 0 }, 1293 .muxsel = MUXSEL(2, 3, 1, 0),
1293 .gpiomux = { 1, 0, 4, 4 }, 1294 .gpiomux = { 1, 0, 4, 4 },
1294 .gpiomute = 9, 1295 .gpiomute = 9,
1295 .needs_tvaudio = 0, 1296 .needs_tvaudio = 0,
@@ -1304,7 +1305,7 @@ struct tvcard bttv_tvcards[] = {
1304 /* .audio_inputs= 1, */ 1305 /* .audio_inputs= 1, */
1305 .svhs = 2, 1306 .svhs = 2,
1306 .gpiomask = 0xf03f, 1307 .gpiomask = 0xf03f,
1307 .muxsel = { 2, 3, 1, 0 }, 1308 .muxsel = MUXSEL(2, 3, 1, 0),
1308 .gpiomux = { 0xbffe, 0, 0xbfff, 0 }, 1309 .gpiomux = { 0xbffe, 0, 0xbfff, 0 },
1309 .gpiomute = 0xbffe, 1310 .gpiomute = 0xbffe,
1310 .pll = PLL_28, 1311 .pll = PLL_28,
@@ -1320,7 +1321,7 @@ struct tvcard bttv_tvcards[] = {
1320 /* .audio_inputs= 1, */ 1321 /* .audio_inputs= 1, */
1321 .svhs = NO_SVHS, 1322 .svhs = NO_SVHS,
1322 .gpiomask = 1, 1323 .gpiomask = 1,
1323 .muxsel = { 2, 3, 0, 1 }, 1324 .muxsel = MUXSEL(2, 3, 0, 1),
1324 .gpiomux = { 0, 0, 1, 0 }, 1325 .gpiomux = { 0, 0, 1, 0 },
1325 .no_msp34xx = 1, 1326 .no_msp34xx = 1,
1326 .pll = PLL_28, 1327 .pll = PLL_28,
@@ -1334,7 +1335,7 @@ struct tvcard bttv_tvcards[] = {
1334 /* .audio_inputs= 3, */ 1335 /* .audio_inputs= 3, */
1335 .svhs = 2, 1336 .svhs = 2,
1336 .gpiomask = 0x18e0, 1337 .gpiomask = 0x18e0,
1337 .muxsel = { 2, 3, 0, 1 }, 1338 .muxsel = MUXSEL(2, 3, 0, 1),
1338 /* Radio changed from 1e80 to 0x800 to make 1339 /* Radio changed from 1e80 to 0x800 to make
1339 FlyVideo2000S in .hu happy (gm)*/ 1340 FlyVideo2000S in .hu happy (gm)*/
1340 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */ 1341 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
@@ -1354,7 +1355,7 @@ struct tvcard bttv_tvcards[] = {
1354 /* .audio_inputs= 1, */ 1355 /* .audio_inputs= 1, */
1355 .svhs = 2, 1356 .svhs = 2,
1356 .gpiomask = 0xffff00, 1357 .gpiomask = 0xffff00,
1357 .muxsel = { 2, 3, 1, 1 }, 1358 .muxsel = MUXSEL(2, 3, 1, 1),
1358 .gpiomux = { 0x500, 0x500, 0x300, 0x900 }, 1359 .gpiomux = { 0x500, 0x500, 0x300, 0x900 },
1359 .gpiomute = 0x900, 1360 .gpiomute = 0x900,
1360 .needs_tvaudio = 1, 1361 .needs_tvaudio = 1,
@@ -1370,7 +1371,7 @@ struct tvcard bttv_tvcards[] = {
1370 /* .audio_inputs= 1, */ 1371 /* .audio_inputs= 1, */
1371 .svhs = 2, 1372 .svhs = 2,
1372 .gpiomask = 0x010f00, 1373 .gpiomask = 0x010f00,
1373 .muxsel = {2, 3, 0, 0 }, 1374 .muxsel = MUXSEL(2, 3, 0, 0),
1374 .gpiomux = {0x10000, 0, 0x10000, 0 }, 1375 .gpiomux = {0x10000, 0, 0x10000, 0 },
1375 .no_msp34xx = 1, 1376 .no_msp34xx = 1,
1376 .pll = PLL_28, 1377 .pll = PLL_28,
@@ -1394,7 +1395,7 @@ struct tvcard bttv_tvcards[] = {
1394 .gpiomute = 0x947fff, 1395 .gpiomute = 0x947fff,
1395 /* tvtuner, radio, external,internal, mute, stereo 1396 /* tvtuner, radio, external,internal, mute, stereo
1396 * tuner, Composit, SVid, Composit-on-Svid-adapter */ 1397 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1397 .muxsel = { 2, 3 ,0 ,1 }, 1398 .muxsel = MUXSEL(2, 3, 0, 1),
1398 .tuner_type = TUNER_MT2032, 1399 .tuner_type = TUNER_MT2032,
1399 .tuner_addr = ADDR_UNSET, 1400 .tuner_addr = ADDR_UNSET,
1400 .pll = PLL_28, 1401 .pll = PLL_28,
@@ -1414,7 +1415,7 @@ struct tvcard bttv_tvcards[] = {
1414 .gpiomute = 0x947fff, 1415 .gpiomute = 0x947fff,
1415 /* tvtuner, radio, external,internal, mute, stereo 1416 /* tvtuner, radio, external,internal, mute, stereo
1416 * tuner, Composit, SVid, Composit-on-Svid-adapter */ 1417 * tuner, Composit, SVid, Composit-on-Svid-adapter */
1417 .muxsel = { 2, 3 ,0 ,1 }, 1418 .muxsel = MUXSEL(2, 3, 0, 1),
1418 .tuner_type = TUNER_MT2032, 1419 .tuner_type = TUNER_MT2032,
1419 .tuner_addr = ADDR_UNSET, 1420 .tuner_addr = ADDR_UNSET,
1420 .pll = PLL_28, 1421 .pll = PLL_28,
@@ -1428,7 +1429,7 @@ struct tvcard bttv_tvcards[] = {
1428 .tuner_type = TUNER_ABSENT, 1429 .tuner_type = TUNER_ABSENT,
1429 .tuner_addr = ADDR_UNSET, 1430 .tuner_addr = ADDR_UNSET,
1430 .pll = PLL_28, 1431 .pll = PLL_28,
1431 .muxsel = { 2 }, 1432 .muxsel = MUXSEL(2),
1432 .gpiomask = 0 1433 .gpiomask = 0
1433 }, 1434 },
1434 [BTTV_BOARD_PV_BT878P_PLUS] = { 1435 [BTTV_BOARD_PV_BT878P_PLUS] = {
@@ -1438,7 +1439,7 @@ struct tvcard bttv_tvcards[] = {
1438 /* .audio_inputs= 4, */ 1439 /* .audio_inputs= 4, */
1439 .svhs = 2, 1440 .svhs = 2,
1440 .gpiomask = 15, 1441 .gpiomask = 15,
1441 .muxsel = { 2, 3, 1, 1 }, 1442 .muxsel = MUXSEL(2, 3, 1, 1),
1442 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */ 1443 .gpiomux = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
1443 .gpiomute = 13, 1444 .gpiomute = 13,
1444 .needs_tvaudio = 1, 1445 .needs_tvaudio = 1,
@@ -1459,7 +1460,8 @@ struct tvcard bttv_tvcards[] = {
1459 .video_inputs = 4, 1460 .video_inputs = 4,
1460 /* .audio_inputs= 0, */ 1461 /* .audio_inputs= 0, */
1461 .svhs = 2, 1462 .svhs = 2,
1462 .muxsel = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */ 1463 /* AV1, AV2, SVHS, CVid adapter on SVHS */
1464 .muxsel = MUXSEL(2, 3, 1, 1),
1463 .pll = PLL_28, 1465 .pll = PLL_28,
1464 .no_msp34xx = 1, 1466 .no_msp34xx = 1,
1465 .tuner_type = TUNER_ABSENT, 1467 .tuner_type = TUNER_ABSENT,
@@ -1474,7 +1476,7 @@ struct tvcard bttv_tvcards[] = {
1474 /* .audio_inputs= 1, */ 1476 /* .audio_inputs= 1, */
1475 .svhs = 2, 1477 .svhs = 2,
1476 .gpiomask = 0x3f, 1478 .gpiomask = 0x3f,
1477 .muxsel = { 2, 3, 1, 1 }, 1479 .muxsel = MUXSEL(2, 3, 1, 1),
1478 .gpiomux = { 0x01, 0x00, 0x03, 0x03 }, 1480 .gpiomux = { 0x01, 0x00, 0x03, 0x03 },
1479 .gpiomute = 0x09, 1481 .gpiomute = 0x09,
1480 .needs_tvaudio = 1, 1482 .needs_tvaudio = 1,
@@ -1502,7 +1504,7 @@ struct tvcard bttv_tvcards[] = {
1502 /* .audio_inputs= 0, */ 1504 /* .audio_inputs= 0, */
1503 .svhs = 4, 1505 .svhs = 4,
1504 .gpiomask = 0, 1506 .gpiomask = 0,
1505 .muxsel = { 2, 3, 1, 0, 0 }, 1507 .muxsel = MUXSEL(2, 3, 1, 0, 0),
1506 .gpiomux = { 0 }, 1508 .gpiomux = { 0 },
1507 .needs_tvaudio = 0, 1509 .needs_tvaudio = 0,
1508 .tuner_type = TUNER_ABSENT, 1510 .tuner_type = TUNER_ABSENT,
@@ -1516,7 +1518,7 @@ struct tvcard bttv_tvcards[] = {
1516 .svhs = NO_SVHS, 1518 .svhs = NO_SVHS,
1517 .gpiomask = 0x00, 1519 .gpiomask = 0x00,
1518 .gpiomask2 = 0x07ff, 1520 .gpiomask2 = 0x07ff,
1519 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, 1521 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
1520 .no_msp34xx = 1, 1522 .no_msp34xx = 1,
1521 .no_tda9875 = 1, 1523 .no_tda9875 = 1,
1522 .tuner_type = TUNER_ABSENT, 1524 .tuner_type = TUNER_ABSENT,
@@ -1529,7 +1531,7 @@ struct tvcard bttv_tvcards[] = {
1529 /* .audio_inputs= 2, */ 1531 /* .audio_inputs= 2, */
1530 .svhs = 2, 1532 .svhs = 2,
1531 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */ 1533 .gpiomask = 0x1C800F, /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
1532 .muxsel = { 2, 1, 1, }, 1534 .muxsel = MUXSEL(2, 1, 1),
1533 .gpiomux = { 0, 1, 2, 2 }, 1535 .gpiomux = { 0, 1, 2, 2 },
1534 .gpiomute = 4, 1536 .gpiomute = 4,
1535 .needs_tvaudio = 0, 1537 .needs_tvaudio = 0,
@@ -1547,7 +1549,7 @@ struct tvcard bttv_tvcards[] = {
1547 /* .audio_inputs= 1, */ 1549 /* .audio_inputs= 1, */
1548 .svhs = 2, 1550 .svhs = 2,
1549 .gpiomask = 0x140007, 1551 .gpiomask = 0x140007,
1550 .muxsel = { 2, 3, 1, 1 }, 1552 .muxsel = MUXSEL(2, 3, 1, 1),
1551 .gpiomux = { 0, 1, 2, 3 }, 1553 .gpiomux = { 0, 1, 2, 3 },
1552 .gpiomute = 4, 1554 .gpiomute = 4,
1553 .tuner_type = TUNER_PHILIPS_NTSC, 1555 .tuner_type = TUNER_PHILIPS_NTSC,
@@ -1560,7 +1562,7 @@ struct tvcard bttv_tvcards[] = {
1560 /* .audio_inputs= 0, */ 1562 /* .audio_inputs= 0, */
1561 .svhs = NO_SVHS, 1563 .svhs = NO_SVHS,
1562 .gpiomask = 0, 1564 .gpiomask = 0,
1563 .muxsel = { 2, 3, 1, 0 }, 1565 .muxsel = MUXSEL(2, 3, 1, 0),
1564 .gpiomux = { 0 }, 1566 .gpiomux = { 0 },
1565 .needs_tvaudio = 0, 1567 .needs_tvaudio = 0,
1566 .no_msp34xx = 1, 1568 .no_msp34xx = 1,
@@ -1574,7 +1576,8 @@ struct tvcard bttv_tvcards[] = {
1574 /* .audio_inputs= 3, */ 1576 /* .audio_inputs= 3, */
1575 .svhs = 2, 1577 .svhs = 2,
1576 .gpiomask = 7, 1578 .gpiomask = 7,
1577 .muxsel = { 2, 3, 1, 1 }, /* Tuner, SVid, SVHS, SVid to SVHS connector */ 1579 /* Tuner, SVid, SVHS, SVid to SVHS connector */
1580 .muxsel = MUXSEL(2, 3, 1, 1),
1578 .gpiomux = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio! 1581 .gpiomux = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
1579 * This card lacks external Audio In, so we mute it on Ext. & Int. 1582 * This card lacks external Audio In, so we mute it on Ext. & Int.
1580 * The PCB can take a sbx1637/sbx1673, wiring unknown. 1583 * The PCB can take a sbx1637/sbx1673, wiring unknown.
@@ -1606,7 +1609,7 @@ struct tvcard bttv_tvcards[] = {
1606 .name = "DSP Design TCVIDEO", 1609 .name = "DSP Design TCVIDEO",
1607 .video_inputs = 4, 1610 .video_inputs = 4,
1608 .svhs = NO_SVHS, 1611 .svhs = NO_SVHS,
1609 .muxsel = { 2, 3, 1, 0 }, 1612 .muxsel = MUXSEL(2, 3, 1, 0),
1610 .pll = PLL_28, 1613 .pll = PLL_28,
1611 .tuner_type = UNSET, 1614 .tuner_type = UNSET,
1612 .tuner_addr = ADDR_UNSET, 1615 .tuner_addr = ADDR_UNSET,
@@ -1618,7 +1621,7 @@ struct tvcard bttv_tvcards[] = {
1618 .video_inputs = 4, 1621 .video_inputs = 4,
1619 /* .audio_inputs= 1, */ 1622 /* .audio_inputs= 1, */
1620 .svhs = 2, 1623 .svhs = 2,
1621 .muxsel = { 2, 0, 1, 1 }, 1624 .muxsel = MUXSEL(2, 0, 1, 1),
1622 .needs_tvaudio = 1, 1625 .needs_tvaudio = 1,
1623 .pll = PLL_28, 1626 .pll = PLL_28,
1624 .tuner_type = UNSET, 1627 .tuner_type = UNSET,
@@ -1633,7 +1636,7 @@ struct tvcard bttv_tvcards[] = {
1633 /* .audio_inputs= 1, */ 1636 /* .audio_inputs= 1, */
1634 .svhs = 2, 1637 .svhs = 2,
1635 .gpiomask = 0x0f0f80, 1638 .gpiomask = 0x0f0f80,
1636 .muxsel = {2, 3, 1, 0 }, 1639 .muxsel = MUXSEL(2, 3, 1, 0),
1637 .gpiomux = {0x030000, 0x010000, 0, 0 }, 1640 .gpiomux = {0x030000, 0x010000, 0, 0 },
1638 .gpiomute = 0x020000, 1641 .gpiomute = 0x020000,
1639 .no_msp34xx = 1, 1642 .no_msp34xx = 1,
@@ -1648,7 +1651,7 @@ struct tvcard bttv_tvcards[] = {
1648 .video_inputs = 4, /* id-inputs-clock */ 1651 .video_inputs = 4, /* id-inputs-clock */
1649 /* .audio_inputs= 0, */ 1652 /* .audio_inputs= 0, */
1650 .svhs = 3, 1653 .svhs = 3,
1651 .muxsel = { 3, 2, 0, 1 }, 1654 .muxsel = MUXSEL(3, 2, 0, 1),
1652 .pll = PLL_28, 1655 .pll = PLL_28,
1653 .tuner_type = TUNER_ABSENT, 1656 .tuner_type = TUNER_ABSENT,
1654 .tuner_addr = ADDR_UNSET, 1657 .tuner_addr = ADDR_UNSET,
@@ -1661,7 +1664,7 @@ struct tvcard bttv_tvcards[] = {
1661 .video_inputs = 3, 1664 .video_inputs = 3,
1662 /* .audio_inputs= 0, */ 1665 /* .audio_inputs= 0, */
1663 .svhs = 2, 1666 .svhs = 2,
1664 .muxsel = { 2, 3, 1 }, 1667 .muxsel = MUXSEL(2, 3, 1),
1665 .pll = PLL_28, 1668 .pll = PLL_28,
1666 .tuner_type = TUNER_ABSENT, 1669 .tuner_type = TUNER_ABSENT,
1667 .tuner_addr = ADDR_UNSET, 1670 .tuner_addr = ADDR_UNSET,
@@ -1676,7 +1679,7 @@ struct tvcard bttv_tvcards[] = {
1676 .video_inputs = 2, 1679 .video_inputs = 2,
1677 /* .audio_inputs= 0, */ 1680 /* .audio_inputs= 0, */
1678 .svhs = 1, 1681 .svhs = 1,
1679 .muxsel = { 3, 1 }, 1682 .muxsel = MUXSEL(3, 1),
1680 .pll = PLL_28, 1683 .pll = PLL_28,
1681 .tuner_type = TUNER_ABSENT, 1684 .tuner_type = TUNER_ABSENT,
1682 .tuner_addr = ADDR_UNSET, 1685 .tuner_addr = ADDR_UNSET,
@@ -1689,7 +1692,7 @@ struct tvcard bttv_tvcards[] = {
1689 .video_inputs = 1, 1692 .video_inputs = 1,
1690 /* .audio_inputs= 0, */ 1693 /* .audio_inputs= 0, */
1691 .svhs = NO_SVHS, 1694 .svhs = NO_SVHS,
1692 .muxsel = { 0 }, 1695 .muxsel = MUXSEL(0),
1693 .pll = PLL_28, 1696 .pll = PLL_28,
1694 .tuner_type = TUNER_ABSENT, 1697 .tuner_type = TUNER_ABSENT,
1695 .tuner_addr = ADDR_UNSET, 1698 .tuner_addr = ADDR_UNSET,
@@ -1702,7 +1705,7 @@ struct tvcard bttv_tvcards[] = {
1702 .video_inputs = 2, 1705 .video_inputs = 2,
1703 /* .audio_inputs= 0, */ 1706 /* .audio_inputs= 0, */
1704 .svhs = 1, 1707 .svhs = 1,
1705 .muxsel = { 0, 1 }, 1708 .muxsel = MUXSEL(0, 1),
1706 .pll = PLL_28, 1709 .pll = PLL_28,
1707 .tuner_type = TUNER_ABSENT, 1710 .tuner_type = TUNER_ABSENT,
1708 .tuner_addr = ADDR_UNSET, 1711 .tuner_addr = ADDR_UNSET,
@@ -1715,7 +1718,7 @@ struct tvcard bttv_tvcards[] = {
1715 .video_inputs = 1, 1718 .video_inputs = 1,
1716 /* .audio_inputs= 1, */ 1719 /* .audio_inputs= 1, */
1717 .svhs = NO_SVHS, 1720 .svhs = NO_SVHS,
1718 .muxsel = { 0 }, 1721 .muxsel = MUXSEL(0),
1719 .pll = PLL_28, 1722 .pll = PLL_28,
1720 .tuner_type = TUNER_ABSENT, 1723 .tuner_type = TUNER_ABSENT,
1721 .tuner_addr = ADDR_UNSET, 1724 .tuner_addr = ADDR_UNSET,
@@ -1730,7 +1733,7 @@ struct tvcard bttv_tvcards[] = {
1730 .video_inputs = 2, 1733 .video_inputs = 2,
1731 /* .audio_inputs= 1, */ 1734 /* .audio_inputs= 1, */
1732 .svhs = 1, 1735 .svhs = 1,
1733 .muxsel = { 0, 1 }, 1736 .muxsel = MUXSEL(0, 1),
1734 .pll = PLL_28, 1737 .pll = PLL_28,
1735 .tuner_type = TUNER_ABSENT, 1738 .tuner_type = TUNER_ABSENT,
1736 .tuner_addr = ADDR_UNSET, 1739 .tuner_addr = ADDR_UNSET,
@@ -1743,7 +1746,7 @@ struct tvcard bttv_tvcards[] = {
1743 .video_inputs = 2, 1746 .video_inputs = 2,
1744 /* .audio_inputs= 1, */ 1747 /* .audio_inputs= 1, */
1745 .svhs = 1, 1748 .svhs = 1,
1746 .muxsel = { 2, 3 }, 1749 .muxsel = MUXSEL(2, 3),
1747 .pll = PLL_28, 1750 .pll = PLL_28,
1748 .tuner_type = TUNER_ABSENT, 1751 .tuner_type = TUNER_ABSENT,
1749 .tuner_addr = ADDR_UNSET, 1752 .tuner_addr = ADDR_UNSET,
@@ -1756,7 +1759,7 @@ struct tvcard bttv_tvcards[] = {
1756 .video_inputs = 2, 1759 .video_inputs = 2,
1757 /* .audio_inputs= 1, */ 1760 /* .audio_inputs= 1, */
1758 .svhs = 1, 1761 .svhs = 1,
1759 .muxsel = { 2, 3 }, 1762 .muxsel = MUXSEL(2, 3),
1760 .pll = PLL_28, 1763 .pll = PLL_28,
1761 .tuner_type = TUNER_ABSENT, 1764 .tuner_type = TUNER_ABSENT,
1762 .tuner_addr = ADDR_UNSET, 1765 .tuner_addr = ADDR_UNSET,
@@ -1782,7 +1785,7 @@ struct tvcard bttv_tvcards[] = {
1782 .video_inputs = 2, 1785 .video_inputs = 2,
1783 /* .audio_inputs= 1, */ 1786 /* .audio_inputs= 1, */
1784 .svhs = 1, 1787 .svhs = 1,
1785 .muxsel = { 2, 3 }, 1788 .muxsel = MUXSEL(2, 3),
1786 .pll = PLL_28, 1789 .pll = PLL_28,
1787 .tuner_type = TUNER_ABSENT, 1790 .tuner_type = TUNER_ABSENT,
1788 .tuner_addr = ADDR_UNSET, 1791 .tuner_addr = ADDR_UNSET,
@@ -1799,7 +1802,7 @@ struct tvcard bttv_tvcards[] = {
1799 .tuner_addr = ADDR_UNSET, 1802 .tuner_addr = ADDR_UNSET,
1800 .svhs = NO_SVHS, 1803 .svhs = NO_SVHS,
1801 .gpiomask = 0, 1804 .gpiomask = 0,
1802 .muxsel = { 2, 2, 2, 2 }, 1805 .muxsel = MUXSEL(2, 2, 2, 2),
1803 .muxsel_hook = eagle_muxsel, 1806 .muxsel_hook = eagle_muxsel,
1804 .no_msp34xx = 1, 1807 .no_msp34xx = 1,
1805 .no_tda9875 = 1, 1808 .no_tda9875 = 1,
@@ -1815,7 +1818,7 @@ struct tvcard bttv_tvcards[] = {
1815 .no_msp34xx = 1, 1818 .no_msp34xx = 1,
1816 .no_tda9875 = 1, 1819 .no_tda9875 = 1,
1817 .no_tda7432 = 1, 1820 .no_tda7432 = 1,
1818 .muxsel = { 3, 1 }, 1821 .muxsel = MUXSEL(3, 1),
1819 .pll = PLL_28, 1822 .pll = PLL_28,
1820 .no_gpioirq = 1, 1823 .no_gpioirq = 1,
1821 .has_dvb = 1, 1824 .has_dvb = 1,
@@ -1827,7 +1830,7 @@ struct tvcard bttv_tvcards[] = {
1827 .svhs = 3, 1830 .svhs = 3,
1828 .gpiomask = 2, 1831 .gpiomask = 2,
1829 /* TV, Comp1, Composite over SVID con, SVID */ 1832 /* TV, Comp1, Composite over SVID con, SVID */
1830 .muxsel = { 2, 3, 1, 1 }, 1833 .muxsel = MUXSEL(2, 3, 1, 1),
1831 .gpiomux = { 2, 2, 0, 0 }, 1834 .gpiomux = { 2, 2, 0, 0 },
1832 .pll = PLL_28, 1835 .pll = PLL_28,
1833 .has_radio = 1, 1836 .has_radio = 1,
@@ -1849,7 +1852,7 @@ struct tvcard bttv_tvcards[] = {
1849 /* .audio_inputs= 1, */ 1852 /* .audio_inputs= 1, */
1850 .svhs = NO_SVHS, 1853 .svhs = NO_SVHS,
1851 .gpiomask = 7, 1854 .gpiomask = 7,
1852 .muxsel = { 2, 3, 1, 1}, 1855 .muxsel = MUXSEL(2, 3, 1, 1),
1853 .gpiomux = { 0, 1, 2, 3}, 1856 .gpiomux = { 0, 1, 2, 3},
1854 .gpiomute = 4, 1857 .gpiomute = 4,
1855 .needs_tvaudio = 1, 1858 .needs_tvaudio = 1,
@@ -1866,7 +1869,7 @@ struct tvcard bttv_tvcards[] = {
1866 .no_msp34xx = 1, 1869 .no_msp34xx = 1,
1867 .no_tda9875 = 1, 1870 .no_tda9875 = 1,
1868 .no_tda7432 = 1, 1871 .no_tda7432 = 1,
1869 .muxsel = { 2, 0, 1}, 1872 .muxsel = MUXSEL(2, 0, 1),
1870 .pll = PLL_28, 1873 .pll = PLL_28,
1871 .tuner_type = TUNER_ABSENT, 1874 .tuner_type = TUNER_ABSENT,
1872 .tuner_addr = ADDR_UNSET, 1875 .tuner_addr = ADDR_UNSET,
@@ -1878,7 +1881,7 @@ struct tvcard bttv_tvcards[] = {
1878 /* .audio_inputs= 0, */ 1881 /* .audio_inputs= 0, */
1879 .svhs = NO_SVHS, 1882 .svhs = NO_SVHS,
1880 .gpiomask = 0, 1883 .gpiomask = 0,
1881 .muxsel = { 2, 3 }, 1884 .muxsel = MUXSEL(2, 3),
1882 .gpiomux = { 0 }, 1885 .gpiomux = { 0 },
1883 .needs_tvaudio = 0, 1886 .needs_tvaudio = 0,
1884 .no_msp34xx = 1, 1887 .no_msp34xx = 1,
@@ -1894,7 +1897,7 @@ struct tvcard bttv_tvcards[] = {
1894 /* .audio_inputs= 1, */ 1897 /* .audio_inputs= 1, */
1895 .svhs = 2, 1898 .svhs = 2,
1896 .gpiomask = 0x001e8007, 1899 .gpiomask = 0x001e8007,
1897 .muxsel = { 2, 3, 1, 0 }, 1900 .muxsel = MUXSEL(2, 3, 1, 0),
1898 /* Tuner, Radio, external, internal, off, on */ 1901 /* Tuner, Radio, external, internal, off, on */
1899 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 }, 1902 .gpiomux = { 0x08, 0x0f, 0x0a, 0x08 },
1900 .gpiomute = 0x0f, 1903 .gpiomute = 0x0f,
@@ -1913,7 +1916,7 @@ struct tvcard bttv_tvcards[] = {
1913 /* .audio_inputs= 1, */ 1916 /* .audio_inputs= 1, */
1914 .svhs = 2, 1917 .svhs = 2,
1915 .gpiomask = 0x00, 1918 .gpiomask = 0x00,
1916 .muxsel = { 2, 3, 1, 1 }, 1919 .muxsel = MUXSEL(2, 3, 1, 1),
1917 .needs_tvaudio = 1, 1920 .needs_tvaudio = 1,
1918 .no_msp34xx = 1, 1921 .no_msp34xx = 1,
1919 .pll = PLL_28, 1922 .pll = PLL_28,
@@ -1934,7 +1937,8 @@ struct tvcard bttv_tvcards[] = {
1934 .video_inputs = 4, 1937 .video_inputs = 4,
1935 /* .audio_inputs= 1, */ 1938 /* .audio_inputs= 1, */
1936 .svhs = 2, 1939 .svhs = 2,
1937 .muxsel = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */ 1940 /* Tuner, CVid, SVid, CVid over SVid connector */
1941 .muxsel = MUXSEL(2, 3, 1, 1),
1938 .gpiomask = 0, 1942 .gpiomask = 0,
1939 .no_tda9875 = 1, 1943 .no_tda9875 = 1,
1940 .no_tda7432 = 1, 1944 .no_tda7432 = 1,
@@ -1958,7 +1962,7 @@ struct tvcard bttv_tvcards[] = {
1958 .tuner_addr = ADDR_UNSET, 1962 .tuner_addr = ADDR_UNSET,
1959 .svhs = NO_SVHS, 1963 .svhs = NO_SVHS,
1960 .gpiomask = 0xdf, 1964 .gpiomask = 0xdf,
1961 .muxsel = { 2 }, 1965 .muxsel = MUXSEL(2),
1962 .pll = PLL_28, 1966 .pll = PLL_28,
1963 }, 1967 },
1964 [BTTV_BOARD_IVCE8784] = { 1968 [BTTV_BOARD_IVCE8784] = {
@@ -1969,7 +1973,7 @@ struct tvcard bttv_tvcards[] = {
1969 .tuner_addr = ADDR_UNSET, 1973 .tuner_addr = ADDR_UNSET,
1970 .svhs = NO_SVHS, 1974 .svhs = NO_SVHS,
1971 .gpiomask = 0xdf, 1975 .gpiomask = 0xdf,
1972 .muxsel = { 2 }, 1976 .muxsel = MUXSEL(2),
1973 .pll = PLL_28, 1977 .pll = PLL_28,
1974 }, 1978 },
1975 [BTTV_BOARD_XGUARD] = { 1979 [BTTV_BOARD_XGUARD] = {
@@ -1980,7 +1984,7 @@ struct tvcard bttv_tvcards[] = {
1980 .tuner_type = TUNER_ABSENT, 1984 .tuner_type = TUNER_ABSENT,
1981 .tuner_addr = ADDR_UNSET, 1985 .tuner_addr = ADDR_UNSET,
1982 .gpiomask2 = 0xff, 1986 .gpiomask2 = 0xff,
1983 .muxsel = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 }, 1987 .muxsel = MUXSEL(2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0),
1984 .muxsel_hook = xguard_muxsel, 1988 .muxsel_hook = xguard_muxsel,
1985 .no_msp34xx = 1, 1989 .no_msp34xx = 1,
1986 .no_tda9875 = 1, 1990 .no_tda9875 = 1,
@@ -1993,7 +1997,7 @@ struct tvcard bttv_tvcards[] = {
1993 .name = "Nebula Electronics DigiTV", 1997 .name = "Nebula Electronics DigiTV",
1994 .video_inputs = 1, 1998 .video_inputs = 1,
1995 .svhs = NO_SVHS, 1999 .svhs = NO_SVHS,
1996 .muxsel = { 2, 3, 1, 0 }, 2000 .muxsel = MUXSEL(2, 3, 1, 0),
1997 .no_msp34xx = 1, 2001 .no_msp34xx = 1,
1998 .no_tda9875 = 1, 2002 .no_tda9875 = 1,
1999 .no_tda7432 = 1, 2003 .no_tda7432 = 1,
@@ -2012,7 +2016,7 @@ struct tvcard bttv_tvcards[] = {
2012 /* .audio_inputs= 0, */ 2016 /* .audio_inputs= 0, */
2013 .svhs = NO_SVHS, 2017 .svhs = NO_SVHS,
2014 .gpiomask = 0, 2018 .gpiomask = 0,
2015 .muxsel = { 2, 3, 1, 0 }, 2019 .muxsel = MUXSEL(2, 3, 1, 0),
2016 .gpiomux = { 0 }, 2020 .gpiomux = { 0 },
2017 .needs_tvaudio = 0, 2021 .needs_tvaudio = 0,
2018 .no_msp34xx = 1, 2022 .no_msp34xx = 1,
@@ -2027,7 +2031,7 @@ struct tvcard bttv_tvcards[] = {
2027 /* .audio_inputs= 0, */ 2031 /* .audio_inputs= 0, */
2028 .svhs = 3, 2032 .svhs = 3,
2029 .gpiomask = 0x00, 2033 .gpiomask = 0x00,
2030 .muxsel = { 2, 3, 1, 0 }, 2034 .muxsel = MUXSEL(2, 3, 1, 0),
2031 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2035 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2032 .needs_tvaudio = 0, 2036 .needs_tvaudio = 0,
2033 .pll = PLL_28, 2037 .pll = PLL_28,
@@ -2040,7 +2044,7 @@ struct tvcard bttv_tvcards[] = {
2040 /* .audio_inputs= 0, */ 2044 /* .audio_inputs= 0, */
2041 .svhs = 3, 2045 .svhs = 3,
2042 .gpiomask = 0x00, 2046 .gpiomask = 0x00,
2043 .muxsel = { 2, 3, 1, 1 }, 2047 .muxsel = MUXSEL(2, 3, 1, 1),
2044 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2048 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2045 .needs_tvaudio = 0, 2049 .needs_tvaudio = 0,
2046 .pll = PLL_28, 2050 .pll = PLL_28,
@@ -2056,7 +2060,7 @@ struct tvcard bttv_tvcards[] = {
2056 .svhs = 9, 2060 .svhs = 9,
2057 .gpiomask = 0x00, 2061 .gpiomask = 0x00,
2058 .gpiomask2 = 0x03, /* used for external vodeo mux */ 2062 .gpiomask2 = 0x03, /* used for external vodeo mux */
2059 .muxsel = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 0 }, 2063 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
2060 .muxsel_hook = phytec_muxsel, 2064 .muxsel_hook = phytec_muxsel,
2061 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2065 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2062 .needs_tvaudio = 1, 2066 .needs_tvaudio = 1,
@@ -2071,7 +2075,7 @@ struct tvcard bttv_tvcards[] = {
2071 .svhs = 9, 2075 .svhs = 9,
2072 .gpiomask = 0x00, 2076 .gpiomask = 0x00,
2073 .gpiomask2 = 0x03, /* used for external vodeo mux */ 2077 .gpiomask2 = 0x03, /* used for external vodeo mux */
2074 .muxsel = { 2, 2, 2, 2, 3, 3, 3, 3, 1, 1 }, 2078 .muxsel = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
2075 .muxsel_hook = phytec_muxsel, 2079 .muxsel_hook = phytec_muxsel,
2076 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2080 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2077 .needs_tvaudio = 1, 2081 .needs_tvaudio = 1,
@@ -2087,7 +2091,7 @@ struct tvcard bttv_tvcards[] = {
2087 .tuner_addr = ADDR_UNSET, 2091 .tuner_addr = ADDR_UNSET,
2088 .svhs = NO_SVHS, 2092 .svhs = NO_SVHS,
2089 .gpiomask = 0xdf, 2093 .gpiomask = 0xdf,
2090 .muxsel = { 2, 3, 1, 0 }, 2094 .muxsel = MUXSEL(2, 3, 1, 0),
2091 .pll = PLL_28, 2095 .pll = PLL_28,
2092 }, 2096 },
2093 [BTTV_BOARD_IVC120] = { 2097 [BTTV_BOARD_IVC120] = {
@@ -2103,7 +2107,7 @@ struct tvcard bttv_tvcards[] = {
2103 .no_tda9875 = 1, 2107 .no_tda9875 = 1,
2104 .no_tda7432 = 1, 2108 .no_tda7432 = 1,
2105 .gpiomask = 0x00, 2109 .gpiomask = 0x00,
2106 .muxsel = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 2110 .muxsel = MUXSEL(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
2107 .muxsel_hook = ivc120_muxsel, 2111 .muxsel_hook = ivc120_muxsel,
2108 .pll = PLL_28, 2112 .pll = PLL_28,
2109 }, 2113 },
@@ -2114,7 +2118,7 @@ struct tvcard bttv_tvcards[] = {
2114 .video_inputs = 4, 2118 .video_inputs = 4,
2115 /* .audio_inputs= 1, */ 2119 /* .audio_inputs= 1, */
2116 .svhs = 2, 2120 .svhs = 2,
2117 .muxsel = { 2, 3, 1, 0 }, 2121 .muxsel = MUXSEL(2, 3, 1, 0),
2118 .tuner_type = TUNER_PHILIPS_FCV1236D, 2122 .tuner_type = TUNER_PHILIPS_FCV1236D,
2119 .tuner_addr = ADDR_UNSET, 2123 .tuner_addr = ADDR_UNSET,
2120 .has_dvb = 1, 2124 .has_dvb = 1,
@@ -2134,7 +2138,8 @@ struct tvcard bttv_tvcards[] = {
2134 .video_inputs = 3, 2138 .video_inputs = 3,
2135 /* .audio_inputs= 0, */ 2139 /* .audio_inputs= 0, */
2136 .svhs = 1, 2140 .svhs = 1,
2137 .muxsel = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */ 2141 /* Vid In, SVid In, Vid over SVid in connector */
2142 .muxsel = MUXSEL(3, 1, 1, 3),
2138 .no_msp34xx = 1, 2143 .no_msp34xx = 1,
2139 .no_tda9875 = 1, 2144 .no_tda9875 = 1,
2140 .no_tda7432 = 1, 2145 .no_tda7432 = 1,
@@ -2148,7 +2153,7 @@ struct tvcard bttv_tvcards[] = {
2148 /* .audio_inputs= 1, */ 2153 /* .audio_inputs= 1, */
2149 .svhs = 2, 2154 .svhs = 2,
2150 .gpiomask = 3, 2155 .gpiomask = 3,
2151 .muxsel = { 2, 3, 1, 1 }, 2156 .muxsel = MUXSEL(2, 3, 1, 1),
2152 .gpiomux = { 1, 1, 1, 1 }, 2157 .gpiomux = { 1, 1, 1, 1 },
2153 .needs_tvaudio = 1, 2158 .needs_tvaudio = 1,
2154 .tuner_type = TUNER_PHILIPS_PAL, 2159 .tuner_type = TUNER_PHILIPS_PAL,
@@ -2165,7 +2170,7 @@ struct tvcard bttv_tvcards[] = {
2165 .tuner_type = TUNER_ABSENT, 2170 .tuner_type = TUNER_ABSENT,
2166 .tuner_addr = ADDR_UNSET, 2171 .tuner_addr = ADDR_UNSET,
2167 .pll = PLL_28, 2172 .pll = PLL_28,
2168 .muxsel = { 2, 2, 2, 2 }, 2173 .muxsel = MUXSEL(2, 2, 2, 2),
2169 .gpiomask = 0x3F, 2174 .gpiomask = 0x3F,
2170 .muxsel_hook = gvc1100_muxsel, 2175 .muxsel_hook = gvc1100_muxsel,
2171 }, 2176 },
@@ -2175,7 +2180,7 @@ struct tvcard bttv_tvcards[] = {
2175 .video_inputs = 3, 2180 .video_inputs = 3,
2176 .svhs = 2, 2181 .svhs = 2,
2177 .gpiomask = 0x008007, 2182 .gpiomask = 0x008007,
2178 .muxsel = { 2, 3, 0, 0 }, 2183 .muxsel = MUXSEL(2, 3, 0, 0),
2179 .gpiomux = { 0, 0, 0, 0 }, 2184 .gpiomux = { 0, 0, 0, 0 },
2180 .gpiomute = 0x000003, 2185 .gpiomute = 0x000003,
2181 .pll = PLL_28, 2186 .pll = PLL_28,
@@ -2189,7 +2194,7 @@ struct tvcard bttv_tvcards[] = {
2189 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */ 2194 .video_inputs = 4, /* IN1,IN2,IN3,IN4 */
2190 /* .audio_inputs= 0, */ 2195 /* .audio_inputs= 0, */
2191 .svhs = NO_SVHS, 2196 .svhs = NO_SVHS,
2192 .muxsel = { 2, 3, 1, 0 }, 2197 .muxsel = MUXSEL(2, 3, 1, 0),
2193 .no_msp34xx = 1, 2198 .no_msp34xx = 1,
2194 .no_tda9875 = 1, 2199 .no_tda9875 = 1,
2195 .no_tda7432 = 1, 2200 .no_tda7432 = 1,
@@ -2207,7 +2212,7 @@ struct tvcard bttv_tvcards[] = {
2207 .svhs = 2, 2212 .svhs = 2,
2208 .needs_tvaudio = 0, 2213 .needs_tvaudio = 0,
2209 .gpiomask = 0x68, 2214 .gpiomask = 0x68,
2210 .muxsel = { 2, 3, 1 }, 2215 .muxsel = MUXSEL(2, 3, 1),
2211 .gpiomux = { 0x68, 0x68, 0x61, 0x61 }, 2216 .gpiomux = { 0x68, 0x68, 0x61, 0x61 },
2212 .pll = PLL_28, 2217 .pll = PLL_28,
2213 }, 2218 },
@@ -2221,7 +2226,7 @@ struct tvcard bttv_tvcards[] = {
2221 /* .audio_inputs= 1, */ 2226 /* .audio_inputs= 1, */
2222 .svhs = 2, 2227 .svhs = 2,
2223 .gpiomask = 0x008007, 2228 .gpiomask = 0x008007,
2224 .muxsel = { 2, 3, 1, 1 }, 2229 .muxsel = MUXSEL(2, 3, 1, 1),
2225 .gpiomux = { 0, 1, 2, 2 }, 2230 .gpiomux = { 0, 1, 2, 2 },
2226 .gpiomute = 3, 2231 .gpiomute = 3,
2227 .needs_tvaudio = 0, 2232 .needs_tvaudio = 0,
@@ -2245,7 +2250,8 @@ struct tvcard bttv_tvcards[] = {
2245 .no_msp34xx = 1, 2250 .no_msp34xx = 1,
2246 .no_tda9875 = 1, 2251 .no_tda9875 = 1,
2247 .no_tda7432 = 1, 2252 .no_tda7432 = 1,
2248 .muxsel = {2,2,2,2},/*878A input is always MUX0, see above.*/ 2253 /*878A input is always MUX0, see above.*/
2254 .muxsel = MUXSEL(2, 2, 2, 2),
2249 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2255 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2250 .pll = PLL_28, 2256 .pll = PLL_28,
2251 .needs_tvaudio = 0, 2257 .needs_tvaudio = 0,
@@ -2261,7 +2267,7 @@ struct tvcard bttv_tvcards[] = {
2261 /* .audio_inputs= 1, */ 2267 /* .audio_inputs= 1, */
2262 .svhs = 2, 2268 .svhs = 2,
2263 .gpiomask = 0x0000000f, 2269 .gpiomask = 0x0000000f,
2264 .muxsel = { 2, 1, 1 }, 2270 .muxsel = MUXSEL(2, 1, 1),
2265 .gpiomux = { 0x02, 0x00, 0x00, 0x00 }, 2271 .gpiomux = { 0x02, 0x00, 0x00, 0x00 },
2266 .tuner_type = TUNER_TEMIC_PAL, 2272 .tuner_type = TUNER_TEMIC_PAL,
2267 .tuner_addr = ADDR_UNSET, 2273 .tuner_addr = ADDR_UNSET,
@@ -2275,7 +2281,7 @@ struct tvcard bttv_tvcards[] = {
2275 .svhs = 1, 2281 .svhs = 1,
2276 .tuner_type = TUNER_ABSENT, 2282 .tuner_type = TUNER_ABSENT,
2277 .tuner_addr = ADDR_UNSET, 2283 .tuner_addr = ADDR_UNSET,
2278 .muxsel = { 3 , 3 }, 2284 .muxsel = MUXSEL(3, 3),
2279 .no_msp34xx = 1, 2285 .no_msp34xx = 1,
2280 .no_tda9875 = 1, 2286 .no_tda9875 = 1,
2281 .no_tda7432 = 1, 2287 .no_tda7432 = 1,
@@ -2291,7 +2297,7 @@ struct tvcard bttv_tvcards[] = {
2291 .name = "AverMedia AverTV DVB-T 761", 2297 .name = "AverMedia AverTV DVB-T 761",
2292 .video_inputs = 2, 2298 .video_inputs = 2,
2293 .svhs = 1, 2299 .svhs = 1,
2294 .muxsel = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */ 2300 .muxsel = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
2295 .no_msp34xx = 1, 2301 .no_msp34xx = 1,
2296 .no_tda9875 = 1, 2302 .no_tda9875 = 1,
2297 .no_tda7432 = 1, 2303 .no_tda7432 = 1,
@@ -2309,8 +2315,7 @@ struct tvcard bttv_tvcards[] = {
2309 /* .audio_inputs= 0, */ 2315 /* .audio_inputs= 0, */
2310 .svhs = NO_SVHS, 2316 .svhs = NO_SVHS,
2311 .gpiomask = 0x0, 2317 .gpiomask = 0x0,
2312 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2318 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3),
2313 3, 3, 3, 3, 3, 3, 3, 3 },
2314 .muxsel_hook = sigmaSQ_muxsel, 2319 .muxsel_hook = sigmaSQ_muxsel,
2315 .gpiomux = { 0 }, 2320 .gpiomux = { 0 },
2316 .no_msp34xx = 1, 2321 .no_msp34xx = 1,
@@ -2325,7 +2330,7 @@ struct tvcard bttv_tvcards[] = {
2325 /* .audio_inputs= 0, */ 2330 /* .audio_inputs= 0, */
2326 .svhs = NO_SVHS, 2331 .svhs = NO_SVHS,
2327 .gpiomask = 0x0, 2332 .gpiomask = 0x0,
2328 .muxsel = { 2, 2, 2, 2 }, 2333 .muxsel = MUXSEL(2, 2, 2, 2),
2329 .muxsel_hook = sigmaSLC_muxsel, 2334 .muxsel_hook = sigmaSLC_muxsel,
2330 .gpiomux = { 0 }, 2335 .gpiomux = { 0 },
2331 .no_msp34xx = 1, 2336 .no_msp34xx = 1,
@@ -2342,7 +2347,7 @@ struct tvcard bttv_tvcards[] = {
2342 /* .audio_inputs= 1, */ 2347 /* .audio_inputs= 1, */
2343 .svhs = NO_SVHS, 2348 .svhs = NO_SVHS,
2344 .gpiomask = 0xFF, 2349 .gpiomask = 0xFF,
2345 .muxsel = { 2, 3, 1, 1 }, 2350 .muxsel = MUXSEL(2, 3, 1, 1),
2346 .gpiomux = { 2, 0, 0, 0 }, 2351 .gpiomux = { 2, 0, 0, 0 },
2347 .gpiomute = 10, 2352 .gpiomute = 10,
2348 .needs_tvaudio = 0, 2353 .needs_tvaudio = 0,
@@ -2373,7 +2378,7 @@ struct tvcard bttv_tvcards[] = {
2373 /* .audio_inputs= 1, */ 2378 /* .audio_inputs= 1, */
2374 .svhs = 2, 2379 .svhs = 2,
2375 .gpiomask = 0x3f, 2380 .gpiomask = 0x3f,
2376 .muxsel = {2, 3, 1, 0 }, 2381 .muxsel = MUXSEL(2, 3, 1, 0),
2377 .gpiomux = {0x31, 0x31, 0x31, 0x31 }, 2382 .gpiomux = {0x31, 0x31, 0x31, 0x31 },
2378 .gpiomute = 0x31, 2383 .gpiomute = 0x31,
2379 .no_msp34xx = 1, 2384 .no_msp34xx = 1,
@@ -2388,7 +2393,7 @@ struct tvcard bttv_tvcards[] = {
2388 .video_inputs = 4, 2393 .video_inputs = 4,
2389 /* .audio_inputs= 1, */ 2394 /* .audio_inputs= 1, */
2390 .svhs = 2, 2395 .svhs = 2,
2391 .muxsel = { 2, 3, 1, 0 }, 2396 .muxsel = MUXSEL(2, 3, 1, 0),
2392 .tuner_type = TUNER_PHILIPS_NTSC, 2397 .tuner_type = TUNER_PHILIPS_NTSC,
2393 .tuner_addr = ADDR_UNSET, 2398 .tuner_addr = ADDR_UNSET,
2394 .gpiomask = 0x008007, 2399 .gpiomask = 0x008007,
@@ -2402,7 +2407,7 @@ struct tvcard bttv_tvcards[] = {
2402 .video_inputs = 16, 2407 .video_inputs = 16,
2403 /* .audio_inputs= 0, */ 2408 /* .audio_inputs= 0, */
2404 .svhs = NO_SVHS, 2409 .svhs = NO_SVHS,
2405 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, 2410 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2406 .pll = PLL_28, 2411 .pll = PLL_28,
2407 .no_msp34xx = 1, 2412 .no_msp34xx = 1,
2408 .no_tda9875 = 1, 2413 .no_tda9875 = 1,
@@ -2439,7 +2444,7 @@ struct tvcard bttv_tvcards[] = {
2439 */ 2444 */
2440 .gpiomask = 0x0003ff, 2445 .gpiomask = 0x0003ff,
2441 .no_gpioirq = 1, 2446 .no_gpioirq = 1,
2442 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, 2447 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2443 .pll = PLL_28, 2448 .pll = PLL_28,
2444 .no_msp34xx = 1, 2449 .no_msp34xx = 1,
2445 .no_tda7432 = 1, 2450 .no_tda7432 = 1,
@@ -2461,7 +2466,7 @@ struct tvcard bttv_tvcards[] = {
2461 .svhs = NO_SVHS, 2466 .svhs = NO_SVHS,
2462 .gpiomask = 0x010000, 2467 .gpiomask = 0x010000,
2463 .no_gpioirq = 1, 2468 .no_gpioirq = 1,
2464 .muxsel = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }, 2469 .muxsel = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
2465 .pll = PLL_28, 2470 .pll = PLL_28,
2466 .no_msp34xx = 1, 2471 .no_msp34xx = 1,
2467 .no_tda7432 = 1, 2472 .no_tda7432 = 1,
@@ -2476,7 +2481,7 @@ struct tvcard bttv_tvcards[] = {
2476 .video_inputs = 4, 2481 .video_inputs = 4,
2477 /* .audio_inputs= 1, */ 2482 /* .audio_inputs= 1, */
2478 .svhs = 2, 2483 .svhs = 2,
2479 .muxsel = { 2, 3, 1, 0 }, 2484 .muxsel = MUXSEL(2, 3, 1, 0),
2480 .tuner_type = UNSET, 2485 .tuner_type = UNSET,
2481 .tuner_addr = ADDR_UNSET, 2486 .tuner_addr = ADDR_UNSET,
2482 .pll = PLL_28, 2487 .pll = PLL_28,
@@ -2490,7 +2495,7 @@ struct tvcard bttv_tvcards[] = {
2490 .video_inputs = 3, 2495 .video_inputs = 3,
2491 /* .audio_inputs= 1, */ 2496 /* .audio_inputs= 1, */
2492 .svhs = 2, 2497 .svhs = 2,
2493 .muxsel = { 2, 3, 1 }, 2498 .muxsel = MUXSEL(2, 3, 1),
2494 .gpiomask = 0x00e00007, 2499 .gpiomask = 0x00e00007,
2495 .gpiomux = { 0x00400005, 0, 0x00000001, 0 }, 2500 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2496 .gpiomute = 0x00c00007, 2501 .gpiomute = 0x00c00007,
@@ -2507,7 +2512,7 @@ struct tvcard bttv_tvcards[] = {
2507 /* .audio_inputs= 1, */ 2512 /* .audio_inputs= 1, */
2508 .svhs = 2, 2513 .svhs = 2,
2509 .gpiomask = 0x01fe00, 2514 .gpiomask = 0x01fe00,
2510 .muxsel = { 2, 3, 1, 1 }, 2515 .muxsel = MUXSEL(2, 3, 1, 1),
2511 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 }, 2516 .gpiomux = { 0x001e00, 0, 0x018000, 0x014000 },
2512 .gpiomute = 0x002000, 2517 .gpiomute = 0x002000,
2513 .needs_tvaudio = 1, 2518 .needs_tvaudio = 1,
@@ -2523,7 +2528,7 @@ struct tvcard bttv_tvcards[] = {
2523 /* .audio_inputs= 1, */ 2528 /* .audio_inputs= 1, */
2524 .svhs = 2, 2529 .svhs = 2,
2525 .gpiomask = 0x001c0007, 2530 .gpiomask = 0x001c0007,
2526 .muxsel = { 2, 3, 1, 1 }, 2531 .muxsel = MUXSEL(2, 3, 1, 1),
2527 .gpiomux = { 0, 1, 2, 2 }, 2532 .gpiomux = { 0, 1, 2, 2 },
2528 .gpiomute = 3, 2533 .gpiomute = 3,
2529 .needs_tvaudio = 0, 2534 .needs_tvaudio = 0,
@@ -2541,7 +2546,7 @@ struct tvcard bttv_tvcards[] = {
2541 .svhs = 3, 2546 .svhs = 3,
2542 .has_dig_in = 1, 2547 .has_dig_in = 1,
2543 .gpiomask = 0x01fe00, 2548 .gpiomask = 0x01fe00,
2544 .muxsel = { 2, 3, 1, 1, 0 }, /* in 4 is digital */ 2549 .muxsel = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
2545 /* .digital_mode= DIGITAL_MODE_CAMERA, */ 2550 /* .digital_mode= DIGITAL_MODE_CAMERA, */
2546 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 }, 2551 .gpiomux = { 0x00400, 0x10400, 0x04400, 0x80000 },
2547 .gpiomute = 0x12400, 2552 .gpiomute = 0x12400,
@@ -2559,7 +2564,7 @@ struct tvcard bttv_tvcards[] = {
2559 /* .audio_inputs= 1, */ 2564 /* .audio_inputs= 1, */
2560 .svhs = 2, 2565 .svhs = 2,
2561 .gpiomask = 0x3f, 2566 .gpiomask = 0x3f,
2562 .muxsel = { 2, 3, 1, 1 }, 2567 .muxsel = MUXSEL(2, 3, 1, 1),
2563 .gpiomux = { 0x21, 0x20, 0x24, 0x2c }, 2568 .gpiomux = { 0x21, 0x20, 0x24, 0x2c },
2564 .gpiomute = 0x29, 2569 .gpiomute = 0x29,
2565 .no_msp34xx = 1, 2570 .no_msp34xx = 1,
@@ -2587,7 +2592,7 @@ struct tvcard bttv_tvcards[] = {
2587 .video_inputs = 4, 2592 .video_inputs = 4,
2588 /* .audio_inputs= 2, */ 2593 /* .audio_inputs= 2, */
2589 .svhs = NO_SVHS, 2594 .svhs = NO_SVHS,
2590 .muxsel = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */ 2595 .muxsel = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
2591 .gpiomask = 0x303, 2596 .gpiomask = 0x303,
2592 .gpiomute = 0x000, /* int + 32kHz */ 2597 .gpiomute = 0x000, /* int + 32kHz */
2593 .gpiomux = { 0, 0, 0x000, 0x100}, 2598 .gpiomux = { 0, 0, 0x000, 0x100},
@@ -2605,7 +2610,7 @@ struct tvcard bttv_tvcards[] = {
2605 /* .audio_inputs= 1, */ 2610 /* .audio_inputs= 1, */
2606 .svhs = 2, 2611 .svhs = 2,
2607 .gpiomask = 15, 2612 .gpiomask = 15,
2608 .muxsel = { 2, 3, 1, 1 }, 2613 .muxsel = MUXSEL(2, 3, 1, 1),
2609 .gpiomux = { 2, 0, 0, 0 }, 2614 .gpiomux = { 2, 0, 0, 0 },
2610 .gpiomute = 1, 2615 .gpiomute = 1,
2611 .needs_tvaudio = 1, 2616 .needs_tvaudio = 1,
@@ -2620,7 +2625,7 @@ struct tvcard bttv_tvcards[] = {
2620 /* .audio_inputs= 1, */ 2625 /* .audio_inputs= 1, */
2621 .svhs = 2, 2626 .svhs = 2,
2622 .gpiomask = 0x108007, 2627 .gpiomask = 0x108007,
2623 .muxsel = { 2, 3, 1, 1 }, 2628 .muxsel = MUXSEL(2, 3, 1, 1),
2624 .gpiomux = { 100000, 100002, 100002, 100000 }, 2629 .gpiomux = { 100000, 100002, 100002, 100000 },
2625 .no_msp34xx = 1, 2630 .no_msp34xx = 1,
2626 .no_tda9875 = 1, 2631 .no_tda9875 = 1,
@@ -2637,7 +2642,7 @@ struct tvcard bttv_tvcards[] = {
2637 /* .audio_inputs= 0, */ 2642 /* .audio_inputs= 0, */
2638 .svhs = NO_SVHS, 2643 .svhs = NO_SVHS,
2639 .gpiomask = 0x0f, /* old: 7 */ 2644 .gpiomask = 0x0f, /* old: 7 */
2640 .muxsel = { 0, 1, 3, 2 }, /* Composite 0-3 */ 2645 .muxsel = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
2641 .no_msp34xx = 1, 2646 .no_msp34xx = 1,
2642 .no_tda9875 = 1, 2647 .no_tda9875 = 1,
2643 .no_tda7432 = 1, 2648 .no_tda7432 = 1,
@@ -2657,7 +2662,7 @@ struct tvcard bttv_tvcards[] = {
2657 /* .audio_inputs= 1, */ 2662 /* .audio_inputs= 1, */
2658 .svhs = 2, 2663 .svhs = 2,
2659 .gpiomask = 7, 2664 .gpiomask = 7,
2660 .muxsel = { 2, 3, 1, 1 }, 2665 .muxsel = MUXSEL(2, 3, 1, 1),
2661 .gpiomux = { 0, 1, 2, 3 }, 2666 .gpiomux = { 0, 1, 2, 3 },
2662 .gpiomute = 4, 2667 .gpiomute = 4,
2663 .tuner_type = TUNER_TEMIC_4009FR5_PAL, 2668 .tuner_type = TUNER_TEMIC_4009FR5_PAL,
@@ -2671,7 +2676,7 @@ struct tvcard bttv_tvcards[] = {
2671 .video_inputs = 4, 2676 .video_inputs = 4,
2672 /* .audio_inputs= 0, */ 2677 /* .audio_inputs= 0, */
2673 .svhs = NO_SVHS, 2678 .svhs = NO_SVHS,
2674 .muxsel = { 0, 1, 2, 3 }, 2679 .muxsel = MUXSEL(0, 1, 2, 3),
2675 .tuner_type = TUNER_ABSENT, 2680 .tuner_type = TUNER_ABSENT,
2676 .tuner_addr = ADDR_UNSET, 2681 .tuner_addr = ADDR_UNSET,
2677 }, 2682 },
@@ -2680,7 +2685,7 @@ struct tvcard bttv_tvcards[] = {
2680 .video_inputs = 2, 2685 .video_inputs = 2,
2681 /* .audio_inputs= 0, */ 2686 /* .audio_inputs= 0, */
2682 .svhs = 1, 2687 .svhs = 1,
2683 .muxsel = { 2, 0, 1, 3 }, 2688 .muxsel = MUXSEL(2, 0, 1, 3),
2684 .tuner_type = TUNER_ABSENT, 2689 .tuner_type = TUNER_ABSENT,
2685 .tuner_addr = ADDR_UNSET, 2690 .tuner_addr = ADDR_UNSET,
2686 }, 2691 },
@@ -2692,7 +2697,7 @@ struct tvcard bttv_tvcards[] = {
2692 .video_inputs = 3, 2697 .video_inputs = 3,
2693 /* .audio_inputs= 1, */ 2698 /* .audio_inputs= 1, */
2694 .svhs = 2, 2699 .svhs = 2,
2695 .muxsel = { 2, 3, 1 }, 2700 .muxsel = MUXSEL(2, 3, 1),
2696 .gpiomask = 0x00e00007, 2701 .gpiomask = 0x00e00007,
2697 .gpiomux = { 0x00400005, 0, 0x00000001, 0 }, 2702 .gpiomux = { 0x00400005, 0, 0x00000001, 0 },
2698 .gpiomute = 0x00c00007, 2703 .gpiomute = 0x00c00007,
@@ -2707,7 +2712,7 @@ struct tvcard bttv_tvcards[] = {
2707 /* .audio_inputs= 1, */ 2712 /* .audio_inputs= 1, */
2708 .svhs = 2, 2713 .svhs = 2,
2709 .gpiomask = 0x3014f, 2714 .gpiomask = 0x3014f,
2710 .muxsel = { 2, 3, 1, 1 }, 2715 .muxsel = MUXSEL(2, 3, 1, 1),
2711 .gpiomux = { 0x20001,0x10001, 0, 0 }, 2716 .gpiomux = { 0x20001,0x10001, 0, 0 },
2712 .gpiomute = 10, 2717 .gpiomute = 10,
2713 .needs_tvaudio = 1, 2718 .needs_tvaudio = 1,
@@ -2722,8 +2727,7 @@ struct tvcard bttv_tvcards[] = {
2722 /* .audio_inputs= 0, */ 2727 /* .audio_inputs= 0, */
2723 .svhs = NO_SVHS, 2728 .svhs = NO_SVHS,
2724 .gpiomask = 0x0, 2729 .gpiomask = 0x0,
2725 .muxsel = { 2, 2, 2, 2, 2, 2, 2, 2, 2730 .muxsel = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
2726 2, 2, 2, 2, 2, 2, 2, 2 },
2727 .muxsel_hook = geovision_muxsel, 2731 .muxsel_hook = geovision_muxsel,
2728 .gpiomux = { 0 }, 2732 .gpiomux = { 0 },
2729 .no_msp34xx = 1, 2733 .no_msp34xx = 1,
@@ -2740,7 +2744,7 @@ struct tvcard bttv_tvcards[] = {
2740 /* .audio_inputs= 1, */ 2744 /* .audio_inputs= 1, */
2741 .svhs = 2, 2745 .svhs = 2,
2742 .gpiomask = 0x008007, 2746 .gpiomask = 0x008007,
2743 .muxsel = { 2, 3, 1, 1 }, 2747 .muxsel = MUXSEL(2, 3, 1, 1),
2744 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */ 2748 .gpiomux = { 0, 1, 2, 2 }, /* CONTVFMi */
2745 .gpiomute = 3, /* CONTVFMi */ 2749 .gpiomute = 3, /* CONTVFMi */
2746 .needs_tvaudio = 0, 2750 .needs_tvaudio = 0,
@@ -2764,7 +2768,7 @@ struct tvcard bttv_tvcards[] = {
2764 11 -> internal audio input 2768 11 -> internal audio input
2765 */ 2769 */
2766 .gpiomask = 0x060040, 2770 .gpiomask = 0x060040,
2767 .muxsel = { 2, 3, 3 }, 2771 .muxsel = MUXSEL(2, 3, 3),
2768 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 }, 2772 .gpiomux = { 0x60000, 0x60000, 0x20000, 0x20000 },
2769 .gpiomute = 0, 2773 .gpiomute = 0,
2770 .tuner_type = TUNER_TCL_MF02GIP_5N, 2774 .tuner_type = TUNER_TCL_MF02GIP_5N,
@@ -2780,7 +2784,7 @@ struct tvcard bttv_tvcards[] = {
2780 /* .audio_inputs= 0, */ 2784 /* .audio_inputs= 0, */
2781 .svhs = NO_SVHS, 2785 .svhs = NO_SVHS,
2782 .gpiomask = 0x00, 2786 .gpiomask = 0x00,
2783 .muxsel = { 0, 2, 3, 1 }, 2787 .muxsel = MUXSEL(0, 2, 3, 1),
2784 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2788 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2785 .needs_tvaudio = 0, 2789 .needs_tvaudio = 0,
2786 .pll = PLL_28, 2790 .pll = PLL_28,
@@ -2794,7 +2798,7 @@ struct tvcard bttv_tvcards[] = {
2794 /* .audio_inputs= 0, */ 2798 /* .audio_inputs= 0, */
2795 .svhs = 3, 2799 .svhs = 3,
2796 .gpiomask = 0x00, 2800 .gpiomask = 0x00,
2797 .muxsel = { 2, 3, 1 }, 2801 .muxsel = MUXSEL(2, 3, 1),
2798 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2802 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2799 .needs_tvaudio = 0, 2803 .needs_tvaudio = 0,
2800 .pll = PLL_28, 2804 .pll = PLL_28,
@@ -2808,7 +2812,7 @@ struct tvcard bttv_tvcards[] = {
2808 /* .audio_inputs= 0, */ 2812 /* .audio_inputs= 0, */
2809 .svhs = 3, 2813 .svhs = 3,
2810 .gpiomask = 0x00, 2814 .gpiomask = 0x00,
2811 .muxsel = { 3, 2, 1 }, 2815 .muxsel = MUXSEL(3, 2, 1),
2812 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */ 2816 .gpiomux = { 0, 0, 0, 0 }, /* card has no audio */
2813 .needs_tvaudio = 0, 2817 .needs_tvaudio = 0,
2814 .pll = PLL_28, 2818 .pll = PLL_28,