1/* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package android.stats.hdmi; 20option java_multiple_files = true; 21option java_outer_classname = "HdmiStatsEnums"; 22 23// HDMI CEC logical addresses. 24// Values correspond to "CEC Table 5 Logical Addresses" in the HDMI CEC 1.4b spec. 25enum LogicalAddress { 26 LOGICAL_ADDRESS_UNKNOWN = -1; 27 TV = 0; 28 RECORDING_DEVICE_1 = 1; 29 RECORDING_DEVICE_2 = 2; 30 TUNER_1 = 3; 31 PLAYBACK_DEVICE_1 = 4; 32 AUDIO_SYSTEM = 5; 33 TUNER_2 = 6; 34 TUNER_3 = 7; 35 PLAYBACK_DEVICE_2 = 8; 36 RECORDING_DEVICE_3 = 9; 37 TUNER_4 = 10; 38 PLAYBACK_DEVICE_3 = 11; 39 RESERVED_1 = 12; 40 RESERVED_2 = 13; 41 SPECIFIC_USE = 14; 42 UNREGISTERED_OR_BROADCAST = 15; 43} 44 45// The relationship between two paths. 46// Values correspond exactly to PathRelationship in com.android.server.hdmi.Constants. 47enum PathRelationship { 48 RELATIONSHIP_TO_ACTIVE_SOURCE_UNKNOWN = 0; 49 DIFFERENT_BRANCH = 1; 50 ANCESTOR = 2; 51 DESCENDANT = 3; 52 SIBLING = 4; 53 SAME = 5; 54} 55 56// The result of attempting to send a HDMI CEC message. 57// Values correspond to the constants in android.hardware.tv.cec.V1_0.SendMessageResult, 58// offset by 10. 59enum SendMessageResult { 60 SEND_MESSAGE_RESULT_UNKNOWN = 0; 61 SUCCESS = 10; 62 NACK = 11; 63 BUSY = 12; 64 FAIL = 13; 65} 66 67// Whether a HDMI CEC message is sent from this device, to this device, or neither. 68enum MessageDirection { 69 MESSAGE_DIRECTION_UNKNOWN = 0; 70 MESSAGE_DIRECTION_OTHER = 1; // None of the other options. 71 OUTGOING = 2; // Sent from this device. 72 INCOMING = 3; // Sent to this device. 73 TO_SELF = 4; // Sent from this device, to this device. Indicates a bug. 74} 75 76// User control commands. Each value can represent an individual command, or a set of commands. 77// Values correspond to "CEC Table 30 UI Command Codes" in the HDMI CEC 1.4b spec, offset by 0x100. 78enum UserControlPressedCommand { 79 USER_CONTROL_PRESSED_COMMAND_UNKNOWN = 0; 80 81 // Represents all codes that are not represented by another value. 82 USER_CONTROL_PRESSED_COMMAND_OTHER = 1; 83 84 // Represents all number codes (codes 0x1E through 0x29). 85 NUMBER = 2; 86 87 // Navigation 88 SELECT = 0x100; 89 UP = 0x101; 90 DOWN = 0x102; 91 LEFT = 0x103; 92 RIGHT = 0x104; 93 RIGHT_UP = 0x105; 94 RIGHT_DOWN = 0x106; 95 LEFT_UP = 0x107; 96 LEFT_DOWN = 0x108; 97 EXIT = 0x10D; 98 99 // Volume 100 VOLUME_UP = 0x141; 101 VOLUME_DOWN = 0x142; 102 VOLUME_MUTE = 0x143; 103 104 // Power 105 POWER = 0x140; 106 POWER_TOGGLE = 0x16B; 107 POWER_OFF = 0x16C; 108 POWER_ON = 0x16D; 109} 110 111// Reason parameter of the <Feature Abort> message. 112// Values correspond to "CEC Table 29 Operand Descriptions" in the HDMI CEC 1.4b spec, 113// offset by 10. 114enum FeatureAbortReason { 115 FEATURE_ABORT_REASON_UNKNOWN = 0; 116 UNRECOGNIZED_OPCODE = 10; 117 NOT_IN_CORRECT_MODE_TO_RESPOND = 11; 118 CANNOT_PROVIDE_SOURCE = 12; 119 INVALID_OPERAND = 13; 120 REFUSED = 14; 121 UNABLE_TO_DETERMINE = 15; 122}