diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-03-26 00:50:18 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-27 18:16:29 +0300 |
commit | 51dfed1e178a38202960b98f6e29df009a06050f (patch) | |
tree | ea35b0f210262f6c5bf9558f2ebe55d2e24403a7 /sound/soc/sof/intel/hda-loader.c | |
parent | 004bd4163104e4d8b6c1433b31ead10a69c69845 (diff) | |
download | linux-51dfed1e178a38202960b98f6e29df009a06050f.tar.xz |
ASoC: SOF: Intel: add SoundWire configuration interface
Now that the SoundWire core supports the multi-step initialization,
call the relevant APIs.
The actual hardware enablement can be done in two places, ideally we'd
want to startup the SoundWire IP as soon as possible (while still
taking power rail dependencies into account)
However when suspend/resume is implemented, the DSP device will be
resumed first, and only when the DSP firmware is downloaded/booted
would the SoundWire child devices be resumed, so there are only
marginal benefits in starting the IP earlier for the first probe.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200325215027.28716-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-loader.c')
-rw-r--r-- | sound/soc/sof/intel/hda-loader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c index 0633b76dab49..2ae94ea53122 100644 --- a/sound/soc/sof/intel/hda-loader.c +++ b/sound/soc/sof/intel/hda-loader.c @@ -399,6 +399,19 @@ int hda_dsp_pre_fw_run(struct snd_sof_dev *sdev) /* post fw run operations */ int hda_dsp_post_fw_run(struct snd_sof_dev *sdev) { + int ret; + + if (sdev->first_boot) { + ret = hda_sdw_startup(sdev); + if (ret < 0) { + dev_err(sdev->dev, + "error: could not startup SoundWire links\n"); + return ret; + } + } + + hda_sdw_int_enable(sdev, true); + /* re-enable clock gating and power gating */ return hda_dsp_ctrl_clock_power_gating(sdev, true); } |