[PlanetCCRMA] How do I restart Alsa without rebooting???

Mark Knecht mknecht@controlnet.com
Wed Jan 15 11:12:03 2003

   Thanks for the response. This will require me looking at the machine at
home and doing some study. I'll start looking at these ideas this evening
and post back any questions I might come up with.

   From memory I do not remember a preinstall command at all in that
machine's modules.conf file. It may be there. I just do not remember.

   If it is not there, then presumably some equivalent sort of load
instruction would be in the rc.sysinit file somewhere, and maybe it would
need to be moved elsewhere?

   Since the problem goes away when the MidiMan is not plugged in, I'm
thinking that either:

1) USB hotplug uses lots of memory on a cold boot, but doesn't need to on a
warm boot, thus freeing the memory and allowing the Hammerfall to get what
it needs.

2) Something specific to the 2x2 is causing this problem?

   Anyway, I'll go study and try to learn.

   BTW - One last question. Since I know you are going to do a new alsa RPM
in the next few days, does that have any impact on me editing these sorts of
files? I'm not clear whether an alsa RPM does anything in these files.


> -----Original Message-----
> From: planetccrma-admin@ccrma.Stanford.EDU
> [mailto:planetccrma-admin@ccrma.Stanford.EDU]On Behalf Of Fernando Pablo
> Lopez-Lezcano
> Sent: Wednesday, January 15, 2003 10:19 AM
> To: Mark Knecht
> Cc: PlanetCCRMA
> Subject: Re: [PlanetCCRMA] How do I restart Alsa without rebooting???
> >    My system has recently gotten much worse about having Alsa come up
> > running on my HDSP card on a cold boot. This is still apparently related
> > to my use of a USB MidiMan 2x2. If the 2x2 is not plugged in, then Alsa
> > starts up fine on the HDSP. IF the 2x2 is plugged in, then I get error
> > messages about the Hammerfall not being able to allocate memory. A warm
> > boot always seems to solve this problem. On the second boot the
> > Hammerfall gets memory and everything is fine from then on.
> >
> >    My question is, how to I do the equivalent of a warm boot without
> > actually doing the reboot? I've tried
> >
> > service alsasound restart
> >
> > but that doesn't seem to solve the problem. When the Hammerfall hasn't
> > gotten memory I see only a stop and start OK message. When the
> > Hammerfall was allocated memory I see four messages and the restart
> > seems to allow Jack to run. Anyway, when the system is in a bad state
> > this restart doesn't work.
> >
> > (And I'm not supposed to have to reboot Linux anyway!!!) ;-)
> >
> > What commands would get memory allocated and Alsa started correctly for
> > both devices?
> No commands :-)
> From what I know the Hammerfall needs a lot of contiguous memory for its
> buffers. If the memory becomes fragmented during the boot process then
> it cannot allocate the block it needs and fails. "service alsasound
> restart" is the correct way of restarting alsa but it will not do
> anything for an out of memory condition. The only solution is start the
> module that grabs the memory earlier in the boot sequence.
> You probably have something like this in /etc/modules.conf:
> # --- Load the hammerfall memory module
> pre-install snd /sbin/modprobe snd-hammerfall-mem
> If so, you could (carefully) edit /etc/rc.d/rc.sysinit and add these
> lines:
> # Load hammerfall memory module if needed
> if grep -q "snd-hammerfall-mem" /etc/modules.conf 2>/dev/null ; then
>     /sbin/modprobe snd-hammerfall-mem
> fi
> Just before the lines that say "# Load sound modules ..." would be, I
> think, a good choice for inserting this.
> -- Fernando
> _______________________________________________
> PlanetCCRMA mailing list
> PlanetCCRMA@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma