summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/sof-priv.h
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2019-08-07 10:02:01 -0500
committerMark Brown <broonie@kernel.org>2019-08-09 13:26:20 +0100
commit83ee7ab1627b7597bbb9acc26b37e9f96fff40c9 (patch)
treee59fc8ffa0bdef3cd195dbe335993f60242aebca /sound/soc/sof/sof-priv.h
parente17422cda9d60339d71e117d3fdfd444e83669a4 (diff)
downloadlinux-83ee7ab1627b7597bbb9acc26b37e9f96fff40c9.tar.bz2
ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation
There is a lot of duplicate code when processing IPC firmware ready notification and creating memory windows. First step in reducing the code duplication is to introduce generic functions: * sof_get_windows * sof_fw_ready that will replace, in the first step, the specific implementation related to baytrail related platforms: * byt_get_windows * byt_fw_ready So we are basically moving code from intel/byt.c to loader.c keeping in mind that mbox_offset is a per platform constant so we need to use newly introduced snd_sof_dsp_get_mailbox_offset / snd_sof_dsp_get_window_offset in order to get the correct mbox offset / window offset value. Also, bar is a per platform constant so we use snd_sof_dsp_get_bar_index instead of the hardcoded BYT_DSP_BAR. 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-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-priv.h')
-rw-r--r--sound/soc/sof/sof-priv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index de11f28bae3a..730f3259dd02 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -642,6 +642,8 @@ void sof_block_write(struct snd_sof_dev *sdev, u32 bar, u32 offset, void *src,
void sof_block_read(struct snd_sof_dev *sdev, u32 bar, u32 offset, void *dest,
size_t size);
+int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id);
+
void intel_ipc_msg_data(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream,
void *p, size_t sz);