From patchwork Wed Oct 19 08:28:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp214312wrs; Wed, 19 Oct 2022 02:12:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7a1Ws/q5D1Vbc0+GjTlcxw8AmI/Dqj/XeyU8MAdQcCIiV+gMU+2DiGTp19YiILz6KA6k0H X-Received: by 2002:a17:906:8461:b0:78d:dd76:5695 with SMTP id hx1-20020a170906846100b0078ddd765695mr5743287ejc.583.1666170748999; Wed, 19 Oct 2022 02:12:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170748; cv=none; d=google.com; s=arc-20160816; b=royVAj78o3w7IXpyEpv1D6pSOzBqaomGrmtJblTxN0qm/p1xMcSkDn4vOEaRhO8F6D dF3wj23u8hYICXWtzIhFuZuP5QfIw1JuH3n2uFnjTfE1VpmZs7KVmg1eJh+DrkA2eznq rCWTCFEJHcg28bPKm4soRBMsfyxCEKjiBBokp90+oAjHYj3FL8NZ2fxzNKGRx2m0OO8U 3W5ZRATTTQM5J8zT4gLoTSKUu9oy62rl4OYcqIOZf7namQHrkgfYe6O/yPsHVacqddWV 8/8MUA3429ah2I496EyoCoFQEd+2D3MJKeShBJXmrpzv0Io0uFC7xaO15j9/0kjs/B/7 WdxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PMMdCHAoT0czUjCnxTxnOGcTweB7+sNTwVhuDXHYlk0=; b=DWoeiFk2mFtK0BoREYVjX/TcyBnArINb1qK16Y8dzy/KsiAPC3pIEa1M/uufp7x/1k x5W+JNYiD7a0dLSWVGT71QaYf/BZjy9wMYCiEln1MJuO9oLEtXQ+FfBAUli0ZpSuT1Er Dr0r7VlViI9Wh2WxR0TF829laF1kM3Hq5n6yv1v2+XAjKlrCzXrkmRlqG6qXno+EZHjt 2M8gSwEB4QXyE3rx9fdY9yaNUinlgavDQAOadQL1kwKPAGX3tEDr/FnIBioBxYKAwnJY KZAl5ydmCp7NfHhq++KieuuUidK+7lErDHBrZ+hFPIZGPfof3Qj+V69uBcLwFDI4ugnG /sVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Zlka5w8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t8-20020a1709066bc800b0073d61f9a7b6si10847303ejs.263.2022.10.19.02.12.04; Wed, 19 Oct 2022 02:12:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Zlka5w8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbiJSJJ0 (ORCPT + 99 others); Wed, 19 Oct 2022 05:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232517AbiJSJGr (ORCPT ); Wed, 19 Oct 2022 05:06:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 171C132BA0; Wed, 19 Oct 2022 01:59:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A608661851; Wed, 19 Oct 2022 08:58:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9CF0C433D6; Wed, 19 Oct 2022 08:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169890; bh=KZLGDxq2b8YQuHM9xefCYyopnh+ZS8Ky+2C9f3m/ckE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zlka5w8nTdL8knV9ELHneZZ6Yecbm+MOnox3I5PT0x/KR+vbvxPyuxJmbm7hu2g3C G80b3bBOIbuYp8bW5QDJ5bzI6Xo9bHf+OCPasoTzwRmHfhHHwajgoeq/XaGQQeuX/2 ggA1OUW5u61qO4wsoDlxFCagGUvyuFHtFgq14QUQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brent Lu , Takashi Iwai , Sasha Levin Subject: [PATCH 6.0 414/862] ALSA: hda/hdmi: Dont skip notification handling during PM operation Date: Wed, 19 Oct 2022 10:28:21 +0200 Message-Id: <20221019083308.256727435@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106659470132593?= X-GMAIL-MSGID: =?utf-8?q?1747106659470132593?= From: Takashi Iwai [ Upstream commit 5226c7b9784eee215e3914f440b3c2e1764f67a8 ] The HDMI driver skips the notification handling from the graphics driver when the codec driver is being in the PM operation. This behavior was introduced by the commit eb399d3c99d8 ("ALSA: hda - Skip ELD notification during PM process"). This skip may cause a problem, as we may miss the ELD update when the connection/disconnection happens right at the runtime-PM operation of the audio codec. Although this workaround was valid at that time, it's no longer true; the fix was required just because the ELD update procedure needed to wake up the audio codec, which had lead to a runtime-resume during a runtime-suspend. Meanwhile, the ELD update procedure doesn't need a codec wake up any longer since the commit 788d441a164c ("ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling"); i.e. there is no much reason for skipping the notification. Let's drop those checks for addressing the missing notification. Fixes: 788d441a164c ("ALSA: hda - Use component ops for i915 HDMI/DP audio jack handling") Reported-by: Brent Lu Link: https://lore.kernel.org/r/20220927135807.4097052-1-brent.lu@intel.com Link: https://lore.kernel.org/r/20221001074809.7461-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_hdmi.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d463c968b3a4..287f4f78e7b1 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2751,9 +2751,6 @@ static void generic_acomp_pin_eld_notify(void *audio_ptr, int port, int dev_id) */ if (codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND) return; - /* ditto during suspend/resume process itself */ - if (snd_hdac_is_in_pm(&codec->core)) - return; check_presence_and_report(codec, pin_nid, dev_id); } @@ -2937,9 +2934,6 @@ static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe) */ if (codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND) return; - /* ditto during suspend/resume process itself */ - if (snd_hdac_is_in_pm(&codec->core)) - return; snd_hdac_i915_set_bclk(&codec->bus->core); check_presence_and_report(codec, pin_nid, dev_id);