Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[pandora-kernel.git] / drivers / media / video / bt8xx / bttv-cards.c
index d545d48..fdb4adf 100644 (file)
@@ -73,6 +73,11 @@ static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
 
 static void geovision_muxsel(struct bttv *btv, unsigned int input);
 
+static void phytec_muxsel(struct bttv *btv, unsigned int input);
+
+static void gv800s_muxsel(struct bttv *btv, unsigned int input);
+static void gv800s_init(struct bttv *btv);
+
 static int terratec_active_radio_upgrade(struct bttv *btv);
 static int tea5757_read(struct bttv *btv);
 static int tea5757_write(struct bttv *btv, int value);
@@ -91,12 +96,10 @@ static unsigned int pll[BTTV_MAX]    = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
 static unsigned int tuner[BTTV_MAX]  = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
 static unsigned int svhs[BTTV_MAX]   = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
 static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
+static unsigned int audiodev[BTTV_MAX];
+static unsigned int saa6588[BTTV_MAX];
 static struct bttv  *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
-#ifdef MODULE
-static unsigned int autoload = 1;
-#else
-static unsigned int autoload;
-#endif
+static unsigned int autoload = UNSET;
 static unsigned int gpiomask = UNSET;
 static unsigned int audioall = UNSET;
 static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
@@ -115,6 +118,7 @@ module_param_array(pll,      int, NULL, 0444);
 module_param_array(tuner,    int, NULL, 0444);
 module_param_array(svhs,     int, NULL, 0444);
 module_param_array(remote,   int, NULL, 0444);
+module_param_array(audiodev, int, NULL, 0444);
 module_param_array(audiomux, int, NULL, 0444);
 
 MODULE_PARM_DESC(triton1,"set ETBF pci config bit "
@@ -125,7 +129,14 @@ MODULE_PARM_DESC(latency,"pci latency timer");
 MODULE_PARM_DESC(card,"specify TV/grabber card model, see CARDLIST file for a list");
 MODULE_PARM_DESC(pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz)");
 MODULE_PARM_DESC(tuner,"specify installed tuner type");
-MODULE_PARM_DESC(autoload,"automatically load i2c modules like tuner.o, default is 1 (yes)");
+MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
+MODULE_PARM_DESC(audiodev, "specify audio device:\n"
+               "\t\t-1 = no audio\n"
+               "\t\t 0 = autodetect (default)\n"
+               "\t\t 1 = msp3400\n"
+               "\t\t 2 = tda7432\n"
+               "\t\t 3 = tvaudio");
+MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
 MODULE_PARM_DESC(no_overlay,"allow override overlay default (0 disables, 1 enables)"
                " [some VIA/SIS chipsets are known to have problem with overlay]");
 
@@ -293,6 +304,8 @@ static struct CARD {
        /* Duplicate PCI ID, reconfigure for this board during the eeprom read.
        * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB,  "Hauppauge ImpactVCB" }, */
 
+       { 0x109e036e, BTTV_BOARD_CONCEPTRONIC_CTVFMI2,  "Conceptronic CTVFMi v2"},
+
        /* DVB cards (using pci function .1 for mpeg data xfer) */
        { 0x001c11bd, BTTV_BOARD_PINNACLESAT,   "Pinnacle PCTV Sat" },
        { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
@@ -309,6 +322,20 @@ static struct CARD {
        { 0xd200dbc0, BTTV_BOARD_DVICO_FUSIONHDTV_2,    "DViCO FusionHDTV 2" },
        { 0x763c008a, BTTV_BOARD_GEOVISION_GV600,       "GeoVision GV-600" },
        { 0x18011000, BTTV_BOARD_ENLTV_FM_2,    "Encore ENL TV-FM-2" },
+       { 0x763d800a, BTTV_BOARD_GEOVISION_GV800S, "GeoVision GV-800(S) (master)" },
+       { 0x763d800b, BTTV_BOARD_GEOVISION_GV800S_SL,   "GeoVision GV-800(S) (slave)" },
+       { 0x763d800c, BTTV_BOARD_GEOVISION_GV800S_SL,   "GeoVision GV-800(S) (slave)" },
+       { 0x763d800d, BTTV_BOARD_GEOVISION_GV800S_SL,   "GeoVision GV-800(S) (slave)" },
+
+       { 0x15401830, BTTV_BOARD_PV183,         "Provideo PV183-1" },
+       { 0x15401831, BTTV_BOARD_PV183,         "Provideo PV183-2" },
+       { 0x15401832, BTTV_BOARD_PV183,         "Provideo PV183-3" },
+       { 0x15401833, BTTV_BOARD_PV183,         "Provideo PV183-4" },
+       { 0x15401834, BTTV_BOARD_PV183,         "Provideo PV183-5" },
+       { 0x15401835, BTTV_BOARD_PV183,         "Provideo PV183-6" },
+       { 0x15401836, BTTV_BOARD_PV183,         "Provideo PV183-7" },
+       { 0x15401837, BTTV_BOARD_PV183,         "Provideo PV183-8" },
+
        { 0, -1, NULL }
 };
 
@@ -321,7 +348,7 @@ struct tvcard bttv_tvcards[] = {
                .name           = " *** UNKNOWN/GENERIC *** ",
                .video_inputs   = 4,
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .tuner_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
        },
@@ -331,7 +358,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 0, 0, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 1,
@@ -344,7 +371,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -357,7 +384,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 4, 0, 2, 3 },
                .gpiomute       = 1,
                .no_msp34xx     = 1,
@@ -375,7 +402,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 2,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .tuner_type     = TUNER_ABSENT,
@@ -387,7 +414,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 3,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0, 1, 0, 1 },
                .gpiomute       = 3,
                .needs_tvaudio  = 1,
@@ -399,7 +426,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 1, */
                .svhs           = 3,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomask       = 0x0f,
                .gpiomux        = { 0x0c, 0x04, 0x08, 0x04 },
                /*                0x04 for some cards ?? */
@@ -415,7 +442,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 3,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0, 0),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 1,
                .tuner_type     = TUNER_ABSENT,
@@ -429,7 +456,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xc00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0xc00, 0x800, 0x400 },
                .gpiomute       = 0xc00,
                .needs_tvaudio  = 1,
@@ -443,7 +470,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 3,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 1, 2, 3 },
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
@@ -456,7 +483,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x0f, /* old: 7 */
-               .muxsel         = { 2, 0, 1, 1 },
+               .muxsel         = MUXSEL(2, 0, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -470,7 +497,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x3014f,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x20001,0x10001, 0, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 1,
@@ -485,7 +512,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 13, 14, 11, 7 },
                .needs_tvaudio  = 1,
                .tuner_type     = UNSET,
@@ -497,7 +524,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 4, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 13, 14, 11, 7 },
                .needs_tvaudio  = 1,
                .msp34xx_alt    = 1,
@@ -513,7 +540,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 2, 1, 3 }, /* old: {0, 1, 2, 3, 4} */
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -527,7 +554,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 1, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 1,
@@ -542,7 +569,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x01fe00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                /* 2003-10-20 by "Anton A. Arapov" <arapov@mail.ru> */
                .gpiomux        = { 0x001e00, 0, 0x018000, 0x014000 },
                .gpiomute       = 0x002000,
