From patchwork Mon Oct 24 11:29:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9233 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp460904wru; Mon, 24 Oct 2022 06:42:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72P0pWOdvkvDhoIQsR6LK54aePmG4l51r4EEq6xwQl3UUoVcnZexTyz9n+GQRU+a4Opkbq X-Received: by 2002:a17:902:e545:b0:184:2f27:b34 with SMTP id n5-20020a170902e54500b001842f270b34mr33121416plf.15.1666618962484; Mon, 24 Oct 2022 06:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666618962; cv=none; d=google.com; s=arc-20160816; b=ooUs172uEkTR6akxhQ6cUGO4vIkwEQL6GBx4WWZnNfOOAF2mtzXSziB4q6bdzHb7sB 3Y7kDOubU3YODkDARZ2CYJGnpVt43i25kvs+ep05fVFlrSy7/COefiXiSIAmdabLq5cf xJRl7U1B4h5xgVbbLiLxmAb1+/YoRPxYHoPngoM0l5XvJhzDkCwzo2GTM5/gBadBR+un R9sJ3RpANn6M6yb+W4zTYwO1mHtLPWhe8PqviZJdKWJzgzvbpIBec1ZkUW+cdgx00YPN KnAPptGr4xYjZHOvdwqSTpeEsGQuaUVUF+IEjFeUpUvCHSiWzSonXeoVRRAp4YzRdPD1 2ASg== 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=NQsu8n9v3oqeIq85Fzm368L1Bcb27xCz9gvyPy5rNJ8=; b=tMAb3Dg3LIZYZmq9ZmnZCVD0twdwU7VeSTG3xo6PDgM5cflL8W1icx6JL2IZgY3rgm xFBR84JbWOBDexOgvkt9AXtlxUzXSr7Qg2HFykCdZD/bI4jr2xxjFO2liKfAa/2xr+81 SbEws+qLQmtHMDsFY8C0FHJzg2GB21LbmKLKyOndjys47wJeY1pl/9Gl7Bk4zBwKg4CC ib4nfcxo/VNJtTJhplF/hgQUP+MQ20te3y7UkPTZxs9V79E/5LK1q4Xd6uxfTitf1n0X wCOoMDyc6bGrp0A8MUxwZFFWcZawhKG5n2sQToluPwUmcpA01U7BBcCqDqP77MYbgqQ6 15ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t33qF3mG; 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 oj17-20020a17090b4d9100b002132abf9ad6si1030814pjb.148.2022.10.24.06.42.22; Mon, 24 Oct 2022 06:42:42 -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=t33qF3mG; 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 S236174AbiJXNe6 (ORCPT + 99 others); Mon, 24 Oct 2022 09:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236270AbiJXNaS (ORCPT ); Mon, 24 Oct 2022 09:30:18 -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 D7D17ACA1C; Mon, 24 Oct 2022 05:33:27 -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 F008D612B7; Mon, 24 Oct 2022 12:23:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A404C433C1; Mon, 24 Oct 2022 12:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614200; bh=bcTlmWggIuPQ8HO7zwA8/78P0DFAZJDywhOf4ZdCjKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t33qF3mGwEviFK6jDzmKW+lnq1xgL99vYkTYNQo4S1WffoqEchwhJxSN3a9gj5L5q JcO76opZx/t8SFR4ioJWxtQQxXhpnsWGpTtCfcKsdscUJM87eC6625XZTUgeu+cVzo rMwbEq9tDiSD8wwE4vCOg6hZq6YlhSCYcyYt9Fj0= 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 5.10 170/390] ALSA: hda/hdmi: Dont skip notification handling during PM operation Date: Mon, 24 Oct 2022 13:29:27 +0200 Message-Id: <20221024113029.943996740@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747576645264582213?= X-GMAIL-MSGID: =?utf-8?q?1747576645264582213?= 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 c3fcf478037f..b1c57c65f6cd 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2684,9 +2684,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); } @@ -2870,9 +2867,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);