linux-imx/sound/soc/sof
Laurentiu Mihalcea 014e2f7f99 LF-13863: ASoC: sof: imx95: request/release mbox channels during suspend/resume
The imx95 driver requests the necessary mailbox channels during imx-dsp's
probe operation. If WAKEUP domain is shut down during system suspend, MU7A
(used by Linux side) will end up losing its register state. This means that
GI's will end up being masked when the system is resumed (since GIER is set
to 0x0, which means all GI's are masked). As such, SOF will assert the GIP
bits required for triggering an interrupt on Linux side but no interrupt
will be triggered since GI's are masked, thus resulting on a crash on
Linux side as it will assume that the firmware did not boot.

This was reproduced using the following steps:
	1) Put Linux into suspend-to-RAM state by running:
		echo 'mem' > /sys/power/state
	2) Put SM into idle mode by running:
		idle
	3) Resume the system by running:
		wakeupsource

What seems to happen is that if all CPUs are either in STOP/SLEEP
state and SM is put into idle state it will attempt to system suspend,
during which WAKEUP domain is powered off, thus leading to the
aforementioned register state loss. If SM is not put into idle state,
then WAKEUP domain is not powered off, thus if step 2) is left out then
everything will work as expected.

To fix this, make sure the mailbox channels are requested during resume()
and released during suspend(). This way, by requesting the mailbox
channels during resume() we make sure to unmask the GI's used in firmware
communcation.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
2024-11-12 19:02:40 +08:00
..
amd ASoC: SOF: amd: Fix for acp init sequence 2024-09-04 13:28:23 +02:00
imx LF-13863: ASoC: sof: imx95: request/release mbox channels during suspend/resume 2024-11-12 19:02:40 +08:00
intel ASoC: SOF: Intel: hda-dsp: Make sure that no irq handler is pending before suspend 2024-08-29 17:33:28 +02:00
mediatek ASoC: SOF: Remove libraries from topology lookups 2024-08-14 13:58:51 +02:00
xtensa ASoC: SOF: dsp_arch_ops: add kernel log level parameter for oops and stack 2021-12-23 13:38:25 +00:00
compress.c LF-7679 ASoC: SOF: compress: Use sof_compr_stream for cstream private data 2023-10-30 15:21:58 +08:00
control.c ASoC: SOF: control: Extend the optionality of IPC ops to IPC as well 2022-12-25 23:32:33 +00:00
core.c ASoC: SOF: core: Ensure sof_ops_free() is still called when probe never ran. 2023-11-20 11:59:21 +01:00
debug.c ASoC: SOF: debug: conditionally bump runtime_pm counter on exceptions 2023-05-15 10:20:57 +09:00
iomem-utils.c ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
ipc.c ASoC: SOF: client: Add sof_client_ipc_set_get_data() 2022-10-31 13:20:20 +00:00
ipc3-control.c ASoC: sof: Improve sof_ipc3_bytes_ext_put function 2023-05-23 19:31:14 +01:00
ipc3-dtrace.c ASoC: SOF: ipc3-dtrace: Switch to memdup_user_nul() helper 2023-08-07 19:56:07 +01:00
ipc3-loader.c ASoC: SOF: Add some bounds checking to firmware data 2024-03-26 18:19:48 -04:00
ipc3-pcm.c This is the 6.6.34 stable release 2024-06-18 17:16:08 +08:00
ipc3-priv.h ASoC: SOF: Refactor rx function for fuzzing 2023-06-09 10:44:39 +01:00
ipc3-topology.c This is the 6.6.20 stable release 2024-03-11 14:59:44 +08:00
ipc3.c ASoC: SOF: IPC3: fix message bounds on ipc ops 2024-02-23 09:25:14 +01:00
ipc4-control.c ASoC: SOF: ipc4-topology: Correct data structures for the GAIN module 2024-01-20 11:51:40 +01:00
ipc4-fw-reg.h ASoC: SOF: add ipc4_fw_reg header file 2023-02-03 12:03:48 +00:00
ipc4-loader.c ASoC: SOF: ipc4-loader: remove the CPC check warnings 2024-01-25 15:35:58 -08:00
ipc4-mtrace.c ASoC: SOF: ipc4-mtrace: process pending logs upon FW crash 2023-03-07 13:58:20 +00:00
ipc4-pcm.c ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend 2024-03-26 18:19:11 -04:00
ipc4-priv.h ASoC: SOF: ipc4-loader/topology: Query the CPC value from manifest 2023-05-22 11:18:38 +01:00
ipc4-topology.c ASoC: SOF: ipc4-topology: Preserve the DMA Link ID for ChainDMA on unprepare 2024-08-03 08:54:24 +02:00
ipc4-topology.h ASoC: SOF: ipc4-topology: Correct data structures for the GAIN module 2024-01-20 11:51:40 +01:00
ipc4.c ASoC: SOF: ipc4: check return value of snd_sof_ipc_msg_data 2024-08-29 17:33:31 +02:00
Kconfig ASoC: SOF: Add IPC3 Kernel Injector 2023-06-09 10:44:40 +01:00
loader.c ASoC: SOF: loader: Remove log prefixes for snd_sof_run_firmware 2023-03-07 13:58:16 +00:00
Makefile ASoC: SOF: Add IPC3 Kernel Injector 2023-06-09 10:44:40 +01:00
nocodec.c ASoC: sof: use asoc_dummy_dlc 2023-05-08 08:47:07 +09:00
ops.c ASoC: SOF: Switch to IPC generic firmware tracing 2022-05-19 16:44:15 +01:00
ops.h Merge branch 'for-linus' into for-next 2023-02-16 15:06:18 +01:00
pcm.c This is the 6.6.34 stable release 2024-06-18 17:16:08 +08:00
pm.c ASoC: SOF: pm: Remove duplicated code in sof_suspend 2023-06-16 12:53:53 +01:00
sof-acpi-dev.c ASoC: SOF: add IPC-dependent file names 2022-04-19 12:03:34 +01:00
sof-acpi-dev.h
sof-audio.c This is the 6.6.51 stable release 2024-09-24 11:49:41 +08:00
sof-audio.h This is the 6.6.34 stable release 2024-06-18 17:16:08 +08:00
sof-client-ipc-flood-test.c ASoC: SOF: Use no_reply calls for TX 2023-04-20 12:51:45 +01:00
sof-client-ipc-kernel-injector.c ASoC: SOF: Add IPC3 Kernel Injector 2023-06-09 10:44:40 +01:00
sof-client-ipc-msg-injector.c ASoC: SOF: ipc-msg-injector: fix copy in sof_msg_inject_ipc4_dfs_write() 2022-07-14 13:26:37 +01:00
sof-client-probes-ipc3.c ASoC: SOF: Use no_reply calls for TX 2023-04-20 12:51:45 +01:00
sof-client-probes-ipc4.c ASoC: SOF: sof-client-probes-ipc4: add checks to prevent static analysis warnings 2023-07-31 23:22:12 +01:00
sof-client-probes.c ASoC: sof: merge DAI call back functions into ops 2023-08-14 13:10:09 +01:00
sof-client-probes.h ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device 2022-10-31 13:20:22 +00:00
sof-client.c ASoC: SOF: Add IPC3 Kernel Injector 2023-06-09 10:44:40 +01:00
sof-client.h ASoC: SOF: Add IPC3 Kernel Injector 2023-06-09 10:44:40 +01:00
sof-of-dev.c ASoC: SOF: Introduce machine driver name 2023-10-30 15:21:58 +08:00
sof-of-dev.h ASoC: SOF: Introduce function sof_of_machine_select 2022-08-23 18:22:29 +01:00
sof-pci-dev.c ASoC: SOF: Pass PCI SSID to machine driver 2023-11-28 17:19:42 +00:00
sof-pci-dev.h
sof-priv.h ASoC: SOF: Add new sof_debug flag to request message payload dump 2023-06-16 12:53:50 +01:00
sof-utils.c ASoC: SOF: remove unneeded dev_vdbg 2022-09-19 15:44:06 +01:00
sof-utils.h ASoC: SOF: Split up utils.c into sof-utils and iomem-utils 2022-02-10 15:19:04 +00:00
stream-ipc.c ASoC: SOF: Add support for compress API for stream data/offset 2023-01-17 13:37:53 +00:00
topology.c This is the 6.6.51 stable release 2024-09-24 11:49:41 +08:00
trace.c ASoC: SOF: trace: No need to check for op pointer in sof_fw_trace_free() 2022-12-25 23:32:39 +00:00