AHAL: raise the priority for configuration of voip usecase
It's not really necessary to configure voip call to fast
track though app sets fast flag. As AOSP design, fast track
applies to recoder apps, not voip apps. In general, fast
recorder app can pause and resume by itself, but fast track
will be invalidated continually if the voip app kept IDLE
state(in the background), it goes into an infinite loop
"invalidate->restore->invalidate", if it reaches the maximum
retry time, it will quit the thread permanently.
Raise the priority for configuration of voip usecase to
make apps of voip type select voip path.
Change-Id: I32471aa4adb4e306088930591309618529ced291
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index ebfcd52..31f06a2 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
* Not a Contribution.
*
* Copyright (C) 2013 The Android Open Source Project
@@ -9610,10 +9610,6 @@
in->config = pcm_config_afe_proxy_record;
in->config.rate = config->sample_rate;
in->af_period_multiplier = 1;
- } else if (in->realtime) {
- in->config = pcm_config_audio_capture_rt;
- in->config.format = pcm_format_from_audio_format(config->format);
- in->af_period_multiplier = af_period_multiplier;
} else if (in->source == AUDIO_SOURCE_VOICE_COMMUNICATION &&
in->flags & AUDIO_INPUT_FLAG_VOIP_TX &&
(config->sample_rate == 8000 ||
@@ -9632,6 +9628,10 @@
in->config.period_count = VOIP_CAPTURE_PERIOD_COUNT;
in->config.rate = config->sample_rate;
in->af_period_multiplier = 1;
+ } else if (in->realtime) {
+ in->config = pcm_config_audio_capture_rt;
+ in->config.format = pcm_format_from_audio_format(config->format);
+ in->af_period_multiplier = af_period_multiplier;
} else {
int ret_val;
pthread_mutex_lock(&adev->lock);