diff options
author | Shuming Fan <shumingf@realtek.com> | 2024-12-18 10:13:07 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-12-18 15:17:32 +0100 |
commit | c9e3ebdc52ebe028f238c9df5162ae92483bedd5 (patch) | |
tree | 180fe4f0d11545f5e3f0c23d98a082824f67ae5f /sound | |
parent | ASoC: SOF: Intel: hda-dai: Do not release the link DMA on STOP (diff) | |
download | linux-c9e3ebdc52ebe028f238c9df5162ae92483bedd5.tar.xz linux-c9e3ebdc52ebe028f238c9df5162ae92483bedd5.zip |
ASoC: rt722: add delay time to wait for the calibration procedure
The calibration procedure needs some time to finish.
This patch adds the delay time to ensure the calibration procedure is completed correctly.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20241218091307.96656-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rt722-sdca.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt722-sdca.c b/sound/soc/codecs/rt722-sdca.c index 908846e994df..e17a142d03b9 100644 --- a/sound/soc/codecs/rt722-sdca.c +++ b/sound/soc/codecs/rt722-sdca.c @@ -1468,13 +1468,18 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722) 0x008d); /* check HP calibration FSM status */ for (loop_check = 0; loop_check < chk_cnt; loop_check++) { + usleep_range(10000, 11000); ret = rt722_sdca_index_read(rt722, RT722_VENDOR_CALI, RT722_DAC_DC_CALI_CTL3, &calib_status); - if (ret < 0 || loop_check == chk_cnt) + if (ret < 0) dev_dbg(&rt722->slave->dev, "calibration failed!, ret=%d\n", ret); if ((calib_status & 0x0040) == 0x0) break; } + + if (loop_check == chk_cnt) + dev_dbg(&rt722->slave->dev, "%s, calibration time-out!\n", __func__); + /* Set ADC09 power entity floating control */ rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_ADC0A_08_PDE_FLOAT_CTL, 0x2a12); |