HAL: Modified condition to avoid audio Tx path for legacy targets

  changed condition to make sure legacy targets still uses
  compress-voip usecase for Tx path instead of unsupported
  USECASE_AUDIO_RECORD_VOIP usecase

Change-Id: Ifc1c39693aa73c50d881ac149a348065739b1de5
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index dc1094b..6a244fe 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
  * Not a Contribution.
  *
  * Copyright (C) 2013 The Android Open Source Project
@@ -8943,6 +8943,7 @@
         in->config.rate = config->sample_rate;
         in->af_period_multiplier = 1;
     } else if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION &&
+               (!voice_extn_is_compress_voip_supported()) &&
                in->flags & AUDIO_INPUT_FLAG_VOIP_TX &&
                (config->sample_rate == 8000 ||
                 config->sample_rate == 16000 ||