Skip to content

Commit 5b4458e

Browse files
miquelraynalbroonie
authored andcommitted
ASoC: tlv320aic32x4: Ensure a minimum delay before clock stabilization
As indicated in the datasheet, a 10ms delay must be observed after programming the divisors. The lack of delay prevents the codec to work properly and the playback appears extremely slow and totally un-audible on a custom sama5 based board. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20200911173140.29984-2-miquel.raynal@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 501ef01 commit 5b4458e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

sound/soc/codecs/tlv320aic32x4-clk.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,14 @@ static int clk_aic32x4_pll_set_rate(struct clk_hw *hw,
230230
if (ret < 0)
231231
return -EINVAL;
232232

233-
return clk_aic32x4_pll_set_muldiv(pll, &settings);
233+
ret = clk_aic32x4_pll_set_muldiv(pll, &settings);
234+
if (ret)
235+
return ret;
236+
237+
/* 10ms is the delay to wait before the clocks are stable */
238+
msleep(10);
239+
240+
return 0;
234241
}
235242

236243
static int clk_aic32x4_pll_set_parent(struct clk_hw *hw, u8 index)

0 commit comments

Comments
 (0)