From patchwork Sat Oct 22 07:23:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1097087wrr; Sat, 22 Oct 2022 01:06:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nNnVULV87MV/1krp1Ew+JxR9p19wN8zrcxEd3MheFoiOc2WLB0oK1o1Uzr29n4hW9hKOr X-Received: by 2002:a17:90b:33c3:b0:20a:ebc3:6514 with SMTP id lk3-20020a17090b33c300b0020aebc36514mr61963587pjb.147.1666426005919; Sat, 22 Oct 2022 01:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666426005; cv=none; d=google.com; s=arc-20160816; b=vz9ZIFR67M1ZEmqbHBl+h2R3bhD8PfgwmkmYvlVxfnrC9NXsDfl5KdnxyWlnvR1d12 kUdrro+islcpxQRUjtowir1nKLsDf9YvpSN5qmokt47dsbtzPaP3wF56cUR3HKcOZFX4 7MtBGnpoNMiA5XD/vEDVMJyHS/8Y35n6vkReKIqq9C3kMrUszHWp17hzlVGGMflDPhXP ebqTIWWeufJV5X6AKyPkjkIbf7sEbmxmGDBwIhWLkHiN3c2W24UVb/NmwdaJwKePU0DW Y+vIuge27uTHB2ACRJpMaEefqI7UbmJGsPRJnQddUI1aEoGDg+EJHH0IlIPssFMyQIQF PdKQ== 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=6SwdAG27AfUmRTQdWkAPa+ezJzmYcoDJbWpupl3Gkrc=; b=a/CjUk1FOz0mkE8Wk9WMVo6uVYAncI0o0dNvlqy7BVBtVvC186029L9SK8/x0mGA7t NmtLlGTDO5wCulvMTqARTJ8nHGaIEQKz9HayNrDTssedeURUKz2dWkbDjz/BXtHngGUS lScrXnuTs059opQkkzanDNNYZK/iXMDivD9OGgiIj0IaJf2Gm/E5xBl8vNC23r3ZGpYf t3VASBMXqi3C0Acakvr6dFpaZ+Ie1TSa5XlnfiMLWVyM4qYKy1EXKTKqjBpG/6MLl7zi MPGr2AWwGe3XZbDeRsJoZLJP2EdryxUy1BE8PdDoibjbsMA6a9HYxO9LUjIYYjkfSOt+ +9Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="xv/Gulr3"; 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 z14-20020a170902d54e00b00183f6ff535dsi27375191plf.490.2022.10.22.01.06.32; Sat, 22 Oct 2022 01:06: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="xv/Gulr3"; 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 S232823AbiJVIGG (ORCPT + 99 others); Sat, 22 Oct 2022 04:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbiJVH7o (ORCPT ); Sat, 22 Oct 2022 03:59:44 -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 67CDA1CFC7; Sat, 22 Oct 2022 00:49:53 -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 BD7EE60B1F; Sat, 22 Oct 2022 07:49:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A53BAC433C1; Sat, 22 Oct 2022 07:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424980; bh=gg1wQswyGA90Rm8bnUp+ZwCqX2EINFwKWxmb5fEPtvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xv/Gulr3m+ENM7TkkV0GsHfDEcEOccLsRhjVJbAP1a+B8WF6SfKvcSGfMSPJLJhGk PesUsD3FhxcyrzL5+c6JEd6FApjZo+FDHdMwutdVJlkceDRKA9XD0LiLJHNJOhTLS3 CJ/WXyCwcuQZMelImL2AYIl4b32tqn0rjfzoZwgE= 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.19 347/717] ALSA: hda/hdmi: Dont skip notification handling during PM operation Date: Sat, 22 Oct 2022 09:23:46 +0200 Message-Id: <20221022072511.020405718@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747374315481991476?= X-GMAIL-MSGID: =?utf-8?q?1747374315481991476?= 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 c239d9dbbaef..63c0c84348d0 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2747,9 +2747,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); } @@ -2933,9 +2930,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);