[alsa-devel] [PATCH 2/2] ALSA: hda - reduce msleep time if EPSS power states supported
Wang Xingchao
xingchao.wang at intel.com
Wed Jun 6 16:02:49 CEST 2012
if EPSS supported, transition from D3 state to D0 state in less
than 10ms
Signed-off-by: Wang Xingchao <xingchao.wang at intel.com>
---
sound/pci/hda/hda_codec.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b89c8ec..5298ba1 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3526,14 +3526,18 @@ static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec, hda_nid_t fg
static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state)
{
+ bool epss;
if (codec->patch_ops.set_power_state) {
codec->patch_ops.set_power_state(codec, fg, power_state);
return;
}
+ epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS);
/* this delay seems necessary to avoid click noise at power-down */
- if (power_state == AC_PWRST_D3)
+ if ((power_state == AC_PWRST_D3) && !epss)
msleep(100);
+ else
+ msleep(10);
snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_POWER_STATE,
power_state);
snd_hda_codec_set_power_to_all(codec, fg, power_state, true);
--
1.7.9.5
More information about the Alsa-devel
mailing list