Skip to content

Commit

Permalink
Merge series "ASoC/SoundWire: fix timeout values" from Bard Liao <yun…
Browse files Browse the repository at this point in the history
…g-chuan.liao@linux.intel.com>:

The timeout for an individual transaction w/ the Cadence IP is the same as
the entire resume operation for codecs.
This doesn't make sense, we need to have at least one order of magnitude
between individual transactions and the entire resume operation.

Set the timeout on the Cadence side to 500ms and 5s for the codec resume.

Both ASoC and SoundWire trees are fine for this series.

Pierre-Louis Bossart (2):
  ASoC: codecs: soundwire: increase resume timeout
  soundwire: cadence: reduce timeout on transactions

 drivers/soundwire/cadence_master.c | 2 +-
 sound/soc/codecs/max98373-sdw.c    | 4 +++-
 sound/soc/codecs/rt1308-sdw.c      | 2 +-
 sound/soc/codecs/rt5682.h          | 2 +-
 sound/soc/codecs/rt700-sdw.c       | 2 +-
 sound/soc/codecs/rt711-sdw.c       | 2 +-
 sound/soc/codecs/rt715-sdw.c       | 2 +-
 7 files changed, 9 insertions(+), 7 deletions(-)

--
2.17.1
  • Loading branch information
Mark Brown committed Jan 15, 2021
2 parents 42dc604 + 7ef8c9e commit 574b813
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion sound/soc/codecs/max98373-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt1308-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt5682.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt700-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt711-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt715-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 574b813

Please sign in to comment.