[DESCRIPTION]
android.media.cts.AudioTrackLatencyTest#testPlaySmallBuffer test fail
junit.framework.AssertionFailedError: testPlaySmallBuffer: did it play all the data? expected:<1539> but was:<1024>
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.failNotEquals(Assert.java:287)
at junit.framework.Assert.assertEquals(Assert.java:67)
[SOLUTION]
1. 这个测项原理是判断固定量的数据在固定时间内是否有完成播放,如果没有就fail。贵司之前fail就是指定时间内数据未播放完,即存在播放超时的问题。 具体超时的原因在diff文档中有描述,见如下diff文件的title部分,即DRC Handler创建的时候需要去做XML相关的parser工作,会消耗较长的时间,这个工作在第一次使用到DRC的track时会去执行一次;现在把这个解析工作移到开机的时候做,请知悉。这个是最新的patch,贵司可以自行合入这一部分,请知悉。
[Detail] The GTS Test will spend too much time on creating DRC module. However the time is focusing on initializing XML Parser. To support to call the function in the audioflinger of audioserver [Solution] It could remove the initialization to other moment.
2.如果附件中的DIff档已经合入还是测试失败,请将手机恢复出厂设置,执行以下命令
run cts -m CtsMediaTestCases -t android.media.cts.AudioTrackLatencyTest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
ca6f7b3.diff From ca6f7b3dd6fc99f3fb75e25bc2e9eca1b715cd5f Mon Sep 17 00:00:00 2001 From: Hochi Huang <hochi.huang@mediatek.com> Date: Thu, 04 Jan 2018 15:03:47 +0800 Subject: [PATCH] [ALPS03713310] Add a new API to initialize XML Parser on Loud Driver [Detail] The GTS Test will spend too much time on creating DRC module. However the time is focusing on initializing XML Parser. To support to call the function in the audioflinger of audioserver [Solution] It could remove the initialization to other moment. Change-Id: I211c5d55a38061f5f6e5e7bf44c1ef39421a8517 CR-Id: ALPS03713310 Feature: BesLoudness --- diff --git a/MtkAudioLoud.cpp b/MtkAudioLoud.cpp index 1d73d40..88374fe 100755 --- a/MtkAudioLoud.cpp +++ b/MtkAudioLoud.cpp @@ -164,10 +164,7 @@ mState = ACE_STATE_INIT; - if (mAudioCompFltXmlRegCallback == false) { - mAudioCompFltXmlRegCallback = true; - audioComFltCustParamInit(); - } + initParser(); ALOGV("MtkAudioLoud Constructor\n"); } @@ -1235,6 +1232,15 @@ ALOGD("NvRam Format : V%d", ParameterVer); return 0; #endif +} + +bool MtkAudioLoud::initParser(void) { + if (mAudioCompFltXmlRegCallback == false) { + mAudioCompFltXmlRegCallback = true; + audioComFltCustParamInit(); + return true; + } + return false; } #else MtkAudioLoud::MtkAudioLoud() {}; @@ -1247,7 +1253,8 @@ ACE_ERRID MtkAudioLoud::close(void) {return ACE_SUCCESS;} ACE_ERRID MtkAudioLoud::resetBuffer(void) {return ACE_SUCCESS;} ACE_ERRID MtkAudioLoud::setWorkMode(uint32_t chNum, uint32_t smpRate, uint32_t workMode, bool bRampUpEnable) {return ACE_SUCCESS;} -int MtkAudioLoud::getBesSoundVer(void) {return 0;}; +int MtkAudioLoud::getBesSoundVer(void) {return 0;} +bool MtkAudioLoud::initParser(void) {return false;} void MtkAudioLoud::copyParam(void) {}; void MtkAudioLoud::copyParamSub(void) {}; ACE_ERRID MtkAudioLoud::process(void *pInputBuffer, /* Input, pointer to input buffer */ diff --git a/MtkAudioLoud.h b/MtkAudioLoud.h index 309def7..9839a7e 100644 --- a/MtkAudioLoud.h +++ b/MtkAudioLoud.h @@ -69,6 +69,7 @@ virtual ACE_ERRID setNotchFilterParam(uint32_t fc, uint32_t bw, int32_t th); virtual bool isZeroCoeffFilter(void); static int getBesSoundVer(void); + static bool initParser(void); virtual ~MtkAudioLoud(); private: void init(); f98377b.diff From f98377bf389e57f8cb84225f0d2e58505ee49b62 Mon Sep 17 00:00:00 2001 From: Chih-hao Chang <chih-hao.chang@mediatek.com> Date: Thu, 04 Jan 2018 19:57:23 +0800 Subject: [PATCH] [ALPS03713310] Add a new API to initialize XML Parser on Loud Driver [Detail] The GTS Test will spend too much time on creating DRC module. However the time is focusing on initializing XML Parser. To support to call the function in the audioflinger of audioserver [Solution] It could remove the initialization to other moment. Change-Id: I211c5d55a38061f5f6e5e7bf44c1ef39421a8517 CR-Id: ALPS03713310 Feature: BesLoudness --- diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk index 883dd70..427057b 100644 --- a/services/audioflinger/Android.mk +++ b/services/audioflinger/Android.mk @@ -89,6 +89,10 @@ endif ifeq ($(strip $(MTK_BESLOUDNESS_SUPPORT)),yes) ifneq ($(strip $(MTK_BESLOUDNESS_RUN_WITH_HAL)),yes) + LOCAL_SHARED_LIBRARIES += \ + libaudiocompensationfilter \ + libaudiocomponentengine + LOCAL_CFLAGS += -DMTK_AUDIOMIXER_ENABLE_DRC endif endif diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp index 4a5699e..e695cad 100644 --- a/services/audioflinger/Threads.cpp +++ b/services/audioflinger/Threads.cpp @@ -90,6 +90,12 @@ #include <media/AudioUtilmtk.h> #endif // MTK_AUDIO_DEBUG #include <media/MtkLogger.h> + +#if defined(MTK_AUDIOMIXER_ENABLE_DRC) +#include "AudioCompFltCustParam.h" +#endif + + // ---------------------------------------------------------------------------- // Note: the following macro is used for extremely verbose logging message. In @@ -3065,6 +3071,12 @@ checkSilentMode_l(); +#if defined(MTK_AUDIOMIXER_ENABLE_DRC) + ALOGD("%s, MtkAudioLoud::initParser()+", __FUNCTION__); + MtkAudioLoud::initParser(); + ALOGD("%s, MtkAudioLoud::initParser()-", __FUNCTION__); +#endif + while (!exitPending()) { // Log merge requests are performed during AudioFlinger binder transactions, but |