summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Kumar Alamanda <ralama@codeaurora.org>2014-12-15 18:56:30 -0800
committerSteve Kondik <steve@cyngn.com>2014-12-23 13:00:42 -0800
commit3c3ab2e40a068d40a6d7c9cfab8960918aeff58a (patch)
tree49c1f93600af95b599dc6506d42f7c629fd37ff7
parent3cfe58d71f27ff926bbb7b4ddbef97d22ed947bb (diff)
downloadandroid_hardware_qcom_audio-3c3ab2e40a068d40a6d7c9cfab8960918aeff58a.tar.gz
android_hardware_qcom_audio-3c3ab2e40a068d40a6d7c9cfab8960918aeff58a.tar.bz2
android_hardware_qcom_audio-3c3ab2e40a068d40a6d7c9cfab8960918aeff58a.zip
hal: Fix glitch in audio playback during device switch
Currently the deep buffer path uses 4 * 20msec buffer. During device switch the AudioPolicyManager delays routing command by 2 * output latency (80msec) to ensure that all the data written to driver/DSP is played out on current device itself. The stream side buffering in the DSP in legacy PCM mode is 95msec and hence the depth of pipeline is 80 + 95 = 175msec which exceeds the device switch delay 160msec (2 * 80). So the tail (data written to driver before headset plugin) is heard on headset and perceived as glitch. Ensure that the buffering in the kernel is greater than or equal to the buffering in the DSP to fix the issue. Change-Id: I01a3862d63ce4c258056620693dee08761c7e83f CRs-Fixed: 771446
-rw-r--r--hal/msm8974/platform.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hal/msm8974/platform.h b/hal/msm8974/platform.h
index 831ee585..9eac0d32 100644
--- a/hal/msm8974/platform.h
+++ b/hal/msm8974/platform.h
@@ -168,7 +168,7 @@ enum {
* the buffer size of an input/output stream
*/
#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 960
-#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 4
+#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 5
#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
#define LOW_LATENCY_OUTPUT_PERIOD_COUNT 2