bool _s5p_tv_if_init_hd_reg(void)
{
	struct s5p_tv_status *st = &s5ptv_status;
	bool timing_correction_en = st->hdmi_tg_cmd.timing_correction_en;
	bool bt656_sync_en = st->hdmi_tg_cmd.bt656_sync_en;
	bool tg_en;

	TVOUTIFPRINTK("audio type : %d, hdcp : %s)\n\r",
		st->hdmi_audio_type, st->hdcp_en ? "enabled" : "disabled");

/* C110_HDCP:
	if (st->hdcp_en) {
		if (!(st->hpd_status)) {
			TVOUTIFPRINTK("HPD is not detected\n\r");
			return false;
		}
	}
*/

	if (!_s5p_tv_if_init_hd_video_reg())
		return false;

	switch (st->hdmi_audio_type) {

	case HDMI_AUDIO_PCM:
		/* 
		* PCM, Samplingrate 44100, 16bit, 
		* ignore framesize cuz stream is PCM.
		*/
		__s5p_hdmi_audio_init(PCM, 44100, 16, 0); 
		break;

	case HDMI_AUDIO_NO:
		break;

	default:
		TVOUTIFPRINTK("invalid hdmi_audio_type(%d)\n\r",
			st->hdmi_audio_type);
		return false;
		break;
	}

	if (!__s5p_hdmi_start(st->hdmi_audio_type,
			      st->hdcp_en,
			      st->hdcp_i2c_client)) {
		return false;
	}

	st->hdmi_tg_cmd.tg_en = true;
	tg_en = st->hdmi_tg_cmd.tg_en;

	__s5p_hdmi_video_init_tg_cmd(timing_correction_en,
		bt656_sync_en, tg_en);

	return true;
}
bool _s5p_tv_if_init_hd_reg(void)
{
	s5p_tv_status *st = &s5ptv_status;
	
	TVOUTIFPRINTK("audio type : %d, hdcp : %s)\n\r", 
		st->hdmi_audio_type, st->hdcp_en ? "enabled":"disabled");

/* C110_HDCP: 
	if (st->hdcp_en) {
		if ( !(st->hpd_status)) {
			TVOUTIFPRINTK("HPD is not detected\n\r");
			return false;
		}
	}
*/

	if (!_s5p_tv_if_init_hd_video_reg())
		return false;

	switch (st->hdmi_audio_type) {

	case HDMI_AUDIO_PCM:
		/* 
		* PCM, Samplingrate 44100, 16bit, 
		* ignore framesize cuz stream is PCM.
		*/
		__s5p_hdmi_audio_init(PCM, 44100, 16, 0); 
		break;

	case HDMI_AUDIO_NO:
		break;

	default:
		TVOUTIFPRINTK("invalid hdmi_audio_type(%d)\n\r", 
			st->hdmi_audio_type);
		return false;
		break;
	}

/* C110_HDCP: */ //st->hpd_status = 1;

	__s5p_hdmi_stop();

	if (!__s5p_hdmi_start(st->hdmi_audio_type,
			      (st->hdcp_en && st->hpd_status),
			      st->hdcp_i2c_client)) {
		return false;
	}

	return true;
}