diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2019-11-05 21:28:35 -0800 |
---|---|---|
committer | Daniel Baluta <daniel.baluta@nxp.com> | 2019-11-27 21:31:48 +0200 |
commit | 0d4340c2727e15a52b08897b537993bbe9d0f449 (patch) | |
tree | 24642042044dec5a145817f4dda2bbf5a184585c /sound/soc/sof/core.c | |
parent | ed4e04477648dbbee888d94dd1ecbb63f2e3ad35 (diff) |
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>
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 f6d86266a1e3..2311c273441c 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -329,6 +329,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); |