Skip to content

Commit bb9c93f

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

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
@@ -119,6 +119,15 @@ static inline int snd_sof_dsp_get_bar_index(struct snd_sof_dev *sdev, u32 type)
119119
return sdev->mmio_bar;
120120
}
121121

122+
static inline int snd_sof_dsp_get_mailbox_offset(struct snd_sof_dev *sdev)
123+
{
124+
if (sof_ops(sdev)->get_mailbox_offset)
125+
return sof_ops(sdev)->get_mailbox_offset(sdev);
126+
127+
dev_err(sdev->dev, "error: %s not defined\n", __func__);
128+
return -ENOTSUPP;
129+
}
130+
122131
/* power management */
123132
static inline int snd_sof_dsp_resume(struct snd_sof_dev *sdev)
124133
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ struct snd_sof_dsp_ops {
198198
/* misc */
199199
int (*get_bar_index)(struct snd_sof_dev *sdev,
200200
u32 type); /* optional */
201+
int (*get_mailbox_offset)(struct snd_sof_dev *sdev);/* mandatory for common loader code */
202+
201203
/* DAI ops */
202204
struct snd_soc_dai_driver *drv;
203205
int num_drv;

0 commit comments

Comments
 (0)