hi_comm_hdmi.h 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  1. /******************************************************************************
  2. Copyright (C), 2014-2018, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_comm_hdmi.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2011/12/21
  8. Description :
  9. History :
  10. 1.Date : 2011/12/21
  11. Author :
  12. Modification: Created file
  13. 2.Date : 2015/03/01
  14. Author :
  15. Modification: EDID cap;IF ;Video Fmt
  16. ******************************************************************************/
  17. #ifndef __HI_COMM_HDMI_H__
  18. #define __HI_COMM_HDMI_H__
  19. #include "hi_type.h"
  20. #ifndef HDMI_BUILD_IN_BOOT
  21. #include "hi_errno.h"
  22. #endif
  23. #include "hi_common.h"
  24. #include "hi_comm_video.h"
  25. /**the max audio capbility count*/
  26. #define HI_HDMI_MAX_AUDIO_CAP_COUNT 16
  27. /**the max audio smprate count*/
  28. #define HI_HDMI_MAX_SAMPE_RATE_NUM 8
  29. /**the max audio bit depth count*/
  30. #define HI_HDMI_MAX_BIT_DEPTH_NUM 6
  31. #ifdef __cplusplus
  32. #if __cplusplus
  33. extern "C"{
  34. #endif
  35. #endif /* End of #ifdef __cplusplus */
  36. typedef enum hiHDMI_VIDEO_FMT_E
  37. {
  38. HI_HDMI_VIDEO_FMT_1080P_60 = 0,
  39. HI_HDMI_VIDEO_FMT_1080P_50,
  40. HI_HDMI_VIDEO_FMT_1080P_30,
  41. HI_HDMI_VIDEO_FMT_1080P_25,
  42. HI_HDMI_VIDEO_FMT_1080P_24,
  43. HI_HDMI_VIDEO_FMT_1080i_60,
  44. HI_HDMI_VIDEO_FMT_1080i_50,
  45. HI_HDMI_VIDEO_FMT_720P_60,
  46. HI_HDMI_VIDEO_FMT_720P_50,
  47. HI_HDMI_VIDEO_FMT_576P_50,
  48. HI_HDMI_VIDEO_FMT_480P_60,
  49. HI_HDMI_VIDEO_FMT_PAL,
  50. HI_HDMI_VIDEO_FMT_PAL_N,
  51. HI_HDMI_VIDEO_FMT_PAL_Nc,
  52. HI_HDMI_VIDEO_FMT_NTSC,
  53. HI_HDMI_VIDEO_FMT_NTSC_J,
  54. HI_HDMI_VIDEO_FMT_NTSC_PAL_M,
  55. HI_HDMI_VIDEO_FMT_SECAM_SIN,
  56. HI_HDMI_VIDEO_FMT_SECAM_COS,
  57. HI_HDMI_VIDEO_FMT_861D_640X480_60,
  58. HI_HDMI_VIDEO_FMT_VESA_800X600_60,
  59. HI_HDMI_VIDEO_FMT_VESA_1024X768_60,
  60. HI_HDMI_VIDEO_FMT_VESA_1280X720_60,
  61. HI_HDMI_VIDEO_FMT_VESA_1280X800_60,
  62. HI_HDMI_VIDEO_FMT_VESA_1280X1024_60,
  63. HI_HDMI_VIDEO_FMT_VESA_1366X768_60,
  64. HI_HDMI_VIDEO_FMT_VESA_1440X900_60,
  65. HI_HDMI_VIDEO_FMT_VESA_1440X900_60_RB,
  66. HI_HDMI_VIDEO_FMT_VESA_1600X900_60_RB,
  67. HI_HDMI_VIDEO_FMT_VESA_1600X1200_60,
  68. HI_HDMI_VIDEO_FMT_VESA_1680X1050_60,
  69. HI_HDMI_VIDEO_FMT_VESA_1920X1080_60,
  70. HI_HDMI_VIDEO_FMT_VESA_1920X1200_60,
  71. HI_HDMI_VIDEO_FMT_VESA_2048X1152_60,
  72. HI_HDMI_VIDEO_FMT_2560x1440_30,
  73. HI_HDMI_VIDEO_FMT_2560x1440_60,
  74. HI_HDMI_VIDEO_FMT_2560x1600_60,
  75. HI_HDMI_VIDEO_FMT_1920x2160_30,
  76. HI_HDMI_VIDEO_FMT_3840X2160P_24,
  77. HI_HDMI_VIDEO_FMT_3840X2160P_25,
  78. HI_HDMI_VIDEO_FMT_3840X2160P_30,
  79. HI_HDMI_VIDEO_FMT_3840X2160P_50,
  80. HI_HDMI_VIDEO_FMT_3840X2160P_60,
  81. HI_HDMI_VIDEO_FMT_4096X2160P_24,
  82. HI_HDMI_VIDEO_FMT_4096X2160P_25,
  83. HI_HDMI_VIDEO_FMT_4096X2160P_30,
  84. HI_HDMI_VIDEO_FMT_4096X2160P_50,
  85. HI_HDMI_VIDEO_FMT_4096X2160P_60,
  86. HI_HDMI_VIDEO_FMT_3840X2160P_120,
  87. HI_HDMI_VIDEO_FMT_4096X2160P_120,
  88. HI_HDMI_VIDEO_FMT_7680X4320P_30,
  89. HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE,
  90. HI_HDMI_VIDEO_FMT_BUTT
  91. }HI_HDMI_VIDEO_FMT_E;
  92. typedef enum hiHDMI_PIC_ASPECT_RATIO_E
  93. {
  94. HI_HDMI_PIC_ASP_RATIO_NO_DATA, /**<Aspect Ratio unknown*/
  95. HI_HDMI_PIC_ASP_RATIO_4TO3, /**<Aspect Ratio 4:3*/
  96. HI_HDMI_PIC_ASP_RATIO_16TO9, /**<Aspect Ratio 16:9*/
  97. HI_HDMI_PIC_ASP_RATIO_64TO27,
  98. HI_HDMI_PIC_ASP_RATIO_256TO135,
  99. HI_HDMI_PIC_ASP_RATIO_RESERVED,
  100. }HI_HDMI_PIC_ASPECT_RATIO_E;
  101. /* see CEA-861-D P67&P158 for details ,we base on DVB */
  102. typedef enum hiHDMI_ACT_ASPECT_RATIO_E
  103. {
  104. HI_HDMI_ACT_ASP_RATIO_RESERVED_0,
  105. HI_HDMI_ACT_ASP_RATIO_RESERVED_1,
  106. HI_HDMI_ACT_ASP_RATIO_16TO9_TOP,
  107. HI_HDMI_ACT_ASP_RATIO_14TO9_TOP,
  108. HI_HDMI_ACT_ASP_RATIO_16TO9_BOX_CENTER,
  109. HI_HDMI_ACT_ASP_RATIO_RESERVED_5,
  110. HI_HDMI_ACT_ASP_RATIO_RESERVED_6,
  111. HI_HDMI_ACT_ASP_RATIO_RESERVED_7,
  112. HI_HDMI_ACT_ASP_RATIO_SAME_PIC,
  113. HI_HDMI_ACT_ASP_RATIO_4TO3_CENTER,
  114. HI_HDMI_ACT_ASP_RATIO_16TO9_CENTER,
  115. HI_HDMI_ACT_ASP_RATIO_14TO9_CENTER,
  116. HI_HDMI_ACT_ASP_RATIO_RESERVED_12,
  117. HI_HDMI_ACT_ASP_RATIO_4TO3_14_9,
  118. HI_HDMI_ACT_ASP_RATIO_16TO9_14_9,
  119. HI_HDMI_ACT_ASP_RATIO_16TO9_4_3,
  120. }HI_HDMI_ACT_ASPECT_RATIO_E;
  121. typedef enum hiHDMI_SAMPLE_RATE_E
  122. {
  123. HI_HDMI_SAMPLE_RATE_UNKNOWN=0, /**< unknown sample rate */
  124. HI_HDMI_SAMPLE_RATE_8K = 8000, /**< 8K sample rate */
  125. HI_HDMI_SAMPLE_RATE_11K = 11025, /**< 11.025K sample rate */
  126. HI_HDMI_SAMPLE_RATE_12K = 12000, /**< 12K sample rate */
  127. HI_HDMI_SAMPLE_RATE_16K = 16000, /**< 16K sample rate */
  128. HI_HDMI_SAMPLE_RATE_22K = 22050, /**< 22.050K sample rate */
  129. HI_HDMI_SAMPLE_RATE_24K = 24000, /**< 24K sample rate */
  130. HI_HDMI_SAMPLE_RATE_32K = 32000, /**< 32K sample rate */
  131. HI_HDMI_SAMPLE_RATE_44K = 44100, /**< 44.1K sample rate */
  132. HI_HDMI_SAMPLE_RATE_48K = 48000, /**< 48K sample rate */
  133. HI_HDMI_SAMPLE_RATE_88K = 88200, /**< 88.2K sample rate */
  134. HI_HDMI_SAMPLE_RATE_96K = 96000, /**< 96K sample rate */
  135. HI_HDMI_SAMPLE_RATE_176K = 176400, /**< 176K sample rate */
  136. HI_HDMI_SAMPLE_RATE_192K = 192000, /**< 192K sample rate */
  137. HI_HDMI_SAMPLE_RATE_768K = 768000, /**< 768K sample rate */
  138. HI_HDMI_SAMPLE_RATE_BUTT ,
  139. }HI_HDMI_SAMPLE_RATE_E;
  140. /**EDID Audio type enum*/
  141. typedef enum hiHDMI_AUDIO_FORMAT_CODE_E
  142. {
  143. HI_HDMI_AUDIO_FORMAT_CODE_RESERVED = 0x00, /**<Audio coding type, refer stream,default type*/
  144. HI_HDMI_AUDIO_FORMAT_CODE_PCM, /**<Audio coding PCM type*/
  145. HI_HDMI_AUDIO_FORMAT_CODE_AC3, /**<Audio coding AC3 type*/
  146. HI_HDMI_AUDIO_FORMAT_CODE_MPEG1, /**<Audio coding MPEG1 type*/
  147. HI_HDMI_AUDIO_FORMAT_CODE_MP3, /**<Audio coding MP3 type*/
  148. HI_HDMI_AUDIO_FORMAT_CODE_MPEG2, /**<Audio coding MPEG2 type*/
  149. HI_HDMI_AUDIO_FORMAT_CODE_AAC, /**<Audio coding AAC type*/
  150. HI_HDMI_AUDIO_FORMAT_CODE_DTS, /**<Audio coding DTS type*/
  151. HI_HDMI_AUDIO_FORMAT_CODE_ATRAC, /**<Audio coding ATRAC type*/
  152. HI_HDMI_AUDIO_FORMAT_CODE_ONE_BIT, /**<Audio coding ONE BIT AUDIO type*/
  153. HI_HDMI_AUDIO_FORMAT_CODE_DDP, /**<Audio coding DDPLUS type*/
  154. HI_HDMI_AUDIO_FORMAT_CODE_DTS_HD, /**<Audio coding DTS HD type*/
  155. HI_HDMI_AUDIO_FORMAT_CODE_MAT, /**<Audio coding MAT type*/
  156. HI_HDMI_AUDIO_FORMAT_CODE_DST, /**<Audio coding DST type*/
  157. HI_HDMI_AUDIO_FORMAT_CODE_WMA_PRO, /**<Audio coding WMA PRO type*/
  158. HI_HDMI_AUDIO_FORMAT_CODE_BUTT,
  159. }HI_HDMI_AUDIO_FORMAT_CODE_E;
  160. typedef enum hiHDMI_BIT_DEPTH_E
  161. {
  162. HI_HDMI_BIT_DEPTH_UNKNOWN =0, /**< unknown bit width */
  163. HI_HDMI_BIT_DEPTH_8 = 8, /**< 8 bits width */
  164. HI_HDMI_BIT_DEPTH_16 = 16, /**< 16 bits width */
  165. HI_HDMI_BIT_DEPTH_18 = 18, /**< 18 bits width */
  166. HI_HDMI_BIT_DEPTH_20 = 20, /**< 20 bits width */
  167. HI_HDMI_BIT_DEPTH_24 = 24, /**< 24 bits width */
  168. HI_HDMI_BIT_DEPTH_32 = 32, /**< 32 bits width */
  169. HI_HDMI_BIT_DEPTH_BUTT,
  170. }HI_HDMI_BIT_DEPTH_E;
  171. typedef enum hiHDMI_SND_INTERFACE_E
  172. {
  173. HI_HDMI_SND_INTERFACE_I2S, /**<I2S(Inter-IC Sound)*/
  174. HI_HDMI_SND_INTERFACE_SPDIF, /**<SPDIF(Sony/Philips Digital Interface) */
  175. HI_HDMI_SND_INTERFACE_HBR, /**<SPDIF(Sony/Philips Digital Interface) */
  176. HI_HDMI_SND_INTERFACE_BUTT
  177. }HI_HDMI_SND_INTERFACE_E;
  178. typedef enum hiHDMI_ID_E
  179. {
  180. HI_HDMI_ID_0 = 0, /**< HDMI 0 */
  181. HI_HDMI_ID_BUTT
  182. } HI_HDMI_ID_E;
  183. /** HDMI EVENT TYPE */
  184. typedef enum hiHDMI_EVENT_TYPE_E
  185. {
  186. HI_HDMI_EVENT_HOTPLUG = 0x10, /**<HDMI hot-plug event */
  187. HI_HDMI_EVENT_NO_PLUG, /**<HDMI cable disconnection event */
  188. HI_HDMI_EVENT_EDID_FAIL, /**<HDMI EDID read failure event */
  189. HI_HDMI_EVENT_HDCP_FAIL, /**<HDCP verification failure event */
  190. HI_HDMI_EVENT_HDCP_SUCCESS, /**<HDCP verification success event */
  191. HI_HDMI_EVENT_HDCP_USERSETTING = 0x17, /**<HDMI reset event,user should re-verification HDCP */
  192. HI_HDMI_EVENT_BUTT
  193. }HI_HDMI_EVENT_TYPE_E;
  194. /**VIDEO_MODE Attr(Color Space) enum*/
  195. typedef enum hiHDMI_VIDEO_MODE
  196. {
  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. /** Color Component Sample format and chroma sampling format enum,see EIA-CEA-861-D/F */
  204. typedef enum hiHDMI_COLOR_SPACE_E
  205. {
  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_RSERVED1,
  212. //HI_HDMI_COLOR_SPACE_RSERVED2,
  213. //HI_HDMI_COLOR_SPACE_RSERVED3,
  214. //HI_HDMI_COLOR_SPACE_IDO_DEFINED,
  215. }HI_HDMI_COLOR_SPACE_E;
  216. typedef enum hiHDMI_DEEP_COLOR_E
  217. {
  218. HI_HDMI_DEEP_COLOR_24BIT = 0x00, /**< HDMI Deep Color 24bit mode */
  219. HI_HDMI_DEEP_COLOR_30BIT, /**< HDMI Deep Color 30bit mode */
  220. HI_HDMI_DEEP_COLOR_36BIT, /**< HDMI Deep Color 36bit mode */
  221. HI_HDMI_DEEP_COLOR_OFF = 0xff, /**< HDMI Deep Color OFF mode(24bit). */
  222. HI_HDMI_DEEP_COLOR_BUTT
  223. }HI_HDMI_DEEP_COLOR_E;
  224. typedef enum hiHDMI_BARINFO_E
  225. {
  226. HDMI_BAR_INFO_NOT_VALID, /**< Bar Data not valid */
  227. HDMI_BAR_INFO_V, /**< Vertical bar data valid */
  228. HDMI_BAR_INFO_H, /**< Horizental bar data valid */
  229. HDMI_BAR_INFO_VH /**< Horizental and Vertical bar data valid */
  230. }HI_HDMI_BARINFO_E;
  231. typedef enum hiHDMI_SCANINFO_E
  232. {
  233. HDMI_SCAN_INFO_NO_DATA = 0, /**< No Scan information*/
  234. HDMI_SCAN_INFO_OVERSCANNED = 1, /**< Scan information, Overscanned (for television) */
  235. HDMI_SCAN_INFO_UNDERSCANNED = 2, /**< Scan information, Underscanned (for computer) */
  236. HDMI_SCAN_INFO_FUTURE
  237. }HI_HDMI_SCANINFO_E;
  238. typedef enum hiHDMI_PICTURE_SCALING_E
  239. {
  240. HDMI_PICTURE_NON_UNIFORM_SCALING, /**< No Known, non-uniform picture scaling */
  241. HDMI_PICTURE_SCALING_H, /**< Picture has been scaled horizentally */
  242. HDMI_PICTURE_SCALING_V, /**< Picture has been scaled Vertically */
  243. HDMI_PICTURE_SCALING_HV /**< Picture has been scaled Horizentally and Vertically */
  244. }HI_HDMI_PICTURE_SCALING_E;
  245. typedef enum hiHDMI_COLORIMETRY_E
  246. {
  247. HDMI_COLORIMETRY_NO_DATA, /**<Colorimetry No Data option*/
  248. HDMI_COLORIMETRY_ITU601, /**<Colorimetry ITU601 option*/
  249. HDMI_COLORIMETRY_ITU709, /**<Colorimetry ITU709 option*/
  250. HDMI_COLORIMETRY_EXTENDED, /**<Colorimetry extended option */
  251. } HI_HDMI_COLORIMETRY_E;
  252. typedef enum hiHDMI_EXT_COLORIMETRY_E
  253. {
  254. HDMI_COLORIMETRY_XVYCC_601, /**<Colorimetry xvYCC601 extened option*/
  255. HDMI_COLORIMETRY_XVYCC_709, /**<Colorimetry xvYCC709 extened option*/
  256. HDMI_COLORIMETRY_S_YCC_601, /**<Colorimetry S YCC 601 extened option*/
  257. HDMI_COLORIMETRY_ADOBE_YCC_601, /**<Colorimetry ADOBE YCC 601 extened option*/
  258. HDMI_COLORIMETRY_ADOBE_RGB, /**<Colorimetry ADOBE RGB extened option*/
  259. HDMI_COLORIMETRY_2020_CONST_LUMINOUS, /**<Colorimetry ITU2020 extened option*/
  260. HDMI_COLORIMETRY_2020_NON_CONST_LUMINOUS,/**<Colorimetry ITU2020 extened option*/
  261. HDMI_COLORIMETRY_RESERVED
  262. } HI_HDMI_EXT_COLORIMETRY_E;
  263. /**see EIA-CEA-861-D/F*/
  264. typedef enum hiHDMI_RGB_QUAN_RAGE_E
  265. {
  266. HDMI_RGB_QUANTIZATION_DEFAULT_RANGE, /**< Defaulr range, it depends on the video format */
  267. HDMI_RGB_QUANTIZATION_LIMITED_RANGE, /**< Limited quantization range of 220 levels when receiving a CE video format*/
  268. HDMI_RGB_QUANTIZATION_FULL_RANGE , /**< Full quantization range of 256 levels when receiving an IT video format*/
  269. HDMI_RGB_QUANTIZATION_FULL_RESERVED
  270. }HI_HDMI_RGB_QUAN_RAGE_E;
  271. /**see EIA-CEA-861-D/F*/
  272. typedef enum hiHDMI_YCC_QUAN_RAGE_E
  273. {
  274. HDMI_YCC_QUANTIZATION_LIMITED_RANGE, /**< Limited quantization range of 220 levels when receiving a CE video format*/
  275. HDMI_YCC_QUANTIZATION_FULL_RANGE, /**< Full quantization range of 256 levels when receiving an IT video format*/
  276. HDMI_YCC_QUANTIZATION_RESERVED_2,
  277. HDMI_YCC_QUANTIZATION_RESERVED_3
  278. }HI_HDMI_YCC_QUAN_RAGE_E;
  279. typedef enum hiHDMI_QUANTIZATION_E
  280. {
  281. HDMI_QUANTIZATION_LIMITED_RANGE, /**< Limited quantization range of 220 levels when receiving a CE video format*/
  282. HDMI_QUANTIZATION_FULL_RANGE, /**< Full quantization range of 256 levels when receiving an IT video format*/
  283. HDMI_QUANTIZATION_BUTT
  284. }HI_HDMI_QUANTIZATION_E;
  285. /**Pixel Repetition Factor enum,see EIA-CEA-861-D*/
  286. typedef enum hiHDMI_PIXEL_REPETITION_E
  287. {
  288. HDMI_PIXEL_REPET_NO,
  289. HDMI_PIXEL_REPET_2_TIMES,
  290. HDMI_PIXEL_REPET_3_TIMES,
  291. HDMI_PIXEL_REPET_4_TIMES,
  292. HDMI_PIXEL_REPET_5_TIMES,
  293. HDMI_PIXEL_REPET_6_TIMES,
  294. HDMI_PIXEL_REPET_7_TIMES,
  295. HDMI_PIXEL_REPET_8_TIMES,
  296. HDMI_PIXEL_REPET_9_TIMES,
  297. HDMI_PIXEL_REPET_10_TIMES,
  298. HDMI_PIXEL_REPET_RESERVED_A,
  299. HDMI_PIXEL_REPET_RESERVED_B,
  300. HDMI_PIXEL_REPET_RESERVED_C,
  301. HDMI_PIXEL_REPET_RESERVED_D,
  302. HDMI_PIXEL_REPET_RESERVED_E,
  303. HDMI_PIXEL_REPET_RESERVED_F,
  304. }HI_HDMI_PIXEL_REPETITION_E;
  305. /**IT Contents Type enum,see EIA-CEA-861-F*/
  306. typedef enum hiHDMI_CONTENT_TYPE_E
  307. {
  308. HDMI_CONTNET_GRAPHIC, /**< Graphics type*/
  309. HDMI_CONTNET_PHOTO, /**< Photo type*/
  310. HDMI_CONTNET_CINEMA, /**< Cinema type*/
  311. HDMI_CONTNET_GAME /**< Game type*/
  312. }HI_HDMI_CONTENT_TYPE_E;
  313. /**Audio Coding Type enum,see EIA-CEA-861-D*/
  314. typedef enum hiHDMI_CODING_TYPE_E
  315. {
  316. HDMI_AUDIO_CODING_REFER_STREAM_HEAD,
  317. HDMI_AUDIO_CODING_PCM,
  318. HDMI_AUDIO_CODING_AC3,
  319. HDMI_AUDIO_CODING_MPEG1,
  320. HDMI_AUDIO_CODING_MP3,
  321. HDMI_AUDIO_CODING_MPEG2,
  322. HDMI_AUDIO_CODING_AACLC,
  323. HDMI_AUDIO_CODING_DTS,
  324. HDMI_AUDIO_CODING_ATRAC,
  325. HDMI_AUDIO_CODIND_ONE_BIT_AUDIO,
  326. HDMI_AUDIO_CODING_ENAHNCED_AC3,
  327. HDMI_AUDIO_CODING_DTS_HD,
  328. HDMI_AUDIO_CODING_MAT,
  329. HDMI_AUDIO_CODING_DST,
  330. HDMI_AUDIO_CODING_WMA_PRO,
  331. HDMI_AUDIO_CODING_MAX
  332. }HI_HDMI_CODING_TYPE_E;
  333. /**EDID Audio speaker enum*/
  334. typedef enum hiHDMI_AUDIO_SPEAKER_E
  335. {
  336. HDMI_AUDIO_SPEAKER_FL_FR ,
  337. HDMI_AUDIO_SPEAKER_LFE ,
  338. HDMI_AUDIO_SPEAKER_FC ,
  339. HDMI_AUDIO_SPEAKER_RL_RR ,
  340. HDMI_AUDIO_SPEAKER_RC ,
  341. HDMI_AUDIO_SPEAKER_FLC_FRC ,
  342. HDMI_AUDIO_SPEAKER_RLC_RRC ,
  343. HDMI_AUDIO_SPEAKER_FLW_FRW ,
  344. HDMI_AUDIO_SPEAKER_FLH_FRH ,
  345. HDMI_AUDIO_SPEAKER_TC ,
  346. HDMI_AUDIO_SPEAKER_FCH ,
  347. HDMI_AUDIO_SPEAKER_BUTT ,
  348. } HI_HDMI_AUDIO_SPEAKER_E;
  349. typedef enum hiHDMI_FORCE_ACTION_E
  350. {
  351. HI_HDMI_FORCE_NULL, /**< Standard mode */
  352. HI_HDMI_FORCE_HDMI, /**< Forcibly output video in HDMI mode */
  353. HI_HDMI_FORCE_DVI, /**< Forcibly output video in DVI mode */
  354. HI_HDMI_INIT_BOOT_CONFIG /**< Test Only */
  355. }HI_HDMI_FORCE_ACTION_E;
  356. typedef enum hiHI_HDMI_CSC_MATRIX_E
  357. {
  358. HI_HDMI_CSC_MATRIX_IDENTITY = 0,
  359. HI_HDMI_CSC_MATRIX_BT601_TO_BT709,
  360. HI_HDMI_CSC_MATRIX_BT709_TO_BT601,
  361. HI_HDMI_CSC_MATRIX_BT601_TO_RGB_PC,
  362. HI_HDMI_CSC_MATRIX_BT709_TO_RGB_PC,
  363. HI_HDMI_CSC_MATRIX_RGB_TO_BT601_PC,
  364. HI_HDMI_CSC_MATRIX_RGB_TO_BT709_PC,
  365. HI_HDMI_CSC_MATRIX_BUTT
  366. } HI_HDMI_CSC_MATRIX_E;
  367. /** hdmi event handling callback function */
  368. typedef void (*HI_HDMI_CallBack)(HI_HDMI_EVENT_TYPE_E event, HI_VOID *pPrivateData);
  369. typedef struct hiHDMI_CALLBACK_FUNC_S
  370. {
  371. HI_HDMI_CallBack pfnHdmiEventCallback; /**< Event handling callback function */
  372. HI_VOID *pPrivateData; /**< Private data of the callback functions and parameters */
  373. }HI_HDMI_CALLBACK_FUNC_S;
  374. /**EDID Audio Info struct*/
  375. typedef struct hiHDMI_AUDIO_INFO_S
  376. {
  377. HI_HDMI_AUDIO_FORMAT_CODE_E enAudFmtCode; /**<Audio coding type*/
  378. HI_HDMI_SAMPLE_RATE_E enSupportSampleRate[HI_HDMI_MAX_SAMPE_RATE_NUM]; /**<Audio sample rate*/
  379. HI_U8 u8AudChannel; /**<Aud Channel of the coding type*/
  380. HI_HDMI_BIT_DEPTH_E enSupportBitDepth[HI_HDMI_MAX_BIT_DEPTH_NUM]; /**< sample bit depth,when audio format code is HI_UNF_EDID_AUDIO_FORMAT_CODE_PCM*/
  381. HI_U32 u32SupportBitDepthNum; /**< sample bit depth Num,when audio format code is HI_UNF_EDID_AUDIO_FORMAT_CODE_PCM*/
  382. HI_U32 u32MaxBitRate; /**< enter max bit rate,when audio format code is HI_UNF_EDID_AUDIO_FORMAT_CODE_AC3 - HI_UNF_EDID_AUDIO_FORMAT_CODE_ATRAC**/
  383. }HI_HDMI_AUDIO_INFO_S;
  384. /**EDID EOTF support. */
  385. typedef struct hiHDMI_EOTF_S
  386. {
  387. HI_BOOL bEotfSdr; /**<Traditional gamma - SDR Luminance Range. */
  388. HI_BOOL bEotfHdr; /**<Traditional gamma - HDR Luminance Range. */
  389. HI_BOOL bEotfSmpteSt2084; /**<SMPTE ST 2084 */
  390. HI_BOOL bEotfHLG; /**<Hybrid Log-Gamma(HLG) based on Recommendation ITU-R BT.2100-0 */
  391. HI_BOOL bEotfFuture; /**<Future EOTF */
  392. }HI_HDMI_EOTF_S;
  393. /**EDID Supported Static Metadata Descriptor */
  394. typedef struct hiHDMI_HDR_METADATA_TYPE_S
  395. {
  396. HI_BOOL bDescriptorType1; /**<Support Static Metadata Type 1 or not.*/
  397. }HI_HDMI_HDR_METADATA_TYPE_S;
  398. /**EDID HDR capability, see <CEA-861.3-2015> */
  399. typedef struct hiHDMI_HDR_CAP_S{
  400. HI_HDMI_EOTF_S stEotf; /**<EOTF support. */
  401. HI_HDMI_HDR_METADATA_TYPE_S stMetadata; /**<static metadata descriptor type(ID) support. */
  402. HI_U8 u8MaxLuminance_CV; /**<Desired Content Max Luminance Data. Real value(in 1cd/m^2) = 50.2^(CV/32) */
  403. HI_U8 u8AverageLumin_CV; /**<Desired Content Max Frame-average Luminance. Real value(in 1cd/m^2) = 50.2^(CV/32) */
  404. HI_U8 u8MinLuminance_CV; /**<Desired Content Min Luminance Data. Real value(in 1cd/m^2) = u8MaxLuminance_CV * (u8MinLuminance_CV/255)^2 / 100 */
  405. }HI_HDMI_HDR_CAP_S;
  406. typedef struct hiHDMI_SINK_CAPABILITY_S
  407. {
  408. HI_BOOL bConnected; /**< Whether the devices are connected. */
  409. HI_BOOL bSupportHdmi; /**< Whether the HDMI is supported by the device. If the HDMI is not supported by the device, the device is DVI.*/
  410. HI_BOOL bIsSinkPowerOn; /**< Whether the sink device is powered on. */
  411. HI_BOOL bIsRealEDID; /**< Whether the EDID obtains the flag from the sink device.HI_TRUE: The EDID information is correctly read.HI_FASE: default settings */
  412. HI_HDMI_VIDEO_FMT_E enNativeVideoFormat; /**< Physical resolution of the display device. */
  413. HI_BOOL bVideoFmtSupported[HI_HDMI_VIDEO_FMT_BUTT]; /**< Video capability set.HI_TRUE: This display format is supported.HI_FALSE: This display format is not supported. */
  414. HI_BOOL bSupportYCbCr; /**< Whether the YCBCR display is supported.HI_TRUE: The YCBCR display is supported.HI_FALSE: Only red-green-blue (RGB) is supported. */
  415. HI_BOOL bSupportxvYCC601; /**< Whether the xvYCC601 color format is supported. */
  416. HI_BOOL bSupportxvYCC709; /**< Whether the xvYCC709 color format is supported. */
  417. HI_U8 u8MDBit; /**< Transfer profile supported by xvYCC601. 1: P0; 2: P1; 4: P2. */
  418. HI_U32 u32AudioInfoNum; /**< Num of audio Info*/
  419. HI_HDMI_AUDIO_INFO_S stAudioInfo[HI_HDMI_MAX_AUDIO_CAP_COUNT]; /**< Audio Info.For details, see Table 37 in EIA-CEA-861-D. */
  420. HI_BOOL bSpeaker[HDMI_AUDIO_SPEAKER_BUTT]; /**< Speaker position. For details, see the definition of SpeakerDATABlock in EIA-CEA-861-D. */
  421. HI_U8 u8IDManufactureName[4]; /**< Device vendor flag */
  422. HI_U32 u32IDProductCode; /**< Device ID. */
  423. HI_U32 u32IDSerialNumber; /**< Device sequence number. */
  424. HI_U32 u32WeekOfManufacture; /**< Device production data (week). */
  425. HI_U32 u32YearOfManufacture; /**< Set the production data (year). */
  426. HI_U8 u8Version; /**< Device version number */
  427. HI_U8 u8Revision; /**< Device sub version number */
  428. HI_U8 u8EDIDExternBlockNum; /**< EDID extended block number */
  429. HI_BOOL bIsPhyAddrValid; /**< Valid flag of the consumer electronics control (CEC) physical address */
  430. HI_U8 u8PhyAddr_A; /**< CEC physical address A */
  431. HI_U8 u8PhyAddr_B; /**< CEC physical address B */
  432. HI_U8 u8PhyAddr_C; /**< CEC physical address C */
  433. HI_U8 u8PhyAddr_D; /**< CEC physical address D */
  434. HI_BOOL bSupportDVIDual; /**< Whether to support the DVI dual-link operation. */
  435. HI_BOOL bSupportDeepColorYCBCR444; /**< Whether to support the YCBCR 4:4:4 deep-color mode. */
  436. HI_BOOL bSupportDeepColor30Bit; /**< Whether to support the deep-color 30-bit mode.*/
  437. HI_BOOL bSupportDeepColor36Bit; /**< Whether to support the deep-color 36-bit mode. */
  438. HI_BOOL bSupportDeepColor48Bit; /**< Whether to support the deep-color 48-bit mode. */
  439. HI_BOOL bSupportAI; /**< Whether to support the Supports_AI mode. */
  440. HI_U32 u32MaxTMDSClock; /**< Maximum TMDS clock. */
  441. HI_BOOL bI_Latency_Fields_Present; /**< Delay flag bit. */
  442. HI_BOOL bLatency_Fields_Present; /**< whether Video_Latency and Audio_Latency fields are present */
  443. HI_BOOL bHDMI_Video_Present; /**< Special video format */
  444. HI_U8 u8Video_Latency; /**< Video delay */
  445. HI_U8 u8Audio_Latency; /**< Audio delay */
  446. HI_U8 u8Interlaced_Video_Latency; /**< Video delay in interlaced video mode */
  447. HI_U8 u8Interlaced_Audio_Latency; /**< Audio delay in interlaced video mode */
  448. HI_BOOL bSupportY420DC30Bit; /**< Whether to support the YUV420 deep-color 30-bit mode.*/
  449. HI_BOOL bSupportY420DC36Bit; /**< Whether to support the YUV420 deep-color 36-bit mode. */
  450. HI_BOOL bSupportY420DC48Bit; /**< Whether to support the YUV420 deep-color 48-bit mode. */
  451. HI_BOOL bSupportHdmi_2_0; /**< Whether to support HDMI2.0. */
  452. HI_BOOL bSupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; /**< the format support YUV420 */
  453. HI_BOOL bOnlySupportY420Format[HI_HDMI_VIDEO_FMT_BUTT]; /**< the format only support YUV420 */
  454. HI_BOOL bYccQrangeSelectable; /**<flag of RGB Quantization Range selectable.when HI_TRUE,sink expect full/limited range is selectable;or sink expect default range. */
  455. HI_BOOL bRgbQrangeSelectable; /**<flag of YCC Quantization Range selectable.when HI_TRUE,sink expect full/limited range is selectable;or sink expect default range. */
  456. HI_BOOL bHdrSupport; /**<HDR support flag.When HDR Static Metadata Data Block is indicated,flag HI_TRUE;or,HI_FALSE.*/
  457. HI_HDMI_HDR_CAP_S stHdr; /**<HDR capability*/
  458. } HI_HDMI_SINK_CAPABILITY_S;
  459. typedef struct hiHDMI_ATTR_S
  460. {
  461. HI_BOOL bEnableHdmi; /**< Whether to forcibly output the video over the HDMI. */
  462. HI_BOOL bEnableVideo; /**< Whether to output video.The value must be HI_TRUE.If the value is HI_FALSE, the HDMI is forcibly set to HI_TRUE. */
  463. HI_HDMI_VIDEO_FMT_E enVideoFmt; /**< Video norm. This value of the video norm must be consistent with the norm of the video output. */
  464. HI_HDMI_VIDEO_MODE_E enVidOutMode; /**< HDMI output video output mode.VIDEO_MODE_YCBCR444,VIDEO_MODE_YCBCR422,VIDEO_MODE_RGB444 */
  465. HI_HDMI_QUANTIZATION_E enOutCscQuantization; /**< CSC output quantization range HDMI_QUANTIZATION_RANGE_LIMITED, HDMI_QUANTIZATION_RANGE_FULL>**/
  466. HI_HDMI_DEEP_COLOR_E enDeepColorMode; /**< DeepColor output mode.It is HI_HDMI_DEEP_COLOR_24BIT by default. */
  467. HI_BOOL bxvYCCMode; /**< Whether to enable the xvYCC output mode.It is HI_FALSE by default. */
  468. HI_BOOL bEnableAudio; /**< Whether to enable the audio. */
  469. HI_HDMI_SND_INTERFACE_E enSoundIntf; /**< HDMI audio source.It is set to HI_HDMI_SND_INTERFACE_I2S, which needs to be consistent with the VO interface. */
  470. HI_BOOL bIsMultiChannel; /**< Multi-channel or stereo 0: stereo 1: eight-channel fixed for multi-channel */
  471. HI_HDMI_SAMPLE_RATE_E enSampleRate; /**< Audio sampling rate. This parameter needs to be consistent with that of the VO. */
  472. HI_U8 u8DownSampleParm; /**< Audio down sampling rate parameter. It is 0 by default. */
  473. HI_HDMI_BIT_DEPTH_E enBitDepth; /**< Audio bit width. It is 16 by default. This parameter needs to be consistent with that of the VO. */
  474. HI_U8 u8I2SCtlVbit; /**< Reserved. It is set to 0. I2S control (0x7A:0x1D) */
  475. HI_BOOL bEnableAviInfoFrame; /**< Whether to enable AVI InfoFrame.It is recommended to enable this function. */
  476. HI_BOOL bEnableAudInfoFrame; /**< Whether to enable AUDIO InfoFrame.It is recommended to enable this function. */
  477. HI_BOOL bEnableSpdInfoFrame; /**< Whether to enable SPD InfoFrame.It is recommended to disable this function. */
  478. HI_BOOL bEnableMpegInfoFrame;/**< Whether to enable MPEG InfoFrame.It is recommended to disable this function. */
  479. HI_BOOL bDebugFlag; /**< Whether to enable the debug information in the HDMI.It is recommended to disable this function. */
  480. HI_BOOL bHDCPEnable; /**< Whether to enable the HDCP.0: disabled 1: enabled */
  481. HI_BOOL b3DEnable; /**< Whether to enable 3D mode. 0: disabled 1: enabled */
  482. HI_U8 u83DParam; /**< 3D Parameter. The default value is 9. */
  483. HI_HDMI_FORCE_ACTION_E enDefaultMode; /**< When get capability fail,HDMI forcily(priority) judgments output video mode.Default is HI_HDMI_FORCE_HDMI.*/
  484. HI_BOOL bAuthMode; /**< Whether to enable auth mode. 0: disabled 1: enabled */
  485. HI_BOOL bEnableVidModeAdapt; /**< Enable flag of vedio mode & DVI adapting case of user setting incorrect,default:HI_TRUE.When user have no any adapting strategy,suggestion HI_TRUE*/
  486. HI_BOOL bEnableDeepClrAdapt; /**< Enable flag of deep color mode adapting case of user setting incorrect,default: HI_FALSE.When user have no any adapting strategy,suggestion HI_TRUE*/
  487. HI_U32 u32PixClk; /**< Pixclk of enVideoFmt(unit is kHz).(This param is valid only when enVideoFmt is HI_HDMI_VIDEO_FMT_VESA_CUSTOMER_DEFINE) */
  488. }HI_HDMI_ATTR_S;
  489. typedef struct hiHI_HDMI_EDID_S
  490. {
  491. HI_BOOL bEdidValid;
  492. HI_U32 u32Edidlength;
  493. HI_U8 u8Edid[512];
  494. }HI_HDMI_EDID_S;
  495. typedef enum hiHDMI_INFOFRAME_TYPE_E
  496. {
  497. HI_INFOFRAME_TYPE_AVI, /**< HDMI AVI InfoFrame */
  498. HI_INFOFRAME_TYPE_SPD, /**< HDMI SPD InfoFrame */
  499. HI_INFOFRAME_TYPE_AUDIO, /**< HDMI AUDIO InfoFrame */
  500. HI_INFOFRAME_TYPE_MPEG, /**< HDMI MPEG InfoFrame */
  501. HI_INFOFRAME_TYPE_VENDORSPEC, /**< HDMI Vendor Specific InfoFrame */
  502. HI_INFOFRAME_TYPE_BUTT
  503. }HI_HDMI_INFOFRAME_TYPE_E;
  504. /** HDMI AVI InfoFrame struct, see EIA-CEA-861-D */
  505. typedef struct hi_HDMI_AVI_INFOFRAME_VER2_S
  506. {
  507. HI_HDMI_VIDEO_FMT_E enTimingMode;
  508. HI_HDMI_COLOR_SPACE_E enColorSpace;
  509. HI_BOOL bActive_Infor_Present;
  510. HI_HDMI_BARINFO_E enBarInfo;
  511. HI_HDMI_SCANINFO_E enScanInfo;
  512. HI_HDMI_COLORIMETRY_E enColorimetry;
  513. HI_HDMI_EXT_COLORIMETRY_E enExtColorimetry;
  514. HI_HDMI_PIC_ASPECT_RATIO_E enAspectRatio;
  515. HI_HDMI_ACT_ASPECT_RATIO_E enActiveAspectRatio;
  516. HI_HDMI_PICTURE_SCALING_E enPictureScaling;
  517. HI_HDMI_RGB_QUAN_RAGE_E enRGBQuantization;
  518. HI_BOOL bIsITContent;
  519. HI_HDMI_PIXEL_REPETITION_E enPixelRepetition;
  520. HI_HDMI_CONTENT_TYPE_E enContentType;
  521. HI_HDMI_YCC_QUAN_RAGE_E enYCCQuantization;
  522. HI_U16 u16LineNEndofTopBar;
  523. HI_U16 u16LineNStartofBotBar;
  524. HI_U16 u16PixelNEndofLeftBar;
  525. HI_U16 u16PixelNStartofRightBar;
  526. }HI_HDMI_AVI_INFOFRAME_VER2_S;
  527. /**Audio chanel count enum,see EIA-CEA-861-D/F*/
  528. typedef enum hiHDMI_AUDIO_CHANEL_CNT_E
  529. {
  530. HI_HDMI_AUDIO_CHANEL_CNT_STREAM,
  531. HI_HDMI_AUDIO_CHANEL_CNT_2,
  532. HI_HDMI_AUDIO_CHANEL_CNT_3,
  533. HI_HDMI_AUDIO_CHANEL_CNT_4,
  534. HI_HDMI_AUDIO_CHANEL_CNT_5,
  535. HI_HDMI_AUDIO_CHANEL_CNT_6,
  536. HI_HDMI_AUDIO_CHANEL_CNT_7,
  537. HI_HDMI_AUDIO_CHANEL_CNT_8,
  538. }HI_HDMI_AUDIO_CHANEL_CNT_E;
  539. /**Audio Sample Size enum,see EIA-CEA-861-D/F*/
  540. typedef enum hiHDMI_AUDIO_SAMPLE_SIZE_E
  541. {
  542. HI_HDMI_AUDIO_SAMPLE_SIZE_STREAM,
  543. HI_HDMI_AUDIO_SAMPLE_SIZE_16,
  544. HI_HDMI_AUDIO_SAMPLE_SIZE_20,
  545. HI_HDMI_AUDIO_SAMPLE_SIZE_24,
  546. }HI_HDMI_AUDIO_SAMPLE_SIZE_E;
  547. /**Audio Sampling Frequency enum,see EIA-CEA-861-D/F*/
  548. typedef enum hiHDMI_AUDIO_SAMPLE_FREQ_E
  549. {
  550. HI_HDMI_AUDIO_SAMPLE_FREQ_STREAM,
  551. HI_HDMI_AUDIO_SAMPLE_FREQ_32000,
  552. HI_HDMI_AUDIO_SAMPLE_FREQ_44100,
  553. HI_HDMI_AUDIO_SAMPLE_FREQ_48000,
  554. HI_HDMI_AUDIO_SAMPLE_FREQ_88200,
  555. HI_HDMI_AUDIO_SAMPLE_FREQ_96000,
  556. HI_HDMI_AUDIO_SAMPLE_FREQ_176400,
  557. HI_HDMI_AUDIO_SAMPLE_FREQ_192000,
  558. }HI_HDMI_AUDIO_SAMPLE_FREQ_E;
  559. /** Level Shift Values (LSV0-LSV3) enum,see EIA-CEA-861-D/F*/
  560. typedef enum hiHDMI_LEVEL_SHIFT_VALUE_E
  561. {
  562. HI_HDMI_LEVEL_SHIFT_VALUE_0_DB,
  563. HI_HDMI_LEVEL_SHIFT_VALUE_1_DB,
  564. HI_HDMI_LEVEL_SHIFT_VALUE_2_DB,
  565. HI_HDMI_LEVEL_SHIFT_VALUE_3_DB,
  566. HI_HDMI_LEVEL_SHIFT_VALUE_4_DB,
  567. HI_HDMI_LEVEL_SHIFT_VALUE_5_DB,
  568. HI_HDMI_LEVEL_SHIFT_VALUE_6_DB,
  569. HI_HDMI_LEVEL_SHIFT_VALUE_7_DB,
  570. HI_HDMI_LEVEL_SHIFT_VALUE_8_DB,
  571. HI_HDMI_LEVEL_SHIFT_VALUE_9_DB,
  572. HI_HDMI_LEVEL_SHIFT_VALUE_10_DB,
  573. HI_HDMI_LEVEL_SHIFT_VALUE_11_DB,
  574. HI_HDMI_LEVEL_SHIFT_VALUE_12_DB,
  575. HI_HDMI_LEVEL_SHIFT_VALUE_13_DB,
  576. HI_HDMI_LEVEL_SHIFT_VALUE_14_DB,
  577. HI_HDMI_LEVEL_SHIFT_VALUE_15_DB,
  578. }HI_HDMI_LEVEL_SHIFT_VALUE_E;
  579. /**LFE Playback Level enum,see EIA-CEA-861-D/F*/
  580. typedef enum hiHDMI_LFE_PLAYBACK_LEVEL_E
  581. {
  582. HI_HDMI_LFE_PLAYBACK_NO,
  583. HI_HDMI_LFE_PLAYBACK_0_DB,
  584. HI_HDMI_LFE_PLAYBACK_10_DB,
  585. HI_HDMI_LFE_PLAYBACK_RESEVED,
  586. }HI_HDMI_LFE_PLAYBACK_LEVEL_E;
  587. /** HDMI AUDIO InfoFrame struct, see EIA-CEA-861-D */
  588. typedef struct hiHDMI_AUD_INFOFRAME_VER1_S
  589. {
  590. HI_HDMI_AUDIO_CHANEL_CNT_E enChannelCount;
  591. HI_HDMI_CODING_TYPE_E enCodingType;
  592. HI_HDMI_AUDIO_SAMPLE_SIZE_E enSampleSize;
  593. HI_HDMI_AUDIO_SAMPLE_FREQ_E enSamplingFrequency;
  594. HI_U8 u8ChannelAlloc; /* Channel/Speaker Allocation.Range [0,255] */
  595. HI_HDMI_LEVEL_SHIFT_VALUE_E enLevelShift;
  596. HI_HDMI_LFE_PLAYBACK_LEVEL_E enLfePlaybackLevel;
  597. HI_BOOL bDownmixInhibit;
  598. }HI_HDMI_AUD_INFOFRAME_VER1_S;
  599. /** HDMI Source Product Description InfoFrame struct , see EIA-CEA-861-D */
  600. typedef struct hiHDMI_SPD_INFOFRAME_S
  601. {
  602. HI_U8 u8VendorName[8];
  603. HI_U8 u8ProductDescription[16];
  604. }HI_HDMI_SPD_INFOFRAME_S;
  605. /** HDMI MEPG SOURCE Description InfoFrame struct , see EIA-CEA-861-D */
  606. typedef struct hiHDMI_MPEGSOURCE_INFOFRAME_S
  607. {
  608. HI_U32 u32MPEGBitRate;
  609. HI_BOOL bIsFieldRepeated;
  610. }HI_HDMI_MPEGSOURCE_INFOFRAME_S;
  611. /** HDMI Vendor Specific InfoFrame struct , see EIA-CEA-861-D */
  612. typedef struct hiHDMI_VENDORSPEC_INFOFRAME_S
  613. {
  614. HI_U32 u32RegistrationId;
  615. }HI_HDMI_VENDORSPEC_INFOFRAME_S;
  616. typedef union hiHDMI_INFOFRAME_UNIT_U
  617. {
  618. HI_HDMI_AVI_INFOFRAME_VER2_S stAVIInfoFrame;
  619. HI_HDMI_AUD_INFOFRAME_VER1_S stAUDInfoFrame;
  620. HI_HDMI_SPD_INFOFRAME_S stSPDInfoFrame;
  621. HI_HDMI_MPEGSOURCE_INFOFRAME_S stMPEGSourceInfoFrame;
  622. HI_HDMI_VENDORSPEC_INFOFRAME_S stVendorSpecInfoFrame;
  623. }HI_HMDI_INFORFRAME_UNIT_U;
  624. typedef struct hiUNF_HDMI_INFOFRAME_S
  625. {
  626. HI_HDMI_INFOFRAME_TYPE_E enInfoFrameType; /**<InfoFrame type */
  627. HI_HMDI_INFORFRAME_UNIT_U unInforUnit; /**<InfoFrame date */
  628. }HI_HDMI_INFOFRAME_S;
  629. /**< CEC */
  630. /**< CEC's Opcode:Please refer to CEC 15 Message Descriptions */
  631. /**< General Protocol messages*/
  632. #define CEC_OPCODE_FEATURE_ABORT 0X00 /**< <Feature Abort> Used as a response to indicate that the device does not support the requested message type, or that it cannot execute it at the present time. */
  633. #define CEC_OPCODE_ABORT_MESSAGE 0XFF /**< <Abort> Message This message is reserved for testing purposes. */
  634. /**< One Touch Play Feature*/
  635. #define CEC_OPCODE_ACTIVE_SOURCE 0X82 /**< <Active Source> Used by a new source to indicate that it has started to transmit a stream OR used in response to a <Request Active Source> */
  636. #define CEC_OPCODE_IMAGE_VIEW_ON 0X04 /**< <Image View On> Sent by a source device to the TV whenever it enters the active state (alternatively it may send <Text View On>). */
  637. #define CEC_OPCODE_TEXT_VIEW_ON 0X0D /**< <Text View On> As <Image View On>, but should also remove any text, menus and PIP windows from the TV's display. */
  638. /**< Routing Control Feature*/
  639. #define CEC_OPCODE_INACTIVE_SOURCE 0X9D /**< <Inactive Source> Used by the currently active source to inform the TV that it has no video to be presented to the user, or is going into standby as the result of a local user command on the device. */
  640. #define CEC_OPCODE_REQUEST_ACTIVE_SOURCE 0X85 /**< <Request Active Source> Used by a new device to discover the status of the system. */
  641. #define CEC_OPCODE_ROUTING_CHANGE 0X80 /**< <Routing Change> Sent by a CEC Switch when it is manually switched to inform all other devices on the network that the active route below the switch has changed. */
  642. #define CEC_OPCODE_ROUTING_INFORMATION 0X81 /**< <Routing Information> Sent by a CEC Switch to indicate the active route below the switch. */
  643. #define CEC_OPCODE_SET_STREAM_PATH 0X86 /**< <Set Stream Path> Used by the TV to request a streaming path from the specified physical address. */
  644. /**< Standby Feature*/
  645. #define CEC_OPCODE_STANDBY 0X36 /**< <Standby> Switches one or all devices into standby mode. Can be used as a broadcast message or be addressed to a specific device. See section CEC 13.3 for important notes on the use of this message */
  646. /**< One Touch Record Feature*/
  647. #define CEC_OPCODE_RECORD_OFF 0X0B /**< <Record Off> Requests a device to stop a recording. */
  648. #define CEC_OPCODE_RECORD_ON 0X09 /**< <Record On> Attempt to record the specified source. */
  649. #define CEC_OPCODE_RECORD_STATUS 0X0A /**< <Record Status> Used by a Recording Device to inform the initiator of the message <Record On> about its status. */
  650. #define CEC_OPCODE_RECORD_TV_SCREEN 0X0F /**< <Record TV Screen> Request by the Recording Device to record the presently displayed source. */
  651. /**< Timer Programming Feature*/
  652. #define CEC_OPCODE_CLEAR_ANALOGUE_TIMER 0X33 /**< <Clear Analogue Timer> Used to clear an Analogue timer block of a device. */
  653. #define CEC_OPCODE_CLEAR_DIGITAL_TIMER 0X99 /**< <Clear Digital Timer> Used to clear a Digital timer block of a device. */
  654. #define CEC_OPCODE_CLEAR_EXTERNAL_TIMER 0XA1 /**< <Clear External Timer> Used to clear an External timer block of a device. */
  655. #define CEC_OPCODE_SET_ANALOGUE_TIMER 0X34 /**< <Set Analogue Timer> Used to set a single timer block on an Analogue Recording Device. */
  656. #define CEC_OPCODE_SET_DIGITAL_TIMER 0X97 /**< <Set Digital Timer> Used to set a single timer block on a Digital Recording Device. */
  657. #define CEC_OPCODE_SET_EXTERNAL_TIMER 0XA2 /**< <Set External Timer> Used to set a single timer block to record from an external device. */
  658. #define CEC_OPCODE_SET_TIMER_PROGRAM_TITLE 0X67 /**< <Set Timer Program Title> Used to set the name of a program associated with a timer block. Sent directly after sending a <Set Analogue Timer> or <Set Digital Timer> message. The name is then associated with that timer block. */
  659. #define CEC_OPCODE_TIMER_CLEARED_STATUS 0X43 /**< <Timer Cleared Status> Used to give the status of a <Clear Analogue Timer>, <Clear Digital Timer> or <Clear External Timer> message. */
  660. #define CEC_OPCODE_TIMER_STATUS 0X35 /**< <Timer Status> Used to send timer status to the initiator of a <Set Timer> message. */
  661. /**< System Information Feature*/
  662. #define CEC_OPCODE_CEC_VERSION 0X9E /**< <CEC Version> Used to indicate the supported CEC version, in response to a <Get CEC Version> */
  663. #define CEC_OPCODE_GET_CEC_VERSION 0X9F /**< <Get CEC Version> Used by a device to enquire which version of CEC the target supports */
  664. #define CEC_OPCODE_GIVE_PHYSICAL_ADDRESS 0X83 /**< <Give Physical Address> A request to a device to return its physical address. */
  665. #define CEC_OPCODE_REPORT_PHYSICAL_ADDRESS 0X84 /**< <Report Physical Address> Used to inform all other devices of the mapping between physical and logical address of the initiator. */
  666. #define CEC_OPCODE_GET_MENU_LANGUAGE 0X91 /**< <Get Menu Language> Sent by a device capable of character generation (for OSD and Menus) to a TV in order to discover the currently selected Menu language. Also used by a TV during installation to discover the currently set menu language of other devices. */
  667. #define CEC_OPCODE_SET_MENU_LANGUAGE 0X32 /**< <Set Menu Language> Used by a TV or another device to indicate the menu language. */
  668. /**< Deck Control Feature*/
  669. #define CEC_OPCODE_DECK_CONTROL 0X42 /**< <Deck Control> Used to control a device's media functions. */
  670. #define CEC_OPCODE_DECK_STATUS 0X1B /**< <Deck Status> Used to provide a deck's status to the initiator of the <Give Deck Status> message. */
  671. #define CEC_OPCODE_GIVE_DECK_STATUS 0X1A /**< <Give Deck Status> Used to request the status of a device, regardless of whether or not it is the current active source. */
  672. #define CEC_OPCODE_PLAY 0X41 /**< <Play> Used to control the playback behaviour of a source device. */
  673. /**< Tuner Control Feature*/
  674. #define CEC_OPCODE_GIVE_TUNER_DEVICE_STATUS 0X08 /**< <Give Tuner Device Status> Used to request the status of a tuner device. */
  675. #define CEC_OPCODE_SELECT_ANALOGUE_SERVICE 0X92 /**< <Select Analogue Service> Directly selects an Analogue TV service */
  676. #define CEC_OPCODE_SELECT_DIGITAL_SERVICE 0X93 /**< <Select Digital Service> Directly selects a Digital TV, Radio or Data Broadcast Service */
  677. #define CEC_OPCODE_TUNER_DEVICE_STATUS 0X07 /**< <Tuner Device Status> Use by a tuner device to provide its status to the initiator of the <Give Tuner Device Status> message. */
  678. #define CEC_OPCODE_TUNER_STEP_DECREMENT 0X06 /**< <Tuner Step Decrement> Used to tune to next lowest service in a tuner's service list. Can be used for PIP. */
  679. #define CEC_OPCODE_TUNER_STEP_INCREMENT 0X05 /**< <Tuner Step Increment> Used to tune to next highest service in a tuner's service list. Can be used for PIP. */
  680. /**< Vendor Specific Command*/
  681. #define CEC_OPCODE_DEVICE_VENDOR_ID 0X87 /**< <Device Vendor ID> Reports the vendor ID of this device. */
  682. #define CEC_OPCODE_GIVE_DEVICE_VENDOR_ID 0X8C /**< <Give Device Vendor ID> Requests the Vendor ID from a device. */
  683. #define CEC_OPCODE_VENDOR_COMMAND 0X89 /**< <Vendor Command> Allows vendor specific commands to be sent between two devices. */
  684. #define CEC_OPCODE_VENDOR_COMMAND_WITH_ID 0XA0 /**< <Vendor Command With ID> Allows vendor specific commands to be sent between two devices or broadcast. */
  685. #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_DOWN 0X8A /**< <Vendor Remote Button Down> Indicates that a remote control button has been depressed. */
  686. #define CEC_OPCODE_VENDOR_REMOTE_BUTTON_UP 0X8B /**< <Vendor Remote Button Up> Indicates that a remote control button (the last button pressed indicated by the Vendor Remote Button Down message) has been released. */
  687. /**< OSD Display Feature*/
  688. #define CEC_OPCODE_SET_OSD_STRING 0X64 /**< <Set OSD String> Used to send a text message to output on a TV. */
  689. #define CEC_OPCODE_GIVE_OSD_NAME 0X46 /**< <Give OSD Name> Used to request the preferred OSD name of a device for use in menus associated with that device. */
  690. #define CEC_OPCODE_SET_OSD_NAME 0X47 /**< <Set OSD Name> Used to set the preferred OSD name of a device for use in menus associated with that device. */
  691. /**< Device Menu Control Feature*/
  692. #define CEC_OPCODE_MENU_REQUEST 0X8D /**< <Menu Request> A request from the TV for a device to show/remove a menu or to query if a device is currently showing a menu. */
  693. #define CEC_OPCODE_MENU_STATUS 0X8E /**< <Menu Status> Used to indicate to the TV that the device is showing/has removed a menu and requests the remote control keys to be passed though. */
  694. #define CEC_OPCODE_USER_CONTROL_PRESSED 0X44 /**< <User Control Pressed> Used to indicate that the user pressed a remote control button or switched from one remote control button to another. */
  695. #define CEC_OPCODE_USER_CONTROL_RELEASED 0X45 /**< <User Control Released> Indicates that user released a remote control button (the last one indicated by the <User Control Pressed> message) */
  696. /**< Power Status Feature*/
  697. #define CEC_OPCODE_GIVE_DEVICE_POWER_STATUS 0X8F /**< <Give Device Power Status> Used to determine the current power status of a target device */
  698. #define CEC_OPCODE_REPORT_POWER_STATUS 0X90 /**< <Report Power Status> Used to inform a requesting device of the current power status */
  699. /**< System Audio Control Feature*/
  700. #define CEC_OPCODE_GIVE_AUDIO_STATUS 0X71 /**< <Give Audio Status> Requests an amplifier to send its volume and mute status */
  701. #define CEC_OPCODE_GIVE_SYSTEM_AUDIO_MODE_STATUS 0x7D /**< <Give System Audio Mode Status> Requests the status of the System Audio Mode */
  702. #define CEC_OPCODE_REPORT_AUDIO_STATUS 0X7A /**< <Report Audio Status> Reports an amplifier's volume and mute status */
  703. #define CEC_OPCODE_SET_SYSTEM_AUDIO_MODE 0X72 /**< <Set System Audio Mode> Turns the System Audio Mode On or Off. */
  704. #define CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST 0X70 /**< <System Audio Mode Request> A device implementing System Audio Control and which has volume control RC buttons (eg TV or STB) requests to use System Audio Mode to the amplifier */
  705. #define CEC_OPCODE_SYSTEM_AUDIO_MODE_STATUS 0X7E /**< <System Audio Mode Status> Reports the current status of the System Audio Mode */
  706. /**< Audio Rate Control Feature*/
  707. #define CEC_OPCODE_SET_AUDIO_RATE 0X9A /**< <Set Audio Rate> Used to control audio rate from Source Device. */
  708. #define CEC_OPCODE_POLLING_MESSAGE 0XFE /**< <POLL message have no opcode, So, we just use this value. */
  709. typedef enum hiUNF_CEC_LOGICALADD_S
  710. {
  711. HI_CEC_LOGICALADD_TV = 0X00,
  712. HI_CEC_LOGICALADD_RECORDDEV_1 = 0X01,
  713. HI_CEC_LOGICALADD_RECORDDEV_2 = 0X02,
  714. HI_CEC_LOGICALADD_TUNER_1 = 0X03,
  715. HI_CEC_LOGICALADD_PLAYDEV_1 = 0X04,
  716. HI_CEC_LOGICALADD_AUDIOSYSTEM = 0X05,
  717. HI_CEC_LOGICALADD_TUNER_2 = 0X06,
  718. HI_CEC_LOGICALADD_TUNER_3 = 0X07,
  719. HI_CEC_LOGICALADD_PLAYDEV_2 = 0X08,
  720. HI_CEC_LOGICALADD_RECORDDEV_3 = 0X09,
  721. HI_CEC_LOGICALADD_TUNER_4 = 0X0A,
  722. HI_CEC_LOGICALADD_PLAYDEV_3 = 0X0B,
  723. HI_CEC_LOGICALADD_RESERVED_1 = 0X0C,
  724. HI_CEC_LOGICALADD_RESERVED_2 = 0X0D,
  725. HI_CEC_LOGICALADD_SPECIALUSE = 0X0E,
  726. HI_CEC_LOGICALADD_BROADCAST = 0X0F,
  727. HI_CEC_LOGICALADD_BUTT
  728. }HI_CEC_LOGICALADD_S;
  729. typedef enum hiUNF_CEC_CMDTYPE_E
  730. {
  731. HI_CEC_STRUCTCOMMAND,
  732. HI_CEC_RAWCOMMAND,
  733. HI_CEC_BUTT
  734. }HI_CEC_CMDTYPE_E;
  735. typedef struct hiUNF_CEC_RAWDATA_S
  736. {
  737. HI_U8 u8Length;
  738. HI_U8 u8Data[15];
  739. }HI_CEC_RAWDATA_S;
  740. typedef enum hiUNF_CEC_UICMD_E /**< User Interface Command Opcode */
  741. {
  742. HI_CEC_UICMD_SELECT = 0x00,
  743. HI_CEC_UICMD_UP = 0x01,
  744. HI_CEC_UICMD_DOWN = 0x02,
  745. HI_CEC_UICMD_LEFT = 0x03,
  746. HI_CEC_UICMD_RIGHT = 0x04,
  747. HI_CEC_UICMD_RIGHT_UP = 0x05,
  748. HI_CEC_UICMD_RIGHT_DOWN = 0x06,
  749. HI_CEC_UICMD_LEFT_UP = 0x07,
  750. HI_CEC_UICMD_LEFT_DOWN = 0x08,
  751. HI_CEC_UICMD_ROOT_MENU = 0x09,
  752. HI_CEC_UICMD_SETUP_MENU = 0x0A,
  753. HI_CEC_UICMD_CONTENTS_MENU = 0x0B,
  754. HI_CEC_UICMD_FAVORITE_MENU = 0x0C,
  755. HI_CEC_UICMD_EXIT = 0x0D,
  756. HI_CEC_UICMD_NUM_0 = 0x20,
  757. HI_CEC_UICMD_NUM_1 = 0x21,
  758. HI_CEC_UICMD_NUM_2 = 0x22,
  759. HI_CEC_UICMD_NUM_3 = 0x23,
  760. HI_CEC_UICMD_NUM_4 = 0x24,
  761. HI_CEC_UICMD_NUM_5 = 0x25,
  762. HI_CEC_UICMD_NUM_6 = 0x26,
  763. HI_CEC_UICMD_NUM_7 = 0x27,
  764. HI_CEC_UICMD_NUM_8 = 0x28,
  765. HI_CEC_UICMD_NUM_9 = 0x29,
  766. HI_CEC_UICMD_DOT = 0x2A,
  767. HI_CEC_UICMD_ENTER = 0x2B,
  768. HI_CEC_UICMD_CLEAR = 0x2C,
  769. HI_CEC_UICMD_NEXT_FAVORITE = 0x2F,
  770. HI_CEC_UICMD_CHANNEL_UP = 0x30,
  771. HI_CEC_UICMD_CHANNEL_DOWN = 0x31,
  772. HI_CEC_UICMD_PREVIOUS_CHANNEL = 0x32,
  773. HI_CEC_UICMD_SOUND_SELECT = 0x33,
  774. HI_CEC_UICMD_INPUT_SELECT = 0x34,
  775. HI_CEC_UICMD_DISPLAY_INFORMATION = 0x35,
  776. HI_CEC_UICMD_HELP = 0x36,
  777. HI_CEC_UICMD_PAGE_UP = 0x37,
  778. HI_CEC_UICMD_PAGE_DOWN = 0x38,
  779. HI_CEC_UICMD_POWER = 0x40,
  780. HI_CEC_UICMD_VOLUME_UP = 0x41,
  781. HI_CEC_UICMD_VOLUME_DOWN = 0x42,
  782. HI_CEC_UICMD_MUTE = 0x43,
  783. HI_CEC_UICMD_PLAY = 0x44,
  784. HI_CEC_UICMD_STOP = 0x45,
  785. HI_CEC_UICMD_PAUSE = 0x46,
  786. HI_CEC_UICMD_RECORD = 0x47,
  787. HI_CEC_UICMD_REWIND = 0x48,
  788. HI_CEC_UICMD_FAST_FORWARD = 0x49,
  789. HI_CEC_UICMD_EJECT = 0x4A,
  790. HI_CEC_UICMD_FORWARD = 0x4B,
  791. HI_CEC_UICMD_BACKWARD = 0x4C,
  792. HI_CEC_UICMD_STOP_RECORD = 0x4D,
  793. HI_CEC_UICMD_PAUSE_RECORD = 0x4E,
  794. HI_CEC_UICMD_ANGLE = 0x50,
  795. HI_CEC_UICMD_SUBPICTURE = 0x51,
  796. HI_CEC_UICMD_VIDEO_ON_DEMAND = 0x52,
  797. HI_CEC_UICMD_ELECTRONIC_PROGRAM_GUIDE = 0x53,
  798. HI_CEC_UICMD_TIMER_PROGRAMMING = 0x54,
  799. HI_CEC_UICMD_INITIAL_CONFIGURATION = 0x55,
  800. HI_CEC_UICMD_PLAY_FUNCTION = 0x60,
  801. HI_CEC_UICMD_PAUSE_PLAY_FUNCTION = 0x61,
  802. HI_CEC_UICMD_RECORD_FUNCTION = 0x62,
  803. HI_CEC_UICMD_PAUSE_RECORD_FUNCTION = 0x63,
  804. HI_CEC_UICMD_STOP_FUNCTION = 0x64,
  805. HI_CEC_UICMD_MUTE_FUNCTION = 0x65,
  806. HI_CEC_UICMD_RESTORE_VOLUME_FUNCTION = 0x66,
  807. HI_CEC_UICMD_TUNE_FUNCTION = 0x67,
  808. HI_CEC_UICMD_SELECT_MEDIA_FUNCTION = 0x68,
  809. HI_CEC_UICMD_SELECT_AV_INPUT_FUNCTION = 0x69,
  810. HI_CEC_UICMD_SELECT_AUDIO_INPUT_FUNCTION = 0x6A,
  811. HI_CEC_UICMD_POWER_TOGGLE_FUNCTION = 0x6B,
  812. HI_CEC_UICMD_POWER_OFF_FUNCTION = 0x6C,
  813. HI_CEC_UICMD_POWER_ON_FUNCTION = 0x6D,
  814. HI_CEC_UICMD_F1_BLUE = 0x71,
  815. HI_CEC_UICMD_F2_RED = 0x72,
  816. HI_CEC_UICMD_F3_GREEN = 0x73,
  817. HI_CEC_UICMD_F4_YELLOW = 0x74,
  818. HI_CEC_UICMD_F5 = 0x75,
  819. HI_CEC_UICMD_DATA = 0x76
  820. }HI_CEC_UICMD_E; /* User Control Code */
  821. typedef struct hiUNF_HDMI_CEC_CMD_S
  822. {
  823. HI_CEC_LOGICALADD_S enSrcAdd;
  824. HI_CEC_LOGICALADD_S enDstAdd;
  825. HI_U8 u8Opcode;
  826. HI_CEC_RAWDATA_S stRawData;
  827. }HI_HDMI_CEC_CMD_S;
  828. typedef struct hiUNF_HDMI_CEC_STATUS_S
  829. {
  830. HI_BOOL bEnable;
  831. HI_U8 u8PhysicalAddr[4]; /**< CEC physic addr */
  832. HI_U8 u8LogicalAddr; /**< CEC logic addr, default:0x03. */
  833. HI_U8 u8Network[HI_CEC_LOGICALADD_BUTT]; /**< CEC's net work, 1:this device can answer cec command */
  834. }HI_HDMI_CEC_STATUS_S;
  835. typedef HI_VOID (*HI_HDMI_CECCALLBACK)(HI_HDMI_ID_E enHdmi, HI_HDMI_CEC_CMD_S *pstCECCmd, HI_VOID *pData);
  836. typedef struct hiHDMI_CECCALLBACK_FUNC_S
  837. {
  838. HI_HDMI_CECCALLBACK pfnCecCallback; /**< Event handling callback function */
  839. HI_VOID *pPrivateData; /**< Private data of the CEC callback functions and parameters */
  840. }HI_HDMI_CECCALLBACK_FUNC_S;
  841. typedef enum hiHDMI_TRACE_LEN_E
  842. {
  843. HI_HDMI_TRACE_LEN_0,
  844. HI_HDMI_TRACE_LEN_1,
  845. HI_HDMI_TRACE_LEN_BUTT,
  846. }HI_HDMI_TRACE_LEN_E;
  847. typedef struct hiHDMI_MOD_PARAM_S
  848. {
  849. HI_HDMI_TRACE_LEN_E enTraceLen; /**< Phy parameters selection. */
  850. }HI_HDMI_MOD_PARAM_S;
  851. typedef enum hiERR_HDMI_CODE_E
  852. {
  853. ERR_HDMI_NOT_INIT = 1,
  854. ERR_HDMI_INVALID_PARA = 2,
  855. ERR_HDMI_NUL_PTR = 3,
  856. ERR_HDMI_DEV_NOT_OPEN = 4,
  857. ERR_HDMI_DEV_NOT_CONNECT = 5,
  858. ERR_HDMI_READ_SINK_FAILED = 6,
  859. ERR_HDMI_INIT_ALREADY = 7,
  860. ERR_HDMI_CALLBACK_ALREADY = 8,
  861. ERR_HDMI_INVALID_CALLBACK = 9,
  862. ERR_HDMI_FEATURE_NO_SUPPORT = 10,
  863. ERR_HDMI_BUS_BUSY = 11,
  864. ERR_HDMI_READ_EVENT_FAILED = 12,
  865. ERR_HDMI_NOT_START = 13,
  866. ERR_HDMI_READ_EDID_FAILED = 14,
  867. ERR_HDMI_INIT_FAILED = 15,
  868. ERR_HDMI_CREATE_TESK_FAILED = 16,
  869. ERR_HDMI_MALLOC_FAILED = 17,
  870. ERR_HDMI_FREE_FAILED = 18,
  871. ERR_HDMI_PTHREAD_CREATE_FAILED = 19,
  872. ERR_HDMI_PTHREAD_JOIN_FAILED = 20,
  873. ERR_HDMI_STRATEGY_FAILED = 21,
  874. ERR_HDMI_SET_ATTR_FAILED = 22,
  875. ERR_HDMI_CALLBACK_NOT_REGISTER = 23,
  876. ERR_HDMI_CEC_CALLBACK_REREGISTER = 24,
  877. ERR_HDMI_UNKNOWN_COMMAND = 25,
  878. ERR_HDMI_MUTEX_LOCK_FAILED = 26,
  879. ERR_HDMI_CEC_NOT_ENABLE = 27,
  880. ERR_HDMI_BUTT,
  881. } ERR_HDMI_CODE_E;
  882. #define HI_ERR_HDMI_NOT_INIT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_INIT)
  883. #define HI_ERR_HDMI_INVALID_PARA HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_PARA)
  884. #define HI_ERR_HDMI_NUL_PTR HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NUL_PTR)
  885. #define HI_ERR_HDMI_DEV_NOT_OPEN HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_OPEN)
  886. #define HI_ERR_HDMI_DEV_NOT_CONNECT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_DEV_NOT_CONNECT)
  887. #define HI_ERR_HDMI_READ_SINK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_SINK_FAILED)
  888. #define HI_ERR_HDMI_INIT_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_ALREADY)
  889. #define HI_ERR_HDMI_CALLBACK_ALREADY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_ALREADY)
  890. #define HI_ERR_HDMI_INVALID_CALLBACK HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INVALID_CALLBACK)
  891. #define HI_ERR_HDMI_FEATURE_NO_SUPPORT HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FEATURE_NO_SUPPORT)
  892. #define HI_ERR_HDMI_BUS_BUSY HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_BUS_BUSY)
  893. #define HI_ERR_HDMI_READ_EVENT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EVENT_FAILED)
  894. #define HI_ERR_HDMI_NOT_START HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_NOT_START)
  895. #define HI_ERR_HDMI_READ_EDID_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_READ_EDID_FAILED)
  896. #define HI_ERR_HDMI_INIT_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_INIT_FAILED)
  897. #define HI_ERR_HDMI_CREATE_TESK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CREATE_TESK_FAILED)
  898. #define HI_ERR_HDMI_MALLOC_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MALLOC_FAILED)
  899. #define HI_ERR_HDMI_FREE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_FREE_FAILED)
  900. #define HI_ERR_HDMI_PTHREAD_CREATE_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_CREATE_FAILED)
  901. #define HI_ERR_HDMI_PTHREAD_JOIN_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_PTHREAD_JOIN_FAILED)
  902. #define HI_ERR_HDMI_STRATEGY_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_STRATEGY_FAILED)
  903. #define HI_ERR_HDMI_SET_ATTR_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_SET_ATTR_FAILED)
  904. #define HI_ERR_HDMI_CEC_CALLBACK_REREGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_CALLBACK_REREGISTER)
  905. #define HI_ERR_HDMI_CALLBACK_NOT_REGISTER HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CALLBACK_NOT_REGISTER)
  906. #define HI_ERR_HDMI_UNKNOWN_COMMAND HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_UNKNOWN_COMMAND)
  907. #define HI_ERR_HDMI_MUTEX_LOCK_FAILED HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_MUTEX_LOCK_FAILED)
  908. #define HI_ERR_HDMI_CEC_NOT_ENABLE HI_DEF_ERR(HI_ID_HDMI, EN_ERR_LEVEL_ERROR, ERR_HDMI_CEC_NOT_ENABLE)
  909. #ifdef __cplusplus
  910. #if __cplusplus
  911. }
  912. #endif
  913. #endif /* End of #ifdef __cplusplus */
  914. #endif /* End of #ifndef __HI_COMM_VO_H__ */