summaryrefslogtreecommitdiffstats
path: root/hal
diff options
context:
space:
mode:
authorjuyuchen <juyuchen@google.com>2019-08-20 18:36:01 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-10 23:33:31 -0800
commit34574a0acd168dd94b6a6fad1fa2e6a9dfe81de5 (patch)
treec08fbb681e0cfd8e36a9048fcaebdeae30351d8c /hal
parent4a6aff442eb253a0ef28fb68af6ff62ea02d26bc (diff)
downloadandroid_hardware_qcom_audio-34574a0acd168dd94b6a6fad1fa2e6a9dfe81de5.tar.gz
android_hardware_qcom_audio-34574a0acd168dd94b6a6fad1fa2e6a9dfe81de5.tar.bz2
android_hardware_qcom_audio-34574a0acd168dd94b6a6fad1fa2e6a9dfe81de5.zip
audio hal: fix enabling snd device with same backend on the codec twice.
Enable hearing-aid-mic and handset-mic at the same time will cause codec crash during voice call. Route afe-proxy-record usecase to hearing-aid-mic device when it uses handset-mic device. Bug: 139555903 Test: MO and MT voice call with hearing aid. Change-Id: I2d536ff1e75d7848208fa0f6a726715f522eeb6c Signed-off-by: juyuchen <juyuchen@google.com> (cherry picked from commit af6a1d3e707f62462facedee54964df0a3911134) Signed-off-by: Aniket Kumar Lata <alata@codeaurora.org>
Diffstat (limited to 'hal')
-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 7a2c2b95..9636572c 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1764,13 +1764,13 @@ static void check_usecases_capture_codec_backend(struct audio_device *adev,
if (usecase->type != PCM_PLAYBACK &&
usecase != uc_info &&
(usecase->in_snd_device != snd_device || force_routing) &&
- ((uc_info->devices & backend_check_cond) &&
+ (((uc_info->devices & backend_check_cond) &&
(((usecase->devices & ~AUDIO_DEVICE_BIT_IN) & AUDIO_DEVICE_IN_ALL_CODEC_BACKEND) ||
- (usecase->type == VOIP_CALL))) &&
+ (usecase->type == VOIP_CALL))) ||
((uc_info->type == VOICE_CALL &&
usecase->devices == AUDIO_DEVICE_IN_VOICE_CALL) ||
platform_check_backends_match(snd_device,\
- usecase->in_snd_device)) &&
+ usecase->in_snd_device))) &&
(usecase->id != USECASE_AUDIO_SPKR_CALIB_TX)) {
ALOGV("%s: Usecase (%s) is active on (%s) - disabling ..",
__func__, use_case_table[usecase->id],