Re: opening files in kernel space?

Trevor Johnson (trevor@jpj.net)
Fri, 13 Feb 1998 09:20:46 -0800 (PST)


> > It sounds (no pun) as though you're using kerneld or kmod. Check out the
> > keep and delay options to kerneld.

> NO! NO! NO! NO! NO! NO! NO!
>
> This discussion started out with me modifying the 2.1.86 kernel sound code.
> Here is the steps taken.
>
> Run "drvmidi terminat.mid":
> Kernel request sound.o
> Open starts for /dev/sequencer
> Sound.o requests adlib_card, then awe_wave.
> Kerneld load adlib_card fine(and opl3), then awe_wave.
^^^^^^^
> Post-install for awe_wave runs sfxload.
> Sfxload attempts to open /dev/sequencer also, but since there is already a
> pending open in progress, sfxload stalls, kerneld stalls, the first open
> stalls, and drvmidi stalls. Killing sfxload lets everything continue, but
> then, there is obviously no midi sound.

You are using kerneld, then. The kerneld man page describes how you can
use the delay option to change the delay for unloading modules from the
default of 60 seconds, and how you can use the keep option to have modules
stay loaded permanently (which you don't want, I guess).

Anyway, I hadn't considered what would happen if you tried to use my
suggestion with kerneld (I was thinking of modprobe). Something that
would work with kerneld would be a script like this:

#!/bin/sh
sfxload synthgm.sbk
drvmidi $1

The synthgm.sbk file is one provided by Creative Labs which "activates"
the 512 kB wavetable ROM present in most (all?) of these cards. Loading it
doesn't use any of the card's RAM. The Maui and AudioTrix sound drivers
use the mod_firmware_load() call to load such files. If you make a patch
to do this, I'd be happy to try it.
___
Trevor Johnson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu