[SRU] [G/OEM-5.6] [PATCH 0/4] Fix no headset sound after S3 on Intel HDA

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

[SRU] [G/OEM-5.6] [PATCH 0/4] Fix no headset sound after S3 on Intel HDA

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

[Impact]
After system S3, hotplugging headset cannot produce any sound despite of
being auto-selected as audio output.

[Fix]
Avoid using pm_runtime_force_{suspend,resume} helpers to ensure codec
suspend/resume flow, and also ensure HDA driver and PCI set correct
wakeup settings.

[Test case]
Plug headset, unplug headset, switch audio ouput from speakers to HDMI
to let Intel HDA auto suspend. Suspend/resume the system, plug the
headset again, hear no sound.

With the patch series applied, the issue is gone.

[Where problems could occur]
If there is bad firmware/hardware that makes codec have system-wide
wakeup capability, direct-complete flow may trigger unwanted system
wakeup or even break system suspend. The series was tested on both AMD
and Intel platforms, with Realtek and Connexant codecs respectively.

Kai-Heng Feng (3):
  ALSA: hda: Refactor codec PM to use direct-complete optimization
  ALSA: hda: Separate runtime and system suspend
  ALSA: hda: Reinstate runtime_allow() for all hda controllers

Takashi Iwai (1):
  ALSA: hda: Workaround for spurious wakeups on some Intel platforms

 sound/pci/hda/hda_codec.c      | 45 +++++++++++++++++++-----------
 sound/pci/hda/hda_controller.h |  1 +
 sound/pci/hda/hda_intel.c      | 50 +++++++++++++++++++++++-----------
 3 files changed, 64 insertions(+), 32 deletions(-)

--
2.28.0


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

[OEM-5.6] [PATCH 1/4] ALSA: hda: Workaround for spurious wakeups on some Intel platforms

Kai-Heng Feng
From: Takashi Iwai <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1904595

We've received a regression report on Intel HD-audio controller that
wakes up immediately after S3 suspend.  The bisection leads to the
commit c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not
needed").  This commit replaces the system-suspend to use
pm_runtime_force_suspend() instead of the direct call of
__azx_runtime_suspend().  However, by some really mysterious reason,
pm_runtime_force_suspend() causes a spurious wakeup (although it calls
the same __azx_runtime_suspend() internally).

As an ugly workaround for now, revert the behavior to call
__azx_runtime_suspend() and __azx_runtime_resume() for those old Intel
platforms that may exhibit such a problem, while keeping the new
standard pm_runtime_force_suspend() and pm_runtime_force_resume()
pair for the remaining chips.

Fixes: c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not needed")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208649
Cc: <[hidden email]>
Link: https://lore.kernel.org/r/20200727164443.4233-1-tiwai@...
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit a6630529aecb5a3e84370c376ed658e892e6261e)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/pci/hda/hda_controller.h |  2 +-
 sound/pci/hda/hda_intel.c      | 17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index 82e26442724b..a356fb0e5773 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -41,7 +41,7 @@
 /* 24 unused */
 #define AZX_DCAPS_COUNT_LPIB_DELAY  (1 << 25) /* Take LPIB as delay */
 #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
-/* 27 unused */
+#define AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP (1 << 27) /* Workaround for spurious wakeups after suspend */
 #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
 #define AZX_DCAPS_NO_MSI64      (1 << 29) /* Stick to 32-bit MSIs */
 #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 16c66aa4d381..ca62cc2c9f67 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -298,7 +298,8 @@ enum {
 /* PCH for HSW/BDW; with runtime PM */
 /* no i915 binding for this as HSW/BDW has another controller for HDMI */
 #define AZX_DCAPS_INTEL_PCH \