@@ -557,7 +584,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x8300f8,
-               .muxsel         = { 2, 3, 1, 1,0 },
+               .muxsel         = MUXSEL(2, 3, 1, 1, 0),
                .gpiomux        = { 0x4fa007,0xcfa007,0xcfa007,0xcfa007 },
                .gpiomute       = 0xcfa007,
                .needs_tvaudio  = 1,
@@ -572,7 +599,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2, */
                .svhs           = 2,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 0, 0, 0 },
                .needs_tvaudio  = 1,
                .tuner_type     = UNSET,
@@ -584,7 +611,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x8dff00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0 },
                .no_msp34xx     = 1,
                .tuner_type     = TUNER_ABSENT,
@@ -597,7 +624,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 3, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .tuner_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
        },
@@ -607,7 +634,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2,  tuner, line in */
                .svhs           = 2,
                .gpiomask       = 0x1800,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -620,7 +647,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xc00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 0x800, 0x400 },
                .gpiomute       = 0xc00,
                .needs_tvaudio  = 1,
@@ -635,7 +662,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = NO_SVHS,
                .has_dig_in     = 1,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 0 }, /* input 2 is digital */
+               .muxsel         = MUXSEL(2, 3, 0), /* input 2 is digital */
                /* .digital_mode= DIGITAL_MODE_CAMERA, */
                .gpiomux        = { 0, 0, 0, 0 },
                .no_msp34xx     = 1,
@@ -651,7 +678,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xe00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = {0x400, 0x400, 0x400, 0x400 },
                .gpiomute       = 0xc00,
                .needs_tvaudio  = 1,
@@ -666,7 +693,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x1f0fff,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x20000, 0x30000, 0x10000, 0 },
                .gpiomute       = 0x40000,
                .needs_tvaudio  = 0,
@@ -680,7 +707,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 3,
                .gpiomask       = 7,
-               .muxsel         = { 2, 0, 1, 1 },
+               .muxsel         = MUXSEL(2, 0, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -693,7 +720,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2, */
                .svhs           = 2,
                .gpiomask       = 0x1800,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -708,7 +735,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x1f0fff,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x20000, 0x30000, 0x10000, 0x00000 },
                .gpiomute       = 0x40000,
                .needs_tvaudio  = 0,
@@ -754,7 +781,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 1, /* was: 4 */
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0, 0},
+               .muxsel         = MUXSEL(2, 3, 1, 0, 0),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 1,
                .tuner_type     = TUNER_ABSENT,
@@ -768,7 +795,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x1800,  /* 0x8dfe00 */
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x0800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -781,7 +808,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 3,
                .gpiomask       = 1,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 0, 0, 0 },
                .pll            = PLL_28,
                .tuner_type     = TUNER_PHILIPS_PAL,
@@ -795,7 +822,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 2,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .tuner_type     = TUNER_ABSENT,
@@ -807,7 +834,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xffff00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x500, 0, 0x300, 0x900 },
                .gpiomute       = 0x900,
                .needs_tvaudio  = 1,
@@ -820,7 +847,8 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 1, 0 }, /* TV, CVid, SVid, CVid over SVid connector */
+               /* TV, CVid, SVid, CVid over SVid connector */
+               .muxsel         = MUXSEL(2, 3, 1, 1, 0),
                /* Alexander Varakin <avarakin@hotmail.com> [stereo version] */
                .gpiomask       = 0xb33000,
                .gpiomux        = { 0x122000,0x1000,0x0000,0x620000 },
@@ -850,7 +878,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 0x1800,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -865,7 +893,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 0x1800,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -879,7 +907,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xff,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x21, 0x20, 0x24, 0x2c },
                .gpiomute       = 0x29,
                .no_msp34xx     = 1,
@@ -893,7 +921,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x551e00,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0x551400, 0x551200, 0, 0 },
                .gpiomute       = 0x551c00,
                .needs_tvaudio  = 1,
@@ -908,7 +936,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x03000F,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 0xd0001, 0, 0 },
                .gpiomute       = 1,
                .needs_tvaudio  = 0,
@@ -924,7 +952,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 4, 0, 2, 3 },
                .gpiomute       = 1,
                .no_msp34xx     = 1,
@@ -940,7 +968,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 4, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 13, 4, 11, 7 },
                .needs_tvaudio  = 1,
                .pll            = PLL_28,
@@ -955,7 +983,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 1},
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 0, 0},
                .needs_tvaudio  = 1,
                .no_msp34xx     = 1,
@@ -969,7 +997,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xe00b,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0xff9ff6, 0xff9ff6, 0xff1ff7, 0 },
                .gpiomute       = 0xff3ffc,
                .no_msp34xx     = 1,
@@ -984,7 +1012,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
                .gpiomask       = 3,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 1, 0, 2 },
                .gpiomute       = 3,
                .no_msp34xx     = 1,
@@ -998,7 +1026,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 3,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0, 0),
                .gpiomux        = { 0 },
                .no_msp34xx     = 1,
                .pll            = PLL_28,
@@ -1011,7 +1039,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xbcf03f,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0xbc803f, 0xbc903f, 0xbcb03f, 0 },
                .gpiomute       = 0xbcb03f,
                .no_msp34xx     = 1,
@@ -1025,7 +1053,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x70000,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x20000, 0x30000, 0x10000, 0 },
                .gpiomute       = 0x40000,
                .needs_tvaudio  = 1,
@@ -1043,7 +1071,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = {2,0,0,0 },
                .gpiomute       = 1,
                .needs_tvaudio  = 1,
@@ -1057,7 +1085,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x010f00,
-               .muxsel         = {2, 3, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 0, 0),
                .gpiomux        = {0x10000, 0, 0x10000, 0 },
                .no_msp34xx     = 1,
                .pll            = PLL_28,
@@ -1072,7 +1100,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = 3,
                .has_dig_in     = 1,
                .gpiomask       = 0xAA0000,
-               .muxsel         = { 2, 3, 1, 1, 0 }, /* input 4 is digital */
+               .muxsel         = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
                /* .digital_mode= DIGITAL_MODE_CAMERA, */
                .gpiomux        = { 0x20000, 0, 0x80000, 0x80000 },
                .gpiomute       = 0xa8000,
@@ -1097,7 +1125,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 0, 1, 1 },
+               .muxsel         = MUXSEL(2, 0, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .pll            = PLL_28,
@@ -1113,7 +1141,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 3,
                .gpiomask       = 0x03000F,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 0xd0001, 0, 0 },
                .gpiomute       = 10,
                                /* sound path (5 sources):
@@ -1138,7 +1166,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 0x1c,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 0x10, 8 },
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -1158,7 +1186,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x18e0,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x0000,0x0800,0x1000,0x1000 },
                .gpiomute       = 0x18e0,
                        /* For cards with tda9820/tda9821:
@@ -1177,7 +1205,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xF,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 2, 0, 0, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 0,
@@ -1194,7 +1222,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 0x1800,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0x800, 0x1000, 0x1000 },
                .gpiomute       = 0x1800,
                .pll            = PLL_28,
@@ -1210,7 +1238,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 1,
                .gpiomask       = 0,
-               .muxsel         = { 3, 1 },
+               .muxsel         = MUXSEL(3, 1),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .no_msp34xx     = 1,
@@ -1225,7 +1253,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xe00,
-               .muxsel         = { 2, 3, 1, 1},
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x400, 0x400, 0x400, 0x400 },
                .gpiomute       = 0x800,
                .needs_tvaudio  = 1,
@@ -1240,7 +1268,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x03000F,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 2, 0, 0, 0 },
                .gpiomute       = 1,
                .pll            = PLL_28,
@@ -1256,7 +1284,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2, */
                .svhs           = NO_SVHS,
                .gpiomask       = 11,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 0, 0, 1 },
                .gpiomute       = 8,
                .pll            = PLL_35,
