Message ID | 20201117165429.1231318-1-kai.heng.feng@canonical.com |
---|---|
Headers | show |
Series | Fix no headset sound after S3 on Intel HDA | expand |
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 <stefan.bader@canonical.com>
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 <kleber.souza@canonical.com>
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
On 17.11.2020 18.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(-) > applied to oem-5.6, thanks