hal: Enhance voice concurrency support for 8916
- All VoIP, compress, deep buffer, record usecases need to close
before voice call setup and don't allow these usecases during
voice call on 8916.
- setMode(IN_CALL) itself is not sufficient to know if we are
in actual voice call.
- Add keyvalue parameters support to know if we are in voice call
and policy hal can query the same and make decissions based on it.
CRs-Fixed: 662804
Change-Id: I20d660fadd07c4d227a7e3dfe356fc39806ca167
diff --git a/hal/voice.c b/hal/voice.c
index bad9255..449c0c2 100644
--- a/hal/voice.c
+++ b/hal/voice.c
@@ -67,6 +67,8 @@
session = (struct voice_session *)voice_get_session_from_use_case(adev, usecase_id);
session->state.current = CALL_INACTIVE;
+ if (adev->mode == AUDIO_MODE_NORMAL)
+ adev->voice.is_in_call = false;
ret = platform_stop_voice_call(adev->platform, session->vsid);