FreeCalypso > hg > tcs211-l1-reconst
changeset 92:3ef2a5f83a8e
l1_ctl.c: l1ctl_dpagc_amr() reconstructed
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 07 Apr 2016 14:53:25 +0000 |
parents | 51f3b9364365 |
children | a32bdc16491e |
files | chipsetsw/layer1/cfile/l1_ctl.c |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_ctl.c Thu Apr 07 14:46:04 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_ctl.c Thu Apr 07 14:53:25 2016 +0000 @@ -2716,7 +2716,9 @@ UWORD8 *tab_ptr, *tab_amr_ptr; T_DEDIC_SET *aset; WORD32 lna_value; - UWORD16 arfcn; + #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) + UWORD16 arfcn; + #endif UWORD8 lna_off; UWORD16 dco_algo_ctl_pw_temp = 0; UWORD8 if_ctl = 0; @@ -2766,11 +2768,13 @@ lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq); } -#if (L1_FF_MULTIBAND == 0) +#if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) +#if (L1_FF_MULTIBAND == 0) arfcn = Convert_l1_radio_freq(radio_freq); #else - arfcn=radio_freq; -#endif + arfcn = radio_freq; +#endif +#endif #if(RF_FAM == 61) #if (CODE_VERSION != SIMULATION) @@ -2789,7 +2793,7 @@ #endif if (0==pm) // Check and filter illegal pm value by using last valid IL - new_IL = IL_info_ptr->input_level; + new_IL = IL_info_ptr->input_level - lna_value; else new_IL = -(pm - (last_known_agc - delta_drp_gain) + lna_value - l1ctl_get_g_magic(radio_freq)); @@ -2891,7 +2895,8 @@ l1ctl_encode_lna( (UWORD8)(current_calibrated_IL>>1), &(IL_info_ptr->lna_off), radio_freq ); - IL_info_ptr->input_level = (UWORD8)new_IL ; + IL_info_ptr->input_level = (UWORD8)new_IL + l1ctl_get_lna_att(radio_freq) * + IL_info_ptr->lna_off; #if L2_L3_SIMUL #if (DEBUG_TRACE==BUFFER_TRACE_DPAGC)