static int broadcast_dmb_power_on(void)
{
	int rc;
	rc = broadcast_drv_if_power_on();
	printk(KERN_DEBUG"[1seg]broadcast_dmb_power_on\n");
	return rc;
}
int	broadcast_drv_if_open(void)
{
	int rc = ERROR;
	
	Tcc353xStreamFormat_t streamFormat;
	int ret = 0;

	TcpalSemaphoreLock(&Tcc353xDrvSem);

#if defined (_USE_SEND_GOOD_SIGNAL_INFO_CHANGING_)
	Time_channel_tune = 0;
	Need_send_good_signal = 0;
#endif

	Tcc353xI2cOpen(0);
	ret = Tcc353xApiOpen(0, &Tcc353xOptionSingle, sizeof(Tcc353xOption_t));
	if (ret != TCC353X_RETURN_SUCCESS) {
		/* driver re-open routine */
		TcpalPrintErr((I08S *) "[1seg] TCC3530 Re-init (close & open)...\n");
		Tcc353xWrapperSafeClose ();

		/* re-open driver & power ctrl*/
		broadcast_drv_if_power_on();
		Tcc353xI2cOpen(0);
		ret = Tcc353xApiOpen(0, &Tcc353xOptionSingle, sizeof(Tcc353xOption_t));
		if (ret != TCC353X_RETURN_SUCCESS) {
			TcpalPrintErr((I08S *) "[1seg] TCC3530 Init Fail!!!\n");
			Tcc353xWrapperSafeClose ();
			TcpalSemaphoreUnLock(&Tcc353xDrvSem);
			return ERROR;
		}
	}

	streamFormat.pidFilterEnable = 0;
	streamFormat.syncByteFilterEnable = 1;
	streamFormat.tsErrorFilterEnable = 1;
	streamFormat.tsErrorInsertEnable = 1;
#if defined (_MODEL_TCC3535_) && defined (_TCC3535_ROM_MASK_VER_)
	ret = Tcc353xApiInit(0, NULL, 0, &streamFormat);
#else
	ret = Tcc353xApiInit(0, (I08U *)TCC353X_BOOT_DATA_ISDBT13SEG,
			     TCC353X_BOOT_SIZE_ISDBT13SEG, &streamFormat);
#endif
	if (ret != TCC353X_RETURN_SUCCESS) {
		TcpalPrintErr((I08S *) "[1seg] TCC3530 Init Fail!!!\n");
		Tcc353xWrapperSafeClose ();
		rc = ERROR;
	} else {
		TcpalPrintStatus((I08S *) "[1seg] TCC3530 Init Success!!!\n");
		rc = OK;
	}

	OnAir = 1;
	TcpalSemaphoreUnLock(&Tcc353xDrvSem);
	return rc;
}
static int broadcast_tdmb_power_on(void)
{
	int rc = ERROR;
		
	rc = broadcast_drv_if_power_on();

	broadcast_drv_if_user_stop( 0 );

	return rc;
}
Beispiel #4
0
int	broadcast_drv_if_open(void)
{
	int rc = ERROR;
	
	Tcc353xStreamFormat_t streamFormat;
	int ret = 0;

	TcpalSemaphoreLock(&Tcc353xDrvSem);

	Tcc353xTccspiOpen(0);
	ret = Tcc353xApiOpen(0, &Tcc353xOptionSingle, sizeof(Tcc353xOption_t));
	if (ret != TCC353X_RETURN_SUCCESS) {
		/* driver re-open routine */
		TcpalPrintErr((I08S *) "[1seg] TCC3530 Re-init (close & open)...\n");
		Tcc353xWrapperSafeClose ();

		/* re-open driver & power ctrl*/
		broadcast_drv_if_power_on();
		Tcc353xTccspiOpen(0);
		ret = Tcc353xApiOpen(0, &Tcc353xOptionSingle, sizeof(Tcc353xOption_t));
		if (ret != TCC353X_RETURN_SUCCESS) {
			TcpalPrintErr((I08S *) "[1seg] TCC3530 Init Fail!!!\n");
			Tcc353xWrapperSafeClose ();
			TcpalSemaphoreUnLock(&Tcc353xDrvSem);
			return ERROR;
		}
	}

	streamFormat.pidFilterEnable = 0;
	streamFormat.syncByteFilterEnable = 1;
	streamFormat.tsErrorFilterEnable = 1;
	streamFormat.tsErrorInsertEnable = 1;
	ret = Tcc353xApiInit(0, (I08U *)TCC353X_BOOT_DATA_ISDBT13SEG,
			     TCC353X_BOOT_SIZE_ISDBT13SEG, &streamFormat);
	if (ret != TCC353X_RETURN_SUCCESS) {
		TcpalPrintErr((I08S *) "[1seg] TCC3530 Init Fail!!!\n");
		Tcc353xWrapperSafeClose ();
		rc = ERROR;
	} else {
		Tcc353xStreamBufferInit(0);
		TcpalIrqEnable();
		TcpalPrintStatus((I08S *) "[1seg] TCC3530 Init Success!!!\n");
		rc = OK;
	}

	OnAir = 1;
	TcpalSemaphoreUnLock(&Tcc353xDrvSem);
	return rc;
}
static int broadcast_tdmb_power_on(void)
{
	int rc = ERROR;

//20130516_wonhee.jeong Code for revision separation [START]
#if defined (CONFIG_MACH_MSM8974_Z_KR)
	if(lge_get_board_revno() == HW_REV_A){
		rc = broadcast_drv_if_power_on_fci();
		broadcast_drv_if_user_stop_fci( 0 );
		return rc;
	}
#endif
//20130516_wonhee.jeong Code for revision separation [END]
	rc = broadcast_drv_if_power_on();
	broadcast_drv_if_user_stop( 0 );


	return rc;
}
static int broadcast_tdmb_power_on(void)
{
	int rc = ERROR;

//                                                          
#if defined (CONFIG_MACH_MSM8974_Z_KR)
	if(lge_get_board_revno() == HW_REV_A){
		rc = broadcast_drv_if_power_on_fci();
		broadcast_drv_if_user_stop_fci( 0 );
		return rc;
	}
#endif
//                                                        
	rc = broadcast_drv_if_power_on();
	broadcast_drv_if_user_stop( 0 );


	return rc;
}