We have an ASUS E406MA laptop equipped with Intel N5000 CPU. After system suspend & resume, the audio playback does not work anymore. The device for sound output is listed as a headphone device. Plugging in headphones no sound is audible neither.
Here are the error messages after resume:
[ 184.525681] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x20bf8100 [ 185.528682] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x20bf8100 [ 186.532683] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20bf8100 [ 186.736838] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.738742] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.767080] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f0d00. -5
After bisect, we found reverting the commit b5a236c175b0 "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec" can solve this issue on Linux stable 5.0.x series.
This reverts commit a57af6d07512716b78f1a32d9426bcdf6aafc50c.
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203623 Fixes: a57af6d07512 ("ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec") Cc: stable@vger.kernel.org # 5.0.x Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com --- sound/pci/hda/hda_codec.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index b238e903b9d7..dbc9eaa81358 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2952,20 +2952,6 @@ static int hda_codec_runtime_resume(struct device *dev) #endif /* CONFIG_PM */
#ifdef CONFIG_PM_SLEEP -static int hda_codec_force_resume(struct device *dev) -{ - int ret; - - /* The get/put pair below enforces the runtime resume even if the - * device hasn't been used at suspend time. This trick is needed to - * update the jack state change during the sleep. - */ - pm_runtime_get_noresume(dev); - ret = pm_runtime_force_resume(dev); - pm_runtime_put(dev); - return ret; -} - static int hda_codec_pm_suspend(struct device *dev) { dev->power.power_state = PMSG_SUSPEND; @@ -2975,7 +2961,7 @@ static int hda_codec_pm_suspend(struct device *dev) static int hda_codec_pm_resume(struct device *dev) { dev->power.power_state = PMSG_RESUME; - return hda_codec_force_resume(dev); + return pm_runtime_force_resume(dev); }
static int hda_codec_pm_freeze(struct device *dev) @@ -2987,13 +2973,13 @@ static int hda_codec_pm_freeze(struct device *dev) static int hda_codec_pm_thaw(struct device *dev) { dev->power.power_state = PMSG_THAW; - return hda_codec_force_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_force_resume(dev); + return pm_runtime_force_resume(dev); } #endif /* CONFIG_PM_SLEEP */
On Fri, 24 May 2019 07:10:17 +0200, Jian-Hong Pan wrote:
We have an ASUS E406MA laptop equipped with Intel N5000 CPU. After system suspend & resume, the audio playback does not work anymore. The device for sound output is listed as a headphone device. Plugging in headphones no sound is audible neither.
Here are the error messages after resume:
[ 184.525681] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x20bf8100 [ 185.528682] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x20bf8100 [ 186.532683] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20bf8100 [ 186.736838] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.738742] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.767080] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f0d00. -5
After bisect, we found reverting the commit b5a236c175b0 "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec" can solve this issue on Linux stable 5.0.x series.
This reverts commit a57af6d07512716b78f1a32d9426bcdf6aafc50c.
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203623 Fixes: a57af6d07512 ("ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec") Cc: stable@vger.kernel.org # 5.0.x Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com
I thought this revert isn't needed if the i915 GLK fix is applied?
You must hit the very same problem even after reverting this when the machine goes to suspend while playing a stream. So the revert is no proper fix at all.
thanks,
Takashi
Takashi Iwai tiwai@suse.de 於 2019年5月24日 週五 下午1:43寫道:
On Fri, 24 May 2019 07:10:17 +0200, Jian-Hong Pan wrote:
We have an ASUS E406MA laptop equipped with Intel N5000 CPU. After system suspend & resume, the audio playback does not work anymore. The device for sound output is listed as a headphone device. Plugging in headphones no sound is audible neither.
Here are the error messages after resume:
[ 184.525681] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x20bf8100 [ 185.528682] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x20bf8100 [ 186.532683] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20bf8100 [ 186.736838] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.738742] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.767080] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f0d00. -5
After bisect, we found reverting the commit b5a236c175b0 "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec" can solve this issue on Linux stable 5.0.x series.
This reverts commit a57af6d07512716b78f1a32d9426bcdf6aafc50c.
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203623 Fixes: a57af6d07512 ("ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec") Cc: stable@vger.kernel.org # 5.0.x Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com
I thought this revert isn't needed if the i915 GLK fix is applied?
If the i915 GLK fix is applied, then this revert is not needed.
I have also sent the "i915 GLK" to stable mail list for Linux stable 5.1.x. But I am still wondering for 5.0.x, due to the commit dependency. Any idea for Linux stable 5.0.x will be appreciated.
Jain-Hong Pan
You must hit the very same problem even after reverting this when the machine goes to suspend while playing a stream. So the revert is no proper fix at all.
thanks,
Takashi
On Fri, 24 May 2019 11:40:03 +0200, Jian-Hong Pan wrote:
Takashi Iwai tiwai@suse.de 於 2019年5月24日 週五 下午1:43寫道:
On Fri, 24 May 2019 07:10:17 +0200, Jian-Hong Pan wrote:
We have an ASUS E406MA laptop equipped with Intel N5000 CPU. After system suspend & resume, the audio playback does not work anymore. The device for sound output is listed as a headphone device. Plugging in headphones no sound is audible neither.
Here are the error messages after resume:
[ 184.525681] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x20bf8100 [ 185.528682] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x20bf8100 [ 186.532683] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20bf8100 [ 186.736838] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.738742] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.767080] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f0d00. -5
After bisect, we found reverting the commit b5a236c175b0 "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec" can solve this issue on Linux stable 5.0.x series.
This reverts commit a57af6d07512716b78f1a32d9426bcdf6aafc50c.
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203623 Fixes: a57af6d07512 ("ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec") Cc: stable@vger.kernel.org # 5.0.x Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com
I thought this revert isn't needed if the i915 GLK fix is applied?
If the i915 GLK fix is applied, then this revert is not needed.
I have also sent the "i915 GLK" to stable mail list for Linux stable 5.1.x. But I am still wondering for 5.0.x, due to the commit dependency. Any idea for Linux stable 5.0.x will be appreciated.
It'd need a slight modification of the commit, but it should be fairly easy.
thanks,
Takashi
Jain-Hong Pan
You must hit the very same problem even after reverting this when the machine goes to suspend while playing a stream. So the revert is no proper fix at all.
thanks,
Takashi
On Fri, May 24, 2019 at 05:40:03PM +0800, Jian-Hong Pan wrote:
Takashi Iwai tiwai@suse.de 於 2019年5月24日 週五 下午1:43寫道:
On Fri, 24 May 2019 07:10:17 +0200, Jian-Hong Pan wrote:
We have an ASUS E406MA laptop equipped with Intel N5000 CPU. After system suspend & resume, the audio playback does not work anymore. The device for sound output is listed as a headphone device. Plugging in headphones no sound is audible neither.
Here are the error messages after resume:
[ 184.525681] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to polling mode: last cmd=0x20bf8100 [ 185.528682] snd_hda_intel 0000:00:0e.0: No response from codec, disabling MSI: last cmd=0x20bf8100 [ 186.532683] snd_hda_intel 0000:00:0e.0: azx_get_response timeout, switching to single_cmd mode: last cmd=0x20bf8100 [ 186.736838] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.738742] snd_hda_codec_realtek hdaudioC0D0: Unable to sync register 0x2b8000. -5 [ 186.767080] snd_hda_codec_hdmi hdaudioC0D2: Unable to sync register 0x2f0d00. -5
After bisect, we found reverting the commit b5a236c175b0 "ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec" can solve this issue on Linux stable 5.0.x series.
This reverts commit a57af6d07512716b78f1a32d9426bcdf6aafc50c.
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203623 Fixes: a57af6d07512 ("ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec") Cc: stable@vger.kernel.org # 5.0.x Signed-off-by: Jian-Hong Pan jian-hong@endlessm.com
I thought this revert isn't needed if the i915 GLK fix is applied?
If the i915 GLK fix is applied, then this revert is not needed.
I have also sent the "i915 GLK" to stable mail list for Linux stable 5.1.x. But I am still wondering for 5.0.x, due to the commit dependency. Any idea for Linux stable 5.0.x will be appreciated.
5.0.x will be end-of-life by the end of next week, don't worry about it too much :)
thanks,
greg k-h
linux-stable-mirror@lists.linaro.org