diff --git a/src/com/android/server/telecom/CallAudioManager.java b/src/com/android/server/telecom/CallAudioManager.java
index 7a84eac..8d1144d 100644
--- a/src/com/android/server/telecom/CallAudioManager.java
+++ b/src/com/android/server/telecom/CallAudioManager.java
@@ -45,6 +45,7 @@
     private boolean mIsTonePlaying;
     private boolean mWasSpeakerOn;
     private int mMostRecentlyUsedMode = AudioManager.MODE_IN_CALL;
+    private Call mCallToSpeedUpMTAudio = null;
 
     CallAudioManager(
             Context context,
@@ -112,6 +113,12 @@
         }
 
         setSystemAudioState(false /* isMute */, route, mAudioState.getSupportedRouteMask());
+
+        if (call.can(android.telecom.Call.Details.CAPABILITY_SPEED_UP_MT_AUDIO)) {
+            Log.v(this, "Speed up audio setup for IMS MT call.");
+            mCallToSpeedUpMTAudio = call;
+            updateAudioStreamAndMode();
+        }
     }
 
     @Override
@@ -286,6 +293,10 @@
         boolean wasNotVoiceCall = mAudioFocusStreamType != AudioManager.STREAM_VOICE_CALL;
         updateAudioStreamAndMode();
 
+        if (call != null && call.getState() == CallState.ACTIVE &&
+                            call == mCallToSpeedUpMTAudio) {
+            mCallToSpeedUpMTAudio = null;
+        }
         // If we transition from not voice call to voice call, we need to set an initial state.
         if (wasNotVoiceCall && mAudioFocusStreamType == AudioManager.STREAM_VOICE_CALL) {
             setInitialAudioState(call, true /* force */);
@@ -366,7 +377,11 @@
             Call foregroundCall = getForegroundCall();
             Call waitingForAccountSelectionCall = mCallsManager
                     .getFirstCallWithState(CallState.PRE_DIAL_WAIT);
-            if (foregroundCall != null && waitingForAccountSelectionCall == null) {
+            Call call = mCallsManager.getForegroundCall();
+            if (foregroundCall == null && call != null && call == mCallToSpeedUpMTAudio) {
+                requestAudioFocusAndSetMode(AudioManager.STREAM_VOICE_CALL,
+                                                         AudioManager.MODE_IN_CALL);
+            } else if (foregroundCall != null && waitingForAccountSelectionCall == null) {
                 // In the case where there is a call that is waiting for account selection,
                 // this will fall back to abandonAudioFocus() below, which temporarily exits
                 // the in-call audio mode. This is to allow TalkBack to speak the "Call with"
@@ -417,6 +432,7 @@
             Log.v(this, "abandoning audio focus");
             mAudioManager.abandonAudioFocusForCall();
             mAudioFocusStreamType = STREAM_NONE;
+            mCallToSpeedUpMTAudio = null;
         }
     }
 
