aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/sof/sof-client-probes.c
diff options
context:
space:
mode:
authorJyri Sarha <jyri.sarha@intel.com>2022-10-31 12:51:41 +0200
committerMark Brown <broonie@kernel.org>2022-10-31 13:20:22 +0000
commitf5623593060fc2f4d84781edcc5d15e44acfcbf6 (patch)
tree8267fd83622fe6710394a5764d4cb5fbd64db6da /sound/soc/sof/sof-client-probes.c
parentASoC: SOF: client: Add sof_client_ipc4_find_module() function (diff)
downloadwireguard-linux-f5623593060fc2f4d84781edcc5d15e44acfcbf6.tar.xz
wireguard-linux-f5623593060fc2f4d84781edcc5d15e44acfcbf6.zip
ASoC: SOF: IPC4: probes: Implement IPC4 ops for probes client device
Implement IPC operations for IPC4 messaging and add doxygen documentation for the functions. Signed-off-by: Jyri Sarha <jyri.sarha@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221031105141.19037-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-client-probes.c')
-rw-r--r--sound/soc/sof/sof-client-probes.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/sound/soc/sof/sof-client-probes.c b/sound/soc/sof/sof-client-probes.c
index af655366b758..d08395182b1a 100644
--- a/sound/soc/sof/sof-client-probes.c
+++ b/sound/soc/sof/sof-client-probes.c
@@ -30,16 +30,6 @@ static bool __read_mostly sof_probes_enabled;
module_param_named(enable, sof_probes_enabled, bool, 0444);
MODULE_PARM_DESC(enable, "Enable SOF probes support");
-struct sof_probes_priv {
- struct dentry *dfs_points;
- struct dentry *dfs_points_remove;
- u32 extractor_stream_tag;
- struct snd_soc_card card;
-
- const struct sof_probes_host_ops *host_ops;
- const struct sof_probes_ipc_ops *ipc_ops;
-};
-
static int sof_probes_compr_startup(struct snd_compr_stream *cstream,
struct snd_soc_dai *dai)
{
@@ -409,10 +399,6 @@ static int sof_probes_client_probe(struct auxiliary_device *auxdev,
if (!sof_probes_enabled)
return -ENXIO;
- /* only ipc3 is supported */
- if (sof_client_get_ipc_type(cdev) != SOF_IPC)
- return -ENXIO;
-
if (!dev->platform_data) {
dev_err(dev, "missing platform data\n");
return -ENODEV;
@@ -431,7 +417,23 @@ static int sof_probes_client_probe(struct auxiliary_device *auxdev,
}
priv->host_ops = ops;
- priv->ipc_ops = &ipc3_probe_ops;
+
+ switch (sof_client_get_ipc_type(cdev)) {
+#ifdef CONFIG_SND_SOC_SOF_INTEL_IPC4
+ case SOF_INTEL_IPC4:
+ priv->ipc_ops = &ipc4_probe_ops;
+ break;
+#endif
+#ifdef CONFIG_SND_SOC_SOF_IPC3
+ case SOF_IPC:
+ priv->ipc_ops = &ipc3_probe_ops;
+ break;
+#endif
+ default:
+ dev_err(dev, "Matching IPC ops not found.");
+ return -ENODEV;
+ }
+
cdev->data = priv;
/* register probes component driver and dai */