[Pm-utils] Restore state around suspend/resume

Dan Nicholson dbn.lists at gmail.com
Sun Nov 30 12:54:15 PST 2008


On Sun, Nov 30, 2008 at 12:27 PM, Takashi Iwai <tiwai at suse.de> wrote:
> At Sun, 30 Nov 2008 10:38:27 -0800,
> Dan Nicholson wrote:
>>
>> On Sun, Nov 30, 2008 at 10:28 AM, Takashi Iwai <tiwai at suse.de> wrote:
>> > At Sun, 30 Nov 2008 09:30:37 -0800,
>> > Dan Nicholson wrote:
>> >>
>> >> On Sun, Nov 30, 2008 at 9:22 AM, Takashi Iwai <tiwai at suse.de> wrote:
>> >> > At Sun, 30 Nov 2008 09:10:32 -0800,
>> >> > Dan Nicholson wrote:
>> >> >>
>> >> >> On Sun, Nov 30, 2008 at 9:06 AM, Takashi Iwai <tiwai at suse.de> 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 at suse.de> wrote:
>> >> >> >> > 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.
>> >>
>> >> So, are you saying that all drivers will maintain their state until
>> >> they are unloaded?
>> >
>> > The drivers supporting PM do it, yes.
>>
>> Then, for drivers that don't support PM, won't they lose their state
>> across suspend? Shouldn't we save and restore it from userspace for
>> those drivers?
>
> They may lose the state.  They need anyway unloading and reloading the
> driver at suspend/resume.  That's why I wrote alsactl "alone" doesn't
> help.  It must be always coupled with unloading/reloading if it's
> really needed.  Putting only alsactl is thus useless and misleading.

Ah, thank you. Then we can drop the alsactl hook and suggest that
anyone who has a non-PM-aware sound driver needs to add it to
SUSPEND_MODULES, which unloads and reloads the driver at suspend time.
Then, hopefully, udev or modprobe is setup to save/restore the state.

--
Dan


More information about the Pm-utils mailing list