예제 #1
0
void win_otaset_turn_frntend(void)
{
	UINT8 back_saved;
	S_NODE s_node;
	T_NODE t_node;
	
	win_otaset_get_FreqSymbPid_display();

	cur_tuner_idx = OTA_TUNER_IDX;

#ifdef _BUILD_OTA_E_
	MEMCPY(&s_node, &m_ota_cfg.s_node, sizeof(s_node));
#else
	get_tuner_sat(OTA_TUNER_IDX, ota_satpos, &s_node);

	MEMCPY(&m_ota_cfg.s_node, &s_node, sizeof(s_node));
	t_node.frq = ota_freq;
	t_node.sym = ota_symb;
	t_node.pol = ota_pol;
	MEMCPY(&m_ota_cfg.t_node, &t_node, sizeof(t_node));
#endif	

#ifndef NEW_DEMO_FRAME
	struct xpond_antenna_info	xai;
	
	sat2antenna_ext(&s_node, &xai.antenna,OTA_TUNER_IDX);
	xai.xpond.frq = ota_freq;
	xai.xpond.sym = ota_symb;
	xai.xpond.pol = ota_pol;
	UIChChgSetAntennaXpond(&xai);
#else
	struct ft_antenna antenna;
	union ft_xpond xponder;
	struct nim_device *nim = NULL;

#ifdef SUPPORT_SELECT_SAME_SAT	
	cur_tuner_idx =s_node.reserve_1; //s_node.tuner1_valid ? 0 : 1;
#else
	cur_tuner_idx = s_node.tuner1_valid ? 0 : 1;
#endif

	MEMSET(&antenna, 0, sizeof(struct ft_antenna));
	MEMSET(&xponder, 0, sizeof(union ft_xpond));
	sat2antenna(&s_node, &antenna);	
	xponder.s_info.type = FRONTEND_TYPE_S;
	xponder.s_info.frq = ota_freq;
	xponder.s_info.sym = ota_symb;
	xponder.s_info.pol = ota_pol;
#ifdef SUPPORT_SELECT_SAME_SAT
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, ((s_node.reserve_1 == 0)? 0 : ((s_node.reserve_1 == 1) ? 1 : 0)));
#else
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, (s_node.tuner1_valid ? 0 : (s_node.tuner2_valid ? 1 : 0)));
#endif

	frontend_tuning(nim, &antenna, &xponder, 1);
    if(0 == cur_tuner_idx) //TUNER1 <--> TSI_TS_A <--> DMX0
    {
        tsi_dmx_src_select(TSI_DMX_0,TSI_TS_A);
        tsi_select(TSI_TS_A,TSI_SPI_0);
    }
    else//TUNER2 <--> TSI_TS_B <--> DMX0
    {
        tsi_dmx_src_select(TSI_DMX_0,TSI_TS_B);
        tsi_select(TSI_TS_B, TSI_SPI_1);
    }
#endif
	
	wincom_dish_move_popup_open(ota_presat_id,s_node.sat_id,cur_tuner_idx,&back_saved);
	ota_presat_id = s_node.sat_id;
예제 #2
0
static void win_tplist_tuner_frontend(void)
{
	S_NODE s_node;
	T_NODE t_node;
#ifdef NEW_DEMO_FRAME
	struct ft_antenna antenna;
	union ft_xpond	xpond_info;
	struct nim_device *nim = NULL;
#else
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;
#endif

	OBJLIST* ol;
	UINT32 tp_idx;
    UINT16 pre_sat_id,cur_sat_id;
	UINT8 back_saved;
    BOOL old_get_key;

    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
    ap_set_key_notify_proc(win_tplist_key_notify_proc);
    old_get_key = ap_enable_key_task_get_key(TRUE);

    win_signal_set_level_quality(0, 0, 0);
    win_signal_update();
	OSD_UpdateVscr(OSD_GetTaskVscr(osal_task_get_current_id()));

	ol = &tplst_olist;

	tp_idx = OSD_GetObjListCurPoint(ol);
	
	get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx,&s_node);
	get_tp_at(s_node.sat_id,tp_idx,&t_node);

#ifdef SUPPORT_TWO_TUNER
#ifdef SUPPORT_SELECT_SAME_SAT
	cur_tuner_idx = s_node.reserve_1; //antset_cur_tuner;//s_node.tuner1_valid? 0 : 1;
#else
	cur_tuner_idx = s_node.tuner1_valid? 0 : 1;
#endif
#endif

#ifndef NEW_DEMO_FRAME
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;

	sat2antenna_ext(&s_node, &antenna,cur_tuner_idx);
	xpond_info.frq = t_node.frq;
	xpond_info.sym = t_node.sym;
	xpond_info.pol = t_node.pol;

	set_antenna(&antenna);
	set_xpond(&xpond_info);
#else
	MEMSET(&antenna, 0, sizeof(struct ft_antenna));
	MEMSET(&xpond_info, 0, sizeof(union ft_xpond));
	sat2antenna(&s_node, &antenna);	
	xpond_info.s_info.type = FRONTEND_TYPE_S;
	xpond_info.s_info.frq = t_node.frq;
	xpond_info.s_info.sym = t_node.sym;
	xpond_info.s_info.pol = t_node.pol;
	xpond_info.s_info.tp_id = t_node.tp_id;
#ifdef SUPPORT_SELECT_SAME_SAT
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, ((s_node.reserve_1 == 0)? 0 : ((s_node.reserve_1 == 1) ? 1 : 0)));
#else
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, (s_node.tuner1_valid ? 0 : (s_node.tuner2_valid ? 1 : 0)));
#endif
	
	frontend_tuning(nim, &antenna, &xpond_info, 1);
	
#endif
    
    if(pre_tp_sat_idx != cur_tp_sat_idx)
    {
		get_tuner_sat(TUNER_EITHER, pre_tp_sat_idx, &s_node);			
		pre_sat_id = s_node.sat_id;

		get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node);			
		cur_sat_id = s_node.sat_id;
    
		wincom_dish_move_popup_open(/*pre_sat_id*/0xFFFF,cur_sat_id,cur_tuner_idx,&back_saved);
        pre_tp_sat_idx = cur_tp_sat_idx;
    }

    ap_enable_key_task_get_key(old_get_key);
    ap_set_key_notify_proc(NULL);
    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
}