summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-dsp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-06-14 11:25:45 +0100
committerMark Brown <broonie@kernel.org>2022-06-14 11:25:45 +0100
commit14cc5849120051caf537f663ec620910503bb719 (patch)
treef786cd254d3a6dc104976b03e05b381d9fe5cc16 /sound/soc/sof/intel/hda-dsp.c
parent7ed1f83bb4f05fe460984ae49e98d1c1be38fb5f (diff)
parentda440af07fc3dd2b5a5138671eba51991dd1fac8 (diff)
ASoC: Merge fixes
Required for more changes for the ops.
Diffstat (limited to 'sound/soc/sof/intel/hda-dsp.c')
-rw-r--r--sound/soc/sof/intel/hda-dsp.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 3a70f441a8d5..263ad455e283 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -181,12 +181,20 @@ int hda_dsp_core_run(struct snd_sof_dev *sdev, unsigned int core_mask)
* Power Management.
*/
-static int hda_dsp_core_power_up(struct snd_sof_dev *sdev, unsigned int core_mask)
+int hda_dsp_core_power_up(struct snd_sof_dev *sdev, unsigned int core_mask)
{
+ struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
+ const struct sof_intel_dsp_desc *chip = hda->desc;
unsigned int cpa;
u32 adspcs;
int ret;
+ /* restrict core_mask to host managed cores mask */
+ core_mask &= chip->host_managed_cores_mask;
+ /* return if core_mask is not valid */
+ if (!core_mask)
+ return 0;
+
/* update bits */
snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPCS,
HDA_DSP_ADSPCS_SPA_MASK(core_mask),