コード例 #1
0
static void toneStop( void *data )
{
   if (tone.state == TONE_STATE_NONE)
      return;

   if( !L1Audio_CheckFlag( tone.aud_id ) )
      return;

   if (tone.isReentrance)
      return;
   else
      tone.isReentrance = true;

   tone.bQTMF = false;
   
   if (tone.state == TONE_STATE_INIT) {
      int I;
      
      for (I = 0; ; I++) {
         if (tone.state != TONE_STATE_INIT)
            break;
         
         ASSERT_REBOOT( I < 20 );
         kal_sleep_task( 2 );
      }
   }
   
   if (tone.state == TONE_STATE_PLAY) {
      tone.state = TONE_STATE_STOP;
      tone.isWait = true;
      L1Audio_FC_TonePlaybackOff(tone.fc_aud_id);
      tone.isWait = false;
      tone.state = TONE_STATE_IDLE;
   }
   
   if (tone.state == TONE_STATE_IDLE) {
      tone.state = TONE_STATE_NONE;
      L1Audio_FC_UnHookHandler(tone.fc_aud_id, 0);
      tone.fc_aud_id = 0xFFFF;
   }
   
   AM_ToneOff();
   AFE_TurnOffSpeaker( L1SP_TONE );
   L1Audio_ClearFlag( tone.aud_id );
   tone.seqNum++;
   L1Audio_SetEvent( tone.aud_id, 0 );
}
コード例 #2
0
static void toneMute( void *data )
{
   int32 dura = (int32)data;
   
   AFE_TurnOffSpeaker( L1SP_TONE );
   
   tone.info->freq1 = 0;
   tone.info->freq2 = 0;
   tone.info->freq3 = 0;
   tone.info->freq4 = 0;
   tone.info->msDur = dura;
   
   tone.state = TONE_STATE_INIT; 
/*workaround for SPEECH DSP MAIN/AUX Mode Task in FCORE*/ 
#ifdef BGSND_ENABLE
   if (tone.sndOffHandler != NULL)
      tone.sndOffHandler( tone.sndHdl );
#endif      
/*workaround for SPEECH DSP MAIN/AUX Mode Task in FCORE*/     
     
   L1Audio_FC_TonePlaybackOn(tone.fc_aud_id, tone.info);
}
コード例 #3
0
ファイル: i2s_drv.c プロジェクト: WayWingsDev/testmywatch
void I2SIN_TurnOffSpeaker()
{
   kal_trace( TRACE_FUNC, L1AUDIO_I2S_TURNOF_SPK);
   AFE_TurnOffSpeaker(L1SP_AUDIO);
}