Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

headset_observe: Fix system resume with headset insert could not sche… #256

Open
wants to merge 1 commit into
base: develop-4.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions drivers/headset_observe/rk_headset_irq_hook_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static void hook_once_work(struct work_struct *work)
else if(val >= HOOK_LEVEL_HIGH)
{
headset_info->isMic = 1;//have mic
schedule_delayed_work(&headset_info->hook_work,msecs_to_jiffies(100));
schedule_delayed_work(&headset_info->hook_work,msecs_to_jiffies(HOOK_ADC_SAMPLE_TIME));
}

headset_info->cur_headset_status = headset_info->isMic ? BIT_HEADSET:BIT_HEADSET_NO_MIC;
Expand Down Expand Up @@ -454,7 +454,7 @@ static void hook_work_callback(struct work_struct *work)
input_sync(headset->input_dev);
}
status_error:
schedule_delayed_work(&headset_info->hook_work,msecs_to_jiffies(100));
schedule_delayed_work(&headset_info->hook_work,msecs_to_jiffies(HOOK_ADC_SAMPLE_TIME));
out:;
}

Expand Down Expand Up @@ -574,7 +574,9 @@ int rk_headset_adc_resume(struct platform_device *pdev)
DBG("%s----%d\n",__FUNCTION__,__LINE__);
// enable_irq(headset_info->irq[HEADSET]);
// if(headset_info->isMic)
// mod_timer(&headset_info->hook_timer, jiffies + msecs_to_jiffies(1500));
// mod_timer(&headset_info->hook_timer, jiffies + msecs_to_jiffies(1500));
if(headset_info->headset_status = HEADSET_IN)
schedule_delayed_work(&headset_info->hook_work, msecs_to_jiffies(HOOK_ADC_SAMPLE_TIME));
return 0;
}

Expand Down