Skip to content

Commit c9e3ebd

Browse files
shumingfanbroonie
authored andcommitted
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>
1 parent e8d0ba1 commit c9e3ebd

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
@@ -1468,13 +1468,18 @@ static void rt722_sdca_jack_preset(struct rt722_sdca_priv *rt722)
14681468
0x008d);
14691469
/* check HP calibration FSM status */
14701470
for (loop_check = 0; loop_check < chk_cnt; loop_check++) {
1471+
usleep_range(10000, 11000);
14711472
ret = rt722_sdca_index_read(rt722, RT722_VENDOR_CALI,
14721473
RT722_DAC_DC_CALI_CTL3, &calib_status);
1473-
if (ret < 0 || loop_check == chk_cnt)
1474+
if (ret < 0)
14741475
dev_dbg(&rt722->slave->dev, "calibration failed!, ret=%d\n", ret);
14751476
if ((calib_status & 0x0040) == 0x0)
14761477
break;
14771478
}
1479+
1480+
if (loop_check == chk_cnt)
1481+
dev_dbg(&rt722->slave->dev, "%s, calibration time-out!\n", __func__);
1482+
14781483
/* Set ADC09 power entity floating control */
14791484
rt722_sdca_index_write(rt722, RT722_VENDOR_HDA_CTL, RT722_ADC0A_08_PDE_FLOAT_CTL,
14801485
0x2a12);

0 commit comments

Comments
 (0)