@@ -1270,7 +1298,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 1,
                .gpiomask       = 0xF,
-               .muxsel         = { 2, 2 },
+               .muxsel         = MUXSEL(2, 2),
                .gpiomux        = { },
                .no_msp34xx     = 1,
                .needs_tvaudio  = 0,
@@ -1287,7 +1315,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2, */
                .svhs           = 2,
                .gpiomask       = 0xFF,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 1, 0, 4, 4 },
                .gpiomute       = 9,
                .needs_tvaudio  = 0,
@@ -1302,7 +1330,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xf03f,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0xbffe, 0, 0xbfff, 0 },
                .gpiomute       = 0xbffe,
                .pll            = PLL_28,
@@ -1318,7 +1346,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
                .gpiomask       = 1,
-               .muxsel         = { 2, 3, 0, 1 },
+               .muxsel         = MUXSEL(2, 3, 0, 1),
                .gpiomux        = { 0, 0, 1, 0 },
                .no_msp34xx     = 1,
                .pll            = PLL_28,
@@ -1332,7 +1360,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 0x18e0,
-               .muxsel         = { 2, 3, 0, 1 },
+               .muxsel         = MUXSEL(2, 3, 0, 1),
                                /* Radio changed from 1e80 to 0x800 to make
                                FlyVideo2000S in .hu happy (gm)*/
                                /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
@@ -1352,7 +1380,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0xffff00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x500, 0x500, 0x300, 0x900 },
                .gpiomute       = 0x900,
                .needs_tvaudio  = 1,
@@ -1368,7 +1396,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x010f00,
-               .muxsel         = {2, 3, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 0, 0),
                .gpiomux        = {0x10000, 0, 0x10000, 0 },
                .no_msp34xx     = 1,
                .pll            = PLL_28,
@@ -1392,7 +1420,7 @@ struct tvcard bttv_tvcards[] = {
                .gpiomute       = 0x947fff,
                /* tvtuner, radio,   external,internal, mute,  stereo
                * tuner, Composit, SVid, Composit-on-Svid-adapter */
-               .muxsel         = { 2, 3 ,0 ,1 },
+               .muxsel         = MUXSEL(2, 3, 0, 1),
                .tuner_type     = TUNER_MT2032,
                .tuner_addr     = ADDR_UNSET,
                .pll            = PLL_28,
@@ -1412,7 +1440,7 @@ struct tvcard bttv_tvcards[] = {
                .gpiomute       = 0x947fff,
                /* tvtuner, radio,   external,internal, mute,  stereo
                * tuner, Composit, SVid, Composit-on-Svid-adapter */
-               .muxsel         = { 2, 3 ,0 ,1 },
+               .muxsel         = MUXSEL(2, 3, 0, 1),
                .tuner_type     = TUNER_MT2032,
                .tuner_addr     = ADDR_UNSET,
                .pll            = PLL_28,
@@ -1426,7 +1454,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
                .pll            = PLL_28,
-               .muxsel         = { 2 },
+               .muxsel         = MUXSEL(2),
                .gpiomask       = 0
        },
        [BTTV_BOARD_PV_BT878P_PLUS] = {
@@ -1436,7 +1464,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 4, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 11, 7 }, /* TV and Radio with same GPIO ! */
                .gpiomute       = 13,
                .needs_tvaudio  = 1,
@@ -1457,7 +1485,8 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 0, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 1 }, /* AV1, AV2, SVHS, CVid adapter on SVHS */
+               /* AV1, AV2, SVHS, CVid adapter on SVHS */
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .pll            = PLL_28,
                .no_msp34xx     = 1,
                .tuner_type     = TUNER_ABSENT,
@@ -1472,7 +1501,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x3f,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x01, 0x00, 0x03, 0x03 },
                .gpiomute       = 0x09,
                .needs_tvaudio  = 1,
@@ -1500,7 +1529,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 4,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0, 0),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .tuner_type     = TUNER_ABSENT,
@@ -1514,8 +1543,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = NO_SVHS,
                .gpiomask       = 0x00,
                .gpiomask2      = 0x07ff,
-               .muxsel         = { 0x33, 0x13, 0x23, 0x43, 0xf3, 0x73, 0xe3, 0x03,
-                               0xd3, 0xb3, 0xc3, 0x63, 0x93, 0x53, 0x83, 0xa3 },
+               .muxsel         = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .tuner_type     = TUNER_ABSENT,
@@ -1528,7 +1556,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 2, */
                .svhs           = 2,
                .gpiomask       = 0x1C800F,  /* Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset */
-               .muxsel         = { 2, 1, 1, },
+               .muxsel         = MUXSEL(2, 1, 1),
                .gpiomux        = { 0, 1, 2, 2 },
                .gpiomute       = 4,
                .needs_tvaudio  = 0,
@@ -1546,7 +1574,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x140007,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .tuner_type     = TUNER_PHILIPS_NTSC,
@@ -1559,7 +1587,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .no_msp34xx     = 1,
@@ -1573,7 +1601,8 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 3, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },   /* Tuner, SVid, SVHS, SVid to SVHS connector */
+               /* Tuner, SVid, SVHS, SVid to SVHS connector */
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 4, 4 },/* Yes, this tuner uses the same audio output for TV and FM radio!
                                                * This card lacks external Audio In, so we mute it on Ext. & Int.
                                                * The PCB can take a sbx1637/sbx1673, wiring unknown.
@@ -1605,7 +1634,7 @@ struct tvcard bttv_tvcards[] = {
                .name           = "DSP Design TCVIDEO",
                .video_inputs   = 4,
                .svhs           = NO_SVHS,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .pll            = PLL_28,
                .tuner_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
@@ -1617,7 +1646,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 0, 1, 1 },
+               .muxsel         = MUXSEL(2, 0, 1, 1),
                .needs_tvaudio  = 1,
                .pll            = PLL_28,
                .tuner_type     = UNSET,
@@ -1632,7 +1661,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x0f0f80,
-               .muxsel         = {2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = {0x030000, 0x010000, 0, 0 },
                .gpiomute       = 0x020000,
                .no_msp34xx     = 1,
@@ -1647,7 +1676,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,                  /* id-inputs-clock */
                /* .audio_inputs= 0, */
                .svhs           = 3,
