Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda - Fix regression of monitor_present flag in eld proc file

The commit [bd48128539ab: ALSA: hda - Fix forgotten HDMI
monitor_present update] covered the missing update of monitor_present
flag, but this caused a regression for devices without the i915 eld
notifier. Since the old code supposed that pin_eld->monitor_present
was updated by the caller side, the hdmi_present_sense_via_verbs()
doesn't update the temporary eld->monitor_present but only
pin_eld->monitor_present, which is now overridden in update_eld().

The fix is to update pin_eld->monitor_present as well before calling
update_eld().

Note that this may still leave monitor_present flag in an inconsistent
state when the driver repolls, but this is at least the old behavior.
More proper fix will follow in the later patch.

Fixes: bd48128539ab ('ALSA: hda - Fix forgotten HDMI monitor_present update')
Signed-off-by: Hyungwon Hwang <hyungwon.hwang7@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Hyungwon Hwang and committed by
Takashi Iwai
023d8218 adcdd0d5

+2
+2
sound/pci/hda/patch_hdmi.c
··· 1414 1414 1415 1415 mutex_lock(&per_pin->lock); 1416 1416 pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE); 1417 + eld->monitor_present = pin_eld->monitor_present; 1418 + 1417 1419 if (pin_eld->monitor_present) 1418 1420 eld->eld_valid = !!(present & AC_PINSENSE_ELDV); 1419 1421 else