FreeCalypso > hg > tcs211-l1-reconst
diff chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c @ 22:3358b8e6922f
l1_handle_particular_cases_for_TCS211() reconstructed
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Thu, 22 Oct 2015 06:18:50 +0000 |
parents | 0ec722728d69 |
children | 26666ef41058 |
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Wed Oct 21 22:55:18 2015 +0000 +++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c Thu Oct 22 06:18:50 2015 +0000 @@ -74,51 +74,63 @@ }; -/* l1_check_flag_for_download_area */ -/* Parameters : Signal Code of the message -// Return : none -// Description : Modify flag if needed to handle different download area when melody E2 is playing */ +/* + * LoCosto version of L1 has a function called l1_check_flag_for_download_area() + * here. TCS211 binary object has l1_handle_particular_cases_for_TCS211() + * instead. We are going to reconstruct the TCS211 function based on + * disassembly, using the LoCosto version as our starting point. + */ - -void l1_check_flag_for_download_area(UWORD32 msg_code) +void l1_handle_particular_cases_for_TCS211(UWORD32 msg_code, BOOL *return_flag) { switch(msg_code) { -#if (AUDIO_TASK == 1) -#if (MELODY_E2 == 1) - /* MELODY E2 case must be handled carefully: two melodies can be activated for E2: both trigger a dynamic download*/ - /* When one of the two is requested, the corresponding flag used afterwards when it is stopped is set */ - case MMI_MELODY0_E2_START_REQ: - { - - l1a.dyn_dwnld.melody0_E2_flag_activated = TRUE; - } - break; - case MMI_MELODY1_E2_START_REQ: - { - - l1a.dyn_dwnld.melody1_E2_flag_activated = TRUE; - } - break; - - /* When E2 is stopped the activated flag must be reset */ - - case L1_MELODY0_E2_STOP_CON: - { - - l1a.dyn_dwnld.melody0_E2_flag_activated = FALSE; - - } - break; - case L1_MELODY1_E2_STOP_CON: - { - - l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE; - - } - break; -#endif // MELODY_E2 == 1 -#endif // AUDIO_TASK == 1 + /* from disassembly */ + case MPHC_IMMED_ASSIGN_REQ: /* 0x0033 */ + /* code at 0x8e */ + l1a.dyn_dwnld.dedicated_stop_flag = FALSE; + return; + case L1C_STOP_DEDICATED_DONE: /* 0x0081 */ + /* code at 0x86 */ + l1a.dyn_dwnld.dedicated_stop_flag = TRUE; + return; + case MMI_MELODY0_E2_START_REQ: /* 0x182E */ + /* code at 0x6c */ + l1a.dyn_dwnld.melody0_E2_flag_activated = TRUE; + if (l1a.dyn_dwnld.melody1_E2_flag_activated == TRUE) { + /* code at 0x80 */ + *return_flag = FALSE; + return; + } + return; + case MMI_MELODY1_E2_START_REQ: /* 0x1832 */ + /* code at 0x56 */ + l1a.dyn_dwnld.melody1_E2_flag_activated = TRUE; + if (l1a.dyn_dwnld.melody0_E2_flag_activated == TRUE) { + /* code at 0x80 */ + *return_flag = FALSE; + return; + } + return; + case L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON: /* 0x1866 */ + /* code at 0x3e */ + if (l1a.dyn_dwnld.melody0_E2_flag_activated == TRUE || + l1a.dyn_dwnld.melody1_E2_flag_activated == TRUE) { + /* code at 0x80 */ + *return_flag = FALSE; + return; + } + return; + case L1_MELODY0_E2_STOP_CON: /* 0x1867 */ + /* code at 0x36 */ + l1a.dyn_dwnld.melody0_E2_flag_activated = FALSE; + return; + case L1_MELODY1_E2_STOP_CON: /* 0x1868 */ + /* code at 0x2e */ + l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE; + return; + default: + return; } } @@ -146,7 +158,7 @@ } - l1_check_flag_for_download_area(msg_code); + l1_handle_particular_cases_for_TCS211(msg_code, &return_flag); return return_flag; }