Merge "VTS driver and profiler module for tv cec hdmi hal"

This commit is contained in:
TreeHugger Robot
2016-12-01 03:37:43 +00:00
committed by Android (Google) Code Review
4 changed files with 920 additions and 0 deletions

118
tv/cec/1.0/vts/Android.mk Normal file
View File

@@ -0,0 +1,118 @@
#
# 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.
#
LOCAL_PATH := $(call my-dir)
# build VTS driver for TvCec v1.0.
include $(CLEAR_VARS)
LOCAL_MODULE := libvts_driver_hidl_tv_hdmi_cec@1.0
LOCAL_SRC_FILES := \
HdmiCec.vts \
HdmiCecCallback.vts \
types.vts \
LOCAL_SHARED_LIBRARIES += \
android.hardware.tv.cec@1.0 \
libbase \
libutils \
libcutils \
liblog \
libhidlbase \
libhidltransport \
libhwbinder \
libprotobuf-cpp-full \
libvts_common \
libvts_datatype \
libvts_measurement \
libvts_multidevice_proto \
LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
# build VTS profiler for HdmiCec
include $(CLEAR_VARS)
LOCAL_MODULE := libvts_profiler_hidl_tv_hdmi_cec@1.0
LOCAL_SRC_FILES := \
HdmiCec.vts \
types.vts \
LOCAL_C_INCLUDES += \
test/vts/drivers/libprofiling \
LOCAL_VTS_MODE := PROFILER
LOCAL_SHARED_LIBRARIES += \
android.hardware.tv.cec@1.0 \
libbase \
libcutils \
liblog \
libhidlbase \
libhidltransport \
libhwbinder \
libprotobuf-cpp-full \
libvts_common \
libvts_multidevice_proto \
libvts_profiling \
libutils \
LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)
# build VTS profiler for HdmiCecCallback
include $(CLEAR_VARS)
LOCAL_MODULE := libvts_profiler_hidl_tv_hdmi_cec_callback_@1.0
LOCAL_SRC_FILES := \
HdmiCecCallback.vts \
types.vts \
LOCAL_C_INCLUDES += \
test/vts/drivers/libprofiling \
LOCAL_VTS_MODE := PROFILER
LOCAL_SHARED_LIBRARIES += \
android.hardware.tv.cec@1.0 \
libbase \
libcutils \
liblog \
libhidlbase \
libhidltransport \
libhwbinder \
libprotobuf-cpp-full \
libvts_common \
libvts_multidevice_proto \
libvts_profiling \
libutils \
LOCAL_PROTOC_OPTIMIZE_TYPE := full
LOCAL_MULTILIB := both
include $(BUILD_SHARED_LIBRARY)

172
tv/cec/1.0/vts/HdmiCec.vts Normal file
View File

@@ -0,0 +1,172 @@
component_class: HAL_HIDL
component_type_version: 1.0
component_name: "IHdmiCec"
package: "android.hardware.tv.cec"
import: "android.hardware.tv.cec@1.0::IHdmiCecCallback"
import: "android.hardware.tv.cec@1.0::types"
interface: {
api: {
name: "addLogicalAddress"
return_type_hidl: {
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::Result"
}
arg: {
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
}
callflow: {
next: "*"
}
}
api: {
name: "clearLogicalAddress"
callflow: {
next: "addLogicalAddress"
}
callflow: {
exit: true
}
}
api: {
name: "getPhysicalAddress"
return_type_hidl: {
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::Result"
}
return_type_hidl: {
type: TYPE_SCALAR
scalar_type: "uint16_t"
}
callflow: {
next: "*"
}
}
api: {
name: "sendMessage"
return_type_hidl: {
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::SendMessageResult"
}
arg: {
type: TYPE_STRUCT
predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
}
callflow: {
next: "*"
}
}
api: {
name: "setCallback"
arg: {
type: TYPE_HIDL_CALLBACK
predefined_type: "IHdmiCecCallback"
is_callback: true
}
callflow: {
next: "addLogicalAddress"
}
callflow: {
entry: true
}
}
api: {
name: "getCecVersion"
return_type_hidl: {
type: TYPE_SCALAR
scalar_type: "int32_t"
}
callflow: {
next: "*"
}
}
api: {
name: "getVendorId"
return_type_hidl: {
type: TYPE_SCALAR
scalar_type: "uint32_t"
}
callflow: {
next: "*"
}
}
api: {
name: "getPortInfo"
return_type_hidl: {
type: TYPE_VECTOR
vector_value: {
type: TYPE_STRUCT
predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
}
}
callflow: {
next: "*"
}
}
api: {
name: "setOption"
arg: {
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::OptionKey"
}
arg: {
type: TYPE_SCALAR
scalar_type: "bool_t"
}
callflow: {
next: "*"
}
}
api: {
name: "setLanguage"
arg: {
type: TYPE_STRING
}
callflow: {
next: "*"
}
}
api: {
name: "enableAudioReturnChannel"
arg: {
type: TYPE_SCALAR
scalar_type: "int32_t"
}
arg: {
type: TYPE_SCALAR
scalar_type: "bool_t"
}
callflow: {
next: "*"
}
}
api: {
name: "isConnected"
return_type_hidl: {
type: TYPE_SCALAR
scalar_type: "bool_t"
}
arg: {
type: TYPE_SCALAR
scalar_type: "int32_t"
}
callflow: {
next: "*"
}
}
}

