changeset 56:b7046f3475b6

l1_cmplx.c: Cust_get_agc_from_IL() function prototype restored to TCS211 way
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 27 Mar 2016 06:27:29 +0000
parents 196a39d210aa
children ef8ab5a0fe8f
files chipsetsw/layer1/cfile/l1_cmplx.c chipsetsw/layer1/include/l1_proto.h
diffstat 2 files changed, 25 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_cmplx.c	Sun Mar 27 05:21:36 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_cmplx.c	Sun Mar 27 06:27:29 2016 +0000
@@ -1117,7 +1117,7 @@
     // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo
     lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
     // Get AGC to be applied.
-    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID, lna_off);
+    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -1125,7 +1125,7 @@
     // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
     // Get AGC to be applied.
-    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID, lna_off);
+    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID);
     
 #endif // #if (L1_FF_MULTIBAND == 0) else
 
@@ -1268,7 +1268,7 @@
   lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.nsync_fbsb.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
 
   // Get AGC to be applied.
-  agc = Cust_get_agc_from_IL(l1a_l1s_com.nsync_fbsb.radio_freq, l1a_l1s_com.last_input_level[l1a_l1s_com.nsync_fbsb.radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID, lna_off);
+  agc = Cust_get_agc_from_IL(l1a_l1s_com.nsync_fbsb.radio_freq, l1a_l1s_com.last_input_level[l1a_l1s_com.nsync_fbsb.radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -1280,7 +1280,7 @@
 
   // Get AGC to be applied.
   agc = 
-    Cust_get_agc_from_IL(l1a_l1s_com.nsync_fbsb.radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID, lna_off);
+    Cust_get_agc_from_IL(l1a_l1s_com.nsync_fbsb.radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID);
 
 #endif // #if (L1_FF_MULTIBAND == 0) else 
 
@@ -1527,7 +1527,7 @@
     // lna_off flag is ONLY updated in case of l1ctl_pgc2 control algorithm
     lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
     // Get AGC to be applied.
-    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID,lna_off);
+    agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 0 below
 
@@ -1537,7 +1537,7 @@
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
     // Get AGC to be applied.
     agc = 
-      Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID,lna_off);
+      Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID);
 
 #endif // #if (L1_FF_MULTIBAND == 0) else
 
@@ -1701,7 +1701,7 @@
     
     lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
     // agc is just computed from last stored IL
-    agc     = Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -1710,7 +1710,7 @@
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
     // agc is just computed from last stored IL
     agc     = 
-    Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID, lna_off);
+    Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID);
 
 #endif // #if (L1_FF_MULTIBAND == 1) else
 
@@ -1927,7 +1927,7 @@
     // agc is just computed from last stored IL
     input_level = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level;
     lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
-    agc     = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -1936,7 +1936,7 @@
     // agc is just computed from last stored IL
     input_level = l1a_l1s_com.last_input_level[operative_radio_freq].input_level;
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;    
-    agc     = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID, lna_off);    
+    agc     = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);    
 
 #endif // #if (L1_FF_MULTIBAND == 0) else
 
@@ -2193,7 +2193,7 @@
     // agc is set with the input_level computed from PAGC algo
     input_level =  l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level;
     lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
-    agc     = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -2201,7 +2201,7 @@
       l1_multiband_radio_freq_convert_into_operative_radio_freq(l1a_l1s_com.Scell_info.radio_freq); 
     input_level =  l1a_l1s_com.last_input_level[operative_radio_freq].input_level;
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
-    agc     = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID);
 
 
 #endif // #if (L1_FF_MULTIBAND == 0) else
@@ -2532,9 +2532,9 @@
       lna_off = IL_info_ptr->lna_off;
       // for SDCCH we use DPAGC algorithm.
 #if DPAGC_MAX_FLAG
-      agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, MAX_ID, lna_off);
+      agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, MAX_ID);
 #else
