Commit a669ec5f authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

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: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220506132647.18690-2-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 17770e66
...@@ -319,6 +319,14 @@ const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev ...@@ -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); 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 */ /* module refcount management of SOF core */
int sof_client_core_module_get(struct sof_client_dev *cdev) int sof_client_core_module_get(struct sof_client_dev *cdev)
{ {
......
...@@ -41,6 +41,7 @@ int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg, ...@@ -41,6 +41,7 @@ int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg,
struct dentry *sof_client_get_debugfs_root(struct sof_client_dev *cdev); struct dentry *sof_client_get_debugfs_root(struct sof_client_dev *cdev);
struct device *sof_client_get_dma_dev(struct sof_client_dev *cdev); struct device *sof_client_get_dma_dev(struct sof_client_dev *cdev);
const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev *cdev); const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev *cdev);
size_t sof_client_get_ipc_max_payload_size(struct sof_client_dev *cdev);
/* module refcount management of SOF core */ /* module refcount management of SOF core */
int sof_client_core_module_get(struct sof_client_dev *cdev); int sof_client_core_module_get(struct sof_client_dev *cdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment