patch-2.4.0-test7 linux/drivers/sound/sb_card.c

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

diff -u --recursive --new-file v2.4.0-test6/linux/drivers/sound/sb_card.c linux/drivers/sound/sb_card.c
@@ -44,7 +44,9 @@
  *
  * 25-05-2000 Added Creative SB AWE64 Gold (CTL00B2). 
  * 	Pål-Kristian Engstad <engstad@att.net>
- * 
+ *
+ * 12-08-2000 Added Creative SB32 PnP (CTL009F).
+ * 	Kasatenko Ivan Alex. <skywriter@rnc.ru>
  */
 
 #include <linux/config.h>
@@ -54,7 +56,6 @@
 #include <linux/isapnp.h>
 
 #include "sound_config.h"
-#include "soundmodule.h"
 
 #include "sb_mixer.h"
 #include "sb.h"
@@ -88,7 +89,7 @@
 
 static void __init attach_sb_card(struct address_info *hw_config)
 {
-	if(!sb_dsp_init(hw_config))
+	if(!sb_dsp_init(hw_config, THIS_MODULE))
 		hw_config->slots[0] = -1;
 }
 
@@ -189,7 +190,7 @@
 #if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
 static int isapnp	= 1;
 static int isapnpjump	= 0;
-static int multiple	= 0;
+static int multiple	= 1;
 static int reverse	= 0;
 static int uart401	= 0;
 
@@ -198,7 +199,7 @@
 static int opl_activated[SB_CARDS_MAX]   = {0};
 #else
 static int isapnp	= 0;
-static int multiple	= 1;
+static int multiple	= 0;
 #endif
 
 MODULE_DESCRIPTION("Soundblaster driver");
@@ -277,7 +278,7 @@
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0031),
 		0,0,0,0,
 		0,1,1,-1},
-       {"Sound Blaster 16",
+	{"Sound Blaster 16",
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x002a),
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0031),
 		0,0,0,0,
@@ -342,6 +343,11 @@
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0041),
 		0,0,0,0,
 		0,1,1,-1},
+	{"Creative SB32 PnP",
+		ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x009F),
+		ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0041),
+		0,0,0,0,
+		0,1,1,-1},
 	{"Sound Blaster AWE 64",
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_DEVICE(0x009D), 
 		ISAPNP_VENDOR('C','T','L'), ISAPNP_FUNCTION(0x0042),
@@ -436,7 +442,7 @@
 		ISAPNP_VENDOR('@','H','@'), ISAPNP_FUNCTION(0x0001),
 		0,-1,0,0},
 	{"ALS100",
-	       	ISAPNP_VENDOR('A','L','S'), ISAPNP_DEVICE(0x0001), 
+		ISAPNP_VENDOR('A','L','S'), ISAPNP_DEVICE(0x0001), 
 		ISAPNP_VENDOR('@','@','@'), ISAPNP_FUNCTION(0x0001),
 		ISAPNP_VENDOR('@','X','@'), ISAPNP_FUNCTION(0x0001),
 		ISAPNP_VENDOR('@','H','@'), ISAPNP_FUNCTION(0x0001),
@@ -468,10 +474,6 @@
 	{0}
 };
 
-/* That's useful. */
-
-#define show_base(devname, resname, resptr) printk(KERN_INFO "sb: %s %s base located at %#lx\n", devname, resname, (resptr)->start)
-
 static struct pci_dev *activate_dev(char *devname, char *resname, struct pci_dev *dev)
 {
 	int err;
@@ -636,7 +638,7 @@
 				return 0;
 			}
 		}
-		i += reverse ? -1 : 1;		
+		i += reverse ? -1 : 1;
 	}
 
 	return -ENODEV;
@@ -679,16 +681,14 @@
 		if(cfg[card].slots[0]==-1)
 			return -ENODEV;
 		
-		if (!isapnp) 
+		if (!isapnp)
 			cfg_mpu[card].io_base = mpu_io;
 		if (probe_sbmpu(&cfg_mpu[card]))
 			sbmpu[card] = 1;
 		if (sbmpu[card])
-			attach_sbmpu(&cfg_mpu[card]);
+			attach_sbmpu(&cfg_mpu[card], THIS_MODULE);
 	}
 
-	SOUND_LOCK;
-
 	if(isapnp)
 		printk(KERN_NOTICE "sb: %d Soundblaster PnP card(s) found.\n", sb_cards_num);
 
@@ -718,7 +718,6 @@
 			opl_dev[i]->deactivate(opl_dev[i]);
 #endif
 	}
-	SOUND_LOCK_END;	
 }
 
 module_init(init_sb);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)