/*====================================================================
FUNCTION       mtv319_reconfig_n_ber
DESCRIPTION 
DEPENDENCIES
RETURN VALUE
SIDE EFFECTS
======================================================================*/
void mtv319_get_ber(tdmb_bb_sig_type *psigs)
{
  int rssi;

  //TDMB_MSG_RTV_BB("[%s]\n", __func__);

  rssi = (rtvTDMB_GetRSSI() / (int)RTV_TDMB_RSSI_DIVIDER);

  // 04/20 block
  //if(g_sync_status == RTV_TDMB_CHANNEL_LOCK_OK)// 채ë„� lock ?¼ë•Œë§?ê°’ì�„ ?½ì�Œ
      psigs->PCBER = rtvTDMB_GetCER();//(int)RTV_TDMB_CER_DIVIDER;
  //else
  //    psigs->PCBER = 20000;

  psigs->RSBER = rtvTDMB_GetPER();
  psigs->SNR = (rtvTDMB_GetCNR()/100);
  psigs->RSSI = mtv319_Ant_Level(psigs->PCBER);//rtvTDMB_GetCNR() / (int)RTV_TDMB_CNR_DIVIDER;
  psigs->RxPowerLevel = rssi;
  

  //TDMB_MSG_BB("[%s] pcber[%d], rssi[%d] snr[%d] rsber[%d]\n", __func__, psigs->PCBER, psigs->RSSI, psigs->SNR, psigs->RSBER);

#if (defined(FEATURE_TDMB_KERNEL_MSG_ON) && !defined(FEATURE_TS_PKT_MSG))
  TDMB_MSG_RTV_BB("[%s] Packet read Cnt[%d]\n", __func__, g_packet_read_cnt);

  g_packet_read_cnt = 0;
#endif /* FEATURE_TS_PKT_MSG */
}
static void mtv318_get_dm(struct tdmb_dm *info)
{
	if (mtv318_pwr_on == true && mtv318_on_air == true) {
		info->rssi = (rtvTDMB_GetRSSI() / RTV_TDMB_RSSI_DIVIDER);
		info->per = rtvTDMB_GetPER();
		info->ber = rtvTDMB_GetCER();
		info->antenna = rtvTDMB_GetAntennaLevel(info->ber);
	} else {
		info->rssi = 100;
		info->ber = 2000;
		info->per = 0;
		info->antenna = 0;
	}
}