audio_hal : remove voice call type from sco stream in check
During voice call, device switch from speaker to bt a2dp
we are seeing crash in audio_hal due to invalid addrress
passed to is_sco_in_device_type which cause voice call failed
in bt a2dp.
All voice call usecase routing request made based on stream
output device, input device does not play any role hence removing
voice call check from sco stream in check.
Change-Id: Icaa71c8e461f26c913c0c637504824b848d87e95
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 96c007d..43db1fb 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -8842,8 +8842,7 @@
struct listnode *node;
list_for_each(node, &adev->usecase_list) {
usecase = node_to_item(node, struct audio_usecase, list);
- if (usecase->stream.in && (usecase->type == PCM_CAPTURE ||
- usecase->type == VOICE_CALL) &&
+ if (usecase->stream.in && (usecase->type == PCM_CAPTURE) &&
(!is_btsco_device(SND_DEVICE_NONE, usecase->in_snd_device)) && (is_sco_in_device_type(&usecase->stream.in->device_list))) {
ALOGD("BT_SCO ON, switch all in use case to it");
select_devices(adev, usecase->id);