If codec is in runtime suspend, but controller is not, hotplug events
are missed as the codec has no way to alert the controller. Problem does
not occur if both controller and codec are active, or when both are
suspended.
An easy way to reproduce is to play an audio stream on one codec (e.g.
to HDMI/DP display codec), wait for other HDA codec to go to runtime
suspend, and then plug in a headset to the suspended codec. The jack
event is not reported correctly in this case. Another way to reproduce
is to force controller to stay active with
"snd_sof_pci.sof_pci_debug=0x1"
Fix the issue by reconfiguring the WAKEEN register when powering up/down
individual links, and handling control events in the interrupt handler.
Fixes: 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management")
Reported-by: Hui Wang <email address hidden>
Signed-off-by: Kai Vehmanen <email address hidden>
Reviewed-by: Pierre-Louis Bossart <email address hidden>
Reviewed-by: Ranjani Sridharan <email address hidden>
Reviewed-by: Péter Ujfalusi <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Mark Brown <email address hidden>
Signed-off-by: Sasha Levin <email address hidden>
Signed-off-by: Andrea Righi <email address hidden>
commit 517b391e25d489c 20b5a78f4daac0d bb8bcaea99
Author: Kai Vehmanen <email address hidden>
AuthorDate: Fri Nov 5 13:16:55 2021 +0200
Commit: Andrea Righi <email address hidden>
CommitDate: Tue Jan 4 09:48:59 2022 +0100
ASoC: SOF: Intel: hda: fix hotplug when only codec is suspended
BugLink: https:/ /bugs.launchpad .net/bugs/ 1953370
[ Upstream commit fd572393baf0350 835e8d822db588f 679dc7bcb8 ]
If codec is in runtime suspend, but controller is not, hotplug events
are missed as the codec has no way to alert the controller. Problem does
not occur if both controller and codec are active, or when both are
suspended.
An easy way to reproduce is to play an audio stream on one codec (e.g. sof_pci. sof_pci_ debug=0x1"
to HDMI/DP display codec), wait for other HDA codec to go to runtime
suspend, and then plug in a headset to the suspended codec. The jack
event is not reported correctly in this case. Another way to reproduce
is to force controller to stay active with
"snd_
Fix the issue by reconfiguring the WAKEEN register when powering up/down
individual links, and handling control events in the interrupt handler.
Fixes: 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management")
Reported-by: Hui Wang <email address hidden>
Signed-off-by: Kai Vehmanen <email address hidden>
Reviewed-by: Pierre-Louis Bossart <email address hidden>
Reviewed-by: Ranjani Sridharan <email address hidden>
Reviewed-by: Péter Ujfalusi <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Mark Brown <email address hidden>
Signed-off-by: Sasha Levin <email address hidden>
Signed-off-by: Andrea Righi <email address hidden>