[SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Kai-Heng Feng
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(-)

--
2.29.2


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/4] ASoC: SOF: Intel: hda: Resume codec to do jack detection

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1912676

Instead of queueing jackpoll_work, runtime resume the codec to let it
use different jack detection methods based on jackpoll_interval.

This partially matches SOF driver's behavior with commit a6e7d0a4bdb0
("ALSA: hda: fix jack detection with Realtek codecs when in D3"), the
difference is SOF unconditionally resumes the codec.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20210112181128.1229827-1-kai.heng.feng@...
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit bcd7059abc19e6ec5b2260dff6a008fb99c4eef9 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/soc/sof/intel/hda-codec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c
index 9500572c0e31..b45aeabc4b9f 100644
--- a/sound/soc/sof/intel/hda-codec.c
+++ b/sound/soc/sof/intel/hda-codec.c
@@ -93,8 +93,7 @@ void hda_codec_jack_check(struct snd_sof_dev *sdev)
  * has been recorded in STATESTS
  */
  if (codec->jacktbl.used)
- schedule_delayed_work(&codec->jackpoll_work,
-      codec->jackpoll_interval);
+ pm_request_resume(&codec->core.dev);
 }
 #else
 void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev) {}
--
2.29.2


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/4] ASoC: SOF: Intel: hda: Modify existing helper to disable WAKEEN

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1912676

Modify hda_codec_jack_wake_enable() to also support disable WAKEEN.
In addition, this patch also moves the WAKEEN disablement call out of
hda_codec_jack_check() into hda_codec_jack_wake_enable().

This is a preparation for next patch.

No functional change intended.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20210112181128.1229827-2-kai.heng.feng@...
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit 31ba0c0776027896553bd8477baff7c8b5d95699 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/soc/sof/intel/hda-codec.c | 16 +++++++---------
 sound/soc/sof/intel/hda-dsp.c   |  6 ++++--
 sound/soc/sof/intel/hda.h       |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c
index b45aeabc4b9f..b998950c2927 100644
--- a/sound/soc/sof/intel/hda-codec.c
+++ b/sound/soc/sof/intel/hda-codec.c
@@ -63,16 +63,18 @@ static int hda_codec_load_module(struct hda_codec *codec)
 }
 
 /* enable controller wake up event for all codecs with jack connectors */
-void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev)
+void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev, bool enable)
 {
  struct hda_bus *hbus = sof_to_hbus(sdev);
  struct hdac_bus *bus = sof_to_bus(sdev);
  struct hda_codec *codec;
  unsigned int mask = 0;
 
- list_for_each_codec(codec, hbus)
- if (codec->jacktbl.used)
- mask |= BIT(codec->core.addr);
+ if (enable) {
+ list_for_each_codec(codec, hbus)
+ if (codec->jacktbl.used)
+ mask |= BIT(codec->core.addr);
+ }
 
  snd_hdac_chip_updatew(bus, WAKEEN, STATESTS_INT_MASK, mask);
 }
@@ -81,12 +83,8 @@ void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev)
 void hda_codec_jack_check(struct snd_sof_dev *sdev)
 {
  struct hda_bus *hbus = sof_to_hbus(sdev);
- struct hdac_bus *bus = sof_to_bus(sdev);
  struct hda_codec *codec;
 
- /* disable controller Wake Up event*/
- snd_hdac_chip_updatew(bus, WAKEEN, STATESTS_INT_MASK, 0);
-
  list_for_each_codec(codec, hbus)
  /*
  * Wake up all jack-detecting codecs regardless whether an event
@@ -96,7 +94,7 @@ void hda_codec_jack_check(struct snd_sof_dev *sdev)
  pm_request_resume(&codec->core.dev);
 }
 #else
-void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev) {}
+void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev, bool enable) {}
 void hda_codec_jack_check(struct snd_sof_dev *sdev) {}
 #endif /* CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC */
 EXPORT_SYMBOL_NS(hda_codec_jack_wake_enable, SND_SOC_SOF_HDA_AUDIO_CODEC);
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 9e5ff8c18f99..246699853e3a 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -601,7 +601,7 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
  if (runtime_suspend)
- hda_codec_jack_wake_enable(sdev);
+ hda_codec_jack_wake_enable(sdev, true);
 
  /* power down all hda link */
  snd_hdac_ext_bus_link_power_down_all(bus);
@@ -667,8 +667,10 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
  /* check jack status */
- if (runtime_resume)
+ if (runtime_resume) {
+ hda_codec_jack_wake_enable(sdev, false);
  hda_codec_jack_check(sdev);
+ }
 
  /* turn off the links that were off before suspend */
  list_for_each_entry(hlink, &bus->hlink_list, list) {
diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
index fe452f0d0ec7..5c1af4d587ac 100644
--- a/sound/soc/sof/intel/hda.h
+++ b/sound/soc/sof/intel/hda.h
@@ -636,7 +636,7 @@ void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev);
  */
 void hda_codec_probe_bus(struct snd_sof_dev *sdev,
  bool hda_codec_use_common_hdmi);
-void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev);
+void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev, bool enable);
 void hda_codec_jack_check(struct snd_sof_dev *sdev);
 
 #endif /* CONFIG_SND_SOC_SOF_HDA */
