[PORT FROM R2] sound: Add wakelock to jack detection interrupts
authorSamu Onkalo <samu.onkalo@intel.com>
Fri, 18 Nov 2011 08:58:01 +0000 (10:58 +0200)
committerbuildbot <buildbot@intel.com>
Fri, 16 Dec 2011 18:45:54 +0000 (10:45 -0800)
commit393b879a693c602f4dc55468fb8b3e4fab041ad1
treec03146ea6d32e925d860c86e2211d3278b27746d
parentb13889a58904ce1709dfab3d6694897db9212806
[PORT FROM R2] sound: Add wakelock to jack detection interrupts

BZ: 17287

If the jack detection interrupt comes after the user processes are
freezed the interrupt is handled but the audio routings are not
done. Suspend operation must be aborted in that case.
Take wakelock for one second when the headset related interrupt comes.
Machine driver doesn't know when the operation is finished so it
can't unlock the wakelock. Timed wakelock is a simple way to
handle this although is not perfect one.

Change-Id: I762ebc083d64b8e0cd0ebf06ab48b768fd1faf9a
Old-Change-Id: I32cbdeee422e44a52c4fa7c5ccda973d00efd8c3
Signed-off-by: Samu Onkalo <samu.onkalo@intel.com>
Reviewed-on: http://android.intel.com:8080/27796
Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
sound/soc/mid-x86/mfld_machine.c