From fcf7c4f67e4de1b7c555c27ea951c0681c28b13f Mon Sep 17 00:00:00 2001
From: Liam Girdwood <lrg@slimlogic.co.uk>
Date: Wed, 18 Aug 2010 18:22:49 +0100
Subject: [PATCH 45/60] ASoC: sdp4430: Add shutdown delay for HS power off

commit 374b7f404bf5815dd07d513c1b3fc12d10fc880f upstream

Add a 500ms delay to shutdown headset components in order
to reduce pop noise. In order to minimize pop noise, McPDM
interface needs to shutdown after analog paths have been
disabled, hence McPDM shutdown delay is longer.

Change-Id: Ida3f61b2f219799d6a291c98a4be45ba39e340d3
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Integrated-by: Jingdong Lu <jingdong.lu@windriver.com>
---
 sound/soc/omap/sdp4430.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c
index 96fc030..a5f9988 100644
--- a/sound/soc/omap/sdp4430.c
+++ b/sound/soc/omap/sdp4430.c
@@ -297,6 +297,9 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd)
 	else
 		snd_soc_jack_report(&hs_jack, SND_JACK_HEADSET, SND_JACK_HEADSET);
 
+	/* wait 500 ms before switching of HS power */
+	rtd->pmdown_time = 500;
+
 	return ret;
 }
 
-- 
1.7.4.1

