Unverified Commit f6c246ea authored by Bard Liao's avatar Bard Liao Committed by Mark Brown
Browse files

ASoC: SOF: Intel: hda: use snd_sof_dsp_core_power_up/down API



To implement common logic in SOF core, core power up/down flows should
use common SOF API and not directly use low-level platform specific
helper functions.

Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210128093850.1041387-2-kai.vehmanen@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e32df142
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -624,7 +624,7 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
#endif

	/* power down DSP */
	ret = hda_dsp_core_reset_power_down(sdev, chip->host_managed_cores_mask);
	ret = snd_sof_dsp_core_power_down(sdev, chip->host_managed_cores_mask);
	if (ret < 0) {
		dev_err(sdev->dev,
			"error: failed to power down core during suspend\n");
+1 −1
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ static int cl_dsp_init(struct snd_sof_dev *sdev, int stream_tag)
		flags |= SOF_DBG_DUMP_FORCE_ERR_LEVEL;

	hda_dsp_dump(sdev, flags);
	hda_dsp_core_reset_power_down(sdev, chip->host_managed_cores_mask);
	snd_sof_dsp_core_power_down(sdev, chip->host_managed_cores_mask);

	return ret;
}
+1 −1
Original line number Diff line number Diff line
@@ -928,7 +928,7 @@ int hda_dsp_remove(struct snd_sof_dev *sdev)

	/* disable cores */
	if (chip)
		hda_dsp_core_reset_power_down(sdev, chip->host_managed_cores_mask);
		snd_sof_dsp_core_power_down(sdev, chip->host_managed_cores_mask);

	/* disable DSP */
	snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,