• Takashi Iwai's avatar
    ALSA: hda - Don't trust the reported actual power state · ffe0a4e3
    Takashi Iwai authored
    BugLink: http://bugs.launchpad.net/bugs/1578798
    
    commit 50fd4987 upstream.
    
    We've got a regression report that the recording on Mac with a cirrus
    codec doesn't work any longer.  This turned out to be the missing
    power up to D0 by power_save_node enablement.
    
    After analyzing the traces, we found out that the culprit is that the
    codec advertises the "actual" power state of a few nodes to be D0
    while the "target" power state is D3.  This inconsistency is usually
    OK, as it implies the power transition.  But in the case of cirrus
    codec, this seems to be stuck to D3 while it's not actually D0.
    
    This patch addresses the issue by checking the power state difference
    more strictly.  It sends the power-state change verb unless both the
    target and the actual power states show the given value.
    
    We may introduce yet another flag indicating the possible broken
    hardware power state, but it's anyway safer to set the proper power
    state even in a transition (at least it's harmless as long as the
    target state is same).  So this simpler change was applied now.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
    ffe0a4e3
hda_generic.c 159 KB