From: namarta Date: Fri, 3 Feb 2012 10:41:54 +0000 (+0530) Subject: [PORT FROM R2]audio: mfld_machine: Increased the wake lock duration from 1 second... X-Git-Tag: 2.1b_release~1465 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4664ebbf3fead79aeb121be6101e8aa5bd8150e;p=kernel%2Fkernel-mfld-blackbay.git [PORT FROM R2]audio: mfld_machine: Increased the wake lock duration from 1 second to 2 seconds 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 Reviewed-on: http://android.intel.com:8080/34871 Reviewed-by: M, Arulselvan Tested-by: M, Arulselvan Reviewed-by: buildbot Tested-by: buildbot --- diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c index 52c00b0..7e433e1 100644 --- a/sound/soc/mid-x86/mfld_machine.c +++ b/sound/soc/mid-x86/mfld_machine.c @@ -452,11 +452,11 @@ static irqreturn_t snd_mfld_jack_intr_handler(int irq, void *dev) #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; }