未验证 提交 e17422cd 编写于 作者: D Daniel Baluta 提交者: Mark Brown

ASoC: SOF: Introduce snd_sof_dsp_get_window_offset

This will allow us to export the offset for a memory window.
Signed-off-by: NDaniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190807150203.26359-4-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 bb9c93f5
...@@ -128,6 +128,15 @@ static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev) ...@@ -128,6 +128,15 @@ static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
return -ENOTSUPP; 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 */ /* power management */
static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev) static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
{ {
......
...@@ -199,6 +199,8 @@ struct snd_sof_dsp_ops { ...@@ -199,6 +199,8 @@ struct snd_sof_dsp_ops {
int (*get_bar_index)(struct snd_sof_dev *sdev, int (*get_bar_index)(struct snd_sof_dev *sdev,
u32 type); /* optional */ u32 type); /* optional */
int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */ int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
int (*get_window_offset)(struct snd_sof_dev *sdev,
u32 id);/* mandatory for common loader code */
/* DAI ops */ /* DAI ops */
struct snd_soc_dai_driver *drv; struct snd_soc_dai_driver *drv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册