summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShiv Maliyappanahalli <smaliyap@codeaurora.org>2015-11-04 18:10:20 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-09-30 14:39:09 -0700
commitb58887d0f7e1c605e81c1a6fa155db1f6356fd1f (patch)
treeac35b302a84c88e460566a857464df41886b9d83
parent30dccce5232b9d52ecc967fe3672d887011f528b (diff)
downloadhardware_qcom_audio-b58887d0f7e1c605e81c1a6fa155db1f6356fd1f.tar.gz
hardware_qcom_audio-b58887d0f7e1c605e81c1a6fa155db1f6356fd1f.tar.bz2
hardware_qcom_audio-b58887d0f7e1c605e81c1a6fa155db1f6356fd1f.zip
hal: Fix device selection at start of the voice call
Voice call setup latency value is exceeding 500 msec. It is due to primary output selecting handset instead of voice handset causing the extra delay. Fix this by starting voice usecase first before changing device for primary output. Change-Id: I39ac8186b62d86b2047bf73860e7027d15df7fd2
-rw-r--r--hal/audio_hw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index a23eb7a8..cc5fd5ad 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1779,9 +1779,6 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
if (val != 0) {
out->devices = val;
- if (!out->standby)
- select_devices(adev, out->usecase);
-
if ((adev->mode == AUDIO_MODE_IN_CALL) &&
output_drives_call(adev, out)) {
adev->current_call_output = out;
@@ -1790,6 +1787,9 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
else
voice_update_devices_for_all_voice_usecases(adev);
}
+
+ if (!out->standby)
+ select_devices(adev, out->usecase);
}
if ((adev->mode == AUDIO_MODE_NORMAL) &&