summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/ops.h
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2019-08-07 17:02:00 +0200
committerMark Brown <broonie@kernel.org>2019-08-09 14:26:02 +0200
commite17422cda9d60339d71e117d3fdfd444e83669a4 (patch)
tree5dc332f74d3e6d50473df29641d43244ac822e46 /sound/soc/sof/ops.h
parentASoC: SOF: Introduce snd_sof_dsp_get_mailbox_offset (diff)
downloadlinux-e17422cda9d60339d71e117d3fdfd444e83669a4.tar.xz
linux-e17422cda9d60339d71e117d3fdfd444e83669a4.zip
ASoC: SOF: Introduce snd_sof_dsp_get_window_offset
This will allow us to export the offset for a memory window. 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-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ops.h')
-rw-r--r--sound/soc/sof/ops.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h
index c820606f19a1..824d36fe59fd 100644
--- a/sound/soc/sof/ops.h
+++ b/sound/soc/sof/ops.h
@@ -128,6 +128,15 @@ static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
return -ENOTSUPP;
}
+static inline int snd_sof_dsp_get_window_offset(struct snd_sof_dev *sdev,
+ u32 id)
+{
+ if (sof_ops(sdev)->get_window_offset)
+ return sof_ops(sdev)->get_window_offset(sdev, id);
+
+ 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)
{