audio: run ril_set_call_clock_sync() in stop_voice_session()
authorUsaamah Patel <ussyp2015@gmail.com>
Tue, 19 Dec 2017 15:42:38 +0000 (15:42 +0000)
committerJan Altensen <info@stricted.net>
Tue, 5 Feb 2019 18:55:00 +0000 (19:55 +0100)
Some devices like the Samsung Galaxy S6, require this
to be run at the end of the voice session. However some
devices also need this to be run at the start of the
voice session whereas the S6 does not (see previous commit).

Change-Id: I833b57e262795fcbd8be6f44afb17b0f1ca6fee3
Signed-off-by: Usaamah Patel <ussyp2015@gmail.com>
audio/voice.c

index d058359fe44822a82f9ea04104cdaf0aab1e3a27..5b5adf64eed8d26538f302426f1c3b33ab09b06a 100644 (file)
@@ -294,8 +294,6 @@ int start_voice_session(struct voice_session *session)
         ril_set_two_mic_control(&session->ril, AUDIENCE, TWO_MIC_SOLUTION_OFF);
     }
 
-    ril_set_call_clock_sync(&session->ril, SOUND_CLOCK_START);
-
     return 0;
 }
 
@@ -307,6 +305,8 @@ void stop_voice_session(struct voice_session *session)
 {
     int status = 0;
 
+    ril_set_call_clock_sync(&session->ril, SOUND_CLOCK_STOP);
+
     ALOGV("%s: Closing active PCMs", __func__);
 
     if (session->pcm_voice_rx != NULL) {