Browse Source

ASoC: Bail out of wm_hubs DC servo if calibration fails

We're keeping track of the number of times we've iterated but never
actually using this to bail out if the chip looks stuck.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown 15 years ago
parent
commit
6937c947d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sound/soc/codecs/wm_hubs.c

+ 1 - 1
sound/soc/codecs/wm_hubs.c

@@ -74,7 +74,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec)
 		msleep(1);
 		reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0);
 		dev_dbg(codec->dev, "DC servo: %x\n", reg);
-	} while (reg & WM8993_DCS_DATAPATH_BUSY);
+	} while (reg & WM8993_DCS_DATAPATH_BUSY && count < 400);
 
 	if (reg & WM8993_DCS_DATAPATH_BUSY)
 		dev_err(codec->dev, "Timed out waiting for DC Servo\n");