aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ujfalusi <[email protected]>2022-09-09 14:43:28 +0300
committerMark Brown <[email protected]>2022-09-09 18:48:46 +0100
commitb59f1532e0b17f22965e327f86d04292f496ccaf (patch)
treee7e395b74a3d30655b922316077c21132b0791d1
parente9bcfea156b4d8563109c17c033fa496f0ec4995 (diff)
ASoC: SOF: ipc4: Add define for the outbox window index
Instead of using the index number directly, add a define for the outbox window index. It is always window 1 with IPC4. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/ipc4-priv.h3
-rw-r--r--sound/soc/sof/ipc4.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h
index 9492fe1796c2..f3dbcc2e6331 100644
--- a/sound/soc/sof/ipc4-priv.h
+++ b/sound/soc/sof/ipc4-priv.h
@@ -13,6 +13,9 @@
#include <sound/sof/ext_manifest4.h>
#include "sof-priv.h"
+/* The DSP window indices are fixed */
+#define SOF_IPC4_OUTBOX_WINDOW_IDX 1
+
/**
* struct sof_ipc4_fw_data - IPC4-specific data
* @manifest_fw_hdr_offset: FW header offset in the manifest
diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c
index 1c51938ce43b..58aa054663bf 100644
--- a/sound/soc/sof/ipc4.c
+++ b/sound/soc/sof/ipc4.c
@@ -537,7 +537,7 @@ static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg
return inbox_offset;
}
inbox_size = SOF_IPC4_MSG_MAX_SIZE;
- outbox_offset = snd_sof_dsp_get_window_offset(sdev, 1);
+ outbox_offset = snd_sof_dsp_get_window_offset(sdev, SOF_IPC4_OUTBOX_WINDOW_IDX);
outbox_size = SOF_IPC4_MSG_MAX_SIZE;
sdev->dsp_box.offset = inbox_offset;