aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-03-21 11:07:30 -0400
committerTakashi Iwai <tiwai@suse.de>2016-03-21 11:25:07 -0400
commitc64c1437afb14ebc900e40910f31ffb20bf652ad (patch)
treeb5b7158997bb678910a52fa6d84d49adffba2f15
parent0ef21100ae912f76ed89f76ecd894f4ffb3689c1 (diff)
ALSA: hda - Fix missing ELD update at unplugging
i915 get_eld ops may return an error when no encoder is connected, and currently we regard the error as fatal and skip the whole ELD handling. This ended up with the missing ELD update at unplugging. This patch fixes the issue by treating the error as the unplugged state, instead of skipping the rest. Reported-by: Libin Yang <libin.yang@linux.intel.com> Cc: <stable@vger.kernel.org> # v4.5 Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_hdmi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 7ae614d27954..5af372d01834 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1484,11 +1484,10 @@ static void sync_eld_via_acomp(struct hda_codec *codec,
1484 int size; 1484 int size;
1485 1485
1486 mutex_lock(&per_pin->lock); 1486 mutex_lock(&per_pin->lock);
1487 eld->monitor_present = false;
1487 size = snd_hdac_acomp_get_eld(&codec->bus->core, per_pin->pin_nid, 1488 size = snd_hdac_acomp_get_eld(&codec->bus->core, per_pin->pin_nid,
1488 &eld->monitor_present, eld->eld_buffer, 1489 &eld->monitor_present, eld->eld_buffer,
1489 ELD_MAX_SIZE); 1490 ELD_MAX_SIZE);
1490 if (size < 0)
1491 goto unlock;
1492 if (size > 0) { 1491 if (size > 0) {
1493 size = min(size, ELD_MAX_SIZE); 1492 size = min(size, ELD_MAX_SIZE);
1494 if (snd_hdmi_parse_eld(codec, &eld->info, 1493 if (snd_hdmi_parse_eld(codec, &eld->info,