From patchwork Mon Oct 24 11:30:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp434700wru; Mon, 24 Oct 2022 05:52:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64f3bQ/s4YTRt8gA1IC+cn2m8uVQ4X443uXK1GbFtpAQb9IeCYgH2tjWLFXb+1ma78yShP X-Received: by 2002:a17:907:6e11:b0:78e:3057:f631 with SMTP id sd17-20020a1709076e1100b0078e3057f631mr26768279ejc.333.1666615965676; Mon, 24 Oct 2022 05:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615965; cv=none; d=google.com; s=arc-20160816; b=QXLRSKRxxksij/gNWSoaT18z5GEWXWkWQRT12/qKZmpYD0uPglZS5btV/+qTADiDYz Kd6wNGbOd7YmUzyVg11FTfRHgSPv72AMXjpU+2NDVkD4IQg47q8c87XNV5k6fmJ3Q68U vR8n5WjK/rsCDA+E+W509iaGW+3H7+X4pqSaucUIKYuTg5BPVSmPCVvEHQSoVO2H7QK+ 1RIVnRh8ifS80XcGsOPt8pn9q1H6RCGJUfVVlLADS/Vy6ZXrbQrOKvX7mntu8+1gSolq TIK8sRdmKEfgEWx/13w7X6RJ7D+pwH+aXlB9pStVYK7Z/Grt1fWqBXWwXV7Xw/N2H0Eq 3mNQ== 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=tPpTEAkDY5531AJf31+gAZ7Al2FLDyfU0DjNy9fhmm8=; b=KuTgDh2hM02VSeplg7Kv20Jk4pP68izIFab6t7xS2lxxgxUkl/zNAkQm/Q0dSAnh7b I8Te27wKo2QgvGE+ZyyiSD7OH90bKc4msDwKCHg/7bhKnGO0UNXnxwSNPXWuF5dW/5dA 5Pfqf74xzMryx4PFrs0mRG+Hcw3+N7COZjBHB7Y+FJo9prji51bxEH2DviVtHxVl5aNV Yrn/ZuWLTTM8iAw0mRbbR2M41LGDX7trVRH3xoiYTvv9B7KDZBVXVJGpVpbMr/zQd4i2 IDJQxBqCIgEPYbrGnVDHNkT9IgdPzQ3EfSuiRawOzvLeERdON2fIIlHT/B6ao9fOPTfU CaoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jOjUGyq0; 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 nc23-20020a1709071c1700b00779f8e7ec5bsi28751424ejc.42.2022.10.24.05.52.20; Mon, 24 Oct 2022 05:52:45 -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=jOjUGyq0; 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 S234478AbiJXMvT (ORCPT + 99 others); Mon, 24 Oct 2022 08:51:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234713AbiJXMpd (ORCPT ); Mon, 24 Oct 2022 08:45:33 -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 16E3520BE1; Mon, 24 Oct 2022 05:09:57 -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 062C261254; Mon, 24 Oct 2022 12:09:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17F1BC433D6; Mon, 24 Oct 2022 12:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613361; bh=2Vjaw+jnNPYG7C987hDFRmh/ww6z2y9ybP/IXCozQTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jOjUGyq0IzlmWu9kmm6mkur/pupHbEG0AB5gO9F3p8RqSfS+v4KT/QoWIRW3zRb+N BCsE0mlQo/w/5KpAdEoFgQHEDOMALt7tcyYaFuLlNJWS+SnnkBQxQHTgk2SHj7nAmE CEF+2ncMsbdDvHQpzu68uODC8ExOa8XzgER+SIzc= 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.4 107/255] ALSA: hda/hdmi: Dont skip notification handling during PM operation Date: Mon, 24 Oct 2022 13:30:17 +0200 Message-Id: <20221024113006.021031087@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@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?1747573502622803043?= X-GMAIL-MSGID: =?utf-8?q?1747573502622803043?= 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 169e74299987..091a7fe85451 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2570,9 +2570,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); } @@ -2775,9 +2772,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);