From 7646b9b592b566a47b452f15849e9a0b964dc8f9 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 13 Jun 2019 15:09:01 +0200 Subject: [PATCH] ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp() In the commit 12dfa4a0ab02037f66d4e4597b67f4fdcd224e93 (ALSA: hda/hdmi - Consider eld_valid when reporting jack event) the eld_valid check was added for the jack event reports. Do the same in sync_eld_via_acomp() function. Apparently, it is required for the NVIDIA proprietary driver (monitor presence reported first, but ELD is available later). Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0c61c05503f5e..b522314ec5bed 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1627,7 +1627,8 @@ static void sync_eld_via_acomp(struct hda_codec *codec, if (jack == NULL) goto unlock; snd_jack_report(jack, - eld->monitor_present ? SND_JACK_AVOUT : 0); + (eld->monitor_present && eld->eld_valid) ? + SND_JACK_AVOUT : 0); unlock: mutex_unlock(&per_pin->lock); } -- 2.39.5