Starting with the 'suspend' section first, your script will need to take care of any dependent modules first. So investigate the commands one at a time from a root console. Look for errors.
kmixctrl -s
killall kmix
/etc/init.d/alsasound unload
modprobe -r snd-intel8x0
For example, after trying to stop alsasound, I get
Quote:
linux:/home/dean # /etc/init.d/alsasound unload
Shutting down sound driverERROR: Module snd_hda_codec is in use by hsfhda
ERROR: Module snd_pcm is in use by snd_hda_codec
ERROR: Module snd_timer is in use by snd_pcm
ERROR: Module snd is in use by snd_hda_codec,snd_pcm,snd_timer[/b]
|
So , I would need to unload my hsfhda (modem) driver first with
Quote:
linux:/home/dean # modprobe -r hsfhda
linux:/home/dean # /etc/init.d/alsasound unload
Shutting down sound driver done
linux:/home/dean # [/b]
|
As you can see, now alsaound unloaded ok. So it is quite possible, you will need to remove your modem driver (snd-intel8x0m) first as well.