예제 #1
0
int tv_out_open(int mode)
{
    const  reg_t *s;

    if (TVOUT_VALID(mode))
    {
        tvmode = mode;

        s = tvregsTab[mode];

        while (MREG_END_MARKER != s->reg)
            setreg(s++);

	chip_version_init();
	
	tvoutc_setclk(mode);
	enable_vsync_interrupt();

        WRITE_MPEG_REG(VPP_POSTBLEND_H_SIZE, tvinfoTab[mode].xres);

	change_vdac_setting(0x120120, mode);

	set_disp_mode_auto(mode );
        return 0;
    }

    return -1;
}
예제 #2
0
파일: tvconf.c 프로젝트: 223xh/TestCode
static int tv_set_current_vmode(vmode_t mod)
{
    	vmode_t mode = mod&VMODE_MODE_BIT_MASK;
	//if (mode > VMODE_1080P_50HZ) {
	if (mode >= TVMODE_MAX) {
		amlog_mask_level(LOG_MASK_PARA, LOG_LEVEL_HIGH,"Invalid vmode: %d\n", mod);
		return -EINVAL;
	}

	info->vinfo = &tv_info[mode];
	if (mod & VMODE_LOGO_BIT_MASK)
		return 0;

	tvoutc_setmode(vmode_tvmode_tab[mode]);
	change_vdac_setting(get_current_vdac_setting(),mode);
	return 0;
}
/***************************************************
**
**	The first digit control component Y output DAC number
**	The 2nd digit control component U output DAC number
**	The 3rd digit control component V output DAC number
**	The 4th digit control composite CVBS output DAC number
**	The 5th digit control s-video Luma output DAC number
**	The 6th digit control s-video chroma output DAC number
** 	examble :
**		echo  120120 > /sys/class/display/vdac_setting
**		the first digit from the left side .	
******************************************************/
static void  parse_vdac_setting(char *para) 
{
	int  i;
	char  *pt=strstrip(para);
	int len=strlen(pt);
	u32  vdac_sequence=get_current_vdac_setting();
	
	amlog_mask_level(LOG_MASK_PARA,LOG_LEVEL_LOW,"origin vdac setting:0x%x,strlen:%d\n",vdac_sequence,len);
	if(len!=6)
	{
		amlog_mask_level(LOG_MASK_PARA,LOG_LEVEL_HIGH,"can't parse vdac settings\n");
		return ;
	}
	vdac_sequence=0;
	for(i=0;i<6;i++)
	{
		vdac_sequence<<=4;
		vdac_sequence|=*pt -'0';
		pt++;
	}
	amlog_mask_level(LOG_MASK_PARA,LOG_LEVEL_LOW,"current vdac setting:0x%x\n",vdac_sequence);
	
	change_vdac_setting(vdac_sequence,get_current_vmode());
}