Skip to content

Commit 58a972e

Browse files
keyonjiebroonie
authored andcommitted
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 <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191111223343.19986-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 74b4dd0 commit 58a972e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎sound/soc/sof/pm.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ int snd_sof_set_d0_substate(struct snd_sof_dev *sdev,
416416
{
417417
int ret;
418418

419+
if (sdev->d0_substate == d0_substate)
420+
return 0;
421+
419422
/* do platform specific set_state */
420423
ret = snd_sof_dsp_set_power_state(sdev, d0_substate);
421424
if (ret < 0)

0 commit comments

Comments
 (0)