diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-08-02 18:36:19 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-07 16:32:24 +0300 |
commit | 6b8f8c5e6ffbd431d6cf40584dc8d3027f7e99b3 (patch) | |
tree | 027703b5bc3da5b65ee654332b017b658d24a8a7 /sound/soc/codecs/rt700-sdw.c | |
parent | 0c321fb857707ef68ffdb4f9672beb664e6679cc (diff) | |
download | linux-6b8f8c5e6ffbd431d6cf40584dc8d3027f7e99b3.tar.xz |
ASoC: rt700: 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-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt700-sdw.c')
-rw-r--r-- | sound/soc/codecs/rt700-sdw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c index 53e7973e0bf9..52c33d56b143 100644 --- a/sound/soc/codecs/rt700-sdw.c +++ b/sound/soc/codecs/rt700-sdw.c @@ -464,8 +464,7 @@ static int rt700_sdw_remove(struct sdw_slave *slave) cancel_delayed_work_sync(&rt700->jack_btn_check_work); } - if (rt700->first_hw_init) - pm_runtime_disable(&slave->dev); + pm_runtime_disable(&slave->dev); return 0; } |