Unverified Commit 22aa9e02 authored by Libin Yang's avatar Libin Yang Committed by Mark Brown
Browse files

ASoC: SOF: Intel: TGL: set shutdown callback to hda_dsp_shutdown



According to hardware spec and PMC FW requirement, the DSP must be
in D3 state before entering S5. Define the shutdown function to use
snd_sof_suspend as shutdown callback to make sure DSP is in D3 state.

Fixes: 44a4cfad ("ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callback")
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarPan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: default avatarLibin Yang <libin.yang@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210322163728.16616-5-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3c429f86
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -892,6 +892,12 @@ int hda_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
	return snd_sof_dsp_set_power_state(sdev, &target_dsp_state);
}

int hda_dsp_shutdown(struct snd_sof_dev *sdev)
{
	sdev->system_suspend_target = SOF_SUSPEND_S3;
	return snd_sof_suspend(sdev->dev);
}

int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev)
{
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
+1 −0
Original line number Diff line number Diff line
@@ -517,6 +517,7 @@ int hda_dsp_resume(struct snd_sof_dev *sdev);
int hda_dsp_runtime_suspend(struct snd_sof_dev *sdev);
int hda_dsp_runtime_resume(struct snd_sof_dev *sdev);
int hda_dsp_runtime_idle(struct snd_sof_dev *sdev);
int hda_dsp_shutdown(struct snd_sof_dev *sdev);
int hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev);
void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags);
void hda_ipc_dump(struct snd_sof_dev *sdev);
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ const struct snd_sof_dsp_ops sof_tgl_ops = {
	/* probe/remove/shutdown */
	.probe		= hda_dsp_probe,
	.remove		= hda_dsp_remove,
	.shutdown	= hda_dsp_remove,
	.shutdown	= hda_dsp_shutdown,

	/* Register IO */
	.write		= sof_io_write,