summaryrefslogtreecommitdiff
authorqidi.huang <qidi.huang@amlogic.com>2017-11-17 08:18:35 (GMT)
committer qidi.huang <qidi.huang@amlogic.com>2017-11-17 08:41:52 (GMT)
commit1255abefa591b4aeaac3929bd4bf877e31fd81a8 (patch)
treee9c0ca6dcfde4025d72152b4e7267d95d1044192
parentf314d56972dea7eb542a203f42aeaba3669b96bf (diff)
downloadaudio-1255abefa591b4aeaac3929bd4bf877e31fd81a8.zip
audio-1255abefa591b4aeaac3929bd4bf877e31fd81a8.tar.gz
audio-1255abefa591b4aeaac3929bd4bf877e31fd81a8.tar.bz2
Audio: fix CTS test4_1MeasurePeakRms failure. [1/1]
PD# 152800 1) PERIOD_SIZE is too big for AudioFlinger to refresh visualizer processed data buffer (mPastMeasurements[]). Decrease PERIOD_SIZE from 1024 to 512, thus AudioFlinger can save processed data to buffer in time. 2) Recover LOG_TAG to correct definition. Change-Id: I03cbbd38c17ee5696f116e62890ad2d94fb02373
Diffstat
-rw-r--r--audio_hw.h7
-rw-r--r--rcaudio/def.h8
2 files changed, 10 insertions, 5 deletions
diff --git a/audio_hw.h b/audio_hw.h
index ba95ebc..4777026 100644
--- a/audio_hw.h
+++ b/audio_hw.h
@@ -10,8 +10,13 @@
#define CARD_AMLOGIC_DEFAULT CARD_AMLOGIC_BOARD
/* ALSA ports for AML */
#define PORT_MM 1
+
/* number of frames per period */
-#define DEFAULT_PERIOD_SIZE 1024 //(1024 * 2)
+/*
+ * change DEFAULT_PERIOD_SIZE from 1024 to 512 for passing CTS
+ * test case test4_1MeasurePeakRms(android.media.cts.VisualizerTest)
+ */
+#define DEFAULT_PERIOD_SIZE 512 //1024 //(1024 * 2)
static unsigned PERIOD_SIZE = DEFAULT_PERIOD_SIZE;
/* number of periods for low power playback */
#define PLAYBACK_PERIOD_COUNT 4
diff --git a/rcaudio/def.h b/rcaudio/def.h
index 20db58b..595541c 100644
--- a/rcaudio/def.h
+++ b/rcaudio/def.h
@@ -11,10 +11,10 @@ extern "C" {
#define RAS_STOP_CMD 0x02
#define RAS_DATA_RAW_CMD 0x03
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "huitong_audio_hw"
+//#ifdef LOG_TAG
+//#undef LOG_TAG
+//#endif
+//#define LOG_TAG "huitong_audio_hw"
//#define LOG_NDEBUG 0
//#define LOG_NDEBUG_FUNCTION