1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // (!MStar Confidential Information!L) by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file drvXC_HDMI_if.h 98 /// @brief HDMI Interface 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 /*! \defgroup MISC HDMI modules 103 104 * \defgroup HDMI_IF HDMI interface (drvXC_HDMI_if.h) 105 * \ingroup MISC 106 107 <b> Features </b> 108 - HDMI Ethernet Channel 109 Support Ethernet communication through HDMI 110 - Audio Return Channel 111 - 3D support 112 - Frame packing, Side-by-Side half, Top-Buttom and etc. 113 - 4Kx2K support 114 3840x2160@24/25/30Hz, 4096x2160@24Hz 115 - Additional Color Spaces 116 sYCC601, AdobeRGB, AdobeYCC601 117 - HDMI Micro Connector 118 19-pin/1080p 119 120 \image html api_HDMI_if_pic1.png 121 122 <b> Operation Flow </b> 123 - Initialized and enable HDMI 124 - MApi_HDMITx_SetHPDGpioPin(_st_msAPI_XC_InitData.u16HdmitxHpdPin); 125 - MApi_HDMITx_Init(); 126 - MApi_HDMITx_TurnOnOff(TRUE); 127 - MApi_HDMITx_SetVideoOnOff(TRUE) 128 - MApi_HDMITx_SetAudioConfiguration(HDMITX_AUDIO_48K, HDMITX_AUDIO_CH_2, HDMITX_AUDIO_PCM); 129 */ 130 #ifndef DRVXC_HDMI_IF_H 131 #define DRVXC_HDMI_IF_H 132 133 #include "MsDevice.h" 134 #include "MsCommon.h" 135 #ifdef __cplusplus 136 extern "C" 137 { 138 #endif 139 140 //------------------------------------------------------------------------------------------------- 141 // Driver Capability 142 //------------------------------------------------------------------------------------------------- 143 144 #ifdef MDRV_HDMI_C 145 #define INTERFACE 146 #else 147 #define INTERFACE extern 148 #endif 149 150 //------------------------------------------------------------------------------------------------- 151 // Macro and Define 152 //------------------------------------------------------------------------------------------------- 153 #define _BYTE_0 0x00 154 #define _BYTE_1 0x01 155 #define _BYTE_2 0x02 156 #define _BYTE_3 0x03 157 #define _BYTE_4 0x04 158 #define _BYTE_5 0x05 159 #define _BYTE_6 0x06 160 #define _BYTE_7 0x07 161 #define _BYTE_8 0x08 162 #define _BYTE_9 0x09 163 #define _BYTE_10 0x0A 164 #define _BYTE_11 0x0B 165 #define _BYTE_12 0x0C 166 #define _BYTE_13 0x0D 167 // library information 168 #define MSIF_HDMI_LIB_CODE {'H','D','M','I'} 169 #define MSIF_HDMI_LIBVER {'0','1'} 170 #define MSIF_HDMI_BUILDNUM {'0','7'} 171 #define MSIF_HDMI_CHANGELIST {'0','0','3','5','1','6','6','3'} 172 #define HDMI_DRV_VERSION /* Character String for DRV/API version */ \ 173 MSIF_TAG, /* 'MSIF' */ \ 174 MSIF_CLASS, /* '00' */ \ 175 MSIF_CUS, /* 0x0000 */ \ 176 MSIF_MOD, /* 0x0000 */ \ 177 MSIF_CHIP, \ 178 MSIF_CPU, \ 179 MSIF_HDMI_LIB_CODE , /* IP__ */ \ 180 MSIF_HDMI_LIBVER , /* 0.0 ~ Z.Z */ \ 181 MSIF_HDMI_BUILDNUM , /* 00 ~ 99 */ \ 182 MSIF_HDMI_CHANGELIST, /* CL# */ \ 183 MSIF_OS 184 185 #define HDMI_VSDB_PACKET_SIZE 14 186 #define HDMI_HDR_PACKET_SIZE HDMI_VSDB_PACKET_SIZE 187 188 /// Extend packet receive structure version 189 #define HDMI_EXTEND_PACKET_RECEIVE_VERSION 2 190 #define HDMI_EXTEND_PACKET_RECEIVE_VERSION_1_SIZE 22 191 192 /// HDR metadata structure version 193 #define HDMI_HDR_METADATA_VERSION 1 194 #define HDMI_HDR_METADATA_VERSION_1_SIZE 30 195 196 //------------------------------------------------------------------------------------------------- 197 // Type and Structure 198 //------------------------------------------------------------------------------------------------- 199 // for HDCP 22 callback function 200 typedef void (*HDCP22_Recv_CBF)(MS_U8, MS_U8, MS_U8*, MS_U32, void*); //type, portIdx, msg, msg length, context 201 202 typedef enum 203 { 204 E_HDMI_SWITCH_VSDB_TO_HDR_PACKET, // XC resource 205 E_HDMI_HDR_INFOFRAME_GET, 206 E_HDMI_EXTEND_PACKET_RECEIVE_GET, 207 208 E_HDMI_INTERFACE_CMD_GET_HDCP_STATE = 0x500, // HDMIRX resource 209 /*************************** HDCP Repeater ***************************/ 210 E_HDMI_INTERFACE_CMD_WRITE_X74, 211 E_HDMI_INTERFACE_CMD_READ_X74, 212 E_HDMI_INTERFACE_CMD_SET_REPEATER, 213 E_HDMI_INTERFACE_CMD_SET_BSTATUS, 214 E_HDMI_INTERFACE_CMD_SET_HDMI_MODE, 215 E_HDMI_INTERFACE_CMD_GET_INTERRUPT_STATUS, 216 E_HDMI_INTERFACE_CMD_WRITE_KSV_LIST, 217 E_HDMI_INTERFACE_CMD_SET_VPRIME, 218 /*************************** HDCP Repeater ***************************/ 219 E_HDMI_INTERFACE_CMD_GET_HDCP_ENC_STATE 220 } E_HDMI_CTRL_ID; 221 222 /// HDMI reset type 223 typedef enum 224 { 225 REST_AVMUTE = _BIT(8), ///<HDMI Reset bit[8] 226 REST_Y_COLOR = _BIT(9), ///<HDMI Reset bit[9] 227 REST_PIXEL_REPETITION = _BIT(10), ///<HDMI Reset bit[10] 228 REST_FRAME_REPETITION = _BIT(11), ///<HDMI Reset bit[11] 229 REST_GCP_PKT = _BIT(12), ///<HDMI Reset bit[12] 230 REST_DEEP_COLOR_FIFO = _BIT(13), ///<HDMI Reset bit[13] 231 REST_RESERVE = _BIT(14), ///<HDMI Reset bit[14] 232 REST_HDMI_STATUS = _BIT(15), ///<HDMI Reset bit[15] 233 }HDMI_REST_t; 234 235 /*! 236 HDMI Aspect Ratio TYPE 237 */ 238 typedef enum 239 { 240 // Active Format Aspect Ratio - AFAR 241 // HDMI_AF_AR_Not_Present = -1, ///< IF0[11..8] AFD not present, or AFD not yet found 242 HDMI_AF_AR_Reserve_0 = 0x00, ///< IF0[11..8] 0000, Reserved 243 HDMI_AF_AR_Reserve_1 = 0x01, ///< IF0[11..8] 0001, Reserved 244 HDMI_AF_AR_16x9_Top = 0x02, ///< IF0[11..8] 0010, box 16:9 (top). 245 HDMI_AF_AR_14x9_Top = 0x03, ///< IF0[11..8] 0011, box 14:9 (top). 246 HDMI_AF_AR_GT_16x9 = 0x04, ///< IF0[11..8] 0100, box >16:9 (centre) 247 HDMI_AF_AR_Reserve_5 = 0x05, ///< IF0[11..8] 0101, Reserved 248 HDMI_AF_AR_Reserve_6 = 0x06, ///< IF0[11..8] 0110, Reserved 249 HDMI_AF_AR_Reserve_7 = 0x07, ///< IF0[11..8] 0111, Reserved 250 HDMI_AF_AR_SAME = 0x08, ///< IF0[11..8] 1000, same as picture 251 HDMI_AF_AR_4x3_C = 0x09, ///< IF0[11..8] 1001, 4:3 Center 252 HDMI_AF_AR_16x9_C = 0x0A, ///< IF0[11..8] 1010, 16:9 Center 253 HDMI_AF_AR_14x9_C = 0x0B, ///< IF0[11..8] 1011, 14:9 Center 254 HDMI_AF_AR_Reserve_12 = 0x0C, ///< IF0[11..8] 1100, Reserved. 255 HDMI_AF_AR_4x3_with_14x9_C = 0x0D, ///< IF0[11..8] 1101, 4:3 with shoot and protect 14:9 centre. 256 HDMI_AF_AR_16x9_with_14x9_C = 0x0E, ///< IF0[11..8] 1110, 16:9 with shoot and protect 14:9 centre. 257 HDMI_AF_AR_16x9_with_4x3_C = 0x0F, ///< IF0[11..8] 1111, 16:9 with shoot and protect 4:3 centre. 258 259 // Picture Aspect Ratio - PAR 260 HDMI_Pic_AR_NODATA = 0x00, ///< IF0[13..12] 00 261 HDMI_Pic_AR_4x3 = 0x10, ///< IF0[13..12] 01, 4:3 262 HDMI_Pic_AR_16x9 = 0x20, ///< IF0[13..12] 10, 16:9 263 HDMI_Pic_AR_RSV = 0x30, ///< IF0[13..12] 11, reserved 264 } MS_HDMI_AR_TYPE; 265 266 //------------------------------------------------------------------------------------------------- 267 /// AVI infomation frame version 268 //------------------------------------------------------------------------------------------------- 269 typedef enum 270 { 271 E_AVI_INFOFRAME_VERSION_NON, //invalid version 272 E_AVI_INFOFRAME_VERSION1, //AVI infomation frame version 1 273 E_AVI_INFOFRAME_VERSION2, //AVI infomation frame version 2 274 E_AVI_INFOFRAME_VERSION3 //AVI infomation frame version 3 275 }EN_AVI_INFOFRAME_VERSION; 276 277 #define HDMI_AR_INIT_VALUE (HDMI_Pic_AR_RSV) 278 #define HDMI_AR_REG_MASK (0x3F) 279 #define HDMI_AFAR_MASK (0x0F) // mask to get the AFAR 280 #define HDMI_AR_MASK (0x30) // mask to get the PAR 281 282 /// HDMI GControl package type. 283 typedef enum 284 { 285 G_CTRL_AVMUTE = 0, ///< bit[0]: AVMUTE 286 G_Ctrl_DEFAULT_PHASE, ///< bit[1]: Default_Phase 287 G_Ctrl_LAST_PP, ///< bit[4:2]: LAST_PP[2:0] 288 G_Ctrl_PRE_LPP, ///< bit[7:5]: PRE_LPP[2:0] 289 G_Ctrl_CD_VAL, ///< bit[11:8]: CD_VAL[3:0] 290 G_Ctrl_PP_VAL, ///< bit[15:12]: PP_VAL[3:0] 291 G_Ctrl_ALL 292 }HDMI_GControl_INFO_t; 293 294 /// HDMI PLL control type 295 typedef enum 296 { 297 PLL_CTRL_L=0, ///< HDMI_PLL_CTRL1_L 7:0 298 PLL_CTRL_MANUAL_DIV, ///< MANUAL_PLL_DIV 7 299 PLL_CTRL_PORST, ///< PLL_PORST 6 300 PLL_CTRL_RESET_TP, ///< RESET_TP 5 301 PLL_CTRL_RESET_TF, ///< RESET_TF 4 302 PLL_CTRL_RESET_TI, ///< RESET_TI 3 303 PLL_CTRL_VCO_OFFSET, ///< VCO_OFFSET 2 304 PLL_CTRL_RESET, ///< PLL_RESET 1 305 PLL_CTRL_PWRDOWN, ///< PWRDOWN 0 306 307 PLL_CTRL_H, ///< HDMI_PLL_CTRL1_H 7:0 308 PLL_CTRL_KN, ///< KN[1:0] 7:6 309 PLL_CTRL_RCTRL, ///< RCTRL 5:3 310 PLL_CTRL_ICTRL, ///< ICTRL 2:0 311 }HDMI_PLL_CTRL_t; 312 313 /// HDMI PLL control type 314 typedef enum 315 { 316 PLL_CTRL2_L, ///< HDMI_PLL_CTRL2_L 7:0 317 PLL_CTRL2_KP, ///< KP[3:0] 7:4 318 PLL_CTRL2_KM, ///< KM[3:0] 3:0 319 320 PLL_CTRL2_H, ///< HDMI_PLL_CTRL2_H 7:0 321 PLL_CTRL2_DDIV, ///< DDIV[3:0] 7:4 322 PLL_CTRL2_FBDIV, ///< FBDIV[3:0] 3:0 323 }HDMI_PLL_CTRL2_t; 324 325 ////===========================>>HDMI 326 typedef struct 327 { 328 MS_BOOL bIsHDMIMode; 329 MS_BOOL bMuteHDMIVideo; 330 331 MS_BOOL bMuteHDMIAudio; 332 MS_BOOL bEnableNonPCM; 333 MS_U8 u8AudioStbCnt; // If stable more than HDMI_AUDIO_STABLE_CNT, enable audio 334 // In 199M case, audio on->off->on->off->on, so, we wait 4 * HDMI_AUDIO_STABLE_CNT, if unstable, 335 // enable audio still to prevent mute audio always because of un-stable 336 MS_U8 u8AudioForceEnableCnt; 337 338 MS_U8 u8ColorFormat; 339 MS_U8 u8LostHDMICounter; 340 MS_BOOL bColorFMTChange; 341 MS_U8 u8PreClolrFormat; 342 MS_U8 u8AspectRatio; 343 } HDMI_POLLING_STATUS_t; 344 345 typedef enum 346 { 347 MS_DVI_CHANNEL_R, 348 MS_DVI_CHANNEL_G, 349 MS_DVI_CHANNEL_B, 350 } MS_DVI_CHANNEL_TYPE; 351 352 /// HDMI COLOR FORMAT 353 typedef enum 354 { 355 MS_HDMI_COLOR_RGB, ///< HDMI RGB 444 Color Format 356 MS_HDMI_COLOR_YUV_422, ///< HDMI YUV 422 Color Format 357 MS_HDMI_COLOR_YUV_444, ///< HDMI YUV 444 Color Format 358 MS_HDMI_COLOR_YUV_420, ///< HDMI YUV 420 Color Format 359 MS_HDMI_COLOR_RESERVED, ///< Reserve 360 MS_HDMI_COLOR_DEFAULT = MS_HDMI_COLOR_RGB, ///< Default setting 361 MS_HDMI_COLOR_UNKNOWN = 7, ///< Unknow Color Format 362 } MS_HDMI_COLOR_FORMAT; 363 364 /// HDMI Extended COLORIMETRY 365 typedef enum 366 { 367 MS_HDMI_EXT_COLOR_XVYCC601, ///< xvycc 601 368 MS_HDMI_EXT_COLOR_XVYCC709, ///< xvycc 709 369 MS_HDMI_EXT_COLOR_SYCC601, ///< sYCC 601 370 MS_HDMI_EXT_COLOR_ADOBEYCC601, ///< Adobe YCC 601 371 MS_HDMI_EXT_COLOR_ADOBERGB, ///< Adobe RGB 372 MS_HDMI_EXT_COLOR_BT2020YcCbcCrc, /// ITU-F BT.2020 YcCbcCrc 373 MS_HDMI_EXT_COLOR_BT2020RGBYCbCr, /// ITU-R BT.2020 RGB or YCbCr 374 MS_HDMI_EXT_COLOR_DEFAULT = MS_HDMI_EXT_COLOR_XVYCC601, ///< Default setting 375 MS_HDMI_EXT_COLOR_UNKNOWN = 7, ///< Unknow 376 } MS_HDMI_EXT_COLORIMETRY_FORMAT; 377 378 /// HDMI Content Type 379 typedef enum 380 { 381 MS_HDMI_CONTENT_NoData = 0, // No Data. 382 MS_HDMI_CONTENT_Graphics, // Graphics(text). 383 MS_HDMI_CONTENT_Photo, // Photo type. 384 MS_HDMI_CONTENT_Cinema, // Cinema type. 385 MS_HDMI_CONTENT_Game, // Game type. 386 } MS_HDMI_CONTENT_TYPE; 387 388 ///HDMI COLOR RANGE 389 typedef enum 390 { 391 E_HDMI_COLOR_RANGE_DEFAULT, // 392 E_HDMI_COLOR_RANGE_LIMIT, //HDMI RGB Limited Range (16-235) 393 E_HDMI_COLOR_RANGE_FULL, //HDMI Full Range (0-255) 394 E_HDMI_COLOR_RANGE_RESERVED 395 } EN_HDMI_COLOR_RANGE; 396 397 /// HDMI Equalize Level 398 typedef enum 399 { 400 MS_HDMI_EQ_2M, ///< HDMI EQ 2M 401 MS_HDMI_EQ_10M, ///< HDMI EQ 10M 402 MS_HDMI_EQ_15M, ///< HDMI EQ 15M 403 MS_HDMI_EQ_MAX, ///< HDMI EQ MAX 404 MS_HDMI_EQ_USER_DEFINE, ///< HDMI EQ User define 405 } MS_HDMI_EQ; 406 407 /// HDMI Packet nauber 408 typedef enum 409 { 410 PKT_MPEG = _BIT(0), ///< Pactet[0] 411 PKT_AUI = _BIT(1), ///< Pactet[1] 412 PKT_SPD = _BIT(2), ///< Pactet[2] 413 PKT_AVI = _BIT(3), ///< Pactet[3] 414 PKT_GC = _BIT(4), ///< Pactet[4] 415 PKT_ASAMPLE = _BIT(5), ///< Pactet[5] 416 PKT_ACR = _BIT(6), ///< Pactet[6] 417 PKT_VS = _BIT(7), ///< Pactet[7] 418 PKT_NULL = _BIT(8), ///< Pactet[8] 419 PKT_ISRC2 = _BIT(9), ///< Pactet[9] 420 PKT_ISRC1 = _BIT(10), ///< Pactet[10] 421 PKT_ACP = _BIT(11), ///< Pactet[11] 422 PKT_ONEBIT_AUD = _BIT(12), ///< Pactet[12] 423 PKT_GM = _BIT(13), ///< Pactet[13] 424 PKT_HBR = _BIT(14), ///< Pactet[14] 425 PKT_VBI = _BIT(15), ///< Pactet[15] 426 PKT_HDR = _BIT(16), ///< Pactet[16] 427 PKT_RSV = _BIT(17), ///< Pactet[17] 428 PKT_EDR = _BIT(18), ///< Pactet[18] 429 }MS_HDMI_PACKET_STATE_t; 430 431 typedef enum 432 { 433 CAPS_DVI_ADJ_70M = _BIT(0), 434 CAPS_VSYNC_END_EN = _BIT(1), 435 }MS_HDMI_FUNC_CAPS; 436 437 /// HDMI PACKET VALUE structure 438 typedef struct __attribute__((packed)) 439 { 440 MS_U16 PKT_MPEG_VALUE; ///< MPEG packet content 441 MS_U16 PKT_AUI_VALUE; ///< AUI packet content 442 MS_U16 PKT_SPD_VALUE; ///< SPD packet content 443 MS_U16 PKT_AVI_VALUE; ///< AVI packet content 444 MS_U16 PKT_GC_VALUE; ///< GC packet content 445 MS_U16 PKT_ASAMPLE_VALUE; ///< ASAMPLE packet content 446 MS_U16 PKT_ACR_VALUE; ///< ACR packet content 447 MS_U16 PKT_VS_VALUE; ///< VS packet content 448 MS_U16 PKT_NULL_VALUE; ///< NULL packet content 449 MS_U16 PKT_ISRC2_VALUE; ///< ISRC2 packet content 450 MS_U16 PKT_ISRC1_VALUE; ///< ISRC1 packet content 451 MS_U16 PKT_ACP_VALUE; ///< ACP packet content 452 MS_U16 PKT_ONEBIT_AUD_VALUE; ///< ONE bit AUD packet content 453 }MS_HDMI_PACKET_VALUE_t; 454 455 /// Received HDMI packet flag. 456 typedef struct __attribute__((packed)) 457 { 458 MS_U16 u16Version; /// Version. 459 MS_U16 u16Size; /// Structure size. 460 MS_BOOL bPKT_MPEG_RECEIVE; ///< MPEG packet received 461 MS_BOOL bPKT_AUI_RECEIVE; ///< AUI packet received 462 MS_BOOL bPKT_SPD_RECEIVE; ///< SPD packet received 463 MS_BOOL bPKT_AVI_RECEIVE; ///< AVI packet received 464 MS_BOOL bPKT_GC_RECEIVE; ///< GC packet received 465 MS_BOOL bPKT_ASAMPLE_RECEIVE; ///< ASAMPLE packet received 466 MS_BOOL bPKT_ACR_RECEIVE; ///< ACR packet received 467 MS_BOOL bPKT_VS_RECEIVE; ///< VS packet received 468 MS_BOOL bPKT_NULL_RECEIVE; ///< NULL packet received 469 MS_BOOL bPKT_ISRC2_RECEIVE; ///< ISRC2 packet received 470 MS_BOOL bPKT_ISRC1_RECEIVE; ///< ISRC1 packet received 471 MS_BOOL bPKT_ACP_RECEIVE; ///< ACP packet received 472 MS_BOOL bPKT_ONEBIT_AUD_RECEIVE; ///< ONE bit AUD packet received 473 MS_BOOL bPKT_GM_RECEIVE; /// <GM packet received 474 MS_BOOL bPKT_HBR_RECEIVE; /// <HBR packet received 475 MS_BOOL bPKT_VBI_RECEIVE; /// <VBIpacket received 476 MS_BOOL bPKT_HDR_RECEIVE; ///< HDR packet received 477 MS_BOOL bPKT_RSV_RECEIVE; ///< RSV packet received 478 MS_BOOL bPKT_EDR_VALID; ///< Dolby EDR packet valid 479 }MS_HDMI_EXTEND_PACKET_RECEIVE_t; 480 481 482 483 typedef struct 484 { 485 MS_U8 AVMuteStatus; 486 MS_U8 AudioNotPCM; 487 MS_U8 PreAudiostatus; 488 MS_U8 ChecksumErrOrBCHParityErr; 489 MS_U8 PacketColorFormat; 490 MS_U8 AspectRatio; 491 MS_U8 AudioPacketErr; 492 MS_U8 ACPType; 493 } MS_HDMI_PACKET_STATUS_t; 494 495 496 typedef struct 497 { 498 MS_HDMI_PACKET_VALUE_t enPKT_Value; 499 MS_HDMI_PACKET_STATUS_t enPKT_Status; 500 } HDMI_PACKET_INFO_t, *P_HDMI_PACKET_INFO_t; 501 502 /// HDCP STATUS INFO structure 503 typedef struct __attribute__((packed)) 504 { 505 MS_BOOL b_St_HDMI_Mode; ///> HDCP_STATUS[0] & BIT0 506 MS_BOOL b_St_Reserve_1; ///> (HDCP_STATUS[0] & BIT1)>>1 507 MS_BOOL b_St_HDCP_Ver; ///> (HDCP_STATUS[0] & BIT2)>>2 508 MS_BOOL b_St_AVMute; ///> (HDCP_STATUS[0] & BIT3)>>3 509 MS_BOOL b_St_ENC_En; ///> (HDCP_STATUS[0] & BIT4)>>4 510 MS_BOOL b_St_AKsv_Rcv; ///> (HDCP_STATUS[0] & BIT5)>>5 511 MS_BOOL b_St_ENC_Dis; ///> (HDCP_STATUS[0] & BIT6)>>6 512 MS_BOOL b_St_Reserve_7; ///> (HDCP_STATUS[0] & BIT7)>>7 513 }MS_HDCP_STATUS_INFO_t; 514 515 /// HDMI Black Level 516 typedef enum 517 { 518 E_BLACK_LEVEL_LOW = 0, ///> HDMI black level low 519 E_BLACK_LEVEL_HIGH, ///> HDMI black level high 520 } BLACK_LEVEL; 521 522 /// VGA/DVI/HDMI EDID 523 typedef enum 524 { 525 E_XC_PROG_DVI0_EDID = 0x00, 526 E_XC_PROG_DVI1_EDID = 0x01, 527 E_XC_PROG_DVI2_EDID = 0x02, 528 E_XC_PROG_DVI3_EDID = 0x03, 529 E_XC_PROG_VGA_EDID = 0x10, 530 } E_XC_DDCRAM_PROG_TYPE; 531 532 typedef struct DLL_PACKED 533 { 534 MS_U8 *EDID; ///< customer EDID 535 MS_U16 u16EDIDSize; ///< 128 for VGA/DVI , 256 for HDMI 536 E_XC_DDCRAM_PROG_TYPE eDDCProgType; ///< what kind of DDCRam to program 537 538 MS_U16 u16CECPhyAddr; ///< if only 1 Digital DDCRam (get this information from MApi_XC_GetInfo()), you need to specify CEC physical address here 539 MS_U8 u8CECPhyAddrIdxL; ///< start point of CEC physical address (low byte) in EDID 540 MS_U8 u8CECPhyAddrIdxH; ///< start point of CEC physical address (high byte) in EDID 541 } XC_DDCRAM_PROG_INFO; 542 543 ////===========================>>HDCP 544 545 ///HDCP polling status 546 typedef struct 547 { 548 MS_BOOL bHPD_OK; ///< HPD OK 549 MS_U16 u16HPD_Counter; ///< HPD times counter 550 MS_U16 u16HDCP_KeyCounter; /// > HDCP key number 551 MS_U16 u16HDCP_KeyChkSum; ///> HDCP key check sum 552 MS_BOOL bIsPullHighHPD; ///> HPD is high or not 553 MS_U8 u8BKSV[5]; ///> BKSV 554 555 } HDCP_POLLING_STATUS_t; 556 557 /** 558 * The return value for HDMI fuction. 559 */ 560 typedef enum 561 { 562 /// fail 563 E_HDMI_RET_FAIL = 0, 564 /// success 565 E_HDMI_RET_OK, 566 } HDMI_Ret_Value; 567 568 569 // HDMI v1.4 new feature - T8 and T9 570 typedef enum 571 { 572 E_HDMI_NO_ADDITIONAL_FORMAT, // 000 573 E_HDMI_4Kx2K_FORMAT, // 001 574 E_HDMI_3D_FORMAT, // 010 575 E_HDMI_RESERVED, // 011 ~ 111 576 E_HDMI_NA // Not available 577 } E_HDMI_ADDITIONAL_VIDEO_FORMAT; 578 579 typedef enum 580 { 581 E_VIC_4Kx2K_30Hz = 0x01, // 1920(x2)x1080(x2) @ 29.97/30Hz 582 E_VIC_4Kx2K_25Hz = 0x02, // 1920(x2)x1080(x2) @ 25Hz 583 E_VIC_4Kx2K_24Hz = 0x03, // 1920(x2)x1080(x2) @ 23.976/24Hz 584 E_VIC_4Kx2K_24Hz_SMPTE = 0x04, // 2048(x2)x1080(x2) @ 24Hz 585 E_VIC_RESERVED, // 0x00, 0x05 ~ 0xFF 586 E_VIC_NA // Not available 587 } E_HDMI_VIC_4Kx2K_CODE; 588 589 typedef enum 590 { 591 E_3D_EXT_DATA_HOR_SUB_SAMPL_0, //0000 592 E_3D_EXT_DATA_HOR_SUB_SAMPL_1, //0001 593 E_3D_EXT_DATA_HOR_SUB_SAMPL_2, //0010 594 E_3D_EXT_DATA_HOR_SUB_SAMPL_3, //0011 595 E_3D_EXT_DATA_QUINCUNX_MATRIX_0, //0100 596 E_3D_EXT_DATA_QUINCUNX_MATRIX_1, //0101 597 E_3D_EXT_DATA_QUINCUNX_MATRIX_2, //0110 598 E_3D_EXT_DATA_QUINCUNX_MATRIX_3, //0111 599 E_3D_EXT_DATA_RESERVE, //1000 ~ 1111 600 E_3D_EXT_DATA_MODE_MAX, 601 } E_HDMI_3D_EXT_DATA_T; 602 603 typedef enum 604 { 605 E_3D_META_DATA_PARALLAX_ISO23002_3, //0000 606 E_3D_META_DATA_RESERVE, //001 ~ 1111 607 E_3D_META_DATA_MAX, 608 } E_HDMI_3D_META_DATA_TYPE; 609 610 typedef struct 611 { 612 MS_BOOL bImmeswitchSupport; 613 MS_U8 ucMHLSupportPath; 614 } stHDMI_INITIAL_TABLE; 615 616 typedef struct DLL_PACKED 617 { 618 MS_BOOL b3D_Meta_Present; 619 E_HDMI_3D_META_DATA_TYPE t3D_Metadata_Type; 620 MS_U8 u83D_Metadata_Length; 621 MS_U8 u83D_Metadata[23]; // Maximum length of VS is 31 - 8 = 23 622 } sHDMI_3D_META_FIELD; 623 624 /////////// HDCP22 ///////////////// 625 typedef enum 626 { 627 E_HDCP22_IF_HDMI, //0x00 628 E_HDCP22_IF_MIRACAST, //0x01 629 //TBD 630 } E_HDCP22_PORT_TYPE; 631 632 typedef enum 633 { 634 E_HDCP_NO_ENCRYPTION = 0, //0x00 635 E_HDCP_1_4, //0x01 636 E_HDCP_2_2, //0x02 637 }E_HDMI_HDCP_STATE; 638 639 typedef enum 640 { 641 E_HDCP_NOT_ENCRYPTION = 0, //0x00 642 E_HDCP_1_4_ENCRYPTION, //0x01 643 E_HDCP_2_2_ENCRYPTION, //0x02 644 }E_HDMI_HDCP_ENCRYPTION_STATE; 645 646 /////////// HDR metadata ///////////////// 647 typedef struct __attribute__((packed)) 648 { 649 MS_U16 u16Version; /// Version. 650 MS_U16 u16Size; /// Structure size. 651 MS_U8 u8EOTF; // 0:SDR gamma, 1:HDR gamma, 2:SMPTE ST2084, 3:Future EOTF, 4-7:Reserved 652 MS_U8 u8Static_Metadata_ID; // 0:Static Metadata Type 1, 1-7:Reserved for future use 653 MS_U16 u16Display_Primaries_X[3]; // display_primaries_x 654 MS_U16 u16Display_Primaries_Y[3]; // display_primaries_x 655 MS_U16 u16White_Point_X; // display primaries Wx 656 MS_U16 u16White_Point_Y; // display primaries Wy 657 MS_U16 u16Max_Display_Mastering_Luminance; // max display mastering luminance 658 MS_U16 u16Min_Display_Mastering_Luminance; // min display mastering luminance 659 MS_U16 u16Maximum_Content_Light_Level; // maximum content light level 660 MS_U16 u16Maximum_Frame_Average_Light_Level; // maximum frame-average light level 661 } sHDR_METADATA; 662 663 664 // HDMI Control structure 665 /** 666 * Switch VSDB to HDR packet control parameters. 667 */ 668 typedef struct __attribute__((packed)) 669 { 670 MS_BOOL bEnableHDR; 671 } MS_HDMI_Switch_VSDB_to_HDR_Parameters; 672 673 /** 674 * HDR info-frame get control parameters. 675 */ 676 typedef struct __attribute__((packed)) 677 { 678 sHDR_METADATA *pstHDRMetadata; 679 } MS_HDMI_HDR_InfoFrame_Get_Parameters; 680 681 /** 682 * Extend packet receive get control parameters. 683 */ 684 typedef struct __attribute__((packed)) 685 { 686 MS_BOOL bEnable; 687 MS_HDMI_EXTEND_PACKET_RECEIVE_t *pstPacketReceive; 688 } MS_HDMI_Extend_Packet_Receive_Get_Parameters; 689 690 typedef struct 691 { 692 E_MUX_INPUTPORT enInputPortType; 693 MS_U8 ucHDCPState; 694 } stCMD_HDMI_CHECK_HDCP_STATE; 695 696 /************************ HDCP Repeater ************************/ 697 typedef struct 698 { 699 E_MUX_INPUTPORT enInputPortType; 700 MS_U8 ucOffset; 701 MS_U8 ucData; 702 } stCMD_HDCP_WRITE_X74; 703 704 typedef struct 705 { 706 E_MUX_INPUTPORT enInputPortType; 707 MS_U8 ucOffset; 708 MS_U8 ucRetData; 709 } stCMD_HDCP_READ_X74; 710 711 typedef struct 712 { 713 E_MUX_INPUTPORT enInputPortType; 714 MS_BOOL bIsRepeater; 715 } stCMD_HDCP_SET_REPEATER; 716 717 typedef struct 718 { 719 E_MUX_INPUTPORT enInputPortType; 720 MS_U16 usBstatus; 721 } stCMD_HDCP_SET_BSTATUS; 722 723 typedef struct 724 { 725 E_MUX_INPUTPORT enInputPortType; 726 MS_BOOL bHDMIMode; 727 } stCMD_HDCP_SET_HDMI_MODE; 728 729 typedef struct 730 { 731 E_MUX_INPUTPORT enInputPortType; 732 MS_U8 ucRetIntStatus; 733 } stCMD_HDCP_GET_INTERRUPT_STATUS; 734 735 typedef struct 736 { 737 E_MUX_INPUTPORT enInputPortType; 738 MS_U8* pucKSV; 739 MS_U32 ulLen; 740 } stCMD_HDCP_WRITE_KSV_LIST; 741 742 typedef struct 743 { 744 E_MUX_INPUTPORT enInputPortType; 745 MS_U8* pucVPrime; 746 } stCMD_HDCP_SET_VPRIME; 747 /************************ HDCP Repeater ************************/ 748 749 typedef struct 750 { 751 E_MUX_INPUTPORT enInputPortType; 752 MS_U8 ucHDCPENCState; 753 } stCMD_HDMI_CHECK_HDCP_ENC_STATE; 754 755 typedef enum 756 { 757 E_HDMI_GET_HDE, 758 E_HDMI_GET_VDE, 759 E_HDMI_GET_HTT, 760 E_HDMI_GET_VTT, 761 } E_HDMI_GET_DATA_INFO; 762 763 //------------------------------------------------------------------------------------------------- 764 // Function and Variable 765 //------------------------------------------------------------------------------------------------- 766 767 //HDMI/DVI 768 INTERFACE HDMI_POLLING_STATUS_t g_HdmiPollingStatus; 769 770 //HDCP 771 INTERFACE HDCP_POLLING_STATUS_t g_HdcpPollingStatus; 772 773 INTERFACE MS_U16 g_AVMUTEMissingCounter; 774 INTERFACE MS_U16 g_AVIMissingCounter; 775 INTERFACE MS_U16 g_ACPMissingCounter; 776 777 #ifdef DVI_NEW_Patch 778 // 20081226 - DVI+HDCP snow noise patch - start ... 779 INTERFACE MS_U16 g_DVI70MhzPollingCounter; 780 INTERFACE MS_U8 g_DVI70MhzUnstableCounter; 781 INTERFACE MS_BOOL g_bDVILess70MHz; 782 // 20081226 - DVI+HDCP snow noise patch - end ... 783 #endif 784 785 786 //HDMI 787 INTERFACE MS_U16 MDrv_HDMI_Func_Caps(void); 788 INTERFACE void MDrv_HDMI_init( void ); 789 INTERFACE void MDrv_HDMI_Exit( void ); 790 INTERFACE void MDrv_HDMI_pkt_reset( HDMI_REST_t breset ); 791 INTERFACE void MDrv_HDMI_pullhpd( MS_BOOL bHighLow, E_MUX_INPUTPORT enInputPortType, MS_BOOL bInverse); 792 INTERFACE MS_U16 MDrv_HDMI_GC_Info(HDMI_GControl_INFO_t gcontrol); 793 INTERFACE MS_HDMI_PACKET_VALUE_t MDrv_HDMI_Packet_Received(MS_BOOL bEnable); 794 INTERFACE MS_HDMI_COLOR_FORMAT MDrv_HDMI_Get_ColorFormat(void); 795 INTERFACE EN_HDMI_COLOR_RANGE MDrv_HDMI_Get_ColorRange(void); 796 INTERFACE MS_HDMI_CONTENT_TYPE MDrv_HDMI_Get_Content_Type(void); 797 INTERFACE MS_HDMI_EXT_COLORIMETRY_FORMAT MDrv_HDMI_Get_ExtColorimetry(void); 798 799 INTERFACE void MDrv_HDMI_Set_EQ(MS_HDMI_EQ enEq, MS_U8 u8EQValue); 800 INTERFACE MS_BOOL MDrv_HDMI_Set_EQ_To_Port(MS_HDMI_EQ enEq, MS_U8 u8EQValue, E_MUX_INPUTPORT enInputPortType); 801 INTERFACE void MDrv_HDMI_Audio_MUTE_Enable(MS_U16 u16MuteEvent, MS_U16 u16MuteMask); 802 INTERFACE void MDrv_HDMI_Audio_Status_Clear(void); 803 804 INTERFACE MS_HDMI_AR_TYPE MDrv_HDMI_Get_AspectRatio(MS_BOOL bEn_PAR, MS_BOOL bEn_AFAR); 805 INTERFACE MS_HDMI_AR_TYPE MDrv_HDMI_Get_ActiveFormat_AspectRatio(MS_BOOL bEn_AFAR); 806 INTERFACE EN_AVI_INFOFRAME_VERSION MDrv_HDMI_Get_AVIInfoFrameVer(void); 807 808 INTERFACE MS_U8 MDrv_HDMI_err_status_update(MS_U8 u8value, MS_BOOL bread); 809 INTERFACE void MDrv_HDMI_Get_PollingStatus(HDMI_POLLING_STATUS_t **pStatus); 810 INTERFACE MS_BOOL MDrv_HDMI_IsHDMI_Mode(void); 811 812 INTERFACE void MDrv_HDMI_Get_MID_info(MS_U8 * pu8ManufactorData); 813 INTERFACE MS_BOOL MDrv_HDMI_get_packet_value(MS_HDMI_PACKET_STATE_t u8state, MS_U8 u8byte_idx, MS_U8 *pValue); 814 815 //DVI 816 INTERFACE MS_U16 MDrv_DVI_ChannelPhaseStatus( MS_DVI_CHANNEL_TYPE u8Channel); 817 INTERFACE void MDrv_DVI_HF_adjust( void ); 818 INTERFACE void MDrv_DVI_SoftwareReset( MS_U16 u16Reset ); 819 INTERFACE void mdrv_dvi_reset(void); 820 INTERFACE void MDrv_DVI_ClkPullLow(MS_BOOL bPullLow, E_MUX_INPUTPORT enInputPortType); 821 INTERFACE void MDrv_DVI_SwitchSrc(E_MUX_INPUTPORT enInputPortType); 822 INTERFACE MS_BOOL MDrv_HDMI_SetForClockLessThan70Mhz( E_MUX_INPUTPORT InputSourceType ); 823 INTERFACE void MDrv_HDMI_dvi_adjust( MS_BOOL bClockLessThan70MHz); 824 INTERFACE void MDrv_HDMI_SetUpdatePhaseLineCount(INPUT_SOURCE_TYPE_t enInputSourceType); 825 INTERFACE MS_U16 MDrv_HDMI_GetTMDSFreq(void); 826 827 828 //HDCP 829 INTERFACE void MDrv_HDCP_Enable(MS_BOOL bEnable); 830 INTERFACE MS_BOOL MDrv_HDMI_SetHdcpEnable(E_MUX_INPUTPORT enInputPortType,MS_BOOL bEnable); 831 INTERFACE void MDrv_HDCP_ClearStatus( void ); 832 INTERFACE void MDrv_HDCP_initproductionkey( MS_U8 * pu8HdcpKeyData ); 833 INTERFACE MS_HDCP_STATUS_INFO_t* MDrv_HDCP_GetStatus(void ); 834 INTERFACE void MDrv_HDCP_Vsync_end_en(MS_BOOL bStable); 835 836 //Audio 837 INTERFACE void MDrv_HDMI_audio_output( MS_BOOL bEnable ); 838 INTERFACE MS_U8 MDrv_HDMI_audio_cp_hdr_info(void); 839 INTERFACE MS_U8 MDrv_HDMI_audio_channel_status(MS_U8 u8byte); 840 841 842 // Debug 843 /** 844 * HDMI Info 845 */ 846 typedef struct __attribute__((packed)) 847 { 848 MS_U8 u8SupportPorts; 849 }MS_HDMI_INFO; 850 851 /** 852 * HDMI Status 853 */ 854 typedef struct __attribute__((packed)) 855 { 856 MS_BOOL bIsInitialized; 857 MS_BOOL bIsRunning; 858 }MS_HDMI_Status; 859 860 INTERFACE HDMI_Ret_Value MDrv_HDMI_GetLibVer(const MSIF_Version **ppVersion); ///< Get version (without Mutex protect) 861 INTERFACE HDMI_Ret_Value MDrv_HDMI_GetInfo(MS_HDMI_INFO *pInfo); 862 INTERFACE HDMI_Ret_Value MDrv_HDMI_GetStatus(MS_HDMI_Status *pStatus); 863 INTERFACE MS_BOOL MDrv_HDMI_Get_AVIInfoActiveInfoPresent(void); 864 865 // DDC Ram 866 INTERFACE void MDrv_HDMI_READ_DDCRAM(XC_DDCRAM_PROG_INFO *pstDDCRam_Info, MS_U32 u32SizeOfInfo); 867 INTERFACE void MDrv_HDMI_PROG_DDCRAM(XC_DDCRAM_PROG_INFO *pstDDCRam_Info, MS_U32 u32SizeOfInfo); 868 INTERFACE MS_U8 MDrv_HDMI_Get_Pixel_Repetition(void); 869 870 //#if defined(CHIP_T8) || defined(CHIP_J2) // HDMI 1.4 new feature 871 INTERFACE void MDrv_HDMI_3D_4Kx2K_Process(void); 872 INTERFACE void MDrv_HDMI_AVG_ScaleringDown(MS_BOOL bTrue); 873 INTERFACE MS_BOOL MDrv_HDMI_Check4K2K(void); 874 INTERFACE E_HDMI_ADDITIONAL_VIDEO_FORMAT MDrv_HDMI_Check_Additional_Format(void); 875 INTERFACE E_XC_3D_INPUT_MODE MDrv_HDMI_Get_3D_Structure(void); 876 INTERFACE E_HDMI_3D_EXT_DATA_T MDrv_HDMI_Get_3D_Ext_Data(void); 877 INTERFACE void MDrv_HDMI_Get_3D_Meta_Field(sHDMI_3D_META_FIELD *pdata); 878 INTERFACE MS_U8 MDrv_HDMI_Get_VIC_Code(void); 879 INTERFACE E_HDMI_VIC_4Kx2K_CODE MDrv_HDMI_Get_4Kx2K_VIC_Code(void); 880 // HDMI ARC pin control 881 INTERFACE void MDrv_HDMI_ARC_PINControl(E_MUX_INPUTPORT enInputPortType, MS_BOOL bEnable, MS_BOOL bDrivingHigh); 882 INTERFACE void MDrv_DVI_Software_Reset(E_MUX_INPUTPORT enInputPortType, MS_U16 u16Reset); 883 INTERFACE MS_BOOL MDrv_HDMI_CheckHDMI20_Setting(E_MUX_INPUTPORT enInputPortType); 884 INTERFACE void MDrv_HDMI_StablePolling(void); 885 INTERFACE MS_U8 MDrv_HDMI_GetSourceVersion(E_MUX_INPUTPORT enInputPortType); 886 INTERFACE void SYMBOL_WEAK MDrv_HDMI_Set5VDetectGPIOSelect(MS_U32 ul5VDetectGPIOIndex); 887 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_HDMI_GetDEStableStatus(E_MUX_INPUTPORT enInputPortType); 888 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_HDMI_CheckHDCP14(void); 889 INTERFACE E_HDMI_HDCP_STATE MDrv_HDMI_CheckHDCPState(E_MUX_INPUTPORT enInputPortType); 890 // HDMI common function. If you want to add new function, you shold modify MDrv_HDMI_Ctrl to support new feature. 891 INTERFACE MS_BOOL SYMBOL_WEAK MDrv_HDMI_Ctrl(MS_U32 u32Cmd, void *pBuf, MS_U32 u32BufSize); 892 INTERFACE MS_U16 MDrv_HDMI_GetDataInfo(E_HDMI_GET_DATA_INFO enInfo); 893 894 //#endif 895 896 // fast boot 897 INTERFACE MS_U32 MDrv_HDMI_SetPowerState(EN_POWER_MODE enPowerState); 898 899 /*************************** HDCP22 ***************************/ 900 INTERFACE void MDrv_HDCP22_FillCipherKey(MS_U8 pucPortIdx, MS_U8 * pucRiv,MS_U8 * pucSessionKey); 901 INTERFACE void MDrv_HDCP22_InitCBFunc(HDCP22_Recv_CBF pCBFunc, void* pContext); 902 INTERFACE void MDrv_HDCP22_PortInit(MS_U8 ucPortIdx); 903 INTERFACE MS_BOOL MDrv_HDCP22_PollingReadDone(MS_U8 ucPortIdx); 904 INTERFACE void MDrv_HDCP22_EnableCipher(MS_U8 ucPortType, MS_U8 ucPortIdx, MS_BOOL bIsEnable); 905 INTERFACE void MDrv_HDCP22_SendMsg(MS_U8 ucPortType, MS_U8 ucPortIdx, MS_U8* pucData, MS_U32 dwDataLen, void* pDummy); 906 INTERFACE void MDrv_HDCP22_Handler(MS_U8 ucPortIdx); 907 /*************************** HDCP22 ***************************/ 908 909 #if 0 910 INTERFACE MS_U8 u8PSDVIStableCount[4]; 911 void MDrv_HDMI_ImmeswitchPS_Handler(void); 912 void MDrv_DVI_ForceAllPortsEnterPS(void); 913 #endif 914 #undef INTERFACE 915 916 917 #ifdef __cplusplus 918 } 919 #endif 920 921 #endif /* MDRV_HDMI_H */ 922 923