[alsa-devel] [PATCH] ASoC: delay the initial jack detect by debounce_time

xiangxiao xiaoxiang at xiaomi.com
Sun Feb 23 07:44:52 CET 2014


so the hardware could get time to initialize and debounce

Change-Id: Iebeffa9bac6c4012ee8f9645771c13b28fe5ae80
Signed-off-by: xiangxiao <xiaoxiang at xiaomi.com>
---
 sound/soc/soc-jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 23d43da..b12fce6 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -342,7 +342,8 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
 		gpio_export(gpios[i].gpio, false);
 
 		/* Update initial jack status */
-		snd_soc_jack_gpio_detect(&gpios[i]);
+		schedule_delayed_work(&gpios[i].work,
+				      msecs_to_jiffies(gpios[i].debounce_time));
 	}
 
 	return 0;
-- 
1.8.1.2



More information about the Alsa-devel mailing list