exynos: audiohal_comv1: allow to override usb playback duration
Change-Id: Ib5c55354a59753ef12bd3581bf062ea978d7010c
Signed-off-by: Francescodario Cuzzocrea <bosconovic@gmail.com>
diff --git a/include/libaudio/audiohal_comv1/audio_definition.h b/include/libaudio/audiohal_comv1/audio_definition.h
index d7e967e..e31bb31 100644
--- a/include/libaudio/audiohal_comv1/audio_definition.h
+++ b/include/libaudio/audiohal_comv1/audio_definition.h
@@ -67,7 +67,9 @@
#endif
// USB Playback and Capture
+#ifndef PREDEFINED_USB_PLAYBACK_DURATION
#define PREDEFINED_USB_PLAYBACK_DURATION 10 // 10ms
+#endif
#define PREDEFINED_USB_CAPTURE_DURATION 10 // 10ms
#define LOW_LATENCY_CAPTURE_SAMPLE_RATE 48000
diff --git a/libaudio/audiohal_comv1/common_audiohal/Android.mk b/libaudio/audiohal_comv1/common_audiohal/Android.mk
index be72220..d2246f3 100644
--- a/libaudio/audiohal_comv1/common_audiohal/Android.mk
+++ b/libaudio/audiohal_comv1/common_audiohal/Android.mk
@@ -75,6 +75,10 @@
LOCAL_CFLAGS += -DPREDEFINED_LOW_CAPTURE_DURATION=$(BOARD_LOW_LATENCY_CAPTURE_DURATION)
endif
+ifneq ($(BOARD_USB_PLAYBACK_DURATION),)
+LOCAL_CFLAGS += -DPREDEFINED_USB_PLAYBACK_DURATION=$(BOARD_USB_PLAYBACK_DURATION)
+endif
+
LOCAL_MODULE := audio.primary.$(TARGET_SOC)
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional