BZ: 22014
If frequent jack insertion/removal is done when phone is in S3 state, jack
events are reported by ALSA but they are not propagated to Andriod due to
hardcoded delay of 1 second in the HeadsetObserver before sending the intent.
But phone goes back to S3 state in 1 second, so intent is sent only when phone
wakes up.
Increased the wake lock duration to 2 seconds because duration of 1 second was
not sufficient.
Change-Id: I21cf5b9bb516051fbc0e0d9c2126335d03bde3fa
old-Change-Id: I64dd3d0a28107082177c88ab92c65d3b216b5f6d
Signed-off-by: namarta <namartax.kohli@intel.com>
Reviewed-on: http://android.intel.com:8080/34871
Reviewed-by: M, Arulselvan <arulselvan.m@intel.com>
Tested-by: M, Arulselvan <arulselvan.m@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
#ifdef CONFIG_HAS_WAKELOCK
/*
* We don't have any call back from the jack detection completed.
- * Take wakelock for one second to give time for the detection
+ * Take wakelock for two seconds to give time for the detection
* to finish. Jack detection is happening rarely so this doesn't
* have big impact to power consumption.
*/
- wake_lock_timeout(&mc_private->wake_lock, 1*HZ);
+ wake_lock_timeout(&mc_private->wake_lock, 2*HZ);
#endif
return IRQ_WAKE_THREAD;
}