summaryrefslogtreecommitdiffstats
path: root/hal/voice_extn
diff options
context:
space:
mode:
authorVidyakumar Athota <vathota@codeaurora.org>2015-02-12 17:38:22 -0800
committerVidyakumar Athota <vathota@codeaurora.org>2015-04-14 16:11:05 -0700
commit0e1093537bbbf220a46a1a0044dbec5a6bf7dbce (patch)
treef72b5ef0395d0ebaaf1206e5e307ba1742156502 /hal/voice_extn
parent16b2dd39c49de253e5d9d774ca44ce8ebe44d903 (diff)
downloadandroid_hardware_qcom_audio-0e1093537bbbf220a46a1a0044dbec5a6bf7dbce.tar.gz
android_hardware_qcom_audio-0e1093537bbbf220a46a1a0044dbec5a6bf7dbce.tar.bz2
android_hardware_qcom_audio-0e1093537bbbf220a46a1a0044dbec5a6bf7dbce.zip
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
Diffstat (limited to 'hal/voice_extn')
-rw-r--r--hal/voice_extn/voice_extn.c36
1 files changed, 30 insertions, 6 deletions
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;