#define disable 0
extern int wm8994_set_status(void);
+
/* headset private data */
struct headset_priv {
struct input_dev *input_dev;
// enable_irq(headset_info->irq[HOOK]);
headset_info->cur_headset_status = BIT_HEADSET;
headset_change_irqtype(HEADSET,IRQF_TRIGGER_FALLING);//
- del_timer(&headset_info->headset_timer);//Æô¶¯¶¨Ê±Æ÷£¬µÈ´ýÇл»µ½¶ú»úͨ·
+ del_timer(&headset_info->headset_timer);//Start the timer, wait for switch to the headphone channel
headset_info->headset_timer.expires = jiffies + 500;
add_timer(&headset_info->headset_timer);
}
DBG("Headset is out\n");
goto out;
}
+ #ifdef CONFIG_SND_SOC_WM8994
if(wm8994_set_status() < 0)
{
DBG("wm8994 is not set on heatset channel\n");
add_timer(&headset_info->headset_timer);
goto out;
}
-
+ #endif
for(i=0; i<3; i++)
{
level = gpio_get_value(pdata->Hook_gpio);
goto out;
}
-//ÑÓ³ÙÒ»¶Îʱ¼ä¶ú»ú»¹Êǰ´ÏµĻ°£¬ÄÇôӦ¸ÃÊÇÎÞ°´¼ü¶ú»ú
if(level == 0)
headset->isMic= 0;//No microphone
else if(level > 0)