[PATCH] sb_card.c

From: Sam Webster (saw29@hermes.cam.ac.uk)
Date: Sat Jan 15 2000 - 11:44:51 EST


This adds support for my rather poor CMI8330 onboard sound device. Also
have removed the #ifdef CONFIG_ISAPNP stuff as it's not needed anymore.

Sam Webster.

--- 2.3.40-4sb_card Sat Jan 15 16:35:55 2000
+++ sb_card.c Sat Jan 15 16:39:17 2000
@@ -11,19 +11,13 @@
  * for more info.
  */
 
-/* 26th Novemner 1999 - patched to compile without ISA PnP support in the
- kernel. -Daniel Stone (tamriel@ductape.net) */
-
 #include <linux/config.h>
 #ifdef CONFIG_MCA
 #include <linux/mca.h>
 #endif
 #include <linux/module.h>
 #include <linux/init.h>
-#ifdef CONFIG_ISAPNP /* Patched so it will compile withOUT ISA
PnP */
 #include <linux/isapnp.h>
-#endif
-
 #include "sound_config.h"
 #include "soundmodule.h"
 
@@ -103,7 +97,7 @@
                         }
                 }
         }
-#endif
+#endif /* CONFIG_MCA */
 
         if (check_region(hw_config->io_base, 16))
         {
@@ -161,7 +155,6 @@
 
 void *smw_free = NULL;
 
-#ifdef CONFIG_ISAPNP
 static struct { unsigned short vendor, function; char *name; }
 isapnp_sb_list[] __initdata = {
         {ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0001), "Sound
Blaster 16" },
@@ -176,6 +169,7 @@
         {ISAPNP_VENDOR('E','S','S'), ISAPNP_FUNCTION(0x1869), "ESS 1869"
},
         {ISAPNP_VENDOR('E','S','S'), ISAPNP_FUNCTION(0x1878), "ESS 1878"
},
         {ISAPNP_VENDOR('E','S','S'), ISAPNP_FUNCTION(0x1879), "ESS 1879"
},
+ {ISAPNP_VENDOR('@','X','@'), ISAPNP_FUNCTION(0x0001), "CMI 8330"
},
         {0,}
 };
 
@@ -203,7 +197,7 @@
                           mpu_config->io_base = idev->resource[2].start;
                         else
                           mpu_config->io_base = idev->resource[1].start;
-#endif
+#endif /* CONFIG_MIDI */
                         break;
                 }
                 if (!idev)
@@ -216,7 +210,6 @@
         }
         return -ENODEV;
 }
-#endif
 
 int init_module(void)
 {
@@ -224,10 +217,8 @@
 
         if (mad16 == 0 && trix == 0 && pas2 == 0 && support == 0)
         {
-#ifdef CONFIG_ISAPNP
                 if (sb_probe_isapnp(&config, &config_mpu)<0)
                 {
-#endif
                         if (io == -1 || dma == -1 || irq == -1)
                         {
                                 printk(KERN_ERR "sb_card: I/O, IRQ, and
DMA are mandatory\n");
@@ -240,10 +231,8 @@
                         config.card_subtype = type;
 #ifdef CONFIG_MIDI
                         config_mpu.io_base = mpu_io;
-#endif
-#ifdef CONFIG_ISAPNP
+#endif /* CONFIG_MIDI */
                 }
-#endif
                 if (!probe_sb(&config))
                         return -ENODEV;
                 attach_sb_card(&config);
@@ -255,7 +244,7 @@
                         sbmpu = 1;
                 if (sbmpu)
                         attach_sbmpu(&config_mpu);
-#endif
+#endif /* CONFIG_MIDI */
         }
         SOUND_LOCK;
         return 0;
@@ -284,7 +273,8 @@
 #else
 int acer = 0;
 #endif
-#endif
+
+#endif /* MODULE */
 
 EXPORT_SYMBOL(sb_dsp_init);
 EXPORT_SYMBOL(sb_dsp_detect);
@@ -298,4 +288,4 @@
 EXPORT_SYMBOL(probe_sbmpu);
 EXPORT_SYMBOL(unload_sbmpu);
 
-#endif
+#endif /* CONFIG_SBDSP */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:26 EST