From 0e1093537bbbf220a46a1a0044dbec5a6bf7dbce Mon Sep 17 00:00:00 2001 From: Vidyakumar Athota Date: Thu, 12 Feb 2015 17:38:22 -0800 Subject: hal: add single session VSID voice call support With new Voice architecture, a voice session per subscription will support different call types such as Voice/VoLTE/VoWLAN etc. These new voice sessions will be tagged with new VSID. Change-Id: I7e9c90fb3935ebce5ff281f2d1c25c66aa96e55e --- hal/voice_extn/voice_extn.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'hal/voice_extn') diff --git a/hal/voice_extn/voice_extn.c b/hal/voice_extn/voice_extn.c index 00068fe8..b806babc 100644 --- a/hal/voice_extn/voice_extn.c +++ b/hal/voice_extn/voice_extn.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * Not a contribution. * * Copyright (C) 2013 The Android Open Source Project @@ -44,17 +44,21 @@ #define VOICE_EXTN_PARAMETER_VALUE_MAX_LEN 256 -#define VOICE2_VSID 0x10DC1000 -#define VOLTE_VSID 0x10C02000 -#define QCHAT_VSID 0x10803000 -#define VOWLAN_VSID 0x10002000 -#define ALL_VSID 0xFFFFFFFF +#define VOICE2_VSID 0x10DC1000 +#define VOLTE_VSID 0x10C02000 +#define QCHAT_VSID 0x10803000 +#define VOWLAN_VSID 0x10002000 +#define VOICEMMODE1_VSID 0x11C05000 +#define VOICEMMODE2_VSID 0x11DC5000 +#define ALL_VSID 0xFFFFFFFF /* Voice Session Indices */ #define VOICE2_SESS_IDX (VOICE_SESS_IDX + 1) #define VOLTE_SESS_IDX (VOICE_SESS_IDX + 2) #define QCHAT_SESS_IDX (VOICE_SESS_IDX + 3) #define VOWLAN_SESS_IDX (VOICE_SESS_IDX + 4) +#define MMODE1_SESS_IDX (VOICE_SESS_IDX + 5) +#define MMODE2_SESS_IDX (VOICE_SESS_IDX + 6) /* Call States */ #define CALL_HOLD (BASE_CALL_STATE + 2) @@ -87,6 +91,8 @@ static bool is_valid_vsid(uint32_t vsid) vsid == VOICE2_VSID || vsid == VOLTE_VSID || vsid == QCHAT_VSID || + vsid == VOICEMMODE1_VSID || + vsid == VOICEMMODE2_VSID || vsid == VOWLAN_VSID) return true; else @@ -118,6 +124,14 @@ static audio_usecase_t voice_extn_get_usecase_for_session_idx(const int index) usecase_id = USECASE_VOWLAN_CALL; break; + case MMODE1_SESS_IDX: + usecase_id = USECASE_VOICEMMODE1_CALL; + break; + + case MMODE2_SESS_IDX: + usecase_id = USECASE_VOICEMMODE2_CALL; + break; + default: ALOGE("%s: Invalid voice session index\n", __func__); } @@ -346,6 +360,8 @@ void voice_extn_init(struct audio_device *adev) adev->voice.session[VOLTE_SESS_IDX].vsid = VOLTE_VSID; adev->voice.session[QCHAT_SESS_IDX].vsid = QCHAT_VSID; adev->voice.session[VOWLAN_SESS_IDX].vsid = VOWLAN_VSID; + adev->voice.session[MMODE1_SESS_IDX].vsid = VOICEMMODE1_VSID; + adev->voice.session[MMODE2_SESS_IDX].vsid = VOICEMMODE2_VSID; } int voice_extn_get_session_from_use_case(struct audio_device *adev, @@ -375,6 +391,14 @@ int voice_extn_get_session_from_use_case(struct audio_device *adev, *session = &adev->voice.session[VOWLAN_SESS_IDX]; break; + case USECASE_VOICEMMODE1_CALL: + *session = &adev->voice.session[MMODE1_SESS_IDX]; + break; + + case USECASE_VOICEMMODE2_CALL: + *session = &adev->voice.session[MMODE2_SESS_IDX]; + break; + default: ALOGE("%s: Invalid usecase_id:%d\n", __func__, usecase_id); *session = NULL; -- cgit v1.2.3