summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-priv.h
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-03-10 07:27:12 +0300
committerMark Brown <broonie@kernel.org>2022-03-11 16:41:01 +0300
commit31f60a0c943d6a7e84b06686b1ed86ddadf484fa (patch)
tree025aba74c848fb54223cbbe07a6c93790d267047 /sound/soc/sof/sof-priv.h
parentd7bc6ddef016d851cb0ff97ae16ac98d5f3c85ee (diff)
downloadlinux-31f60a0c943d6a7e84b06686b1ed86ddadf484fa.tar.xz
ASoC: SOF: Make pcm_hw_params snd_sof_dsp_ops callback IPC neutral
Do not send IPC structure directly via pcm_hw_params to make it IPC agnostic. A new struct is created to retrieve the needed platform parameters and if there is a need it can be extended with new options. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220310042720.976809-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r--sound/soc/sof/sof-priv.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 4ca18331e157..f87c454c789e 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -105,6 +105,21 @@ struct snd_soc_tplg_ops;
struct snd_soc_component;
struct snd_sof_pdata;
+/**
+ * struct snd_sof_platform_stream_params - platform dependent stream parameters
+ * @stream_tag: Stream tag to use
+ * @use_phy_addr: Use the provided @phy_addr for configuration
+ * @phy_addr: Platform dependent address to be used, if @use_phy_addr
+ * is true
+ * @no_ipc_position: Disable position update IPC from firmware
+ */
+struct snd_sof_platform_stream_params {
+ u16 stream_tag;
+ bool use_phy_address;
+ u32 phy_addr;
+ bool no_ipc_position;
+};
+
/*
* SOF DSP HW abstraction operations.
* Used to abstract DSP HW architecture and any IO busses between host CPU
@@ -183,7 +198,7 @@ struct snd_sof_dsp_ops {
int (*pcm_hw_params)(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
- struct sof_ipc_stream_params *ipc_params); /* optional */
+ struct snd_sof_platform_stream_params *platform_params); /* optional */
/* host stream hw_free */
int (*pcm_hw_free)(struct snd_sof_dev *sdev,