[PORT FROM R2]audio: sn95029: Fix headset detect issue in a calling
authorlizhuangzhi <zhuangzhi.li@intel.com>
Thu, 1 Mar 2012 06:43:34 +0000 (14:43 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 21 Mar 2012 14:39:10 +0000 (07:39 -0700)
commitfb367d5f2fb58d328cbf34ccc5f9149166202e91
treea00ff946533548eebffbfbb756fd46082a336250
parent53e5db38f8c72e5b86597bb7529c94284473f7a0
[PORT FROM R2]audio: sn95029: Fix headset detect issue in a calling

BZ: 16131

Case1: cancel_delayed_work in sn95031_jack_wq will casue some useful work
removed when insert headset,it will lose the last headset status update and
report to headsetObserver sometimes.

Case2: Clear the jack_wq->intr_id flag also will cause headset detect error,
when jack detect wq running,the last interrupt occur and schedule the work
queue, then jack_wq->intr_id was cleared by current wq,after 250ms passed,
the wq will first check the jack_wq->intr_id=0, then report headset remove
event to user space.

Fix Case1&Case2 issues.

Change-Id: Ibb719ff0074031cacd97cc4af527582c53f1063e
old-Change-Id: I7f90d877cf308f7accbb3f1c13bb975e56afb351
Signed-off-by: Zhuangzhi Li <zhuangzhi.li@intel.com>
Reviewed-on: http://android.intel.com:8080/39712
Reviewed-by: Abdullah, Omair M <omair.m.abdullah@intel.com>
Reviewed-by: Gross, Mark <mark.gross@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