Re: Looking for maintainer of ENSONIQ SoundScape driver

From: Chris Rankin (rankinc@zipworld.com.au)
Date: Fri Jan 05 2001 - 12:17:00 EST


> > would like to discuss with its maintainer, please. For instance,
> > although /dev/mixer does not use sscape.o (the mixer driver is in the
> > ad1848.o module), unloading sscape.o while a mixer application is
>
> That sounds like the mixer calls sscape code and there is a locking error
> somewhere that should have prevented the unload

Well, from what I've seen, the sscape code initialies the mpu401 and
ad1848 devices when it loads, and deallocates all their resources when
it unloads. The mixer doesn't actually call sscape code at all, but
references a mixer_dev[] pointer which sscape trashes when it calls
ad1848_unload().

This seems to be the crux of the problem: sscape is fiddling with
resources that belong to other modules.

However, what you describe is exactly what sscape and mpu401 were
doing with regards to /dev/sequencer2. mpu401 was using a coprocessor
device contained within the sscape module. (Patch enclosed.)

> > sscape.o allocates IO ports is also suspicious, and causes these
> > messages to be logged every time the sound modules are loaded:
> >
> > Jan 5 14:08:31 wittsend kernel: Trying to free nonexistent resource <00000338-00000339>
> > Jan 5 14:08:31 wittsend kernel: Trying to free nonexistent resource <00000330-00000337>
> >

> Look for request_resource/free_resource mismatches

The detect_sscape_pnp() routine seems to expect check_region() to
allocate resources, although if that's true, it's rather cavalier
about releasing them again! Is this what Linux 2.2 used to do?

I have access to this machine for another week and so can try to sort
this out, but as far as this mixer problem goes, I'm not sure what
kind of big-picture to aim for. For example, my modules.conf look like
this:

# Sound support
alias synth0 off
alias sound-slot-0 sscape
alias sound-service-0-1 off
alias sound-service-0-6 off
alias sound-service-0-8 off
options sscape irq=5 dma=1 io=0x338 mpu_io=0x330 mpu_irq=9

(No ISA-PNP for sscape yet.)

Now this "sound-slot-0" approach would seem to imply a module-stack
that looks like this:

soundcore
sound
sscape
mpu401, ad1848

However, the actual module usage pattern looks like this:

Module Size Used by
sscape 10192 0 (autoclean)
ad1848 16992 0 (autoclean) [sscape]
mpu401 18928 0 (autoclean) [sscape]
sound 56976 0 (autoclean) [sscape ad1848 mpu401]
soundcore 3952 5 (autoclean) [sscape sound]

So although sscape can load mpu401 and ad1848, it mustn't unload them? The mixer code seems to live in sound.o - I don't want to do something stupid in there!

And advice gratefully accepted,
Cheers,
Chris Rankin





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



This archive was generated by hypermail 2b29 : Sun Jan 07 2001 - 21:00:22 EST