We're developing a VoIP based communications application for our Android desktop phone system. The phone runs Android 8.1 and is GMS approved. It's based on the Snapdragon 625 SoC (msm8953 processor). Our AOSP version is based on the Qualcomm fork on CodeAurora.
We're having problems with slow audio stream playback/capture start/stop times. For example, it can take up to 700ms to open and start a playback stream with the following parameters:
- Sample rate: 48000
- Resolution: 16bit
- Encoding: PCM
- Device: Earpiece
- Usage Type: Voice Communication
- Audio Mode: In Communication (VoIP)
Stream creation also seems to influence other streams. When we play a ringtone through the speaker for an incoming call and then, when the call is answered, create the earpiece playback stream, it causes a ~500ms loss of audio on the capture stream. The real world effect is that when the user answering the incoming call says 'hello' he is not heard at the other end.
Are there any issues in the Qualcomm HAL for msm8953 that would cause the above problems? Digging through the HAL code (audio_hw.c) I notice that for VoIP streams it creates a 'compress_voip' type of stream and attempts to pair up the capture/playback streams. Could this be causing problems?