summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMingshu Pang <mpang@codeaurora.org>2021-01-14 16:19:10 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2021-01-21 18:21:39 -0800
commit7b59b5e4c45ec160a8f77647d31e17bf72d4da93 (patch)
tree555c393ebfe10def03d993388533ff5ebc0d4e1f
parent8b0868f1df77b9feba1aa8a2b24a003c919d7608 (diff)
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
-rw-r--r--hal/audio_hw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 7c732456..55f1005f 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -9560,6 +9560,10 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
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);