summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/sof-client.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-05-06 16:26:40 +0300
committerMark Brown <broonie@kernel.org>2022-05-09 18:17:55 +0100
commita669ec5f4bc485a56b2f379e7c7197a810872cc1 (patch)
treee1003a552ccb8ad976d99e1eedf7ea681d43fba7 /sound/soc/sof/sof-client.c
parent17770e66a7cc51667ddcdf31a4ed55210f30dc1e (diff)
downloadlinux-stable-a669ec5f4bc485a56b2f379e7c7197a810872cc1.tar.gz
linux-stable-a669ec5f4bc485a56b2f379e7c7197a810872cc1.tar.bz2
linux-stable-a669ec5f4bc485a56b2f379e7c7197a810872cc1.zip
ASoC: SOF: sof-client: Add API to get the maximum IPC payload size
Provide a way for the client drivers to query the maximum payload size of an IPC message. Currently clients do not have access to this information and they can only use the SOF_IPC_MSG_MAX_SIZE defined value. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@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: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220506132647.18690-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-client.c')
-rw-r--r--sound/soc/sof/sof-client.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-client.c b/sound/soc/sof/sof-client.c
index 5fb3eb21bf7d..18839a8a03c3 100644
--- a/sound/soc/sof/sof-client.c
+++ b/sound/soc/sof/sof-client.c
@@ -319,6 +319,14 @@ const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev
}
EXPORT_SYMBOL_NS_GPL(sof_client_get_fw_version, SND_SOC_SOF_CLIENT);
+size_t sof_client_get_ipc_max_payload_size(struct sof_client_dev *cdev)
+{
+ struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev);
+
+ return sdev->ipc->max_payload_size;
+}
+EXPORT_SYMBOL_NS_GPL(sof_client_get_ipc_max_payload_size, SND_SOC_SOF_CLIENT);
+
/* module refcount management of SOF core */
int sof_client_core_module_get(struct sof_client_dev *cdev)
{