[ltp] Re: sound reinit after suspend

Thomas Hood linux-thinkpad@www.bm-soft.com
Tue, 07 Dec 1999 23:38:49 -0500


FYI  My hack to reinitialize the ALSA sound driver
will be included in tpctl release 0.7.3 on
Friday.  I REPEAT that reinitializing the driver
will crash xmms, alsaplayer and kmidi, while
it does not seem to crash kmix and kmedia  (the
only programs I have tried so far.)  The reason for
this is that at present I do the reinitialization
by calling cleanup_module() and then init_module()
inside the snd-card-cs4236 module, which isn't a 
very nice thing to do, even if it seems to work.  
;-)

The tpctl package now includes ntpcl.  Get it at:
http://jhunix.hcf.jhu.edu/~thood/tpctlhome.htm .

I contacted the ALSA developers and they very kindly
added it as a TODO item to their official schedule
( http://www.alsa-project.org/schedule.hmtl )
that the cs423x code should be fixed so that it
properly handles suspend and resume.  The added the
item, however, at the very end of their schedule---
to be looked at late next year, perhaps (so they say).

Also FYI I have updated my Linux on ThinkPad page
in a number of repects recently, so it may be worth
a look if you haven't visited it in a long while:
http://jhunix.hcf.jhu.edu/~thood/tp600lnx.htm .

I would be especially interested to know who can get
C. Lademann's UltraBay hot swap hack to work.

--
Thomas Hood

I previously wrote:
> 
> For the information of those of you who have to unload
> and reload sound drivers after a suspend ...
> 
> I just tried hacking the ALSA module code for
> the cs4236 device so that I could reinitialize
> it without unloading it, and therefore without
> killing processes using it.  The reinitialization
> works as well as unload/reload and I find that after
> a reinitialization, kmix and kmedia work properly.
> Unfortunately, xmms, alsaplayer and kmidi all segfault.
> Therefore, these programs still have to be killed
> and restarted when the sound device is reinitialized.
> 
> It would be nice if this reinitialization could be
> perfected so that it didn't cause such segfaults.
> 
> Thomas
----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html