HDMI: Add Hotplug Detection Signal support
The HPD (Hotplug Detection) signal indicates the type of signal that the
HAL should use.
Bug: 258394639
Test: atest VtsHalTvHdmiAidlTargetTest
Change-Id: Ic391064d10636aca3c8e5c256c41d40144fbfe9c
diff --git a/tv/hdmi/aidl/default/HdmiMock.h b/tv/hdmi/aidl/default/HdmiMock.h
index 05795dd..51abaff 100644
--- a/tv/hdmi/aidl/default/HdmiMock.h
+++ b/tv/hdmi/aidl/default/HdmiMock.h
@@ -15,6 +15,7 @@
*/
#include <aidl/android/hardware/tv/hdmi/BnHdmi.h>
+#include <aidl/android/hardware/tv/hdmi/Result.h>
#include <algorithm>
#include <vector>
@@ -29,8 +30,10 @@
using ::aidl::android::hardware::tv::hdmi::BnHdmi;
using ::aidl::android::hardware::tv::hdmi::HdmiPortInfo;
using ::aidl::android::hardware::tv::hdmi::HdmiPortType;
+using ::aidl::android::hardware::tv::hdmi::HpdSignal;
using ::aidl::android::hardware::tv::hdmi::IHdmi;
using ::aidl::android::hardware::tv::hdmi::IHdmiCallback;
+using ::aidl::android::hardware::tv::hdmi::Result;
#define HDMI_MSG_IN_FIFO "/dev/hdmi_in_pipe"
#define MESSAGE_BODY_MAX_LENGTH 4
@@ -41,6 +44,8 @@
::ndk::ScopedAStatus getPortInfo(std::vector<HdmiPortInfo>* _aidl_return) override;
::ndk::ScopedAStatus isConnected(int32_t portId, bool* _aidl_return) override;
::ndk::ScopedAStatus setCallback(const std::shared_ptr<IHdmiCallback>& callback) override;
+ ::ndk::ScopedAStatus setHpdSignal(HpdSignal signal) override;
+ ::ndk::ScopedAStatus getHpdSignal(HpdSignal* _aidl_return) override;
void printEventBuf(const char* msg_buf, int len);
@@ -62,6 +67,9 @@
uint16_t mPhysicalAddress = 0xFFFF;
int mTotalPorts = 1;
+ // HPD Signal being used
+ HpdSignal mHpdSignal = HpdSignal::HDMI_HPD_PHYSICAL;
+
// Testing variables
// Input file descriptor
int mInputFile;