Beispiel #1
0
UINT8 win_language_get_tvsys_num()
{
	UINT8 ID=OSD_GetFocusID((POBJECT_HEAD)&win_av_con);
	SYSTEM_DATA* p_sys_data=sys_data_get();
	UINT8 num=0;
	
	switch(ID)
	{
		case TVMODE_ID:
			num=get_tv_mode_count();
			break;
		case TVASPECT_ID:
			num=TV_RATIO_NCNT;
			break;
		case RFSYSTEM_ID:
			num=RF_MODE_NCNT;
			break;
		case RFCHAN_ID:
			num=rf_ch_range[p_sys_data->avset.rf_mode][1]-rf_ch_range[p_sys_data->avset.rf_mode][0]+1;
			break;
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
			num=HDMI_FMT_ITEM_NUM;
			break;
		case AUDIOOUT_ID:
			num=HDMI_AUD_ITEM_NUM;
			break;
#endif
	}
	return num;
}
Beispiel #2
0
UINT32 tvmode_osd_to_setting(UINT32 osd)
{
   	if (osd >= get_tv_mode_count())
   		osd = 0;

   	return get_tv_mode_set(osd);
}
Beispiel #3
0
static void win_av_load_tv_mode_setting(BOOL bDraw)
{
	MULTISEL * msel;	
	SYSTEM_DATA* sys_data;
	UINT32 i,sel,cnt;
	UINT32 focus = OSD_GetFocusID((POBJECT_HEAD)&win_av_con);

	sys_data = sys_data_get();

	/* TV MODE */
	msel = av_item_set[TVMODE_ID - 1];
	OSD_SetMultiselCount(msel, get_tv_mode_count());

	sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
	OSD_SetMultiselSel(msel, sel);
	if (bDraw)
	{
		if (focus == TVMODE_ID)
		{
			OSD_TrackObject((POBJECT_HEAD)av_items[TVMODE_ID - 1], C_UPDATE_ALL);
		}
		else
		{
			OSD_DrawObject((POBJECT_HEAD)av_items[TVMODE_ID - 1], C_UPDATE_ALL);
		}
	}

	/* Video Output */
	msel = av_item_set[VIDEOOUT_ID - 1];
#ifdef HDTV_SUPPORT
	if (sys_data_get_scart_out() == SCART_YUV)
	{
		sel = 0;
	}
	else
	{
		sel = 1;
	}
#else			
	sel = sys_data->avset.scart_out;
#endif
	OSD_SetMultiselSel(msel, sel);
	if (bDraw)
	{
		if (focus == VIDEOOUT_ID)
		{
			OSD_TrackObject((POBJECT_HEAD)av_items[VIDEOOUT_ID - 1], C_UPDATE_ALL);
		}
		else
		{
			OSD_DrawObject((POBJECT_HEAD)av_items[VIDEOOUT_ID - 1], C_UPDATE_ALL);
		}
	}
}
Beispiel #4
0
UINT8 win_language_get_tvsys_num()
{
	UINT8 ID=OSD_GetFocusID((POBJECT_HEAD)&win_av_con);
	SYSTEM_DATA* p_sys_data=sys_data_get();
	UINT8 num=0;
	
	switch(ID)
	{
		case TVMODE_ID:
			num=get_tv_mode_count();
			break;
		case TVASPECT_ID:

#ifdef HDMI_CERTIFICATION_UI
			if( check_tv_display_in_hd_mode() )
			{
				num= 1;	//16:9 Mode only
			}
			else
#endif
			{
				num=TV_RATIO_NCNT;
			}
			break;
		case VIDEOOUT_ID:
			num = VIDEOOUT_NCNT;
			break;
		case RFSYSTEM_ID:
			num=RF_MODE_NCNT;
			break;
		case RFCHAN_ID:
			num=rf_ch_range[p_sys_data->avset.rf_mode][1]-rf_ch_range[p_sys_data->avset.rf_mode][0]+1;
			break;
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
#ifdef HDMI_CERTIFICATION_UI
			if( check_hdmi_out_in_dvi_mode() )
			{
				num= 1;	// RGB out only
			}
			else
#endif
			{
				num=HDMI_FMT_ITEM_NUM;
			}
			break;
		case AUDIOOUT_ID:
			num=HDMI_AUD_ITEM_NUM;
			break;
#endif
	}
	return num;
}
Beispiel #5
0
UINT32 tvmode_setting_to_osd(UINT32 set)
{
	UINT32 i;
    UINT32 n = get_tv_mode_count();

	for (i = 0; i < n; i++)
	{
		if (set == get_tv_mode_set(i))
			break;
	}
	if(i == n)
		i = 0;

	return i;
}
Beispiel #6
0
UINT32 get_tv_mode_panel_next(UINT32 index)
{
	UINT32 tv_mode;

	// panel not resopnse by source or by Native tv.
	do
	{
		index = (index+1)%get_tv_mode_count();

		tv_mode = get_tv_mode_set(index);
		if(tv_mode !=TV_MODE_AUTO && tv_mode != TV_MODE_BY_EDID)
		{
			break;
		}
	}while(1);	
	
	return index;
}
Beispiel #7
0
void win_av_load_setting(void)
{
	MULTISEL * msel;	
	SYSTEM_DATA* sys_data;
	UINT32 i,sel,cnt,rf_mode;
	
	sys_data = sys_data_get();
	

	/* TV MODE */
	msel = av_item_set[TVMODE_ID - 1];
	OSD_SetMultiselCount(msel, get_tv_mode_count());

	sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
	OSD_SetMultiselSel(msel, sel);

	/* TV Aspect */
	msel = av_item_set[TVASPECT_ID - 1];
	sel = win_av_get_index(sys_data);
	OSD_SetMultiselSel(msel, sel);

	/* Video Output */
	msel = av_item_set[VIDEOOUT_ID - 1];
#ifdef HDTV_SUPPORT
	if (sys_data_get_scart_out() == SCART_YUV)
		sel = 0;
	else
		sel = 1;
#else			
	sel = sys_data->avset.scart_out;
#endif
	OSD_SetMultiselSel(msel, sel);

	/* VCR loopthrough */
	msel = av_item_set[VCR_ID - 1];
	if(sys_data->avset.scart_out == SCART_RGB)
		sel = 1;
	else
		sel = sys_data->vcrloopmode;
	OSD_SetMultiselSel(msel, sel);
	
	/* RF Mode */
	msel = av_item_set[RFSYSTEM_ID - 1];
	cnt = OSD_GetMultiselCount(msel);
	sel = sys_data->avset.rf_mode;
	if(sel >= cnt)
	{
		sel = 0;
		sys_data->avset.rf_mode = sel;
	}
	OSD_SetMultiselSel(msel, sel);
	rf_mode = sel;

	/* RF Channel */
	msel = av_item_set[RFCHAN_ID - 1];
	sel = sys_data->avset.rf_channel;
	if(sel < rf_ch_range[rf_mode][0] || sel> rf_ch_range[rf_mode][1])
	{
		sel =  rf_ch_range[rf_mode][0];
		sys_data->avset.rf_channel = sel;
		sys_data_set_rf(sys_data->avset.rf_mode,sys_data->avset.rf_channel);
	}
	OSD_SetMultiselSel(msel, sel);
	OSD_SetMultiselSelTable(msel, rf_ch_range[rf_mode]);

#ifdef HDTV_SUPPORT
	/* HDMI Video Out */
	msel = av_item_set[HDMIOUT_ID - 1];

	sel = sys_data->avset.video_format;
	OSD_SetMultiselSel(msel, sel);

	/* Digital Audio Out */
	msel = av_item_set[AUDIOOUT_ID - 1];

	sel = sys_data->avset.audio_output;
	OSD_SetMultiselSel(msel, sel);
#endif

#if (SUPPORT_DUAL_OUTPUT_ONOFF)
	/* Dual Output */
	msel = av_item_set[DUALOUT_ID- 1];

	sel = sys_data->avset.dual_output;
	OSD_SetMultiselSel(msel, sel);
#endif

}
Beispiel #8
0
static PRESULT av_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	UINT32 sel;
	UINT16* Uni_str;
	SYSTEM_DATA* sys_data;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;

	bID = OSD_GetObjID(pObj);
	sys_data = sys_data_get();
	switch(event)
	{
	case EVN_PRE_CHANGE://51
		sel = *((UINT32*)param1);
		break;
	case EVN_POST_CHANGE://52
		sel = param1;
		switch(bID)
		{
		case TVMODE_ID:
			sys_data->avset.tv_mode = tvmode_osd_to_setting(sel);
			api_video_set_tvout(sys_data->avset.tv_mode);	
			break;
		case TVASPECT_ID:
			win_av_set_ratio(sys_data,sel);
			sys_data_set_display_mode(&(sys_data->avset));			
			break;
		case VIDEOOUT_ID:
#ifdef HDTV_SUPPORT
            if (sel == 0)
				sys_data->avset.scart_out = SCART_YUV;
            else
				sys_data->avset.scart_out = SCART_RGB;
#else			
			sys_data->avset.scart_out = sel;
#endif
			if(sel == SCART_CVBS)
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(0);
#endif
			}
			else if(sel == SCART_RGB)
			{
				api_Scart_RGB_OnOff(1);
				//api_Svideo_OnOff(0);/*RGB output will cut off svideo output,ommit here*/
			}
			else
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(1);
#endif
			}
