From: Peter Ujfalusi Date: Fri, 9 Sep 2022 11:43:28 +0000 (+0300) Subject: ASoC: SOF: ipc4: Add define for the outbox window index X-Git-Tag: v6.1-rc1~158^2^2~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b59f1532e0b17f22965e327f86d04292f496ccaf;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20220909114332.31393-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/ipc4-priv.h b/sound/soc/sof/ipc4-priv.h index 9492fe1796c2f..f3dbcc2e63315 100644 --- a/sound/soc/sof/ipc4-priv.h +++ b/sound/soc/sof/ipc4-priv.h @@ -13,6 +13,9 @@ #include #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 1c51938ce43b5..58aa054663bfc 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;