From ef9d7cc3ff081453fd7a30e7fa135e3bdef644f9 Mon Sep 17 00:00:00 2001 From: Misael Lopez Cruz Date: Wed, 26 Nov 2014 02:41:27 -0600 Subject: audio: Legacy: Use smaller ALSA buffers Reduce the size of the ALSA buffers in order to reduce the audio latency. The new buffer sizes allow using fast tracks. Change-Id: I40f3af55cde72b1183d6fc8ffa8e01ecbef71a42 Signed-off-by: Misael Lopez Cruz --- audio/legacy/audio_hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/legacy/audio_hw.c b/audio/legacy/audio_hw.c index 1cd9e80..e9763f0 100644 --- a/audio/legacy/audio_hw.c +++ b/audio/legacy/audio_hw.c @@ -153,17 +153,17 @@ static const char *supported_bt_cards[] = { AUDIO_DEVICE_OUT_DEFAULT) #define CAPTURE_SAMPLE_RATE 44100 -#define CAPTURE_PERIOD_SIZE 960 +#define CAPTURE_PERIOD_SIZE 256 #define CAPTURE_PERIOD_COUNT 4 #define CAPTURE_BUFFER_SIZE (CAPTURE_PERIOD_SIZE * CAPTURE_PERIOD_COUNT) #define PLAYBACK_SAMPLE_RATE 44100 -#define PLAYBACK_PERIOD_SIZE 960 +#define PLAYBACK_PERIOD_SIZE 256 #define PLAYBACK_PERIOD_COUNT 4 #define PLAYBACK_BUFFER_SIZE (PLAYBACK_PERIOD_SIZE * PLAYBACK_PERIOD_COUNT) #define BT_SAMPLE_RATE 8000 -#define BT_PERIOD_SIZE 160 +#define BT_PERIOD_SIZE 80 #define BT_PERIOD_COUNT 4 #define BT_BUFFER_SIZE (BT_PERIOD_SIZE * BT_PERIOD_COUNT) -- cgit v1.2.3