Re: Restore state around suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Sun, 30 Nov 2008 09:10:32 -0800,
Dan Nicholson wrote:
> 
> On Sun, Nov 30, 2008 at 9:06 AM, Takashi Iwai <tiwai@xxxxxxx> wrote:
> > At Sun, 30 Nov 2008 08:22:49 -0800,
> > Dan Nicholson wrote:
> >>
> >> On Sun, Nov 30, 2008 at 1:01 AM, Takashi Iwai <tiwai@xxxxxxx> wrote:
> >> > At Sat, 29 Nov 2008 12:40:02 -0800,
> >> > Dan Nicholson wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> Currently, suspending the computer via pm-suspend (as done from HAL),
> >> >> causes the ALSA state to be stored and restored via alsactl. Here's
> >> >> what the hook looks like:
> >> >>
> >> >> http://cgit.freedesktop.org/pm-utils/tree/pm/sleep.d/65alsa
> >> >>
> >> >> Is this still necessary on recent kernels? Is there a list of drivers
> >> >> which properly maintain state across suspend/resume? We're trying to
> >> >> cut down on the amount of work done in userspace which slows down
> >> >> suspend cycles.
> >> >
> >> > The all drivers with PM support should have do store/restore the
> >> > mixer states.  For such drivers, calling alsactl is just a waste of
> >> > time.
> >>
> >> Thanks. Which drivers don't have PM support?
> >
> > Many.  Look though the kernel tree codes under sound directory
> > that has no suspend and resume callbacks.
> 
> OK.
> 
> >> > I don't know who introduced it, but maybe it was a workaround...
> >>
> >> Yeah, I'm sure it was a workaround, but we're trying to get rid of the
> >> unnecessary ones now.
> >
> > Even for drivers without PM support, alsactl alone is useless.
> > So I suggest you to remove it.
> 
> I'm sorry, but why useless? It seems that it would be useful to
> restore state from userspace if the driver isn't doing that on its
> own.

Read alsactl "alone".  Without the combination of module unloading and
reloading, it's useless.

And, whether you need alsactl in pm script depends on the
implementation.  On many distros, loading the sound driver will invoke
"alsactl restore" automatically, thus you don't need it in the pm
side.  But, for unloading the module, I guess "alsactl store" would be
needed explicitly in the pm hook.


Takashi
--
To unsubscribe from this list: send the line "unsubscribe alsa-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux