audio VTS: CompressedOffloadOutputStream to check the vendor API level am: 3f2e330990
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19340462 Change-Id: I85785803514d775f765e1ae4217a17591d7e4fb7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
b9b5652fcc
2 changed files with 9 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <numeric>
|
||||
|
||||
#include <android-base/chrono_utils.h>
|
||||
#include <cutils/properties.h>
|
||||
|
||||
#include "Generators.h"
|
||||
|
||||
|
@ -900,10 +901,16 @@ class CompressedOffloadOutputStreamTest : public PcmOnlyConfigOutputStreamTest {
|
|||
TEST_P(CompressedOffloadOutputStreamTest, Mp3FormatGaplessOffload) {
|
||||
doc::test("Check that compressed offload mix ports for MP3 implement gapless offload");
|
||||
const auto& flags = getOutputFlags();
|
||||
const bool isNewDeviceLaunchingOnTPlus = property_get_int32("ro.vendor.api_level", 0) >= 33;
|
||||
if (std::find_if(flags.begin(), flags.end(), [](const auto& flag) {
|
||||
return flag == toString(xsd::AudioInOutFlag::AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD);
|
||||
}) == flags.end()) {
|
||||
GTEST_SKIP() << "Compressed offload mix port does not support gapless offload";
|
||||
if (isNewDeviceLaunchingOnTPlus) {
|
||||
FAIL() << "New devices launching on Android T+ must support gapless offload, "
|
||||
<< "see VSR-4.3-001";
|
||||
} else {
|
||||
GTEST_SKIP() << "Compressed offload mix port does not support gapless offload";
|
||||
}
|
||||
}
|
||||
// FIXME: The presentation position is not updated if there is no zero padding in data.
|
||||
std::vector<uint8_t> offloadData(stream->getBufferSize());
|
||||
|
|
|
@ -34,6 +34,7 @@ cc_defaults {
|
|||
],
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
"libxml2",
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue