summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Jiang <chaoj@nvidia.com>2011-07-12 11:39:37 +0900
committerManish Tuteja <mtuteja@nvidia.com>2011-08-01 23:44:29 -0700
commit7c2bc862291a450f652ad3df2505830222b194cd (patch)
tree835b93dc217a48ef13903e69c02e05128601750c
parent6437749423bc10de57eed1836a1a7c16dc139b20 (diff)
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 <chaoj@nvidia.com> Tested-by: Chao Jiang <chaoj@nvidia.com> Reviewed-by: Andre Sihera <asihera@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r--sound/soc/tegra/tegra_soc_wm8903.c5
1 files changed, 5 insertions, 0 deletions
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;