Commit 6b4da537 authored by Christophe Branchereau's avatar Christophe Branchereau Committed by Mark Brown

ASoC: codecs/jz4770: Adjust timeouts for cap-coupled outputs

When using cap-coupled outputs, the RUP/RDO can take much longer than
the 100ms timeout we used to have. Increase that timeout to one second.
Signed-off-by: default avatarChristophe Branchereau <cbranchereau@gmail.com>
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20201207125338.119397-3-paul@crapouillou.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a346c778
......@@ -287,7 +287,7 @@ static int jz4770_codec_mute_stream(struct snd_soc_dai *dai, int mute, int direc
err = regmap_read_poll_timeout(jz_codec->regmap,
JZ4770_CODEC_REG_IFR,
val, val & gain_bit,
1000, 100 * USEC_PER_MSEC);
1000, 1 * USEC_PER_SEC);
if (err) {
dev_err(jz_codec->dev,
"Timeout while setting digital mute: %d", err);
......@@ -381,7 +381,7 @@ static int hpout_event(struct snd_soc_dapm_widget *w,
err = regmap_read_poll_timeout(jz_codec->regmap,
JZ4770_CODEC_REG_IFR,
val, val & REG_IFR_RUP,
1000, 100 * USEC_PER_MSEC);
1000, 1 * USEC_PER_SEC);
if (err) {
dev_err(jz_codec->dev, "RUP timeout: %d", err);
return err;
......@@ -401,7 +401,7 @@ static int hpout_event(struct snd_soc_dapm_widget *w,
err = regmap_read_poll_timeout(jz_codec->regmap,
JZ4770_CODEC_REG_IFR,
val, val & REG_IFR_RDO,
1000, 100 * USEC_PER_MSEC);
1000, 1 * USEC_PER_SEC);
if (err) {
dev_err(jz_codec->dev, "RDO timeout: %d", err);
return err;
......@@ -803,7 +803,7 @@ static int jz4770_codec_io_wait(struct jz_codec *codec)
return readl_poll_timeout(codec->base + ICDC_RGADW_OFFSET, reg,
!(reg & ICDC_RGADW_RGWR),
1000, 10 * USEC_PER_MSEC);
1000, 1 * USEC_PER_SEC);
}
static int jz4770_codec_reg_read(void *context, unsigned int reg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment