diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2019-12-04 22:15:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-12-09 19:38:20 +0100 |
commit | 8c583f526ee9df5c6693f54ac272b7e103b5f1d2 (patch) | |
tree | ce11b3b77daecdbdba36e6d5c6dd0023a3843e79 /sound/soc/sof/core.c | |
parent | ASoC: SOF: core: modify the signature for snd_sof_create_page_table (diff) | |
download | linux-8c583f526ee9df5c6693f54ac272b7e103b5f1d2.tar.xz linux-8c583f526ee9df5c6693f54ac272b7e103b5f1d2.zip |
ASoC: SOF: core: move check for runtime callbacks to core
For some platforms, the refcount is explicitly incremented
to prevent it from entering runtime suspend. This
should be be done during probe in the core instead
of being done in the PCM driver.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191204211556.12671-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/core.c')
-rw-r--r-- | sound/soc/sof/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 6a7f342203e9..d8446fb9fdde 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -355,6 +355,14 @@ static int sof_probe_continue(struct snd_sof_dev *sdev) dev_dbg(sdev->dev, "created machine %s\n", dev_name(&plat_data->pdev_mach->dev)); + /* + * Some platforms in SOF, ex: BYT, may not have their platform PM + * callbacks set. Increment the usage count so as to + * prevent the device from entering runtime suspend. + */ + if (!sof_ops(sdev)->runtime_suspend || !sof_ops(sdev)->runtime_resume) + pm_runtime_get_noresume(sdev->dev); + if (plat_data->sof_probe_complete) plat_data->sof_probe_complete(sdev->dev); |