• Takashi Iwai's avatar
    ALSA: hda - Fix unbalanced runtime PM notification at resume · c3bd14e6
    Takashi Iwai authored
    commit 0fc28fc0 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: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c3bd14e6
hda_codec.c 148 KB