comparison chipsetsw/layer1/audio_cfile/l1audio_sync.c @ 274:fd5ae803a73e

l1audio_sync.c: l1s_vm_amr_play_manager() reconstructed
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 Mar 2017 17:44:10 +0000
parents a19a9953eec2
children b679dd326f4d
comparison
equal deleted inserted replaced
273:a19a9953eec2 274:fd5ae803a73e
3411 /* Description : Voice memo amr playing L1S manager task.*/ 3411 /* Description : Voice memo amr playing L1S manager task.*/
3412 /* */ 3412 /* */
3413 /*-------------------------------------------------------*/ 3413 /*-------------------------------------------------------*/
3414 void l1s_vm_amr_play_manager(void) 3414 void l1s_vm_amr_play_manager(void)
3415 { 3415 {
3416 BOOL l1_vm_amr_in_pause=FALSE;
3417 enum states 3416 enum states
3418 { 3417 {
3419 IDLE = 0, 3418 IDLE = 0,
3420 #if (L1_AUDIO_MCU_ONOFF == 1) 3419 #if (L1_AUDIO_MCU_ONOFF == 1)
3421 WAIT_AUDIO_ON = 1, 3420 WAIT_AUDIO_ON = 1,
3472 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= B_VM_AMR_PLAY_START; 3471 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= B_VM_AMR_PLAY_START;
3473 3472
3474 *state = WAIT_DSP_START; 3473 *state = WAIT_DSP_START;
3475 #endif // L1_AUDIO_MCU_ONOFF 3474 #endif // L1_AUDIO_MCU_ONOFF
3476 } 3475 }
3476 break;
3477 3477
3478 #if (L1_AUDIO_MCU_ONOFF == 1) 3478 #if (L1_AUDIO_MCU_ONOFF == 1)
3479 case WAIT_AUDIO_ON: 3479 case WAIT_AUDIO_ON:
3480 { 3480 {
3481 // Triton Audio ON/OFF Changes 3481 // Triton Audio ON/OFF Changes
3585 3585
3586 *state = WAIT_DSP_STOP; 3586 *state = WAIT_DSP_STOP;
3587 } 3587 }
3588 else 3588 else
3589 { 3589 {
3590 UWORD8 temp_header =0; //omaps00090550 3590 UWORD8 temp_header;
3591 UWORD8 data_size =0; //omaps00090550 3591 UWORD8 data_size;
3592 3592
3593 // Identify AMR sample RX_TX_TYPE 3593 // Identify AMR sample RX_TX_TYPE
3594 temp_header = sample_header & SC_RX_TX_TYPE_MASK; 3594 temp_header = sample_header & SC_RX_TX_TYPE_MASK;
3595 switch(temp_header) 3595 switch(temp_header)
3596 { 3596 {
3674 } 3674 }
3675 // Send the header to the DSP 3675 // Send the header to the DSP
3676 *l1s.voicememo_amr.play.a_du_x = (sample_header | B_BLOCK_READY); 3676 *l1s.voicememo_amr.play.a_du_x = (sample_header | B_BLOCK_READY);
3677 } 3677 }
3678 } 3678 }
3679 if(l1_vm_amr_in_pause==TRUE)
3680 {
3681 (*(l1s.voicememo_amr.play.a_du_x) = *(l1s.voicememo_amr.play.a_du_x) & ~B_BLOCK_READY);
3682 l1_vm_amr_in_pause=FALSE;
3683 }
3684 } 3679 }
3685 } 3680 }
3686 break; 3681 break;
3687 3682
3688 case WAIT_DSP_STOP: 3683 case WAIT_DSP_STOP: