Commit 09fe6b52 authored by Keyon Jie's avatar Keyon Jie Committed by Mark Brown

ASoC: SOF: reset default d0_substate at probe() and resume()

We initialize/reset d0_substate to default d0i0 value when doing
transition D3-->D0, e.g. at success of probing and resuming.
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/20191025224122.7718-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4c19030c
...@@ -458,6 +458,9 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) ...@@ -458,6 +458,9 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)
/* initialize sof device */ /* initialize sof device */
sdev->dev = dev; sdev->dev = dev;
/* initialize default D0 sub-state */
sdev->d0_substate = SOF_DSP_D0I0;
sdev->pdata = plat_data; sdev->pdata = plat_data;
sdev->first_boot = true; sdev->first_boot = true;
dev_set_drvdata(dev, sdev); dev_set_drvdata(dev, sdev);
......
...@@ -326,6 +326,9 @@ static int sof_resume(struct device *dev, bool runtime_resume) ...@@ -326,6 +326,9 @@ static int sof_resume(struct device *dev, bool runtime_resume)
"error: ctx_restore ipc error during resume %d\n", "error: ctx_restore ipc error during resume %d\n",
ret); ret);
/* initialize default D0 sub-state */
sdev->d0_substate = SOF_DSP_D0I0;
return ret; return ret;
} }
......
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