aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2019-08-07 10:01:59 -0500
committerMark Brown <broonie@kernel.org>2019-08-09 13:25:43 +0100
commitbb9c93f58cb66049cb5a5570cc476d9a8a97f491 (patch)
treefe2ac2fa2ee6c55f2f471c1d9e9905b2501dfe2a /sound/soc/sof
parentASoC: SOF: Intel: hda: Use generic function for fw ready / mem windows creation (diff)
downloadlinux-dev-bb9c93f58cb66049cb5a5570cc476d9a8a97f491.tar.xz
linux-dev-bb9c93f58cb66049cb5a5570cc476d9a8a97f491.zip
ASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset
This will allow us to export mailbox offset in order to read the fw_ready message from. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190807150203.26359-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/ops.h9
-rw-r--r--sound/soc/sof/sof-priv.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h
index 793c1aea0c53..c820606f19a1 100644
--- a/sound/soc/sof/ops.h
+++ b/sound/soc/sof/ops.h
@@ -119,6 +119,15 @@ static inline int snd_sof_dsp_get_bar_index(struct snd_sof_dev *sdev, u32 type)
return sdev->mmio_bar;
}
+static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
+{
+ if (sof_ops(sdev)->get_mailbox_offset)
+ return sof_ops(sdev)->get_mailbox_offset(sdev);
+
+ dev_err(sdev->dev, "error: %s not defined\n", __func__);
+ return -ENOTSUPP;
+}
+
/* power management */
static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
{
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 1cec3f23f9cd..3aefb8ec3ef9 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -198,6 +198,8 @@ struct snd_sof_dsp_ops {
/* misc */
int (*get_bar_index)(struct snd_sof_dev *sdev,
u32 type); /* optional */
+ int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
+
/* DAI ops */
struct snd_soc_dai_driver *drv;
int num_drv;