summaryrefslogtreecommitdiff
path: root/sound/soc/sof/sof-priv.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-03-18 20:11:08 +0000
committerMark Brown <broonie@kernel.org>2022-03-18 20:11:08 +0000
commit49a24e9d9c740d3bd8b1200f225f67d45e3d68a5 (patch)
treed4c06e308b53335ac39f516bba4628b85c412309 /sound/soc/sof/sof-priv.h
parentc639e85e93aa10ea0512ee416eead60da466e161 (diff)
parent85f7a8b6e1bea0ad494fb786a5dd7d9715a976d2 (diff)
downloadlinux-next-49a24e9d9c740d3bd8b1200f225f67d45e3d68a5.tar.gz
Make the SOF control, PCM and PM code IPC agnostic
Merge series from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>: This series is a continuation to the SOF IPC abstraction work to support the new IPC version introduced in the SOF firmware. It makes the top-level control IO, PCM and PM code IPC-agnostic. Other than the first patch, the rest are purely for abstraction and include no changes in functionality.
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r--sound/soc/sof/sof-priv.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 0b89c3e6ef21..0d9b640ae24c 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -360,18 +360,31 @@ struct snd_sof_ipc_msg {
bool ipc_complete;
};
+/**
+ * struct sof_ipc_pm_ops - IPC-specific PM ops
+ * @ctx_save: Function pointer for context save
+ * @ctx_restore: Function pointer for context restore
+ */
+struct sof_ipc_pm_ops {
+ int (*ctx_save)(struct snd_sof_dev *sdev);
+ int (*ctx_restore)(struct snd_sof_dev *sdev);
+};
+
struct sof_ipc_tplg_ops;
+struct sof_ipc_pcm_ops;
/**
* struct sof_ipc_ops - IPC-specific ops
* @tplg: Pointer to IPC-specific topology ops
+ * @pm: Pointer to PM ops
+ * @pcm: Pointer to PCM ops
*/
struct sof_ipc_ops {
const struct sof_ipc_tplg_ops *tplg;
+ const struct sof_ipc_pm_ops *pm;
+ const struct sof_ipc_pcm_ops *pcm;
};
-extern const struct sof_ipc_ops ipc3_ops;
-
/* SOF generic IPC data */
struct snd_sof_ipc {
struct snd_sof_dev *sdev;