From 6bc26c18a21c5d4b93ba71ce3852324b9ba82ef3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Tue, 28 Jun 2011 14:50:19 +0800 Subject: [PATCH] rk29_phone: headset hook key update --- drivers/headset_observe/rk_headset.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/headset_observe/rk_headset.c b/drivers/headset_observe/rk_headset.c index 5fcccad31090..22c32f17a7fd 100755 --- a/drivers/headset_observe/rk_headset.c +++ b/drivers/headset_observe/rk_headset.c @@ -59,6 +59,7 @@ #define disable 0 extern int wm8994_set_status(void); + /* headset private data */ struct headset_priv { struct input_dev *input_dev; @@ -182,7 +183,7 @@ static void headsetobserve_work(struct work_struct *work) // 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); } @@ -300,6 +301,7 @@ static void headset_timer_callback(unsigned long arg) 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"); @@ -307,7 +309,7 @@ static void headset_timer_callback(unsigned long arg) add_timer(&headset_info->headset_timer); goto out; } - + #endif for(i=0; i<3; i++) { level = gpio_get_value(pdata->Hook_gpio); @@ -326,7 +328,6 @@ static void headset_timer_callback(unsigned long arg) goto out; } -//ÑÓ³ÙÒ»¶Îʱ¼ä¶ú»ú»¹ÊÇ°´ÏµĻ°£¬ÄÇôӦ¸ÃÊÇÎÞ°´¼ü¶ú»ú if(level == 0) headset->isMic= 0;//No microphone else if(level > 0) -- 2.34.1