diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-08-02 17:36:22 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-07 15:32:27 +0200 |
commit | 279be5919560d9f3afea1940bfd261297eecfa0c (patch) | |
tree | 5ecc8f7e6f33b9a20e4b2f17f7e17f55fe351037 /sound/soc/codecs/rt715-sdw.c | |
parent | ASoC: rt712-sdca-dmic: enable pm_runtime in probe, keep status as 'suspended' (diff) | |
download | linux-279be5919560d9f3afea1940bfd261297eecfa0c.tar.xz linux-279be5919560d9f3afea1940bfd261297eecfa0c.zip |
ASoC: rt715: enable pm_runtime in probe, keep status as 'suspended'
This patch suggests enabling pm_runtime during the probe, but marking the
device as 'active' only after it is enumerated. That will force a
dependency between the card and the codec, pm_runtime_get_sync() will
have to wait for the codec device to resume and hence implicitly wait
for the enumeration/initialization to be completed. In the nominal
case where the codec device is already active the get_sync() would
only perform a ref-count increase.
The changes are directly inspired by RT711 and RT711-sdca changes.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802153629.53576-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt715-sdw.c')
-rw-r--r-- | sound/soc/codecs/rt715-sdw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index d09b3061096d..21f37babd148 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -513,10 +513,7 @@ static int rt715_sdw_probe(struct sdw_slave *slave, static int rt715_sdw_remove(struct sdw_slave *slave) { - struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev); - - if (rt715->first_hw_init) - pm_runtime_disable(&slave->dev); + pm_runtime_disable(&slave->dev); return 0; } |