Unverified Commit 7ef8c9ed authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown
Browse files

ASoC: codecs: soundwire: increase resume timeout



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: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarBard 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: default avatarMark Brown <broonie@kernel.org>
parent 2d446c98
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -1356,7 +1356,7 @@
#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
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
Loading