patch-1.3.58 linux/drivers/sound/mad16.c

Next file: linux/drivers/sound/mad16_sb_midi.c
Previous file: linux/drivers/sound/ics2101.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.57/linux/drivers/sound/mad16.c linux/drivers/sound/mad16.c
@@ -72,7 +72,7 @@
 
 #include "sound_config.h"
 
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_MAD16)
+#if defined(CONFIG_MAD16)
 
 static int      already_initialized = 0;
 
@@ -451,7 +451,7 @@
 {
   if (board_type < C929)	/* Early chip. No MPU support. Just SB MIDI */
     {
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
 
       if (mad_read (MC1_PORT) & 0x20)
 	hw_config->io_base = 0x240;
@@ -464,7 +464,7 @@
 #endif
     }
 
-#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
   if (!already_initialized)
     return mem_start;
 
@@ -477,7 +477,7 @@
 int
 probe_mad16_mpu (struct address_info *hw_config)
 {
-#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
   static int      mpu_attached = 0;
   static int      valid_ports[] =
   {0x330, 0x320, 0x310, 0x300};
@@ -497,7 +497,7 @@
   if (board_type < C929)	/* Early chip. No MPU support. Just SB MIDI */
     {
 
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
       unsigned char   tmp;
 
       tmp = mad_read (MC3_PORT);
@@ -597,7 +597,15 @@
 void
 unload_mad16_mpu (struct address_info *hw_config)
 {
-#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
+#ifdef CONFIG_MIDI
+  if (board_type < C929)	/* Early chip. No MPU support. Just SB MIDI */
+    {
+      mad16_sb_dsp_unload (hw_config);
+      return;
+    }
+#endif
+
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
   unload_mpu401 (hw_config);
 #endif
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this