[PATCH 11/20] ASoC: SOF: ipc: Only allow sending of an IPC in SOF_FW_BOOT_COMPLETE state
Peter Ujfalusi
peter.ujfalusi at linux.intel.com
Thu Dec 23 12:36:19 CET 2021
If the state of the firmware is not BOOT_COMPLETE, it means that the
firmware is not functioning, thus it is not capable of handling IPC
messages.
Do not try to send IPC if the state is not BOOT_COMPLETE
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
---
sound/soc/sof/ipc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index bbd539071ac5..5bcf906d90af 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -302,7 +302,7 @@ static int sof_ipc_tx_message_unlocked(struct snd_sof_ipc *ipc, u32 header,
struct snd_sof_ipc_msg *msg;
int ret;
- if (ipc->disable_ipc_tx || sdev->fw_state == SOF_FW_CRASHED)
+ if (ipc->disable_ipc_tx || sdev->fw_state != SOF_FW_BOOT_COMPLETE)
return -ENODEV;
/*
--
2.34.1
More information about the Alsa-devel
mailing list