summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarthik Reddy Katta <a_katta@codeaurora.org>2015-08-20 13:36:07 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-02-26 00:04:21 -0800
commit0d4717651e727f43ce9f7bfa46e9fb87c377c99d (patch)
treeee2a60b327baed12a957740615bcbfc5232eb399
parent62e3422f85330358d16452e3bc4bf227e6f83f9a (diff)
downloadandroid_hardware_qcom_audio-0d4717651e727f43ce9f7bfa46e9fb87c377c99d.tar.gz
android_hardware_qcom_audio-0d4717651e727f43ce9f7bfa46e9fb87c377c99d.tar.bz2
android_hardware_qcom_audio-0d4717651e727f43ce9f7bfa46e9fb87c377c99d.zip
hal: Fix the device disable/enable sequence for capture usecases
Tx mute is observed in voice call in case of DSDS scenarios. During device switch, when two or more voice usecases are present, which share the same backend then the Tx device disable/enable sequence isn't properly follwed resulting disabling of mic. Fix this by adding proper check at disable/enable of devices for capture usecases that share same backend. CRs-Fixed: 979685 Change-Id: Id1cc27db8ddbbdbf1dffc02c07ce7785b184770b
-rw-r--r--hal/audio_hw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index e4b8a37a..0526e9ba 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -754,7 +754,8 @@ static void check_and_route_capture_usecases(struct audio_device *adev,
usecase != uc_info &&
usecase->in_snd_device != snd_device &&
((uc_info->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
- ((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND)) &&
+ (((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND) ||
+ (usecase->type == VOICE_CALL))) &&
(usecase->id != USECASE_AUDIO_SPKR_CALIB_TX)) {
ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..",
__func__, use_case_table[usecase->id],