diff --git a/hal/audio_hw.c b/hal/audio_hw.c index 12c196d8..2abb7609 100644 --- a/hal/audio_hw.c +++ b/hal/audio_hw.c @@ -9613,10 +9613,6 @@ static int adev_open_input_stream(struct audio_hw_device *dev, 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 && (!voice_extn_is_compress_voip_supported()) && in->flags & AUDIO_INPUT_FLAG_VOIP_TX && @@ -9636,6 +9632,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);