-               .muxsel         = { 3, 2, 0, 1 },
+               .muxsel         = MUXSEL(3, 2, 0, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1660,7 +1689,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 0, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1 },
+               .muxsel         = MUXSEL(2, 3, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1675,7 +1704,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 0, */
                .svhs           = 1,
-               .muxsel         = { 3, 1 },
+               .muxsel         = MUXSEL(3, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1688,7 +1717,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 1,
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 0 },
+               .muxsel         = MUXSEL(0),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1701,7 +1730,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 0, */
                .svhs           = 1,
-               .muxsel         = { 0, 1 },
+               .muxsel         = MUXSEL(0, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1714,7 +1743,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 1,
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 0 },
+               .muxsel         = MUXSEL(0),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1729,7 +1758,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 1, */
                .svhs           = 1,
-               .muxsel         = { 0, 1 },
+               .muxsel         = MUXSEL(0, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1742,7 +1771,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 1, */
                .svhs           = 1,
-               .muxsel         = { 2, 3 },
+               .muxsel         = MUXSEL(2, 3),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1755,7 +1784,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 1, */
                .svhs           = 1,
-               .muxsel         = { 2, 3 },
+               .muxsel         = MUXSEL(2, 3),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1781,7 +1810,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 1, */
                .svhs           = 1,
-               .muxsel         = { 2, 3 },
+               .muxsel         = MUXSEL(2, 3),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1798,7 +1827,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_addr     = ADDR_UNSET,
                .svhs           = NO_SVHS,
                .gpiomask       = 0,
-               .muxsel         = { 0, 1, 2, 3 },
+               .muxsel         = MUXSEL(2, 2, 2, 2),
                .muxsel_hook    = eagle_muxsel,
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
@@ -1814,7 +1843,7 @@ struct tvcard bttv_tvcards[] = {
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
-               .muxsel         = { 3, 1 },
+               .muxsel         = MUXSEL(3, 1),
                .pll            = PLL_28,
                .no_gpioirq     = 1,
                .has_dvb        = 1,
@@ -1826,7 +1855,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = 3,
                .gpiomask       = 2,
                /* TV, Comp1, Composite over SVID con, SVID */
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 2, 0, 0 },
                .pll            = PLL_28,
                .has_radio      = 1,
@@ -1848,7 +1877,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1},
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 3},
                .gpiomute       = 4,
                .needs_tvaudio  = 1,
@@ -1865,7 +1894,7 @@ struct tvcard bttv_tvcards[] = {
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
-               .muxsel         = { 2, 0, 1},
+               .muxsel         = MUXSEL(2, 0, 1),
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
@@ -1877,7 +1906,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3 },
+               .muxsel         = MUXSEL(2, 3),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .no_msp34xx     = 1,
@@ -1893,7 +1922,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x001e8007,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                /*                  Tuner, Radio, external, internal, off,  on */
                .gpiomux        = { 0x08,  0x0f,  0x0a,     0x08 },
                .gpiomute       = 0x0f,
@@ -1912,7 +1941,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .needs_tvaudio  = 1,
                .no_msp34xx     = 1,
                .pll            = PLL_28,
@@ -1933,7 +1962,8 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 1 }, /* Tuner, CVid, SVid, CVid over SVid connector */
+               /* Tuner, CVid, SVid, CVid over SVid connector */
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomask       = 0,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -1957,7 +1987,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_addr     = ADDR_UNSET,
                .svhs           = NO_SVHS,
                .gpiomask       = 0xdf,
-               .muxsel         = { 2 },
+               .muxsel         = MUXSEL(2),
                .pll            = PLL_28,
        },
        [BTTV_BOARD_IVCE8784] = {
@@ -1968,7 +1998,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_addr     = ADDR_UNSET,
                .svhs           = NO_SVHS,
                .gpiomask       = 0xdf,
-               .muxsel         = { 2 },
+               .muxsel         = MUXSEL(2),
                .pll            = PLL_28,
        },
        [BTTV_BOARD_XGUARD] = {
@@ -1979,7 +2009,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
                .gpiomask2      = 0xff,
-               .muxsel         = { 2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0 },
+               .muxsel         = MUXSEL(2,2,2,2, 3,3,3,3, 1,1,1,1, 0,0,0,0),
                .muxsel_hook    = xguard_muxsel,
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
@@ -1992,7 +2022,7 @@ struct tvcard bttv_tvcards[] = {
                .name           = "Nebula Electronics DigiTV",
                .video_inputs   = 1,
                .svhs           = NO_SVHS,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2011,7 +2041,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0 },
                .needs_tvaudio  = 0,
                .no_msp34xx     = 1,
@@ -2026,7 +2056,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 3,
                .gpiomask       = 0x00,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
@@ -2039,7 +2069,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 3,
                .gpiomask       = 0x00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
@@ -2054,10 +2084,9 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 9,
                .gpiomask       = 0x00,
-               .gpiomask2      = 0x03, /* gpiomask2 defines the bits used to switch audio
-                                       via the upper nibble of muxsel. here: used for
-                                       xternal video-mux */
-               .muxsel         = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x00 },
+               .gpiomask2      = 0x03, /* used for external vodeo mux */
+               .muxsel         = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 0),
+               .muxsel_hook    = phytec_muxsel,
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 1,
                .pll            = PLL_28,
@@ -2070,10 +2099,9 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 9,
                .gpiomask       = 0x00,
-               .gpiomask2      = 0x03, /* gpiomask2 defines the bits used to switch audio
-                                       via the upper nibble of muxsel. here: used for
-                                       xternal video-mux */
-               .muxsel         = { 0x02, 0x12, 0x22, 0x32, 0x03, 0x13, 0x23, 0x33, 0x01, 0x01 },
+               .gpiomask2      = 0x03, /* used for external vodeo mux */
+               .muxsel         = MUXSEL(2, 2, 2, 2, 3, 3, 3, 3, 1, 1),
+               .muxsel_hook    = phytec_muxsel,
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 1,
                .pll            = PLL_28,
@@ -2088,7 +2116,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_addr     = ADDR_UNSET,
                .svhs           = NO_SVHS,
                .gpiomask       = 0xdf,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .pll            = PLL_28,
        },
        [BTTV_BOARD_IVC120] = {
@@ -2104,8 +2132,7 @@ struct tvcard bttv_tvcards[] = {
                .no_tda9875     = 1,
                .no_tda7432     = 1,
                .gpiomask       = 0x00,
-               .muxsel         = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                               0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
+               .muxsel         = MUXSEL(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                .muxsel_hook    = ivc120_muxsel,
                .pll            = PLL_28,
        },
@@ -2116,7 +2143,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .tuner_type     = TUNER_PHILIPS_FCV1236D,
                .tuner_addr     = ADDR_UNSET,
                .has_dvb        = 1,
@@ -2136,7 +2163,8 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 0, */
                .svhs           = 1,
-               .muxsel         = { 3, 1, 1, 3 }, /* Vid In, SVid In, Vid over SVid in connector */
+               /* Vid In, SVid In, Vid over SVid in connector */
+               .muxsel         = MUXSEL(3, 1, 1, 3),
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2150,7 +2178,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 3,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 1, 1, 1, 1 },
                .needs_tvaudio  = 1,
                .tuner_type     = TUNER_PHILIPS_PAL,
@@ -2167,7 +2195,7 @@ struct tvcard bttv_tvcards[] = {
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
                .pll            = PLL_28,
-               .muxsel         = { 2, 2, 2, 2 },
+               .muxsel         = MUXSEL(2, 2, 2, 2),
                .gpiomask       = 0x3F,
                .muxsel_hook    = gvc1100_muxsel,
        },
@@ -2177,7 +2205,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                .svhs           = 2,
                .gpiomask       = 0x008007,
-               .muxsel         = { 2, 3, 0, 0 },
+               .muxsel         = MUXSEL(2, 3, 0, 0),
                .gpiomux        = { 0, 0, 0, 0 },
                .gpiomute       = 0x000003,
                .pll            = PLL_28,
@@ -2191,7 +2219,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4, /* IN1,IN2,IN3,IN4 */
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2209,7 +2237,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = 2,
                .needs_tvaudio  = 0,
                .gpiomask       = 0x68,
-               .muxsel         = { 2, 3, 1 },
+               .muxsel         = MUXSEL(2, 3, 1),
                .gpiomux        = { 0x68, 0x68, 0x61, 0x61 },
                .pll            = PLL_28,
        },
