diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-06-17 00:08:25 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-17 20:37:59 +0300 |
commit | 011e397f5c9c96e533d4a244af84e74c9caefb83 (patch) | |
tree | 8e71b09af6658d8c6eb53251e138e0a7c87f19f8 /sound/soc/codecs/rt711-sdca.c | |
parent | 4ea3bfd13a2484b5f1c19f60b1dc7494f261f0a4 (diff) | |
download | linux-011e397f5c9c96e533d4a244af84e74c9caefb83.tar.xz |
ASoC: codecs: soundwire: call pm_runtime_resume() in component probe
Make sure that the bus and codecs are pm_runtime active when the card
is registered/created. This avoid timeouts when accessing registers.
BugLink: https://github.com/thesofproject/linux/issues/3651
BugLink: https://github.com/thesofproject/linux/issues/3650
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220616210825.132093-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt711-sdca.c')
-rw-r--r-- | sound/soc/codecs/rt711-sdca.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt711-sdca.c b/sound/soc/codecs/rt711-sdca.c index dfe3c9299ebd..9d226b1cb7e9 100644 --- a/sound/soc/codecs/rt711-sdca.c +++ b/sound/soc/codecs/rt711-sdca.c @@ -1194,10 +1194,15 @@ static int rt711_sdca_parse_dt(struct rt711_sdca_priv *rt711, struct device *dev static int rt711_sdca_probe(struct snd_soc_component *component) { struct rt711_sdca_priv *rt711 = snd_soc_component_get_drvdata(component); + int ret; rt711_sdca_parse_dt(rt711, &rt711->slave->dev); rt711->component = component; + ret = pm_runtime_resume(component->dev); + if (ret < 0 && ret != -EACCES) + return ret; + return 0; } |