# HG changeset patch # User Mychaela Falconia # Date 1489384410 0 # Node ID 67b777cee725c53cd08203546fdd8fe383c922d6 # Parent 8d577190e3772414d6baf602f884b62bc393ba48 l1audio_sync.c: l1s_audio_manager() reconstructed diff -r 8d577190e377 -r 67b777cee725 chipsetsw/layer1/audio_cfile/l1audio_sync.c --- a/chipsetsw/layer1/audio_cfile/l1audio_sync.c Mon Mar 13 04:48:37 2017 +0000 +++ b/chipsetsw/layer1/audio_cfile/l1audio_sync.c Mon Mar 13 05:53:30 2017 +0000 @@ -386,6 +386,8 @@ #endif #if (MELODY_E1) + /* FreeCalypso: reconstructed from TCS211 object */ + if (l1s.melody_e2.dsp_task == FALSE) { // the melody0 task is activated? if ((l1a_l1s_com.melody0_task.command.start) || (l1s.audio_state[L1S_MELODY0_STATE] != 0)) @@ -400,6 +402,7 @@ l1s_melody1_manager(); l1_audio_it_com = TRUE; } + } #endif #if (VOICE_MEMO) // the voicememo playing task is activated? @@ -593,13 +596,18 @@ { // The 2 melodies are stopped therefore the DSP must be // stopped so the bit B_MELO must be reset. - l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = MELODY_E2_SELECTED; - l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (B_MELO | B_TONE); - - // Reset the flag to know if the DSP melody E2 task runs - l1s.melody_e2.dsp_task = FALSE; - - l1_audio_it_com = TRUE; + + /* FreeCalypso TCS211 reconstruction from disassembly */ + if (l1s_dsp_com.dsp_ndb_ptr->d_toneskb_status & (B_MELO | B_TONE)) { + if (!(l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init & (B_MELO|B_TONE))) { + l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = MELODY_E2_SELECTED; + l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (B_MELO | B_TONE); + } + l1_audio_it_com = TRUE; + } else { + l1s.melody_e2.dsp_task = FALSE; + } + /* end of reconstructed section */ } }