View File

@@ -0,0 +1,26 @@
component_class: HAL_HIDL
component_type_version: 1.0
component_name: "IHdmiCecCallback"
package: "android.hardware.tv.cec"
import: "android.hardware.tv.cec@1.0::types"
interface: {
api: {
name: "onCecMessage"
arg: {
type: TYPE_STRUCT
predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
}
}
api: {
name: "onHotplugEvent"
arg: {
type: TYPE_STRUCT
predefined_type: "::android::hardware::tv::cec::V1_0::HotplugEvent"
}
}
}

604
tv/cec/1.0/vts/types.vts Normal file
View File

@@ -0,0 +1,604 @@
component_class: HAL_HIDL
component_type_version: 1.0
component_name: "types"
package: "android.hardware.tv.cec"
attribute: {
name: "::android::hardware::tv::cec::V1_0::MaxLength"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "MESSAGE_BODY"
scalar_value: {
int32_t: 15
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::CecDeviceType"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "INACTIVE"
scalar_value: {
int32_t: -1
}
enumerator: "TV"
scalar_value: {
int32_t: 0
}
enumerator: "RECORDER"
scalar_value: {
int32_t: 1
}
enumerator: "TUNER"
scalar_value: {
int32_t: 3
}
enumerator: "PLAYBACK"
scalar_value: {
int32_t: 4
}
enumerator: "AUDIO_SYSTEM"
scalar_value: {
int32_t: 5
}
enumerator: "MAX"
scalar_value: {
int32_t: 5
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "TV"
scalar_value: {
int32_t: 0
}
enumerator: "RECORDER_1"
scalar_value: {
int32_t: 1
}
enumerator: "RECORDER_2"
scalar_value: {
int32_t: 2
}
enumerator: "TUNER_1"
scalar_value: {
int32_t: 3
}
enumerator: "PLAYBACK_1"
scalar_value: {
int32_t: 4
}
enumerator: "AUDIO_SYSTEM"
scalar_value: {
int32_t: 5
}
enumerator: "TUNER_2"
scalar_value: {
int32_t: 6
}
enumerator: "TUNER_3"
scalar_value: {
int32_t: 7
}
enumerator: "PLAYBACK_2"
scalar_value: {
int32_t: 8
}
enumerator: "RECORDER_3"
scalar_value: {
int32_t: 9
}
enumerator: "TUNER_4"
scalar_value: {
int32_t: 10
}
enumerator: "PLAYBACK_3"
scalar_value: {
int32_t: 11
}
enumerator: "FREE_USE"
scalar_value: {
int32_t: 14
}
enumerator: "UNREGISTERED"
scalar_value: {
int32_t: 15
}
enumerator: "BROADCAST"
scalar_value: {
int32_t: 15
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::CecMessageType"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "FEATURE_ABORT"
scalar_value: {
int32_t: 0
}
enumerator: "IMAGE_VIEW_ON"
scalar_value: {
int32_t: 4
}
enumerator: "TUNER_STEP_INCREMENT"
scalar_value: {
int32_t: 5
}
enumerator: "TUNER_STEP_DECREMENT"
scalar_value: {
int32_t: 6
}
enumerator: "TUNER_DEVICE_STATUS"
scalar_value: {
int32_t: 7
}
enumerator: "GIVE_TUNER_DEVICE_STATUS"
scalar_value: {
int32_t: 8
}
enumerator: "RECORD_ON"
scalar_value: {
int32_t: 9
}
enumerator: "RECORD_STATUS"
scalar_value: {
int32_t: 10
}
enumerator: "RECORD_OFF"
scalar_value: {
int32_t: 11
}
enumerator: "TEXT_VIEW_ON"
scalar_value: {
int32_t: 13
}
enumerator: "RECORD_TV_SCREEN"
scalar_value: {
int32_t: 15
}
enumerator: "GIVE_DECK_STATUS"
scalar_value: {
int32_t: 26
}
enumerator: "DECK_STATUS"
scalar_value: {
int32_t: 27
}
enumerator: "SET_MENU_LANGUAGE"
scalar_value: {
int32_t: 50
}
enumerator: "CLEAR_ANALOG_TIMER"
scalar_value: {
int32_t: 51
}
enumerator: "SET_ANALOG_TIMER"
scalar_value: {
int32_t: 52
}
enumerator: "TIMER_STATUS"
scalar_value: {
int32_t: 53
}
enumerator: "STANDBY"
scalar_value: {
int32_t: 54
}
enumerator: "PLAY"
scalar_value: {
int32_t: 65
}
enumerator: "DECK_CONTROL"
scalar_value: {
int32_t: 66
}
enumerator: "TIMER_CLEARED_STATUS"
scalar_value: {
int32_t: 67
}
enumerator: "USER_CONTROL_PRESSED"
scalar_value: {
int32_t: 68
}
enumerator: "USER_CONTROL_RELEASED"
scalar_value: {
int32_t: 69
}
enumerator: "GIVE_OSD_NAME"
scalar_value: {
int32_t: 70
}
enumerator: "SET_OSD_NAME"
scalar_value: {
int32_t: 71
}
enumerator: "SET_OSD_STRING"
scalar_value: {
int32_t: 100
}
enumerator: "SET_TIMER_PROGRAM_TITLE"
scalar_value: {
int32_t: 103
}
enumerator: "SYSTEM_AUDIO_MODE_REQUEST"
scalar_value: {
int32_t: 112
}
enumerator: "GIVE_AUDIO_STATUS"
scalar_value: {
int32_t: 113
}
enumerator: "SET_SYSTEM_AUDIO_MODE"
scalar_value: {
int32_t: 114
}
enumerator: "REPORT_AUDIO_STATUS"
scalar_value: {
int32_t: 122
}
enumerator: "GIVE_SYSTEM_AUDIO_MODE_STATUS"
scalar_value: {
int32_t: 125
}
enumerator: "SYSTEM_AUDIO_MODE_STATUS"
scalar_value: {
int32_t: 126
}
enumerator: "ROUTING_CHANGE"
scalar_value: {
int32_t: 128
}
enumerator: "ROUTING_INFORMATION"
scalar_value: {
int32_t: 129
}
enumerator: "ACTIVE_SOURCE"
scalar_value: {
int32_t: 130
}
enumerator: "GIVE_PHYSICAL_ADDRESS"
scalar_value: {
int32_t: 131
}
enumerator: "REPORT_PHYSICAL_ADDRESS"
scalar_value: {
int32_t: 132
}
enumerator: "REQUEST_ACTIVE_SOURCE"
scalar_value: {
int32_t: 133
}
enumerator: "SET_STREAM_PATH"
scalar_value: {
int32_t: 134
}
enumerator: "DEVICE_VENDOR_ID"
scalar_value: {
int32_t: 135
}
enumerator: "VENDOR_COMMAND"
scalar_value: {
int32_t: 137
}
enumerator: "VENDOR_REMOTE_BUTTON_DOWN"
scalar_value: {
int32_t: 138
}
enumerator: "VENDOR_REMOTE_BUTTON_UP"
scalar_value: {
int32_t: 139
}
enumerator: "GIVE_DEVICE_VENDOR_ID"
scalar_value: {
int32_t: 140
}
enumerator: "MENU_REQUEST"
scalar_value: {
int32_t: 141
}
enumerator: "MENU_STATUS"
scalar_value: {
int32_t: 142
}
enumerator: "GIVE_DEVICE_POWER_STATUS"
scalar_value: {
int32_t: 143
}
enumerator: "REPORT_POWER_STATUS"
scalar_value: {
int32_t: 144
}
enumerator: "GET_MENU_LANGUAGE"
scalar_value: {
int32_t: 145
}
enumerator: "SELECT_ANALOG_SERVICE"
scalar_value: {
int32_t: 146
}
enumerator: "SELECT_DIGITAL_SERVICE"
scalar_value: {
int32_t: 147
}
enumerator: "SET_DIGITAL_TIMER"
scalar_value: {
int32_t: 151
}
enumerator: "CLEAR_DIGITAL_TIMER"
scalar_value: {
int32_t: 153
}
enumerator: "SET_AUDIO_RATE"
scalar_value: {
int32_t: 154
}
enumerator: "INACTIVE_SOURCE"
scalar_value: {
int32_t: 157
}
enumerator: "CEC_VERSION"
scalar_value: {
int32_t: 158
}
enumerator: "GET_CEC_VERSION"
scalar_value: {
int32_t: 159
}
enumerator: "VENDOR_COMMAND_WITH_ID"
scalar_value: {
int32_t: 160
}
enumerator: "CLEAR_EXTERNAL_TIMER"
scalar_value: {
int32_t: 161
}
enumerator: "SET_EXTERNAL_TIMER"
scalar_value: {
int32_t: 162
}
enumerator: "INITIATE_ARC"
scalar_value: {
int32_t: 192
}
enumerator: "REPORT_ARC_INITIATED"
scalar_value: {
int32_t: 193
}
enumerator: "REPORT_ARC_TERMINATED"
scalar_value: {
int32_t: 194
}
enumerator: "REQUEST_ARC_INITIATION"
scalar_value: {
int32_t: 195
}
enumerator: "REQUEST_ARC_TERMINATION"
scalar_value: {
int32_t: 196
}
enumerator: "TERMINATE_ARC"
scalar_value: {
int32_t: 197
}
enumerator: "ABORT"
scalar_value: {
int32_t: 255
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::AbortReason"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "UNRECOGNIZED_MODE"
scalar_value: {
int32_t: 0
}
enumerator: "NOT_IN_CORRECT_MODE"
scalar_value: {
int32_t: 1
}
enumerator: "CANNOT_PROVIDE_SOURCE"
scalar_value: {
int32_t: 2
}
enumerator: "INVALID_OPERAND"
scalar_value: {
int32_t: 3
}
enumerator: "REFUSED"
scalar_value: {
int32_t: 4
}
enumerator: "UNABLE_TO_DETERMINE"
scalar_value: {
int32_t: 5
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::Result"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "SUCCESS"
scalar_value: {
int32_t: 0
}
enumerator: "FAILURE_UNKNOWN"
scalar_value: {
int32_t: 1
}
enumerator: "FAILURE_INVALID_ARGS"
scalar_value: {
int32_t: 2
}
enumerator: "FAILURE_INVALID_STATE"
scalar_value: {
int32_t: 3
}
enumerator: "FAILURE_NOT_SUPPORTED"
scalar_value: {
int32_t: 4
}
enumerator: "FAILURE_BUSY"
scalar_value: {
int32_t: 5
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::SendMessageResult"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "SUCCESS"
scalar_value: {
int32_t: 0
}
enumerator: "NACK"
scalar_value: {
int32_t: 1
}
enumerator: "BUSY"
scalar_value: {
int32_t: 2
}
enumerator: "FAIL"
scalar_value: {
int32_t: 3
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::HdmiPortType"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "INPUT"
scalar_value: {
int32_t: 0
}
enumerator: "OUTPUT"
scalar_value: {
int32_t: 1
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::OptionKey"
type: TYPE_ENUM
enum_value: {
scalar_type: "int32_t"
enumerator: "WAKEUP"
scalar_value: {
int32_t: 1
}
enumerator: "ENABLE_CEC"
scalar_value: {
int32_t: 2
}
enumerator: "SYSTEM_CEC_CONTROL"
scalar_value: {
int32_t: 3
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::CecMessage"
type: TYPE_STRUCT
struct_value: {
name: "initiator"
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
}
struct_value: {
name: "destination"
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
}
struct_value: {
name: "body"
type: TYPE_VECTOR
vector_value: {
type: TYPE_SCALAR
scalar_type: "uint8_t"
}
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::HotplugEvent"
type: TYPE_STRUCT
struct_value: {
name: "connected"
type: TYPE_SCALAR
scalar_type: "bool_t"
}
struct_value: {
name: "portId"
type: TYPE_SCALAR
scalar_type: "uint32_t"
}
}
attribute: {
name: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
type: TYPE_STRUCT
struct_value: {
name: "type"
type: TYPE_ENUM
predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortType"
}
struct_value: {
name: "portId"
type: TYPE_SCALAR
scalar_type: "uint32_t"
}
struct_value: {
name: "cecSupported"
type: TYPE_SCALAR
scalar_type: "bool_t"
}
struct_value: {
name: "arcSupported"
type: TYPE_SCALAR
scalar_type: "bool_t"
}
struct_value: {
name: "physicalAddress"
type: TYPE_SCALAR
scalar_type: "uint16_t"
}
}