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 /* Transfer profile supported by xvYCC601. 1: P0; 2: P1; 4: P2. */ 468 hi_u8 u8MDBit; 469 /* Num of audio Info */ 470 hi_u32 u32AudioInfoNum; 471 /* Audio Info.For details, see Table 37 in EIA-CEA-861-D. */ 472 HI_HDMI_AUDIO_INFO_S stAudioInfo[HI_HDMI_MAX_AUDIO_CAP_COUNT]; 473 /* Speaker position. For details, see the definition of SpeakerDATABlock in EIA-CEA-861-D. */ 474 hi_bool bSpeaker[HDMI_AUDIO_SPEAKER_BUTT]; 475 /* Device vendor flag */ 476 hi_u8 u8IDManufactureName[4]; 477 /* Device ID. */ 478 hi_u32 u32IDProductCode; 479 /* Device sequence number. */ 480 hi_u32 u32IDSerialNumber; 481 /* Device production data (week). */ 482 hi_u32 u32WeekOfManufacture; 483 /* Set the production data (year). */ 484 hi_u32 u32YearOfManufacture; 485 /* Device version number */ 486 hi_u8 u8Version; 487 /* Device sub version number */ 488 hi_u8 u8Revision; 489 /* EDID extended block number */ 490 hi_u8 u8EDIDExternBlockNum; 491 /* Valid flag of the consumer electronics control (CEC) physical address */ 492 hi_bool bIsPhyAddrValid; 493 /* CEC physical address A */ 494 hi_u8 u8PhyAddr_A; 495 /* CEC physical address B */ 496 hi_u8 u8PhyAddr_B; 497 /* CEC physical address C */ 498 hi_u8 u8PhyAddr_C; 499 /* CEC physical address D */ 500 hi_u8 u8PhyAddr_D; 501 /* Whether to support the DVI dual-link operation. */ 502 hi_bool bSupportDVIDual; 503 /* Whether to support the YCBCR 4:4:4 deep-color mode. */ 504 hi_bool bSupportDeepColorYCBCR444; 505 /* Whether to support the deep-color 30-bit mode. */ 506 hi_bool bSupportDeepColor30Bit; 507 /* Whether to support the deep-color 36-bit mode. */ 508 hi_bool bSupportDeepColor36Bit; 509 /* Whether to support the deep-color 48-bit mode. */ 510 hi_bool bSupportDeepColor48Bit; 511 /* Whether to support the Supports_AI mode. */ 512 hi_bool bSupportAI; 513 /* Maximum TMDS clock. */ 514 hi_u32 u32MaxTMDSClock; 515 /* Delay flag bit. */ 516 hi_bool bI_Latency_Fields_Present; 517 /* whether Video_Latency and Audio_Latency fields are present */ 518 hi_bool bLatency_Fields_Present; 519 /* Special video format */ 520 hi_bool bHDMI_Video_Present; 521 /* Video delay */ 522 hi_u8 u8Video_Latency; 523 /* Audio delay */ 524 hi_u8 u8Audio_Latency; 525 /* Video delay in interlaced video mode */ 526 hi_u8 u8Interlaced_Video_Latency; 527 /* Audio delay in interlaced video mode */ 528 hi_u8 u8Interlaced_Audio_Latency; 529 /* Whether to support the YUV420 deep-color 30-bit mode. */ 530 hi_bool bSupportY420DC30Bit; 531 /* Whether to support the YUV420 deep-color 36-bit mode. */ 532 hi_bool bSupportY420DC36Bit; 533 /* Whether to support the YUV420 deep-color 48-bit mode. */ 534 hi_bool bSupportY420DC48Bit; 535 /* Whether to support HDMI2.0. */ 536 hi_bool bSupportHdmi_2_0; 537 /* the format support YUV420 */ 538 hi_bool bSupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; 539 /* the format only support YUV420 */ 540 hi_bool bOnlySupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; 541 /* 542 * flag of RGB Quantization Range selectable. 543 * when HI_TRUE,sink expect full/limited range is selectable 544 * or sink expect default range. 545 */ 546 hi_bool bYccQrangeSelectable; 547 /* 548 * flag of YCC Quantization Range selectable. 549 * when HI_TRUE,sink expect full/limited range is selectable;or sink expect default range. 550 */ 551 hi_bool bRgbQrangeSelectable; 552 /* HDR support flag.When HDR Static Metadata Data Block is indicated,flag HI_TRUE;or,HI_FALSE. */ 553 hi_bool bHdrSupport; 554 /* HDR capability */ 555 HI_HDMI_HDR_CAP_S stHdr; 556 /* Detailed timing information */ 557 HI_HDMI_DET_TIMING_S stDetailedTiming; 558 } HI_HDMI_SINK_CAPABILITY_S; 559 560 typedef struct hiHDMI_ATTR_S { 561 /* Whether to forcibly output the video over the HDMI. */ 562 hi_bool bEnableHdmi; 563 /* 564 * Whether to output video.The value must be HI_TRUE. 565 * If the value is HI_FALSE, the HDMI is forcibly set to HI_TRUE. 566 */ 567 hi_bool bEnableVideo; 568 /* Video norm. This value of the video norm must be consistent with the norm of the video output. */ 569 HI_HDMI_VIDEO_FMT_E enVideoFmt; 570 /* HDMI input video input mode.VIDEO_MODE_YCBCR444,VIDEO_MODE_YCBCR422,VIDEO_MODE_YCBCR420,VIDEO_MODE_RGB444 */ 571 HI_HDMI_VIDEO_MODE_E enVidInMode; 572 /* HDMI output video output mode.VIDEO_MODE_YCBCR444,VIDEO_MODE_YCBCR422,VIDEO_MODE_YCBCR420,VIDEO_MODE_RGB444 */ 573 HI_HDMI_VIDEO_MODE_E enVidOutMode; 574 /* CSC output quantization range HDMI_QUANTIZATION_RANGE_LIMITED, HDMI_QUANTIZATION_RANGE_FULL>**/ 575 HI_HDMI_QUANTIZATION_E enOutCscQuantization; 576 /* DeepColor output mode. It is HI_HDMI_DEEP_COLOR_24BIT by default. */ 577 HI_HDMI_DEEP_COLOR_E enDeepColorMode; 578 /* Whether to enable the xvYCC output mode. It is HI_FALSE by default. */ 579 hi_bool bxvYCCMode; 580 /* Whether to enable the audio. */ 581 hi_bool bEnableAudio; 582 /* HDMI audio source. It is set to HI_HDMI_SND_INTERFACE_I2S, which needs to be consistent with the VO interface. */ 583 HI_HDMI_SND_INTERFACE_E enSoundIntf; 584 /* Multi-channel or stereo 0: stereo 1: eight-channel fixed for multi-channel */ 585 hi_bool bIsMultiChannel; 586 /* Audio sampling rate. This parameter needs to be consistent with that of the VO. */ 587 HI_HDMI_SAMPLE_RATE_E enSampleRate; 588 /* Audio down sampling rate parameter. It is 0 by default. */ 589 hi_u8 u8DownSampleParm; 590 /* Audio bit width. It is 16 by default. This parameter needs to be consistent with that of the VO. */ 591 HI_HDMI_BIT_DEPTH_E enBitDepth; 592 /* Reserved. It is set to 0. I2S control (0x7A:0x1D) */ 593 hi_u8 u8I2SCtlVbit; 594 /* Whether to enable AVI InfoFrame. It is recommended to enable this function. */ 595 hi_bool bEnableAviInfoFrame; 596 /* Whether to enable AUDIO InfoFrame. It is recommended to enable this function. */ 597 hi_bool bEnableAudInfoFrame; 598 /* Whether to enable SPD InfoFrame. It is recommended to disable this function. */ 599 hi_bool bEnableSpdInfoFrame; 600 /* Whether to enable MPEG InfoFrame. It is recommended to disable this function. */ 601 hi_bool bEnableMpegInfoFrame; 602 /* Whether to enable the debug information in the HDMI. It is recommended to disable this function. */ 603 hi_bool bDebugFlag; 604 /* Whether to enable the HDCP.0: disabled 1: enabled */ 605 hi_bool bHDCPEnable; 606 /* Whether to enable 3D mode. 0: disabled 1: enabled */ 607 hi_bool b3DEnable; 608 /* 3D Parameter. The default value is 9. */ 609 hi_u8 u83DParam; 610 /* When get capability fail, HDMI forcily(priority) judgments output video mode. Default is HI_HDMI_FORCE_HDMI. */ 611 HI_HDMI_FORCE_ACTION_E enDefaultMode; 612 /* Whether to enable auth mode. 0: disabled 1: enabled */ 613 hi_bool bAuthMode; 614 /* 615 * Enable flag of video mode & DVI adapting case of user setting incorrect, default:HI_TRUE. 616 * When user have no any adapting strategy, suggestion HI_TRUE 617 */ 618 hi_bool bEnableVidModeAdapt; 619 /* 620 * Enable flag of deep color mode adapting case of user setting incorrect, default: HI_FALSE. 621 * When user have no any adapting strategy, suggestion HI_TRUE 622 */ 623 hi_bool bEnableDeepClrAdapt; 624 /* 625 * Pixclk of enVideoFmt(unit is kHz). 626 * (This param is valid only when enVideoFmt is HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE) 627 */ 628 hi_u32 u32PixClk; 629 } HI_HDMI_ATTR_S; 630 631 typedef struct hiHI_HDMI_EDID_S { 632 hi_bool bEdidValid; 633 hi_u32 u32Edidlength; 634 hi_u8 u8Edid[HI_HDMI_EDID_RAW_DATA_LEN]; 635 } HI_HDMI_EDID_S; 636 637 typedef enum hiHDMI_INFOFRAME_TYPE_E { 638 HI_INFOFRAME_TYPE_AVI, /* HDMI AVI InfoFrame */ 639 HI_INFOFRAME_TYPE_SPD, /* HDMI SPD InfoFrame */ 640 HI_INFOFRAME_TYPE_AUDIO, /* HDMI AUDIO InfoFrame */ 641 HI_INFOFRAME_TYPE_MPEG, /* HDMI MPEG InfoFrame */ 642 HI_INFOFRAME_TYPE_VENDORSPEC, /* HDMI Vendor Specific InfoFrame */ 643 HI_INFOFRAME_TYPE_BUTT 644 } HI_HDMI_INFOFRAME_TYPE_E; 645 646 typedef struct hi_HDMI_AVI_INFOFRAME_VER2_S { 647 HI_HDMI_VIDEO_FMT_E enTimingMode; 648 HI_HDMI_COLOR_SPACE_E enColorSpace; 649 hi_bool bActive_Infor_Present; 650 HI_HDMI_BARINFO_E enBarInfo; 651 HI_HDMI_SCANINFO_E enScanInfo; 652 HI_HDMI_COLORIMETRY_E enColorimetry; 653 HI_HDMI_EXT_COLORIMETRY_E enExtColorimetry; 654 HI_HDMI_PIC_ASPECT_RATIO_E enAspectRatio; 655 HI_HDMI_ACT_ASPECT_RATIO_E enActiveAspectRatio; 656 HI_HDMI_PICTURE_SCALING_E enPictureScaling; 657 HI_HDMI_RGB_QUAN_RAGE_E enRGBQuantization; 658 hi_bool bIsITContent; 659 HI_HDMI_PIXEL_REPETITION_E enPixelRepetition; 660 HI_HDMI_CONTENT_TYPE_E enContentType; 661 HI_HDMI_YCC_QUAN_RAGE_E enYCCQuantization; 662 hi_u16 u16LineNEndofTopBar; 663 hi_u16 u16LineNStartofBotBar; 664 hi_u16 u16PixelNEndofLeftBar; 665 hi_u16 u16PixelNStartofRightBar; 666 } HI_HDMI_AVI_INFOFRAME_VER2_S; 667 668 typedef enum hiHDMI_AUDIO_CHANEL_CNT_E { 669 HI_HDMI_AUDIO_CHANEL_CNT_STREAM, 670 HI_HDMI_AUDIO_CHANEL_CNT_2, 671 HI_HDMI_AUDIO_CHANEL_CNT_3, 672 HI_HDMI_AUDIO_CHANEL_CNT_4, 673 HI_HDMI_AUDIO_CHANEL_CNT_5, 674 HI_HDMI_AUDIO_CHANEL_CNT_6, 675 HI_HDMI_AUDIO_CHANEL_CNT_7, 676 HI_HDMI_AUDIO_CHANEL_CNT_8 677 } HI_HDMI_AUDIO_CHANEL_CNT_E; 678 679 typedef enum hiHDMI_AUDIO_SAMPLE_SIZE_E { 680 HI_HDMI_AUDIO_SAMPLE_SIZE_STREAM, 681 HI_HDMI_AUDIO_SAMPLE_SIZE_16, 682 HI_HDMI_AUDIO_SAMPLE_SIZE_20, 683 HI_HDMI_AUDIO_SAMPLE_SIZE_24 684 } HI_HDMI_AUDIO_SAMPLE_SIZE_E; 685 686 typedef enum hiHDMI_AUDIO_SAMPLE_FREQ_E { 687 HI_HDMI_AUDIO_SAMPLE_FREQ_STREAM, 688 HI_HDMI_AUDIO_SAMPLE_FREQ_32000, 689 HI_HDMI_AUDIO_SAMPLE_FREQ_44100, 690 HI_HDMI_AUDIO_SAMPLE_FREQ_48000, 691 HI_HDMI_AUDIO_SAMPLE_FREQ_88200, 692 HI_HDMI_AUDIO_SAMPLE_FREQ_96000, 693 HI_HDMI_AUDIO_SAMPLE_FREQ_176400, 694 HI_HDMI_AUDIO_SAMPLE_FREQ_192000 695 } HI_HDMI_AUDIO_SAMPLE_FREQ_E; 696 697 typedef enum hiHDMI_LEVEL_SHIFT_VALUE_E { 698 HI_HDMI_LEVEL_SHIFT_VALUE_0_DB, 699 HI_HDMI_LEVEL_SHIFT_VALUE_1_DB, 700 HI_HDMI_LEVEL_SHIFT_VALUE_2_DB, 701 HI_HDMI_LEVEL_SHIFT_VALUE_3_DB, 702 HI_HDMI_LEVEL_SHIFT_VALUE_4_DB, 703 HI_HDMI_LEVEL_SHIFT_VALUE_5_DB, 704 HI_HDMI_LEVEL_SHIFT_VALUE_6_DB, 705 HI_HDMI_LEVEL_SHIFT_VALUE_7_DB, 706 HI_HDMI_LEVEL_SHIFT_VALUE_8_DB, 707 HI_HDMI_LEVEL_SHIFT_VALUE_9_DB, 708 HI_HDMI_LEVEL_SHIFT_VALUE_10_DB, 709 HI_HDMI_LEVEL_SHIFT_VALUE_11_DB, 710 HI_HDMI_LEVEL_SHIFT_VALUE_12_DB, 711 HI_HDMI_LEVEL_SHIFT_VALUE_13_DB, 712 HI_HDMI_LEVEL_SHIFT_VALUE_14_DB, 713 HI_HDMI_LEVEL_SHIFT_VALUE_15_DB 714 } HI_HDMI_LEVEL_SHIFT_VALUE_E; 715 716 typedef enum hiHDMI_LFE_PLAYBACK_LEVEL_E { 717 HI_HDMI_LFE_PLAYBACK_NO, 718 HI_HDMI_LFE_PLAYBACK_0_DB, 719 HI_HDMI_LFE_PLAYBACK_10_DB, 720 HI_HDMI_LFE_PLAYBACK_RESEVED 721 } HI_HDMI_LFE_PLAYBACK_LEVEL_E; 722 723 typedef struct hiHDMI_AUD_INFOFRAME_VER1_S { 724 HI_HDMI_AUDIO_CHANEL_CNT_E enChannelCount; 725 HI_HDMI_CODING_TYPE_E enCodingType; 726 HI_HDMI_AUDIO_SAMPLE_SIZE_E enSampleSize; 727 HI_HDMI_AUDIO_SAMPLE_FREQ_E enSamplingFrequency; 728 hi_u8 u8ChannelAlloc; /* Channel/Speaker Allocation.Range [0,255] */ 729 HI_HDMI_LEVEL_SHIFT_VALUE_E enLevelShift; 730 HI_HDMI_LFE_PLAYBACK_LEVEL_E enLfePlaybackLevel; 731 hi_bool bDownmixInhibit; 732 } HI_HDMI_AUD_INFOFRAME_VER1_S; 733 734 typedef struct hiHDMI_SPD_INFOFRAME_S { 735 hi_u8 u8VendorName[8]; 736 hi_u8 u8ProductDescription[16]; 737 } HI_HDMI_SPD_INFOFRAME_S; 738 739 typedef struct hiHDMI_MPEGSOURCE_INFOFRAME_S { 740 hi_u32 u32MPEGBitRate; 741 hi_bool bIsFieldRepeated; 742 } HI_HDMI_MPEGSOURCE_INFOFRAME_S; 743 744 typedef struct hiHDMI_VENDORSPEC_INFOFRAME_S { 745 hi_u8 u8DataLen; 746 hi_u8 u8UserData[HI_HDMI_VENDOR_USER_DATA_MAX_LEN]; 747 } HI_HDMI_VENDORSPEC_INFOFRAME_S; 748 749 typedef union hiHDMI_INFOFRAME_UNIT_U { 750 HI_HDMI_AVI_INFOFRAME_VER2_S stAVIInfoFrame; 751 HI_HDMI_AUD_INFOFRAME_VER1_S stAUDInfoFrame; 752 HI_HDMI_SPD_INFOFRAME_S stSPDInfoFrame; 753 HI_HDMI_MPEGSOURCE_INFOFRAME_S stMPEGSourceInfoFrame; 754 HI_HDMI_VENDORSPEC_INFOFRAME_S stVendorSpecInfoFrame; 755 } HI_HMDI_INFORFRAME_UNIT_U; 756 757 typedef struct hiUNF_HDMI_INFOFRAME_S { 758 HI_HDMI_INFOFRAME_TYPE_E enInfoFrameType; /* InfoFrame type */ 759 HI_HMDI_INFORFRAME_UNIT_U unInforUnit; /* InfoFrame date */ 760 } HI_HDMI_INFOFRAME_S; 761 762 /* 763 * CEC's Opcode: Please refer to CEC 15 Message Descriptions 764 * General Protocol messages 765 * Feature Abort> Used as a response to indicate that the device does not support the requested message type, 766 * or that it cannot execute it at the present time. 767 */ 768 #define CEC_OPCODE_FEATURE_ABORT 0x00 769 770 /* <Abort> Message This message is reserved for testing purposes. */ 771 #define CEC_OPCODE_ABORT_MESSAGE 0xFF 772 773 /* 774 * One Touch Play Feature 775 * <Active Source> Used by a new source to indicate that 776 * it has started to transmit a stream OR used in response to a <Request Active Source> 777 */ 778 #define CEC_OPCODE_ACTIVE_SOURCE 0x82 779 780 /* 781 * <Image View On> Sent by a source device to the TV 782 * whenever it enters the active state (alternatively it may send <Text View On>). 783 */ 784 #define CEC_OPCODE_IMAGE_VIEW_ON 0x04 785 786 /* 787 * <Text View On> As <Image View On>, 788 * but should also remove any text, menus and PIP windows from the TV's display. 789 */ 790 #define CEC_OPCODE_TEXT_VIEW_ON 0x0D 791 792 /* 793 * Routing Control Feature 794 * <Inactive Source> Used by the currently active source to inform the TV 795 * that it has no video to be presented to the user, or is going into standby 796 * as the result of a local user command on the device. 797 */ 798 #define CEC_OPCODE_INACTIVE_SOURCE 0x9D 799 800 /* <Request Active Source> Used by a new device to discover the status of the system. */ 801 #define CEC_OPCODE_REQUEST_ACTIVE_SOURCE 0x85 802 803 /* 804 * <Routing Change> Sent by a CEC Switch when it is manually switched to 805 * inform all other devices on the network that the active route below the switch has changed. 806 */ 807 #define CEC_OPCODE_ROUTING_CHANGE 0x80 808 809 /* <Routing Information> Sent by a CEC Switch to indicate the active route below the switch. */ 810 #define CEC_OPCODE_ROUTING_INFORMATION 0x81 811 812 /* <Set Stream Path> Used by the TV to request a streaming path from the specified physical address. */ 813 #define CEC_OPCODE_SET_STREAM_PATH 0x86 814 815 /* 816 * <Standby> Switches one or all devices into standby mode. 817 * Can be used as a broadcast message or be addressed to a specific device. 818 * See section CEC 13.3 for important notes on the use of this message 819 */ 820 #define CEC_OPCODE_STANDBY 0x36 821 822 /* <Record Off> Requests a device to stop a recording. */ 823 #define CEC_OPCODE_RECORD_OFF 0x0B 824 825 /* <Record On> Attempt to record the specified source. */ 826 #define CEC_OPCODE_RECORD_ON 0x09 827 828 /* <Record Status> Used by a Recording Device to inform the initiator of the message <Record On> about its status. */ 829 #define CEC_OPCODE_RECORD_STATUS 0x0A 830 831 /* <Record TV Screen> Request by the Recording Device to record the presently displayed source. */ 832 #define CEC_OPCODE_RECORD_TV_SCREEN 0x0F 833 834 /* <Clear Analogue Timer> Used to clear an Analogue timer block of a device. */ 835 #define CEC_OPCODE_CLEAR_ANALOGUE_TIMER 0x33 836 837 /* <Clear Digital Timer> Used to clear a Digital timer block of a device. */ 838 #define CEC_OPCODE_CLEAR_DIGITAL_TIMER 0x99 839 840 /* <Clear External Timer> Used to clear an External timer block of a device. */ 841 #define CEC_OPCODE_CLEAR_EXTERNAL_TIMER 0xA1 842 843 /* <Set Analogue Timer> Used to set a single timer block on an Analogue Recording Device. */ 844 #define CEC_OPCODE_SET_ANALOGUE_TIMER 0x34 845 846 /* <Set Digital Timer> Used to set a single timer block on a Digital Recording Device. */ 847 #define CEC_OPCODE_SET_DIGITAL_TIMER 0x97 848 849 /* <Set External Timer> Used to set a single timer block to record from an external device. */ 850 #define CEC_OPCODE_SET_EXTERNAL_TIMER 0xA2 851 852 /* 853 * <Set Timer Program Title> Used to set the name of a program associated with 854 * a timer block. Sent directly after sending a <Set Analogue Timer> or <Set Digital Timer> message. 855 * The name is then associated with that timer block. 856 */ 857 #define CEC_OPCODE_SET_TIMER_PROGRAM_TITLE 0x67 858 859 /* 860 * <Timer Cleared Status> Used to give the status of a <Clear Analogue Timer>, 861 * <Clear Digital Timer> or <Clear External Timer> message. 862 */ 863 #define CEC_OPCODE_TIMER_CLEARED_STATUS 0x43 864 865 /* <Timer Status> Used to send timer status to the initiator of a <Set Timer> message. */ 866 #define CEC_OPCODE_TIMER_STATUS 0x35 867 868 /* <CEC Version> Used to indicate the supported CEC version, in response to a <Get CEC Version> */ 869 #define CEC_OPCODE_CEC_VERSION 0x9E 870 871 /* <Get CEC Version> Used by a device to enquire which version of CEC the target supports */ 872 #define CEC_OPCODE_GET_CEC_VERSION 0x9F 873 874 /* <Give Physical Address> A request to a device to return its physical address. */ 875 #define CEC_OPCODE_GIVE_PHYSICAL_ADDRESS 0x83 876 877 /* 878 * <Report Physical Address> Used to inform all other devices of the mapping between 879 * physical and logical address of the initiator. 880 */ 881 #define CEC_OPCODE_REPORT_PHYSICAL_ADDRESS 0x84 882 883 /* 884 * Get Menu Language> Sent by a device capable of character generation (for OSD and Menus) to 885 * a TV in order to discover the currently selected Menu language. 886 * Also used by a TV during installation to discover the currently set menu language of other devices. 887 */ 888 #define CEC_OPCODE_GET_MENU_LANGUAGE 0x91 889 890 /* <Set Menu Language> Used by a TV or another device to indicate the menu language. */ 891 #define CEC_OPCODE_SET_MENU_LANGUAGE 0x32 892 893 /* <Deck Control> Used to control a device's media functions. */ 894 #define CEC_OPCODE_DECK_CONTROL 0x42 895 /* <Deck Status> Used to provide a deck's status to the initiator of the <Give Deck Status> message. */ 896 #define CEC_OPCODE_DECK_STATUS 0x1B 897 /* 898 * <Give Deck Status> Used to request the status of a device, 899 * regardless of whether or not it is the current active source. 900 */ 901 #define CEC_OPCODE_GIVE_DECK_STATUS 0x1A 902 903 /* <Play> Used to control the playback behaviour of a source device. */ 904 #define CEC_OPCODE_PLAY 0x41 905 906 /* <Give Tuner Device Status> Used to request the status of a tuner device. */ 907 #define CEC_OPCODE_GIVE_TUNER_DEVICE_STATUS 0x08 908 909 /* <Select Analogue Service> Directly selects an Analogue TV service */ 910 #define CEC_OPCODE_SELECT_ANALOGUE_SERVICE 0x92 911 912 /* <Select Digital Service> Directly selects a Digital TV, Radio or Data Broadcast Service */ 913 #define CEC_OPCODE_SELECT_DIGITAL_SERVICE 0x93 914 915 /* 916 * <Tuner Device Status> Use by a tuner device to provide its status to 917 * the initiator of the <Give Tuner Device Status> message. 918 */ 919 #define CEC_OPCODE_TUNER_DEVICE_STATUS 0x07 920 921 /* <Tuner Step Decrement> Used to tune to next lowest service in a tuner's service list. Can be used for PIP. */ 922 #define CEC_OPCODE_TUNER_STEP_DECREMENT 0x06 923 924 /* 925 * <Tuner Step Increment> Used to tune to next highest 926 * service in a tuner's service list. Can be used for PIP. 927 */ 928 #define CEC_OPCODE_TUNER_STEP_INCREMENT 0x05 929 930 /* <Device Vendor ID> Reports the vendor ID of this device. */ 931 #define CEC_OPCODE_DEVICE_VENDOR_ID 0x87 932 933 /* <Give Device Vendor ID> Requests the Vendor ID from a device. */ 934 #define CEC_OPCODE_GIVE_DEVICE_VENDOR_ID 0x8C 935 936 /* <Vendor Command> Allows vendor specific commands to be sent between two devices. */ 937 #define CEC_OPCODE_VENDOR_COMMAND 0x89 938 939 /* <Vendor Command With ID> Allows vendor specific commands to be sent between two devices or broadcast. */ 940 #define CEC_OPCODE_VENDOR_COMMAND_WITH_ID 0xA0 941 942 /* <Vendor Remote Button Down> Indicates that a remote control button has been depressed. */ 943 #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN 0x8A 944 945 /* 946 * <Vendor Remote Button Up> Indicates that a remote control button 947 * (the last button pressed indicated by the Vendor Remote Button Down message) has been released. 948 */ 949 #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP 0x8B 950 951 /* <Set OSD String> Used to send a text message to output on a TV. */ 952 #define CEC_OPCODE_SET_OSD_STRING 0x64 953 954 /* <Give OSD Name> Used to request the preferred OSD name of a device for use in menus associated with that device. */ 955 #define CEC_OPCODE_GIVE_OSD_NAME 0x46 956 957 /* <Set OSD Name> Used to set the preferred OSD name of a device for use in menus associated with that device. */ 958 #define CEC_OPCODE_SET_OSD_NAME 0x47 959 960 /* 961 * <Menu Request> A request from the TV for a device 962 * to show/remove a menu or to query if a device is currently showing a menu. 963 */ 964 #define CEC_OPCODE_MENU_REQUEST 0x8D 965 966 /* 967 * <Menu Status> Used to indicate to the TV that the device 968 * is showing/has removed a menu and requests the remote control keys to be passed though. 969 */ 970 #define CEC_OPCODE_MENU_STATUS 0x8E 971 972 /* 973 * <User Control Pressed> Used to indicate that the user 974 * pressed a remote control button or switched from one remote control button to another. 975 */ 976 #define CEC_OPCODE_USER_CONTROL_PRESSED 0x44 977 978 /* 979 * <User Control Released> Indicates that user released a remote control button 980 * (the last one indicated by the <User Control Pressed> message) 981 */ 982 #define CEC_OPCODE_USER_CONTROL_RELEASED 0x45 983 984 /* <Give Device Power Status> Used to determine the current power status of a target device */ 985 #define CEC_OPCODE_GIVE_DEVICE_POWER_STATUS 0x8F 986 987 /* <Report Power Status> Used to inform a requesting device of the current power status */ 988 #define CEC_OPCODE_REPORT_POWER_STATUS 0x90 989 990 /* <Give Audio Status> Requests an amplifier to send its volume and mute status */ 991 #define CEC_OPCODE_GIVE_AUDIO_STATUS 0x71 992 993 /* <Give System Audio Mode Status> Requests the status of the System Audio Mode */ 994 #define CEC_OPCODE_GIVE_SYSTEM_AUDIO_MODE_STATUS 0x7D 995 996 /* <Report Audio Status> Reports an amplifier's volume and mute status */ 997 #define CEC_OPCODE_REPORT_AUDIO_STATUS 0x7A 998 999 /* <Set System Audio Mode> Turns the System Audio Mode On or Off. */ 1000 #define CEC_OPCODE_SET_SYSTEM_AUDIO_MODE 0x72 1001 1002 /* 1003 * <System Audio Mode Request> A device implementing System Audio Control and 1004 * which has volume control RC buttons (eg TV or STB) requests to use System Audio Mode to the amplifier. 1005 */ 1006 #define CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST 0x70 1007 1008 /* <System Audio Mode Status> Reports the current status of the System Audio Mode */ 1009 #define CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS 0x7E 1010 1011 /* <Set Audio Rate> Used to control audio rate from Source Device. */ 1012 #define CEC_OPCODE_SET_AUDIO_RATE 0x9A 1013 1014 /* POLL message have no opcode, So, we just use this value. */ 1015 #define CEC_OPCODE_POLLING_MESSAGE 0xFE 1016 1017 typedef enum hiUNF_CEC_LOGICALADD_E { 1018 HI_CEC_LOGICALADD_TV, 1019 HI_CEC_LOGICALADD_RECORDDEV_1, 1020 HI_CEC_LOGICALADD_RECORDDEV_2, 1021 HI_CEC_LOGICALADD_TUNER_1, 1022 HI_CEC_LOGICALADD_PLAYDEV_1, 1023 HI_CEC_LOGICALADD_AUDIOSYSTEM, 1024 HI_CEC_LOGICALADD_TUNER_2, 1025 HI_CEC_LOGICALADD_TUNER_3, 1026 HI_CEC_LOGICALADD_PLAYDEV_2, 1027 HI_CEC_LOGICALADD_RECORDDEV_3, 1028 HI_CEC_LOGICALADD_TUNER_4, 1029 HI_CEC_LOGICALADD_PLAYDEV_3, 1030 HI_CEC_LOGICALADD_RESERVED_1, 1031 HI_CEC_LOGICALADD_RESERVED_2, 1032 HI_CEC_LOGICALADD_SPECIALUSE, 1033 HI_CEC_LOGICALADD_BROADCAST, 1034 HI_CEC_LOGICALADD_BUTT 1035 } HI_CEC_LOGICALADD_E; 1036 1037 typedef enum hiUNF_CEC_CMDTYPE_E { 1038 HI_CEC_STRUCTCOMMAND, 1039 HI_CEC_RAWCOMMAND, 1040 HI_CEC_BUTT 1041 } HI_CEC_CMDTYPE_E; 1042 1043 typedef struct hiUNF_CEC_RAWDATA_S { 1044 hi_u8 u8Length; 1045 hi_u8 u8Data[15]; 1046 } HI_CEC_RAWDATA_S; 1047 1048 typedef enum hiUNF_CEC_UICMD_E { 1049 HI_CEC_UICMD_SELECT, 1050 HI_CEC_UICMD_UP, 1051 HI_CEC_UICMD_DOWN, 1052 HI_CEC_UICMD_LEFT, 1053 HI_CEC_UICMD_RIGHT, 1054 HI_CEC_UICMD_RIGHT_UP, 1055 HI_CEC_UICMD_RIGHT_DOWN, 1056 HI_CEC_UICMD_LEFT_UP, 1057 HI_CEC_UICMD_LEFT_DOWN, 1058 HI_CEC_UICMD_ROOT_MENU, 1059 HI_CEC_UICMD_SETUP_MENU, 1060 HI_CEC_UICMD_CONTENTS_MENU, 1061 HI_CEC_UICMD_FAVORITE_MENU, 1062 HI_CEC_UICMD_EXIT, 1063 HI_CEC_UICMD_NUM_0 = 0x20, 1064 HI_CEC_UICMD_NUM_1, 1065 HI_CEC_UICMD_NUM_2, 1066 HI_CEC_UICMD_NUM_3, 1067 HI_CEC_UICMD_NUM_4, 1068 HI_CEC_UICMD_NUM_5, 1069 HI_CEC_UICMD_NUM_6, 1070 HI_CEC_UICMD_NUM_7, 1071 HI_CEC_UICMD_NUM_8, 1072 HI_CEC_UICMD_NUM_9, 1073 HI_CEC_UICMD_DOT, 1074 HI_CEC_UICMD_ENTER, 1075 HI_CEC_UICMD_CLEAR, 1076 HI_CEC_UICMD_NEXT_FAVORITE = 0x2F, 1077 HI_CEC_UICMD_CHANNEL_UP, 1078 HI_CEC_UICMD_CHANNEL_DOWN, 1079 HI_CEC_UICMD_PREVIOUS_CHANNEL, 1080 HI_CEC_UICMD_SOUND_SELECT, 1081 HI_CEC_UICMD_INPUT_SELECT, 1082 HI_CEC_UICMD_DISPLAY_INFORMATION, 1083 HI_CEC_UICMD_HELP, 1084 HI_CEC_UICMD_PAGE_UP, 1085 HI_CEC_UICMD_PAGE_DOWN, 1086 HI_CEC_UICMD_POWER = 0x40, 1087 HI_CEC_UICMD_VOLUME_UP, 1088 HI_CEC_UICMD_VOLUME_DOWN, 1089 HI_CEC_UICMD_MUTE, 1090 HI_CEC_UICMD_PLAY, 1091 HI_CEC_UICMD_STOP, 1092 HI_CEC_UICMD_PAUSE, 1093 HI_CEC_UICMD_RECORD, 1094 HI_CEC_UICMD_REWIND, 1095 HI_CEC_UICMD_FAST_FORWARD, 1096 HI_CEC_UICMD_EJECT, 1097 HI_CEC_UICMD_FORWARD, 1098 HI_CEC_UICMD_BACKWARD, 1099 HI_CEC_UICMD_STOP_RECORD, 1100 HI_CEC_UICMD_PAUSE_RECORD, 1101 HI_CEC_UICMD_ANGLE = 0x50, 1102 HI_CEC_UICMD_SUBPICTURE, 1103 HI_CEC_UICMD_VIDEO_ON_DEMAND, 1104 HI_CEC_UICMD_ELECTRONIC_PROGRAM_GUIDE, 1105 HI_CEC_UICMD_TIMER_PROGRAMMING, 1106 HI_CEC_UICMD_INITIAL_CONFIGURATION, 1107 HI_CEC_UICMD_PLAY_FUNCTION = 0x60, 1108 HI_CEC_UICMD_PAUSE_PLAY_FUNCTION, 1109 HI_CEC_UICMD_RECORD_FUNCTION, 1110 HI_CEC_UICMD_PAUSE_RECORD_FUNCTION, 1111 HI_CEC_UICMD_STOP_FUNCTION, 1112 HI_CEC_UICMD_MUTE_FUNCTION, 1113 HI_CEC_UICMD_RESTORE_VOLUME_FUNCTION, 1114 HI_CEC_UICMD_TUNE_FUNCTION, 1115 HI_CEC_UICMD_SELECT_MEDIA_FUNCTION, 1116 HI_CEC_UICMD_SELECT_AV_INPUT_FUNCTION, 1117 HI_CEC_UICMD_SELECT_AUDIO_INPUT_FUNCTION, 1118 HI_CEC_UICMD_POWER_TOGGLE_FUNCTION, 1119 HI_CEC_UICMD_POWER_OFF_FUNCTION, 1120 HI_CEC_UICMD_POWER_ON_FUNCTION, 1121 HI_CEC_UICMD_F1_BLUE = 0x71, 1122 HI_CEC_UICMD_F2_RED, 1123 HI_CEC_UICMD_F3_GREEN, 1124 HI_CEC_UICMD_F4_YELLOW, 1125 HI_CEC_UICMD_F5, 1126 HI_CEC_UICMD_DATA 1127 } HI_CEC_UICMD_E; /* User Control Code */ 1128 1129 typedef struct hiUNF_HDMI_CEC_CMD_S { 1130 HI_CEC_LOGICALADD_E enSrcAdd; 1131 HI_CEC_LOGICALADD_E enDstAdd; 1132 hi_u8 u8Opcode; 1133 HI_CEC_RAWDATA_S stRawData; 1134 } HI_HDMI_CEC_CMD_S; 1135 1136 typedef struct hiUNF_HDMI_CEC_STATUS_S { 1137 hi_bool bEnable; 1138 hi_u8 u8PhysicalAddr[4]; /* CEC physic addr */ 1139 hi_u8 u8LogicalAddr; /* CEC logic addr, default:0x03. */ 1140 hi_u8 u8Network[HI_CEC_LOGICALADD_BUTT]; /* CEC's net work, 1:this device can answer cec command */ 1141 } HI_HDMI_CEC_STATUS_S; 1142 1143 typedef hi_void (*HI_HDMI_CECCALLBACK)(HI_HDMI_ID_E enHdmi, HI_HDMI_CEC_CMD_S *pstCECCmd, hi_void *pData); 1144 1145 typedef struct hiHDMI_CECCALLBACK_FUNC_S { 1146 HI_HDMI_CECCALLBACK pfnCecCallback; /* Event handling callback function */ 1147 hi_void *pPrivateData; /* Private data of the CEC callback functions and parameters */ 1148 } HI_HDMI_CECCALLBACK_FUNC_S; 1149 1150 typedef enum hiHDMI_TRACE_LEN_E { 1151 HI_HDMI_TRACE_LEN_0, 1152 HI_HDMI_TRACE_LEN_1, 1153 HI_HDMI_TRACE_LEN_2, 1154 HI_HDMI_TRACE_LEN_BUTT 1155 } HI_HDMI_TRACE_LEN_E; 1156 1157 typedef struct hiHDMI_MOD_PARAM_S { 1158 HI_HDMI_TRACE_LEN_E enTraceLen; /* Phy parameters selection. */ 1159 } HI_HDMI_MOD_PARAM_S; 1160 1161 typedef enum hiERR_HDMI_CODE_E { 1162 ERR_HDMI_NOT_INIT = 1, 1163 ERR_HDMI_INVALID_PARA, 1164 ERR_HDMI_NUL_PTR, 1165 ERR_HDMI_DEV_NOT_OPEN, 1166 ERR_HDMI_DEV_NOT_CONNECT, 1167 ERR_HDMI_READ_SINK_FAILED, 1168 ERR_HDMI_INIT_ALREADY, 1169 ERR_HDMI_CALLBACK_ALREADY, 1170 ERR_HDMI_INVALID_CALLBACK, 1171 ERR_HDMI_FEATURE_NO_SUPPORT, 1172 ERR_HDMI_BUS_BUSY, 1173 ERR_HDMI_READ_EVENT_FAILED, 1174 ERR_HDMI_NOT_START, 1175 ERR_HDMI_READ_EDID_FAILED, 1176 ERR_HDMI_INIT_FAILED, 1177 ERR_HDMI_CREATE_TESK_FAILED, 1178 ERR_HDMI_MALLOC_FAILED, 1179 ERR_HDMI_FREE_FAILED, 1180 ERR_HDMI_PTHREAD_CREATE_FAILED, 1181 ERR_HDMI_PTHREAD_JOIN_FAILED, 1182 ERR_HDMI_STRATEGY_FAILED, 1183 ERR_HDMI_SET_ATTR_FAILED, 1184 ERR_HDMI_CALLBACK_NOT_REGISTER, 1185 ERR_HDMI_CEC_CALLBACK_REREGISTER, 1186 ERR_HDMI_UNKNOWN_COMMAND, 1187 ERR_HDMI_MUTEX_LOCK_FAILED, 1188 ERR_HDMI_CEC_NOT_ENABLE, 1189 ERR_HDMI_CECCALLBACK_NOT_REG, 1190 ERR_HDMI_BUTT 1191 } ERR_HDMI_CODE_E; 1192 1193 #define HI_ERR_HDMI_NOT_INIT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_INIT) 1194 #define HI_ERR_HDMI_INVALID_PARA HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_PARA) 1195 #define HI_ERR_HDMI_NUL_PTR HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NUL_PTR) 1196 #define HI_ERR_HDMI_DEV_NOT_OPEN HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_OPEN) 1197 #define HI_ERR_HDMI_DEV_NOT_CONNECT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_CONNECT) 1198 #define HI_ERR_HDMI_READ_SINK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_SINK_FAILED) 1199 #define HI_ERR_HDMI_INIT_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_ALREADY) 1200 #define HI_ERR_HDMI_CALLBACK_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_ALREADY) 1201 #define HI_ERR_HDMI_INVALID_CALLBACK HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_CALLBACK) 1202 #define HI_ERR_HDMI_FEATURE_NO_SUPPORT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FEATURE_NO_SUPPORT) 1203 #define HI_ERR_HDMI_BUS_BUSY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_BUS_BUSY) 1204 #define HI_ERR_HDMI_READ_EVENT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EVENT_FAILED) 1205 #define HI_ERR_HDMI_NOT_START HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_START) 1206 #define HI_ERR_HDMI_READ_EDID_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EDID_FAILED) 1207 #define HI_ERR_HDMI_INIT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_FAILED) 1208 #define HI_ERR_HDMI_CREATE_TESK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CREATE_TESK_FAILED) 1209 #define HI_ERR_HDMI_MALLOC_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MALLOC_FAILED) 1210 #define HI_ERR_HDMI_FREE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FREE_FAILED) 1211 #define HI_ERR_HDMI_PTHREAD_CREATE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_CREATE_FAILED) 1212 #define HI_ERR_HDMI_PTHREAD_JOIN_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_JOIN_FAILED) 1213 #define HI_ERR_HDMI_STRATEGY_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_STRATEGY_FAILED) 1214 #define HI_ERR_HDMI_SET_ATTR_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_SET_ATTR_FAILED) 1215 #define HI_ERR_HDMI_CEC_CALLBACK_REREGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_CALLBACK_REREGISTER) 1216 #define HI_ERR_HDMI_CALLBACK_NOT_REGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_NOT_REGISTER) 1217 #define HI_ERR_HDMI_UNKNOWN_COMMAND HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_UNKNOWN_COMMAND) 1218 #define HI_ERR_HDMI_MUTEX_LOCK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MUTEX_LOCK_FAILED) 1219 #define HI_ERR_HDMI_CEC_NOT_ENABLE HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_NOT_ENABLE) 1220 #define HI_ERR_HDMI_CECCALLBACK_NOT_REG HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CECCALLBACK_NOT_REG) 1221 1222 #ifdef __cplusplus 1223 #if __cplusplus 1224 } 1225 #endif 1226 #endif 1227 #endif 1228 1229