changeset 23:8f0ad3db1a0c

l1_dyn_dwl_async.c compiles
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 22 Oct 2015 07:39:06 +0000
parents 3358b8e6922f
children 26666ef41058
files chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c
diffstat 1 files changed, 64 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c	Thu Oct 22 06:18:50 2015 +0000
+++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c	Thu Oct 22 07:39:06 2015 +0000
@@ -8,9 +8,6 @@
  ************* Revision Controle System Header *************/
 #include <stdio.h>
 #include <string.h>
-#if (OP_RIV_AUDIO == 1)
-  #include "rv/rv_general.h"
-#endif
 #include "nucleus.h"
 #include "l1_confg.h"
 #include "l1_types.h"
@@ -49,6 +46,10 @@
 #include "l1_trace.h"
 #include "sys_dma.h"
 
+#if (OP_RIV_AUDIO == 1)
+  #include "rv/rv_general.h"
+#endif
+
 
 #if (L1_DYN_DSP_DWNLD == 1)
 #if(CODE_VERSION == SIMULATION)
@@ -76,6 +77,7 @@
 /*                                                                                                         */
 /*---------------------------------------------------------------------------------------------------------*/
 
+#if 0
 void l1_patch_id2string(UWORD16 patch_id, char* vect)
 {
 
@@ -84,72 +86,73 @@
 
 #if ((CODE_VERSION == SIMULATION) || (((CHIPSET == 12) || (CHIPSET == 15))))  
     case MP3_PATCH:
-	  {
+    {
       vect[0] = 'M';
-	    vect[1] = 'P';
-	    vect[2] = '3';
-	    vect[3] = '\0';
-	  }
+      vect[1] = 'P';
+      vect[2] = '3';
+      vect[3] = '\0';
+    }
     break;
 #endif
     case MMS_PATCH:
-	  {
+    {
       vect[0] = 'M';
-	    vect[1] = 'M';
-	    vect[2] = 'S';
-	    vect[3] = '\0';
-	  }
+      vect[1] = 'M';
+      vect[2] = 'S';
+      vect[3] = '\0';
+    }
     break;
 
 #if ((CODE_VERSION == SIMULATION) || (((CHIPSET == 12) || (CHIPSET == 15))))
     case E2_PATCH:
-	  {
+    {
       vect[0] = 'E';
-	    vect[1] = '2';
-	    vect[2] = ' ';
-	    vect[3] = '\0';
-	  }
+      vect[1] = '2';
+      vect[2] = ' ';
+      vect[3] = '\0';
+    }
     break;
 #endif
     case TTY_PATCH:
-	  {
+    {
       vect[0] = 'T';
-	    vect[1] = 'T';
-	    vect[2] = 'Y';
-	    vect[3] = '\0';
-	  }
+      vect[1] = 'T';
+      vect[2] = 'Y';
+      vect[3] = '\0';
+    }
     break;
     case SPEECH_ACOUSTIC_PATCH:
-	  {
+    {
       vect[0] = 'A';
-	    vect[1] = 'N';
-	    vect[2] = 'R';
-	    vect[3] = '\0';
-	  }
+      vect[1] = 'N';
+      vect[2] = 'R';
+      vect[3] = '\0';
+    }
     break;
 #if ((CODE_VERSION == SIMULATION) || (CHIPSET == 12) || (CHIPSET == 15))
     case AAC_PATCH:
-	  {
-        vect[0] = 'A';
-	    vect[1] = 'A';
-	    vect[2] = 'C';
-	    vect[3] = '\0';
-	  }
+    {
+      vect[0] = 'A';
+      vect[1] = 'A';
+      vect[2] = 'C';
+      vect[3] = '\0';
+    }
     break;
 #endif
 #if ((CODE_VERSION == SIMULATION) || (CHIPSET == 12) || (CHIPSET == 15))
     case PCM_EXTRACTION_PATCH:
-	  {
-        vect[0] = 'P';
-	    vect[1] = 'C';
-	    vect[2] = 'M';
-	    vect[3] = '\0';
-	  }
+    {
+      vect[0] = 'P';
+      vect[1] = 'C';
+      vect[2] = 'M';
+      vect[3] = '\0';
+    }
     break;
 #endif
 
   }
 }
