Example #1
0
static int headset_resume(struct platform_device *pdev)
{
//20101117, [email protected], gpio wakeup from LP1 [START]
    if(core_lock_on && headset_vdd_address){
        NvOdmServicesPmuSetVoltage(headset_h_pmu, headset_vdd_address, NVODM_VOLTAGE_OFF, NULL);
    } 
    suspend_status = 0;
//20101117, [email protected], gpio wakeup from LP1 [END]

	 //[email protected] 20110726 detecting headset when resuming [START]
	 star_Mic_bias(1);
	 headset_det_work(&headset_sw_data->work);
	 //[email protected] 20110726 detecting headset when resuming [END]
    
    if(core_lock_on){
        lprintk(D_AUDIO, KERN_ERR "##(Headset_det.c)## headset_resume()!! wakeup form LP1 headset detect\n");
                
        input_report_key(headset_sw_data->ip_dev_wake, KEY_VOLUMEDOWN, 1);
        input_sync(headset_sw_data->ip_dev_wake);
        input_report_key(headset_sw_data->ip_dev_wake, KEY_VOLUMEDOWN, 0);
		input_sync(headset_sw_data->ip_dev_wake);
        
//P990_IFX_GB_PORTING_LGSI_START
#if !defined (STAR_OPERATOR_FIDO)
	  cancel_delayed_work_sync(&headset_sw_data->delayed_work); //20111017 [email protected] Problem that no wake up when disconn headset in calling
#endif
//P990_IFX_GB_PORTING_LGSI_END
	  
        schedule_delayed_work(&headset_sw_data->delayed_work,	msecs_to_jiffies(300));	
    }
    
	return 0;
}
Example #2
0
static int headset_resume(struct platform_device *pdev)
{
//20101117, , gpio wakeup from LP1 [START]
    if(core_lock_on && headset_vdd_address){
        NvOdmServicesPmuSetVoltage(headset_h_pmu, headset_vdd_address, NVODM_VOLTAGE_OFF, NULL);
    } 
    suspend_status = 0;
//20101117, , gpio wakeup from LP1 [END]


	// 20110726 detecting headset when resuming [START]
	 star_Mic_bias(1);
	 headset_det_work(&headset_sw_data->work);
    // 20110726 detecting headset when resuming [END]
    
    if(core_lock_on){
        lprintk(D_AUDIO, KERN_ERR "##(Headset_det.c)## headset_resume()!! wakeup form LP1 headset detect\n");
                
        input_report_key(headset_sw_data->ip_dev_wake, KEY_VOLUMEDOWN, 1);
        input_sync(headset_sw_data->ip_dev_wake);
        input_report_key(headset_sw_data->ip_dev_wake, KEY_VOLUMEDOWN, 0);
		input_sync(headset_sw_data->ip_dev_wake);
        
        schedule_delayed_work(&headset_sw_data->delayed_work,	msecs_to_jiffies(300));	
    }
    
	return 0;
}