ASoC: SOF: Intel: ipc4: Wait for channel to be free before sending a message
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 18 Oct 2022 12:40:07 +0000 (15:40 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 18 Oct 2022 18:16:44 +0000 (19:16 +0100)
commit483e4cdfb502e6bea6b0a226a3ff7c22e60153de
tree768a591980310a58fc820e3efe9680447816f9c1
parentc8ed7ce242db83ca2c4e9eab557a88adbae5ef6a
ASoC: SOF: Intel: ipc4: Wait for channel to be free before sending a message

Before attempting to send a message to the DSP we need to check if the
downstream BUSY flag has been cleared by the firmware to avoid lost IPC
messages by the firmware.

This is required by a firmware which only acks the received message after
it has sent a reply to the host.
With a bad luck, the host would send a message before the firmware gets to
the clearing the flag and thus losing a message.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221018124008.6846-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/cnl.c
sound/soc/sof/intel/hda-ipc.c
sound/soc/sof/intel/hda.c
sound/soc/sof/intel/hda.h
sound/soc/sof/intel/mtl.c