@@ -2223,7 +2251,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x008007,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 2 },
                .gpiomute       = 3,
                .needs_tvaudio  = 0,
@@ -2247,7 +2275,8 @@ struct tvcard bttv_tvcards[] = {
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
-               .muxsel         = {2,2,2,2},/*878A input is always MUX0, see above.*/
+               /*878A input is always MUX0, see above.*/
+               .muxsel         = MUXSEL(2, 2, 2, 2),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .pll            = PLL_28,
                .needs_tvaudio  = 0,
@@ -2263,7 +2292,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x0000000f,
-               .muxsel         = { 2, 1, 1 },
+               .muxsel         = MUXSEL(2, 1, 1),
                .gpiomux        = { 0x02, 0x00, 0x00, 0x00 },
                .tuner_type     = TUNER_TEMIC_PAL,
                .tuner_addr     = ADDR_UNSET,
@@ -2277,7 +2306,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = 1,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
-               .muxsel         = { 3 , 3 },
+               .muxsel         = MUXSEL(3, 3),
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2293,7 +2322,7 @@ struct tvcard bttv_tvcards[] = {
                .name           = "AverMedia AverTV DVB-T 761",
                .video_inputs   = 2,
                .svhs           = 1,
-               .muxsel         = { 3, 1, 2, 0 }, /* Comp0, S-Video, ?, ? */
+               .muxsel         = MUXSEL(3, 1, 2, 0), /* Comp0, S-Video, ?, ? */
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2311,8 +2340,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x0,
-               .muxsel         = { 2, 2, 2, 2, 2, 2, 2, 2,
-                                   3, 3, 3, 3, 3, 3, 3, 3 },
+               .muxsel         = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3),
                .muxsel_hook    = sigmaSQ_muxsel,
                .gpiomux        = { 0 },
                .no_msp34xx     = 1,
@@ -2327,7 +2355,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x0,
-               .muxsel         = { 2, 2, 2, 2 },
+               .muxsel         = MUXSEL(2, 2, 2, 2),
                .muxsel_hook    = sigmaSLC_muxsel,
                .gpiomux        = { 0 },
                .no_msp34xx     = 1,
@@ -2344,7 +2372,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0xFF,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 0, 0, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 0,
@@ -2375,7 +2403,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x3f,
-               .muxsel         = {2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .gpiomux        = {0x31, 0x31, 0x31, 0x31 },
                .gpiomute       = 0x31,
                .no_msp34xx     = 1,
@@ -2390,7 +2418,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .tuner_type     = TUNER_PHILIPS_NTSC,
                .tuner_addr     = ADDR_UNSET,
                .gpiomask       = 0x008007,
@@ -2404,7 +2432,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 16,
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 },
+               .muxsel         = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
                .pll            = PLL_28,
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
@@ -2441,7 +2469,7 @@ struct tvcard bttv_tvcards[] = {
                */
                .gpiomask       = 0x0003ff,
                .no_gpioirq     = 1,
-               .muxsel         = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
+               .muxsel         = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
                .pll            = PLL_28,
                .no_msp34xx     = 1,
                .no_tda7432     = 1,
@@ -2463,7 +2491,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = NO_SVHS,
                .gpiomask       = 0x010000,
                .no_gpioirq     = 1,
-               .muxsel         = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 },
+               .muxsel         = MUXSEL(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3),
                .pll            = PLL_28,
                .no_msp34xx     = 1,
                .no_tda7432     = 1,
@@ -2478,7 +2506,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1, 0 },
+               .muxsel         = MUXSEL(2, 3, 1, 0),
                .tuner_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .pll            = PLL_28,
@@ -2492,7 +2520,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1 },
+               .muxsel         = MUXSEL(2, 3, 1),
                .gpiomask       = 0x00e00007,
                .gpiomux        = { 0x00400005, 0, 0x00000001, 0 },
                .gpiomute       = 0x00c00007,
@@ -2509,7 +2537,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x01fe00,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x001e00, 0, 0x018000, 0x014000 },
                .gpiomute       = 0x002000,
                .needs_tvaudio  = 1,
@@ -2525,7 +2553,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x001c0007,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 2 },
                .gpiomute       = 3,
                .needs_tvaudio  = 0,
@@ -2543,7 +2571,7 @@ struct tvcard bttv_tvcards[] = {
                .svhs           = 3,
                .has_dig_in     = 1,
                .gpiomask       = 0x01fe00,
-               .muxsel         = { 2, 3, 1, 1, 0 }, /* in 4 is digital */
+               .muxsel         = MUXSEL(2, 3, 1, 1, 0), /* in 4 is digital */
                /* .digital_mode= DIGITAL_MODE_CAMERA, */
                .gpiomux        = { 0x00400, 0x10400, 0x04400, 0x80000 },
                .gpiomute       = 0x12400,
@@ -2561,7 +2589,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x3f,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x21, 0x20, 0x24, 0x2c },
                .gpiomute       = 0x29,
                .no_msp34xx     = 1,
@@ -2589,7 +2617,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 2, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 2, 3, 0, 1 }, /* 3,0,1 are guesses */
+               .muxsel         = MUXSEL(2, 3, 0, 1), /* 3,0,1 are guesses */
                .gpiomask       = 0x303,
                .gpiomute       = 0x000, /* int + 32kHz */
                .gpiomux        = { 0, 0, 0x000, 0x100},
@@ -2607,7 +2635,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 15,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 2, 0, 0, 0 },
                .gpiomute       = 1,
                .needs_tvaudio  = 1,
@@ -2622,7 +2650,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x108007,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 100000, 100002, 100002, 100000 },
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
@@ -2639,7 +2667,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x0f, /* old: 7 */
-               .muxsel         = { 0, 1, 3, 2 }, /* Composite 0-3 */
+               .muxsel         = MUXSEL(0, 1, 3, 2), /* Composite 0-3 */
                .no_msp34xx     = 1,
                .no_tda9875     = 1,
                .no_tda7432     = 1,
