From patchwork Tue Oct 13 07:53:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1381382 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C9SVQ0SrVz9sTs; Tue, 13 Oct 2020 18:54:06 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kSF8C-0000l9-EK; Tue, 13 Oct 2020 07:54:00 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kSF8B-0000l3-4A for kernel-team@lists.ubuntu.com; Tue, 13 Oct 2020 07:53:59 +0000 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kSF8A-0001aG-DU for kernel-team@lists.ubuntu.com; Tue, 13 Oct 2020 07:53:58 +0000 From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [RESEND] [SRU] [F/G/Unstable/OEM-5.6] [PATCH 0/3] Fix broken MSI interrupt after HDA controller was suspended Date: Tue, 13 Oct 2020 15:53:52 +0800 Message-Id: <20201013075355.32709-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1899586 [Impact] After HDA controller gets suspended and resumed, no MSI interrupt raised when plugging headset to the audio jack. [Fix] Power up the Realtek codec when HDA controller runtime resumes. [Test] 1) Make sure both codec and HDA controller are runtime suspended. 2) Runtime resume the HDA controller without runtime resume the codec. 3) Plug a headset and see if the system can detect anything. With the fix applied, we can see azx_interrupt() is working again by using ftrace. [Regression Potential] If there's any system that is not affected by this issue, runtime-resume the HDA controller will take a slightly longer time. It's rather unlikely, since _all_ systems with Realtek codec we tested have this issue, regardless of AMD or Intel. Kai Vehmanen (1): UBUNTU: SAUCE: ALSA: hda: fix jack detection with Realtek codecs when in D3 Takashi Iwai (2): ALSA: hda: Skip controller resume if not needed ALSA: hda: Always use jackpoll helper for jack update after resume include/sound/hda_codec.h | 6 ++++++ sound/pci/hda/hda_codec.c | 28 +++++++++++++++----------- sound/pci/hda/hda_intel.c | 37 ++++++++++++++++++++--------------- sound/pci/hda/patch_realtek.c | 1 + 4 files changed, 45 insertions(+), 27 deletions(-) Acked-by: Stefan Bader