summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnver sadhique <akurun@codeaurora.org>2021-09-03 15:25:44 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2021-09-21 02:01:45 -0700
commitb545d0cf648e1e1c9bce9fc7fa8632a11214466d (patch)
tree0d85874a6ee43d08b0da602a765583d6c941282c
parenta95c9f1633ba8203c9a5a020a87c0cc6661f360b (diff)
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
-rw-r--r--hal/audio_hw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 8bf3dacf..6fbbee33 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -8761,8 +8761,7 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
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);