1 /* 2 * Copyright (c) 2022 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef __HI_COMM_HDMI_H__ 16 #define __HI_COMM_HDMI_H__ 17 18 #include "hi_type.h" 19 #ifndef HDMI_BUILD_IN_BOOT 20 #include "hi_errno.h" 21 #endif 22 #include "hi_common.h" 23 #include "hi_comm_video.h" 24 25 #define HI_HDMI_MAX_AUDIO_CAP_COUNT 16 26 #define HI_HDMI_MAX_SAMPE_RATE_NUM 8 27 #define HI_HDMI_MAX_BIT_DEPTH_NUM 6 28 #define HI_HDMI_EDID_RAW_DATA_LEN 512 29 /* user data len:31 - 4(pkt header) - 5(4K- the length must be 0x05) */ 30 #define HI_HDMI_VENDOR_USER_DATA_MAX_LEN 22 31 #define HI_HDMI_DETAIL_TIMING_MAX 10 32 #define HI_HDMI_VENDOR_NAME_SIZE 8 33 #define HI_HDMI_VENDOR_DESC_SIZE 16 34 35 #ifdef __cplusplus 36 #if __cplusplus 37 extern "C" { 38 #endif 39 #endif 40 41 typedef enum hiHDMI_VIDEO_FMT_E { 42 HI_HDMI_VIDEO_FMT_1080P_60 = 0, 43 HI_HDMI_VIDEO_FMT_1080P_50, 44 HI_HDMI_VIDEO_FMT_1080P_30, 45 HI_HDMI_VIDEO_FMT_1080P_25, 46 HI_HDMI_VIDEO_FMT_1080P_24, 47 HI_HDMI_VIDEO_FMT_1080i_60, 48 HI_HDMI_VIDEO_FMT_1080i_50, 49 HI_HDMI_VIDEO_FMT_720P_60, 50 HI_HDMI_VIDEO_FMT_720P_50, 51 HI_HDMI_VIDEO_FMT_576P_50, 52 HI_HDMI_VIDEO_FMT_480P_60, 53 HI_HDMI_VIDEO_FMT_PAL, 54 HI_HDMI_VIDEO_FMT_PAL_N, 55 HI_HDMI_VIDEO_FMT_PAL_Nc, 56 HI_HDMI_VIDEO_FMT_NTSC, 57 HI_HDMI_VIDEO_FMT_NTSC_J, 58 HI_HDMI_VIDEO_FMT_NTSC_PAL_M, 59 HI_HDMI_VIDEO_FMT_SECAM_SIN, 60 HI_HDMI_VIDEO_FMT_SECAM_COS, 61 HI_HDMI_VIDEO_FMT_861D_640X480_60, 62 HI_HDMI_VIDEO_FMT_VESA_800X600_60, 63 HI_HDMI_VIDEO_FMT_VESA_1024X768_60, 64 HI_HDMI_VIDEO_FMT_VESA_1280X720_60, 65 HI_HDMI_VIDEO_FMT_VESA_1280X800_60, 66 HI_HDMI_VIDEO_FMT_VESA_1280X1024_60, 67 HI_HDMI_VIDEO_FMT_VESA_1366X768_60, 68 HI_HDMI_VIDEO_FMT_VESA_1440X900_60, 69 HI_HDMI_VIDEO_FMT_VESA_1440X900_60_RB, 70 HI_HDMI_VIDEO_FMT_VESA_1600X900_60_RB, 71 HI_HDMI_VIDEO_FMT_VESA_1600X1200_60, 72 HI_HDMI_VIDEO_FMT_VESA_1680X1050_60, 73 HI_HDMI_VIDEO_FMT_VESA_1920X1080_60, 74 HI_HDMI_VIDEO_FMT_VESA_1920X1200_60, 75 HI_HDMI_VIDEO_FMT_VESA_2048X1152_60, 76 HI_HDMI_VIDEO_FMT_2560x1440_30, 77 HI_HDMI_VIDEO_FMT_2560x1440_60, 78 HI_HDMI_VIDEO_FMT_2560x1600_60, 79 HI_HDMI_VIDEO_FMT_1920x2160_30, 80 HI_HDMI_VIDEO_FMT_3840X2160P_24, 81 HI_HDMI_VIDEO_FMT_3840X2160P_25, 82 HI_HDMI_VIDEO_FMT_3840X2160P_30, 83 HI_HDMI_VIDEO_FMT_3840X2160P_50, 84 HI_HDMI_VIDEO_FMT_3840X2160P_60, 85 HI_HDMI_VIDEO_FMT_4096X2160P_24, 86 HI_HDMI_VIDEO_FMT_4096X2160P_25, 87 HI_HDMI_VIDEO_FMT_4096X2160P_30, 88 HI_HDMI_VIDEO_FMT_4096X2160P_50, 89 HI_HDMI_VIDEO_FMT_4096X2160P_60, 90 HI_HDMI_VIDEO_FMT_3840X2160P_120, 91 HI_HDMI_VIDEO_FMT_4096X2160P_120, 92 HI_HDMI_VIDEO_FMT_7680X4320P_30, 93 HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE, 94 HI_HDMI_VIDEO_FMT_BUTT 95 } HI_HDMI_VIDEO_FMT_E; 96 97 typedef enum hiHDMI_PIC_ASPECT_RATIO_E { 98 HI_HDMI_PIC_ASP_RATIO_NO_DATA, /* Aspect Ratio unknown */ 99 HI_HDMI_PIC_ASP_RATIO_4TO3, /* Aspect Ratio 4:3 */ 100 HI_HDMI_PIC_ASP_RATIO_16TO9, /* Aspect Ratio 16:9 */ 101 HI_HDMI_PIC_ASP_RATIO_64TO27, 102 HI_HDMI_PIC_ASP_RATIO_256TO135, 103 HI_HDMI_PIC_ASP_RATIO_RESERVED 104 } HI_HDMI_PIC_ASPECT_RATIO_E; 105 106 typedef enum hiHDMI_ACT_ASPECT_RATIO_E { 107 HI_HDMI_ACT_ASP_RATIO_RESERVED_0, 108 HI_HDMI_ACT_ASP_RATIO_RESERVED_1, 109 HI_HDMI_ACT_ASP_RATIO_16TO9_TOP, 110 HI_HDMI_ACT_ASP_RATIO_14TO9_TOP, 111 HI_HDMI_ACT_ASP_RATIO_16TO9_BOX_CENTER, 112 HI_HDMI_ACT_ASP_RATIO_RESERVED_5, 113 HI_HDMI_ACT_ASP_RATIO_RESERVED_6, 114 HI_HDMI_ACT_ASP_RATIO_RESERVED_7, 115 HI_HDMI_ACT_ASP_RATIO_SAME_PIC, 116 HI_HDMI_ACT_ASP_RATIO_4TO3_CENTER, 117 HI_HDMI_ACT_ASP_RATIO_16TO9_CENTER, 118 HI_HDMI_ACT_ASP_RATIO_14TO9_CENTER, 119 HI_HDMI_ACT_ASP_RATIO_RESERVED_12, 120 HI_HDMI_ACT_ASP_RATIO_4TO3_14_9, 121 HI_HDMI_ACT_ASP_RATIO_16TO9_14_9, 122 HI_HDMI_ACT_ASP_RATIO_16TO9_4_3 123 } HI_HDMI_ACT_ASPECT_RATIO_E; 124 125 typedef enum hiHDMI_SAMPLE_RATE_E { 126 HI_HDMI_SAMPLE_RATE_UNKNOWN, /* unknown sample rate */ 127 HI_HDMI_SAMPLE_RATE_8K = 8000, /* 8K sample rate */ 128 HI_HDMI_SAMPLE_RATE_11K = 11025, /* 11.025K sample rate */ 129 HI_HDMI_SAMPLE_RATE_12K = 12000, /* 12K sample rate */ 130 HI_HDMI_SAMPLE_RATE_16K = 16000, /* 16K sample rate */ 131 HI_HDMI_SAMPLE_RATE_22K = 22050, /* 22.050K sample rate */ 132 HI_HDMI_SAMPLE_RATE_24K = 24000, /* 24K sample rate */ 133 HI_HDMI_SAMPLE_RATE_32K = 32000, /* 32K sample rate */ 134 HI_HDMI_SAMPLE_RATE_44K = 44100, /* 44.1K sample rate */ 135 HI_HDMI_SAMPLE_RATE_48K = 48000, /* 48K sample rate */ 136 HI_HDMI_SAMPLE_RATE_88K = 88200, /* 88.2K sample rate */ 137 HI_HDMI_SAMPLE_RATE_96K = 96000, /* 96K sample rate */ 138 HI_HDMI_SAMPLE_RATE_176K = 176400, /* 176K sample rate */ 139 HI_HDMI_SAMPLE_RATE_192K = 192000, /* 192K sample rate */ 140 HI_HDMI_SAMPLE_RATE_768K = 768000, /* 768K sample rate */ 141 HI_HDMI_SAMPLE_RATE_BUTT 142 } HI_HDMI_SAMPLE_RATE_E; 143 144 typedef enum hiHDMI_AUDIO_FORMAT_CODE_E { 145 HI_HDMI_AUDIO_FORMAT_CODE_RESERVED, /* Audio coding type, refer stream,default type */ 146 HI_HDMI_AUDIO_FORMAT_CODE_PCM, /* Audio coding PCM type */ 147 HI_HDMI_AUDIO_FORMAT_CODE_AC3, /* Audio coding AC3 type */ 148 HI_HDMI_AUDIO_FORMAT_CODE_MPEG1, /* Audio coding MPEG1 type */ 149 HI_HDMI_AUDIO_FORMAT_CODE_MP3, /* Audio coding MP3 type */ 150 HI_HDMI_AUDIO_FORMAT_CODE_MPEG2, /* Audio coding MPEG2 type */ 151 HI_HDMI_AUDIO_FORMAT_CODE_AAC, /* Audio coding AAC type */ 152 HI_HDMI_AUDIO_FORMAT_CODE_DTS, /* Audio coding DTS type */ 153 HI_HDMI_AUDIO_FORMAT_CODE_ATRAC, /* Audio coding ATRAC type */ 154 HI_HDMI_AUDIO_FORMAT_CODE_ONE_BIT, /* Audio coding ONE BIT AUDIO type */ 155 HI_HDMI_AUDIO_FORMAT_CODE_DDP, /* Audio coding DDPLUS type */ 156 HI_HDMI_AUDIO_FORMAT_CODE_DTS_HD, /* Audio coding DTS HD type */ 157 HI_HDMI_AUDIO_FORMAT_CODE_MAT, /* Audio coding MAT type */ 158 HI_HDMI_AUDIO_FORMAT_CODE_DST, /* Audio coding DST type */ 159 HI_HDMI_AUDIO_FORMAT_CODE_WMA_PRO, /* Audio coding WMA PRO type */ 160 HI_HDMI_AUDIO_FORMAT_CODE_BUTT 161 } HI_HDMI_AUDIO_FORMAT_CODE_E; 162 163 typedef enum hiHDMI_BIT_DEPTH_E { 164 HI_HDMI_BIT_DEPTH_UNKNOWN, /* unknown bit width */ 165 HI_HDMI_BIT_DEPTH_8 = 8, /* 8 bits width */ 166 HI_HDMI_BIT_DEPTH_16 = 16, /* 16 bits width */ 167 HI_HDMI_BIT_DEPTH_18 = 18, /* 18 bits width */ 168 HI_HDMI_BIT_DEPTH_20 = 20, /* 20 bits width */ 169 HI_HDMI_BIT_DEPTH_24 = 24, /* 24 bits width */ 170 HI_HDMI_BIT_DEPTH_32 = 32, /* 32 bits width */ 171 HI_HDMI_BIT_DEPTH_BUTT 172 } HI_HDMI_BIT_DEPTH_E; 173 174 typedef enum hiHDMI_SND_INTERFACE_E { 175 HI_HDMI_SND_INTERFACE_I2S, /* I2S(Inter-IC Sound) */ 176 HI_HDMI_SND_INTERFACE_SPDIF, /* SPDIF(Sony/Philips Digital Interface) */ 177 HI_HDMI_SND_INTERFACE_HBR, /* SPDIF(Sony/Philips Digital Interface) */ 178 HI_HDMI_SND_INTERFACE_BUTT 179 } HI_HDMI_SND_INTERFACE_E; 180 181 typedef enum hiHDMI_ID_E { 182 HI_HDMI_ID_0, 183 HI_HDMI_ID_BUTT 184 } HI_HDMI_ID_E; 185 186 typedef enum hiHDMI_EVENT_TYPE_E { 187 HI_HDMI_EVENT_HOTPLUG = 0x10, /* HDMI hot-plug event */ 188 HI_HDMI_EVENT_NO_PLUG, /* HDMI cable disconnection event */ 189 HI_HDMI_EVENT_EDID_FAIL, /* HDMI EDID read failure event */ 190 HI_HDMI_EVENT_HDCP_FAIL, /* HDCP verification failure event */ 191 HI_HDMI_EVENT_HDCP_SUCCESS, /* HDCP verification success event */ 192 HI_HDMI_EVENT_HDCP_USERSETTING = 0x17, /* HDMI reset event,user should re-verification HDCP */ 193 HI_HDMI_EVENT_BUTT 194 } HI_HDMI_EVENT_TYPE_E; 195 196 typedef enum hiHDMI_VIDEO_MODE { 197 HI_HDMI_VIDEO_MODE_RGB444, 198 HI_HDMI_VIDEO_MODE_YCBCR422, 199 HI_HDMI_VIDEO_MODE_YCBCR444, 200 HI_HDMI_VIDEO_MODE_YCBCR420, 201 HI_HDMI_VIDEO_MODE_BUTT 202 } HI_HDMI_VIDEO_MODE_E; 203 204 /* Color Component Sample format and chroma sampling format enum,see EIA-CEA-861-D/F */ 205 typedef enum hiHDMI_COLOR_SPACE_E { 206 HI_HDMI_COLOR_SPACE_RGB444, 207 HI_HDMI_COLOR_SPACE_YCBCR422, 208 HI_HDMI_COLOR_SPACE_YCBCR444, 209 /* following is new featrue of CEA-861-F */ 210 HI_HDMI_COLOR_SPACE_YCBCR420 211 } HI_HDMI_COLOR_SPACE_E; 212 213 typedef enum hiHDMI_DEEP_COLOR_E { 214 HI_HDMI_DEEP_COLOR_24BIT, /* HDMI Deep Color 24bit mode */ 215 HI_HDMI_DEEP_COLOR_30BIT, /* HDMI Deep Color 30bit mode */ 216 HI_HDMI_DEEP_COLOR_36BIT, /* HDMI Deep Color 36bit mode */ 217 HI_HDMI_DEEP_COLOR_OFF = 0xff, /* HDMI Deep Color OFF mode(24bit). */ 218 HI_HDMI_DEEP_COLOR_BUTT 219 } HI_HDMI_DEEP_COLOR_E; 220 221 typedef enum hiHDMI_BARINFO_E { 222 HDMI_BAR_INFO_NOT_VALID, /* Bar Data not valid */ 223 HDMI_BAR_INFO_V, /* Vertical bar data valid */ 224 HDMI_BAR_INFO_H, /* Horizental bar data valid */ 225 HDMI_BAR_INFO_VH /* Horizental and Vertical bar data valid */ 226 } HI_HDMI_BARINFO_E; 227 228 typedef enum hiHDMI_SCANINFO_E { 229 HDMI_SCAN_INFO_NO_DATA, /* No Scan information */ 230 HDMI_SCAN_INFO_OVERSCANNED, /* Scan information, Overscanned (for television) */ 231 HDMI_SCAN_INFO_UNDERSCANNED, /* Scan information, Underscanned (for computer) */ 232 HDMI_SCAN_INFO_FUTURE 233 } HI_HDMI_SCANINFO_E; 234 235 typedef enum hiHDMI_PICTURE_SCALING_E { 236 HDMI_PICTURE_NON_UNIFORM_SCALING, /* No Known, non-uniform picture scaling */ 237 HDMI_PICTURE_SCALING_H, /* Picture has been scaled horizentally */ 238 HDMI_PICTURE_SCALING_V, /* Picture has been scaled Vertically */ 239 HDMI_PICTURE_SCALING_HV /* Picture has been scaled Horizentally and Vertically */ 240 } HI_HDMI_PICTURE_SCALING_E; 241 242 typedef enum hiHDMI_COLORIMETRY_E { 243 HDMI_COLORIMETRY_NO_DATA, /* Colorimetry no data option */ 244 HDMI_COLORIMETRY_ITU601, /* Colorimetry ITU601 option */ 245 HDMI_COLORIMETRY_ITU709, /* Colorimetry ITU709 option */ 246 HDMI_COLORIMETRY_EXTENDED /* Colorimetry extended option */ 247 } HI_HDMI_COLORIMETRY_E; 248 249 typedef enum hiHDMI_EXT_COLORIMETRY_E { 250 HDMI_COLORIMETRY_XVYCC_601, /* Colorimetry xvYCC601 extended option */ 251 HDMI_COLORIMETRY_XVYCC_709, /* Colorimetry xvYCC709 extended option */ 252 HDMI_COLORIMETRY_S_YCC_601, /* Colorimetry S YCC 601 extended option */ 253 HDMI_COLORIMETRY_ADOBE_YCC_601, /* Colorimetry ADOBE YCC 601 extended option */ 254 HDMI_COLORIMETRY_ADOBE_RGB, /* Colorimetry ADOBE RGB extended option */ 255 HDMI_COLORIMETRY_2020_CONST_LUMINOUS, /* Colorimetry ITU2020 extended option */ 256 HDMI_COLORIMETRY_2020_NON_CONST_LUMINOUS, /* Colorimetry ITU2020 extended option */ 257 HDMI_COLORIMETRY_RESERVED 258 } HI_HDMI_EXT_COLORIMETRY_E; 259 260 typedef enum hiHDMI_RGB_QUAN_RAGE_E { 261 HDMI_RGB_QUANTIZATION_DEFAULT_RANGE, /* Default range, it depends on the video format */ 262 HDMI_RGB_QUANTIZATION_LIMITED_RANGE, /* Limited quantization range of 220 levels when receiving a CE video format */ 263 HDMI_RGB_QUANTIZATION_FULL_RANGE, /* Full quantization range of 256 levels when receiving an IT video format */ 264 HDMI_RGB_QUANTIZATION_FULL_RESERVED 265 } HI_HDMI_RGB_QUAN_RAGE_E; 266 267 typedef enum hiHDMI_YCC_QUAN_RAGE_E { 268 HDMI_YCC_QUANTIZATION_LIMITED_RANGE, /* Limited quantization range of 220 levels when receiving a CE video format */ 269 HDMI_YCC_QUANTIZATION_FULL_RANGE, /* Full quantization range of 256 levels when receiving an IT video format */ 270 HDMI_YCC_QUANTIZATION_RESERVED_2, 271 HDMI_YCC_QUANTIZATION_RESERVED_3 272 } HI_HDMI_YCC_QUAN_RAGE_E; 273 274 typedef enum hiHDMI_QUANTIZATION_E { 275 HDMI_QUANTIZATION_LIMITED_RANGE, /* Limited quantization range of 220 levels when receiving a CE video format */ 276 HDMI_QUANTIZATION_FULL_RANGE, /* Full quantization range of 256 levels when receiving an IT video format */ 277 HDMI_QUANTIZATION_BUTT 278 } HI_HDMI_QUANTIZATION_E; 279 280 typedef enum hiHDMI_PIXEL_REPETITION_E { 281 HDMI_PIXEL_REPET_NO, 282 HDMI_PIXEL_REPET_2_TIMES, 283 HDMI_PIXEL_REPET_3_TIMES, 284 HDMI_PIXEL_REPET_4_TIMES, 285 HDMI_PIXEL_REPET_5_TIMES, 286 HDMI_PIXEL_REPET_6_TIMES, 287 HDMI_PIXEL_REPET_7_TIMES, 288 HDMI_PIXEL_REPET_8_TIMES, 289 HDMI_PIXEL_REPET_9_TIMES, 290 HDMI_PIXEL_REPET_10_TIMES, 291 HDMI_PIXEL_REPET_RESERVED_A, 292 HDMI_PIXEL_REPET_RESERVED_B, 293 HDMI_PIXEL_REPET_RESERVED_C, 294 HDMI_PIXEL_REPET_RESERVED_D, 295 HDMI_PIXEL_REPET_RESERVED_E, 296 HDMI_PIXEL_REPET_RESERVED_F 297 } HI_HDMI_PIXEL_REPETITION_E; 298 299 typedef enum hiHDMI_CONTENT_TYPE_E { 300 HDMI_CONTNET_GRAPHIC, /* Graphics type */ 301 HDMI_CONTNET_PHOTO, /* Photo type */ 302 HDMI_CONTNET_CINEMA, /* Cinema type */ 303 HDMI_CONTNET_GAME /* Game type */ 304 } HI_HDMI_CONTENT_TYPE_E; 305 306 typedef enum hiHDMI_CODING_TYPE_E { 307 HDMI_AUDIO_CODING_REFER_STREAM_HEAD, 308 HDMI_AUDIO_CODING_PCM, 309 HDMI_AUDIO_CODING_AC3, 310 HDMI_AUDIO_CODING_MPEG1, 311 HDMI_AUDIO_CODING_MP3, 312 HDMI_AUDIO_CODING_MPEG2, 313 HDMI_AUDIO_CODING_AACLC, 314 HDMI_AUDIO_CODING_DTS, 315 HDMI_AUDIO_CODING_ATRAC, 316 HDMI_AUDIO_CODIND_ONE_BIT_AUDIO, 317 HDMI_AUDIO_CODING_ENAHNCED_AC3, 318 HDMI_AUDIO_CODING_DTS_HD, 319 HDMI_AUDIO_CODING_MAT, 320 HDMI_AUDIO_CODING_DST, 321 HDMI_AUDIO_CODING_WMA_PRO, 322 HDMI_AUDIO_CODING_MAX 323 } HI_HDMI_CODING_TYPE_E; 324 325 typedef enum hiHDMI_AUDIO_SPEAKER_E { 326 HDMI_AUDIO_SPEAKER_FL_FR, 327 HDMI_AUDIO_SPEAKER_LFE, 328 HDMI_AUDIO_SPEAKER_FC, 329 HDMI_AUDIO_SPEAKER_RL_RR, 330 HDMI_AUDIO_SPEAKER_RC, 331 HDMI_AUDIO_SPEAKER_FLC_FRC, 332 HDMI_AUDIO_SPEAKER_RLC_RRC, 333 HDMI_AUDIO_SPEAKER_FLW_FRW, 334 HDMI_AUDIO_SPEAKER_FLH_FRH, 335 HDMI_AUDIO_SPEAKER_TC, 336 HDMI_AUDIO_SPEAKER_FCH, 337 HDMI_AUDIO_SPEAKER_BUTT 338 } HI_HDMI_AUDIO_SPEAKER_E; 339 340 typedef enum hiHDMI_FORCE_ACTION_E { 341 HI_HDMI_FORCE_NULL, /* Standard mode */ 342 HI_HDMI_FORCE_HDMI, /* Forcibly output video in HDMI mode */ 343 HI_HDMI_FORCE_DVI, /* Forcibly output video in DVI mode */ 344 HI_HDMI_INIT_BOOT_CONFIG /* Test only */ 345 } HI_HDMI_FORCE_ACTION_E; 346 347 typedef enum hiHI_HDMI_CSC_MATRIX_E { 348 HI_HDMI_CSC_MATRIX_IDENTITY, 349 HI_HDMI_CSC_MATRIX_BT601_TO_BT709, 350 HI_HDMI_CSC_MATRIX_BT709_TO_BT601, 351 HI_HDMI_CSC_MATRIX_BT601_TO_RGB_PC, 352 HI_HDMI_CSC_MATRIX_BT709_TO_RGB_PC, 353 HI_HDMI_CSC_MATRIX_RGB_TO_BT601_PC, 354 HI_HDMI_CSC_MATRIX_RGB_TO_BT709_PC, 355 HI_HDMI_CSC_MATRIX_BUTT 356 } HI_HDMI_CSC_MATRIX_E; 357 358 typedef void (*HI_HDMI_CallBack)(HI_HDMI_EVENT_TYPE_E event, hi_void *pPrivateData); 359 360 typedef struct hiHDMI_CALLBACK_FUNC_S { 361 HI_HDMI_CallBack pfnHdmiEventCallback; /* Event handling callback function */ 362 hi_void *pPrivateData; /* Private data of the callback functions and parameters */ 363 } HI_HDMI_CALLBACK_FUNC_S; 364 365 typedef struct hiHDMI_AUDIO_INFO_S { 366 /* Audio coding type */ 367 HI_HDMI_AUDIO_FORMAT_CODE_E enAudFmtCode; 368 /* Audio sample rate */ 369 HI_HDMI_SAMPLE_RATE_E enSupportSampleRate[HI_HDMI_MAX_SAMPE_RATE_NUM]; 370 /* Aud Channel of the coding type */ 371 hi_u8 u8AudChannel; 372 /* sample bit depth, when audio format code is HI_UNF_EDID_AUDIO_FORMAT_CODE_PCM */ 373 HI_HDMI_BIT_DEPTH_E enSupportBitDepth[HI_HDMI_MAX_BIT_DEPTH_NUM]; 374 /* sample bit depth Num, when audio format code is HI_UNF_EDID_AUDIO_FORMAT_CODE_PCM */ 375 hi_u32 u32SupportBitDepthNum; 376 /* 377 * enter max bit rate, when audio format code is 378 * HI_UNF_EDID_AUDIO_FORMAT_CODE_AC3 - HI_UNF_EDID_AUDIO_FORMAT_CODE_ATRAC 379 */ 380 hi_u32 u32MaxBitRate; 381 } HI_HDMI_AUDIO_INFO_S; 382 383 typedef struct hiHDMI_EOTF_S { 384 hi_bool bEotfSdr; /* Traditional gamma - SDR Luminance Range. */ 385 hi_bool bEotfHdr; /* Traditional gamma - HDR Luminance Range. */ 386 hi_bool bEotfSmpteSt2084; /* SMPTE ST 2084 */ 387 hi_bool bEotfHLG; /* Hybrid Log-Gamma(HLG) based on Recommendation ITU-R BT.2100-0 */ 388 hi_bool bEotfFuture; /* Future EOTF */ 389 } HI_HDMI_EOTF_S; 390 391 typedef struct hiHDMI_HDR_METADATA_TYPE_S { 392 hi_bool bDescriptorType1; /* Support Static Metadata Type 1 or not. */ 393 } HI_HDMI_HDR_METADATA_TYPE_S; 394 395 typedef struct hiHDMI_HDR_CAP_S { 396 /* EOTF support. */ 397 HI_HDMI_EOTF_S stEotf; 398 /* static metadata descriptor type(ID) support. */ 399 HI_HDMI_HDR_METADATA_TYPE_S stMetadata; 400 /* Desired Content Max Luminance Data. Real value(in 1cd/m^2) = 50.2^(CV/32) */ 401 hi_u8 u8MaxLuminance_CV; 402 /* Desired Content Max Frame-average Luminance. Real value(in 1cd/m^2) = 50.2^(CV/32) */ 403 hi_u8 u8AverageLumin_CV; 404 /* 405 * Desired Content Min Luminance Data. 406 * Real value(in 1cd/m^2) = u8MaxLuminance_CV * (u8MinLuminance_CV/255)^2 / 100 407 */ 408 hi_u8 u8MinLuminance_CV; 409 } HI_HDMI_HDR_CAP_S; 410 411 typedef struct hiHDMI_TIMING_INFO_S { 412 hi_u32 u32VFB; /* vertical front blank */ 413 hi_u32 u32VBB; /* vertical back blank */ 414 hi_u32 u32VACT; /* vertical active area */ 415 hi_u32 u32HFB; /* horizontal front blank */ 416 hi_u32 u32HBB; /* horizontal back blank */ 417 hi_u32 u32HACT; /* horizontal active area */ 418 hi_u32 u32VPW; /* vertical sync pulse width */ 419 hi_u32 u32HPW; /* horizontal sync pulse width */ 420 hi_bool bIDV; /* flag of data valid signal is needed flip */ 421 hi_bool bIHS; /* flag of horizontal sync pulse is needed flip */ 422 hi_bool bIVS; /* flag of vertical sync pulse is needed flip */ 423 hi_u32 u32ImageWidth; /* image width */ 424 hi_u32 u32ImageHeight; /* image height */ 425 hi_u32 u32AspectRatioW; /* aspect ratio width */ 426 hi_u32 u32AspectRatioH; /* aspect ratio height */ 427 hi_bool bInterlace; /* flag of interlace */ 428 hi_s32 u32PixelClk; /* pixelc clk for this timing, unit:KHz */ 429 } HI_HDMI_TIMING_INFO_S; 430 431 typedef struct hiHDMI_DET_TIMING_S { 432 hi_u32 u32DetTimingNum; 433 HI_HDMI_TIMING_INFO_S astDetTiming[HI_HDMI_DETAIL_TIMING_MAX]; 434 } HI_HDMI_DET_TIMING_S; 435 436 typedef struct hiHDMI_SINK_CAPABILITY_S { 437 /* Whether the devices are connected. */ 438 hi_bool bConnected; 439 /* Whether the HDMI is supported by the device. If the HDMI is not supported by the device, the device is DVI. */ 440 hi_bool bSupportHdmi; 441 /* Whether the sink device is powered on. */ 442 hi_bool bIsSinkPowerOn; 443 /* 444 * Whether the EDID obtains the flag from the sink device. 445 * HI_TRUE: The EDID information is correctly read. 446 * HI_FASE: default settings 447 */ 448 hi_bool bIsRealEDID; 449 /* Physical resolution of the display device. */ 450 HI_HDMI_VIDEO_FMT_E enNativeVideoFormat; 451 /* 452 * Video capability set. 453 * HI_TRUE: This display format is supported. 454 * HI_FALSE: This display format is not supported. 455 */ 456 hi_bool bVideoFmtSupported[HI_HDMI_VIDEO_FMT_BUTT]; 457 /* 458 * Whether the YCBCR display is supported. 459 * HI_TRUE: The YCBCR display is supported. 460 * HI_FALSE: Only red-green-blue (RGB) is supported. 461 */ 462 hi_bool bSupportYCbCr; 463 /* Whether the xvYCC601 color format is supported. */ 464 hi_bool bSupportxvYCC601; 465 /* Whether the xvYCC709 color format is supported. */ 466 hi_bool bSupportxvYCC709; 467 hi_bool bSupportYccBT2020; 468 /* Transfer profile supported by xvYCC601. 1: P0; 2: P1; 4: P2. */ 469 hi_u8 u8MDBit; 470 /* Num of audio Info */ 471 hi_u32 u32AudioInfoNum; 472 /* Audio Info.For details, see Table 37 in EIA-CEA-861-D. */ 473 HI_HDMI_AUDIO_INFO_S stAudioInfo[HI_HDMI_MAX_AUDIO_CAP_COUNT]; 474 /* Speaker position. For details, see the definition of SpeakerDATABlock in EIA-CEA-861-D. */ 475 hi_bool bSpeaker[HDMI_AUDIO_SPEAKER_BUTT]; 476 /* Device vendor flag */ 477 hi_u8 u8IDManufactureName[4]; 478 /* Device ID. */ 479 hi_u32 u32IDProductCode; 480 /* Device sequence number. */ 481 hi_u32 u32IDSerialNumber; 482 /* Device production data (week). */ 483 hi_u32 u32WeekOfManufacture; 484 /* Set the production data (year). */ 485 hi_u32 u32YearOfManufacture; 486 /* Device version number */ 487 hi_u8 u8Version; 488 /* Device sub version number */ 489 hi_u8 u8Revision; 490 /* EDID extended block number */ 491 hi_u8 u8EDIDExternBlockNum; 492 /* Valid flag of the consumer electronics control (CEC) physical address */ 493 hi_bool bIsPhyAddrValid; 494 /* CEC physical address A */ 495 hi_u8 u8PhyAddr_A; 496 /* CEC physical address B */ 497 hi_u8 u8PhyAddr_B; 498 /* CEC physical address C */ 499 hi_u8 u8PhyAddr_C; 500 /* CEC physical address D */ 501 hi_u8 u8PhyAddr_D; 502 /* Whether to support the DVI dual-link operation. */ 503 hi_bool bSupportDVIDual; 504 /* Whether to support the YCBCR 4:4:4 deep-color mode. */ 505 hi_bool bSupportDeepColorYCBCR444; 506 /* Whether to support the deep-color 30-bit mode. */ 507 hi_bool bSupportDeepColor30Bit; 508 /* Whether to support the deep-color 36-bit mode. */ 509 hi_bool bSupportDeepColor36Bit; 510 /* Whether to support the deep-color 48-bit mode. */ 511 hi_bool bSupportDeepColor48Bit; 512 /* Whether to support the Supports_AI mode. */ 513 hi_bool bSupportAI; 514 /* Maximum TMDS clock. */ 515 hi_u32 u32MaxTMDSClock; 516 /* Delay flag bit. */ 517 hi_bool bI_Latency_Fields_Present; 518 /* whether Video_Latency and Audio_Latency fields are present */ 519 hi_bool bLatency_Fields_Present; 520 /* Special video format */ 521 hi_bool bHDMI_Video_Present; 522 /* Video delay */ 523 hi_u8 u8Video_Latency; 524 /* Audio delay */ 525 hi_u8 u8Audio_Latency; 526 /* Video delay in interlaced video mode */ 527 hi_u8 u8Interlaced_Video_Latency; 528 /* Audio delay in interlaced video mode */ 529 hi_u8 u8Interlaced_Audio_Latency; 530 /* Whether to support the YUV420 deep-color 30-bit mode. */ 531 hi_bool bSupportY420DC30Bit; 532 /* Whether to support the YUV420 deep-color 36-bit mode. */ 533 hi_bool bSupportY420DC36Bit; 534 /* Whether to support the YUV420 deep-color 48-bit mode. */ 535 hi_bool bSupportY420DC48Bit; 536 /* Whether to support HDMI2.0. */ 537 hi_bool bSupportHdmi_2_0; 538 /* the format support YUV420 */ 539 hi_bool bSupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; 540 /* the format only support YUV420 */ 541 hi_bool bOnlySupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; 542 /* 543 * flag of RGB Quantization Range selectable. 544 * when HI_TRUE,sink expect full/limited range is selectable 545 * or sink expect default range. 546 */ 547 hi_bool bYccQrangeSelectable; 548 /* 549 * flag of YCC Quantization Range selectable. 550 * when HI_TRUE,sink expect full/limited range is selectable;or sink expect default range. 551 */ 552 hi_bool bRgbQrangeSelectable; 553 /* HDR support flag.When HDR Static Metadata Data Block is indicated,flag HI_TRUE;or,HI_FALSE. */ 554 hi_bool bHdrSupport; 555 /* HDR capability */ 556 HI_HDMI_HDR_CAP_S stHdr; 557 /* Detailed timing information */ 558 HI_HDMI_DET_TIMING_S stDetailedTiming; 559 } HI_HDMI_SINK_CAPABILITY_S; 560 561 typedef struct hiHDMI_ATTR_S { 562 /* Whether to forcibly output the video over the HDMI. */ 563 hi_bool bEnableHdmi; 564 /* 565 * Whether to output video.The value must be HI_TRUE. 566 * If the value is HI_FALSE, the HDMI is forcibly set to HI_TRUE. 567 */ 568 hi_bool bEnableVideo; 569 /* Video norm. This value of the video norm must be consistent with the norm of the video output. */ 570 HI_HDMI_VIDEO_FMT_E enVideoFmt; 571 /* HDMI input video input mode.VIDEO_MODE_YCBCR444,VIDEO_MODE_YCBCR422,VIDEO_MODE_YCBCR420,VIDEO_MODE_RGB444 */ 572 HI_HDMI_VIDEO_MODE_E enVidInMode; 573 /* HDMI output video output mode.VIDEO_MODE_YCBCR444,VIDEO_MODE_YCBCR422,VIDEO_MODE_YCBCR420,VIDEO_MODE_RGB444 */ 574 HI_HDMI_VIDEO_MODE_E enVidOutMode; 575 /* CSC output quantization range HDMI_QUANTIZATION_RANGE_LIMITED, HDMI_QUANTIZATION_RANGE_FULL>**/ 576 HI_HDMI_QUANTIZATION_E enOutCscQuantization; 577 /* DeepColor output mode. It is HI_HDMI_DEEP_COLOR_24BIT by default. */ 578 HI_HDMI_DEEP_COLOR_E enDeepColorMode; 579 /* Whether to enable the xvYCC output mode. It is HI_FALSE by default. */ 580 hi_bool bxvYCCMode; 581 /* Whether to enable the audio. */ 582 hi_bool bEnableAudio; 583 /* HDMI audio source. It is set to HI_HDMI_SND_INTERFACE_I2S, which needs to be consistent with the VO interface. */ 584 HI_HDMI_SND_INTERFACE_E enSoundIntf; 585 /* Multi-channel or stereo 0: stereo 1: eight-channel fixed for multi-channel */ 586 hi_bool bIsMultiChannel; 587 /* Audio sampling rate. This parameter needs to be consistent with that of the VO. */ 588 HI_HDMI_SAMPLE_RATE_E enSampleRate; 589 /* Audio down sampling rate parameter. It is 0 by default. */ 590 hi_u8 u8DownSampleParm; 591 /* Audio bit width. It is 16 by default. This parameter needs to be consistent with that of the VO. */ 592 HI_HDMI_BIT_DEPTH_E enBitDepth; 593 /* Reserved. It is set to 0. I2S control (0x7A:0x1D) */ 594 hi_u8 u8I2SCtlVbit; 595 /* Whether to enable AVI InfoFrame. It is recommended to enable this function. */ 596 hi_bool bEnableAviInfoFrame; 597 /* Whether to enable AUDIO InfoFrame. It is recommended to enable this function. */ 598 hi_bool bEnableAudInfoFrame; 599 /* Whether to enable SPD InfoFrame. It is recommended to disable this function. */ 600 hi_bool bEnableSpdInfoFrame; 601 /* Whether to enable MPEG InfoFrame. It is recommended to disable this function. */ 602 hi_bool bEnableMpegInfoFrame; 603 /* Whether to enable the debug information in the HDMI. It is recommended to disable this function. */ 604 hi_bool bDebugFlag; 605 /* Whether to enable the HDCP.0: disabled 1: enabled */ 606 hi_bool bHDCPEnable; 607 /* Whether to enable 3D mode. 0: disabled 1: enabled */ 608 hi_bool b3DEnable; 609 /* 3D Parameter. The default value is 9. */ 610 hi_u8 u83DParam; 611 /* When get capability fail, HDMI forcily(priority) judgments output video mode. Default is HI_HDMI_FORCE_HDMI. */ 612 HI_HDMI_FORCE_ACTION_E enDefaultMode; 613 /* Whether to enable auth mode. 0: disabled 1: enabled */ 614 hi_bool bAuthMode; 615 /* 616 * Enable flag of video mode & DVI adapting case of user setting incorrect, default:HI_TRUE. 617 * When user have no any adapting strategy, suggestion HI_TRUE 618 */ 619 hi_bool bEnableVidModeAdapt; 620 /* 621 * Enable flag of deep color mode adapting case of user setting incorrect, default: HI_FALSE. 622 * When user have no any adapting strategy, suggestion HI_TRUE 623 */ 624 hi_bool bEnableDeepClrAdapt; 625 /* 626 * Pixclk of enVideoFmt(unit is kHz). 627 * (This param is valid only when enVideoFmt is HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE) 628 */ 629 hi_u32 u32PixClk; 630 } HI_HDMI_ATTR_S; 631 632 typedef struct hiHI_HDMI_EDID_S { 633 hi_bool bEdidValid; 634 hi_u32 u32Edidlength; 635 hi_u8 u8Edid[HI_HDMI_EDID_RAW_DATA_LEN]; 636 } HI_HDMI_EDID_S; 637 638 typedef enum hiHDMI_INFOFRAME_TYPE_E { 639 HI_INFOFRAME_TYPE_AVI, /* HDMI AVI InfoFrame */ 640 HI_INFOFRAME_TYPE_SPD, /* HDMI SPD InfoFrame */ 641 HI_INFOFRAME_TYPE_AUDIO, /* HDMI AUDIO InfoFrame */ 642 HI_INFOFRAME_TYPE_MPEG, /* HDMI MPEG InfoFrame */ 643 HI_INFOFRAME_TYPE_VENDORSPEC, /* HDMI Vendor Specific InfoFrame */ 644 HI_INFOFRAME_TYPE_BUTT 645 } HI_HDMI_INFOFRAME_TYPE_E; 646 647 typedef struct hi_HDMI_AVI_INFOFRAME_VER2_S { 648 HI_HDMI_VIDEO_FMT_E enTimingMode; 649 HI_HDMI_COLOR_SPACE_E enColorSpace; 650 hi_bool bActive_Infor_Present; 651 HI_HDMI_BARINFO_E enBarInfo; 652 HI_HDMI_SCANINFO_E enScanInfo; 653 HI_HDMI_COLORIMETRY_E enColorimetry; 654 HI_HDMI_EXT_COLORIMETRY_E enExtColorimetry; 655 HI_HDMI_PIC_ASPECT_RATIO_E enAspectRatio; 656 HI_HDMI_ACT_ASPECT_RATIO_E enActiveAspectRatio; 657 HI_HDMI_PICTURE_SCALING_E enPictureScaling; 658 HI_HDMI_RGB_QUAN_RAGE_E enRGBQuantization; 659 hi_bool bIsITContent; 660 HI_HDMI_PIXEL_REPETITION_E enPixelRepetition; 661 HI_HDMI_CONTENT_TYPE_E enContentType; 662 HI_HDMI_YCC_QUAN_RAGE_E enYCCQuantization; 663 hi_u16 u16LineNEndofTopBar; 664 hi_u16 u16LineNStartofBotBar; 665 hi_u16 u16PixelNEndofLeftBar; 666 hi_u16 u16PixelNStartofRightBar; 667 } HI_HDMI_AVI_INFOFRAME_VER2_S; 668 669 typedef enum hiHDMI_AUDIO_CHANEL_CNT_E { 670 HI_HDMI_AUDIO_CHANEL_CNT_STREAM, 671 HI_HDMI_AUDIO_CHANEL_CNT_2, 672 HI_HDMI_AUDIO_CHANEL_CNT_3, 673 HI_HDMI_AUDIO_CHANEL_CNT_4, 674 HI_HDMI_AUDIO_CHANEL_CNT_5, 675 HI_HDMI_AUDIO_CHANEL_CNT_6, 676 HI_HDMI_AUDIO_CHANEL_CNT_7, 677 HI_HDMI_AUDIO_CHANEL_CNT_8 678 } HI_HDMI_AUDIO_CHANEL_CNT_E; 679 680 typedef enum hiHDMI_AUDIO_SAMPLE_SIZE_E { 681 HI_HDMI_AUDIO_SAMPLE_SIZE_STREAM, 682 HI_HDMI_AUDIO_SAMPLE_SIZE_16, 683 HI_HDMI_AUDIO_SAMPLE_SIZE_20, 684 HI_HDMI_AUDIO_SAMPLE_SIZE_24 685 } HI_HDMI_AUDIO_SAMPLE_SIZE_E; 686 687 typedef enum hiHDMI_AUDIO_SAMPLE_FREQ_E { 688 HI_HDMI_AUDIO_SAMPLE_FREQ_STREAM, 689 HI_HDMI_AUDIO_SAMPLE_FREQ_32000, 690 HI_HDMI_AUDIO_SAMPLE_FREQ_44100, 691 HI_HDMI_AUDIO_SAMPLE_FREQ_48000, 692 HI_HDMI_AUDIO_SAMPLE_FREQ_88200, 693 HI_HDMI_AUDIO_SAMPLE_FREQ_96000, 694 HI_HDMI_AUDIO_SAMPLE_FREQ_176400, 695 HI_HDMI_AUDIO_SAMPLE_FREQ_192000 696 } HI_HDMI_AUDIO_SAMPLE_FREQ_E; 697 698 typedef enum hiHDMI_LEVEL_SHIFT_VALUE_E { 699 HI_HDMI_LEVEL_SHIFT_VALUE_0_DB, 700 HI_HDMI_LEVEL_SHIFT_VALUE_1_DB, 701 HI_HDMI_LEVEL_SHIFT_VALUE_2_DB, 702 HI_HDMI_LEVEL_SHIFT_VALUE_3_DB, 703 HI_HDMI_LEVEL_SHIFT_VALUE_4_DB, 704 HI_HDMI_LEVEL_SHIFT_VALUE_5_DB, 705 HI_HDMI_LEVEL_SHIFT_VALUE_6_DB, 706 HI_HDMI_LEVEL_SHIFT_VALUE_7_DB, 707 HI_HDMI_LEVEL_SHIFT_VALUE_8_DB, 708 HI_HDMI_LEVEL_SHIFT_VALUE_9_DB, 709 HI_HDMI_LEVEL_SHIFT_VALUE_10_DB, 710 HI_HDMI_LEVEL_SHIFT_VALUE_11_DB, 711 HI_HDMI_LEVEL_SHIFT_VALUE_12_DB, 712 HI_HDMI_LEVEL_SHIFT_VALUE_13_DB, 713 HI_HDMI_LEVEL_SHIFT_VALUE_14_DB, 714 HI_HDMI_LEVEL_SHIFT_VALUE_15_DB 715 } HI_HDMI_LEVEL_SHIFT_VALUE_E; 716 717 typedef enum hiHDMI_LFE_PLAYBACK_LEVEL_E { 718 HI_HDMI_LFE_PLAYBACK_NO, 719 HI_HDMI_LFE_PLAYBACK_0_DB, 720 HI_HDMI_LFE_PLAYBACK_10_DB, 721 HI_HDMI_LFE_PLAYBACK_RESEVED 722 } HI_HDMI_LFE_PLAYBACK_LEVEL_E; 723 724 typedef struct hiHDMI_AUD_INFOFRAME_VER1_S { 725 HI_HDMI_AUDIO_CHANEL_CNT_E enChannelCount; 726 HI_HDMI_CODING_TYPE_E enCodingType; 727 HI_HDMI_AUDIO_SAMPLE_SIZE_E enSampleSize; 728 HI_HDMI_AUDIO_SAMPLE_FREQ_E enSamplingFrequency; 729 hi_u8 u8ChannelAlloc; /* Channel/Speaker Allocation.Range [0,255] */ 730 HI_HDMI_LEVEL_SHIFT_VALUE_E enLevelShift; 731 HI_HDMI_LFE_PLAYBACK_LEVEL_E enLfePlaybackLevel; 732 hi_bool bDownmixInhibit; 733 } HI_HDMI_AUD_INFOFRAME_VER1_S; 734 735 typedef struct hiHDMI_SPD_INFOFRAME_S { 736 hi_u8 u8VendorName[8]; 737 hi_u8 u8ProductDescription[16]; 738 } HI_HDMI_SPD_INFOFRAME_S; 739 740 typedef struct hiHDMI_MPEGSOURCE_INFOFRAME_S { 741 hi_u32 u32MPEGBitRate; 742 hi_bool bIsFieldRepeated; 743 } HI_HDMI_MPEGSOURCE_INFOFRAME_S; 744 745 typedef struct hiHDMI_VENDORSPEC_INFOFRAME_S { 746 hi_u8 u8DataLen; 747 hi_u8 u8UserData[HI_HDMI_VENDOR_USER_DATA_MAX_LEN]; 748 } HI_HDMI_VENDORSPEC_INFOFRAME_S; 749 750 typedef union hiHDMI_INFOFRAME_UNIT_U { 751 HI_HDMI_AVI_INFOFRAME_VER2_S stAVIInfoFrame; 752 HI_HDMI_AUD_INFOFRAME_VER1_S stAUDInfoFrame; 753 HI_HDMI_SPD_INFOFRAME_S stSPDInfoFrame; 754 HI_HDMI_MPEGSOURCE_INFOFRAME_S stMPEGSourceInfoFrame; 755 HI_HDMI_VENDORSPEC_INFOFRAME_S stVendorSpecInfoFrame; 756 } HI_HMDI_INFORFRAME_UNIT_U; 757 758 typedef struct hiUNF_HDMI_INFOFRAME_S { 759 HI_HDMI_INFOFRAME_TYPE_E enInfoFrameType; /* InfoFrame type */ 760 HI_HMDI_INFORFRAME_UNIT_U unInforUnit; /* InfoFrame date */ 761 } HI_HDMI_INFOFRAME_S; 762 763 /* 764 * CEC's Opcode: Please refer to CEC 15 Message Descriptions 765 * General Protocol messages 766 * Feature Abort> Used as a response to indicate that the device does not support the requested message type, 767 * or that it cannot execute it at the present time. 768 */ 769 #define CEC_OPCODE_FEATURE_ABORT 0x00 770 771 /* <Abort> Message This message is reserved for testing purposes. */ 772 #define CEC_OPCODE_ABORT_MESSAGE 0xFF 773 774 /* 775 * One Touch Play Feature 776 * <Active Source> Used by a new source to indicate that 777 * it has started to transmit a stream OR used in response to a <Request Active Source> 778 */ 779 #define CEC_OPCODE_ACTIVE_SOURCE 0x82 780 781 /* 782 * <Image View On> Sent by a source device to the TV 783 * whenever it enters the active state (alternatively it may send <Text View On>). 784 */ 785 #define CEC_OPCODE_IMAGE_VIEW_ON 0x04 786 787 /* 788 * <Text View On> As <Image View On>, 789 * but should also remove any text, menus and PIP windows from the TV's display. 790 */ 791 #define CEC_OPCODE_TEXT_VIEW_ON 0x0D 792 793 /* 794 * Routing Control Feature 795 * <Inactive Source> Used by the currently active source to inform the TV 796 * that it has no video to be presented to the user, or is going into standby 797 * as the result of a local user command on the device. 798 */ 799 #define CEC_OPCODE_INACTIVE_SOURCE 0x9D 800 801 /* <Request Active Source> Used by a new device to discover the status of the system. */ 802 #define CEC_OPCODE_REQUEST_ACTIVE_SOURCE 0x85 803 804 /* 805 * <Routing Change> Sent by a CEC Switch when it is manually switched to 806 * inform all other devices on the network that the active route below the switch has changed. 807 */ 808 #define CEC_OPCODE_ROUTING_CHANGE 0x80 809 810 /* <Routing Information> Sent by a CEC Switch to indicate the active route below the switch. */ 811 #define CEC_OPCODE_ROUTING_INFORMATION 0x81 812 813 /* <Set Stream Path> Used by the TV to request a streaming path from the specified physical address. */ 814 #define CEC_OPCODE_SET_STREAM_PATH 0x86 815 816 /* 817 * <Standby> Switches one or all devices into standby mode. 818 * Can be used as a broadcast message or be addressed to a specific device. 819 * See section CEC 13.3 for important notes on the use of this message 820 */ 821 #define CEC_OPCODE_STANDBY 0x36 822 823 /* <Record Off> Requests a device to stop a recording. */ 824 #define CEC_OPCODE_RECORD_OFF 0x0B 825 826 /* <Record On> Attempt to record the specified source. */ 827 #define CEC_OPCODE_RECORD_ON 0x09 828 829 /* <Record Status> Used by a Recording Device to inform the initiator of the message <Record On> about its status. */ 830 #define CEC_OPCODE_RECORD_STATUS 0x0A 831 832 /* <Record TV Screen> Request by the Recording Device to record the presently displayed source. */ 833 #define CEC_OPCODE_RECORD_TV_SCREEN 0x0F 834 835 /* <Clear Analogue Timer> Used to clear an Analogue timer block of a device. */ 836 #define CEC_OPCODE_CLEAR_ANALOGUE_TIMER 0x33 837 838 /* <Clear Digital Timer> Used to clear a Digital timer block of a device. */ 839 #define CEC_OPCODE_CLEAR_DIGITAL_TIMER 0x99 840 841 /* <Clear External Timer> Used to clear an External timer block of a device. */ 842 #define CEC_OPCODE_CLEAR_EXTERNAL_TIMER 0xA1 843 844 /* <Set Analogue Timer> Used to set a single timer block on an Analogue Recording Device. */ 845 #define CEC_OPCODE_SET_ANALOGUE_TIMER 0x34 846 847 /* <Set Digital Timer> Used to set a single timer block on a Digital Recording Device. */ 848 #define CEC_OPCODE_SET_DIGITAL_TIMER 0x97 849 850 /* <Set External Timer> Used to set a single timer block to record from an external device. */ 851 #define CEC_OPCODE_SET_EXTERNAL_TIMER 0xA2 852 853 /* 854 * <Set Timer Program Title> Used to set the name of a program associated with 855 * a timer block. Sent directly after sending a <Set Analogue Timer> or <Set Digital Timer> message. 856 * The name is then associated with that timer block. 857 */ 858 #define CEC_OPCODE_SET_TIMER_PROGRAM_TITLE 0x67 859 860 /* 861 * <Timer Cleared Status> Used to give the status of a <Clear Analogue Timer>, 862 * <Clear Digital Timer> or <Clear External Timer> message. 863 */ 864 #define CEC_OPCODE_TIMER_CLEARED_STATUS 0x43 865 866 /* <Timer Status> Used to send timer status to the initiator of a <Set Timer> message. */ 867 #define CEC_OPCODE_TIMER_STATUS 0x35 868 869 /* <CEC Version> Used to indicate the supported CEC version, in response to a <Get CEC Version> */ 870 #define CEC_OPCODE_CEC_VERSION 0x9E 871 872 /* <Get CEC Version> Used by a device to enquire which version of CEC the target supports */ 873 #define CEC_OPCODE_GET_CEC_VERSION 0x9F 874 875 /* <Give Physical Address> A request to a device to return its physical address. */ 876 #define CEC_OPCODE_GIVE_PHYSICAL_ADDRESS 0x83 877 878 /* 879 * <Report Physical Address> Used to inform all other devices of the mapping between 880 * physical and logical address of the initiator. 881 */ 882 #define CEC_OPCODE_REPORT_PHYSICAL_ADDRESS 0x84 883 884 /* 885 * Get Menu Language> Sent by a device capable of character generation (for OSD and Menus) to 886 * a TV in order to discover the currently selected Menu language. 887 * Also used by a TV during installation to discover the currently set menu language of other devices. 888 */ 889 #define CEC_OPCODE_GET_MENU_LANGUAGE 0x91 890 891 /* <Set Menu Language> Used by a TV or another device to indicate the menu language. */ 892 #define CEC_OPCODE_SET_MENU_LANGUAGE 0x32 893 894 /* <Deck Control> Used to control a device's media functions. */ 895 #define CEC_OPCODE_DECK_CONTROL 0x42 896 /* <Deck Status> Used to provide a deck's status to the initiator of the <Give Deck Status> message. */ 897 #define CEC_OPCODE_DECK_STATUS 0x1B 898 /* 899 * <Give Deck Status> Used to request the status of a device, 900 * regardless of whether or not it is the current active source. 901 */ 902 #define CEC_OPCODE_GIVE_DECK_STATUS 0x1A 903 904 /* <Play> Used to control the playback behaviour of a source device. */ 905 #define CEC_OPCODE_PLAY 0x41 906 907 /* <Give Tuner Device Status> Used to request the status of a tuner device. */ 908 #define CEC_OPCODE_GIVE_TUNER_DEVICE_STATUS 0x08 909 910 /* <Select Analogue Service> Directly selects an Analogue TV service */ 911 #define CEC_OPCODE_SELECT_ANALOGUE_SERVICE 0x92 912 913 /* <Select Digital Service> Directly selects a Digital TV, Radio or Data Broadcast Service */ 914 #define CEC_OPCODE_SELECT_DIGITAL_SERVICE 0x93 915 916 /* 917 * <Tuner Device Status> Use by a tuner device to provide its status to 918 * the initiator of the <Give Tuner Device Status> message. 919 */ 920 #define CEC_OPCODE_TUNER_DEVICE_STATUS 0x07 921 922 /* <Tuner Step Decrement> Used to tune to next lowest service in a tuner's service list. Can be used for PIP. */ 923 #define CEC_OPCODE_TUNER_STEP_DECREMENT 0x06 924 925 /* 926 * <Tuner Step Increment> Used to tune to next highest 927 * service in a tuner's service list. Can be used for PIP. 928 */ 929 #define CEC_OPCODE_TUNER_STEP_INCREMENT 0x05 930 931 /* <Device Vendor ID> Reports the vendor ID of this device. */ 932 #define CEC_OPCODE_DEVICE_VENDOR_ID 0x87 933 934 /* <Give Device Vendor ID> Requests the Vendor ID from a device. */ 935 #define CEC_OPCODE_GIVE_DEVICE_VENDOR_ID 0x8C 936 937 /* <Vendor Command> Allows vendor specific commands to be sent between two devices. */ 938 #define CEC_OPCODE_VENDOR_COMMAND 0x89 939 940 /* <Vendor Command With ID> Allows vendor specific commands to be sent between two devices or broadcast. */ 941 #define CEC_OPCODE_VENDOR_COMMAND_WITH_ID 0xA0 942 943 /* <Vendor Remote Button Down> Indicates that a remote control button has been depressed. */ 944 #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN 0x8A 945 946 /* 947 * <Vendor Remote Button Up> Indicates that a remote control button 948 * (the last button pressed indicated by the Vendor Remote Button Down message) has been released. 949 */ 950 #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP 0x8B 951 952 /* <Set OSD String> Used to send a text message to output on a TV. */ 953 #define CEC_OPCODE_SET_OSD_STRING 0x64 954 955 /* <Give OSD Name> Used to request the preferred OSD name of a device for use in menus associated with that device. */ 956 #define CEC_OPCODE_GIVE_OSD_NAME 0x46 957 958 /* <Set OSD Name> Used to set the preferred OSD name of a device for use in menus associated with that device. */ 959 #define CEC_OPCODE_SET_OSD_NAME 0x47 960 961 /* 962 * <Menu Request> A request from the TV for a device 963 * to show/remove a menu or to query if a device is currently showing a menu. 964 */ 965 #define CEC_OPCODE_MENU_REQUEST 0x8D 966 967 /* 968 * <Menu Status> Used to indicate to the TV that the device 969 * is showing/has removed a menu and requests the remote control keys to be passed though. 970 */ 971 #define CEC_OPCODE_MENU_STATUS 0x8E 972 973 /* 974 * <User Control Pressed> Used to indicate that the user 975 * pressed a remote control button or switched from one remote control button to another. 976 */ 977 #define CEC_OPCODE_USER_CONTROL_PRESSED 0x44 978 979 /* 980 * <User Control Released> Indicates that user released a remote control button 981 * (the last one indicated by the <User Control Pressed> message) 982 */ 983 #define CEC_OPCODE_USER_CONTROL_RELEASED 0x45 984 985 /* <Give Device Power Status> Used to determine the current power status of a target device */ 986 #define CEC_OPCODE_GIVE_DEVICE_POWER_STATUS 0x8F 987 988 /* <Report Power Status> Used to inform a requesting device of the current power status */ 989 #define CEC_OPCODE_REPORT_POWER_STATUS 0x90 990 991 /* <Give Audio Status> Requests an amplifier to send its volume and mute status */ 992 #define CEC_OPCODE_GIVE_AUDIO_STATUS 0x71 993 994 /* <Give System Audio Mode Status> Requests the status of the System Audio Mode */ 995 #define CEC_OPCODE_GIVE_SYSTEM_AUDIO_MODE_STATUS 0x7D 996 997 /* <Report Audio Status> Reports an amplifier's volume and mute status */ 998 #define CEC_OPCODE_REPORT_AUDIO_STATUS 0x7A 999 1000 /* <Set System Audio Mode> Turns the System Audio Mode On or Off. */ 1001 #define CEC_OPCODE_SET_SYSTEM_AUDIO_MODE 0x72 1002 1003 /* 1004 * <System Audio Mode Request> A device implementing System Audio Control and 1005 * which has volume control RC buttons (eg TV or STB) requests to use System Audio Mode to the amplifier. 1006 */ 1007 #define CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST 0x70 1008 1009 /* <System Audio Mode Status> Reports the current status of the System Audio Mode */ 1010 #define CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS 0x7E 1011 1012 /* <Set Audio Rate> Used to control audio rate from Source Device. */ 1013 #define CEC_OPCODE_SET_AUDIO_RATE 0x9A 1014 1015 /* POLL message have no opcode, So, we just use this value. */ 1016 #define CEC_OPCODE_POLLING_MESSAGE 0xFE 1017 1018 typedef enum hiUNF_CEC_LOGICALADD_E { 1019 HI_CEC_LOGICALADD_TV, 1020 HI_CEC_LOGICALADD_RECORDDEV_1, 1021 HI_CEC_LOGICALADD_RECORDDEV_2, 1022 HI_CEC_LOGICALADD_TUNER_1, 1023 HI_CEC_LOGICALADD_PLAYDEV_1, 1024 HI_CEC_LOGICALADD_AUDIOSYSTEM, 1025 HI_CEC_LOGICALADD_TUNER_2, 1026 HI_CEC_LOGICALADD_TUNER_3, 1027 HI_CEC_LOGICALADD_PLAYDEV_2, 1028 HI_CEC_LOGICALADD_RECORDDEV_3, 1029 HI_CEC_LOGICALADD_TUNER_4, 1030 HI_CEC_LOGICALADD_PLAYDEV_3, 1031 HI_CEC_LOGICALADD_RESERVED_1, 1032 HI_CEC_LOGICALADD_RESERVED_2, 1033 HI_CEC_LOGICALADD_SPECIALUSE, 1034 HI_CEC_LOGICALADD_BROADCAST, 1035 HI_CEC_LOGICALADD_BUTT 1036 } HI_CEC_LOGICALADD_E; 1037 1038 typedef enum hiUNF_CEC_CMDTYPE_E { 1039 HI_CEC_STRUCTCOMMAND, 1040 HI_CEC_RAWCOMMAND, 1041 HI_CEC_BUTT 1042 } HI_CEC_CMDTYPE_E; 1043 1044 typedef struct hiUNF_CEC_RAWDATA_S { 1045 hi_u8 u8Length; 1046 hi_u8 u8Data[15]; 1047 } HI_CEC_RAWDATA_S; 1048 1049 typedef enum hiUNF_CEC_UICMD_E { 1050 HI_CEC_UICMD_SELECT, 1051 HI_CEC_UICMD_UP, 1052 HI_CEC_UICMD_DOWN, 1053 HI_CEC_UICMD_LEFT, 1054 HI_CEC_UICMD_RIGHT, 1055 HI_CEC_UICMD_RIGHT_UP, 1056 HI_CEC_UICMD_RIGHT_DOWN, 1057 HI_CEC_UICMD_LEFT_UP, 1058 HI_CEC_UICMD_LEFT_DOWN, 1059 HI_CEC_UICMD_ROOT_MENU, 1060 HI_CEC_UICMD_SETUP_MENU, 1061 HI_CEC_UICMD_CONTENTS_MENU, 1062 HI_CEC_UICMD_FAVORITE_MENU, 1063 HI_CEC_UICMD_EXIT, 1064 HI_CEC_UICMD_NUM_0 = 0x20, 1065 HI_CEC_UICMD_NUM_1, 1066 HI_CEC_UICMD_NUM_2, 1067 HI_CEC_UICMD_NUM_3, 1068 HI_CEC_UICMD_NUM_4, 1069 HI_CEC_UICMD_NUM_5, 1070 HI_CEC_UICMD_NUM_6, 1071 HI_CEC_UICMD_NUM_7, 1072 HI_CEC_UICMD_NUM_8, 1073 HI_CEC_UICMD_NUM_9, 1074 HI_CEC_UICMD_DOT, 1075 HI_CEC_UICMD_ENTER, 1076 HI_CEC_UICMD_CLEAR, 1077 HI_CEC_UICMD_NEXT_FAVORITE = 0x2F, 1078 HI_CEC_UICMD_CHANNEL_UP, 1079 HI_CEC_UICMD_CHANNEL_DOWN, 1080 HI_CEC_UICMD_PREVIOUS_CHANNEL, 1081 HI_CEC_UICMD_SOUND_SELECT, 1082 HI_CEC_UICMD_INPUT_SELECT, 1083 HI_CEC_UICMD_DISPLAY_INFORMATION, 1084 HI_CEC_UICMD_HELP, 1085 HI_CEC_UICMD_PAGE_UP, 1086 HI_CEC_UICMD_PAGE_DOWN, 1087 HI_CEC_UICMD_POWER = 0x40, 1088 HI_CEC_UICMD_VOLUME_UP, 1089 HI_CEC_UICMD_VOLUME_DOWN, 1090 HI_CEC_UICMD_MUTE, 1091 HI_CEC_UICMD_PLAY, 1092 HI_CEC_UICMD_STOP, 1093 HI_CEC_UICMD_PAUSE, 1094 HI_CEC_UICMD_RECORD, 1095 HI_CEC_UICMD_REWIND, 1096 HI_CEC_UICMD_FAST_FORWARD, 1097 HI_CEC_UICMD_EJECT, 1098 HI_CEC_UICMD_FORWARD, 1099 HI_CEC_UICMD_BACKWARD, 1100 HI_CEC_UICMD_STOP_RECORD, 1101 HI_CEC_UICMD_PAUSE_RECORD, 1102 HI_CEC_UICMD_ANGLE = 0x50, 1103 HI_CEC_UICMD_SUBPICTURE, 1104 HI_CEC_UICMD_VIDEO_ON_DEMAND, 1105 HI_CEC_UICMD_ELECTRONIC_PROGRAM_GUIDE, 1106 HI_CEC_UICMD_TIMER_PROGRAMMING, 1107 HI_CEC_UICMD_INITIAL_CONFIGURATION, 1108 HI_CEC_UICMD_PLAY_FUNCTION = 0x60, 1109 HI_CEC_UICMD_PAUSE_PLAY_FUNCTION, 1110 HI_CEC_UICMD_RECORD_FUNCTION, 1111 HI_CEC_UICMD_PAUSE_RECORD_FUNCTION, 1112 HI_CEC_UICMD_STOP_FUNCTION, 1113 HI_CEC_UICMD_MUTE_FUNCTION, 1114 HI_CEC_UICMD_RESTORE_VOLUME_FUNCTION, 1115 HI_CEC_UICMD_TUNE_FUNCTION, 1116 HI_CEC_UICMD_SELECT_MEDIA_FUNCTION, 1117 HI_CEC_UICMD_SELECT_AV_INPUT_FUNCTION, 1118 HI_CEC_UICMD_SELECT_AUDIO_INPUT_FUNCTION, 1119 HI_CEC_UICMD_POWER_TOGGLE_FUNCTION, 1120 HI_CEC_UICMD_POWER_OFF_FUNCTION, 1121 HI_CEC_UICMD_POWER_ON_FUNCTION, 1122 HI_CEC_UICMD_F1_BLUE = 0x71, 1123 HI_CEC_UICMD_F2_RED, 1124 HI_CEC_UICMD_F3_GREEN, 1125 HI_CEC_UICMD_F4_YELLOW, 1126 HI_CEC_UICMD_F5, 1127 HI_CEC_UICMD_DATA 1128 } HI_CEC_UICMD_E; /* User Control Code */ 1129 1130 typedef struct hiUNF_HDMI_CEC_CMD_S { 1131 HI_CEC_LOGICALADD_E enSrcAdd; 1132 HI_CEC_LOGICALADD_E enDstAdd; 1133 hi_u8 u8Opcode; 1134 HI_CEC_RAWDATA_S stRawData; 1135 } HI_HDMI_CEC_CMD_S; 1136 1137 typedef struct hiUNF_HDMI_CEC_STATUS_S { 1138 hi_bool bEnable; 1139 hi_u8 u8PhysicalAddr[4]; /* CEC physic addr */ 1140 hi_u8 u8LogicalAddr; /* CEC logic addr, default:0x03. */ 1141 hi_u8 u8Network[HI_CEC_LOGICALADD_BUTT]; /* CEC's net work, 1:this device can answer cec command */ 1142 } HI_HDMI_CEC_STATUS_S; 1143 1144 typedef hi_void (*HI_HDMI_CECCALLBACK)(HI_HDMI_ID_E enHdmi, HI_HDMI_CEC_CMD_S *pstCECCmd, hi_void *pData); 1145 1146 typedef struct hiHDMI_CECCALLBACK_FUNC_S { 1147 HI_HDMI_CECCALLBACK pfnCecCallback; /* Event handling callback function */ 1148 hi_void *pPrivateData; /* Private data of the CEC callback functions and parameters */ 1149 } HI_HDMI_CECCALLBACK_FUNC_S; 1150 1151 typedef enum hiHDMI_TRACE_LEN_E { 1152 HI_HDMI_TRACE_LEN_0, 1153 HI_HDMI_TRACE_LEN_1, 1154 HI_HDMI_TRACE_LEN_2, 1155 HI_HDMI_TRACE_LEN_BUTT 1156 } HI_HDMI_TRACE_LEN_E; 1157 1158 typedef struct hiHDMI_MOD_PARAM_S { 1159 HI_HDMI_TRACE_LEN_E enTraceLen; /* Phy parameters selection. */ 1160 } HI_HDMI_MOD_PARAM_S; 1161 1162 typedef enum hiERR_HDMI_CODE_E { 1163 ERR_HDMI_NOT_INIT = 1, 1164 ERR_HDMI_INVALID_PARA, 1165 ERR_HDMI_NUL_PTR, 1166 ERR_HDMI_DEV_NOT_OPEN, 1167 ERR_HDMI_DEV_NOT_CONNECT, 1168 ERR_HDMI_READ_SINK_FAILED, 1169 ERR_HDMI_INIT_ALREADY, 1170 ERR_HDMI_CALLBACK_ALREADY, 1171 ERR_HDMI_INVALID_CALLBACK, 1172 ERR_HDMI_FEATURE_NO_SUPPORT, 1173 ERR_HDMI_BUS_BUSY, 1174 ERR_HDMI_READ_EVENT_FAILED, 1175 ERR_HDMI_NOT_START, 1176 ERR_HDMI_READ_EDID_FAILED, 1177 ERR_HDMI_INIT_FAILED, 1178 ERR_HDMI_CREATE_TESK_FAILED, 1179 ERR_HDMI_MALLOC_FAILED, 1180 ERR_HDMI_FREE_FAILED, 1181 ERR_HDMI_PTHREAD_CREATE_FAILED, 1182 ERR_HDMI_PTHREAD_JOIN_FAILED, 1183 ERR_HDMI_STRATEGY_FAILED, 1184 ERR_HDMI_SET_ATTR_FAILED, 1185 ERR_HDMI_CALLBACK_NOT_REGISTER, 1186 ERR_HDMI_CEC_CALLBACK_REREGISTER, 1187 ERR_HDMI_UNKNOWN_COMMAND, 1188 ERR_HDMI_MUTEX_LOCK_FAILED, 1189 ERR_HDMI_CEC_NOT_ENABLE, 1190 ERR_HDMI_CECCALLBACK_NOT_REG, 1191 ERR_HDMI_BUTT 1192 } ERR_HDMI_CODE_E; 1193 1194 #define HI_ERR_HDMI_NOT_INIT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_INIT) 1195 #define HI_ERR_HDMI_INVALID_PARA HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_PARA) 1196 #define HI_ERR_HDMI_NUL_PTR HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NUL_PTR) 1197 #define HI_ERR_HDMI_DEV_NOT_OPEN HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_OPEN) 1198 #define HI_ERR_HDMI_DEV_NOT_CONNECT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_CONNECT) 1199 #define HI_ERR_HDMI_READ_SINK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_SINK_FAILED) 1200 #define HI_ERR_HDMI_INIT_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_ALREADY) 1201 #define HI_ERR_HDMI_CALLBACK_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_ALREADY) 1202 #define HI_ERR_HDMI_INVALID_CALLBACK HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_CALLBACK) 1203 #define HI_ERR_HDMI_FEATURE_NO_SUPPORT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FEATURE_NO_SUPPORT) 1204 #define HI_ERR_HDMI_BUS_BUSY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_BUS_BUSY) 1205 #define HI_ERR_HDMI_READ_EVENT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EVENT_FAILED) 1206 #define HI_ERR_HDMI_NOT_START HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_START) 1207 #define HI_ERR_HDMI_READ_EDID_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EDID_FAILED) 1208 #define HI_ERR_HDMI_INIT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_FAILED) 1209 #define HI_ERR_HDMI_CREATE_TESK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CREATE_TESK_FAILED) 1210 #define HI_ERR_HDMI_MALLOC_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MALLOC_FAILED) 1211 #define HI_ERR_HDMI_FREE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FREE_FAILED) 1212 #define HI_ERR_HDMI_PTHREAD_CREATE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_CREATE_FAILED) 1213 #define HI_ERR_HDMI_PTHREAD_JOIN_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_JOIN_FAILED) 1214 #define HI_ERR_HDMI_STRATEGY_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_STRATEGY_FAILED) 1215 #define HI_ERR_HDMI_SET_ATTR_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_SET_ATTR_FAILED) 1216 #define HI_ERR_HDMI_CEC_CALLBACK_REREGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_CALLBACK_REREGISTER) 1217 #define HI_ERR_HDMI_CALLBACK_NOT_REGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_NOT_REGISTER) 1218 #define HI_ERR_HDMI_UNKNOWN_COMMAND HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_UNKNOWN_COMMAND) 1219 #define HI_ERR_HDMI_MUTEX_LOCK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MUTEX_LOCK_FAILED) 1220 #define HI_ERR_HDMI_CEC_NOT_ENABLE HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_NOT_ENABLE) 1221 #define HI_ERR_HDMI_CECCALLBACK_NOT_REG HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CECCALLBACK_NOT_REG) 1222 1223 #ifdef __cplusplus 1224 #if __cplusplus 1225 } 1226 #endif 1227 #endif 1228 #endif 1229 1230