void dtvd_tuner_state_com_watch_timer_stop( void ) { dtvd_tuner_timer_stop( D_DTVD_TUNER_TIMER_WATCH_STATE ); return; }
void dtvd_tuner_autoeco_mtx_003_msg_core_stop_omt( void ) { DTVD_DEBUG_MSG_ENTER( 0, 0, 0 ); dtvd_tuner_timer_stop( D_DTVD_TUNER_TIMER_WATCH_AUTOECO_OMT ); tdtvd_tuner_autoeco.autoeco_flg = D_DTVD_TUNER_OFF; dtvd_tuner_autoeco_com_set_status( D_DTVD_TUNER_AUTOECO_001 ); DTVD_DEBUG_MSG_EXIT(); return; }
void dtvd_tuner_timer_start ( unsigned long funcid, unsigned int count ) { unsigned long data; volatile unsigned long temp_jiffies; unsigned long main_exp; unsigned long sub_exp; DTVD_TUNER_TIMER_t *timer_info = &tdtvd_tuner_main.timer; DTVD_DEBUG_MSG_ENTER( (int)funcid, count, 0 ); if( funcid >= D_DTVD_TUNER_TIMER_MAX ) { DTVD_TUNER_SYSERR_RANK_A( D_DTVD_TUNER_SYSERR_DRV_PARAM, DTVD_TUNER_TIMER, funcid, count, 0, 0, 0, 0 ); return; } dtvd_tuner_timer_stop( funcid ); if( timer_info->timer_id < D_DTVD_TUNER_TIMER_TIMERID_MAX ) { timer_info->timer_id++; } else { timer_info->timer_id = 1; } data = timer_info->timer_id; data = data | ( (unsigned long)D_DTVD_TUNER_TIMER_KIND_START_BIT << funcid ); if( count == 0 ) { timer_info->list[funcid].state = D_DTVD_TUNER_TIMER_RUN; #ifdef DTVD_NO_HRTIMER timer_info->list[funcid].info.data = data; #else timer_info->list[funcid].data = data; #endif dtvd_tuner_timer_handler( data ); return; } temp_jiffies = jiffies; #ifdef DTVD_NO_HRTIMER sub_exp = count % 10; main_exp = count / 10; main_exp *= 10; timer_info->list[funcid].info.expires = temp_jiffies + ( HZ * main_exp / 1000 ); timer_info->list[funcid].info.data = data; timer_info->list[funcid].info.function = dtvd_tuner_timer_handler; add_timer( &timer_info->list[funcid].info ); #else sub_exp = count % 1000; main_exp = count / 1000; timer_info->list[funcid].data = data; hrtimer_start( &timer_info->list[funcid].info, ktime_set(main_exp,sub_exp * NSEC_PER_MSEC ), HRTIMER_MODE_REL); #endif timer_info->list[funcid].state = D_DTVD_TUNER_TIMER_RUN; DTVD_DEBUG_MSG_EXIT(); return; }