+#endif
 
 /*----------------------------------------------------------------------------------------*/
 /* l1_dynamic_download_manager                                                            */
@@ -263,9 +266,7 @@
         if((trace_info.current_config->l1_dyn_trace) & (1<<L1_DYN_TRACE_DYN_DWNLD))
         {
           char str[16];
-          char str2[4];
-          l1_patch_id2string(element, str2);
-          sprintf(str,"UNINST_ID: %4s \r\n",str2);
+          sprintf(str,"UNINST_ID: %d \r\n", element);
 #if(CODE_VERSION == SIMULATION)
           trace_fct_simu_dyn_dwnld(str);
 #else
@@ -330,9 +331,7 @@
       if((trace_info.current_config->l1_dyn_trace) & (1<<L1_DYN_TRACE_DYN_DWNLD))
       {
         char str[22];
-        char str2[4];
-        l1_patch_id2string(patch_id, str2);
-        sprintf(str,"DWNLD_ID: %4s \r\n",str2);
+        sprintf(str,"DWNLD_ID: %d \r\n", patch_id);
 
 #if(CODE_VERSION == SIMULATION)
         trace_fct_simu_dyn_dwnld(str);
@@ -343,10 +342,14 @@
 #endif    // (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
 
       // Set patch IDs addresses: copy source address and install address             
-      l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[i].start_MCU_copy_address=(UWORD32) dyn_dwnld_copy_MCU_vect[patch_id];
-      l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[i].address_to_install=dyn_dwnld_address_vect[patch_id];     
-      l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[i].crc = dyn_dwnld_crc_vect[patch_id];
-      l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[i].size_array = size_vect[patch_id];
+      l1a_apihisr_com.dyn_dwnld.copy_parameters.start_MCU_copy_address[i] =
+	  (UWORD32) dyn_dwnld_copy_MCU_vect[patch_id];
+      l1a_apihisr_com.dyn_dwnld.copy_parameters.address_to_install[i] =
+	  dyn_dwnld_address_vect[patch_id];     
+      l1a_apihisr_com.dyn_dwnld.copy_parameters.crc[i] =
+	  dyn_dwnld_crc_vect[patch_id];
+      l1a_apihisr_com.dyn_dwnld.copy_parameters.size_array[i] =
+	  size_vect[patch_id];
     }
 
    //-----------------------------------------
@@ -383,7 +386,7 @@
 void l1a_dyn_dwnld_set_process(void)
 {
 
-  #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
+#if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
   // Disable trace DSP upon Dynamic Download activation
   l1_disable_dsp_trace();
 #endif
@@ -690,26 +693,26 @@
       case WAIT_STOP:
       {
         /* In case of a primitive which triggers a dynamic download arrives we must start over */
-		if (l1_does_the_incoming_primitive_trigger_dynamic_dwnld(SignalCode,TRUE) == TRUE)
-		{
+	if (l1_does_the_incoming_primitive_trigger_dynamic_dwnld(SignalCode,TRUE) == TRUE)
+	{
           /* Run the dynamic download manager */
           if (l1_dynamic_download_manager(SignalCode, FALSE) == TRUE)
-		  {
+	  {
             /* Initialisation of dynamic download process */
             l1a_dyn_dwnld_set_process();
-         
+
             // Change state
             *state=WAIT_RESULT;
-		  }
-		}
-		else if (SignalCode == L1_DYN_DWNLD_STOP_CON)
-		{
+	  }
+	}
+	else if (SignalCode == L1_DYN_DWNLD_STOP_CON)
+	{
           // DYN DWNLD HISR must be deactivated
           l1_apihisr.dyn_dwnld.running=FALSE;
           // Change state
           *state=RESET;	
-		} 		
-		return;		
+	} 		
+	return;		
       }
 //omaps00090550      break;
     }