ASoC: rt5682: do nothing in rt5682_suspend/resume in sdw mode
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 4 Feb 2021 20:17:39 +0000 (14:17 -0600)
committerMark Brown <broonie@kernel.org>
Fri, 5 Feb 2021 13:13:21 +0000 (13:13 +0000)
regcache sync will be done in sdw device suspend/resume functions.
And we have different jack detection mechanism for SoundWire.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210204201739.25206-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5682.c

index 4d865ed..fde5c49 100644 (file)
@@ -2906,6 +2906,9 @@ static int rt5682_suspend(struct snd_soc_component *component)
 {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 
+       if (rt5682->is_sdw)
+               return 0;
+
        regcache_cache_only(rt5682->regmap, true);
        regcache_mark_dirty(rt5682->regmap);
        return 0;
@@ -2915,6 +2918,9 @@ static int rt5682_resume(struct snd_soc_component *component)
 {
        struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
 
+       if (rt5682->is_sdw)
+               return 0;
+
        regcache_cache_only(rt5682->regmap, false);
        regcache_sync(rt5682->regmap);