Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756032AbcDJUeJ (ORCPT ); Sun, 10 Apr 2016 16:34:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52281 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757483AbcDJSsQ (ORCPT ); Sun, 10 Apr 2016 14:48:16 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Libin Yang , Takashi Iwai Subject: [PATCH 4.5 128/238] ALSA: hda - Fix missing ELD update at unplugging Date: Sun, 10 Apr 2016 11:35:05 -0700 Message-Id: <20160410183503.651874957@linuxfoundation.org> X-Mailer: git-send-email 2.8.0 In-Reply-To: <20160410183456.398741366@linuxfoundation.org> References: <20160410183456.398741366@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1235 Lines: 39 4.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai commit c64c1437afb14ebc900e40910f31ffb20bf652ad upstream. 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 Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- sound/pci/hda/patch_hdmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1670,11 +1670,10 @@ static void sync_eld_via_acomp(struct hd int size; mutex_lock(&per_pin->lock); + eld->monitor_present = false; size = snd_hdac_acomp_get_eld(&codec->bus->core, per_pin->pin_nid, &eld->monitor_present, eld->eld_buffer, ELD_MAX_SIZE); - if (size < 0) - goto unlock; if (size > 0) { size = min(size, ELD_MAX_SIZE); if (snd_hdmi_parse_eld(codec, &eld->info,