diff options
author | Rander Wang <rander.wang@intel.com> | 2023-02-02 15:29:47 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-03 12:03:48 +0000 |
commit | 4700bfb2bb3acae63ff4cbf82fbde35a325ebdf2 (patch) | |
tree | 8ed6b18b6d7a5fa11df7be92e0c34acebf67283c /sound/soc/sof/ipc4.c | |
parent | 2740dcce918f385aea0fb0a026cc0b91629479af (diff) | |
download | lwn-4700bfb2bb3acae63ff4cbf82fbde35a325ebdf2.tar.gz lwn-4700bfb2bb3acae63ff4cbf82fbde35a325ebdf2.zip |
ASoC: SOF: add fw_info_box support
FW can share some information with host driver, .e.g fw status, pipeline
status and volume status. On ipc4 platform it is located in memory
windows 0 with size of struct sof_ipc4_fw_reg.
With this patch, ipc4 driver can find fw information in fw_info_box
Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230202132954.26773-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc4.c')
-rw-r--r-- | sound/soc/sof/ipc4.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc4.c b/sound/soc/sof/ipc4.c index 35c9f3913d9a..f3c0c839d177 100644 --- a/sound/soc/sof/ipc4.c +++ b/sound/soc/sof/ipc4.c @@ -13,6 +13,7 @@ #include <sound/sof/ipc4/header.h> #include "sof-priv.h" #include "sof-audio.h" +#include "ipc4-fw-reg.h" #include "ipc4-priv.h" #include "ops.h" @@ -542,6 +543,8 @@ static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg outbox_offset = snd_sof_dsp_get_window_offset(sdev, SOF_IPC4_OUTBOX_WINDOW_IDX); outbox_size = SOF_IPC4_MSG_MAX_SIZE; + sdev->fw_info_box.offset = snd_sof_dsp_get_window_offset(sdev, SOF_IPC4_INBOX_WINDOW_IDX); + sdev->fw_info_box.size = sizeof(struct sof_ipc4_fw_registers); sdev->dsp_box.offset = inbox_offset; sdev->dsp_box.size = inbox_size; sdev->host_box.offset = outbox_offset; |