forked from Minki/linux
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: 44a4cfad8d
("ASoC: SOF: Intel: tgl: do thorough remove at .shutdown() callback")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Pierre-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: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3c429f861e
commit
22aa9e021a
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user