mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
ALSA: hda - Check keep_eapd_on before inv_eapd
commit 468ac41304 upstream.
We don't change the EAPD bit in set_pin_eapd() if keep_eapd_on flag is
set by the codec driver and enable is false. But, we also apply the
flipping of enable value according to inv_eapd flag in the same
function, and this confused the former check, handled as if it's
turned ON. The inverted EAPD check must be applied after keep_eapd_on
check, instead.
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
c6ebcc4a44
commit
320f9078db
@@ -786,10 +786,10 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
|
||||
if (spec->own_eapd_ctl ||
|
||||
!(snd_hda_query_pin_caps(codec, pin) & AC_PINCAP_EAPD))
|
||||
return;
|
||||
if (codec->inv_eapd)
|
||||
enable = !enable;
|
||||
if (spec->keep_eapd_on && !enable)
|
||||
return;
|
||||
if (codec->inv_eapd)
|
||||
enable = !enable;
|
||||
snd_hda_codec_update_cache(codec, pin, 0,
|
||||
AC_VERB_SET_EAPD_BTLENABLE,
|
||||
enable ? 0x02 : 0x00);
|
||||
|
||||
Reference in New Issue
Block a user