summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hal/voice.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hal/voice.c b/hal/voice.c
index b8a4609f..8df338cc 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -134,6 +134,14 @@ int voice_start_usecase(struct audio_device *adev, audio_usecase_t usecase_id)
uc_info->type = VOICE_CALL;
uc_info->stream.out = adev->current_call_output;
uc_info->devices = adev->current_call_output->devices;
+
+ if (popcount(uc_info->devices) == 2) {
+ ALOGE("%s: Invalid combo device(%#x) for voice call", __func__,
+ uc_info->devices);
+ ret = -EIO;
+ goto error_start_voice;
+ }
+
uc_info->in_snd_device = SND_DEVICE_NONE;
uc_info->out_snd_device = SND_DEVICE_NONE;