@@ -2659,7 +2687,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 7,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 3 },
                .gpiomute       = 4,
                .tuner_type     = TUNER_TEMIC_4009FR5_PAL,
@@ -2673,7 +2701,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 4,
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
-               .muxsel         = { 0, 1, 2, 3 },
+               .muxsel         = MUXSEL(0, 1, 2, 3),
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
        },
@@ -2682,7 +2710,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 2,
                /* .audio_inputs= 0, */
                .svhs           = 1,
-               .muxsel         = { 2, 0, 1, 3 },
+               .muxsel         = MUXSEL(2, 0, 1, 3),
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
        },
@@ -2694,7 +2722,7 @@ struct tvcard bttv_tvcards[] = {
                .video_inputs   = 3,
                /* .audio_inputs= 1, */
                .svhs           = 2,
-               .muxsel         = { 2, 3, 1 },
+               .muxsel         = MUXSEL(2, 3, 1),
                .gpiomask       = 0x00e00007,
                .gpiomux        = { 0x00400005, 0, 0x00000001, 0 },
                .gpiomute       = 0x00c00007,
@@ -2709,7 +2737,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x3014f,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0x20001,0x10001, 0, 0 },
                .gpiomute       = 10,
                .needs_tvaudio  = 1,
@@ -2724,8 +2752,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x0,
-               .muxsel         = { 2, 2, 2, 2, 2, 2, 2, 2,
-                                   2, 2, 2, 2, 2, 2, 2, 2 },
+               .muxsel         = MUXSEL(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2),
                .muxsel_hook    = geovision_muxsel,
                .gpiomux        = { 0 },
                .no_msp34xx     = 1,
@@ -2742,7 +2769,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 1, */
                .svhs           = 2,
                .gpiomask       = 0x008007,
-               .muxsel         = { 2, 3, 1, 1 },
+               .muxsel         = MUXSEL(2, 3, 1, 1),
                .gpiomux        = { 0, 1, 2, 2 }, /* CONTVFMi */
                .gpiomute       = 3, /* CONTVFMi */
                .needs_tvaudio  = 0,
@@ -2766,7 +2793,7 @@ struct tvcard bttv_tvcards[] = {
                               11 -> internal audio input
                 */
                .gpiomask       = 0x060040,
-               .muxsel         = { 2, 3, 3 },
+               .muxsel         = MUXSEL(2, 3, 3),
                .gpiomux        = { 0x60000, 0x60000, 0x20000, 0x20000 },
                .gpiomute       = 0,
                .tuner_type     = TUNER_TCL_MF02GIP_5N,
@@ -2782,7 +2809,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = NO_SVHS,
                .gpiomask       = 0x00,
-               .muxsel         = { 0, 2, 3, 1 },
+               .muxsel         = MUXSEL(0, 2, 3, 1),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
@@ -2796,7 +2823,7 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 3,
                .gpiomask       = 0x00,
-               .muxsel         = { 2, 3, 1 },
+               .muxsel         = MUXSEL(2, 3, 1),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
@@ -2810,13 +2837,80 @@ struct tvcard bttv_tvcards[] = {
                /* .audio_inputs= 0, */
                .svhs           = 3,
                .gpiomask       = 0x00,
-               .muxsel         = { 3, 2, 1 },
+               .muxsel         = MUXSEL(3, 2, 1),
                .gpiomux        = { 0, 0, 0, 0 }, /* card has no audio */
                .needs_tvaudio  = 0,
                .pll            = PLL_28,
                .tuner_type     = TUNER_ABSENT,
                .tuner_addr     = ADDR_UNSET,
-       }
+       },
+               [BTTV_BOARD_GEOVISION_GV800S] = {
+               /* Bruno Christo <bchristo@inf.ufsm.br>
+                *
+                * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
+                *      1 audio input  per BT878A = 4 audio inputs
+                *      4 video inputs per BT878A = 16 video inputs
+                * This is the first BT878A chip of the GV-800(S). It's the
+                * "master" chip and it controls the video inputs through an
+                * analog multiplexer (a CD22M3494) via some GPIO pins. The
+                * slaves should use card type 0x9e (following this one).
+                * There is a EEPROM on the card which is currently not handled.
+                * The audio input is not working yet.
+                */
+               .name           = "Geovision GV-800(S) (master)",
+               .video_inputs   = 4,
+               /* .audio_inputs= 1, */
+               .tuner_type     = TUNER_ABSENT,
+               .tuner_addr     = ADDR_UNSET,
+               .svhs           = NO_SVHS,
+               .gpiomask       = 0xf107f,
+               .no_gpioirq     = 1,
+               .muxsel         = MUXSEL(2, 2, 2, 2),
+               .pll            = PLL_28,
+               .no_msp34xx     = 1,
+               .no_tda7432     = 1,
+               .no_tda9875     = 1,
+               .muxsel_hook    = gv800s_muxsel,
+       },
+               [BTTV_BOARD_GEOVISION_GV800S_SL] = {
+               /* Bruno Christo <bchristo@inf.ufsm.br>
+                *
+                * GeoVision GV-800(S) has 4 Conexant Fusion 878A:
+                *      1 audio input  per BT878A = 4 audio inputs
+                *      4 video inputs per BT878A = 16 video inputs
+                * The 3 other BT878A chips are "slave" chips of the GV-800(S)
+                * and should use this card type.
+                * The audio input is not working yet.
+                */
+               .name           = "Geovision GV-800(S) (slave)",
+               .video_inputs   = 4,
+               /* .audio_inputs= 1, */
+               .tuner_type     = TUNER_ABSENT,
+               .tuner_addr     = ADDR_UNSET,
+               .svhs           = NO_SVHS,
+               .gpiomask       = 0x00,
+               .no_gpioirq     = 1,
+               .muxsel         = MUXSEL(2, 2, 2, 2),
+               .pll            = PLL_28,
+               .no_msp34xx     = 1,
+               .no_tda7432     = 1,
+               .no_tda9875     = 1,
+               .muxsel_hook    = gv800s_muxsel,
+       },
+       [BTTV_BOARD_PV183] = {
+               .name           = "ProVideo PV183", /* 0x9f */
+               .video_inputs   = 2,
+               /* .audio_inputs= 0, */
+               .svhs           = NO_SVHS,
+               .gpiomask       = 0,
+               .muxsel         = MUXSEL(2, 3),
+               .gpiomux        = { 0 },
+               .needs_tvaudio  = 0,
+               .no_msp34xx     = 1,
+               .pll            = PLL_28,
+               .tuner_type     = TUNER_ABSENT,
+               .tuner_addr     = ADDR_UNSET,
+       },
 };
 
 static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
@@ -2860,7 +2954,7 @@ void __devinit bttv_idcard(struct bttv *btv)
                               btv->c.nr, btv->cardid & 0xffff,
                               (btv->cardid >> 16) & 0xffff);
                        printk(KERN_DEBUG "please mail id, board name and "
-                              "the correct card= insmod option to video4linux-list@redhat.com\n");
+                              "the correct card= insmod option to linux-media@vger.kernel.org\n");
                }
        }
 
