[alsa-devel] [RFC PATCH] ALSA: hda - add support for runtime power management

Takashi Iwai tiwai at suse.de
Mon Aug 20 11:09:49 CEST 2012


At Sun, 19 Aug 2012 10:46:42 +0000,
Lin, Mengdong wrote:
> 
> > - Are snd_power_change_state() calls needed for runtime PM?
> I think this is needed. It's because HW is actually in D3 when it's runtime suspended and need a delay for transition back to D0. And there are operations that need HW in D0, such as snd_pcm_prepare().

Well, first off, PCM prepare will be never reached during runtime PM
suspend.

Secondly, you seem to misunderstand the concept of
snd_power_change_state().  It's for blocking the whole operations
until the resume finished.  In the case of runtime PM, the resume
itself is triggered by the operation.  Thus if you call
snd_power_change_state(D3) in the runtime suspend, it'd deadlock,
since the wake-up operation itself is blocked by that.


thanks,

Takashi


More information about the Alsa-devel mailing list