Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 986b2f2c authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Wait for WM8993 FLL to stabilise



Ensure the FLL is locked before we return from set_fll().

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 675c496b
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -444,6 +444,12 @@ static int _wm8993_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
	/* Enable the FLL */
	/* Enable the FLL */
	snd_soc_write(codec, WM8993_FLL_CONTROL_1, reg1 | WM8993_FLL_ENA);
	snd_soc_write(codec, WM8993_FLL_CONTROL_1, reg1 | WM8993_FLL_ENA);


	/* Both overestimates */
	if (Fref < 1000000)
		msleep(3);
	else
		msleep(1);

	dev_dbg(codec->dev, "FLL enabled at %dHz->%dHz\n", Fref, Fout);
	dev_dbg(codec->dev, "FLL enabled at %dHz->%dHz\n", Fref, Fout);


	wm8993->fll_fref = Fref;
	wm8993->fll_fref = Fref;