mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "CEC: Add VTS test to get physical address (HAL 1.1)" into sc-dev
This commit is contained in:
@@ -46,6 +46,7 @@ using ::android::hardware::tv::cec::V1_1::IHdmiCecCallback;
|
||||
|
||||
#define CEC_VERSION 0x05
|
||||
#define INCORRECT_VENDOR_ID 0x00
|
||||
#define TV_PHYSICAL_ADDRESS 0x0000
|
||||
|
||||
// The main test class for TV CEC HAL.
|
||||
class HdmiCecTest : public ::testing::TestWithParam<std::string> {
|
||||
@@ -126,6 +127,19 @@ TEST_P(HdmiCecTest, ClearAddLogicalAddress) {
|
||||
EXPECT_EQ(ret, Result::SUCCESS);
|
||||
}
|
||||
|
||||
TEST_P(HdmiCecTest, PhysicalAddress) {
|
||||
Result result;
|
||||
uint16_t addr;
|
||||
Return<void> ret = hdmiCec->getPhysicalAddress([&result, &addr](Result res, uint16_t paddr) {
|
||||
result = res;
|
||||
addr = paddr;
|
||||
});
|
||||
EXPECT_EQ(result, Result::SUCCESS);
|
||||
if (!hasDeviceType(CecDeviceType::TV)) {
|
||||
EXPECT_NE(addr, TV_PHYSICAL_ADDRESS);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(HdmiCecTest, SendMessage) {
|
||||
CecMessage message;
|
||||
message.initiator = CecLogicalAddress::PLAYBACK_1;
|
||||
|
||||
Reference in New Issue
Block a user