Commit 58a972ef authored by Keyon Jie's avatar Keyon Jie Committed by Mark Brown

ASoC: SOF: PM: add check before setting d0_substate

Add check before seeting d0_substate and return success if Audio DSP is
already in the target substate.
Signed-off-by: default avatarKeyon Jie <yang.jie@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191111223343.19986-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 74b4dd04
......@@ -416,6 +416,9 @@ int snd_sof_set_d0_substate(struct snd_sof_dev *sdev,
{
int ret;
if (sdev->d0_substate == d0_substate)
return 0;
/* do platform specific set_state */
ret = snd_sof_dsp_set_power_state(sdev, d0_substate);
if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment