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 drvVBI.h 98 /// @brief MStar VBI Driver Interface 99 /// @author MStar Semiconductor Inc. 100 /// @version 1.0 101 /////////////////////////////////////////////////////////////////////////////////////////////////// 102 103 //------------------------------------------------- 104 /*! \defgroup VBI VBI interface 105 \ingroup VBI 106 107 <b> Operation Code Flow: </b> \n 108 \image html vbi1.png 109 \image html vbi2.png 110 111 *! \defgroup VBI_General VBI general functions 112 * \ingroup VBI 113 114 *! \defgroup VBI_Task VBI process functions. 115 * \ingroup VBI 116 117 *! \defgroup VBI_TTX VBI TTX related functions 118 * \ingroup VBI 119 120 *! \defgroup VBI_CC VBI CC related functions 121 * \ingroup VBI 122 123 *! \defgroup VBI_STR VBI STR functions 124 * \ingroup VBI 125 126 *! \defgroup VBI_ToBeModified VBI api to be modified 127 * \ingroup VBI 128 129 *! \defgroup VBI_TTX_ToBeModified VBI TTX api to be modified 130 * \ingroup VBI_ToBeModified 131 132 *! \defgroup VBI_ToBeRemove VBI api to be removed 133 * \ingroup VBI 134 */ 135 //------------------------------------------------- 136 137 #ifndef _DRV_VBI_H 138 #define _DRV_VBI_H 139 140 #include "MsTypes.h" 141 #include "MsDevice.h" 142 143 #include "ULog.h" 144 145 #ifdef __cplusplus 146 extern "C" 147 { 148 #endif 149 150 #define VBI_UTOPIA20 (1) 151 152 //------------------------------------------------------------------------------------------------- 153 // Driver Capability 154 //------------------------------------------------------------------------------------------------- 155 156 157 //------------------------------------------------------------------------------------------------- 158 // Macro and Define 159 //------------------------------------------------------------------------------------------------- 160 #define VBI_TTX_DATA_LENGTH 48 161 162 #define MSIF_VBI_LIB_CODE {'V','B','I','_'} //Lib code 163 #define MSIF_VBI_LIBVER {'0','0'} //LIB version 164 #define MSIF_VBI_BUILDNUM {'0','2' } //Build Number 165 #define MSIF_VBI_CHANGELIST {'0','0','5','6','5','9','8','0'} //P4 ChangeList Number 166 #define VBI_VER /* Character String for DRV/API version */ \ 167 MSIF_TAG, /* 'MSIF' */ \ 168 MSIF_CLASS, /* '00' */ \ 169 MSIF_CUS, /* 0x0000 */ \ 170 MSIF_MOD, /* 0x0000 */ \ 171 MSIF_CHIP, \ 172 MSIF_CPU, \ 173 MSIF_VBI_LIB_CODE, /* IP__ */ \ 174 MSIF_VBI_LIBVER, /* 0.0 ~ Z.Z */ \ 175 MSIF_VBI_BUILDNUM, /* 00 ~ 99 */ \ 176 MSIF_VBI_CHANGELIST, /* CL# */ \ 177 MSIF_OS 178 179 180 //------------------------------------------------------------------------------------------------- 181 // Type and Structure 182 //------------------------------------------------------------------------------------------------- 183 typedef enum 184 { 185 VBI_VIDEO_SECAM, 186 VBI_VIDEO_PAL_NC, 187 VBI_VIDEO_PAL_M, 188 VBI_VIDEO_NTSC, 189 VBI_VIDEO_NTSC443_PAL60, 190 VBI_VIDEO_PAL, 191 VBI_VIDEO_OTHERS 192 } VBI_VIDEO_STANDARD; 193 194 typedef enum 195 { 196 E_VBI_TELETEXT, 197 E_VBI_CC 198 } VBI_INIT_TYPE; 199 200 typedef struct 201 { 202 MS_U8 u8NoInfo; 203 } VBI_DrvInfo; 204 205 typedef struct 206 { 207 VBI_INIT_TYPE eInitType; 208 } VBI_DrvStatus; 209 210 typedef struct 211 { 212 MS_BOOL _bSuspend; 213 VBI_INIT_TYPE eInitType; 214 MS_VIRT _ptrVBIRiuBaseAddr; 215 216 // TTX buffer address & buffer size 217 MS_PHY _TTXBufAddr; 218 MS_U16 _TTXBufLen; 219 220 // CC buffer address & buffer size 221 MS_PHY _CCBufAddr; 222 MS_U16 _CCBufLen; 223 224 // callback info 225 MS_PHY _cbBufferAddr; 226 MS_U32 _cbBufferLength; 227 MS_U8 *_pCbVABuff; 228 229 MS_BOOL _bTTXSupported; 230 MS_BOOL _bVBIInit; 231 MS_U16 _u16VBIDbgSwitch; 232 } VBI_StoreInfo; 233 234 /* 235 * ClosedCaption 236 */ 237 typedef enum 238 { 239 VBI_CC_PACKET_COUNT, 240 VBI_CC_BYTE_FOUND_INDICATION, 241 VBI_CC_DATA_GET 242 243 } EN_VBI_INFO; 244 245 /* Error code */ 246 typedef enum 247 { 248 VBI_ERRORCODE_SUCCESS = 0x0000, 249 VBI_ERRORCODE_FAIL = 0x0001 250 251 } EN_VBI_ERRORCODE; 252 253 typedef enum 254 { 255 EN_TTX_DMA_HEADER, 256 EN_TTX_DMA_PACKET1_TO_25, 257 EN_TTX_DMA_PACKET26_28_29, 258 EN_TTX_DMA_PACKET27, 259 EN_TTX_DMA_BTT, 260 EN_TTX_DMA_AIT, 261 } EN_TTX_DMA_TYPE; 262 263 typedef enum 264 { 265 VBI_INIT, 266 VBI_EXIT, 267 VBI_SUSPEND, 268 VBI_RESUME, 269 } EN_VBI_CMD; 270 271 typedef MS_U32(*VBI_CB_FN)(MS_U8 *pVBILine, MS_U32 length); 272 //------------------------------------------------------------------------------------------------- 273 // Function and Variable 274 //------------------------------------------------------------------------------------------------- 275 276 // must have functions 277 //------------------------------------------------------------------------------------------------- 278 /// Get VBI lib version. 279 /// @ingroup VBI_General 280 /// @param pFN \b OUT: return vbi lib version. 281 /// @return TRUE : Succeed 282 /// @return FALSE : Fail 283 //------------------------------------------------------------------------------------------------- 284 // MS_BOOL MDrv_VBI_GetLibVer(const MSIF_Version **ppVersion); ///< Get version (without Mutex protect) 285 //------------------------------------------------------------------------------------------------- 286 /// Get VBI module info. 287 /// @ingroup VBI_General 288 /// @return VBI_DrvInfo 289 //------------------------------------------------------------------------------------------------- 290 // const VBI_DrvInfo * MDrv_VBI_GetInfo(void); ///< Get info from driver (without Mutex protect) 291 //------------------------------------------------------------------------------------------------- 292 /// Get VBI Driver Status. 293 /// @ingroup VBI_General 294 /// @param pDrvStatus \b OUT: driver status. 295 /// @return TRUE : Succeed 296 /// @return FALSE : Fail 297 //------------------------------------------------------------------------------------------------- 298 MS_BOOL MDrv_VBI_GetStatus(VBI_DrvStatus *pDrvStatus); ///< Get VBI current status 299 //------------------------------------------------------------------------------------------------- 300 /// Set VBI Debug Level. 301 /// @ingroup VBI_General 302 /// @param u16DbgSwitch \b IN: debug level. 303 /// @return TRUE : Succeed 304 /// @return FALSE : Fail 305 //------------------------------------------------------------------------------------------------- 306 // MS_BOOL MDrv_VBI_SetDbgLevel(MS_U16 u16DbgSwitch); ///< Set debug level (without Mutex protect) 307 308 //----------------- 309 // VBI_General 310 //----------------- 311 //------------------------------------------------------------------------------------------------- 312 /// Initialize VBI module 313 /// @ingroup VBI_General 314 /// @param type \b IN: VBI type (Teletext/CC) 315 /// @return TRUE : Succeed 316 /// @return FALSE : Fail 317 //------------------------------------------------------------------------------------------------- 318 MS_BOOL MDrv_VBI_Init(VBI_INIT_TYPE type); 319 //------------------------------------------------------------------------------------------------- 320 /// Finalize VBI module 321 /// @ingroup VBI_General 322 /// @return TRUE : Succeed 323 /// @return FALSE : Fail 324 //------------------------------------------------------------------------------------------------- 325 // MS_BOOL MDrv_VBI_Exit(void); 326 327 //------------------------------------------------------------------------------------------------- 328 /// Set Callback to VBI driver, the CB will be called if VBI interrupt is catched 329 /// @ingroup VBI_Task 330 /// @param pFN \b IN: call back function pointer. 331 /// @param bufferAddr \b IN: the physical address of buffer which will store VBI data and pass pointer to CB 332 /// @param length \b IN: the data lebgth of th input buffer. Note: it should be the multiple of VBI_TTX_DATA_LENGTH 333 /// @return None 334 //------------------------------------------------------------------------------------------------- 335 // void MDrv_VBI_RegisterCB(VBI_CB_FN pFN, MS_PHY bufferAddr, MS_U32 length); 336 337 //------------------------------------------------------------------------------------------------- 338 /// Reset TTX Ring Buffer 339 /// @ingroup VBI_Task 340 /// @return None 341 //------------------------------------------------------------------------------------------------- 342 void MDrv_VBI_RingBuffer_Reset(void); 343 344 //------------------------------------------------------------------------------------------------- 345 /// Initialize TTX Slicer. 346 /// @ingroup VBI_TTX 347 /// @param bufferAddr \b IN: TTX buffer address. 348 /// @param packetCount \b IN: TTX packet count. 349 /// @return None 350 //------------------------------------------------------------------------------------------------- 351 void MDrv_VBI_InitializeTTXSlicer(MS_PHY bufferAddr, MS_U16 packetCount); 352 353 //------------------------------------------------------------------------------------------------- 354 /// Enable TTX Slicer. 355 /// @ingroup VBI_TTX 356 /// @param bEnable \b IN: enable or disable TTX slicer. 357 /// @return None 358 //------------------------------------------------------------------------------------------------- 359 void MDrv_VBI_EnableTTXSlicer(MS_BOOL bEnable); 360 361 //------------------------------------------------------------------------------------------------- 362 /// VPS Is Ready or Not. (Refine function name: MDrv_VBI_TTX_IsVPS_Ready) 363 /// @ingroup VBI_TTX_ToBeModified 364 /// @return TRUE : VPS is ready. 365 /// @return FALSE : VPS is not ready. 366 //------------------------------------------------------------------------------------------------- 367 MS_BOOL MDrv_VBI_IsVPS_Ready(void); 368 369 //------------------------------------------------------------------------------------------------- 370 /// TTX Is Ready or Not. 371 /// @ingroup VBI_TTX 372 /// @return TRUE : TTX is ready. 373 /// @return FALSE : TTX is not ready. 374 //------------------------------------------------------------------------------------------------- 375 MS_BOOL MDrv_VBI_IsTTX_Ready(void); 376 377 //------------------------------------------------------------------------------------------------- 378 /// WSS Is Ready or Not. (Refine function name: MDrv_VBI_TTX_IsWSS_Ready) 379 /// @ingroup VBI_TTX_ToBeModified 380 /// @return TRUE : WSS is ready. 381 /// @return FALSE : WSS is not ready. 382 //------------------------------------------------------------------------------------------------- 383 MS_BOOL MDrv_VBI_IsWSS_Ready(void); 384 385 //------------------------------------------------------------------------------------------------- 386 /// Get WSS Data. (Refine function name: MDrv_VBI_TTX_GetWSS_Data) 387 /// @ingroup VBI_TTX_ToBeModified 388 /// @return : WSS data 389 //------------------------------------------------------------------------------------------------- 390 MS_U16 MDrv_VBI_GetWSS_Data(void); 391 392 //------------------------------------------------------------------------------------------------- 393 /// Get VPS Data. (Refine function name: MDrv_VBI_TTX_GetVPS_Data) 394 /// @ingroup VBI_TTX_ToBeModified 395 /// @param lowerWord \b OUT: VPS lower data. 396 /// @param higherWord \b OUT: VPS higher data. 397 /// @return None 398 //------------------------------------------------------------------------------------------------- 399 void MDrv_VBI_GetVPS_Data(MS_U8 *lowerWord, MS_U8 *higherWord); 400 401 //------------------------------------------------------------------------------------------------- 402 /// Set Video Standard. (Refine function name: MDrv_VBI_TTX_SetVideoStandard) 403 /// @ingroup VBI_TTX_ToBeModified 404 /// @param lowerWord \b IN: type (NTSC/PAL/SECAM). See VBI_VIDEO_STANDARD. 405 /// @return None 406 //------------------------------------------------------------------------------------------------- 407 void MDrv_VBI_SetVideoStandard(VBI_VIDEO_STANDARD eStandard); 408 409 //------------------------------------------------------------------------------------------------- 410 /// Check TTX circuit ready. 411 /// @ingroup VBI_TTX 412 /// @return TRUE : TTX circuit is ready. 413 /// @return FALSE : TTX circuit is not ready. 414 //------------------------------------------------------------------------------------------------- 415 // MS_BOOL MDrv_VBI_TTX_CheckCircuitReady(void); 416 417 //------------------------------------------------------------------------------------------------- 418 /// Get TTX Packet Count. 419 /// @ingroup VBI_TTX 420 /// @return : TTX packet count 421 //------------------------------------------------------------------------------------------------- 422 // MS_U16 MDrv_VBI_TTX_GetPacketCount(void); 423 424 //------------------------------------------------------------------------------------------------- 425 /// Check if the TTX packet in VBI buffer is empty. 426 /// @ingroup VBI_TTX 427 /// @return TRUE : TTX buffer is empty. 428 /// @return FALSE : TTX buffer is not empty. 429 //------------------------------------------------------------------------------------------------- 430 MS_BOOL MDrv_VBI_TTX_PacketBufferIsEmpty(void); 431 432 // Get all of the packets in the VBI buffer (if the input buffer is big enough) 433 //------------------------------------------------------------------------------------------------- 434 /// Get TTX Packets. (Get all of the packets in the VBI buffer (if the input buffer is big enough)) 435 /// @ingroup VBI_TTX 436 /// @param dataAddr \b IN: Data address. 437 /// @param length \b OUT: Packet length. 438 /// @return TRUE : Succeed 439 /// @return FALSE : Fail 440 //------------------------------------------------------------------------------------------------- 441 // MS_BOOL MDrv_VBI_TTX_GetPackets(MS_PHY dataAddr, MS_U32 *length); 442 443 // Get 1 of the packets in the VBI buffer 444 //------------------------------------------------------------------------------------------------- 445 /// Get TTX Packets. (Get 1 of the packets in the VBI buffer) 446 /// @ingroup VBI_TTX 447 /// @param packetAddress \b OUT: Packet address 448 /// @return TRUE : Get TTX packet successfully. 449 /// @return FALSE : Get TTX packet unsuccessfully. 450 //------------------------------------------------------------------------------------------------- 451 MS_BOOL MDrv_VBI_TTX_GetPacket(MS_PHY *packetAddress); 452 453 //------------------------------------------------------------------------------------------------- 454 /// Check if there is a packet buffer overflow. If there is an overflow, 455 /// the the packet buffer should be cleared from the reading task. 456 /// @ingroup VBI_TTX 457 /// @return TRUE : TTX buffer is overflow. 458 /// @return FALSE : Otherwise. 459 //------------------------------------------------------------------------------------------------- 460 MS_BOOL MDrv_VBI_TTX_PacketBufferIsOverflow( void ); 461 462 //------------------------------------------------------------------------------------------------- 463 /// Resuren the nomber of packet buffer overflows since the last reset or creation. 464 /// @ingroup VBI_TTX 465 /// @return : The number of packet buffer overflows. 466 //------------------------------------------------------------------------------------------------- 467 MS_U16 MDrv_VBI_TTX_PacketBufferGetNoOfOverflows( void ); 468 469 //------------------------------------------------------------------------------------------------- 470 /// Set TTX Enable Line 471 /// @ingroup VBI_TTX 472 /// @param StartLine \b IN: TTX start line 473 /// @param EndLine \b IN: TTX end line 474 /// @return None 475 //------------------------------------------------------------------------------------------------- 476 void MDrv_VBI_TTX_EnableLine(MS_U16 StartLine, MS_U16 EndLine); 477 478 479 //------------------------------------------------------------------------------------------------- 480 /// Restrict vbi memory buffer range. 481 /// @ingroup VBI_Task 482 /// @param bEnable \b IN: set enable protect. 483 /// @param phyAddr \b IN: start address of the range. 484 /// @param u32Size \b IN: size of the range. 485 /// @return TRUE : Succeed 486 /// @return FALSE : Fail 487 //------------------------------------------------------------------------------------------------- 488 // MS_BOOL MDrv_VBI_ProtectMemory(MS_BOOL bEnable, MS_PHY phyAddr, MS_U32 u32Size); 489 490 /* 491 * ClosedCaption 492 */ 493 //------------------------------------------------------------------------------------------------- 494 /// Initialize CC Slicer. 495 /// @ingroup VBI_CC 496 /// @param u32RiuAddr \b IN: VBI CC RIU address. 497 /// @param bufferAddr \b IN: VBI CC buffer address. 498 /// @param packetCount \b IN: VBI CC packet count. 499 /// @return None 500 //------------------------------------------------------------------------------------------------- 501 void MDrv_VBI_CC_InitSlicer(MS_VIRT u32RiuAddr, MS_PHY bufferAddr, MS_U16 packetCount); 502 //------------------------------------------------------------------------------------------------- 503 /// Initialize CC CVBS number. 504 /// @ingroup VBI_CC 505 /// @param cvbs_no \b IN: CVBS number. 506 /// @return None 507 //------------------------------------------------------------------------------------------------- 508 void MDrv_VBI_CC_InitYPbYr(MS_U8 cvbs_no); 509 //------------------------------------------------------------------------------------------------- 510 /// Enable CC Slicer. 511 /// @ingroup VBI_CC 512 /// @param bEnable \b IN: enable or disable CC slicer. 513 /// @return None 514 //------------------------------------------------------------------------------------------------- 515 void MDrv_VBI_CC_EnableSlicer(MS_BOOL bEnable); 516 //------------------------------------------------------------------------------------------------- 517 /// Set CC Data Rate. 518 /// @ingroup VBI_CC 519 /// @param ptable \b OUT: data rate table. 520 /// @return : Data rate or 0 when failed 521 //------------------------------------------------------------------------------------------------- 522 MS_U8 MDrv_VBI_CC_SetDataRate(MS_U8 *ptable); 523 //------------------------------------------------------------------------------------------------- 524 /// Set CC Frame Count. 525 /// @ingroup VBI_CC 526 /// @param cnt \b IN: frame count. 527 /// @return None 528 //------------------------------------------------------------------------------------------------- 529 void MDrv_VBI_CC_SetFrameCnt(MS_U8 cnt); 530 //------------------------------------------------------------------------------------------------- 531 /// Get CC Information. 532 /// @ingroup VBI_CC 533 /// @param selector \b IN: CC function select. 534 /// @return : packet count or indication 535 //------------------------------------------------------------------------------------------------- 536 MS_U32 MDrv_VBI_CC_GetInfo(MS_U32 selector); 537 //------------------------------------------------------------------------------------------------- 538 /// Enable CC Line. 539 /// @ingroup VBI_CC 540 /// @param StartLine \b IN: start line. 541 /// @param EndLine \b IN: end line. 542 /// @param mode \b IN: NTSC/PAL/SECAM mode. 543 /// @return None 544 //------------------------------------------------------------------------------------------------- 545 void MDrv_VBI_CC_EnableLine(MS_U16 StartLine, MS_U16 EndLine, MS_U8 mode); 546 //------------------------------------------------------------------------------------------------- 547 /// Fresh memory to avoid cache coherence issue. (Use MsOS function) 548 /// @ingroup VBI_ToBeRemove 549 /// @param u32Start \b IN: start address (must be 16-B aligned and in cacheable area). 550 /// @param u32Size \b IN: size (must be 16-B aligned). 551 /// @return TRUE : Succeed 552 /// @return FALSE : Fail due to invalide parameter 553 //------------------------------------------------------------------------------------------------- 554 // MS_BOOL MDrv_VBI_SyncMemory( MS_U32 u32Start, MS_U32 u32Size ); 555 //------------------------------------------------------------------------------------------------- 556 /// Set CC SC window length. 557 /// @ingroup VBI_CC 558 /// @param u8Len \b IN: windows length. 559 /// @return TRUE : Succeed 560 /// @return FALSE : Fail 561 //------------------------------------------------------------------------------------------------- 562 // MS_BOOL MDrv_VBI_CC_SetSCWindowLen(MS_U8 u8Len); 563 //------------------------------------------------------------------------------------------------- 564 /// Set CC standard. 565 /// @ingroup VBI_CC 566 /// @param eStandard \b IN: video standard. 567 /// @return TRUE : Succeed 568 /// @return FALSE : Fail 569 //------------------------------------------------------------------------------------------------- 570 MS_BOOL MDrv_VBI_CC_SetVideoStandard(VBI_VIDEO_STANDARD eStandard); 571 572 /* 573 * Others 574 */ 575 //------------------------------------------------------------------------------------------------- 576 /// Set WSS/VPS Byte Number. (Refine function name: MDrv_VBI_TTX_WSS_SetVpsByteNum) 577 /// @ingroup VBI_TTX_ToBeModified 578 /// @param cnt \b IN: byte number. 579 /// @return None 580 //------------------------------------------------------------------------------------------------- 581 void MDrv_VBI_WSS_SetVpsByteNum(MS_U8 cnt); 582 583 //------------------------------------------------------------------------------------------------- 584 /// Save VBI driver states to DRAM. 585 /// @ingroup VBI_STR 586 /// @return TRUE : Succeed 587 /// @return FALSE : Fail 588 //------------------------------------------------------------------------------------------------- 589 // MS_BOOL MDrv_VBI_Suspend(void); 590 //------------------------------------------------------------------------------------------------- 591 /// Restore VBI driver states from DRAM 592 /// @ingroup VBI_STR 593 /// @return TRUE : Succeed 594 /// @return FALSE : Fail 595 //------------------------------------------------------------------------------------------------- 596 // MS_BOOL MDrv_VBI_Resume(void); 597 //------------------------------------------------------------------------------------------------- 598 /// Control VBI STR functions. 599 /// @ingroup VBI_STR 600 /// @param u16PowerState \b IN: STR power mode. (to control STR suspend & resume case.) 601 /// @return : Utopia status - UTOPIA_STATUS_SUCCESS (Succeed) or UTOPIA_STATUS_FAIL (Fail) 602 //------------------------------------------------------------------------------------------------- 603 MS_U32 MDrv_VBI_SetPowerState(EN_POWER_MODE u16PowerState); 604 605 #ifdef __cplusplus 606 } 607 #endif 608 609 #endif 610 611