comparison chipsetsw/layer1/audio_cfile/l1audio_sync.c @ 268:67b777cee725

l1audio_sync.c: l1s_audio_manager() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 Mar 2017 05:53:30 +0000
parents 8d577190e377
children b6aef2688d6c
comparison
equal deleted inserted replaced
267:8d577190e377 268:67b777cee725
384 l1_audio_it_com = TRUE; 384 l1_audio_it_com = TRUE;
385 } 385 }
386 #endif 386 #endif
387 387
388 #if (MELODY_E1) 388 #if (MELODY_E1)
389 /* FreeCalypso: reconstructed from TCS211 object */
390 if (l1s.melody_e2.dsp_task == FALSE) {
389 // the melody0 task is activated? 391 // the melody0 task is activated?
390 if ((l1a_l1s_com.melody0_task.command.start) || 392 if ((l1a_l1s_com.melody0_task.command.start) ||
391 (l1s.audio_state[L1S_MELODY0_STATE] != 0)) 393 (l1s.audio_state[L1S_MELODY0_STATE] != 0))
392 { 394 {
393 l1s_melody0_manager(); 395 l1s_melody0_manager();
398 (l1s.audio_state[L1S_MELODY1_STATE] != 0)) 400 (l1s.audio_state[L1S_MELODY1_STATE] != 0))
399 { 401 {
400 l1s_melody1_manager(); 402 l1s_melody1_manager();
401 l1_audio_it_com = TRUE; 403 l1_audio_it_com = TRUE;
402 } 404 }
405 }
403 #endif 406 #endif
404 #if (VOICE_MEMO) 407 #if (VOICE_MEMO)
405 // the voicememo playing task is activated? 408 // the voicememo playing task is activated?
406 if ((l1a_l1s_com.voicememo_task.play.command.start) || 409 if ((l1a_l1s_com.voicememo_task.play.command.start) ||
407 (l1s.audio_state[L1S_VM_PLAY_STATE] != 0)) 410 (l1s.audio_state[L1S_VM_PLAY_STATE] != 0))
591 else 594 else
592 if (l1s.melody_e2.dsp_task) 595 if (l1s.melody_e2.dsp_task)
593 { 596 {
594 // The 2 melodies are stopped therefore the DSP must be 597 // The 2 melodies are stopped therefore the DSP must be
595 // stopped so the bit B_MELO must be reset. 598 // stopped so the bit B_MELO must be reset.
596 l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = MELODY_E2_SELECTED; 599
597 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (B_MELO | B_TONE); 600 /* FreeCalypso TCS211 reconstruction from disassembly */
598 601 if (l1s_dsp_com.dsp_ndb_ptr->d_toneskb_status & (B_MELO | B_TONE)) {
599 // Reset the flag to know if the DSP melody E2 task runs 602 if (!(l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init & (B_MELO|B_TONE))) {
600 l1s.melody_e2.dsp_task = FALSE; 603 l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = MELODY_E2_SELECTED;
601 604 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (B_MELO | B_TONE);
602 l1_audio_it_com = TRUE; 605 }
606 l1_audio_it_com = TRUE;
607 } else {
608 l1s.melody_e2.dsp_task = FALSE;
609 }
610 /* end of reconstructed section */
603 } 611 }
604 } 612 }
605 613
606 // the melody0 task is activated? 614 // the melody0 task is activated?
607 if ( (l1a_l1s_com.melody0_e2_task.command.start) || 615 if ( (l1a_l1s_com.melody0_e2_task.command.start) ||