@@ -3111,8 +3205,7 @@ static void init_ids_eagle(struct bttv *btv)
  * has its own multiplexer */
 static void eagle_muxsel(struct bttv *btv, unsigned int input)
 {
-       btaor((2)<<5, ~(3<<5), BT848_IFORM);
-       gpio_bits(3,bttv_tvcards[btv->c.type].muxsel[input&7]);
+       gpio_bits(3, input & 3);
 
        /* composite */
        /* set chroma ADC to sleep */
@@ -3337,6 +3430,9 @@ void __devinit bttv_init_card2(struct bttv *btv)
        case BTTV_BOARD_KODICOM_4400R:
                kodicom4400r_init(btv);
                break;
+       case BTTV_BOARD_GEOVISION_GV800S:
+               gv800s_init(btv);
+               break;
        }
 
        /* pll configuration */
@@ -3391,6 +3487,12 @@ void __devinit bttv_init_card2(struct bttv *btv)
                printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
                       btv->tuner_type);
 
+       if (autoload != UNSET) {
+               printk(KERN_WARNING "bttv%d: the autoload option is obsolete.\n", btv->c.nr);
+               printk(KERN_WARNING "bttv%d: use option msp3400, tda7432 or tvaudio to\n", btv->c.nr);
+               printk(KERN_WARNING "bttv%d: override which audio module should be used.\n", btv->c.nr);
+       }
+
        if (UNSET == btv->tuner_type)
                btv->tuner_type = TUNER_ABSENT;
 
@@ -3398,8 +3500,16 @@ void __devinit bttv_init_card2(struct bttv *btv)
                struct tuner_setup tun_setup;
 
                /* Load tuner module before issuing tuner config call! */
-               if (autoload)
-                       request_module("tuner");
+               if (bttv_tvcards[btv->c.type].has_radio)
+                       v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_RADIO));
+               v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
+               v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tuner", "tuner",
+                               v4l2_i2c_tuner_addrs(ADDRS_TV_WITH_DEMOD));
 
                tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV;
                tun_setup.type = btv->tuner_type;
@@ -3408,7 +3518,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
                if (bttv_tvcards[btv->c.type].has_radio)
                        tun_setup.mode_mask |= T_RADIO;
 
-               bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
+               bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
        }
 
        if (btv->tda9887_conf) {
@@ -3417,7 +3527,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
                tda9887_cfg.tuner = TUNER_TDA9887;
                tda9887_cfg.priv = &btv->tda9887_conf;
 
-               bttv_call_i2c_clients(btv, TUNER_SET_CONFIG, &tda9887_cfg);
+               bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
        }
 
        btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
@@ -3440,31 +3550,119 @@ void __devinit bttv_init_card2(struct bttv *btv)
        if (bttv_tvcards[btv->c.type].audio_mode_gpio)
                btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
 
-       if (!autoload)
-               return;
-
        if (btv->tuner_type == TUNER_ABSENT)
                return;  /* no tuner or related drivers to load */
 
+       if (btv->has_saa6588 || saa6588[btv->c.nr]) {
+               /* Probe for RDS receiver chip */
+               static const unsigned short addrs[] = {
+                       0x20 >> 1,
+                       0x22 >> 1,
+                       I2C_CLIENT_END
+               };
+               struct v4l2_subdev *sd;
+
+               sd = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "saa6588", "saa6588", addrs);
+               btv->has_saa6588 = (sd != NULL);
+       }
+
        /* try to detect audio/fader chips */
-       if (!bttv_tvcards[btv->c.type].no_msp34xx &&
-           bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx") >=0)
-               request_module("msp3400");
 
-       if (bttv_tvcards[btv->c.type].msp34xx_alt &&
-           bttv_I2CRead(btv, I2C_ADDR_MSP3400_ALT, "MSP34xx (alternate address)") >=0)
-               request_module("msp3400");
+       /* First check if the user specified the audio chip via a module
+          option. */
 
-       if (!bttv_tvcards[btv->c.type].no_tda9875 &&
-           bttv_I2CRead(btv, I2C_ADDR_TDA9875, "TDA9875") >=0)
-               request_module("tda9875");
+       switch (audiodev[btv->c.nr]) {
+       case -1:
+               return; /* do not load any audio module */
 
-       if (!bttv_tvcards[btv->c.type].no_tda7432 &&
-           bttv_I2CRead(btv, I2C_ADDR_TDA7432, "TDA7432") >=0)
-               request_module("tda7432");
+       case 0: /* autodetect */
+               break;
+
+       case 1: {
+               /* The user specified that we should probe for msp3400 */
+               static const unsigned short addrs[] = {
+                       I2C_ADDR_MSP3400 >> 1,
+                       I2C_ADDR_MSP3400_ALT >> 1,
+                       I2C_CLIENT_END
+               };
+
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400", addrs);
+               if (btv->sd_msp34xx)
+                       return;
+               goto no_audio;
+       }
+
+       case 2: {
+               /* The user specified that we should probe for tda7432 */
+               static const unsigned short addrs[] = {
+                       I2C_ADDR_TDA7432 >> 1,
+                       I2C_CLIENT_END
+               };
+
+               if (v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tda7432", "tda7432", addrs))
+                       return;
+               goto no_audio;
+       }
 
-       if (bttv_tvcards[btv->c.type].needs_tvaudio)
-               request_module("tvaudio");
+       case 3: {
+               /* The user specified that we should probe for tvaudio */
+               btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
+               if (btv->sd_tvaudio)
+                       return;
+               goto no_audio;
+       }
+
+       default:
+               printk(KERN_WARNING "bttv%d: unknown audiodev value!\n",
+                       btv->c.nr);
+               return;
+       }
+
+       /* There were no overrides, so now we try to discover this through the
+          card definition */
+
+       /* probe for msp3400 first: this driver can detect whether or not
+          it really is a msp3400, so it will return NULL when the device
+          found is really something else (e.g. a tea6300). */
+       if (!bttv_tvcards[btv->c.type].no_msp34xx) {
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400",
+                       I2C_ADDR_MSP3400 >> 1);
+       } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
+               btv->sd_msp34xx = v4l2_i2c_new_probed_subdev_addr(&btv->c.v4l2_dev,
+                       &btv->c.i2c_adap, "msp3400", "msp3400",
+                       I2C_ADDR_MSP3400_ALT >> 1);
+       }
+
+       /* If we found a msp34xx, then we're done. */
+       if (btv->sd_msp34xx)
+               return;
+
+       /* it might also be a tda7432. */
+       if (!bttv_tvcards[btv->c.type].no_tda7432) {
+               static const unsigned short addrs[] = {
+                       I2C_ADDR_TDA7432 >> 1,
+                       I2C_CLIENT_END
+               };
+
+               if (v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+                               &btv->c.i2c_adap, "tda7432", "tda7432", addrs))
+                       return;
+       }
+
+       /* Now see if we can find one of the tvaudio devices. */
+       btv->sd_tvaudio = v4l2_i2c_new_probed_subdev(&btv->c.v4l2_dev,
+               &btv->c.i2c_adap, "tvaudio", "tvaudio", tvaudio_addrs());
+       if (btv->sd_tvaudio)
+               return;
+
+no_audio:
+       printk(KERN_WARNING "bttv%d: audio absent, no audio device found!\n",
+                       btv->c.nr);
 }
 
 
