Revert "hal: add single session VSID voice call support"

This reverts commit 24cc35757a619be1d301c462b34756f0ff59a489.
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index bf771bc..7e8716d 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 The Android Open Source Project
+ * Copyright (C) 2013-2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -172,8 +172,6 @@
     [USECASE_VOLTE_CALL] = "volte-call",
     [USECASE_QCHAT_CALL] = "qchat-call",
     [USECASE_VOWLAN_CALL] = "vowlan-call",
-    [USECASE_VOICEMMODE1_CALL] = "voicemmode1-call",
-    [USECASE_VOICEMMODE2_CALL] = "voicemmode2-call",
 
     [USECASE_AUDIO_SPKR_CALIB_RX] = "spkr-rx-calib",
     [USECASE_AUDIO_SPKR_CALIB_TX] = "spkr-vi-record",
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index d064898..8c07b6d 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 The Android Open Source Project
+ * Copyright (C) 2013-2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,29 +69,13 @@
     USECASE_AUDIO_RECORD,
     USECASE_AUDIO_RECORD_LOW_LATENCY,
 
-    /* Voice extension usecases
-     *
-     * Following usecase are specific to voice session names created by
-     * MODEM and APPS on 8992/8994/8084/8974 platforms.
-     */
-    USECASE_VOICE_CALL,  /* Usecase setup for voice session on first subscription for DSDS/DSDA */
-    USECASE_VOICE2_CALL, /* Usecase setup for voice session on second subscription for DSDS/DSDA */
-    USECASE_VOLTE_CALL,  /* Usecase setup for VoLTE session on first subscription */
-    USECASE_QCHAT_CALL,  /* Usecase setup for QCHAT session */
-    USECASE_VOWLAN_CALL, /* Usecase setup for VoWLAN session */
+    USECASE_VOICE_CALL,
 
-    /*
-     * Following usecase are specific to voice session names created by
-     * MODEM and APPS on 8996 platforms.
-     */
-
-    USECASE_VOICEMMODE1_CALL, /* Usecase setup for Voice/VoLTE/VoWLAN sessions on first
-                               * subscription for DSDS/DSDA
-                               */
-    USECASE_VOICEMMODE2_CALL, /* Usecase setup for voice/VoLTE/VoWLAN sessions on second
-                               * subscription for DSDS/DSDA
-                               */
-
+    /* Voice extension usecases */
+    USECASE_VOICE2_CALL,
+    USECASE_VOLTE_CALL,
+    USECASE_QCHAT_CALL,
+    USECASE_VOWLAN_CALL,
     USECASE_INCALL_REC_UPLINK,
     USECASE_INCALL_REC_DOWNLINK,
     USECASE_INCALL_REC_UPLINK_AND_DOWNLINK,
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 10c9ffb..6c1a2dd 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 The Android Open Source Project
+ * Copyright (C) 2013-2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -153,11 +153,6 @@
     [USECASE_VOLTE_CALL] = {VOLTE_CALL_PCM_DEVICE, VOLTE_CALL_PCM_DEVICE},
     [USECASE_QCHAT_CALL] = {QCHAT_CALL_PCM_DEVICE, QCHAT_CALL_PCM_DEVICE},
     [USECASE_VOWLAN_CALL] = {VOWLAN_CALL_PCM_DEVICE, VOWLAN_CALL_PCM_DEVICE},
-    [USECASE_VOICEMMODE1_CALL] = {VOICEMMODE1_CALL_PCM_DEVICE,
-                                  VOICEMMODE1_CALL_PCM_DEVICE},
-    [USECASE_VOICEMMODE2_CALL] = {VOICEMMODE2_CALL_PCM_DEVICE,
-                                  VOICEMMODE2_CALL_PCM_DEVICE},
-
     [USECASE_INCALL_REC_UPLINK] = {AUDIO_RECORD_PCM_DEVICE,
                                    AUDIO_RECORD_PCM_DEVICE},
     [USECASE_INCALL_REC_DOWNLINK] = {AUDIO_RECORD_PCM_DEVICE,
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index d6c9e8e..11797b1 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2016 The Android Open Source Project
+ * Copyright (C) 2013-2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -222,12 +222,6 @@
 #define VOLTE_CALL_PCM_DEVICE 21
 #define QCHAT_CALL_PCM_DEVICE 33
 #define VOWLAN_CALL_PCM_DEVICE -1
-#elif PLATFORM_MSM8996
-#define VOICE_CALL_PCM_DEVICE 40
-#define VOICE2_CALL_PCM_DEVICE 41
-#define VOLTE_CALL_PCM_DEVICE 14
-#define QCHAT_CALL_PCM_DEVICE 20
-#define VOWLAN_CALL_PCM_DEVICE 33
 #else
 #define VOICE_CALL_PCM_DEVICE 2
 #define VOICE2_CALL_PCM_DEVICE 22
@@ -236,14 +230,6 @@
 #define VOWLAN_CALL_PCM_DEVICE 36
 #endif
 
-#ifdef PLATFORM_MSM8996
-#define VOICEMMODE1_CALL_PCM_DEVICE 2
-#define VOICEMMODE2_CALL_PCM_DEVICE 22
-#else
-#define VOICEMMODE1_CALL_PCM_DEVICE 44
-#define VOICEMMODE2_CALL_PCM_DEVICE 45
-#endif
-
 #define AFE_PROXY_PLAYBACK_PCM_DEVICE 7
 #define AFE_PROXY_RECORD_PCM_DEVICE 8
 
diff --git a/hal/voice.h b/hal/voice.h
index 469a3b5..23b9ee3 100644
--- a/hal/voice.h
+++ b/hal/voice.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2016 The Android Open Source Project
+ * Copyright (C) 2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
 #define VOICE_SESS_IDX     (BASE_SESS_IDX)
 
 #ifdef MULTI_VOICE_SESSION_ENABLED
-#define MAX_VOICE_SESSIONS 7
+#define MAX_VOICE_SESSIONS 5
 #else
 #define MAX_VOICE_SESSIONS 1
 #endif
diff --git a/hal/voice_extn/voice_extn.c b/hal/voice_extn/voice_extn.c
index edf5523..6e92da8 100644
--- a/hal/voice_extn/voice_extn.c
+++ b/hal/voice_extn/voice_extn.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2016 The Android Open Source Project
+ * Copyright (C) 2014 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,21 +41,17 @@
 
 #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 VOICEMMODE1_VSID         0x11C05000
-#define VOICEMMODE2_VSID         0x11DC5000
-#define ALL_VSID                 0xFFFFFFFF
+#define VOICE2_VSID 0x10DC1000
+#define VOLTE_VSID  0x10C02000
+#define QCHAT_VSID  0x10803000
+#define VOWLAN_VSID 0x10002000
+#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)
@@ -88,8 +84,6 @@
         vsid == VOICE2_VSID ||
         vsid == VOLTE_VSID ||
         vsid == QCHAT_VSID ||
-        vsid == VOICEMMODE1_VSID ||
-        vsid == VOICEMMODE2_VSID ||
         vsid == VOWLAN_VSID)
         return true;
     else
@@ -121,14 +115,6 @@
         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__);
     }
@@ -370,8 +356,6 @@
     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,
@@ -401,14 +385,6 @@
         *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;