mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 17:51:57 +09:00
ALSA: hda - Fix return value of snd_hda_check_power_state()
commit06ec56d3c6upstream. The refactoring by commit9040d102introduced the new function snd_hda_check_power_state(). This function is supposed to return true if the state already reached to the target state, but it actually returns false for that. An utterly stupid typo while copy & paste. Fortunately this didn't influence on much behavior because powering up AFG usually powers up the child widgets, too. But the finer power control must have been broken by this bug. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c38217e1b8
commit
1d33b1e178
@@ -667,7 +667,7 @@ snd_hda_check_power_state(struct hda_codec *codec, hda_nid_t nid,
|
||||
if (state & AC_PWRST_ERROR)
|
||||
return true;
|
||||
state = (state >> 4) & 0x0f;
|
||||
return (state != target_state);
|
||||
return (state == target_state);
|
||||
}
|
||||
|
||||
unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec,
|
||||
|
||||
Reference in New Issue
Block a user