@@ -3536,6 +3734,7 @@ static int terratec_active_radio_upgrade(struct bttv *btv)
                printk("bttv%d: Terratec Active Radio Upgrade found.\n",
                       btv->c.nr);
                btv->has_radio    = 1;
+               btv->has_saa6588  = 1;
                btv->has_matchbox = 1;
        } else {
                btv->has_radio    = 0;
@@ -4179,6 +4378,11 @@ void tea5757_set_freq(struct bttv *btv, unsigned short freq)
  */
 static void rv605_muxsel(struct bttv *btv, unsigned int input)
 {
+       static const u8 muxgpio[] = { 0x3, 0x1, 0x2, 0x4, 0xf, 0x7, 0xe, 0x0,
+                                     0xd, 0xb, 0xc, 0x6, 0x9, 0x5, 0x8, 0xa };
+
+       gpio_bits(0x07f, muxgpio[input]);
+
        /* reset all conections */
        gpio_bits(0x200,0x200);
        mdelay(1);
@@ -4186,7 +4390,6 @@ static void rv605_muxsel(struct bttv *btv, unsigned int input)
        mdelay(1);
 
        /* create a new connection */
-       gpio_bits(0x480,0x080);
        gpio_bits(0x480,0x480);
        mdelay(1);
        gpio_bits(0x480,0x080);
@@ -4445,8 +4648,7 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input)
        bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
                      ((matrix == 2) ? 0x03 : 0x00), 1);  /* 9-12 */
 
-       /* Selects MUX0 for input on the 878 */
-       btaor((0)<<5, ~(3<<5), BT848_IFORM);
+       /* 878's MUX0 is already selected for input via muxsel values */
 }
 
 
@@ -4530,6 +4732,132 @@ static void PXC200_muxsel(struct bttv *btv, unsigned int input)
        printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
 }
 
+static void phytec_muxsel(struct bttv *btv, unsigned int input)
+{
+       unsigned int mux = input % 4;
+
+       if (input == btv->svhs)
+               mux = 0;
+
+       gpio_bits(0x3, mux);
+}
+
+/*
+ * GeoVision GV-800(S) functions
+ * Bruno Christo <bchristo@inf.ufsm.br>
+*/
+
+/* This is a function to control the analog switch, which determines which
+ * camera is routed to which controller.  The switch comprises an X-address
+ * (gpio bits 0-3, representing the camera, ranging from 0-15), and a
+ * Y-address (gpio bits 4-6, representing the controller, ranging from 0-3).
+ * A data value (gpio bit 18) of '1' enables the switch, and '0' disables
+ * the switch.  A STROBE bit (gpio bit 17) latches the data value into the
+ * specified address. There is also a chip select (gpio bit 16).
+ * The idea is to set the address and chip select together, bring
+ * STROBE high, write the data, and finally bring STROBE back to low.
+ */
+static void gv800s_write(struct bttv *btv,
+                        unsigned char xaddr,
+                        unsigned char yaddr,
+                        unsigned char data) {
+       /* On the "master" 878A:
+       * GPIO bits 0-9 are used for the analog switch:
+       *   00 - 03:    camera selector
+       *   04 - 06:    878A (controller) selector
+       *   16:         cselect
+       *   17:         strobe
+       *   18:         data (1->on, 0->off)
+       *   19:         reset
+       */
+       const u32 ADDRESS = ((xaddr&0xf) | (yaddr&3)<<4);
+       const u32 CSELECT = 1<<16;
+       const u32 STROBE = 1<<17;
+       const u32 DATA = data<<18;
+
+       gpio_bits(0x1007f, ADDRESS | CSELECT);  /* write ADDRESS and CSELECT */
+       gpio_bits(0x20000, STROBE);             /* STROBE high */
+       gpio_bits(0x40000, DATA);               /* write DATA */
+       gpio_bits(0x20000, ~STROBE);            /* STROBE low */
+}
+
+/*
+ * GeoVision GV-800(S) muxsel
+ *
+ * Each of the 4 cards (controllers) use this function.
+ * The controller using this function selects the input through the GPIO pins
+ * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
+ *
+ * The parameter 'input' is the requested camera number (0-4) on the controller.
+ * The map array has the address of each input. Note that the addresses in the
+ * array are in the sequence the original GeoVision driver uses, that is, set
+ * every controller to input 0, then to input 1, 2, 3, repeat. This means that
+ * the physical "camera 1" connector corresponds to controller 0 input 0,
+ * "camera 2" corresponds to controller 1 input 0, and so on.
+ *
+ * After getting the input address, the function then writes the appropriate
+ * data to the analog switch, and housekeeps the local copy of the switch
+ * information.
+ */
+static void gv800s_muxsel(struct bttv *btv, unsigned int input)
+{
+       struct bttv *mctlr;
+       char *sw_status;
+       int xaddr, yaddr;
+       static unsigned int map[4][4] = { { 0x0, 0x4, 0xa, 0x6 },
+                                         { 0x1, 0x5, 0xb, 0x7 },
+                                         { 0x2, 0x8, 0xc, 0xe },
+                                         { 0x3, 0x9, 0xd, 0xf } };
+       input = input%4;
+       mctlr = master[btv->c.nr];
+       if (mctlr == NULL) {
+               /* do nothing until the "master" is detected */
+               return;
+       }
+       yaddr = (btv->c.nr - mctlr->c.nr) & 3;
+       sw_status = (char *)(&mctlr->mbox_we);
+       xaddr = map[yaddr][input] & 0xf;
+
+       /* Check if the controller/camera pair has changed, ignore otherwise */
+       if (sw_status[yaddr] != xaddr) {
+               /* disable the old switch, enable the new one and save status */
+               gv800s_write(mctlr, sw_status[yaddr], yaddr, 0);
+               sw_status[yaddr] = xaddr;
+               gv800s_write(mctlr, xaddr, yaddr, 1);
+       }
+}
+
+/* GeoVision GV-800(S) "master" chip init */
+static void gv800s_init(struct bttv *btv)
+{
+       char *sw_status = (char *)(&btv->mbox_we);
+       int ix;
+
+       gpio_inout(0xf107f, 0xf107f);
+       gpio_write(1<<19); /* reset the analog MUX */
+       gpio_write(0);
+
+       /* Preset camera 0 to the 4 controllers */
+       for (ix = 0; ix < 4; ix++) {
+               sw_status[ix] = ix;
+               gv800s_write(btv, ix, ix, 1);
+       }
+
+       /* Inputs on the "master" controller need this brightness fix */
+       bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
+
+       if (btv->c.nr > BTTV_MAX-4)
+               return;
+       /*
+        * Store the "master" controller pointer in the master
+        * array for later use in the muxsel function.
+        */
+       master[btv->c.nr]   = btv;
+       master[btv->c.nr+1] = btv;
+       master[btv->c.nr+2] = btv;
+       master[btv->c.nr+3] = btv;
+}
+
 /* ----------------------------------------------------------------------- */
 /* motherboard chipset specific stuff                                      */