--
2.29.2


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 3/4] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1912676

System takes a very long time to suspend after commit 215a22ed31a1
("ALSA: hda: Refactor codec PM to use direct-complete optimization"):
[   90.065964] PM: suspend entry (s2idle)
[   90.067337] Filesystems sync: 0.001 seconds
[   90.185758] Freezing user space processes ... (elapsed 0.002 seconds) done.
[   90.188713] OOM killer disabled.
[   90.188714] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[   90.190024] printk: Suspending console(s) (use no_console_suspend to debug)
[   90.904912] intel_pch_thermal 0000:00:12.0: CPU-PCH is cool [49C], continue to suspend
[  321.262505] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5
[  328.426919] snd_hda_codec_realtek ehdaudio0D0: Unable to sync register 0x2b8000. -5
[  329.490933] ACPI: EC: interrupt blocked

That commit keeps the codec suspended during the system suspend. However,
mute/micmute LED will clear codec's direct-complete flag by
dpm_clear_superiors_direct_complete().

This doesn't play well with SOF driver. When its runtime resume is
called for system suspend, hda_codec_jack_check() schedules
jackpoll_work which uses snd_hdac_is_power_on() to check whether codec
is suspended. Because the direct-complete path isn't taken,
pm_runtime_disable() isn't called so snd_hdac_is_power_on() returns
false and jackpoll continues to run, and snd_hda_power_up_pm() cannot
power up an already suspended codec in multiple attempts, causes the
long delay on system suspend:

if (dev->power.direct_complete) {
        if (pm_runtime_status_suspended(dev)) {
                pm_runtime_disable(dev);
                if (pm_runtime_status_suspended(dev)) {
                        pm_dev_dbg(dev, state, "direct-complete ");
                        goto Complete;
                }

                pm_runtime_enable(dev);
        }
        dev->power.direct_complete = false;
}

When direct-complete path is taken, snd_hdac_is_power_on() returns true
and hda_jackpoll_work() is skipped by accident. So this is still not
correct.

If we were to use snd_hdac_is_power_on() in system PM path,
pm_runtime_status_suspended() should be used instead of
pm_runtime_suspended(), otherwise pm_runtime_{enable,disable}() may
change the outcome of snd_hdac_is_power_on().

Because devices suspend in reverse order (i.e. child first), it doesn't
make much sense to resume an already suspended codec from audio
controller. So avoid the issue by making sure jackpoll isn't used in
system PM process.

Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization")
Signed-off-by: Kai-Heng Feng <[hidden email]>
Reviewed-by: Kai Vehmanen <[hidden email]>
Link: https://lore.kernel.org/r/20210112181128.1229827-3-kai.heng.feng@...
Signed-off-by: Mark Brown <[hidden email]>
(cherry picked from commit ef4d764c99f792b725d4754a3628830f094f5c58 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/soc/sof/intel/hda-dsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 246699853e3a..57021f8009a6 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -669,7 +669,8 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
  /* check jack status */
  if (runtime_resume) {
  hda_codec_jack_wake_enable(sdev, false);
- hda_codec_jack_check(sdev);
+ if (sdev->system_suspend_target == SOF_SUSPEND_NONE)
+ hda_codec_jack_check(sdev);
  }
 
  /* turn off the links that were off before suspend */
--
2.29.2


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 4/4] ALSA: hda: Balance runtime/system PM if direct-complete is disabled

Kai-Heng Feng
In reply to this post by Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1912676

