diff options
| -rw-r--r-- | sound/pci/hda/hda_codec.c | 10 | ||||
| -rw-r--r-- | sound/pci/hda/hda_codec.h | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index f560051a949e..f25c24c743f9 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -1209,6 +1209,9 @@ static void snd_hda_codec_free(struct hda_codec *codec) | |||
| 1209 | kfree(codec); | 1209 | kfree(codec); |
| 1210 | } | 1210 | } |
| 1211 | 1211 | ||
| 1212 | static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec, | ||
| 1213 | hda_nid_t fg, unsigned int power_state); | ||
| 1214 | |||
| 1212 | static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, | 1215 | static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, |
| 1213 | unsigned int power_state); | 1216 | unsigned int power_state); |
| 1214 | 1217 | ||
| @@ -1317,6 +1320,10 @@ int /*__devinit*/ snd_hda_codec_new(struct hda_bus *bus, | |||
| 1317 | AC_VERB_GET_SUBSYSTEM_ID, 0); | 1320 | AC_VERB_GET_SUBSYSTEM_ID, 0); |
| 1318 | } | 1321 | } |
| 1319 | 1322 | ||
| 1323 | codec->epss = snd_hda_codec_get_supported_ps(codec, | ||
| 1324 | codec->afg ? codec->afg : codec->mfg, | ||
| 1325 | AC_PWRST_EPSS); | ||
| 1326 | |||
| 1320 | /* power-up all before initialization */ | 1327 | /* power-up all before initialization */ |
| 1321 | hda_set_power_state(codec, | 1328 | hda_set_power_state(codec, |
| 1322 | codec->afg ? codec->afg : codec->mfg, | 1329 | codec->afg ? codec->afg : codec->mfg, |
| @@ -3543,8 +3550,7 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, | |||
| 3543 | /* this delay seems necessary to avoid click noise at power-down */ | 3550 | /* this delay seems necessary to avoid click noise at power-down */ |
| 3544 | if (power_state == AC_PWRST_D3) { | 3551 | if (power_state == AC_PWRST_D3) { |
| 3545 | /* transition time less than 10ms for power down */ | 3552 | /* transition time less than 10ms for power down */ |
| 3546 | bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS); | 3553 | msleep(codec->epss ? 10 : 100); |
| 3547 | msleep(epss ? 10 : 100); | ||
| 3548 | } | 3554 | } |
| 3549 | 3555 | ||
| 3550 | /* repeat power states setting at most 10 times*/ | 3556 | /* repeat power states setting at most 10 times*/ |
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 7fbc1bcaf1a9..e5a7e19a8071 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
| @@ -862,6 +862,7 @@ struct hda_codec { | |||
| 862 | unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ | 862 | unsigned int ignore_misc_bit:1; /* ignore MISC_NO_PRESENCE bit */ |
| 863 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ | 863 | unsigned int no_jack_detect:1; /* Machine has no jack-detection */ |
| 864 | unsigned int pcm_format_first:1; /* PCM format must be set first */ | 864 | unsigned int pcm_format_first:1; /* PCM format must be set first */ |
| 865 | unsigned int epss:1; /* supporting EPSS? */ | ||
| 865 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 866 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
| 866 | unsigned int power_on :1; /* current (global) power-state */ | 867 | unsigned int power_on :1; /* current (global) power-state */ |
| 867 | int power_transition; /* power-state in transition */ | 868 | int power_transition; /* power-state in transition */ |
