コード例 #1
0
void hdmi_sys_remove(struct hdmi *hdmi)
{
	int audio_need;

	audio_need = hdmi->edid.base_audio_support == 1 &&
			hdmi->edid.sink_hdmi == 1;

	fb_destroy_modelist(&hdmi->edid.modelist);
	kfree(hdmi->edid.audio);
	if (hdmi->edid.specs) {
		kfree(hdmi->edid.specs->modedb);
		kfree(hdmi->edid.specs);
	}
	memset(&hdmi->edid, 0, sizeof(struct hdmi_edid));
	INIT_LIST_HEAD(&hdmi->edid.modelist);
	hdmi->display = HDMI_DISABLE;
	if (hdmi->set_vif)
		hdmi->set_vif(hdmi, hdmi->lcdc->cur_screen, 0);
	rk_fb_switch_screen(hdmi->lcdc->cur_screen, 0, hdmi->lcdc->id);
	kobject_uevent_env(&hdmi->ddev->dev->kobj, KOBJ_REMOVE, envp);

#ifdef CONFIG_SWITCH
	if (audio_need ||
	    rk_fb_get_display_policy() == DISPLAY_POLICY_BOX)
		switch_set_state(&(hdmi->switch_hdmi), 0);
#endif
	rockchip_clear_system_status(SYS_STATUS_HDMI);
}
コード例 #2
0
ファイル: rk_hdmi_task.c プロジェクト: dersheng/rk3188_tablet
void hdmi_sys_remove(void)
{
	fb_destroy_modelist(&hdmi->edid.modelist);
	if(hdmi->edid.audio)
		kfree(hdmi->edid.audio);
	if(hdmi->edid.specs)
	{
		if(hdmi->edid.specs->modedb)
			kfree(hdmi->edid.specs->modedb);
		kfree(hdmi->edid.specs);
	}
	memset(&hdmi->edid, 0, sizeof(struct hdmi_edid));
	INIT_LIST_HEAD(&hdmi->edid.modelist);
	hdmi->display	= HDMI_DISABLE;
	if(hdmi->set_vif)
		hdmi->set_vif(hdmi->lcdc->screen1,0);
	rk_fb_switch_screen(hdmi->lcdc->screen1, 0, hdmi->lcdc->id);
	kobject_uevent_env(&hdmi->dev->kobj, KOBJ_REMOVE, envp);
	#ifdef CONFIG_SWITCH
	switch_set_state(&(hdmi->switch_hdmi), 0);
	#endif
	#ifdef CONFIG_RK_HDMI_CTL_CODEC
	codec_set_spk(1);
	fg_hdmi_open = 0;
	#endif
}
コード例 #3
0
static int tve_switch_fb(const struct fb_videomode *modedb, int enable)
{
	struct rk_screen *screen = &rk3036_tve->screen;

	if (modedb == NULL)
		return -1;

	memset(screen, 0, sizeof(struct rk_screen));
	/* screen type & face */
	if (rk3036_tve->test_mode)
		screen->type = SCREEN_TVOUT_TEST;
	else
		screen->type = SCREEN_TVOUT;
	screen->face = OUT_P888;
	screen->color_mode = COLOR_YCBCR;
	screen->mode = *modedb;

	/* Pin polarity */
	if (FB_SYNC_HOR_HIGH_ACT & modedb->sync)
		screen->pin_hsync = 1;
	else
		screen->pin_hsync = 0;
	if (FB_SYNC_VERT_HIGH_ACT & modedb->sync)
		screen->pin_vsync = 1;
	else
		screen->pin_vsync = 0;

	screen->pin_den = 0;
	screen->pin_dclk = 0;
	screen->pixelrepeat = 1;

	/* Swap rule */
	screen->swap_rb = 0;
	screen->swap_rg = 0;
	screen->swap_gb = 0;
	screen->swap_delta = 0;
	screen->swap_dumy = 0;

	/* Operation function*/
	screen->init = NULL;
	screen->standby = NULL;
	rk_fb_switch_screen(screen, enable, 0);

	if (enable) {
		if (screen->mode.yres == 480)
			tve_set_mode(TVOUT_CVBS_NTSC);
		else
			tve_set_mode(TVOUT_CVBS_PAL);
	}
	return 0;
}
コード例 #4
0
void hdmi_sys_remove(void)
{
    int audio_need;

    audio_need = hdmi->edid.base_audio_support == 1 &&  hdmi->edid.sink_hdmi == 1;

    fb_destroy_modelist(&hdmi->edid.modelist);
    if(hdmi->edid.audio)
        kfree(hdmi->edid.audio);
    if(hdmi->edid.specs)
    {
        if(hdmi->edid.specs->modedb)
            kfree(hdmi->edid.specs->modedb);
        kfree(hdmi->edid.specs);
    }
    memset(&hdmi->edid, 0, sizeof(struct hdmi_edid));
    INIT_LIST_HEAD(&hdmi->edid.modelist);
    hdmi->display	= HDMI_DISABLE;
    if(hdmi->set_vif)
        hdmi->set_vif(hdmi->lcdc->screen1,0);
    rk_fb_switch_screen(hdmi->lcdc->screen1, 0, hdmi->lcdc->id);
    kobject_uevent_env(&hdmi->dev->kobj, KOBJ_REMOVE, envp);

#ifdef CONFIG_SWITCH
    if(audio_need)
        switch_set_state(&(hdmi->switch_hdmi), 0);
#endif
#ifdef CONFIG_RK_HDMI_CTL_CODEC
#ifdef CONFIG_MACH_RK_FAC
#ifdef CONFIG_SND_RK29_SOC_ES8323
    es8323_codec_set_spk(1);
#endif
#ifdef CONFIG_SND_RK29_SOC_RT5616
    rt5616_codec_set_spk(1);
#endif
#ifdef CONFIG_SND_RK_SOC_RK616
    rk616_codec_set_spk(1);
#endif
#else
    codec_set_spk(1);
#endif
#endif
}
コード例 #5
0
ファイル: rk30_hdmi_task.c プロジェクト: qwerty97/src1
void hdmi_sys_remove(void)
{
	fb_destroy_modelist(&hdmi->edid.modelist);
	if(hdmi->edid.audio)
		kfree(hdmi->edid.audio);
	if(hdmi->edid.specs)
	{
		if(hdmi->edid.specs->modedb)
			kfree(hdmi->edid.specs->modedb);
		kfree(hdmi->edid.specs);
	}
	memset(&hdmi->edid, 0, sizeof(struct hdmi_edid));
	hdmi_init_modelist(hdmi);
	hdmi->display	= HDMI_DISABLE;
	rk_fb_switch_screen(hdmi->lcdc->screen, 0, HDMI_SOURCE_DEFAULT);
	hdmi_sys_send_uevent(KOBJ_REMOVE);
	#ifdef CONFIG_SWITCH
	switch_set_state(&(hdmi->switch_hdmi), 0);
	#endif
	#ifdef CONFIG_HDMI_RK30_CTL_CODEC
	codec_set_spk(1);
	#endif
}
コード例 #6
0
ファイル: ch7025.c プロジェクト: AndrewDB/rk3066-kernel
int ch7025_switch_fb(const struct fb_videomode *modedb, int mode)
{	
	struct rk29fb_screen *screen;
	
	if(modedb == NULL)
		return -1;
	screen =  kzalloc(sizeof(struct rk29fb_screen), GFP_KERNEL);
	if(screen == NULL)
		return -1;
	
	memset(screen, 0, sizeof(struct rk29fb_screen));	
	/* screen type & face */
    screen->type = SCREEN_HDMI;
	screen->mode = modedb->vmode;
	screen->face = modedb->flag;
	/* Screen size */
	screen->x_res = modedb->xres;
    screen->y_res = modedb->yres;

    /* Timing */
    screen->pixclock = modedb->pixclock;

	screen->lcdc_aclk = 500000000;
	screen->left_margin = modedb->left_margin;
	screen->right_margin = modedb->right_margin;
	screen->hsync_len = modedb->hsync_len;
	screen->upper_margin = modedb->upper_margin;
	screen->lower_margin = modedb->lower_margin;
	screen->vsync_len = modedb->vsync_len;

	/* Pin polarity */
	if(FB_SYNC_HOR_HIGH_ACT & modedb->sync)
		screen->pin_hsync = 1;
	else
		screen->pin_hsync = 0;
	if(FB_SYNC_VERT_HIGH_ACT & modedb->sync)
		screen->pin_vsync = 1;
	else
		screen->pin_vsync = 0;	
	screen->pin_den = 0;
	screen->pin_dclk = 1;

	/* Swap rule */
    screen->swap_rb = 0;
    screen->swap_rg = 0;
    screen->swap_gb = 0;
    screen->swap_delta = 0;
    screen->swap_dumy = 0;

    /* Operation function*/
    screen->init = NULL;
    screen->standby = NULL;	
	
	ch7025.mode = mode;
#ifdef CONFIG_ARCH_RK29    
   	FB_Switch_Screen(screen, 1);
#else
	rk_fb_switch_screen(screen, 1 , ch7025.video_source);
#endif
   	kfree(screen);
   	if(ch7025.io_switch_pin != INVALID_GPIO) {
   		if(mode < TVOUT_YPbPr_720x480p_60)
   			gpio_direction_output(ch7025.io_switch_pin, VIDEO_SWITCH_CVBS);
   		else
   			gpio_direction_output(ch7025.io_switch_pin, VIDEO_SWITCH_OTHER);
   	}
	return 0;
}