aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeyon Jie <[email protected]>2019-11-11 16:33:41 -0600
committerMark Brown <[email protected]>2019-11-12 12:10:21 +0000
commit58a972efd21bb5adadd97f2546693ec64bfc99b9 (patch)
tree656583f38b51c82f8bb0034cbf3182db86a30606
parent74b4dd04b19cc03e1cc369d9c371cf4206367df4 (diff)
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: Keyon Jie <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/pm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c
index 3204c92f0e7d..b89810bf3230 100644
--- a/sound/soc/sof/pm.c
+++ b/sound/soc/sof/pm.c
@@ -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)