Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-next
authorMark Brown <broonie@linaro.org>
Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)
1  2 
sound/soc/codecs/wm8994.c

index 29e95f93d482201a91cd0523c008bb2ca2b01bd3,0f58f003dc1a50fade5105688e42b248c568092c..25580b5a853f0dc68258b0211a24eadaf25b9284
@@@ -3836,18 -3925,16 +3930,22 @@@ static irqreturn_t wm8958_mic_irq(int i
                                ret);
                } else if (!(ret & WM1811_JACKDET_LVL)) {
                        dev_dbg(codec->dev, "Ignoring removed jack\n");
 -                      return IRQ_HANDLED;
 +                      goto out;
                }
 +      } else if (!(reg & WM8958_MICD_STS)) {
 +              snd_soc_jack_report(wm8994->micdet[0].jack, 0,
 +                                  SND_JACK_MECHANICAL | SND_JACK_HEADSET |
 +                                  wm8994->btn_mask);
 +              wm8994->mic_detecting = true;
 +              goto out;
        }
  
+       wm8994->mic_status = reg;
+       id_delay = wm8994->wm8994->pdata.mic_id_delay;
        if (wm8994->mic_detecting)
-               wm8994->mic_id_cb(wm8994->mic_id_cb_data, reg);
+               schedule_delayed_work(&wm8994->mic_complete_work,
+                                     msecs_to_jiffies(id_delay));
        else
                wm8958_button_det(codec, reg);