ALSA: hda/hdmi - consider eld_valid also in sync_eld_via_acomp()

In the commit 7f641e26a6 (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 <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Jaroslav Kysela 2019-06-13 15:09:01 +02:00 committed by Takashi Iwai
parent 3e985effb2
commit 855b5e01c0
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}