-      agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, AV_ID, lna_off);
+      agc = Cust_get_agc_from_IL(rx_radio_freq, IL_info_ptr->input_level >> 1, AV_ID);
 #endif
 
 
@@ -2556,7 +2556,7 @@
 
       input_level = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].input_level ;
       lna_off = l1a_l1s_com.last_input_level[rx_radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
-      agc     = Cust_get_agc_from_IL(rx_radio_freq, input_level >> 1, MAX_ID, lna_off);
+      agc     = Cust_get_agc_from_IL(rx_radio_freq, input_level >> 1, MAX_ID);
 
 
       // Store input_level and lna_off fields used for current CTRL in order to be able
@@ -2570,7 +2570,7 @@
 
       input_level = l1a_l1s_com.last_input_level[operative_radio_freq].input_level ;
       lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
-      agc     = Cust_get_agc_from_IL(rx_radio_freq, input_level >> 1, MAX_ID, lna_off);
+      agc     = Cust_get_agc_from_IL(rx_radio_freq, input_level >> 1, MAX_ID);
 
 
       // Store input_level and lna_off fields used for current CTRL in order to be able
@@ -3542,7 +3542,7 @@
 
     lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
     // agc is computed from PGC2 algo result.
-    agc     = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
 
 #else // L1_FF_MULTIBAND = 1 below
 
@@ -3551,7 +3551,7 @@
     lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
     input_level = l1a_l1s_com.last_input_level[operative_radio_freq].input_level;
     // agc is computed from PGC2 algo result.
-    agc     = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID, lna_off);
+    agc     = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, AV_ID);
 
 #endif // #if (L1_FF_MULTIBAND == 0) else
 
@@ -4239,9 +4239,9 @@
   lna_off = IL_info_ptr->lna_off;
   // for TCHTH we use DPAGC algorithm.
   #if DPAGC_MAX_FLAG
-    agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, MAX_ID, lna_off);
+    agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, MAX_ID);
   #else
-    agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID, lna_off);
+    agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);
   #endif
 
 
@@ -4825,9 +4825,9 @@
   lna_off = IL_info_ptr->lna_off;
   // for TCHTF we use DPAGC algorithm.
   #if DPAGC_MAX_FLAG
-    agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID, lna_off);
+    agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID);
   #else
-    agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID, lna_off);
+    agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID);
   #endif
 
 
@@ -5548,9 +5548,9 @@
       lna_off = IL_info_ptr->lna_off;
       // for TCHA we use DPAGC algorithm.
       #if DPAGC_MAX_FLAG
-        agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID, lna_off);
+        agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, MAX_ID);
       #else
-        agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID, lna_off);
+        agc = Cust_get_agc_from_IL(radio_freq, IL_info_ptr->input_level >> 1, AV_ID);
       #endif
 
 
--- a/chipsetsw/layer1/include/l1_proto.h	Sun Mar 27 05:21:36 2016 +0000
+++ b/chipsetsw/layer1/include/l1_proto.h	Sun Mar 27 06:27:29 2016 +0000
@@ -513,15 +513,7 @@
 //functions for customization
 void Cust_init_std         (void);
 void Cust_init_params      (void);
-/*
- * FreeCalypso Frankenstein: TCS211 version of Cust_get_agc_from_IL()
- * takes 3 arguments, but LoCosto adds a fourth.  The code in l1_cmplx.c
- * makes 4-argument calls throughout.  We'll add the fourth argument
- * to the prototype here, even while we are using the original TCS211
- * l1_cust object where this function is implemented: passing an extra
- * argument to a function that doesn't expect one is harmless.
- */
-WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id,UWORD8 lna_off_val);
+WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id);
 WORD8 l1ctl_encode_delta1  (UWORD16 radio_freq);
 WORD8 l1ctl_encode_delta2  (UWORD16 radio_freq);
 void Cust_get_ramp_tab     (API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq);