summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Kumar Alamanda <ralama@codeaurora.org>2013-03-19 16:46:58 -0700
committerVineeta Srivastava <vsrivastava@google.com>2013-03-28 15:33:41 -0700
commitc301186b49201c8ebf1dc05b336ba0a5e3877408 (patch)
tree33e98ac517ee16f4ec66c4a05fb7abf249a3cc52
parentb199506991c9a93103ed149c6e1ab42c47bb8fc3 (diff)
downloadandroid_hardware_qcom_audio-c301186b49201c8ebf1dc05b336ba0a5e3877408.tar.gz
android_hardware_qcom_audio-c301186b49201c8ebf1dc05b336ba0a5e3877408.tar.bz2
android_hardware_qcom_audio-c301186b49201c8ebf1dc05b336ba0a5e3877408.zip
audio/hal: Set playback buffer sizes to integral multiple msec
- The call to pcm_write was taking varying time to complete. This was because DSP always expects the buffer duration to be an integral multiple msec. When this is not the case, DSP waits for the rest of the data to be filled too. This accumalates the delay and causes the variation in timing. - Change the deep buffer playback buffer size to 960 samples(20msec) and low latency to 240 samples (5msec) to fix the issue. Change-Id: I9448920e89595a65cf92a5abd9187e02043b699a
-rw-r--r--hal/audio_hw.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index abe56dda..7bc2ecb9 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -129,10 +129,10 @@ typedef enum {
* We should take care of returning proper size when AudioFlinger queries for
* the buffer size of an input/output stream
*/
-#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 1024
+#define DEEP_BUFFER_OUTPUT_PERIOD_SIZE 960
#define DEEP_BUFFER_OUTPUT_PERIOD_COUNT 8
-#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 256
+#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
#define LOW_LATENCY_OUTPUT_PERIOD_COUNT 2
#define HDMI_MULTI_PERIOD_SIZE 336