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 78 #ifndef _XC_HDMI_IF_H_ 79 #define _XC_HDMI_IF_H_ 80 81 #ifdef __cplusplus 82 extern "C" 83 { 84 #endif 85 86 87 typedef struct 88 { 89 MS_U16 u16ReturnValue; 90 } stHDMI_FUNC_CAPS, *pstHDMI_FUNC_CAPS; 91 92 typedef struct 93 { 94 HDMI_REST_t breset; 95 } stHDMI_PKT_RESET, *pstHDMI_PKT_RESET; 96 97 typedef struct 98 { 99 MS_BOOL bHighLow; 100 E_MUX_INPUTPORT enInputPortType; 101 MS_BOOL bInverse; 102 } stHDMI_PULLHPD, *pstHDMI_PULLHPD; 103 104 typedef struct 105 { 106 HDMI_GControl_INFO_t gcontrol; 107 MS_U16 u16ReturnValue; 108 } stHDMI_GC_INFO, *pstHDMI_GC_INFO; 109 110 typedef struct 111 { 112 MS_BOOL bEnable; 113 MS_HDMI_PACKET_VALUE_t stReturnValue; 114 } stHDMI_PACKET_RECEIVED, *pstHDMI_PACKET_RECEIVED; 115 116 typedef struct 117 { 118 MS_HDMI_COLOR_FORMAT eReturnValue; 119 } stHDMI_GET_COLORFORMAT, *pstHDMI_GET_COLORFORMAT; 120 121 typedef struct 122 { 123 EN_HDMI_COLOR_RANGE eReturnValue; 124 } stHDMI_GET_COLORRANGE, *pstHDMI_GET_COLORRANGE; 125 126 typedef struct 127 { 128 MS_HDMI_EQ enEq; 129 MS_U8 u8EQValue; 130 } stHDMI_SET_EQ, *pstHDMI_SET_EQ; 131 132 typedef struct 133 { 134 MS_HDMI_EQ enEq; 135 MS_U8 u8EQValue; 136 E_MUX_INPUTPORT enInputPortType; 137 MS_BOOL bReturnValue; 138 } stHDMI_SET_EQ_TO_PORT, *pstHDMI_SET_EQ_TO_PORT; 139 140 typedef struct 141 { 142 MS_U16 u16MuteEvent; 143 MS_U16 u16MuteMask; 144 } stHDMI_AUDIO_MUTE_ENABLE, *pstHDMI_AUDIO_MUTE_ENABLE; 145 146 typedef struct 147 { 148 MS_BOOL bEn_PAR; 149 MS_BOOL bEn_AFAR; 150 MS_HDMI_AR_TYPE eReturnValue; 151 } stHDMI_GET_ASPECTRATIO, *pstHDMI_GET_ASPECTRATIO; 152 153 typedef struct 154 { 155 MS_BOOL bEn_AFAR; 156 MS_HDMI_AR_TYPE eReturnValue; 157 } stHDMI_GET_ACTIVEFORMAT_ASPECTRATIO, *pstHDMI_GET_ACTIVEFORMAT_ASPECTRATIO; 158 159 typedef struct 160 { 161 EN_AVI_INFOFRAME_VERSION eReturnValue; 162 } stHDMI_GET_AVIINFOFRAMEVER, *pstHDMI_GET_AVIINFOFRAMEVER; 163 164 typedef struct 165 { 166 MS_U8 u8value; 167 MS_BOOL bread; 168 MS_U8 u8ReturnValue; 169 } stHDMI_ERR_STATUS_UPDATE, *pstHDMI_ERR_STATUS_UPDATE; 170 171 typedef struct 172 { 173 MS_U16 u8ReturnValue; 174 } stHDMI_GET_TMDS_FREQ, *pstHDMI_GET_TMDS_FREQ; 175 176 typedef struct 177 { 178 HDMI_POLLING_STATUS_t **pStatus; 179 } stHDMI_GET_POLLINGSTATUS, *pstHDMI_GET_POLLINGSTATUS; 180 181 typedef struct 182 { 183 MS_BOOL bReturnValue; 184 } stHDMI_ISHDMI_MODE, *pstHDMI_ISHDMI_MODE; 185 186 typedef struct 187 { 188 MS_U8 * pu8ManufactorData; 189 } stHDMI_GET_MID_INFO, *pstHDMI_GET_MID_INFO; 190 191 typedef struct 192 { 193 MS_HDMI_PACKET_STATE_t u8state; 194 MS_U8 u8byte_idx; 195 MS_U8 *pValue; 196 MS_BOOL bReturnValue; 197 } stHDMI_GET_PACKET_VALUE, *pstHDMI_GET_PACKET_VALUE; 198 199 typedef struct 200 { 201 MS_DVI_CHANNEL_TYPE u8Channel; 202 MS_U16 u16ReturnValue; 203 } stDVI_CHANNELPHASESTATUS, *pstDVI_CHANNELPHASESTATUS; 204 205 typedef struct 206 { 207 MS_U16 u16Reset; 208 } stDVI_SOFTWARERESET, *pstDVI_SOFTWARERESET; 209 210 typedef struct 211 { 212 MS_BOOL bReturnValue; 213 } stHDMI_GET_AVIIINFO_ACTIVEINFOPRESENT, *pstHDMI_GET_AVIIINFO_ACTIVEINFOPRESENT; 214 215 typedef struct 216 { 217 MS_BOOL bPullLow; 218 E_MUX_INPUTPORT enInputPortType; 219 } stDVI_CLKPULLLOW, *pstDVI_CLKPULLLOW; 220 221 typedef struct 222 { 223 E_MUX_INPUTPORT enInputPortType; 224 } stDVI_SWITCHSRC, *pstDVI_SWITCHSRC; 225 226 typedef struct 227 { 228 E_MUX_INPUTPORT enInputPortType; 229 MS_BOOL bReturnValue; 230 } stHDMI_SETFORCLOCKLESSTHAN70MHZ, *pstHDMI_SETFORCLOCKLESSTHAN70MHZ; 231 232 typedef struct 233 { 234 MS_BOOL bClockLessThan70MHz; 235 } stHDMI_DVI_ADJUST, *pstHDMI_DVI_ADJUST; 236 237 typedef struct 238 { 239 INPUT_SOURCE_TYPE_t enInputSourceType; 240 } stHDMI_SETUPDATEPHASELINECOUNT, *pstHDMI_SETUPDATEPHASELINECOUNT; 241 242 typedef struct 243 { 244 MS_BOOL bEnable; 245 } stHDCP_ENABLE, *pstHDCP_ENABLE; 246 247 typedef struct 248 { 249 E_MUX_INPUTPORT enInputPortType; 250 MS_BOOL bEnable; 251 MS_BOOL bReturnValue; 252 } stHDMI_SET_HDCPENABLE, *pstHDMI_SET_HDCPENABLE; 253 254 typedef struct 255 { 256 MS_U8 * pu8HdcpKeyData; 257 } stHDCP_INITPRODUCTIONKEY, *pstHDCP_INITPRODUCTIONKEY; 258 259 typedef struct 260 { 261 MS_HDCP_STATUS_INFO_t* stReturnValue; 262 } stHDCP_GETSTATUS, *pstHDCP_GETSTATUS; 263 264 typedef struct 265 { 266 MS_BOOL bStable; 267 } stHDCP_VSYNC_END_EN, *pstHDCP_VSYNC_END_EN; 268 269 typedef struct 270 { 271 MS_BOOL bEnable; 272 } stHDMI_AUDIO_OUTPUT, *pstHDMI_AUDIO_OUTPUT; 273 274 typedef struct 275 { 276 MS_U8 u8ReturnValue; 277 } stHDMI_AUDIO_CP_HDR_INFO, *pstHDMI_AUDIO_CP_HDR_INFO; 278 279 typedef struct 280 { 281 MS_U8 u8byte; 282 MS_U8 u8ReturnValue; 283 } stHDMI_AUDIO_CHANNEL_STATUS, *pstHDMI_AUDIO_CHANNEL_STATUS; 284 285 typedef struct 286 { 287 const MSIF_Version **ppVersion; 288 HDMI_Ret_Value eReturnValue; 289 } stHDMI_GETLIBVER, *pstHDMI_GETLIBVER; 290 291 typedef struct 292 { 293 MS_HDMI_INFO *pInfo; 294 HDMI_Ret_Value eReturnValue; 295 } stHDMI_GETINFO, *pstHDMI_GETINFO; 296 297 typedef struct 298 { 299 MS_HDMI_Status *pStatus; 300 HDMI_Ret_Value eReturnValue; 301 } stHDMI_GETSTATUS, *pstHDMI_GETSTATUS; 302 303 typedef struct 304 { 305 XC_DDCRAM_PROG_INFO *pstDDCRam_Info; 306 MS_U32 u32SizeOfInfo; 307 } stHDMI_READ_DDCRAM, *pstHDMI_READ_DDCRAM; 308 309 typedef struct 310 { 311 XC_DDCRAM_PROG_INFO *pstDDCRam_Info; 312 MS_U32 u32SizeOfInfo; 313 } stHDMI_PROG_DDCRAM, *pstHDMI_PROG_DDCRAM; 314 315 typedef struct 316 { 317 MS_HDMI_CONTENT_TYPE enReturnValue; 318 } stHDMI_GET_CONTENT_TYPE, *pstHDMI_GET_CONTENT_TYPE; 319 320 typedef struct 321 { 322 MS_HDMI_EXT_COLORIMETRY_FORMAT enReturnValue; 323 } stHDMI_GET_EXT_COLORIMETRY, *pstHDMI_GET_EXT_COLORIMETRY; 324 325 typedef struct 326 { 327 MS_U8 u8ReturnValue; 328 } stHDMI_GET_PIXEL_REPETITION, *pstHDMI_GET_PIXEL_REPETITION; 329 330 typedef struct 331 { 332 MS_BOOL bReturnValue; 333 } stHDMI_CHECK_4K2K, *pstHDMI_CHECK_4K2K; 334 335 typedef struct 336 { 337 MS_BOOL bTrue; 338 } stHDMI_AVG_SCALERINGDOWN, *pstHDMI_AVG_SCALERINGDOWN; 339 340 typedef struct 341 { 342 E_HDMI_ADDITIONAL_VIDEO_FORMAT eReturnValue; 343 } stHDMI_CHECK_ADDITIONAL_FORMAT, *pstHDMI_CHECK_ADDITIONAL_FORMAT; 344 345 typedef struct 346 { 347 E_XC_3D_INPUT_MODE eReturnValue; 348 } stHDMI_GET_3D_STRUCTURE, *pstHDMI_GET_3D_STRUCTURE; 349 350 typedef struct 351 { 352 E_HDMI_3D_EXT_DATA_T eReturnValue; 353 } stHDMI_GET_3D_EXT_DATA, *pstHDMI_GET_3D_EXT_DATA; 354 355 typedef struct 356 { 357 sHDMI_3D_META_FIELD *pdata; 358 } stHDMI_GET_3D_META_FIELD, *pstHDMI_GET_3D_META_FIELD; 359 360 typedef struct 361 { 362 MS_U8 u8ReturnValue; 363 } stHDMI_GET_VIC_CODE, *pstHDMI_GET_VIC_CODE; 364 365 typedef struct 366 { 367 E_HDMI_VIC_4Kx2K_CODE eReturnValue; 368 } stHDMI_GET_4KX2K_VIC_CODE, *pstHDMI_GET_4KX2K_VIC_CODE; 369 370 typedef struct 371 { 372 E_MUX_INPUTPORT enInputPortType; 373 MS_BOOL bEnable; 374 MS_BOOL bDrivingHigh; 375 } stHDMI_ARC_PINCONTROL, *pstHDMI_ARC_PINCONTROL; 376 377 typedef struct 378 { 379 E_MUX_INPUTPORT enInputPortType; 380 MS_U16 u16Reset; 381 } stDVI_SOFTWARE_RESET, *pstDVI_SOFTWARE_RESET; 382 383 typedef struct 384 { 385 EN_POWER_MODE enPowerState; 386 MS_U32 u32ReturnValue; 387 } stHDMI_SET_POWERSTATE, *pstHDMI_SET_POWERSTATE; 388 389 typedef struct 390 { 391 E_MUX_INPUTPORT enInputPortType; 392 MS_BOOL bReturnValue; 393 } stHDMI_CheckHDMI20_Setting, *pstHDMI_CheckHDMI20_Setting; 394 395 typedef struct 396 { 397 E_MUX_INPUTPORT enInputPortType; 398 MS_U8 ucSourceVersion; 399 } stHDMI_Get_Source_Version, *pstHDMI_Get_Source_Version; 400 401 typedef struct 402 { 403 MS_U32 ul5VDetectGPIOSelect; 404 } stHDMI_Set5VDetectGPIOSelect, *pstHDMI_Set5VDetectGPIOSelect; 405 406 typedef struct 407 { 408 E_MUX_INPUTPORT enInputPortType; 409 MS_BOOL bStatus; 410 } stHDMI_Get_De_Stable_Status, *pstHDMI_Get_De_Stable_Status; 411 412 typedef struct 413 { 414 MS_BOOL ucHDCP14_flag; 415 } stHDMI_Check_HDCP14, *pstHDMI_Check_HDCP14; 416 417 /*************************** HDCP22 ***************************/ 418 typedef struct 419 { 420 MS_U8 ucPortIdx; 421 MS_U8* pucRiv; 422 MS_U8* pucSessionKey; 423 } stHDCP22_FillCipherKey, *pstHDCP22_FillCipherKey; 424 425 typedef struct 426 { 427 HDCP22_Recv_CBF pCBFunc; 428 void* pContext; 429 } stHDCP22_InitCBFunc, *pstHDCP22_InitCBFunc; 430 431 typedef struct 432 { 433 MS_U8 ucPortIdx; 434 } stHDCP22_PortInit, *pstHDCP22_PortInit; 435 436 typedef struct 437 { 438 MS_U8 ucPortIdx; 439 MS_BOOL bReturnValue; 440 } stHDCP22_PollingReadDone, *pstHDCP22_PollingReadDone; 441 442 typedef struct 443 { 444 MS_U8 ucPortType; 445 MS_U8 ucPortIdx; 446 MS_BOOL bIsEnable; 447 } stHDCP22_EnableCipher, *pstHDCP22_EnableCipher; 448 449 typedef struct 450 { 451 MS_U8 ucPortType; 452 MS_U8 ucPortIdx; 453 MS_U8* pucData; 454 MS_U32 dwDataLen; 455 void* pDummy; 456 } stHDCP22_SendMsg, *pstHDCP22_SendMsg; 457 458 typedef struct 459 { 460 MS_U8 ucPortIdx; 461 } stHDCP22_Handler, *pstHDCP22_Handler; 462 463 typedef struct 464 { 465 MS_U32 u32Cmd; 466 void *pBuf; 467 MS_U32 u32BufSize; 468 MS_BOOL bRet; 469 } stHDMI_Ctrl, *pstHDMI_Ctrl; 470 471 /*************************** HDCP22 ***************************/ 472 473 #ifdef __cplusplus 474 } 475 #endif 476 477 #endif //_XC_HDMI_IF_H_ 478