summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexy Joseph <alexyj@codeaurora.org>2016-05-16 17:54:09 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-05-17 12:11:01 -0700
commitf3417e544de6c0b0558f55c26d09decc90c2216d (patch)
tree63fb321c5c864366f386fcd66503b2b78eb7d75c
parent08d1b0724c87c7b032f8b043a0c56b04accd4997 (diff)
downloadandroid_hardware_qcom_audio-staging/LA.HB.1.3.1.c1-05300.tar.gz
android_hardware_qcom_audio-staging/LA.HB.1.3.1.c1-05300.tar.bz2
android_hardware_qcom_audio-staging/LA.HB.1.3.1.c1-05300.zip
hal: Fix voice call usecase de-referencingstaging/LA.HB.1.3.1.c1-05300
Fix referencing of voice call use case only when the use case is relevant Change-Id: I29ebfd75c8953ff3d464bdb8d7ff7b77cf2cbdf6
-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 7a217aed..642012d2 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -890,9 +890,9 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
if (voice_is_in_call(adev) && adev->mode != AUDIO_MODE_NORMAL) {
vc_usecase = get_usecase_from_list(adev,
get_usecase_id_from_usecase_type(adev, VOICE_CALL));
- if (((vc_usecase) && ((vc_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
- (usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND))) ||
- (usecase->devices == AUDIO_DEVICE_IN_VOICE_CALL)) {
+ if ((vc_usecase) && (((vc_usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND) &&
+ (usecase->devices & AUDIO_DEVICE_OUT_ALL_CODEC_BACKEND)) ||
+ (usecase->devices == AUDIO_DEVICE_IN_VOICE_CALL))) {
in_snd_device = vc_usecase->in_snd_device;
out_snd_device = vc_usecase->out_snd_device;
}