Skip to content

Commit cb5fbf5

Browse files
committed
ASoC: rt722: add delay time to wait for the calibration procedure
JIRA: https://issues.redhat.com/browse/RHEL-76110 commit c9e3ebd Author: Shuming Fan <shumingf@realtek.com> Date: Wed Dec 18 17:13:07 2024 +0800 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> Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent e9f280e commit cb5fbf5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sound/soc/codecs/rt722-sdca.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,13 +1467,18 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722)
14671467
0x008d);
14681468
/* check HP calibration FSM status */
14691469
for (loop_check = 0; loop_check < chk_cnt; loop_check++) {
1470+
usleep_range(10000, 11000);
14701471
ret = rt722_sdca_index_read(rt722, RT722_VENDOR_CALI,
14711472
RT722_DAC_DC_CALI_CTL3, &calib_status);
1472-
if (ret < 0 || loop_check == chk_cnt)
1473+
if (ret < 0)
14731474
dev_dbg(&rt722->slave->dev, "calibration failed!, ret=%d\n", ret);
14741475
if ((calib_status & 0x0040) == 0x0)
14751476
break;
14761477
}
1478+
1479+
if (loop_check == chk_cnt)
1480+
dev_dbg(&rt722->slave->dev, "%s, calibration time-out!\n", __func__);
1481+
14771482
/* Set ADC09 power entity floating control */
14781483
rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_ADC0A_08_PDE_FLOAT_CTL,
14791484
0x2a12);

0 commit comments

Comments
 (0)