lkml.org 
[lkml]   [1998]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectBug in MAD16 sound, not unloading properly (fixed)
From
Date
Hi,

since the new sound stuff got integrated I have had a hard time
configuring kmod to properly use my Opti 931. Basically, the soundcore
module would not unload and when reloading the mad16 module, the mixer
would not work.

I have fixed this by making the unload_mad16() function look just like
the unload_ms_sound() function in ad1848.c -- for some reason the
mixer unloading part was left out.

Now, I do not know if this breaks something else. I know nothing about
the sound stuff and found this by just skimming through the sources.
To me it seems that unload_mad16() could simply contain a call to
unload_ms_sound().

Also, I had no idea how to make a proper patch file. I hope I have
done it correctly but offer my excuses in case I did not.

Concerning module unloading, I have a cron entry that does "rmmod -a"
but why does it have to execute twice before the modules get unloaded?



diff -ur linux-2.1.106ac3/drivers/sound/mad16.c linux/drivers/sound/mad16.c
--- linux-2.1.106ac3/drivers/sound/mad16.c Sun Jun 7 19:37:41 1998
+++ linux/drivers/sound/mad16.c Thu Jun 18 14:17:50 1998
@@ -814,13 +814,15 @@

void unload_mad16(struct address_info *hw_config)
{
+ int mixer = audio_devs[hw_config->slots[0]]->mixer_dev;
ad1848_unload(hw_config->io_base + 4,
hw_config->irq,
hw_config->dma,
hw_config->dma2, 0);
- release_region(hw_config->io_base, 4);
+ if(mixer>=0)
+ sound_unload_mixerdev(mixer);
sound_unload_audiodev(hw_config->slots[0]);
-
+ release_region(hw_config->io_base, 4);
}

void
--
Regards, Anders <URL:http://www.kampsax.dtu.dk/~and/>

Bad command. Bad, bad command! Sit! Stay! Staaay..

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

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.021 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site