Add new features to tuner AIDL HAL.
*) Adding key frame info (ScIndexMask) to DemuxFilterMediaEvent.
*) Add more AAC formats.
*) Support dumping frontend hardware information.
*) Move LNA from IFrontend to ITuner.
Bug: 202978951
Bug: 205265630
Bug: 184017033
Bug: 203623028
Test: atest VtsHalTvTunerTargetTest
Change-Id: I8256da7f41c96d7de66d2796dd35c51637078da0
diff --git a/tv/tuner/aidl/vts/functional/FrontendTests.cpp b/tv/tuner/aidl/vts/functional/FrontendTests.cpp
index 12b1f33..59a2582 100644
--- a/tv/tuner/aidl/vts/functional/FrontendTests.cpp
+++ b/tv/tuner/aidl/vts/functional/FrontendTests.cpp
@@ -475,6 +475,13 @@
feId = INVALID_ID;
}
+AssertionResult FrontendTests::verifyHardwareInfo() {
+ EXPECT_TRUE(mFrontend) << "Test with openFrontendById first.";
+ std::string info;
+ ndk::ScopedAStatus status = mFrontend->getHardwareInfo(&info);
+ return AssertionResult(status.isOk() && !info.empty());
+}
+
void FrontendTests::tuneTest(FrontendConfig frontendConf) {
int32_t feId;
getFrontendIdByType(frontendConf.type, feId);
@@ -491,6 +498,18 @@
ASSERT_TRUE(closeFrontend());
}
+void FrontendTests::debugInfoTest(FrontendConfig frontendConf) {
+ int32_t feId;
+ getFrontendIdByType(frontendConf.type, feId);
+ ASSERT_TRUE(feId != INVALID_ID);
+ ASSERT_TRUE(openFrontendById(feId));
+ ASSERT_TRUE(setFrontendCallback());
+ ASSERT_TRUE(tuneFrontend(frontendConf, false /*testWithDemux*/));
+ ASSERT_TRUE(verifyHardwareInfo());
+ ASSERT_TRUE(stopTuneFrontend(false /*testWithDemux*/));
+ ASSERT_TRUE(closeFrontend());
+}
+
void FrontendTests::scanTest(FrontendConfig frontendConf, FrontendScanType scanType) {
int32_t feId;
getFrontendIdByType(frontendConf.type, feId);
diff --git a/tv/tuner/aidl/vts/functional/FrontendTests.h b/tv/tuner/aidl/vts/functional/FrontendTests.h
index e5a9cd3..8f769a0 100644
--- a/tv/tuner/aidl/vts/functional/FrontendTests.h
+++ b/tv/tuner/aidl/vts/functional/FrontendTests.h
@@ -94,10 +94,12 @@
AssertionResult linkCiCam(int32_t ciCamId);
AssertionResult unlinkCiCam(int32_t ciCamId);
+ AssertionResult verifyHardwareInfo();
void getFrontendIdByType(FrontendType feType, int32_t& feId);
void tuneTest(FrontendConfig frontendConf);
void scanTest(FrontendConfig frontend, FrontendScanType type);
+ void debugInfoTest(FrontendConfig frontendConf);
void setDvrTests(DvrTests* dvrTests) { mExternalDvrTests = dvrTests; }
void setDemux(std::shared_ptr<IDemux> demux) { getDvrTests()->setDemux(demux); }
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
index 89e42df..202f83f 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
@@ -883,6 +883,14 @@
mFrontendTests.tuneTest(frontendMap[live.frontendId]);
}
+TEST_P(TunerFrontendAidlTest, getHardwareInfo) {
+ description("Test Frontend get hardware info");
+ if (!live.hasFrontendConnection) {
+ return;
+ }
+ mFrontendTests.debugInfoTest(frontendMap[live.frontendId]);
+}
+
TEST_P(TunerBroadcastAidlTest, BroadcastDataFlowVideoFilterTest) {
description("Test Video Filter functionality in Broadcast use case.");
if (!live.hasFrontendConnection) {