Skip to content

Commit e17422c

Browse files
dbalutabroonie
authored andcommitted
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>
1 parent bb9c93f commit e17422c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎sound/soc/sof/ops.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
128128
return -ENOTSUPP;
129129
}
130130

131+
static inline int snd_sof_dsp_get_window_offset(struct snd_sof_dev *sdev,
132+
u32 id)
133+
{
134+
if (sof_ops(sdev)->get_window_offset)
135+
return sof_ops(sdev)->get_window_offset(sdev, id);
136+
137+
dev_err(sdev->dev, "error: %s not defined\n", __func__);
138+
return -ENOTSUPP;
139+
}
131140
/* power management */
132141
static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
133142
{

‎sound/soc/sof/sof-priv.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ struct snd_sof_dsp_ops {
199199
int (*get_bar_index)(struct snd_sof_dev *sdev,
200200
u32 type); /* optional */
201201
int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
202+
int (*get_window_offset)(struct snd_sof_dev *sdev,
203+
u32 id);/* mandatory for common loader code */
202204

203205
/* DAI ops */
204206
struct snd_soc_dai_driver *drv;

0 commit comments

Comments
 (0)