diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2022-03-14 13:05:06 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-03-16 16:38:58 +0000 |
commit | 7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6 (patch) | |
tree | f4b7226d44ea36ce42b4fc1ace871e38ee852a12 /sound/soc/sof/ipc.c | |
parent | d87524bf9aab511906e7e9bab90198510c28149f (diff) | |
download | lwn-7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6.tar.gz lwn-7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6.zip |
ASoC: SOF: Introduce IPC3 ops
Add the IPC ops including the topology-related IPC ops for the current
version (IPC3, named after the current SOF firmware ABI major version 3.0)
of IPC supported by the SOF firmware and set it as default. The topology
IPC ops and the widget ops within the topology IPC ops are both
mandatory.
With the introduction of IPC3 ops, we define the list of tokens pertaining
to the AIF_IN/AIF_OUT widgets. Then these tokens are parsed during
topology parsing and saved as part of the swidget tuples array. Once
topology parsing is complete, these tokens will be applied to create the
IPC structure for the host component based on the topology widget_setup
op in ipc3_tplg_ops.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220314200520.1233427-6-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ipc.c')
-rw-r--r-- | sound/soc/sof/ipc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 34084e0008f1..cf892859355a 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -1023,6 +1023,18 @@ struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev) init_waitqueue_head(&msg->waitq); + /* + * Use IPC3 ops as it is the only available version now. With the addition of new IPC + * versions, this will need to be modified to use the selected version at runtime. + */ + ipc->ops = &ipc3_ops; + + /* check for mandatory ops */ + if (!ipc->ops->tplg || !ipc->ops->tplg->widget) { + dev_err(sdev->dev, "Invalid topology IPC ops\n"); + return NULL; + } + return ipc; } EXPORT_SYMBOL(snd_sof_ipc_init); |