FreeCalypso > hg > tcs211-l1-reconst
changeset 24:26666ef41058
l1_dyn_dwl_init.c compiles
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 22 Oct 2015 16:59:26 +0000 |
parents | 8f0ad3db1a0c |
children | 757ae82219de |
files | chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c |
diffstat | 2 files changed, 75 insertions(+), 441 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Thu Oct 22 07:39:06 2015 +0000 +++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Thu Oct 22 16:59:26 2015 +0000 @@ -67,10 +67,15 @@ const T_SIGNAL_PATCH signal_patch_array[NUM_OF_DYN_DWNLD_PRIMITIVES] = { {L1C_STOP_DEDICATED_DONE, 0}, + #if (L1_GTT == 1) + {MMI_GTT_START_REQ, 1}, + #endif {MPHC_IMMED_ASSIGN_REQ, 2}, + #if (MELODY_E2 == 1) {MMI_MELODY0_E2_START_REQ, 3}, {MMI_MELODY1_E2_START_REQ, 4}, {L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON, 5}, + #endif }; @@ -94,6 +99,7 @@ /* code at 0x86 */ l1a.dyn_dwnld.dedicated_stop_flag = TRUE; return; + #if (MELODY_E2 == 1) case MMI_MELODY0_E2_START_REQ: /* 0x182E */ /* code at 0x6c */ l1a.dyn_dwnld.melody0_E2_flag_activated = TRUE; @@ -129,6 +135,7 @@ /* code at 0x2e */ l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE; return; + #endif default: return; }
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c Thu Oct 22 07:39:06 2015 +0000 +++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c Thu Oct 22 16:59:26 2015 +0000 @@ -10,9 +10,9 @@ #include "l1_confg.h" #include "sys_types.h" #include "l1_types.h" -#include "l1audio_defty.h" +#include "l1audio_const.h" #include "l1audio_cust.h" -#include "l1audio_const.h" +#include "l1audio_defty.h" #include "l1_const.h" #include "l1tm_defty.h" @@ -38,7 +38,7 @@ #include "l1_defty.h" #include "cust_os.h" -#include "nu_main.h" +/* #include "nu_main.h" */ #include "l1audio_signa.h" #include "l1_varex.h" #include "l1_macro.h" @@ -46,100 +46,43 @@ #if (L1_DYN_DSP_DWNLD == 1) extern T_DYN_DWNLD_MCU_DSP *dyn_dwl_ndb; -#if ((CODE_VERSION == SIMULATION) || (((CHIPSET == 12) || (CHIPSET == 15)))) + +/* reconstructing from disassembly of TCS211 binary object */ + +/* patch ID mapping: + 0 = GPRS + 1 = AMR_SCH + 2 = TTY + 3 = AMR_MMS + 4 = E2 +*/ + const BOOL primitives_to_patch_matrix[NUM_OF_DYN_DWNLD_PRIMITIVES][MAX_NUM_OF_PATCH_IDS] = { -// MP3 MMS Melo E2 TTY Speech Acoustic AAC PCM -// MMI_GTT_START_REQ - {0, 0, 0, 1, 0, 0, 0}, -// MMI_TCH_VOCODER_CFG_REQ - {0, 0, 0, 0, 1, 0, 0}, -// MMI_MELODY0_E2_START_REQ - {0, 0, 1, 0, 0, 0, 0}, -// MMI_MELODY1_E2_START_REQ - {0, 0, 1, 0, 0, 0, 0}, -// MMI_MP3_START_REQ - {1, 0, 0, 0, 0, 0, 0}, -// MMI_VM_AMR_PLAY_START_REQ - {0, 1, 0, 0, 0, 0, 0}, -// MMI_VM_AMR_RECORD_START_REQ - {0, 1, 0, 0, 0, 0, 0}, -// MMI_AAC_START_REQ - {0, 0, 0, 0, 0, 1, 0}, -// MMI_PCM_DOWNLOAD_START_REQ - {0, 0, 0, 0, 0, 0, 1}, -// MMI_PCM_UPLOAD_START_REQ - {0, 0, 0, 0, 0, 0, 1} - }; +/* L1C_STOP_DEDICATED_DONE */ {1, 0, 0, 0, 0}, +/* MMI_GTT_START_REQ (?) */ {0, 0, 1, 0, 0}, +/* MPHC_IMMED_ASSIGN_REQ */ {0, 1, 0, 0, 0}, +/* MMI_MELODY0_E2_START_REQ */ {0, 0, 0, 0, 1}, +/* MMI_MELODY1_E2_START_REQ */ {0, 0, 0, 0, 1}, +/* L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON */ {0, 0, 0, 1, 0} +}; + const BOOL incompatibility_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_PATCH_IDS] ={ - -// MP3 MMS Melo E2 TTY Speech Acoustic AAC PCM -// MP3 - {0, 1, 1, 1, 1, 1, 1}, -// MMS - {1, 0, 1, 1, 1, 1, 1}, -// Melo E2 - {1, 1, 0, 1, 1, 1, 1}, -// TTY - {1, 1, 1, 0, 1, 1, 1}, -// Speech Acoustic - {1, 1, 1, 1, 0, 1, 0}, -// AAC - {1, 1, 1, 1, 1, 0, 1}, -// PCM - {1, 1, 1, 1, 0, 1, 0} - }; - + {0, 1, 1, 0, 0}, + {1, 0, 0, 0, 0}, + {0, 0, 0, 1, 1}, + {0, 0, 1, 0, 1}, + {0, 0, 1, 1, 0}, +}; const BOOL semaphore_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_SEMAPHORES] = { - -// MP3 SM VM AMR SM E2 SM ANR SM Speech Reco SM TTY SM WCM SM AAC SM PCM SM -// MP3 - {1, 0, 0, 0, 1, 0, 1, 1, 0}, -// MMS - {1, 1, 0, 0, 1, 0, 0, 1, 0}, -// Melo E2 - {1, 0, 1, 0, 1, 0, 0, 1, 0}, -// TTY - {1, 0, 0, 0, 1, 1, 0, 1, 0}, -// Speech Acoustic - {1, 0, 0, 1, 1, 0, 0, 1, 0}, -// AAC - {1, 0, 0, 0, 1, 0, 1, 1, 0}, -// PCM - {1, 0, 0, 0, 1, 0, 0, 1, 1} - }; -#elif (CHIPSET == 10 && BOARD == 35) -const BOOL primitives_to_patch_matrix[NUM_OF_DYN_DWNLD_PRIMITIVES][MAX_NUM_OF_PATCH_IDS] = { - -/* MMS TTY Speech Acoustic */ -/* MMI_GTT_START_REQ */ { 0, 1, 0}, -/* MMI_TCH_VOCODER_CFG_REQ */ { 0, 0, 1}, -/* MMI_VM_AMR_PLAY_START_REQ */ { 1, 0, 0}, -/* MMI_VM_AMR_RECORD_START_REQ */ { 1, 0, 0} - }; - -const BOOL incompatibility_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_PATCH_IDS] ={ - -/* MMS TTY Speech Acoustic */ -/* MMS */ { 0, 1, 1}, -/* TTY */ { 1, 0, 0}, -/* Speech Acoustic */ { 1, 0, 0} - }; - - -const BOOL semaphore_matrix[MAX_NUM_OF_PATCH_IDS][MAX_NUM_OF_SEMAPHORES] = { - -// VM AMR SM ANR SM Speech Reco SM TTY SM -// MMS - { 1, 0, 1, 0 }, -// TTY - { 0, 0, 1, 1, }, -// Speech Acoustic - { 0, 1, 1, 0 } - }; -#endif // CODE_VERSION == SIMULATION || ((CHIPSET == 12) || (CHIPSET == 15)) + {0, 0, 0, 0, 0, 1}, + {1, 0, 0, 0, 0, 1}, + {0, 1, 0, 0, 0, 1}, + {0, 0, 0, 1, 1, 1}, + {0, 0, 1, 0, 0, 1}, +}; UWORD32 dyn_dwnld_address_vect[MAX_NUM_OF_PATCH_IDS]; UWORD16 dyn_dwnld_crc_vect[MAX_NUM_OF_PATCH_IDS]; @@ -147,286 +90,13 @@ UWORD8 const *dyn_dwnld_copy_MCU_vect[MAX_NUM_OF_PATCH_IDS]; -#if (CODE_VERSION != SIMULATION && ((CHIPSET == 12) || (CHIPSET == 15))) - #if (L1_MP3 == 1) - extern const UWORD8 mp3_patch_array[]; - #endif - extern const UWORD8 amr_mms_patch_array[]; - #if (CHIPSET == 15) - // TODO: Just to avoid Compilation errors. - // Ideally E2 should be completely removed for Locosto - const UWORD8 e2_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - - /* size */ 0x0f, 0x00, 0x00, 0x00, - /* addr */ 0x05, 0x16, 0x00, 0x00, - 0xF8,0x10,0xF6,0x17,0x10,0xF0,0x03,0x00,0x45,0xF8,0x0F,0x16,0x74,0xF0,0x12,0x16, - 0x73,0xF0,0x11,0x16,0x74,0xF0,0x13,0x16,0x00,0xFC,0x00,0xFC,0x00,0xFC,0xAD,0xDE, - - /* Final record */ - /* size */ 0x00, 0x00, 0x00, 0x00, - /* Installation addr */ 0x05, 0x16, 0x00, 0x00, - /* Checksum */ 0x34, 0x03, - }; - #else - extern const UWORD8 e2_patch_array[]; - #endif - //extern const UWORD8 tty_patch_array[]; - extern const UWORD8 speech_acoustic_patch_array[]; -#if (L1_AAC == 1) - extern const UWORD8 aac_patch_array[]; -#endif -#if (L1_PCM_EXTRACTION == 1) - extern const UWORD8 pcm_patch_array[]; -#endif -#elif (CODE_VERSION != SIMULATION && CHIPSET == 10 && BOARD == 35) - extern const UWORD8 amr_mms_patch_array[]; -// extern const UWORD8 tty_patch_array[]; - extern const UWORD8 speech_acoustic_patch_array[]; -#elif (CODE_VERSION == SIMULATION) - const UWORD8 mp3_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xAA, 0xAA, 0x00, 0x00, - /* CRC */ 0xAA, 0xAA, 0x00, 0x00, - }; - const UWORD8 amr_mms_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xBB, 0xBB, 0x00, 0x00, - /* CRC */ 0xBB, 0xBB, 0x00, 0x00, - }; - const UWORD8 pcm_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xBB, 0xBB, 0x00, 0x00, - /* CRC */ 0xBB, 0xBB, 0x00, 0x00, - }; - const UWORD8 aac_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xCC, 0xCC, 0x00, 0x00, - /* CRC */ 0xCC, 0xCC, 0x00, 0x00, - }; - const UWORD8 tty_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xDD, 0xDD, 0x00, 0x00, - /* CRC */ 0xDD, 0xDD, 0x00, 0x00, - }; - const UWORD8 e2_patch_array[] = { -/* Tag */ 0x00, 0x00, 0x00, 0x00, -/* Vers */ 0x03, 0x00, 0x00, 0x00, - -/* size */ 0xab, 0x03, 0x00, 0x00, -/* addr */ 0x10, 0x64, 0x00, 0x00, +extern const UWORD8 amr_mms_patch_array[]; +extern const UWORD8 amr_sch_patch_array[]; +extern const UWORD8 e2_patch_array[]; +extern const UWORD8 gprs_patch_array[]; +extern const UWORD8 speech_acoustic_patch_array[]; +extern const UWORD8 tty_patch_array[]; -0xF8,0x76,0x66,0x58,0x00,0x00,0x00,0xFC,0xF8,0x60,0x66,0x58,0x00,0x00,0x20,0xF8, -0x23,0x64,0xF8,0x10,0x67,0x58,0xE3,0xF4,0xF8,0x76,0x66,0x58,0x01,0x00,0xF8,0x10, -0x6A,0x58,0xE3,0xF4,0x00,0xFC,0xF8,0x60,0x66,0x58,0x01,0x00,0x20,0xF8,0x37,0x64, -0xF8,0x10,0x69,0x58,0xE3,0xF4,0xF8,0x76,0x66,0x58,0x02,0x00,0x45,0xF8,0x37,0x64, -0xF8,0x76,0x66,0x58,0x01,0x00,0xF8,0x10,0x6A,0x58,0xE3,0xF4,0x00,0xFC,0xF8,0x60, -0x66,0x58,0x02,0x00,0x20,0xF8,0x48,0x64,0xF8,0x76,0x66,0x58,0x03,0x00,0xF8,0x10, -0x68,0x58,0xE3,0xF4,0xF8,0x60,0x66,0x58,0x01,0x00,0x30,0xF8,0x28,0x64,0x00,0xFC, -0xF8,0x60,0x66,0x58,0x05,0x00,0x30,0xF8,0x1C,0x64,0xF8,0x60,0x66,0x58,0x04,0x00, -0x30,0xF8,0x1C,0x64,0x00,0xFC,0xF8,0x76,0x66,0x58,0x01,0x00,0x00,0xFC,0xF8,0x76, -0x66,0x58,0x05,0x00,0x00,0xFC,0xF8,0x76,0x66,0x58,0x04,0x00,0x00,0xFC,0xBB,0xF7, -0xF8,0x10,0x4E,0x43,0xF8,0x08,0x4F,0x43,0xBB,0xF6,0x00,0xFC,0xBB,0xF7,0x20,0xF0, -0x14,0x64,0x74,0xF0,0xC3,0xAA,0xBB,0xF6,0x00,0xFC,0xF8,0x61,0x09,0x09,0x00,0x20, -0x20,0xF8,0x79,0x64,0x74,0xF0,0xF7,0xC4,0xF8,0x76,0x66,0x58,0x01,0x00,0x73,0xF0, -0x97,0x65,0xF8,0x60,0x66,0x58,0x05,0x00,0x20,0xF8,0xF7,0xC4,0xF8,0x76,0x66,0x58, -0x01,0x00,0xF8,0x10,0x6A,0x58,0xE2,0xF4,0x20,0xF0,0xEA,0x64,0x74,0xF0,0x8E,0x64, -0x00,0xFC,0x20,0xF0,0xCB,0x64,0x74,0xF0,0x8E,0x64,0x00,0xFC,0x06,0x4A,0x17,0x4A, -0x16,0x4A,0x11,0x4A,0x07,0x4A,0x1D,0x4A,0x06,0x77,0x00,0x00,0x07,0x77,0x00,0x69, -0xF8,0x68,0x1D,0x00,0xFC,0xFF,0xE3,0xF4,0x1D,0x8A,0x07,0x8A,0x11,0x8A,0x16,0x8A, -0x17,0x8A,0x06,0x8A,0x00,0xFC,0xF8,0x76,0x69,0x58,0x5F,0x64,0xF8,0x76,0x6A,0x58, -0x66,0x64,0xF8,0x76,0xCB,0x43,0x6D,0x64,0xE4,0xF4,0x10,0x77,0xA0,0x28,0x11,0x77, -0x00,0x28,0x12,0x72,0xBE,0x3F,0x00,0xE8,0x1A,0x77,0x9F,0x00,0x72,0xF2,0xBC,0x64, -0x19,0x77,0x5E,0x01,0x90,0x80,0x91,0x80,0xD2,0x80,0xE4,0xF4,0xF8,0x76,0x69,0x58, -0x84,0x64,0xF8,0x76,0x6A,0x58,0x89,0x64,0xF8,0x76,0x33,0x4C,0xFA,0x64,0xF8,0x76, -0x32,0x4C,0x6B,0x65,0x00,0xFC,0x11,0x4A,0xFC,0xEE,0x95,0xF4,0xBB,0xF7,0x03,0x76, -0x16,0x00,0x02,0x76,0x00,0x00,0x18,0x48,0x00,0xF0,0x02,0x00,0xF8,0x11,0x43,0x4C, -0x00,0x80,0x20,0xF0,0xD1,0x4B,0xE3,0xF5,0x11,0x88,0x95,0xF4,0x95,0xF4,0xE1,0x6C, -0xFF,0xFF,0xE5,0x64,0xF8,0x69,0xD5,0x08,0x00,0x04,0xBB,0xF6,0x95,0xF4,0x04,0xEE, -0x11,0x8A,0x00,0xFC,0xBB,0xF7,0xF8,0x10,0xD2,0x4B,0xF8,0x08,0xD1,0x4B,0x44,0xF8, -0xF6,0x64,0xBB,0xF6,0x95,0xF4,0x00,0xE8,0x73,0xF0,0xF9,0x64,0xBB,0xF6,0x95,0xF4, -0x01,0xE8,0x00,0xFC,0xFF,0xEE,0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x14,0x64,0xE3,0xF5, -0x01,0xEE,0x00,0xFC,0x11,0x4A,0xFE,0xEE,0xF8,0x61,0x09,0x09,0x01,0x00,0x20,0xF8, -0x48,0x65,0xF8,0x61,0x08,0x09,0x00,0x20,0x20,0xF8,0x41,0x65,0xF8,0x60,0x41,0x09, -0x03,0x00,0x20,0xF8,0x35,0x65,0xF8,0x61,0x09,0x09,0x00,0x20,0x30,0xF8,0x2D,0x65, -0xF8,0x69,0x09,0x09,0x00,0x20,0xF8,0x76,0x6B,0x58,0x00,0x00,0xF8,0x76,0x00,0x4C, -0x28,0x67,0xF8,0x76,0x6C,0x58,0x0D,0x66,0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x9F,0x65, -0xE3,0xF5,0x74,0xF0,0x10,0x64,0x73,0xF0,0x3E,0x65,0xF8,0x68,0x09,0x09,0xFE,0xDF, -0xF8,0x76,0x6B,0x58,0x01,0x00,0x73,0xF0,0x3E,0x65,0xF8,0x76,0xC3,0x3F,0x00,0x28, -0xF8,0x76,0xC4,0x3F,0xA0,0x28,0xF8,0x76,0x6C,0x58,0xC8,0x5D,0xF8,0x68,0x08,0x09, -0xFF,0xDF,0xF8,0x10,0x41,0x09,0x44,0xF8,0x48,0x65,0xF8,0x76,0x6C,0x58,0x98,0x71, -0x11,0x72,0xB9,0x4B,0x95,0xF4,0x81,0x10,0xF8,0x61,0x08,0x00,0x00,0x40,0x30,0xF8, -0x63,0x65,0xF8,0x61,0x08,0x00,0xFF,0x00,0x20,0xF8,0x63,0x65,0x11,0x72,0xB9,0x4B, -0x95,0xF4,0xE1,0x60,0x03,0x00,0x03,0x00,0x20,0xF8,0x63,0x65,0xF8,0x61,0xB0,0x3F, -0x02,0x00,0x30,0xF8,0x68,0x65,0x00,0x70,0xE5,0x4B,0x15,0xE8,0x74,0xF0,0x23,0xDC, -0x02,0xEE,0x11,0x8A,0x00,0xFC,0xFF,0xEE,0xF8,0x11,0x63,0x3F,0x15,0xE8,0xE3,0xF5, -0xF8,0x61,0x09,0x09,0x00,0x20,0x30,0xF8,0x88,0x65,0xF8,0x60,0x66,0x58,0x05,0x00, -0x30,0xF8,0x81,0x65,0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x35,0xE1,0xE3,0xF5,0x73,0xF0, -0x95,0x65,0xF8,0x76,0x66,0x58,0x01,0x00,0x74,0xF0,0xCB,0x64,0x73,0xF0,0x95,0x65, -0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x35,0xE1,0xE3,0xF5,0xF8,0x76,0x66,0x58,0x01,0x00, -0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x97,0x65,0xE3,0xF5,0x01,0xEE,0x00,0xFC,0xF8,0x76, -0x67,0x58,0x9F,0x65,0xF8,0x76,0x68,0x58,0xB8,0x65,0x73,0xF0,0x14,0x64,0xF8,0x68, -0xBF,0x3F,0xFF,0xF7,0xF8,0x69,0xBF,0x3F,0x00,0x10,0xF8,0x76,0xD2,0x56,0x01,0x00, -0xF8,0x76,0xCD,0x4F,0x01,0x00,0xF8,0x76,0x05,0x09,0x01,0x04,0xF8,0x76,0xD5,0x56, -0xFE,0xFF,0x81,0xF9,0x16,0xA3,0x80,0xF9,0x15,0x66,0x80,0xF9,0xAD,0x64,0x00,0xFC, -0xF8,0x60,0xD1,0x56,0x02,0x00,0x30,0xF8,0xFE,0x65,0xF8,0x60,0x00,0x15,0x00,0x00, -0x30,0xF8,0xDB,0x65,0xF8,0x10,0x00,0x15,0x93,0xF4,0xF8,0x18,0x01,0x15,0xF8,0x80, -0x01,0x15,0x01,0xE8,0x12,0x77,0xE5,0x55,0x10,0x77,0x0E,0x00,0x1A,0x77,0x0F,0x00, -0x72,0xF0,0xDA,0x65,0x40,0xF5,0xF8,0x19,0x00,0x15,0x4D,0xF8,0xD9,0x65,0x82,0x76, -0x00,0x00,0x61,0xF4,0xB2,0x6D,0xF8,0x76,0x00,0x15,0x00,0x00,0xF8,0x10,0x3C,0x15, -0x45,0xF8,0xFE,0x65,0xF8,0x6B,0xD5,0x56,0x01,0x00,0x81,0xF9,0x19,0xA3,0x74,0xF0, -0x53,0x64,0xF8,0x60,0xD5,0x56,0x0A,0x00,0x30,0xF8,0xFE,0x65,0xF8,0x60,0xD5,0x56, -0x16,0x00,0x30,0xF8,0xFE,0x65,0xF8,0x60,0xD5,0x56,0x20,0x00,0x20,0xF8,0x00,0x66, -0xF8,0x6B,0x3C,0x15,0xFF,0xFF,0xF8,0x76,0xD5,0x56,0xFE,0xFF,0x74,0xF0,0x57,0x64, -0xF8,0x10,0x6B,0x58,0x44,0xF9,0x05,0x66,0x00,0xFC,0xF8,0x68,0xBF,0x3F,0xFF,0xEF, -0x81,0xF9,0x1C,0xA3,0x74,0xF0,0x5B,0x64,0x00,0xFC,0xF8,0x60,0xD1,0x56,0x00,0x00, -0x30,0xF8,0x14,0x66,0x81,0xF9,0x1F,0xA3,0x00,0xFC,0x06,0x4A,0x07,0x4A,0x07,0x77, -0x00,0x23,0xAD,0xEA,0x95,0xF4,0x95,0xF4,0x7A,0x76,0x46,0x66,0x7B,0x76,0xC3,0x66, -0x7C,0x76,0xD8,0x66,0x79,0x76,0x3C,0x66,0xF8,0x76,0x00,0x15,0x00,0x00,0x13,0x77, -0xD8,0x55,0x93,0x76,0x14,0x00,0x93,0x76,0x11,0x00,0x93,0x76,0x0F,0x00,0x93,0x76, -0x0C,0x00,0x93,0x76,0x0A,0x00,0x93,0x76,0x07,0x00,0x93,0x76,0x05,0x00,0x83,0x76, -0x02,0x00,0x07,0x8A,0x06,0x8A,0xE4,0xF4,0xF8,0x4B,0xBE,0x3F,0xF8,0x76,0xBE,0x3F, -0x00,0x50,0x74,0xF0,0x94,0x67,0xF8,0x8B,0xBE,0x3F,0x00,0xFC,0x00,0xE8,0x08,0x8A, -0x10,0xF0,0x0D,0x00,0x44,0xF8,0x4E,0x66,0x56,0x44,0x40,0x4E,0x57,0x30,0x40,0x20, -0x76,0xF4,0x0E,0x88,0x59,0x20,0x00,0xF0,0x00,0x20,0x47,0x6F,0x62,0x0C,0x40,0x30, -0x5B,0x20,0x68,0x6F,0x6A,0x0C,0x5A,0x30,0x58,0x20,0x61,0xF4,0x0E,0x88,0x56,0x20, -0x79,0xF4,0x5F,0x80,0x45,0x62,0xA0,0x00,0x5F,0x08,0x42,0xF8,0x6B,0x66,0x47,0x10, -0x48,0x80,0x73,0xF0,0xA9,0x66,0x20,0xF1,0x00,0x04,0x86,0xF4,0x40,0x11,0x69,0xF7, -0x87,0xF4,0x09,0xF0,0x01,0x00,0x76,0xF5,0x68,0x6F,0x41,0x0C,0x87,0xF5,0x69,0x81, -0x1F,0xF6,0x0F,0xEC,0x69,0x1E,0x30,0xF0,0xFF,0xFF,0x95,0xF4,0x95,0xF4,0x45,0xFF, -0x00,0xF0,0x01,0x00,0x48,0x80,0x48,0x6F,0x5C,0x0D,0x47,0x09,0x4F,0xF8,0x8A,0x66, -0x47,0x10,0x48,0x80,0x5A,0x10,0x00,0xF0,0x01,0x00,0x60,0x80,0x60,0x30,0x40,0x20, -0x60,0x6F,0x9E,0x0C,0x60,0x30,0x66,0xF0,0x9A,0x01,0x77,0xF4,0x0F,0xEC,0x47,0x1E, -0x40,0xF5,0x5B,0x30,0x40,0x20,0x60,0x6F,0x9E,0x0C,0x60,0x30,0x66,0xF0,0x9A,0x01, -0x77,0xF4,0x0F,0xEC,0x48,0x1E,0x00,0xF5,0x30,0xF3,0xFF,0xFF,0x45,0x10,0x87,0xF5, -0x45,0x81,0x00,0xE8,0x4A,0x80,0x4B,0x80,0x49,0x80,0x42,0x4E,0x6E,0x76,0x01,0x00, -0x45,0x10,0x47,0xF8,0xC1,0x66,0x6E,0x76,0x00,0x00,0x5E,0x10,0xF8,0x1A,0x01,0x15, -0xF8,0x80,0x01,0x15,0x6D,0x71,0x16,0x00,0x62,0xE7,0x13,0x77,0xC0,0x56,0x0D,0xEC, -0x98,0xE5,0x17,0x8A,0x00,0xFC,0x56,0x6F,0x4A,0x0C,0x6C,0x6F,0x29,0x0C,0x61,0xF0, -0x01,0x00,0x46,0xF8,0xD2,0x66,0x68,0x76,0x00,0x00,0x56,0x6F,0x4A,0x0C,0x69,0x82, -0x73,0xF0,0x0E,0xA5,0x68,0x82,0x56,0x6F,0x0A,0x0C,0x69,0x82,0x73,0xF0,0x0E,0xA5, -0x42,0x56,0x67,0x45,0x80,0xF2,0x6C,0x6F,0x2F,0x0C,0x7A,0xF4,0x60,0xF0,0x01,0x00, -0xF8,0x82,0x10,0x00,0x95,0xF4,0x73,0xF0,0x6E,0xA5,0xF8,0x61,0x09,0x09,0x01,0x00, -0x20,0xF8,0x27,0x67,0xF8,0x61,0x08,0x09,0x00,0x20,0x20,0xF8,0x1F,0x67,0xF8,0x60, -0x41,0x09,0x03,0x00,0x20,0xF8,0x13,0x67,0xF8,0x61,0x09,0x09,0x00,0x20,0x20,0xF8, -0x04,0x67,0xF8,0x68,0x09,0x09,0xFF,0xDF,0xF8,0x68,0x09,0x09,0xFE,0xFF,0xF8,0x76, -0x6B,0x58,0x01,0x00,0x73,0xF0,0x1C,0x67,0xF8,0x69,0x09,0x09,0x00,0x20,0xF8,0x76, -0x6B,0x58,0x00,0x00,0xF8,0x76,0x6C,0x58,0x0D,0x66,0x74,0xF0,0x9F,0x65,0x74,0xF0, -0x10,0x64,0x73,0xF0,0x1C,0x67,0xF8,0x76,0xC4,0x3F,0xA0,0x28,0xF8,0x76,0xC3,0x3F, -0x00,0x28,0xF8,0x76,0x6C,0x58,0xC8,0x5D,0xF8,0x68,0x08,0x09,0xFF,0xDF,0xF8,0x60, -0x41,0x09,0x00,0x00,0x20,0xF8,0x27,0x67,0xF8,0x76,0x6C,0x58,0x98,0x71,0x00,0xFC, -0xF8,0x10,0x6C,0x58,0xE2,0xF4,0xF8,0x61,0x08,0x09,0x14,0x00,0x20,0xF8,0x32,0x67, -0x74,0xF0,0x10,0x64,0x00,0xFC,0xF8,0x76,0x6C,0x58,0x4F,0x67,0xF8,0x76,0x6D,0x58, -0x2B,0x67,0xF8,0x76,0x56,0x4C,0x02,0x65,0xF8,0x11,0x6B,0x58,0x10,0xF3,0x01,0x00, -0x4D,0xF8,0x46,0x67,0x74,0xF0,0x4F,0x67,0x73,0xF0,0x48,0x67,0x74,0xF0,0x49,0x67, -0x00,0xFC,0x74,0xF0,0x10,0x64,0xF8,0x76,0x00,0x4C,0x28,0x67,0x00,0xFC,0xF8,0x76, -0x6A,0x58,0xE5,0x66,0xF8,0x76,0xB3,0x43,0x28,0x67,0x80,0xF9,0xA3,0x64,0x20,0xF0, -0xBE,0x64,0x74,0xF0,0xBC,0x71,0x00,0xFC,0xF8,0x76,0x56,0x4C,0x8E,0x61,0xF8,0x11, -0x6B,0x58,0x10,0xF3,0x01,0x00,0x4D,0xF8,0x69,0x67,0x74,0xF0,0x6C,0x67,0x73,0xF0, -0x6B,0x67,0x74,0xF0,0x75,0x67,0x00,0xFC,0xF8,0x76,0x6A,0x58,0xEB,0x5A,0xF8,0x76, -0x6D,0x58,0xEB,0x5A,0xF8,0x76,0xB3,0x43,0xF7,0x5A,0xF8,0x76,0x6A,0x58,0xEB,0x5A, -0xF8,0x76,0x6D,0x58,0xEB,0x5A,0xF8,0x76,0x00,0x4C,0x98,0x71,0x00,0xFC,0x11,0x4A, -0x11,0x88,0x95,0xF4,0x95,0xF4,0x81,0x6C,0x8C,0x67,0xF8,0x11,0x5E,0x3F,0x20,0xF0, -0x33,0x67,0xE3,0xF5,0x73,0xF0,0x91,0x67,0xF8,0x11,0x5E,0x3F,0x20,0xF0,0x5C,0x67, -0xE3,0xF5,0x01,0xE8,0x11,0x8A,0x00,0xFC,0x06,0x4A,0x07,0x4A,0x9F,0xEA,0x07,0x77, -0x00,0x23,0xF8,0x10,0xCD,0x4F,0x45,0xF8,0xA2,0xFD,0x13,0x77,0xD8,0x4F,0x71,0xF0, -0x20,0x00,0x93,0x80,0x4D,0x80,0x20,0xF0,0x00,0x40,0x4E,0x80,0x4F,0x80,0xF8,0x10, -0x05,0x09,0x50,0x6F,0x68,0x0C,0x51,0x76,0x8F,0x02,0x52,0x76,0x66,0x66,0x55,0x76, -0x00,0x04,0x56,0x76,0x00,0x08,0x50,0x62,0x01,0x00,0x53,0x80,0x50,0x62,0x02,0x00, -0x54,0x80,0x73,0xF0,0xA2,0xFD, - -/* Final record */ 0xAD, 0xDE, -/* size */ 0x00, 0x00, 0x00, 0x00, -/* Installation addr */ 0x83, 0x5a, 0x00, 0x00, -/* Checksum */ 0x83, 0x5a, - }; - const UWORD8 speech_acoustic_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x0A, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, - /* CNTRL WORD*/ 0xAD, 0xDE, - /* size */ 0x0B, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, - /* CNTRL WORD*/ 0xAD, 0xDE, - /* size */ 0x28, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, - /* CNTRL WORD*/ 0xAD, 0xDE, - /* size */ 0x28, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - /* CNTRL WORD*/ 0xAD, 0xDE, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x55, 0x55, - /* CNTRL WORD*/ 0xAD, 0xDE, - /* Final record */ - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xEE, 0xEE, 0x00, 0x00, - /* CRC */ 0xEE, 0xEE, 0x00, 0x00, - }; -#endif // CODE_VERSION == SIMULATION - const UWORD8 tty_patch_array[] = { - /* Tag */ 0x00, 0x00, 0x00, 0x00, - /* Vers */ 0x03, 0x00, 0x00, 0x00, - /* size */ 0x01, 0x00, 0x00, 0x00, - /* addr */ 0xde, 0x07, 0x03, 0x00, - 0x0E,0x60, - /* Final record */ 0xAD, 0xDE, - /* size */ 0x00, 0x00, 0x00, 0x00, - /* addr */ 0xDD, 0xDD, 0x00, 0x00, - /* CRC */ 0xDD, 0xDD, 0x00, 0x00, - }; /*-------------------------------------------------------*/ /* l1_dyn_dwnld_initialize_var() */ /*-------------------------------------------------------*/ @@ -456,32 +126,23 @@ if(l1s_dsp_com.dsp_ndb_ptr->d_max_background<(C_BGD_DSP_DYN_DWNLD+1)) l1s_dsp_com.dsp_ndb_ptr->d_max_background=(API)(C_BGD_DSP_DYN_DWNLD+1); -#if (CODE_VERSION == SIMULATION || ((CHIPSET == 12) || (CHIPSET == 15))) - #if (L1_MP3 == 1) - dyn_dwnld_copy_MCU_vect[0] = mp3_patch_array; + + dyn_dwnld_copy_MCU_vect[0] = gprs_patch_array; + dyn_dwnld_copy_MCU_vect[1] = amr_sch_patch_array; + #if (L1_GTT == 1) + dyn_dwnld_copy_MCU_vect[2] = tty_patch_array; #endif - dyn_dwnld_copy_MCU_vect[1] = amr_mms_patch_array; - dyn_dwnld_copy_MCU_vect[2] = e2_patch_array; - dyn_dwnld_copy_MCU_vect[3] = tty_patch_array; - dyn_dwnld_copy_MCU_vect[4] = speech_acoustic_patch_array; -#if (L1_AAC == 1) - dyn_dwnld_copy_MCU_vect[5] = aac_patch_array; -#endif -#if (L1_PCM_EXTRACTION == 1) - dyn_dwnld_copy_MCU_vect[6] = pcm_patch_array; -#endif -#elif (CHIPSET == 10 && BOARD == 35) - dyn_dwnld_copy_MCU_vect[0] = amr_mms_patch_array; - dyn_dwnld_copy_MCU_vect[1] = tty_patch_array; - dyn_dwnld_copy_MCU_vect[2] = speech_acoustic_patch_array; -#endif + #if (MELODY_E2 == 1) + dyn_dwnld_copy_MCU_vect[3] = amr_mms_patch_array; + dyn_dwnld_copy_MCU_vect[4] = e2_patch_array; + #endif for(i=0;i<MAX_NUM_OF_PATCH_IDS;i++) { - if (dyn_dwnld_copy_MCU_vect[i] != 0) - { + if (dyn_dwnld_copy_MCU_vect[i] != 0) + { l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect,dyn_dwnld_copy_MCU_vect[i],i); - } + } } /*---------- Set L1A globals at phone init ----------------------------*/ @@ -497,53 +158,15 @@ /**************************************************/ // Compute number of current primitives defined via compilation switch - l1a.dyn_dwnld.num_of_primitives=0; -#if (CODE_VERSION == SIMULATION || ((CHIPSET == 12) || (CHIPSET == 15))) -#if (L1_GTT == 1) - l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_GTT -#if (L1_VOCODER_IF_CHANGE == 1) - l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_VOCODER_IF_CHANGE -#if (AUDIO_TASK == 1) -#if (MELODY_E2 == 1) - // Two primitves for MELODY E2 - l1a.dyn_dwnld.num_of_primitives+=2; -#endif // AUDIO_TASK -#endif // MELODY_E2 -#if (L1_MP3 == 1) + l1a.dyn_dwnld.num_of_primitives = 2; + #if (L1_GTT == 1) l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_MP3 -#if (AUDIO_TASK == 1) -#if (L1_VOICE_MEMO_AMR == 1) - // Two primitves for L1_VOICE_MEMO_AMR - l1a.dyn_dwnld.num_of_primitives+=2; -#endif // AUDIO_TASK -#endif // L1_VOICE_MEMO_AMR -#if (L1_AAC == 1) - l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_AAC -#if (L1_PCM_EXTRACTION == 1) - l1a.dyn_dwnld.num_of_primitives+=2; -#endif - - -#elif (CHIPSET == 10 && BOARD == 35) - -#if (L1_GTT == 1) - l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_GTT -#if (L1_VOCODER_IF_CHANGE == 1) - l1a.dyn_dwnld.num_of_primitives++; -#endif // L1_VOCODER_IF_CHANGE -#if (AUDIO_TASK == 1) -#if (L1_VOICE_MEMO_AMR == 1) - // Two primitves for L1_VOICE_MEMO_AMR - l1a.dyn_dwnld.num_of_primitives+=2; -#endif // AUDIO_TASK -#endif // L1_VOICE_MEMO_AMR -#endif // CHIPSET - + #endif // L1_GTT + #if (MELODY_E2 == 1) + // Two primitives for MELODY E2 + // FreeCalypso: apparently there are 3 in TCS211 + l1a.dyn_dwnld.num_of_primitives += 3; + #endif // MELODY_E2 for (i=l1a.dyn_dwnld.num_patches_installed;i<MAX_NUM_OF_PATCH_IDS;i++) { @@ -601,10 +224,14 @@ for (indx_loop = 0 ; indx_loop < MAX_NUM_OF_PATCH_IDS ; indx_loop++ ) { - l1a_apihisr_com.dyn_dwnld.uninstall_parameters.address[indx_loop] = 0; - l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[indx_loop].start_MCU_copy_address = 0; - l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[indx_loop].address_to_install = 0; - l1a_apihisr_com.dyn_dwnld.copy_parameters.patch_data[indx_loop].size_array = 0; + l1a_apihisr_com.dyn_dwnld.uninstall_parameters.address[indx_loop] + = 0; + l1a_apihisr_com.dyn_dwnld.copy_parameters.start_MCU_copy_address[indx_loop] + = 0; + l1a_apihisr_com.dyn_dwnld.copy_parameters.address_to_install[indx_loop] + = 0; + l1a_apihisr_com.dyn_dwnld.copy_parameters.size_array[indx_loop] + = 0; } l1a_apihisr_com.dyn_dwnld.copy_parameters.size_of_dwnld_area = 0;