From a17d5ae5bede1f5518622ce767b345177f62a738 Mon Sep 17 00:00:00 2001 From: Shraddha Basantwani Date: Thu, 28 Jan 2021 09:47:12 +0530 Subject: [PATCH] CEC: Add VTS test to enable audio return channel Test: atest VtsHalTvCecV1_0TargetTest Bug: 172316717 Change-Id: Ia5d6e8f08ba68d75c68bffbf8d7a90cbf0b67532 --- .../vts/functional/VtsHalTvCecV1_0TargetTest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tv/cec/1.0/vts/functional/VtsHalTvCecV1_0TargetTest.cpp b/tv/cec/1.0/vts/functional/VtsHalTvCecV1_0TargetTest.cpp index b6f4b833d6..1ab040eddb 100644 --- a/tv/cec/1.0/vts/functional/VtsHalTvCecV1_0TargetTest.cpp +++ b/tv/cec/1.0/vts/functional/VtsHalTvCecV1_0TargetTest.cpp @@ -137,3 +137,16 @@ TEST_P(HdmiCecTest, SetLanguage) { Return ret = hdmiCec->setLanguage("eng"); EXPECT_TRUE(ret.isOk()); } + +TEST_P(HdmiCecTest, EnableAudioReturnChannel) { + hidl_vec ports; + Return ret = + hdmiCec->getPortInfo([&ports](hidl_vec list) { ports = list; }); + EXPECT_TRUE(ret.isOk()); + for (size_t i = 0; i < ports.size(); ++i) { + if (ports[i].arcSupported) { + ret = hdmiCec->enableAudioReturnChannel(ports[i].portId, true); + EXPECT_TRUE(ret.isOk()); + } + } +}