aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-11-20 06:15:07 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 14:11:47 -0500
commitc3bd14e68a1d4eaabbac84a3a28288a3bf13f9f6 (patch)
tree93cca759fc5447eae94c8832984374645924ac53 /sound/pci
parent7088cd2da7489d71a6b5d569899f8af3f85247c4 (diff)
ALSA: hda - Fix unbalanced runtime PM notification at resume
commit 0fc28fc030a85aa3d6d14e9e9fca0c8237c9ffb5 upstream. When a codec is resumed, it keeps the power on while the resuming phase via hda_keep_power_on(), then turns down via snd_hda_power_down(). At that point, snd_hda_power_down() notifies the power down to the controller, and this may confuse the refcount if the codec was already powered up before the resume. In the end result, the controller goes to runtime suspend even before the codec is kicked off to the power save, and the communication stalls happens. The fix is to add the power-up notification together with hda_keep_power_on(), and clears the flag appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5b3d6614e66e..aeefec74a061 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3924,6 +3924,10 @@ static void hda_call_codec_resume(struct hda_codec *codec)
3924 * in the resume / power-save sequence 3924 * in the resume / power-save sequence
3925 */ 3925 */
3926 hda_keep_power_on(codec); 3926 hda_keep_power_on(codec);
3927 if (codec->pm_down_notified) {
3928 codec->pm_down_notified = 0;
3929 hda_call_pm_notify(codec->bus, true);
3930 }
3927 hda_set_power_state(codec, AC_PWRST_D0); 3931 hda_set_power_state(codec, AC_PWRST_D0);
3928 restore_shutup_pins(codec); 3932 restore_shutup_pins(codec);
3929 hda_exec_init_verbs(codec); 3933 hda_exec_init_verbs(codec);