mbox series

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

Message ID 20210121173745.771483-1-kai.heng.feng@canonical.com
Headers show
Series Fix regression introduced by codec PM change | expand

Message

Kai-Heng Feng Jan. 21, 2021, 5:37 p.m. UTC
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(-)

Comments

Paolo Pisati Jan. 22, 2021, 9:53 a.m. UTC | #1
On Fri, Jan 22, 2021 at 01:37:41AM +0800, Kai-Heng Feng wrote:
> BugLink: https://bugs.launchpad.net/bugs/1912676
William Breathitt Gray Jan. 28, 2021, 11:47 a.m. UTC | #2
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
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Acked-by: William Breathitt Gray <william.gray@canonical.com>
Timo Aaltonen Jan. 29, 2021, 7:42 a.m. UTC | #3
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
Stefan Bader Jan. 29, 2021, 9:22 a.m. UTC | #4
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 <stefan.bader@canonical.com>
Stefan Bader Feb. 12, 2021, 9:33 a.m. UTC | #5
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