From patchwork Thu Jan 21 17:37:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1429986 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=) 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 4DM8jw0328z9sSs; Fri, 22 Jan 2021 04:37:56 +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 1l2du2-0007OY-Lc; Thu, 21 Jan 2021 17:37:50 +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 1l2du1-0007OS-JH for kernel-team@lists.ubuntu.com; Thu, 21 Jan 2021 17:37:49 +0000 Received: from 1-171-232-235.dynamic-ip.hinet.net ([1.171.232.235] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1l2du0-0004KM-NN for kernel-team@lists.ubuntu.com; Thu, 21 Jan 2021 17:37:49 +0000 From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change Date: Fri, 22 Jan 2021 01:37:41 +0800 Message-Id: <20210121173745.771483-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1912676 [Impact] After the codec PM optimization, laptops with SOF may take very long to suspend. In addition to that, HDA may not be able to be runtim suspended again after resume from hibernation. [Fix] Prevent the SOF driver touches codec during system suspend, and properly refcount the PM usage counter. [Test] On an affected SOF system, it takes 5 mins to suspend. On another affected HDA system, S4 resume causes high power consumption becuase HDA controller can't be runtime suspended. Both issues are gone by applying these patches. [Where problems could occur] If somehow any laptop depends on the old behavior to work properly, this can break them. It's highly unlikely though. Kai-Heng Feng (4): ASoC: SOF: Intel: hda: Resume codec to do jack detection ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN ASoC: SOF: Intel: hda: Avoid checking jack on system suspend ALSA: hda: Balance runtime/system PM if direct-complete is disabled sound/pci/hda/hda_codec.c | 24 +++++++----------------- sound/soc/sof/intel/hda-codec.c | 19 ++++++++----------- sound/soc/sof/intel/hda-dsp.c | 9 ++++++--- sound/soc/sof/intel/hda.h | 2 +- 4 files changed, 22 insertions(+), 32 deletions(-) Acked-by: William Breathitt Gray Acked-by: Stefan Bader