st-hal: Check active tx concurrency before disable stale device

During tx concurrency session voice + VA + record voice tx silent
while device switch to hands free. The issue comes after tx device
allowed to disable the backend device during capture concurrencies.
So added tx_concurrency_active check before disable stale device
which we able to recover from tx silent.

Change-Id: Ifd7c0090cecb516d6ee7e25ef3e48323d406d875
diff --git a/sound_trigger_hw.c b/sound_trigger_hw.c
index 4891b50..1d3b001 100644
--- a/sound_trigger_hw.c
+++ b/sound_trigger_hw.c
@@ -45,6 +45,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
+ *
+ *Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #define LOG_TAG "sound_trigger_hw"
 #define ATRACE_TAG (ATRACE_TAG_HAL)
@@ -808,7 +810,8 @@
         if (event_type == AUDIO_EVENT_CAPTURE_DEVICE_INACTIVE &&
             !platform_stdev_is_dedicated_sva_path(stdev->platform) &&
             platform_stdev_backend_reset_allowed(stdev->platform))
-            platform_stdev_disable_stale_devices(stdev->platform);
+            if (stdev->tx_concurrency_active == 0)
+                platform_stdev_disable_stale_devices(stdev->platform);
         pthread_mutex_unlock(&stdev->lock);
         return;
     }