Skip to content

Commit

Permalink
ASoC: Use pm_wakeup_event() in WM8962 jack detection
Browse files Browse the repository at this point in the history
Ensure that the system does not suspend while we process a WM8962 jack
event by using pm_wakeup_event() to block the suspend while we're waiting
for the jack to settle. Use a slightly longer timeout than the jack waits
to allow for other stuff to take over and delays in scheduling.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Nov 3, 2010
1 parent 7b0f42b commit 11e16eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -3353,6 +3353,8 @@ static irqreturn_t wm8962_irq(int irq, void *data)
if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) {
dev_dbg(codec->dev, "Microphone event detected\n");

pm_wakeup_event(codec->dev, 300);

schedule_delayed_work(&wm8962->mic_work,
msecs_to_jiffies(250));
}
Expand Down

0 comments on commit 11e16eb

Please sign in to comment.