ASoC: codecs: soundwire: increase resume timeout
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 15 Jan 2021 06:16:50 +0000 (14:16 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 15 Jan 2021 14:15:29 +0000 (14:15 +0000)
The resume operation relies on multiple transactions to synchronize
the regmap state, make sure the timeout is one order of magnitude
larger than an individual transaction, so that timeouts of failed
transactions are detected first.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210115061651.9740-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98373-sdw.c
sound/soc/codecs/rt1308-sdw.c
sound/soc/codecs/rt5682.h
sound/soc/codecs/rt700-sdw.c
sound/soc/codecs/rt711-sdw.c
sound/soc/codecs/rt715-sdw.c

index b8d471d79e939e885553691565cbf036d3afaa4c..d8c47667a9ea2f8c6a67881fb16b28b6a5916ce7 100644 (file)
@@ -262,6 +262,8 @@ static __maybe_unused int max98373_suspend(struct device *dev)
        return 0;
 }
 
+#define MAX98373_PROBE_TIMEOUT 5000
+
 static __maybe_unused int max98373_resume(struct device *dev)
 {
        struct sdw_slave *slave = dev_to_sdw_dev(dev);
@@ -275,7 +277,7 @@ static __maybe_unused int max98373_resume(struct device *dev)
                goto regmap_sync;
 
        time = wait_for_completion_timeout(&slave->initialization_complete,
-                                          msecs_to_jiffies(2000));
+                                          msecs_to_jiffies(MAX98373_PROBE_TIMEOUT));
        if (!time) {
                dev_err(dev, "Initialization not complete, timed out\n");
                return -ETIMEDOUT;
index ec5564f780e8c68fd648a6d24cb7afc55489f38b..afd2c3b687ccb0af96a682e8d22b03d30a42e31a 100644 (file)
@@ -701,7 +701,7 @@ static int __maybe_unused rt1308_dev_suspend(struct device *dev)
        return 0;
 }
 
-#define RT1308_PROBE_TIMEOUT 2000
+#define RT1308_PROBE_TIMEOUT 5000
 
 static int __maybe_unused rt1308_dev_resume(struct device *dev)
 {
index 99b85cfe6248d7d25dfccf7c4ff4f4fbfdab69a5..1f9c51a5b9bfc52aa8804c7b0178b0184aabc847 100644 (file)
 #define RT5682_SAR_SOUR_TYPE                   (0x0)
 
 /* soundwire timeout */
-#define RT5682_PROBE_TIMEOUT                   2000
+#define RT5682_PROBE_TIMEOUT                   5000
 
 
 #define RT5682_STEREO_RATES SNDRV_PCM_RATE_8000_192000
index fb77e77a4ebd5a621be72e1d6a672cf44300db95..ce9255b881d4a17201f34a018f51f717ebb00c7c 100644 (file)
@@ -490,7 +490,7 @@ static int __maybe_unused rt700_dev_suspend(struct device *dev)
        return 0;
 }
 
-#define RT700_PROBE_TIMEOUT 2000
+#define RT700_PROBE_TIMEOUT 5000
 
 static int __maybe_unused rt700_dev_resume(struct device *dev)
 {
index fc7df79c3b9189d5a8d2a5b116cbb6f2c3940035..756c0ada3b31adbf613744988de0e953aba9a9c5 100644 (file)
@@ -493,7 +493,7 @@ static int __maybe_unused rt711_dev_suspend(struct device *dev)
        return 0;
 }
 
-#define RT711_PROBE_TIMEOUT 2000
+#define RT711_PROBE_TIMEOUT 5000
 
 static int __maybe_unused rt711_dev_resume(struct device *dev)
 {
index 8f0aa1e8a27371312cdbd7843cd375f3dcaa49f0..71dd3b97a459040eaf2d04c436a383f945a8072d 100644 (file)
@@ -533,7 +533,7 @@ static int __maybe_unused rt715_dev_suspend(struct device *dev)
        return 0;
 }
 
-#define RT715_PROBE_TIMEOUT 2000
+#define RT715_PROBE_TIMEOUT 5000
 
 static int __maybe_unused rt715_dev_resume(struct device *dev)
 {