diff options
author | Wang Xingchao <xingchao.wang@intel.com> | 2012-06-07 04:51:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-06-07 05:40:33 -0400 |
commit | 0f4ccbb02533276ab750961e150aeee06492ed7c (patch) | |
tree | 8f8486d38b3ad9ddd34e91e2177d8db4f0319b83 /sound/pci | |
parent | 0c7f46ad927cbd29965d4971730de713b478d270 (diff) |
ALSA: hda - reduce msleep time if EPSS power states supported
if EPSS supported, transition from D3 state to D0 state in less
than 10ms
Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b89c8ecc819a..fedbfae978af 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -3532,8 +3532,11 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, | |||
3532 | } | 3532 | } |
3533 | 3533 | ||
3534 | /* this delay seems necessary to avoid click noise at power-down */ | 3534 | /* this delay seems necessary to avoid click noise at power-down */ |
3535 | if (power_state == AC_PWRST_D3) | 3535 | if (power_state == AC_PWRST_D3) { |
3536 | msleep(100); | 3536 | /* transition time less than 10ms for power down */ |
3537 | bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS); | ||
3538 | msleep(epss ? 10 : 100); | ||
3539 | } | ||
3537 | snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_POWER_STATE, | 3540 | snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_POWER_STATE, |
3538 | power_state); | 3541 | power_state); |
3539 | snd_hda_codec_set_power_to_all(codec, fg, power_state, true); | 3542 | snd_hda_codec_set_power_to_all(codec, fg, power_state, true); |