After hibernation, HDA controller can't be runtime-suspended after
commit 215a22ed31a1 ("ALSA: hda: Refactor codjc PM to use
direct-complete optimization"), which enables direct-complete for HDA
codec.

The HDA codec driver didn't expect direct-complete will be disabled
after it returns a positive value from prepare() callback. However,
there are some places that PM core can disable direct-complete. For
instance, system hibernation or when codec has subordinates like LEDs.

So if the codec is prepared for direct-complete but PM core still calls
codec's suspend or freeze callback, partially revert the commit and take
the original approach, which uses pm_runtime_force_*() helpers to
ensure PM refcount are balanced. Meanwhile, still keep prepare() and
complete() callbacks to enable direct-complete and request a resume for
jack detection, respectively.

Reported-by: Kenneth R. Crudup <[hidden email]>
Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization")
Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20210119152145.346558-1-kai.heng.feng@...
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 2b73649cee65b8e33c75c66348cb1bfe0ff9d766 linux-next)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/pci/hda/hda_codec.c | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 4fd373727b7c..f76367abf96b 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2930,7 +2930,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
  snd_hdac_leave_pm(&codec->core);
 }
 
-static int hda_codec_suspend(struct device *dev)
+static int hda_codec_runtime_suspend(struct device *dev)
 {
  struct hda_codec *codec = dev_to_hda_codec(dev);
  unsigned int state;
@@ -2949,7 +2949,7 @@ static int hda_codec_suspend(struct device *dev)
  return 0;
 }
 
-static int hda_codec_resume(struct device *dev)
+static int hda_codec_runtime_resume(struct device *dev)
 {
  struct hda_codec *codec = dev_to_hda_codec(dev);
 
@@ -2964,16 +2964,6 @@ static int hda_codec_resume(struct device *dev)
  return 0;
 }
 
-static int hda_codec_runtime_suspend(struct device *dev)
-{
- return hda_codec_suspend(dev);
-}
-
-static int hda_codec_runtime_resume(struct device *dev)
-{
- return hda_codec_resume(dev);
-}
-
 #endif /* CONFIG_PM */
 
 #ifdef CONFIG_PM_SLEEP
@@ -2994,31 +2984,31 @@ static void hda_codec_pm_complete(struct device *dev)
 static int hda_codec_pm_suspend(struct device *dev)
 {
  dev->power.power_state = PMSG_SUSPEND;
- return hda_codec_suspend(dev);
+ return pm_runtime_force_suspend(dev);
 }
 
 static int hda_codec_pm_resume(struct device *dev)
 {
  dev->power.power_state = PMSG_RESUME;
- return hda_codec_resume(dev);
+ return pm_runtime_force_resume(dev);
 }
 
 static int hda_codec_pm_freeze(struct device *dev)
 {
  dev->power.power_state = PMSG_FREEZE;
- return hda_codec_suspend(dev);
+ return pm_runtime_force_suspend(dev);
 }
 
 static int hda_codec_pm_thaw(struct device *dev)
 {
  dev->power.power_state = PMSG_THAW;
- return hda_codec_resume(dev);
+ return pm_runtime_force_resume(dev);
 }
 
 static int hda_codec_pm_restore(struct device *dev)
 {
  dev->power.power_state = PMSG_RESTORE;
- return hda_codec_resume(dev);
+ return pm_runtime_force_resume(dev);
 }
 #endif /* CONFIG_PM_SLEEP */
 
--
2.29.2


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED H: Re: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Paolo Pisati-5
In reply to this post by Kai-Heng Feng
On Fri, Jan 22, 2021 at 01:37:41AM +0800, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1912676

--
bye,
p.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

William Breathitt Gray
In reply to this post by Kai-Heng Feng
On Fri, Jan 22, 2021 at 01:37:41AM +0800, Kai-Heng Feng wrote:

> 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(-)
>
> --
> 2.29.2
>
>
> --
> kernel-team mailing list
> [hidden email]
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Acked-by: William Breathitt Gray <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED [OEM-5.10] Re: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Timo Aaltonen-6
In reply to this post by Kai-Heng Feng
On 21.1.2021 19.37, Kai-Heng Feng wrote:

> 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(-)

applied to oem-5.10, thanks

--
t

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Stefan Bader-2
In reply to this post by Kai-Heng Feng
On 21.01.21 18:37, Kai-Heng Feng wrote:

> 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: Stefan Bader <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

APPLIED[G]: [SRU] [G/Unstable/OEM-5.10] [PATCH 0/4] Fix regression introduced by codec PM change

Stefan Bader-2
In reply to this post by Kai-Heng Feng
On 21.01.21 18:37, Kai-Heng Feng wrote:

> 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(-)
>
Applied to groovy:linux/master-next. Thanks.

-Stefan


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (849 bytes) Download Attachment