audio: Fix for AV Sync related issues
-Fix buffer pointer mismatch in proxy -There were glitches heard at times when listening to music over Bluetooth -The issue was due to slight scheduling delays. When proxy read thread in the HAL wakes up, there might be more than one period size worth of data in the proxy. This would result in the proxy copying only one period but incrementing whatever is available and subsequently leading to glitches. -Increase extOutThread priority to URGENT_AUDIO to avoid delays in proxy port read. -query BT hal for audio latency for a2dpstream -Set proper latency when audio is played on BT devices by querying BT hal. This is needed for av sync over BT devices -Calculate proxy port latency -The latency of proxy port should be considered during playback on these devices. -Flush Proxy data at high water mark -Delays in the system setup causes Proxy buffers to become very close to full and leading to choppy audio, afterwards. -Flush the data in the proxy whenever a limit [water mark] is reached. The water mark is set to 40000 frames. This can, also, be changed by modifying AFE_PROXY_HIGH_WATER_MARK_FRAME_COUNT Change-Id: I55ffb93b16618d3e63fb93c66483286db058740f Conflicts: legacy/alsa_sound/AudioHardwareALSA.cpp
Loading
Please register or sign in to comment