Skip to content

Commit

Permalink
ASoC: SOF: Introduce snd_sof_dsp_get_window_offset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Baluta authored and Mark Brown committed Aug 9, 2019
1 parent bb9c93f commit e17422c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sound/soc/sof/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/sof-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ struct snd_sof_dsp_ops {
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 */
int (*get_window_offset)(struct snd_sof_dev *sdev,
u32 id);/* mandatory for common loader code */

/* DAI ops */
struct snd_soc_dai_driver *drv;
Expand Down

0 comments on commit e17422c

Please sign in to comment.