#if(SYS_MAIN_BOARD == BOARD_DB_M3602_04V01)
					system_config.avset.scart_out = sys_data->avset.scart_out;

					if(sel != 0) // RGB
					{		
						MULTISEL * msel;	
						if(TV_MODE_PAL != sys_data->avset.tv_mode || TV_MODE_NTSC358 != sys_data->avset.tv_mode)
						{
							sys_data->avset.tv_mode = TV_MODE_PAL;
							system_config.avset.tv_mode = TV_MODE_PAL;
						}
						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode_sd;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					else // YUV
					{
						MULTISEL * msel;

						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					api_video_set_tvout(sys_data->avset.tv_mode);
					g_rgb_yuv_changed = 0;
#endif
			win_av_set_vcrloop_action(TRUE);
			if(sys_data->avset.scart_out == SCART_RGB)
				api_Scart_OutPut_Switch(1);
			else
				api_Scart_OutPut_Switch(sys_data->vcrloopmode);			
			break;
		case VCR_ID:
			sys_data->vcrloopmode = sel;
			api_Scart_OutPut_Switch(sys_data->vcrloopmode );
			break;
		case RFSYSTEM_ID:
			sys_data->avset.rf_mode = sel;
			win_check_rf_channel(sys_data);
			OSD_SetMultiselSelTable(av_item_set[RFCHAN_ID - 1], rf_ch_range[sel]);
			
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;
		case RFCHAN_ID:
			sys_data->avset.rf_channel = sel;
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;		
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
			sys_data->avset.video_format = sel;
			sys_data_set_video_format(sys_data->avset.video_format);
			break;
		case AUDIOOUT_ID:
			sys_data->avset.audio_output = sel;
			sys_data_set_audio_output(sys_data->avset.audio_output);
			break;
#endif
#if (SUPPORT_DUAL_OUTPUT_ONOFF)
		case DUALOUT_ID:
			sys_data->avset.dual_output = sel;
			sys_data_set_dual_output(sys_data->avset.dual_output);
			break;
#endif
		}
 		
		break; 
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		switch(bID)
		{
		case TVMODE_ID:
			ComAscStr2Uni(get_tv_mode_string(sel), Uni_str);
			break;
		case TVASPECT_ID:
			ComAscStr2Uni(tv_ratio[sel], Uni_str);
			break;
#ifdef HDTV_SUPPORT
		case VIDEOOUT_ID:
			ComAscStr2Uni(video_output[sel], Uni_str);
			break;
#endif
//		case VCR_ID:			break;
		case RFSYSTEM_ID:
			ComAscStr2Uni(rf_mode_stings[sel], Uni_str);
			break;
//		case RFCHAN_ID:			break;		
		}
		break;
		
	case EVN_UNKNOWN_ACTION:
		win_av_enter_key(bID);
		
		break;
	}
 	return ret;
}