]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/cs423x/cs4236.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6-omap-h63xx.git] / sound / isa / cs423x / cs4236.c
index e1683337e6cd8cf3fa0336b4b561fe710c3666a9..4060918e0327f595f2343b43199ba0d929eb15b3 100644 (file)
@@ -75,8 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235},"
 
 #ifdef CS4232
 #define IDENT "CS4232"
+#define CS423X_DRIVER "snd_cs4232"
 #else
 #define IDENT "CS4236+"
+#define CS423X_DRIVER "snd_cs4236"
 #endif
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
@@ -125,10 +127,12 @@ module_param_array(dma2, int, NULL, 0444);
 MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
 
 static struct platform_device *platform_devices[SNDRV_CARDS];
+#ifdef CONFIG_PNP
 static int pnpc_registered;
 #ifdef CS4232
 static int pnp_registered;
 #endif
+#endif /* CONFIG_PNP */
 
 struct snd_card_cs4236 {
        struct snd_cs4231 *chip;
@@ -158,7 +162,6 @@ MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids);
 #endif /* CS4232 */
 
 #ifdef CS4232
-#define CS423X_DRIVER          "snd_cs4232"
 #define CS423X_ISAPNP_DRIVER   "cs4232_isapnp"
 static struct pnp_card_device_id snd_cs423x_pnpids[] = {
        /* Philips PCA70PS */
@@ -175,11 +178,12 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
        { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
        /* SIC CrystalWave 32 (CS4232) */
        { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
+       /* Netfinity 3000 on-board soundcard */
+       { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } },
        /* --- */
        { .id = "" }    /* end */
 };
 #else /* CS4236 */
-#define CS423X_DRIVER          "snd_cs4236"
 #define CS423X_ISAPNP_DRIVER   "cs4236_isapnp"
 static struct pnp_card_device_id snd_cs423x_pnpids[] = {
        /* Intel Marlin Spike Motherboard - CS4235 */
@@ -410,7 +414,7 @@ static int __devinit snd_card_cs423x_pnpc(int dev, struct snd_card_cs4236 *acard
        }
        /* MPU initialization */
        if (acard->mpu && mpu_port[dev] > 0) {
-               if (snd_cs423x_pnp_init_mpu(dev, acard->ctrl, cfg) < 0)
+               if (snd_cs423x_pnp_init_mpu(dev, acard->mpu, cfg) < 0)
                        goto error;
        }
        kfree(cfg);
@@ -747,12 +751,14 @@ static void __init_or_module snd_cs423x_unregister_all(void)
 {
        int i;
 
+#ifdef CONFIG_PNP
        if (pnpc_registered)
                pnp_unregister_card_driver(&cs423x_pnpc_driver);
 #ifdef CS4232
        if (pnp_registered)
                pnp_unregister_driver(&cs4232_pnp_driver);
 #endif
+#endif /* CONFIG_PNP */
        for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
                platform_device_unregister(platform_devices[i]);
        platform_driver_unregister(&cs423x_nonpnp_driver);
@@ -765,9 +771,9 @@ static int __init alsa_card_cs423x_init(void)
        if ((err = platform_driver_register(&cs423x_nonpnp_driver)) < 0)
                return err;
 
-       for (i = 0; i < SNDRV_CARDS && enable[i]; i++) {
+       for (i = 0; i < SNDRV_CARDS; i++) {
                struct platform_device *device;
-               if (is_isapnp_selected(i))
+               if (! enable[i] || is_isapnp_selected(i))
                        continue;
                device = platform_device_register_simple(CS423X_DRIVER,
                                                         i, NULL, 0);
@@ -778,6 +784,7 @@ static int __init alsa_card_cs423x_init(void)
                platform_devices[i] = device;
                cards++;
        }
+#ifdef CONFIG_PNP
 #ifdef CS4232
        i = pnp_register_driver(&cs4232_pnp_driver);
        if (i >= 0) {
@@ -790,6 +797,8 @@ static int __init alsa_card_cs423x_init(void)
                pnpc_registered = 1;
                cards += i;
        }
+#endif /* CONFIG_PNP */
+
        if (!cards) {
 #ifdef MODULE
                printk(KERN_ERR IDENT " soundcard not found or device busy\n");