Skip to content

Commit

Permalink
ASoC: Handle failed WM8994 FLL lock waits
Browse files Browse the repository at this point in the history
Try the completion before we start the FLL so that if an interrupt was
delayed long enough for us to miss it we don't wait for the completion
it signalled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jul 17, 2011
1 parent 1479c3f commit f0f5039
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,9 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
(fll.clk_ref_div << WM8994_FLL1_REFCLK_DIV_SHIFT) |
(src - 1));

/* Clear any pending completion from a previous failure */
try_wait_for_completion(&wm8994->fll_locked[id]);

/* Enable (with fractional mode if required) */
if (freq_out) {
if (fll.k)
Expand Down

0 comments on commit f0f5039

Please sign in to comment.