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>
(backported from commit fd572393baf0350835e8d822db588f679dc7bcb8 linux-next)
Signed-off-by: Hui Wang <email address hidden>
Signed-off-by: Timo Aaltonen <email address hidden>
The NVMe host memory buffer may consume a non-negligable amount of
memory. Controllers are required to function without the host memory
buffer enabled, but with possibly degraded performance. Export a sysfs
property to toggle this feature on a per-device granularity so users may
choose to reclaim memory at the expense of storage performance.
Signed-off-by: Keith Busch <email address hidden>
Reviewed-by: Sagi Grimberg <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit a5df5e79c43c84d9fb88f56b707c5ff52b27ccca)
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Timo Aaltonen <email address hidden>
An idle suspend may or may not disable host memory access from devices
placed in low power mode. Either way, it should always be safe to
disable the host memory buffer prior to entering the low power mode, and
this should also always be faster than a full device shutdown.
Signed-off-by: Keith Busch <email address hidden>
Reviewed-by: Sagi Grimberg <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit e5ad96f388b765fe6b52f64f37e910c0ba4f3de7)
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Timo Aaltonen <email address hidden>
An attribute should only be exporting one value as recommended in
Documentation/filesystems/sysfs.rst. Implement CMB attributes this way.
The old attribute will remain for backward compatibility.
Signed-off-by: Keith Busch <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 1751e97aa940656b5de0e620f02cf193a275e014)
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Timo Aaltonen <email address hidden>
Appending sysfs files to the controller kobject is a bit clunky and
becomes a maintenance problem as more attributes are added. The
attribute group infrastructure handles this better, so use that.
Signed-off-by: Keith Busch <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 0521905e859fd1a07949cb18efb20cdd4aab3b20)
Signed-off-by: Kai-Heng Feng <email address hidden>
Signed-off-by: Timo Aaltonen <email address hidden>