summaryrefslogtreecommitdiff
authorTellen Yu <tellen.yu@amlogic.com>2017-09-25 11:07:54 (GMT)
committer Tellen Yu <tellen.yu@amlogic.com>2017-10-19 07:21:47 (GMT)
commitba07612149570e3134d78bc63e7ead5e6e0c1b53 (patch)
treeeae4f7f54002644e0ff44e3d34427b41578eb42e
parentb13ab7d4cd7d9721235bdfae2f9e3c45788146a2 (diff)
downloadinterfaces-ba07612149570e3134d78bc63e7ead5e6e0c1b53.zip
interfaces-ba07612149570e3134d78bc63e7ead5e6e0c1b53.tar.gz
interfaces-ba07612149570e3134d78bc63e7ead5e6e0c1b53.tar.bz2
treble: enable full treble mode [4/9]
PD# 151674 in full treble mode, vendor process can not use normal binder, so hdmi cec daemon use hwbiner interfaces Change-Id: I8f474b1727faf3f6237ae42776a11d90b2bdf2ad
Diffstat
-rw-r--r--Android.bp1
-rw-r--r--hdmicec/1.0/Android.bp97
-rw-r--r--hdmicec/1.0/Android.mk468
-rw-r--r--hdmicec/1.0/IDroidHdmiCEC.hal163
-rw-r--r--hdmicec/1.0/IDroidHdmiCecCallback.hal25
-rw-r--r--hdmicec/1.0/types.hal133
-rw-r--r--hdmicec/Android.bp4
-rw-r--r--systemcontrol/1.0/Android.bp11
-rw-r--r--systemcontrol/1.0/Android.mk88
-rw-r--r--systemcontrol/1.0/ISystemControl.hal116
-rw-r--r--systemcontrol/1.0/ISystemControlCallback.hal22
-rw-r--r--systemcontrol/1.0/types.hal16
12 files changed, 1137 insertions, 7 deletions
diff --git a/Android.bp b/Android.bp
index c5fb019..caa0ecb 100644
--- a/Android.bp
+++ b/Android.bp
@@ -2,4 +2,5 @@
subdirs = [
"systemcontrol/1.0",
"systemcontrol/1.0/vts/functional",
+ "hdmicec/1.0",
]
diff --git a/hdmicec/1.0/Android.bp b/hdmicec/1.0/Android.bp
new file mode 100644
index 0000000..cc38a95
--- a/dev/null
+++ b/hdmicec/1.0/Android.bp
@@ -0,0 +1,97 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "vendor.amlogic.hardware.hdmicec@1.0_hal",
+ srcs: [
+ "types.hal",
+ "IDroidHdmiCEC.hal",
+ "IDroidHdmiCecCallback.hal",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.hdmicec@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.hdmicec@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.hdmicec@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/hdmicec/1.0/types.cpp",
+ "vendor/amlogic/hardware/hdmicec/1.0/DroidHdmiCECAll.cpp",
+ "vendor/amlogic/hardware/hdmicec/1.0/DroidHdmiCecCallbackAll.cpp",
+ ],
+}
+
+genrule {
+ name: "vendor.amlogic.hardware.hdmicec@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.hdmicec@1.0",
+ srcs: [
+ ":vendor.amlogic.hardware.hdmicec@1.0_hal",
+ ],
+ out: [
+ "vendor/amlogic/hardware/hdmicec/1.0/types.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/hwtypes.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/IDroidHdmiCEC.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/IHwDroidHdmiCEC.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BnHwDroidHdmiCEC.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BpHwDroidHdmiCEC.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BsDroidHdmiCEC.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/IDroidHdmiCecCallback.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/IHwDroidHdmiCecCallback.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BnHwDroidHdmiCecCallback.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BpHwDroidHdmiCecCallback.h",
+ "vendor/amlogic/hardware/hdmicec/1.0/BsDroidHdmiCecCallback.h",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.hdmicec@1.0",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.hdmicec@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.hdmicec@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.hdmicec@1.0_genc++_headers"],
+ vendor_available: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
+
+cc_library_shared {
+ name: "vendor.amlogic.hardware.hdmicec@1.0_vendor",
+ defaults: ["hidl-module-defaults"],
+ generated_sources: ["vendor.amlogic.hardware.hdmicec@1.0_genc++"],
+ generated_headers: ["vendor.amlogic.hardware.hdmicec@1.0_genc++_headers"],
+ export_generated_headers: ["vendor.amlogic.hardware.hdmicec@1.0_genc++_headers"],
+ vendor: true,
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/hdmicec/1.0/Android.mk b/hdmicec/1.0/Android.mk
new file mode 100644
index 0000000..2b7cd9d
--- a/dev/null
+++ b/hdmicec/1.0/Android.mk
@@ -0,0 +1,468 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.hdmicec-V1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java \
+
+
+#
+# Build types.hal (CecEvent)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecLogicalAddress)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecLogicalAddress.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecLogicalAddress
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessage)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecMessage.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecMessage
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortInfo)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HdmiPortInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HdmiPortInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortType)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HdmiPortType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HdmiPortType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HotplugEvent)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HotplugEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HotplugEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OptionKey)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/OptionKey.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.OptionKey
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SendMessageResult)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/SendMessageResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.SendMessageResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidHdmiCEC.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/IDroidHdmiCEC.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidHdmiCEC.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::IDroidHdmiCEC
+
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCEC.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidHdmiCecCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/IDroidHdmiCecCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::IDroidHdmiCecCallback
+
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := vendor.amlogic.hardware.hdmicec-V1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hidl.base-V1.0-java-static \
+
+
+#
+# Build types.hal (CecEvent)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecLogicalAddress)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecLogicalAddress.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecLogicalAddress
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessage)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/CecMessage.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.CecMessage
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortInfo)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HdmiPortInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HdmiPortInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortType)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HdmiPortType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HdmiPortType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HotplugEvent)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/HotplugEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.HotplugEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OptionKey)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/OptionKey.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.OptionKey
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SendMessageResult)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/SendMessageResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::types.SendMessageResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidHdmiCEC.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/IDroidHdmiCEC.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidHdmiCEC.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::IDroidHdmiCEC
+
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCEC.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IDroidHdmiCecCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/hdmicec/V1_0/IDroidHdmiCecCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.hdmicec@1.0::IDroidHdmiCecCallback
+
+$(GEN): $(LOCAL_PATH)/IDroidHdmiCecCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hdmicec/1.0/IDroidHdmiCEC.hal b/hdmicec/1.0/IDroidHdmiCEC.hal
new file mode 100644
index 0000000..ec9ad7e
--- a/dev/null
+++ b/hdmicec/1.0/IDroidHdmiCEC.hal
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.amlogic.hardware.hdmicec@1.0;
+
+import IDroidHdmiCecCallback;
+
+interface IDroidHdmiCEC {
+ /**
+ * open cec device
+ *
+ * @return result OK if open device success
+ * FAIL if open fail
+ *
+ */
+ openCecDevice()
+ generates (Result result, int32_t addr);
+
+ closeCecDevice();
+
+ /**
+ * Returns the CEC version supported by underlying hardware.
+ *
+ * @return version the CEC version supported by underlying hardware.
+ */
+ @callflow(next={"*"})
+ getCecVersion() generates (int32_t version);
+
+ /**
+ * Gets the identifier of the vendor.
+ *
+ * @return vendorId Identifier of the vendor that is the 24-bit unique
+ * company ID obtained from the IEEE Registration Authority
+ * Committee (RAC). The upper 8 bits must be 0.
+ */
+ @callflow(next={"*"})
+ getVendorId() generates (uint32_t vendorId);
+
+ /**
+ * Gets the CEC physical address.
+ *
+ * The physical address depends on the topology of the network formed by
+ * connected HDMI devices. It is therefore likely to change if the cable is
+ * plugged off and on again. It is advised to call getPhysicalAddress to get
+ * the updated address when hot plug event takes place.
+ *
+ * @return result Result status of the operation. SUCCESS if successful,
+ * FAILURE_INVALID_STATE if HAL cannot retrieve the physical
+ * address.
+ * @return addr Physical address of this device.
+ */
+ @callflow(next="*")
+ getPhysicalAddress() generates (Result result, uint16_t addr);
+
+ /**
+ * Transmits HDMI-CEC message to other HDMI device.
+ *
+ * The method must be designed to return in a certain amount of time and not
+ * hanging forever which may happen if CEC signal line is pulled low for
+ * some reason.
+ *
+ * It must try retransmission at least once as specified in the section '7.1
+ * Frame Re-transmissions' of the CEC Spec 1.4b.
+ *
+ * @param message CEC message to be sent to other HDMI device.
+ * @return result Result status of the operation. SUCCESS if successful,
+ * NACK if the sent message is not acknowledged,
+ * BUSY if the CEC bus is busy.
+ */
+ @callflow(next="*")
+ sendMessage(CecMessage message, bool isExtend) generates (SendMessageResult result);
+
+ /**
+ * Gets the hdmi port information of underlying hardware.
+ *
+ * @return infos The list of HDMI port information
+ */
+ @callflow(next={"*"})
+ getPortInfo() generates (vec<HdmiPortInfo> infos);
+
+ /**
+ * Passes the logical address that must be used in this system.
+ *
+ * HAL must use it to configure the hardware so that the CEC commands
+ * addressed the given logical address can be filtered in. This method must
+ * be able to be called as many times as necessary in order to support
+ * multiple logical devices.
+ *
+ * @param addr Logical address that must be used in this system. It must be
+ * in the range of valid logical addresses for the call to succeed.
+ * @return result Result status of the operation. SUCCESS if successful,
+ * FAILURE_INVALID_ARGS if the given logical address is invalid,
+ * FAILURE_BUSY if device or resource is busy
+ */
+ @callflow(next={"*"})
+ addLogicalAddress(CecLogicalAddress addr) generates (Result result);
+
+ /**
+ * Clears all the logical addresses.
+ *
+ * It is used when the system doesn't need to process CEC command any more,
+ * hence to tell HAL to stop receiving commands from the CEC bus, and change
+ * the state back to the beginning.
+ */
+ @callflow(next="addLogicalAddress")
+ @exit
+ clearLogicalAddress();
+
+ /**
+ * Sets flags controlling the way HDMI-CEC service works down to HAL
+ * implementation. Those flags must be used in case the feature needs update
+ * in HAL itself, firmware or microcontroller.
+ *
+ * @param key The key of the option to be updated with a new value.
+ * @param value Value to be set.
+ */
+ @callflow(next="*")
+ setOption(OptionKey key, bool value);
+
+ /**
+ * Configures ARC circuit in the hardware logic to start or stop the
+ * feature.
+ *
+ * @param portId Port id to be configured.
+ * @param enable Flag must be either true to start the feature or false to
+ * stop it.
+ */
+ @callflow(next="*")
+ enableAudioReturnChannel(int32_t portId, bool enable);
+
+ /**
+ * Gets the connection status of the specified port.
+ *
+ * @param portId Port id to be inspected for the connection status.
+ * @return status True if a device is connected, otherwise false. The HAL
+ * must watch for +5V power signal to determine the status.
+ */
+ @callflow(next="*")
+ isConnected(int32_t portId) generates (bool status);
+
+ /**
+ * Sets a callback that HDMI-CEC HAL must later use for incoming CEC
+ * messages or internal HDMI events.
+ *
+ * @param callback Callback object to pass hdmi events to the system. The
+ * previously registered callback must be replaced with this one.
+ */
+ @entry
+ setCallback(IDroidHdmiCecCallback callback);
+};
diff --git a/hdmicec/1.0/IDroidHdmiCecCallback.hal b/hdmicec/1.0/IDroidHdmiCecCallback.hal
new file mode 100644
index 0000000..2270b8b
--- a/dev/null
+++ b/hdmicec/1.0/IDroidHdmiCecCallback.hal
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.amlogic.hardware.hdmicec@1.0;
+
+interface IDroidHdmiCecCallback {
+ /**
+ * The callback function that must be called by HAL implementation to notify
+ * the system of new CEC message arrival.
+ */
+ oneway notifyCallback(CecEvent message);
+};
diff --git a/hdmicec/1.0/types.hal b/hdmicec/1.0/types.hal
new file mode 100644
index 0000000..c7da364
--- a/dev/null
+++ b/hdmicec/1.0/types.hal
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.amlogic.hardware.hdmicec@1.0;
+
+enum Result : int32_t {
+ SUCCESS = 0,
+ FAILURE_UNKNOWN = 1,
+ FAILURE_INVALID_ARGS = 2,
+ FAILURE_INVALID_STATE = 3,
+ FAILURE_NOT_SUPPORTED = 4,
+ FAILURE_BUSY = 5,
+};
+
+/**
+ * error code used for send_message.
+ */
+enum SendMessageResult : int32_t {
+ SUCCESS = 0,
+ NACK = 1, // not acknowledged
+ BUSY = 2, // bus is busy
+ FAIL = 3,
+};
+
+enum CecLogicalAddress : int32_t {
+ TV = 0,
+ RECORDER_1 = 1,
+ RECORDER_2 = 2,
+ TUNER_1 = 3,
+ PLAYBACK_1 = 4,
+ AUDIO_SYSTEM = 5,
+ TUNER_2 = 6,
+ TUNER_3 = 7,
+ PLAYBACK_2 = 8,
+ RECORDER_3 = 9,
+ TUNER_4 = 10,
+ PLAYBACK_3 = 11,
+ FREE_USE = 14,
+ UNREGISTERED = 15, // as Initiator address
+ BROADCAST = 15, // as Destination address
+};
+
+/**
+ * HDMI port type.
+ */
+enum HdmiPortType : int32_t {
+ INPUT = 0,
+ OUTPUT = 1,
+};
+
+/**
+ * Options used for IHdmiCec.setOption()
+ */
+enum OptionKey : int32_t {
+ /**
+ * When set to false, HAL does not wake up the system upon receiving <Image
+ * View On> or <Text View On>. Used when user changes the TV settings to
+ * disable the auto TV on functionality.
+ * True by default.
+ */
+ WAKEUP = 1,
+
+ /**
+ * When set to false, all the CEC commands are discarded. Used when user
+ * changes the TV settings to disable CEC functionality.
+ * True by default.
+ */
+ ENABLE_CEC = 2,
+
+ /**
+ * Setting this flag to false means Android system must stop handling CEC
+ * service and yield the control over to the microprocessor that is powered
+ * on through the standby mode. When set to true, the system must gain the
+ * control over, hence telling the microprocessor to stop handling the CEC
+ * commands. For example, this may be called when system goes in and out of
+ * standby mode to notify the microprocessor that it should start/stop
+ * handling CEC commands on behalf of the system.
+ * False by default.
+ */
+ SYSTEM_CEC_CONTROL = 3,
+
+ /** Option 4 not used */
+};
+
+struct CecMessage {
+ /** logical address of sender */
+ CecLogicalAddress initiator;
+
+ /** logical address of receiver */
+ CecLogicalAddress destination;
+
+ /**
+ * The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in
+ * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */
+ vec<uint8_t> body;
+};
+
+struct HotplugEvent {
+ bool connected;
+ uint32_t portId;
+};
+
+struct CecEvent {
+ int32_t eventType;
+ CecMessage cec;
+ HotplugEvent hotplug;
+ int32_t logicalAddress;
+};
+
+
+/**
+ * HDMI port descriptor
+ */
+struct HdmiPortInfo {
+ HdmiPortType type;
+ uint32_t portId; // Should start from 1 which corresponds to HDMI "port 1".
+ bool cecSupported;
+ bool arcSupported;
+ uint16_t physicalAddress;
+};
diff --git a/hdmicec/Android.bp b/hdmicec/Android.bp
new file mode 100644
index 0000000..bbb3e4b
--- a/dev/null
+++ b/hdmicec/Android.bp
@@ -0,0 +1,4 @@
+// This is an autogenerated file, do not edit.
+subdirs = [
+ "1.0",
+]
diff --git a/systemcontrol/1.0/Android.bp b/systemcontrol/1.0/Android.bp
index fa39261..b7ed05c 100644
--- a/systemcontrol/1.0/Android.bp
+++ b/systemcontrol/1.0/Android.bp
@@ -5,26 +5,28 @@ filegroup {
srcs: [
"types.hal",
"ISystemControl.hal",
+ "ISystemControlCallback.hal",
],
}
genrule {
name: "vendor.amlogic.hardware.systemcontrol@1.0_genc++",
tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -rvendor.amlogic.hardware:vendor/amlogic/interfaces -randroid.hidl:system/libhidl/transport vendor.amlogic.hardware.systemcontrol@1.0",
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.systemcontrol@1.0",
srcs: [
":vendor.amlogic.hardware.systemcontrol@1.0_hal",
],
out: [
"vendor/amlogic/hardware/systemcontrol/1.0/types.cpp",
"vendor/amlogic/hardware/systemcontrol/1.0/SystemControlAll.cpp",
+ "vendor/amlogic/hardware/systemcontrol/1.0/SystemControlCallbackAll.cpp",
],
}
genrule {
name: "vendor.amlogic.hardware.systemcontrol@1.0_genc++_headers",
tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -rvendor.amlogic.hardware:vendor/amlogic/interfaces -randroid.hidl:system/libhidl/transport vendor.amlogic.hardware.systemcontrol@1.0",
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hidl:system/libhidl/transport -rvendor.amlogic.hardware:vendor/amlogic/interfaces vendor.amlogic.hardware.systemcontrol@1.0",
srcs: [
":vendor.amlogic.hardware.systemcontrol@1.0_hal",
],
@@ -36,6 +38,11 @@ genrule {
"vendor/amlogic/hardware/systemcontrol/1.0/BnHwSystemControl.h",
"vendor/amlogic/hardware/systemcontrol/1.0/BpHwSystemControl.h",
"vendor/amlogic/hardware/systemcontrol/1.0/BsSystemControl.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/ISystemControlCallback.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/IHwSystemControlCallback.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BnHwSystemControlCallback.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BpHwSystemControlCallback.h",
+ "vendor/amlogic/hardware/systemcontrol/1.0/BsSystemControlCallback.h",
],
}
diff --git a/systemcontrol/1.0/Android.mk b/systemcontrol/1.0/Android.mk
index d068a0d..64b7859 100644
--- a/systemcontrol/1.0/Android.mk
+++ b/systemcontrol/1.0/Android.mk
@@ -17,6 +17,25 @@ LOCAL_JAVA_LIBRARIES := \
#
+# Build types.hal (DroidDisplayInfo)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/DroidDisplayInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.systemcontrol@1.0::types.DroidDisplayInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (Result)
#
GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/Result.java
@@ -27,8 +46,8 @@ $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
- -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
-randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
vendor.amlogic.hardware.systemcontrol@1.0::types.Result
$(GEN): $(LOCAL_PATH)/types.hal
@@ -42,19 +61,40 @@ GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemContro
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISystemControlCallback.hal
+$(GEN): $(LOCAL_PATH)/ISystemControlCallback.hal
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
$(GEN): $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
- -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
-randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
vendor.amlogic.hardware.systemcontrol@1.0::ISystemControl
$(GEN): $(LOCAL_PATH)/ISystemControl.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISystemControlCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemControlCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControlCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.systemcontrol@1.0::ISystemControlCallback
+
+$(GEN): $(LOCAL_PATH)/ISystemControlCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_JAVA_LIBRARY)
@@ -73,6 +113,25 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
#
+# Build types.hal (DroidDisplayInfo)
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/DroidDisplayInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.systemcontrol@1.0::types.DroidDisplayInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (Result)
#
GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/Result.java
@@ -83,8 +142,8 @@ $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
- -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
-randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
vendor.amlogic.hardware.systemcontrol@1.0::types.Result
$(GEN): $(LOCAL_PATH)/types.hal
@@ -98,19 +157,40 @@ GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemContro
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControl.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISystemControlCallback.hal
+$(GEN): $(LOCAL_PATH)/ISystemControlCallback.hal
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
$(GEN): $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-Ljava \
- -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
-randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
vendor.amlogic.hardware.systemcontrol@1.0::ISystemControl
$(GEN): $(LOCAL_PATH)/ISystemControl.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISystemControlCallback.hal
+#
+GEN := $(intermediates)/vendor/amlogic/hardware/systemcontrol/V1_0/ISystemControlCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISystemControlCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hidl:system/libhidl/transport \
+ -rvendor.amlogic.hardware:vendor/amlogic/interfaces \
+ vendor.amlogic.hardware.systemcontrol@1.0::ISystemControlCallback
+
+$(GEN): $(LOCAL_PATH)/ISystemControlCallback.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/systemcontrol/1.0/ISystemControl.hal b/systemcontrol/1.0/ISystemControl.hal
index 7c490c4..99dd15b 100644
--- a/systemcontrol/1.0/ISystemControl.hal
+++ b/systemcontrol/1.0/ISystemControl.hal
@@ -16,8 +16,9 @@
package vendor.amlogic.hardware.systemcontrol@1.0;
+import ISystemControlCallback;
-interface ISystemControl {
+interface ISystemControl {
/**
* get support hdmi display mode list
* @param supportDispModes return data
@@ -62,4 +63,117 @@ interface ISystemControl {
isHDCPTxAuthSuccess()
generates (Result result);
+ getProperty(string key)
+ generates (Result result, string value);
+
+ getPropertyString(string key, string def)
+ generates (Result result, string value);
+
+ getPropertyInt(string key, int32_t def)
+ generates (Result result, int32_t value);
+
+ getPropertyLong(string key, int64_t def)
+ generates (Result result, int64_t value);
+
+ getPropertyBoolean(string key, bool def)
+ generates (Result result, bool value);
+
+ setProperty(string key, string value)
+ generates (Result result);
+
+ readSysfs(string path)
+ generates (Result result, string value);
+
+ writeSysfs(string path, string value)
+ generates (Result result);
+
+ readHdcpRX22Key(int32_t size)
+ generates (Result result, string value, int32_t len);
+
+ writeHdcpRX22Key(string key)
+ generates (Result result);
+
+ readHdcpRX14Key(int32_t size)
+ generates (Result result, string value, int32_t len);
+
+ writeHdcpRX14Key(string key)
+ generates (Result result);
+
+ writeHdcpRXImg(string path)
+ generates (Result result);
+
+ getBootEnv(string key)
+ generates (Result result, string value);
+
+ setBootEnv(string key, string value);
+
+ getDroidDisplayInfo()
+ generates (Result result, DroidDisplayInfo info);
+
+ loopMountUnmount(int32_t isMount, string path);
+
+ setSourceOutputMode(string mode);
+
+ setSinkOutputMode(string mode);
+
+ setDigitalMode(string mode);
+
+ setOsdMouseMode(string mode);
+
+ setOsdMousePara(int32_t x, int32_t y, int32_t w, int32_t h);
+
+ setPosition(int32_t left, int32_t top, int32_t width, int32_t height);
+
+ getPosition(string mode)
+ generates (Result result, int32_t x, int32_t y, int32_t w, int32_t h);
+
+ saveDeepColorAttr(string mode, string dcValue);
+
+ getDeepColorAttr(string mode)
+ generates (Result result, string value);
+
+ /**
+ * @param 1: enable
+ * 0: disable
+ */
+ setDolbyVisionState(int32_t state);
+
+ sinkSupportDolbyVision()
+ generates (Result result, string mode, bool support);
+
+ setHdrMode(string mode);
+
+ setSdrMode(string mode);
+
+ resolveResolutionValue(string mode)
+ generates (Result result, int64_t value);
+
+ setCallback(ISystemControlCallback callback);
+
+ //3D
+ set3DMode(string mode);
+
+ init3DSetting();
+
+ getVideo3DFormat()
+ generates (Result result, int32_t format);
+
+ getDisplay3DTo2DFormat()
+ generates (Result result, int32_t format);
+
+ setDisplay3DTo2DFormat(int32_t format);
+
+ setDisplay3DFormat(int32_t format);
+
+ getDisplay3DFormat()
+ generates (Result result, int32_t format);
+
+ setOsd3DFormat(int32_t format);
+
+ switch3DTo2D(int32_t format);
+
+ switch2DTo3D(int32_t format);
+
+ autoDetect3DForMbox();
+
};
diff --git a/systemcontrol/1.0/ISystemControlCallback.hal b/systemcontrol/1.0/ISystemControlCallback.hal
new file mode 100644
index 0000000..97137c1
--- a/dev/null
+++ b/systemcontrol/1.0/ISystemControlCallback.hal
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package vendor.amlogic.hardware.systemcontrol@1.0;
+
+interface ISystemControlCallback {
+
+ oneway notifyCallback(int32_t event);
+};
diff --git a/systemcontrol/1.0/types.hal b/systemcontrol/1.0/types.hal
index d02d59f..bdd3fc0 100644
--- a/systemcontrol/1.0/types.hal
+++ b/systemcontrol/1.0/types.hal
@@ -19,4 +19,20 @@ package vendor.amlogic.hardware.systemcontrol@1.0;
enum Result : uint32_t {
OK, // Success
FAIL, // Failure, unknown reason
+};
+
+struct DroidDisplayInfo {
+ //1:tablet 2:MBOX 3:TV
+ int32_t type;
+ string socType;
+ string defaultUI;
+ int32_t fb0w;
+ int32_t fb0h;
+ int32_t fb0bits;
+ int32_t fb0trip;//Triple Buffer enable or not
+
+ int32_t fb1w;
+ int32_t fb1h;
+ int32_t fb1bits;
+ int32_t fb1trip;//Triple Buffer enable or not
}; \ No newline at end of file