Re: Sound timer unloading

Scott Murray (scottm@interlog.com)
Sun, 22 Nov 1998 23:49:12 -0500 (EST)


Oops, hit some weird control key and pine screwed up. I'll try again...

On Sun, 22 Nov 1998, Meelis Roos wrote:

> I recently found out that when unloading softoss2 module the corresponding
> timer entry doesn't disappear from /proc/sound. I reported it but noone
> seemed to notice. So I looked at it a little further.

[snip]

> So the return value needs to be gotten back from sound_timer_init. But
> sound_timer_init only returns void.
>
> There are 2 other calls to sound_timer_init in the sound subdirectory.
> One is gus.c where the sound_timer_init call is surreonded by a warning
> and the other is ad1848 which seems buggy too at first glance but I can't
> verify it with a simple test.

I noticed this a quite a while ago when I was working on my quick and
dirty OPL3-SA2 driver. If you look at the definition of the
sound_lowlevel_timer structure in dev_table.h, you'll notice that the
first field is dev, but none of the existing code really does anything
with it. In gus.c, the call to sound_timer_init is actually #ifdef'd
THIS_GETS_FIXED.

> There are no sound_timer_init calls in the lowlevel subdirectory.
>
> So, should the sound_timer_init be fixed to return the needed slot
> number to allow unloading of timers?

I've got some experimental code I had that modified ad1848.c and
sound_timer.c to actually use the dev field of sound_lowlevel_timer, but
it's relatively untested. I changed jobs recently, so I now have some
time to look at this, if anyone thinks its important. Alan?

Scott

PS: If anyone reading actually uses the OPL3-SA2 and SA3 driver, I'm close
to a finishing a patch that gets the master volume control working,
and I'd appreciate comments on any issues with the current driver.
Thanks.

--
=============================================================================
Scott Murray                                       email: scottm@interlog.com
http://www.interlog.com/~scottm                     ICQ#: 10602428
-----------------------------------------------------------------------------
     "Good, bad ... I'm the guy with the gun." - Ash, "Army of Darkness"

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