- (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME)
+ (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME |\
+ AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
 
 /* HSW HDMI */
 #define AZX_DCAPS_INTEL_HASWELL \
@@ -1030,7 +1031,14 @@ static int azx_suspend(struct device *dev)
  chip = card->private_data;
  bus = azx_bus(chip);
  snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
- pm_runtime_force_suspend(dev);
+ /* An ugly workaround: direct call of __azx_runtime_suspend() and
+ * __azx_runtime_resume() for old Intel platforms that suffer from
+ * spurious wakeups after S3 suspend
+ */
+ if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
+ __azx_runtime_suspend(chip);
+ else
+ pm_runtime_force_suspend(dev);
  if (bus->irq >= 0) {
  free_irq(bus->irq, chip);
  bus->irq = -1;
@@ -1059,7 +1067,10 @@ static int azx_resume(struct device *dev)
  if (azx_acquire_irq(chip, 1) < 0)
  return -EIO;
 
- pm_runtime_force_resume(dev);
+ if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
+ __azx_runtime_resume(chip, false);
+ else
+ pm_runtime_force_resume(dev);
  snd_power_change_state(card, SNDRV_CTL_POWER_D0);
 
  trace_azx_resume(chip);
--
2.28.0


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

[G/OEM-5.6] [PATCH 2/4] ALSA: hda: Refactor codec PM to use direct-complete optimization

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

Upon system resume, hda_codec_pm_resume() uses hda_codec_force_resume()
to resume the codec. However, pm_runtime_force_resume() won't really
resume the codec because of pm_runtime_need_not_resume() check.

Hence, hda_codec_force_resume() schedules a jackpoll work, which is to
really power up the codec.

Instead of doing that, we can use direct-complete to make the PM flow
more straightforward, and keep codec always suspended through system PM
flow if conditions are met.

On system suspend, PM core will decide what to do based on
hda_codec_pm_prepare():
- If codec is not runtime-suspended, PM core will suspend and resume the
device as normal.
- If codec is runtime-suspended, PM core will try to keep it suspended.
If it's still suspended after system resume, we use
hda_codec_pm_complete() to resume codec if it's needed.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20201027130038.16463-2-kai.heng.feng@...
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 215a22ed31a1332075866eca07744d442367c04b)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/pci/hda/hda_codec.c | 45 +++++++++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 16 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 0491dc1b6f3f..58fd0d2f9380 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_runtime_suspend(struct device *dev)
+static int hda_codec_suspend(struct device *dev)
 {
  struct hda_codec *codec = dev_to_hda_codec(dev);
  unsigned int state;
@@ -2945,7 +2945,7 @@ static int hda_codec_runtime_suspend(struct device *dev)
  return 0;
 }
 
-static int hda_codec_runtime_resume(struct device *dev)
+static int hda_codec_resume(struct device *dev)
 {
  struct hda_codec *codec = dev_to_hda_codec(dev);
 
@@ -2955,57 +2955,70 @@ static int hda_codec_runtime_resume(struct device *dev)
  pm_runtime_mark_last_busy(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
-static int hda_codec_force_resume(struct device *dev)
+static int hda_codec_pm_prepare(struct device *dev)
+{
+ return pm_runtime_suspended(dev);
+}
+
+static void hda_codec_pm_complete(struct device *dev)
 {
  struct hda_codec *codec = dev_to_hda_codec(dev);
- int ret;
 
- ret = pm_runtime_force_resume(dev);
- /* schedule jackpoll work for jack detection update */
- if (codec->jackpoll_interval ||
-    (pm_runtime_suspended(dev) && hda_codec_need_resume(codec)))
- schedule_delayed_work(&codec->jackpoll_work,
-      codec->jackpoll_interval);
- return ret;
+ if (pm_runtime_suspended(dev) && (codec->jackpoll_interval ||
+    hda_codec_need_resume(codec) || codec->forced_resume))
+ pm_request_resume(dev);
 }
 
 static int hda_codec_pm_suspend(struct device *dev)
 {
  dev->power.power_state = PMSG_SUSPEND;
- return pm_runtime_force_suspend(dev);
+ return hda_codec_suspend(dev);
 }
 
 static int hda_codec_pm_resume(struct device *dev)
 {
  dev->power.power_state = PMSG_RESUME;
- return hda_codec_force_resume(dev);
+ return hda_codec_resume(dev);
 }
 
 static int hda_codec_pm_freeze(struct device *dev)
 {
  dev->power.power_state = PMSG_FREEZE;
- return pm_runtime_force_suspend(dev);
+ return hda_codec_suspend(dev);
 }
 
 static int hda_codec_pm_thaw(struct device *dev)
 {
  dev->power.power_state = PMSG_THAW;
- return hda_codec_force_resume(dev);
+ return hda_codec_resume(dev);
 }
 
 static int hda_codec_pm_restore(struct device *dev)
 {
  dev->power.power_state = PMSG_RESTORE;
- return hda_codec_force_resume(dev);
+ return hda_codec_resume(dev);
 }
 #endif /* CONFIG_PM_SLEEP */
 
 /* referred in hda_bind.c */
 const struct dev_pm_ops hda_codec_driver_pm = {
 #ifdef CONFIG_PM_SLEEP
+ .prepare = hda_codec_pm_prepare,
+ .complete = hda_codec_pm_complete,
  .suspend = hda_codec_pm_suspend,
  .resume = hda_codec_pm_resume,
  .freeze = hda_codec_pm_freeze,
--
2.28.0


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

[G/OEM-5.6] [PATCH 3/4] ALSA: hda: Separate runtime and system suspend

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

Both pm_runtime_force_suspend() and pm_runtime_force_resume() have
some implicit checks, so it can make code flow more straightforward if
we separate runtime and system suspend callbacks.

High Definition Audio Specification, 4.5.9.3 Codec Wake From System S3
states that codec can wake the system up from S3 if WAKEEN is toggled.
Since HDA controller has different wakeup settings for runtime and
system susend, we also need to explicitly disable direct-complete which
can be enabled automatically by PCI core. In addition to that, avoid
waking up codec if runtime resume is for system suspend, to not break
direct-complete for codecs.

While at it, also remove AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP, as the
original bug commit a6630529aecb ("ALSA: hda: Workaround for spurious
wakeups on some Intel platforms") solves doesn't happen with this
patch.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20201027130038.16463-3-kai.heng.feng@...
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit f5dac54d9d93826a776dffc848df76746f7135bb)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/pci/hda/hda_controller.h |  3 +-
 sound/pci/hda/hda_intel.c      | 62 +++++++++++++++++++---------------
 2 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h
index a356fb0e5773..9da7a06d024f 100644
--- a/sound/pci/hda/hda_controller.h
+++ b/sound/pci/hda/hda_controller.h
@@ -41,7 +41,7 @@
 /* 24 unused */
 #define AZX_DCAPS_COUNT_LPIB_DELAY  (1 << 25) /* Take LPIB as delay */
 #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */
-#define AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP (1 << 27) /* Workaround for spurious wakeups after suspend */
+/* 27 unused */
 #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
 #define AZX_DCAPS_NO_MSI64      (1 << 29) /* Stick to 32-bit MSIs */
 #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */
@@ -143,6 +143,7 @@ struct azx {
  unsigned int align_buffer_size:1;
  unsigned int region_requested:1;
  unsigned int disabled:1; /* disabled by vga_switcheroo */
+ unsigned int pm_prepared:1;
 
  /* GTS present */
  unsigned int gts_present:1;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index ca62cc2c9f67..031b8ba82fae 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -298,8 +298,7 @@ enum {
 /* PCH for HSW/BDW; with runtime PM */
 /* no i915 binding for this as HSW/BDW has another controller for HDMI */
 #define AZX_DCAPS_INTEL_PCH \
- (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME |\
- AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
+ (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME)
 
 /* HSW HDMI */
 #define AZX_DCAPS_INTEL_HASWELL \
@@ -986,7 +985,7 @@ static void __azx_runtime_suspend(struct azx *chip)
  display_power(chip, false);
 }
 
-static void __azx_runtime_resume(struct azx *chip, bool from_rt)
+static void __azx_runtime_resume(struct azx *chip)
 {
  struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
  struct hdac_bus *bus = azx_bus(chip);
@@ -1003,7 +1002,8 @@ static void __azx_runtime_resume(struct azx *chip, bool from_rt)
  azx_init_pci(chip);
  hda_intel_init_chip(chip, true);
 
- if (from_rt) {
+ /* Avoid codec resume if runtime resume is for system suspend */
+ if (!chip->pm_prepared) {
  list_for_each_codec(codec, &chip->bus) {
  if (codec->relaxed_resume)
  continue;
@@ -1019,6 +1019,29 @@ static void __azx_runtime_resume(struct azx *chip, bool from_rt)
 }
 
 #ifdef CONFIG_PM_SLEEP
+static int azx_prepare(struct device *dev)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+ struct azx *chip;
+
+ chip = card->private_data;
+ chip->pm_prepared = 1;
+
+ /* HDA controller always requires different WAKEEN for runtime suspend
+ * and system suspend, so don't use direct-complete here.
+ */
+ return 0;
+}
+
+static void azx_complete(struct device *dev)
+{
+ struct snd_card *card = dev_get_drvdata(dev);
+ struct azx *chip;
+
+ chip = card->private_data;
+ chip->pm_prepared = 0;
+}
+
 static int azx_suspend(struct device *dev)
 {
  struct snd_card *card = dev_get_drvdata(dev);
@@ -1030,15 +1053,7 @@ static int azx_suspend(struct device *dev)
 
  chip = card->private_data;
  bus = azx_bus(chip);
- snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
- /* An ugly workaround: direct call of __azx_runtime_suspend() and
- * __azx_runtime_resume() for old Intel platforms that suffer from
- * spurious wakeups after S3 suspend
- */
- if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
- __azx_runtime_suspend(chip);
- else
- pm_runtime_force_suspend(dev);
+ __azx_runtime_suspend(chip);
  if (bus->irq >= 0) {
  free_irq(bus->irq, chip);
  bus->irq = -1;
@@ -1067,11 +1082,7 @@ static int azx_resume(struct device *dev)
  if (azx_acquire_irq(chip, 1) < 0)
  return -EIO;
 
- if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP)
- __azx_runtime_resume(chip, false);
- else
- pm_runtime_force_resume(dev);
- snd_power_change_state(card, SNDRV_CTL_POWER_D0);
+ __azx_runtime_resume(chip);
 
  trace_azx_resume(chip);
  return 0;
@@ -1119,10 +1130,7 @@ static int azx_runtime_suspend(struct device *dev)
  chip = card->private_data;
 
  /* enable controller wake up event */
- if (snd_power_get_state(card) == SNDRV_CTL_POWER_D0) {
- azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
-   STATESTS_INT_MASK);
- }
+ azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | STATESTS_INT_MASK);
 
  __azx_runtime_suspend(chip);
  trace_azx_runtime_suspend(chip);
@@ -1133,18 +1141,14 @@ static int azx_runtime_resume(struct device *dev)
 {
  struct snd_card *card = dev_get_drvdata(dev);
  struct azx *chip;
- bool from_rt = snd_power_get_state(card) == SNDRV_CTL_POWER_D0;
 
  if (!azx_is_pm_ready(card))
  return 0;
  chip = card->private_data;
- __azx_runtime_resume(chip, from_rt);
+ __azx_runtime_resume(chip);
 
  /* disable controller Wake Up event*/
- if (from_rt) {
- azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
-   ~STATESTS_INT_MASK);
- }
+ azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & ~STATESTS_INT_MASK);
 
  trace_azx_runtime_resume(chip);
  return 0;
@@ -1178,6 +1182,8 @@ static int azx_runtime_idle(struct device *dev)
 static const struct dev_pm_ops azx_pm = {
  SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume)
 #ifdef CONFIG_PM_SLEEP
+ .prepare = azx_prepare,
+ .complete = azx_complete,
  .freeze_noirq = azx_freeze_noirq,
  .thaw_noirq = azx_thaw_noirq,
 #endif
--
2.28.0


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

[G/OEM-5.6] [PATCH 4/4] ALSA: hda: Reinstate runtime_allow() for all hda controllers

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

The broken jack detection should be fixed by commit a6e7d0a4bdb0 ("ALSA:
hda: fix jack detection with Realtek codecs when in D3"), let's try
enabling runtime PM by default again.

Signed-off-by: Kai-Heng Feng <[hidden email]>
Link: https://lore.kernel.org/r/20201027130038.16463-4-kai.heng.feng@...
Signed-off-by: Takashi Iwai <[hidden email]>
(cherry picked from commit 9fc149c3bce7bdbb94948a8e6bd025e3b3538603)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 sound/pci/hda/hda_intel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 031b8ba82fae..fb9b6c005317 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2362,6 +2362,7 @@ static int azx_probe_continue(struct azx *chip)
 
  if (azx_has_pm_runtime(chip)) {
  pm_runtime_use_autosuspend(&pci->dev);
+ pm_runtime_allow(&pci->dev);
  pm_runtime_put_autosuspend(&pci->dev);
  }
 
--
2.28.0


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

ACK/Cmnt: [SRU] [G/OEM-5.6] [PATCH 0/4] Fix no headset sound after S3 on Intel HDA

Stefan Bader-2
In reply to this post by Kai-Heng Feng
On 17.11.20 17:54, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1904595
>
> [Impact]
> After system S3, hotplugging headset cannot produce any sound despite of
> being auto-selected as audio output.
>
> [Fix]
> Avoid using pm_runtime_force_{suspend,resume} helpers to ensure codec
> suspend/resume flow, and also ensure HDA driver and PCI set correct
> wakeup settings.
>
> [Test case]
> Plug headset, unplug headset, switch audio ouput from speakers to HDMI
> to let Intel HDA auto suspend. Suspend/resume the system, plug the
> headset again, hear no sound.
>
> With the patch series applied, the issue is gone.
>
> [Where problems could occur]
> If there is bad firmware/hardware that makes codec have system-wide
> wakeup capability, direct-complete flow may trigger unwanted system
> wakeup or even break system suspend. The series was tested on both AMD
> and Intel platforms, with Realtek and Connexant codecs respectively.
>
> Kai-Heng Feng (3):
>   ALSA: hda: Refactor codec PM to use direct-complete optimization
>   ALSA: hda: Separate runtime and system suspend
>   ALSA: hda: Reinstate runtime_allow() for all hda controllers
>
> Takashi Iwai (1):
>   ALSA: hda: Workaround for spurious wakeups on some Intel platforms
>
>  sound/pci/hda/hda_codec.c      | 45 +++++++++++++++++++-----------
>  sound/pci/hda/hda_controller.h |  1 +
>  sound/pci/hda/hda_intel.c      | 50 +++++++++++++++++++++++-----------
>  3 files changed, 64 insertions(+), 32 deletions(-)
>
The first patch for Groovy is a bit scary just because it changes (from my
knowledge) a rather central part of the stack. Things seem to be already in the
upstream tree, so I hope there is no surprises.


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
|

ACK: [SRU] [G/OEM-5.6] [PATCH 0/4] Fix no headset sound after S3 on Intel HDA

Kleber Souza
In reply to this post by Kai-Heng Feng
On 17.11.20 17:54, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1904595
>
> [Impact]
> After system S3, hotplugging headset cannot produce any sound despite of
> being auto-selected as audio output.
>
> [Fix]
> Avoid using pm_runtime_force_{suspend,resume} helpers to ensure codec
> suspend/resume flow, and also ensure HDA driver and PCI set correct
> wakeup settings.
>
> [Test case]
> Plug headset, unplug headset, switch audio ouput from speakers to HDMI
> to let Intel HDA auto suspend. Suspend/resume the system, plug the
> headset again, hear no sound.
>
> With the patch series applied, the issue is gone.
>
> [Where problems could occur]
> If there is bad firmware/hardware that makes codec have system-wide
> wakeup capability, direct-complete flow may trigger unwanted system
> wakeup or even break system suspend. The series was tested on both AMD
> and Intel platforms, with Realtek and Connexant codecs respectively.
>
> Kai-Heng Feng (3):
>    ALSA: hda: Refactor codec PM to use direct-complete optimization
>    ALSA: hda: Separate runtime and system suspend
>    ALSA: hda: Reinstate runtime_allow() for all hda controllers
>
> Takashi Iwai (1):
>    ALSA: hda: Workaround for spurious wakeups on some Intel platforms
>
>   sound/pci/hda/hda_codec.c      | 45 +++++++++++++++++++-----------
>   sound/pci/hda/hda_controller.h |  1 +
>   sound/pci/hda/hda_intel.c      | 50 +++++++++++++++++++++++-----------
>   3 files changed, 64 insertions(+), 32 deletions(-)
>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

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

APPLIED: [SRU] [Groovy] [PATCH 0/4] Fix no headset sound after S3 on Intel HDA

William Breathitt Gray
In reply to this post by Kai-Heng Feng
On Wed, Nov 18, 2020 at 12:54:25AM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1904595
>
> [Impact]
> After system S3, hotplugging headset cannot produce any sound despite of
> being auto-selected as audio output.
>
> [Fix]
> Avoid using pm_runtime_force_{suspend,resume} helpers to ensure codec
> suspend/resume flow, and also ensure HDA driver and PCI set correct
> wakeup settings.
>
> [Test case]
> Plug headset, unplug headset, switch audio ouput from speakers to HDMI
> to let Intel HDA auto suspend. Suspend/resume the system, plug the
> headset again, hear no sound.
>
> With the patch series applied, the issue is gone.
>
> [Where problems could occur]
> If there is bad firmware/hardware that makes codec have system-wide
> wakeup capability, direct-complete flow may trigger unwanted system
> wakeup or even break system suspend. The series was tested on both AMD
> and Intel platforms, with Realtek and Connexant codecs respectively.
>
> Kai-Heng Feng (3):
>   ALSA: hda: Refactor codec PM to use direct-complete optimization
>   ALSA: hda: Separate runtime and system suspend
>   ALSA: hda: Reinstate runtime_allow() for all hda controllers
>
> Takashi Iwai (1):
>   ALSA: hda: Workaround for spurious wakeups on some Intel platforms
>
>  sound/pci/hda/hda_codec.c      | 45 +++++++++++++++++++-----------
>  sound/pci/hda/hda_controller.h |  1 +
>  sound/pci/hda/hda_intel.c      | 50 +++++++++++++++++++++++-----------
>  3 files changed, 64 insertions(+), 32 deletions(-)
>
> --
> 2.28.0
Applied to Groovy:linux.

William Breathitt Gray

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

signature.asc (849 bytes) Download Attachment