patch-1.3.34 linux/drivers/sound/sb_card.c

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

diff -u --recursive --new-file v1.3.33/linux/drivers/sound/sb_card.c linux/drivers/sound/sb_card.c
@@ -41,6 +41,7 @@
   if (!sb_dsp_detect (hw_config))
     return mem_start;
   mem_start = sb_dsp_init (mem_start, hw_config);
+  request_region (hw_config->io_base, 16, "SB");
 #endif
 
   return mem_start;
@@ -49,6 +50,13 @@
 int
 probe_sb (struct address_info *hw_config)
 {
+  if (check_region (hw_config->io_base, 16))
+    {
+      printk ("\n\nsb_dsp.c: I/O port %x already in use\n\n",
+	      hw_config->io_base);
+      return 0;
+    }
+
 #if !defined(EXCLUDE_AEDSP16) && defined(AEDSP16_SBPRO)
   /*
      * Initialize Audio Excel DSP 16 to SBPRO.
@@ -56,6 +64,13 @@
   InitAEDSP16_SBPRO (hw_config);
 #endif
   return sb_dsp_detect (hw_config);
+}
+
+void
+unload_sb (struct address_info *hw_config)
+{
+  release_region (hw_config->io_base, 16);
+  sb_dsp_unload ();
 }
 
 #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