summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstenkinevgeniy <stenkinevgeniy@gmail.com>2018-07-09 14:48:19 +0000
committerSimon Shields <simon@lineageos.org>2018-07-25 09:41:22 +0200
commit41069235e8f80724107035b592965f6b1c434023 (patch)
tree0dea365c03bd05a0b60c68786bf65a2bdc24174e
parenta14d5e7792fe98019da330d04d83117e0ae2ca87 (diff)
downloadandroid_hardware_samsung-41069235e8f80724107035b592965f6b1c434023.tar.gz
android_hardware_samsung-41069235e8f80724107035b592965f6b1c434023.tar.bz2
android_hardware_samsung-41069235e8f80724107035b592965f6b1c434023.zip
Audio: fix voip calls over bluetooth for Wolfson Microelectronics codecs.
Some devices, that using wm* codecs like i9500, t805, p601 and others need open CP pcm's when using BT SCO in IN_COMMUNICATION mode. Change-Id: I64935aabf1c52e66409e727f02752cd325f8ef58 Signed-off-by: stenkinevgeniy <stenkinevgeniy@gmail.com>
-rw-r--r--audio/voice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/audio/voice.c b/audio/voice.c
index 2219d9a..6d5e613 100644
--- a/audio/voice.c
+++ b/audio/voice.c
@@ -153,6 +153,10 @@ void stop_voice_session_bt_sco(struct audio_device *adev) {
pcm_close(adev->pcm_sco_tx);
adev->pcm_sco_tx = NULL;
}
+
+ /* audio codecs like wm5201 need open modem pcm while using bt sco */
+ if (adev->mode != AUDIO_MODE_IN_CALL)
+ stop_voice_session(adev->voice.session);
}
/* must be called with the hw device mutex locked, OK to hold other mutexes */
@@ -198,6 +202,10 @@ void start_voice_session_bt_sco(struct audio_device *adev)
pcm_start(adev->pcm_sco_rx);
pcm_start(adev->pcm_sco_tx);
+ /* audio codecs like wm5201 need open modem pcm while using bt sco */
+ if (adev->mode != AUDIO_MODE_IN_CALL)
+ start_voice_session(adev->voice.session);
+
return;
err_sco_tx: