• Takashi Iwai's avatar
    ALSA: hda - Manage power well properly for resume · 8ecb3bdb
    Takashi Iwai authored
    commit a52ff34e upstream.
    
    For SKL and later Intel chips, we control the power well per codec
    basis via link_power callback since the commit [03b135ce: ALSA:
    hda - remove dependency on i915 power well for SKL].
    However, there are a few exceptional cases where the gfx registers are
    accessed from the audio driver: namely the wakeup override bit
    toggling at (both system and runtime) resume.  This seems causing a
    kernel warning when accessed during the power well down (and likely
    resulting in the bogus register accesses).
    
    This patch puts the proper power up / down sequence around the resume
    code so that the wakeup bit is fiddled properly while the power is
    up.  (The other callback, sync_audio_rate, is used only in the PCM
    callback, so it's guaranteed in the power-on.)
    
    Also, by this proper power up/down, the instantaneous flip of wakeup
    bit in the resume callback that was introduced by the commit
    [033ea349: ALSA: hda - Fix Skylake codec timeout] becomes
    superfluous, as snd_hdac_display_power() already does it.  So we can
    clean it up together.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214
    Fixes: 03b135ce ('ALSA: hda - remove dependency on i915 power well for SKL')
    Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    8ecb3bdb
hda_intel.c 67 KB