Permalink
Browse files

alsa_sound: Fix defaults when low-latency audio is disabled

 * Use original buffer size and playback latencies.

Change-Id: I65b4c80e0ee935ee77de3ef38b66dc5fb7ec4100
  • Loading branch information...
1 parent b469b0e commit be993b1f04af8062d0eae280549174154d42fd46 @cyanogen cyanogen committed Dec 5, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 alsa_sound/AudioHardwareALSA.h
View
9 alsa_sound/AudioHardwareALSA.h
@@ -59,10 +59,17 @@ class AudioHardwareALSA;
#define DEFAULT_CHANNEL_MODE 2
#define VOICE_SAMPLING_RATE 8000
#define VOICE_CHANNEL_MODE 1
-#define PLAYBACK_LATENCY 170000
#define RECORD_LATENCY 96000
#define VOICE_LATENCY 85333
+
+#ifdef QCOM_LOW_LATENCY_AUDIO_ENABLED
+#define PLAYBACK_LATENCY 170000
#define DEFAULT_BUFFER_SIZE 4096
+#else
+#define PLAYBACK_LATENCY 96000
+#define DEFAULT_BUFFER_SIZE 2048
+#endif
+
//4032 = 336(kernel buffer size) * 2(bytes pcm_16) * 6(number of channels)
#define DEFAULT_MULTI_CHANNEL_BUF_SIZE 4032
#define DEFAULT_VOICE_BUFFER_SIZE 2048

0 comments on commit be993b1

Please sign in to comment.