audio: sn95031: [WORKAROUND]Make jack detect delay time longer for Lexington platform
authorlizhuangzhi <zhuangzhi.li@intel.com>
Tue, 27 Mar 2012 00:49:13 +0000 (08:49 +0800)
committerbuildbot <buildbot@intel.com>
Thu, 12 Apr 2012 12:23:16 +0000 (05:23 -0700)
BZ: 27775

On LEX platform, the jack module type is changed. Jack_DET is connected to the left
HP channel, only one interrupt occur during people plug in headset, It's good
for plug interrupt stable, But the mic bias voltage maybe unstale after 250ms
wq delay, Use CONFIG_SND_MFLD_MACHINE_GI macro to control 700ms longer time delay as
workaround for LEX platform.

Change-Id: I274b915644adaeed8749a49cd5655e6b16c81ed0
Signed-off-by: Zhuangzhi Li <zhuangzhi.li@intel.com>
Reviewed-on: http://android.intel.com:8080/40775
Reviewed-by: Abdullah, Omair M <omair.m.abdullah@intel.com>
Reviewed-by: Babu, Ramesh <ramesh.babu@intel.com>
Reviewed-by: Koul, Vinod <vinod.koul@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Reviewed-by: Gupta, ArvindX K <arvindx.k.gupta@intel.com>
Reviewed-by: Hibare, PramodX <pramodx.hibare@intel.com>
Tested-by: Hibare, PramodX <pramodx.hibare@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
sound/soc/codecs/sn95031.c

index b9b1d59..6486d8c 100644 (file)
 
 #define SN95031_RATES (SNDRV_PCM_RATE_8000_96000)
 #define SN95031_FORMATS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
-#define SN95031_SW_DBNC 250
 #define LP_THRESHOLD 400
 #define HEADSET_DET_PIN 77
+/*
+ * On LEX platform, for JACK mechanism changed, the mic bias voltage
+ * maybe unstale after 250ms wq delay, Use longer time delay 700ms as
+ * workaround, it covers most normal plug in operation.
+ */
+#ifdef CONFIG_SND_MFLD_MACHINE_GI
+#define SN95031_SW_DBNC 700
+#else
+#define SN95031_SW_DBNC 250
+#endif
 
 struct sn95031_jack_work {
        unsigned int intr_id;