]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - remove unnecessary msleep on power state transitions
authorZhang, Rui <rui.zhang@intel.com>
Wed, 24 Feb 2010 01:38:49 +0000 (09:38 +0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 Feb 2010 08:12:57 +0000 (09:12 +0100)
commitd70aa9d3e35a613e566ae8249531639bd8f7d2b0
tree19e48a88187a962707c4bf6c56a188ecb6d2615e
parentb4bd5ca36bfd7507b71fbc21d6eee2adbeb0f9c7
ALSA: hda - remove unnecessary msleep on power state transitions

This will save ~15ms boot time.

The first 10ms sleep was introduced in commit c30c7da663 for (buggy)
Cxt codecs, so better to limit the sleep to the problem hardware.

For the second 10ms sleep, the HDA spec says:

Power State[1:0]:
00: Node Power state (D0) is fully on.
01: Node Power state (D1) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms, excepting analog pass through circuits (e.g., CD analog
playback) which must remain fully on.
10: Node Power state (D2) allows for (does not require) the lowest possible power consuming state from which it
can return to the "fully on" state (D0) within 10 ms. For modems, this is the "wake on ring" power state.
11: Node Power state (D3) allows for (does not require) lowest possible power consuming state under software
control. Note that any low power state set by software must retain sufficient operational capability to properly
respond to subsequent software Power State command.

So 10ms is actually the max wait time. It should be safe to
remove/reduce it and rely on the loop of 1ms-sleeps.

CC: Marc Boucher <marc@linuxant.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c