Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] Ensoniq SoundScape with 2.3.51 (mpu401 changes broke it)
@ 2000-03-12 14:35 Simon Huggins
  2000-03-13 17:18 ` Simon Huggins
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Huggins @ 2000-03-12 14:35 UTC (permalink / raw)
  To: linux-sound

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

Hi,

Your patch to clean up the OSS stuff has broken the Ensoniq SoundScape.
Reverting one small portion fixes it.
Can you decide whether you want to wrap this in some magical #ifdef's
and send it on to Linus?


BTW, the documentation in Documentation/README.OSS suggests that this
card cannot be used with isapnp?
This is not my experience.
See http://www.huggie.dial.pipex.com/linux/sound.shtml for how it Works
For Me(TM).


Also since I applied my patch, I get this when I modprobe -r:

[root@byers /usr/src/linux/drivers/sound]# modprobe -r sscape
Trying to free nonexistent resource <0000-0001>
Sound device 2 went missing!
kmem_free: Either bad obj addr or double free (objp=c61bd000,
name=size-4096)

I imagine this is because of the changes too?


Simon.

-- 
"Now where did I put that magazine?" Tom asked periodically.                

[-- Attachment #2: mpu401.diff --]
[-- Type: text/plain, Size: 610 bytes --]

--- mpu401.c.old	Sun Mar 12 14:17:11 2000
+++ mpu401.c	Sun Mar 12 14:17:51 2000
@@ -1726,18 +1726,14 @@
 {
 	/* Can be loaded either for module use or to provide functions
 	   to others */
-	cfg.irq = irq;
-	cfg.io_base = io;
-	
-	if (cfg.io_base != -1 && cfg.irq != -1) {
-		printk(KERN_WARNING "mpu401: need io and irq !");
-		return -ENODEV;
+	if (io != -1 && irq != -1) {
+	        cfg.irq = irq;
+		cfg.io_base = io;
+		if (probe_mpu401(&cfg) == 0)
+			return -ENODEV;
+		attach_mpu401(&cfg);
 	}
 	
-	if (probe_mpu401(&cfg) == 0)
-		return -ENODEV;
-	attach_mpu401(&cfg);
-
 	SOUND_LOCK;
 	return 0;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Ensoniq SoundScape with 2.3.51 (mpu401 changes broke it)
  2000-03-12 14:35 [PATCH] Ensoniq SoundScape with 2.3.51 (mpu401 changes broke it) Simon Huggins
@ 2000-03-13 17:18 ` Simon Huggins
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Huggins @ 2000-03-13 17:18 UTC (permalink / raw)
  To: linux-sound

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

On Sun, Mar 12, 2000 at 06:54:22PM +0100, Christoph Hellwig wrote:
> > Can you decide whether you want to wrap this in some magical #ifdef's
> > and send it on to Linus?
> You can send it to Linus, the changes seem ok.

This is a better patch.  It now unloads cleanly too.

Linus, please apply this to your tree.  It fixes mpu401.c for the
Ensoniq SoundScape.

-- 
Simon  [ huggie@earth.li ] *\                "Cockroaches!  They're  \**
****** ]-+-+-+-+-+-+-+-+-[ **\            everywhere...uuugghh...I'm  \*
****** [  Htag.pl 0.0.4  ] ***\                 surrounded!" - Mulder  \

[-- Attachment #2: mpu401.diff --]
[-- Type: text/plain, Size: 801 bytes --]

--- mpu401.c.old	Sun Mar 12 14:17:11 2000
+++ mpu401.c	Mon Mar 13 17:13:13 2000
@@ -1726,25 +1726,24 @@
 {
 	/* Can be loaded either for module use or to provide functions
 	   to others */
-	cfg.irq = irq;
-	cfg.io_base = io;
-	
-	if (cfg.io_base != -1 && cfg.irq != -1) {
-		printk(KERN_WARNING "mpu401: need io and irq !");
-		return -ENODEV;
+	if (io != -1 && irq != -1) {
+	        cfg.irq = irq;
+		cfg.io_base = io;
+		if (probe_mpu401(&cfg) == 0)
+			return -ENODEV;
+		attach_mpu401(&cfg);
 	}
 	
-	if (probe_mpu401(&cfg) == 0)
-		return -ENODEV;
-	attach_mpu401(&cfg);
-
 	SOUND_LOCK;
 	return 0;
 }
 
 void cleanup_mpu401(void)
 {
-	unload_mpu401(&cfg);
+	if (io != -1 && irq != -1) {
+		/* Check for use by, for example, sscape driver */
+		unload_mpu401(&cfg);
+	}
 	SOUND_LOCK_END;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-03-13 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-12 14:35 [PATCH] Ensoniq SoundScape with 2.3.51 (mpu401 changes broke it) Simon Huggins
2000-03-13 17:18 ` Simon Huggins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox