From 7c2bc862291a450f652ad3df2505830222b194cd Mon Sep 17 00:00:00 2001 From: Chao Jiang Date: Tue, 12 Jul 2011 11:39:37 +0900 Subject: ASoC: tegra: wait on amplifier to be enabled According to the datasheet of wm9001 amplifier, it needs 100ms to enable itself for Class D with Vmid capacitor 4.7uF. Some sound data will be missing without the msleep call. Fixed bug#831138 (cherry picked from commit 64970d8cdfa492563775266eb189978bb59e4ecc) Change-Id: If12e1b6570a76418a190e84b5f3a5513d2030b83 Reviewed-on: http://git-master/r/43648 Reviewed-by: Chao Jiang Tested-by: Chao Jiang Reviewed-by: Andre Sihera Reviewed-by: Sumit Bhattacharya Reviewed-by: Scott Peterson --- sound/soc/tegra/tegra_soc_wm8903.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/soc') diff --git a/sound/soc/tegra/tegra_soc_wm8903.c b/sound/soc/tegra/tegra_soc_wm8903.c index ee5b0af8d3ac..2483d2efb115 100644 --- a/sound/soc/tegra/tegra_soc_wm8903.c +++ b/sound/soc/tegra/tegra_soc_wm8903.c @@ -419,6 +419,11 @@ static int tegra_dapm_event_int_spk(struct snd_soc_dapm_widget* w, gpio_set_value_cansleep(tegra_wired_jack_conf.en_spkr, SND_SOC_DAPM_EVENT_ON(event) ? 1 : 0); + + /* the amplifier needs 100ms to enable. wait 100ms after + * gpio EN triggered */ + if (SND_SOC_DAPM_EVENT_ON(event)) + msleep(100); } return 0; -- cgit v1.2.3