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") 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 apiDMX.h 98 /// @brief Demux API 99 /// @author MStar Semiconductor,Inc. 100 //////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 //------------------------------------------------- 103 /*! \defgroup DMX DMX interface 104 105 TSP (Transport Stream Processor) receives transport stream through serial or parallel interface. 106 The input stream can be filtered by PID and masked pattern to get individual section data streams that are qualified with CRC and stored into the ring buffers located in external memory. 107 Besides section filter, audio PES FIFO and video PES FIFO are used to pass the selected Audio/Video PES packet to audio/video decoder. 108 PVR function is also supported. 109 110 In order to parse section data in TS stream, TSP equipment a 32-bit RISC processor, besides, The PID filter, header compare, CRC, DMA and PVR are implemented with dedicated hardware. 111 112 <b> Ownership of Filters </b> \n 113 Not only one processor will use Demux driver at the same time, all the filters can be grouped into different processor by API MApi_DMX_SetOwner. 114 \image html apiDMX_pic1.png 115 116 <b> Filter Life Cycle </b> \n 117 \image html apiDMX_pic2.png 118 119 <b> API call flow for initiation: </b> \n 120 \image html apiDMX_pic3.png 121 122 <b> API call flow for exit: </b> \n 123 \image html apiDMX_pic4.png 124 125 <b> API call flow for general usage - Live in playback: </b> \n 126 \image html apiDMX_pic5.png 127 128 <b> API call flow for general usage - File in playback: </b> \n 129 \image html apiDMX_pic6.png 130 131 <b> API call flow for general usage - PVR/PVRCA: </b> \n 132 \image html apiDMX_pic7.png 133 134 <b> API call flow for general usage - MMFI Audio/MMFI Video3D: </b> \n 135 \image html apiDMX_pic8.png 136 137 *! \defgroup TSP TSP related functions 138 * \ingroup DMX 139 140 *! \defgroup TSP_General TSP General functions 141 * \ingroup TSP 142 143 *! \defgroup TSP_Flow TSP Flow control functions 144 * \ingroup TSP 145 146 *! \defgroup TSP_STC TSP STC/PCR functions 147 * \ingroup TSP 148 149 *! \defgroup TSP_Filter TSP Basic filter control functions 150 * \ingroup TSP 151 152 *! \defgroup TSP_SecFilter TSP Section filter control functions 153 * \ingroup TSP 154 155 *! \defgroup TSP_TTX TSP Teltext related functions 156 * \ingroup TSP 157 158 *! \defgroup TSP_FIFO TSP AVFIFO functions 159 * \ingroup TSP 160 161 *! \defgroup TSP_PVR TSP PVR (record) related functions 162 * \ingroup TSP 163 164 *! \defgroup TSP_PVR_General TSP PVR general functions 165 * \ingroup TSP_PVR 166 167 *! \defgroup TSP_PVR_CA TSP PVR CA functions (need decrypt) 168 * \ingroup TSP_PVR 169 170 *! \defgroup TSP_FILEIN_PVR TSP file-in record related functions 171 * \ingroup TSP_PVR 172 173 *! \defgroup TSP_PVR_STB TSP PVR related functions for STB 174 * \ingroup TSP_PVR 175 176 *! \defgroup TSP_Playback TSP playback (file-in) related functions 177 * \ingroup TSP 178 179 *! \defgroup TSP_SCMB TSP Scramble status check functions 180 * \ingroup TSP 181 182 *! \defgroup TSP_STB TSP functions which only used on STB chip 183 * \ingroup TSP 184 185 *! \defgroup TSP_Debug TSP Debug functions 186 * \ingroup TSP 187 188 *! \defgroup TSP_FIQ TSP FIQ related functions 189 * \ingroup TSP 190 191 *! \defgroup TSP_Merge TSP merge stream related functions for CI+ 1.4 used 192 * \ingroup TSP 193 194 *! \defgroup TSP_MM TSP MM (Multi-Media) related functions 195 * \ingroup TSP 196 197 *! \defgroup TSO TSO related functions 198 * \ingroup DMX 199 200 *! \defgroup TSO_General TSO general functions 201 * \ingroup TSO 202 203 *! \defgroup DMX_STR DMX STR functions 204 * \ingroup DMX 205 206 *! \defgroup DMX_ToBeModified DMX api to be modified 207 * \ingroup DMX 208 209 *! \defgroup DMX_ToBeModified_TSP TSP api to be modified 210 * \ingroup DMX_ToBeModified 211 212 *! \defgroup DMX_ToBeModified_MM MM api to be modified 213 * \ingroup DMX_ToBeModified 214 215 *! \defgroup DMX_ToBeModified_TSO TSO api to be modified 216 * \ingroup DMX_ToBeModified 217 218 *! \defgroup DMX_ToBeRemove DMX api to be removed 219 * \ingroup DMX 220 221 */ 222 //------------------------------------------------- 223 224 #ifndef __API_DMX_H__ 225 #define __API_DMX_H__ 226 227 #include "MsCommon.h" 228 229 #include "ULog.h" 230 231 #ifdef __cplusplus 232 extern "C" 233 { 234 #endif 235 236 /// NULL PID definition 237 #define DMX_PID_NULL (0x1FFFUL) 238 239 // Please don't change this value if you know exactly what you are doing 240 /// DMX Filter pattern depth 241 #define DMX_SECT_FLT_DEPTH (16UL) 242 243 /// NULL DMX Id 244 #define DMX_DMXID_NULL ((MS_U8)0xFFUL) 245 #define MSIF_DMX_LIB_CODE {'D','M','X','_'} //Lib code 246 #define MSIF_DMX_LIBVER {'1','5'} //LIB version 247 #define MSIF_DMX_BUILDNUM {'0','3'} //Build Number 248 #define MSIF_DMX_CHANGELIST {'0','0','6','1','7','4','7','0'} //P4 ChangeList Number 249 250 /// DMX Version 251 #define DMX_API_VERSION /* Character String for DRV/API version */ \ 252 MSIF_TAG, /* 'MSIF' */ \ 253 MSIF_CLASS, /* '00' */ \ 254 MSIF_CUS, /* 0x0000 */ \ 255 MSIF_MOD, /* 0x0000 */ \ 256 MSIF_CHIP, \ 257 MSIF_CPU, \ 258 MSIF_DMX_LIB_CODE, /* IP__ */ \ 259 MSIF_DMX_LIBVER, /* 0.0 ~ Z.Z */ \ 260 MSIF_DMX_BUILDNUM, /* 00 ~ 99 */ \ 261 MSIF_DMX_CHANGELIST, /* CL# */ \ 262 MSIF_OS 263 264 /// DMX status indicator 265 typedef enum 266 { 267 DMX_FILTER_STATUS_OK, ///< DMX status OK 268 DMX_FILTER_STATUS_ERROR, ///< DMX status ERROR 269 } DMX_FILTER_STATUS; 270 271 typedef enum 272 { 273 DMX_DBG_NONE, 274 DMX_DBG_ERR, 275 DMX_DBG_WARN, 276 DMX_DBG_INFO, 277 DMX_DBG_PVR, 278 DMX_DBG_FUNC, 279 } DMX_DBGMSG_LEVEL; 280 281 /// DMX internal startup parameter 282 typedef struct _DMX_FW_Param 283 { 284 MS_PHY phyFWAddr; 285 MS_U32 u32FWSize; 286 287 MS_PHY phyVQAddr; 288 MS_U32 u32VQSize; 289 290 MS_U32 u32IsHK; 291 MS_U32 u32Res; 292 293 MS_U32 _zero_reserved[2]; 294 295 } DMX_TSPParam; 296 297 298 #if 0 299 /// DMX fitler type and source type 300 typedef enum 301 { 302 DMX_FILTER_TYPE_VIDEO, ///< DMX video filter type 303 DMX_FILTER_TYPE_AUDIO, ///< DMX audio filter type 304 DMX_FILTER_TYPE_AUDIO2, ///< DMX audio2 filter type 305 DMX_FILTER_TYPE_SECTION, ///< DMX section filter type 306 DMX_FILTER_TYPE_PES, ///< DMX PES filter type 307 DMX_FILTER_TYPE_PACKET, ///< DMX TS packet filter type 308 DMX_FILTER_TYPE_PCR, ///< DMX PCR filter type 309 DMX_FILTER_TYPE_TELETEXT, ///< DMX teletext filter type 310 311 DMX_FILTER_SOURCE_TYPE_MASK = 0xC0000000, ///< DMX filter source mask 312 DMX_FILTER_SOURCE_TYPE_LIVE = 0x80000000, ///< DMX live stream filter source 313 DMX_FILTER_SOURCE_TYPE_FILE = 0x40000000, ///< DMX file in filter type 314 } DMX_FILTER_TYPE; 315 #endif 316 317 #define DMX_FILTER_TYPE MS_U32 318 319 #define DMX_FILTER_TYPE_VIDEO 0x00000000UL ///< DMX video filter type 320 #define DMX_FILTER_TYPE_AUDIO 0x00000001UL ///< DMX audio filter type 321 #define DMX_FILTER_TYPE_AUDIO2 0x00000002UL ///< DMX audio2 filter type 322 #define DMX_FILTER_TYPE_SECTION 0x00000003UL ///< DMX section filter type 323 #define DMX_FILTER_TYPE_PES 0x00000004UL ///< DMX PES filter type 324 #define DMX_FILTER_TYPE_PACKET 0x00000005UL ///< DMX TS packet filter type 325 #define DMX_FILTER_TYPE_PCR 0x00000006UL ///< DMX PCR filter type 326 #define DMX_FILTER_TYPE_TELETEXT 0x00000007UL ///< DMX teletext filter type 327 #define DMX_FILTER_TYPE_VIDEO3D 0x00000008UL ///< DMX V3D filter type 328 #define DMX_FILTER_TYPE_AUDIO3 0x00000009UL ///< DMX audio 3 filter type 329 #define DMX_FILTER_TYPE_AUDIO4 0x0000000AUL ///< DMX audio 4 filter type 330 #define DMX_FILTER_TYPE_REC 0x0000000BUL ///< DMX record filter type no destination needs to be set 331 #define DMX_FILTER_TYPE_SCMBCHK 0x0000000CUL ///< DMX filter type for checking TS scrambling status 332 #define DMX_FILTER_TYPE_SECTION_VER 0x0000000DUL ///< DMX section filter type with version and CRC check 333 #define DMX_FILTER_TYPE_SECTION_NO_PUSI 0x0000000EUL ///< DMX section filter type which receive section without PUSI 334 #define DMX_FILTER_FLT_MASK 0xF2FF0F00UL 335 336 #define DMX_FILTER_SOURCE_TYPE_MASK 0xF0FC0000UL ///< DMX filter source mask 337 #define DMX_FILTER_SOURCE_TYPE_LIVE 0x80000000UL ///< DMX live stream filter source 338 #define DMX_FILTER_SOURCE_TYPE_FILE 0x40000000UL ///< DMX file in filter type 339 #define DMX_FILTER_SOURCE_TYPE_LIVEB DMX_FILTER_SOURCE_TYPE_FILE ///< Input from TS1 to File PID filter 340 #define DMX_FILTER_SOURCE_TYPE_TS1 0x00800000UL ///< DMX live stream filter source 1 341 #define DMX_FILTER_SOURCE_TYPE_TS2 0x00400000UL ///< DMX live stream filter source 2 342 #define DMX_FILTER_SOURCE_TYPE_TS3 0x00200000UL ///< DMX live stream filter source 3 343 #define DMX_FILTER_SOURCE_TYPE_FILE1 0x00100000UL ///< DMX file1 fource from TS1 344 #define DMX_FILTER_SOURCE_TYPE_FILE2 0x00080000UL ///< DMX file2 fource from TS2 345 #define DMX_FILTER_SOURCE_TYPE_FILE3 0x00040000UL 346 347 // Source ID define. For merge stream 348 #define DMX_FILTER_SOURCEID_MASK 0x00000F00UL 349 #define DMX_FILTER_SOURCEID_0 0x00000000UL 350 #define DMX_FILTER_SOURCEID_1 0x00000100UL 351 #define DMX_FILTER_SOURCEID_2 0x00000200UL 352 #define DMX_FILTER_SOURCEID_3 0x00000300UL 353 #define DMX_FILTER_SOURCEID_4 0x00000400UL 354 #define DMX_FILTER_SOURCEID_5 0x00000500UL 355 #define DMX_FILTER_SOURCEID_6 0x00000600UL 356 #define DMX_FILTER_SOURCEID_7 0x00000700UL 357 #define DMX_FILTER_SOURCEID_8 0x00000800UL 358 #define DMX_FILTER_SOURCEID_9 0x00000900UL 359 #define DMX_FILTER_SOURCEID_10 0x00000a00UL 360 #define DMX_FILTER_SOURCEID_11 0x00000b00UL 361 #define DMX_FILTER_SOURCEID_12 0x00000c00UL 362 #define DMX_FILTER_SOURCEID_13 0x00000d00UL 363 #define DMX_FILTER_SOURCEID_14 0x00000e00UL 364 #define DMX_FILTER_SOURCEID_15 0x00000f00UL 365 366 367 // Only supported by TSP ver3.0 driver for section filter duplicate sw patch 368 #define DMX_FILTER_FLT_TYPE_DUPSEC 0x02000000UL 369 370 371 // Only supported by TSP ver2.0 driver 372 #define DMX_FILTER_SOURCE_TYPE_PLAYBACK DMX_FILTER_SOURCE_TYPE_LIVE 373 #define DMX_FILTER_SOURCE_TYPE_PVR0 0x20000000UL ///< DMX PVR0 stream filter source 374 #define DMX_FILTER_SOURCE_TYPE_PVR1 0x10000000UL ///< DMX PVR1 stream filter source 375 376 #define DMX_FILTER_FLT_SCMB_MASK 0x30000000UL 377 #define DMX_FILTER_FLT_TYPE_SCMB 0x20000000UL ///< DMX descramble filter type 378 #define DMX_FILTER_FLT_TYPE_SCMB_SHAREKEY 0x10000000UL ///< DMX descramble filter type with sharekey 379 380 //-------------------------------------------------- 381 // Debug table 382 typedef enum 383 { 384 DMX_DEBUG_CMD_NONE, 385 DMX_DEBUG_CMD_CLEAR, 386 DMX_DEBUG_CMD_ENABLE, 387 DMX_DEBUG_CMD_DISABLE, 388 } DMX_DEBUG_CMD; 389 390 typedef enum 391 { 392 DMX_DEBUG_SRC_TS0, 393 DMX_DEBUG_SRC_TS1, 394 DMX_DEBUG_SRC_TS2, 395 DMX_DEBUG_SRC_FILE, 396 } DMX_DEBUG_SRC; 397 398 typedef enum 399 { 400 DMX_DEBUG_TSIF_TS0, 401 DMX_DEBUG_TSIF_TS1, 402 DMX_DEBUG_TSIF_TSCB, 403 } DMX_DEBUG_TSIF; 404 405 typedef enum 406 { 407 DMX_DEBUG_FIFO_VIDEO, 408 DMX_DEBUG_FIFO_AUDIO, 409 DMX_DEBUG_FIFO_VIDEO3D, 410 DMX_DEBUG_FIFO_AUDIOB, 411 DMX_DEBUG_FIFO_AUDIOC, 412 DMX_DEBUG_FIFO_AUDIOD, 413 } DMX_DEBUG_FIFO; 414 415 typedef enum 416 { 417 DMX_DEBUG_PKT_DEMUX_0, 418 DMX_DEBUG_PKT_DEMUX_0_FILE, 419 DMX_DEBUG_PKT_DEMUX_1, 420 DMX_DEBUG_PKT_DEMUX_2, 421 DMX_DEBUG_MMFI0, 422 DMX_DEBUG_MMFI1, 423 } DMX_DEBUG_FIFO_SRC; 424 425 // only one playback flow or PVR flow exist 426 // Playback flow and PVR flow can exist simultaneously 427 /// DMX flow type 428 typedef enum 429 { 430 DMX_FLOW_PLAYBACK = 0, ///< DMX playback flow 431 DMX_FLOW_PVR = 1, ///< DMX recording flow 432 DMX_FLOW_PVR1 = 2, ///< DMX recording flow, note: Not support for all chip 433 434 DMX_FLOW_PVRCA = 3, ///< CI+ PVR 435 436 DMX_FLOW_FILEIN_MM = 4, ///< DMX Filein flow with Main path Vido and MMFI path Audio 437 DMX_FLOW_MMFI0 = DMX_FLOW_FILEIN_MM, ///< DMX Filein flow with MMFI 0 (MMFI version 2.0) 438 DMX_FLOW_FILEIN_MM3D = 5, ///< DMX Filein flow with Main path Video, MMFI path 3DVideo, and MMFI Audio 439 DMX_FLOW_MMFI1 = DMX_FLOW_FILEIN_MM3D, ///< DMX Filein flow with MMFI 1 (MMFI version 2.0) 440 441 DMX_FLOW_CIPHSS_PLAYBACK = 6, ///< Playback flow for CI+ HSS 2 path input for CI+ 442 DMX_FLOW_CIPHSS_PVRCA = 7, ///< PVR flow for CI+ HSS 2 path input for CI+ 443 444 DMX_FLOW_PVR2 = 8, ///< DMX recording flow, note: Not support for all chip, PVR2 445 DMX_FLOW_PVR3 = 9, ///< DMX recording flow, note: Not support for all chip 446 DMX_FLOW_PVR4 = 10, ///< DMX recording flow, note: Not support for all chip 447 DMX_FLOW_PVR5 = 11, ///< DMX recording flow, note: Not support for all chip 448 449 DMX_FLOW_TSO_PLAYBACK = 12, ///< DMX TSO playback flow (live0 & file0) 450 DMX_FLOW_PLAYBACK1 = 13, ///< DMX playback flow from TS1 (version 3.0) 451 DMX_FLOW_PVRCA1 = 14, ///< CI+ PVR (version 3.0) 452 453 DMX_FLOW_TSO_PLAYBACK1 = 15, ///< DMX TSO1 playback flow (live1 & file1) 454 DMX_FLOW_PLAYBACK2 = 16, ///< DMX playback flow from TS2 (version 3.0/4.0) 455 DMX_FLOW_PLAYBACK3 = 17, ///< DMX playback flow from TS3 (version 4.0) 456 457 DMX_FLOW_PLAYBACK_NOCA = 18, ///< DMX playback flow without pass through CA 458 DMX_FLOW_PLAYBACK_SRC_TS1 = 19, ///< DMX playback, CA input from TS1 output to Live0 459 460 DMX_FLOW_PLAYBACK_FI = 20, ///< DMX playback flow from TSFI (version 3.0) 461 462 DMX_FLOW_NUM, 463 } DMX_FLOW; 464 465 /// DMX input type 466 typedef enum 467 { 468 DMX_FLOW_INPUT_DEMOD, ///< DMX input from internal demod 469 DMX_FLOW_INPUT_MEM, ///< DMX input from memory 470 DMX_FLOW_INPUT_EXT_INPUT0, ///< DMX input from external input 0 471 DMX_FLOW_INPUT_EXT_INPUT1, ///< DMX input from external input 1 472 DMX_FLOW_INPUT_EXT_INPUT2, ///< DMX input from external input 2. note: Not support for all chip 473 DMX_FLOW_INPUT_EXT_INPUT3, ///< DMX input from external input 3. note: Not support for all chip 474 DMX_FLOW_INPUT_MEM_NOPASSCA, ///< DMX input from memory, but not pass through CA 475 DMX_FLOW_INPUT_DEMOD1, 476 DMX_FLOW_INPUT_TSO, ///< DMX input from TSOutput 477 DMX_FLOW_INPUT_TSO1, 478 DMX_FLOW_INPUT_MEM_PASSCA1, ///< DMX input from memory, but pass through CA1, not CA0 479 DMX_FLOW_INPUT_MEM1, ///< DMX input from memory path 2 480 DMX_FLOW_INPUT_EXT_INPUT4, ///< DMX input from external input 4. note: Not support for all chip 481 DMX_FLOW_INPUT_EXT_INPUT5, ///< DMX input from external input 5. note: Not support for all chip 482 DMX_FLOW_INPUT_DISABLE, 483 484 } DMX_FLOW_INPUT; 485 486 /// DMX output pad 487 typedef enum 488 { 489 DMX_FLOW_OUTPUT_NONE = 0, 490 DMX_FLOW_OUTPUT_EXT_PAD1 = 1, ///< DMX output to external pad 1 491 DMX_FLOW_OUTPUT_EXT_PAD3 = 3, ///< DMX output to external pad 3 492 }DMX_FLOW_OUTPUT_PAD; 493 494 typedef enum 495 { 496 DMX_TSIF_LIVE0, 497 DMX_TSIF_LIVE1, 498 DMX_TSIF_LIVE2, 499 DMX_TSIF_LIVE3, 500 501 DMX_TSIF_FILE0, 502 DMX_TSIF_FILE1, 503 DMX_TSIF_FILE2, 504 DMX_TSIF_FILE3, 505 506 DMX_TSIF_MAX, 507 } DMX_TSIF; 508 509 typedef enum 510 { 511 DMX_PVR_EGN0, 512 DMX_PVR_EGN1, 513 DMX_PVR_EGN2, 514 DMX_PVR_EGN3, 515 DMX_PVR_EGN4, 516 DMX_PVR_EGN5, 517 518 DMX_PVR_ENG_NUM, 519 } DMX_PVR_ENG; 520 521 #if 0 522 // make sure what you are doing before changing the value 523 /// DMX callback types 524 typedef enum 525 { 526 DMX_EVENT_DATA_READY = 0x00000001, ///< DMX event ready 527 DMX_EVENT_BUF_OVERFLOW = 0x00000002, ///< DMX event overflow 528 DMX_EVENT_PVRBUF_FULL = 0x00000010, ///< DMX event PVR buffer overflow 529 530 /// TSP self task callback // optional --> default is CB by poll 531 DMX_EVENT_CB_MASK = 0x80000000, ///< DMX callback mask 532 DMX_EVENT_CB_POLL = 0x00000000, ///< DMX callback by polling // OBSOLETE 533 DMX_EVENT_CB_SELF = 0x80000000, ///< DMX callback by demux module 534 DMX_EVENT_CB_SELF_TYPE2 = 0xC0000000, ///< DMX callback by demux module 535 } DMX_EVENT; 536 #endif 537 538 #define DMX_EVENT MS_U32 539 #define DMX_EVENT_DATA_READY 0x00000001UL ///< DMX event ready 540 #define DMX_EVENT_BUF_OVERFLOW 0x00000002UL ///< DMX event overflow 541 #define DMX_EVENT_SEC_CRCERROR 0x00000004UL ///< DMX event CRC error 542 #define DMX_EVENT_PVRBUF_FULL 0x00000010UL ///< DMX event PVR buffer overflow 543 #define DMX_EVENT_PVR1BUF_FULL 0x00000020UL ///< DMX event Channel Browser buffer overflow 544 #define DMX_EVENT_PVRBUF_SIZE_MET 0x00000040UL ///< DMX event PVR buffer callback size meet. note: Not support for all chips 545 546 /// TSP self task callback // optional --> default is CB by poll 547 #define DMX_EVENT_CB_MASK 0x80000000UL ///< DMX callback mask 548 #define DMX_EVENT_CB_POLL 0x00000000UL ///< DMX callback by polling // OBSOLETE 549 #define DMX_EVENT_CB_SELF 0x80000000UL ///< DMX callback by demux module 550 #define DMX_EVENT_CB_SELF_TYPE2 0xC0000000UL ///< DMX callback by demux module 551 552 typedef enum 553 { 554 DMX_BURSTSINGLE = 0x00, 555 DMX_BURST2BYTE = 0x01, 556 DMX_BURST4BYTE = 0x02, 557 DMX_BURST8BYTE = 0x03, 558 } DMX_BURSTTYPE; 559 560 #if 0 561 // make sure what you are doing before changing the value 562 /// DMX section mode setting 563 typedef enum 564 { 565 DMX_SECT_MODE_CONTI = 0x00000000, ///< DMX receive section contiguously 566 DMX_SECT_MODE_ONESHOT = 0x00000001, ///< DMX only receive one section 567 568 // optional 569 DMX_SECT_MODE_CRCCHK = 0x00000002, ///< DMX enables CRC check 570 DMX_SECT_MODE_AUTO_ADDR = 0x00000004, ///< DMX align read pointer to write pointer when get write pointer // OBSOLETE 571 } DMX_SECT_MODE; 572 #endif 573 574 #define DMX_SECT_MODE MS_U32 575 #define DMX_SECT_MODE_CONTI 0x00000000UL ///< DMX receive section contiguously 576 #define DMX_SECT_MODE_ONESHOT 0x00000001UL ///< DMX only receive one section 577 #define DMX_SECT_MODE_PESSCMCHK 0x00000003UL ///< DMX checking PES SCMB status 578 579 // optional 580 #define DMX_SECT_MODE_CRCCHK 0x00000002UL ///< DMX enables CRC check 581 #define DMX_SECT_MODE_AUTO_ADDR 0x00000004UL ///< DMX align read pointer to write pointer when get write pointer // OBSOLETE 582 #define DMX_SECT_MODE_AUTO_CRCCHK 0x00000008UL ///< DMX enables Auto CRC check, should not be set with DMX_SECT_MODE_CRCCHK together 583 584 /// for MApi_DMX_AVFifo_Status return value u32FifoStatus 585 #define DMX_FIFO_STATUS MS_U32 586 #define DMX_FIFO_STATUS_LV_MASK 0x0000000FUL /// use this mask to get fifo level and use below macro to get current fifo status 587 #define DMX_FIFO_STATUS_LV_USAGE_MASK 0x0000000CUL /// use this mask to get fifo level usage 588 #define DMX_FIFO_STATUS_LV_USAGE_SHIFT 2UL 589 #define DMX_FIFO_STATUS_LV_EMPTY 0x00000001UL /// if fifo level status equal to this macro means fifo is empty 590 #define DMX_FIFO_STATUS_RST_MASK 0x80000000UL /// use this mask to get fifo reset status 591 #define DMX_FIFO_STATUS_RST_EN 0x80000000UL /// if fifo reset status equal to this macro means fifo reset is enabled. 592 593 /// DMX filein Engine by path 594 typedef enum 595 { 596 DMX_FILEIN_TSIF0, 597 DMX_FILEIN_TSIF1, 598 DMX_FILEIN_TSIF2, 599 DMX_FILEIN_TSIF3, 600 DMX_FILEIN_INVALID, 601 } DMX_FILEIN_PATH; 602 603 604 /// DMX filein destination types 605 typedef enum 606 { 607 DMX_PES_AUDIO2_FIFO = 0, ///< DMX destination is audio2 fifo 608 DMX_PES_AUDIO_FIFO = 1, ///< DMX destination is audio fifo 609 DMX_PES_VIDEO_FIFO = 2, ///< DMX destination is video fifo 610 DMX_PES_NO_BYPASS_FIFO = 3, ///< DMX destination with no bypass 611 DMX_PES_VIDEO3D_FIFO = 4, ///< DMX destination is video3D fifo 612 DMX_PES_AUDIO3_FIFO = 5, ///< DMX destination is audio3 fifo 613 DMX_PES_AUDIO4_FIFO = 6, ///< DMX destination is audio4 fifo 614 } DMX_FILEIN_DST; // DMXPESDATAFIFO; 615 616 /// DMX callback prototype 617 typedef void (*DMX_NotifyCb)(MS_U8 u8DmxId, DMX_EVENT enEvent); 618 typedef void (*DMX_Type2NotifyCb)(MS_U8 u8DmxId, DMX_EVENT enEvent, MS_U32 NotifyParam1); 619 /// DMX callback used in copy data 620 typedef MS_BOOL (*DMX_CheckCb)(MS_U8 u8DmxId, MS_U8* start, MS_U8* end, MS_U8* read, MS_U8* write); 621 622 // dummy data structure 623 typedef struct 624 { 625 MS_U32 streaminfo; 626 } DMX_Stream_info; 627 628 /// DMX section filter information structure 629 typedef struct 630 { 631 MS_PHY SectBufAddr; ///< DMX section buffer in physical address 632 MS_U32 SectBufSize; ///< DMX section buffer size 633 DMX_SECT_MODE SectMode; ///< DMX section mode 634 DMX_EVENT Event; ///< DMX section event 635 DMX_NotifyCb pNotify; ///< DMX section callback 636 DMX_Type2NotifyCb pType2Notify; ///< DMX section callback 637 MS_U32 Type2NotifyParam1; ///< DMX section callback 638 } DMX_Sect_info; 639 640 /// DMX filter information structure 641 typedef struct 642 { 643 union { 644 DMX_Stream_info StreamInfo; ///< DMX stream information for future use 645 DMX_Sect_info SectInfo; ///< DMX section information 646 } Info; 647 } DMX_Flt_info; 648 649 /// DMX PVR information structure 650 typedef struct 651 { 652 MS_PHY pPvrBuf0; ///< DMX PVR buffer 0 starting address 653 MS_PHY pPvrBuf1; ///< DMX PVR buffer 1 starting address 654 MS_U32 PvrBufSize0; ///< DMX PVR buffer 0 size 655 MS_U32 PvrBufSize1; ///< DMX PVR buffer 1 size 656 DMX_EVENT Event; ///< DMX PVR event 657 DMX_NotifyCb pNotify; ///< DMX PVR callback 658 659 MS_U16 u16CaPvrModel; ///< DMX PVR CA mode 660 MS_BOOL bSpsEnable; ///< DMX PVR CA mode 661 662 } DMX_Pvr_info; 663 664 typedef enum 665 { 666 DMX_CA_PVR_TSP = 0x00000000UL, 667 DMX_CA_PVR_PROG0 = 0x00000001UL, 668 DMX_CA_PVR_PROG1 = 0x00000002UL, 669 }DMX_CA_PVRMODE; 670 671 //---------------------------------- 672 /// DMX debug table information structure 673 //---------------------------------- 674 typedef struct 675 { 676 DMX_DEBUG_CMD TspCmd; 677 DMX_DEBUG_SRC TspSrc; 678 DMX_DEBUG_FIFO TspFifo; 679 } DMX_DisContiCnt_info, DMX_DropPktCnt_info; 680 681 typedef struct 682 { 683 DMX_DEBUG_CMD TspCmd; 684 DMX_DEBUG_TSIF TspTsif; 685 } DMX_LockPktCnt_info; 686 687 typedef struct 688 { 689 DMX_DEBUG_CMD TspCmd; 690 DMX_DEBUG_FIFO TspFifo; 691 DMX_DEBUG_FIFO_SRC TspFifoSrc; 692 } DMX_AVPktCnt_info; 693 694 #define DMX_MAX_SIGFLAG_NUM 10UL 695 #define DMX_MAX_PVRSIGFLAG_NUM 6UL 696 typedef struct 697 { 698 MS_U32 u32Eng; 699 MS_U32 u32EvtWaitOpt; 700 MS_U32 u32DmxEvt; 701 MS_U32 u32TspEvt; 702 703 MS_U32 u32PvrBufFullFlag[DMX_MAX_PVRSIGFLAG_NUM]; 704 705 MS_U32 u32SecRdyFlag[DMX_MAX_SIGFLAG_NUM]; 706 MS_U32 u32SecOvfFlag[DMX_MAX_SIGFLAG_NUM]; 707 }DMX_TSP_IOSIGNAL; 708 709 /// DMX capability query type 710 typedef enum 711 { 712 DMX_CAP_PID_FILTER_NUM = 0, ///< Get PID filter number 713 DMX_CAP_SEC_FILTER_NUM = 1, ///< Get section filter number 714 DMX_CAP_SEC_BUF_NUM = 2, ///< Get section buffer number 715 716 DMX_CAP_PVR_ENG_NUM = 3, ///< Get pvr engine number 717 DMX_CAP_PVR_FILTER_NUM = 4, ///< Get pvr filter number 718 DMX_CAP_PVR1_FILTER_NUM = 5, ///< Get pvr1 filter number 719 720 DMX_CAP_MMFI_AUDIO_FILTER_NUM = 6, ///< Get MM file in audio path filter number 721 DMX_CAP_MMFI_V3D_FILTER_NUM = 7, ///< Get MM file in video 3D path filter number 722 723 DMX_CAP_MMFI0_FILTER_NUM = 6, ///< Get MM file in 0 path filter number 724 DMX_CAP_MMFI1_FILTER_NUM = 7, ///< Get MM file in 1 path filter number 725 726 DMX_CAP_TSIF_NUM = 8, ///< Get ts interface number 727 DMX_CAP_DEMOD_NUM = 9, ///< Get demod support number 728 DMX_CAP_TS_PAD_NUM = 10, ///< Get TS pad support number 729 DMX_CAP_VQ_NUM = 11, ///< Get virtual queue support number 730 731 DMX_CAP_CA_FLT_NUM = 12, ///< Get descramble filter number 732 DMX_CAP_CA_KEY_NUM = 13, ///< Get total descramble key number 733 734 DMX_CAP_FW_ALIGN = 14, ///< Get MIU alignment in bytes of DMX FW 735 DMX_CAP_VQ_ALIGN = 15, ///< Get MIU alignment in bytes of Virtual queue 736 DMX_CAP_VQ_PITCH = 16, ///< Get length in bytes in bytes of one VQ unit 737 DMX_CAP_SEC_BUF_ALIGN = 17, ///< Get MIU alignment in bytes of section buffer 738 DMX_CAP_PVR_ALIGN = 18, ///< Get miu alignment in bytes of record buffer 739 740 DMX_CAP_PVRCA_PATH_NUM = 19, ///< Get the numbers of descramble record path 741 742 DMX_CAP_SHAREKEY_FLT_RANGE = 20, ///< Get the range of sharekey descramble 0 filter id. data0 is start ID, data 1 is end ID 743 DMX_CAP_PVRCA0_FLT_RANGE = 21, ///< Get the range of PVRCA0 filter id. data0 is start ID, data 1 is end ID 744 DMX_CAP_PVRCA1_FLT_RANGE = 22, ///< Get the range of PVRCA1 filter id. data0 is start ID, data 1 is end ID 745 DMX_CAP_PVRCA2_FLT_RANGE = 23, ///< Get the range of PVRCA2 filter id. data0 is start ID, data 1 is end ID 746 DMX_CAP_SHAREKEY_FLT1_RANGE = 24, ///< Get the range of sharekey descramble 1 filter id. data0 is start ID, data 1 is end ID 747 DMX_CAP_SHAREKEY_FLT2_RANGE = 25, ///< Get the range of sharekey descramble 2 filter id. data0 is start ID, data 1 is end ID 748 749 DMX_CAP_HW_TYPE = 26, ///< Get the HW architecture type. 0xXXX0: No PVR, 0x100X: TV series, 0x200X: STB series 750 751 DMX_CAP_RESOURCE_SIZE = 27, ///< Get DMX Private Resource data struct size (Share resource) 752 753 DMX_CAP_VFIFO_NUM = 28, ///< Get VFIFO support number 754 DMX_CAP_AFIFO_NUM = 29, ///< Get AFIFO support number 755 756 DMX_CAP_HWPCR_SUPPORT = 30, ///< Get HWPCR support status 757 DMX_CAP_PCRFLT_START_IDX = 31, ///< Get PCR start index 758 DMX_CAP_TSP_HWWP_SET_NUM = 32, ///< Get TSP write protect set numbers 759 760 DMX_CAP_DSCMB_ENG_NUM = 33, ///< Get DSCMB engine numbers 761 762 DMX_CAP_MAX_MERGESTR_NUM = 34, ///< Get Maxumum merge stream number 763 764 DMX_CAP_MAX_SEC_FLT_DEPTH = 35, 765 DMX_CAP_FW_BUF_SIZE = 36, 766 DMX_CAP_FW_BUF_RANGE = 37, 767 DMX_CAP_VQ_BUF_RANGE = 38, 768 DMX_CAP_SEC_BUF_RANGE = 39, 769 DMX_CAP_FIQ_NUM = 40, 770 771 DMX_CAP_NULL, 772 } DMX_QUERY_TYPE; 773 774 typedef enum 775 { 776 DMX_HW_TYPE_NONE = 0UL, 777 DMX_HW_TYPE_TV_SERIES = 0x00001000UL, ///< The HW architecture is TV series without PVR cunfction 778 DMX_HW_TYPE_TV_TYPE1 = 0x00001001UL, ///< The HW architecture is TV series with Seperate PVR filters 779 DMX_HW_TYPE_TV_TYPE2 = 0x00001002UL, ///< The HW architecture is TV series with general PVR filters 780 DMX_HW_TYPE_TV_TYPE2_CA2 = 0x00001006UL, ///< The HW architecture is TV series with general PVR filters, with general dscmb filters, and merge stream 781 DMX_HW_TYPE_STB_SERIES = 0x00002000UL, ///< The HW architecture is BOX series without PVR cunfction 782 DMX_HW_TYPE_STB_TYPE1 = 0x00002001UL, ///< The HW architecture is BOX series 1 783 DMX_HW_TYPE_STB_TYPE2 = 0x00002002UL, ///< The HW architecture is BOX series 2 784 DMX_HW_TYPE_STB_TYPE3 = 0x00002003UL, ///< The HW architecture is BOX series 3 785 DMX_HW_TYPE_STB_TYPE3_CASPS = 0x80002003UL, ///< The HW architecture is BOX series 3 with PVR CA SPS enable mode 786 } DMX_HW_TYPE; 787 788 typedef enum 789 { 790 DMX_TIMESTAMP_CLK_90K = 0x00000000UL, 791 DMX_TIMESTAMP_CLK_27M = 0x00000001UL, 792 } DMX_TimeStamp_Clk; 793 794 /// TSP file in Packet mode 795 typedef enum //_DMX_Filein_Packmode 796 { 797 DMX_PKTMODE_188 = 0x00000000UL, ///< DMX file in packet size with 188 (Single stream) 798 DMX_PKTMODE_192 = 0x00000001UL, ///< DMX file in packet size with 192 (Single stream) 799 DMX_PKTMODE_204 = 0x00000002UL, ///< DMX file in packet size with 204 (Single stream) 800 DMX_PKTMODE_130 = 0x00000003UL, ///< DMX file in packet size with 130 (RVU) 801 DMX_PKTMODE_134 = 0x00000004UL, ///< DMX file in packet size with 134 (RVU with timestamp) 802 DMX_PKTMODE_200 = 0x00000005UL, ///< DMX file in packet size with 200 (Open cable Single stream) 803 804 DMX_PKTMODE_MERG188 = 0x00000006UL, ///< DMX file in packet size with 188 (Merge stream) 805 DMX_PKTMODE_MERG192 = 0x00000007UL, ///< DMX file in packet size with 192 (Merge stream) 806 DMX_PKTMODE_MERG200 = 0x00000008UL, ///< DMX file in packet size with 200 (Open cable Merge stream) 807 } DMX_Filein_PacketMode; 808 809 #define DMX_PacketMode DMX_Filein_PacketMode 810 811 /// TSP file in information structure 812 typedef struct 813 { 814 MS_U32 Rate; ///< DMX file in rate 815 DMX_Filein_PacketMode PKT_Mode; ///< DMX file in packet size mode 816 } DMX_Filein_info; 817 818 typedef struct 819 { 820 DMX_FLOW_INPUT Input; 821 MS_BOOL bClkInv; 822 MS_BOOL bExtSync; 823 MS_BOOL bParallel; 824 }DMX_FlowInput_Info; 825 826 //MMFI Path 827 #define DMX_MMFI_PATH MS_U32 828 #define DMX_MMFI_AUDIO 0UL ///< DMX destination with no bypass to MM Audio path 829 #define DMX_MMFI_VIDEO 1UL ///< DMX destination with no bypass to MM Video path 830 #define DMX_MMFI_PATH0 DMX_MMFI_AUDIO 831 #define DMX_MMFI_PATH1 DMX_MMFI_VIDEO 832 833 // must alignment with TSP_FIFO_XXX in halTSP.h 834 typedef enum 835 { 836 DMX_MMFI_FLTTYPE_AUD = 0x00, 837 DMX_MMFI_FLTTYPE_AUDB = 0x01, 838 DMX_MMFI_FLTTYPE_VD3D = 0x02, 839 DMX_MMFI_FLTTYPE_VD = 0x03, 840 DMX_MMFI_FLTTYPE_AUDC = 0x04, 841 DMX_MMFI_FLTTYPE_AUDD = 0x05, 842 843 DMX_MMFI1_FLTTYPE_MASK = 0x80, 844 }DMX_MMFI_FLTTYPE; 845 846 typedef enum 847 { 848 DMX_MMFI_PES_NO_BYPASS_AU = 0x0000, 849 850 DMX_MMFI_PES_PS_AU = 0x0001, 851 DMX_MMFI_PES_PS_AUB = 0x0002, 852 853 DMX_MMFI_PES_APID_BYPASS = 0x0004, 854 DMX_MMFI_PES_APIDB_BYPASS = 0x0008, 855 856 DMX_MMFI_PES_NO_BYPASS_V3D = 0x0010, 857 DMX_MMFI_PES_PS_V3D = 0x0020, 858 DMX_MMFI_PES_V3DPID_BYPASS = 0x0040, 859 860 DMX_MMFI_PES_NO_BYPASS_VD = 0x0080, 861 DMX_MMFI_PES_VPID_BYPASS = 0x0100, 862 863 DMX_MMFI_PES_NO_BYPASS_TS = 0x0200, 864 865 DMX_MMFI_PES_PS_VD = 0x0400, 866 867 DMX_MMFI_PES_PS_AUC = 0x0800, 868 DMX_MMFI_PES_PS_AUD = 0x1000, 869 870 DMX_MMFI1_PES_TYPE_MASK = 0x8000, ///< Must set, when using MMFI1 path 871 }DMX_MMFI_DST; 872 873 typedef enum 874 { 875 E_DMX_TSO_OUTCLK_DIV2N, 876 E_DMX_TSO_OUTCLK_DIVN, 877 E_DMX_TSO_OUTCLK_62M, 878 E_DMX_TSO_OUTCLK_54M, 879 E_DMX_TSO_OUTCLK_PTSOOUT, 880 E_DMX_TSO_OUTCLK_PTSOOUT_DIV8, 881 E_DMX_TSO_OUTCLK_Dmd, 882 E_DMX_TSO_OUTCLK_27M, 883 }DMX_TSO_OutClk; 884 885 typedef enum 886 { 887 E_DMX_TSO_OUTCLKSRC_172M_2N, // E_DMX_TSO_OUTCLK_DIV2N 888 E_DMX_TSO_OUTCLKSRC_288M_2N, // E_DMX_TSO_OUTCLK_DIV2N 889 E_DMX_TSO_OUTCLKSRC_432M_2N, // E_DMX_TSO_OUTCLK_DIV2N 890 E_DMX_TSO_OUTCLKSRC_216M_N, // E_DMX_TSO_OUTCLK_DIVN 891 E_DMX_TSO_OUTCLKSRC_P_TS0IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 892 E_DMX_TSO_OUTCLKSRC_P_TS1IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 893 E_DMX_TSO_OUTCLKSRC_P_TS2IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 894 E_DMX_TSO_OUTCLKSRC_P_TS3IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 895 E_DMX_TSO_OUTCLKSRC_P_TS4IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 896 E_DMX_TSO_OUTCLKSRC_P_TS5IN, // E_DMX_TSO_OUTCLK_PTSOOUT or E_DMX_TSO_OUTCLK_PTSOOUT_DIV8 897 }DMX_TSO_OutClkSrc; 898 899 typedef struct 900 { 901 MS_U32 u32Res; 902 DMX_FLOW eFlow; 903 DMX_TSIF eTSOInIf; 904 DMX_FlowInput_Info stInputInfo; 905 MS_U8 u8LocalStrId; 906 MS_BOOL bBypassAll; 907 MS_BOOL bEnable; 908 MS_BOOL bSet; 909 }DMX_TSO_InputCfg; 910 911 typedef struct 912 { 913 MS_U32 u32Res; 914 DMX_FLOW eFlow; 915 DMX_FLOW_OUTPUT_PAD eOutPad; 916 MS_U16 u16OutPktSize; 917 MS_BOOL bEnable; 918 919 MS_BOOL bDefOutClk; 920 MS_BOOL bOutClkInv; 921 DMX_TSO_OutClk eTsoOutClk; 922 DMX_TSO_OutClkSrc eTsoOutClkSrc; 923 MS_U16 u16DivNum; 924 MS_BOOL bSet; 925 }DMX_TSO_OutputCfg; 926 927 /// DMX FQ init infomation 928 typedef struct 929 { 930 MS_U8 u8AddrMode; 931 MS_PHY u32BufStart; 932 MS_U32 u32BufSize; 933 } DMX_FQ_Info; 934 935 typedef enum 936 { 937 E_DMX_FQ_SKIP_RUSH_DATA_PATH_NON = 0x00000000UL, 938 E_DMX_FQ_SKIP_APES_RUSH_DATA = 0x00000008UL, 939 E_DMX_FQ_SKIP_APES_B_RUSH_DATA = 0x00000010UL, 940 E_DMX_FQ_SKIP_VPES_RUSH_DATA = 0x00000020UL, 941 E_DMX_FQ_SKIP_SEC_RUSH_DATA = 0x00000040UL, 942 E_DMX_FQ_SKIP_ADP_RUSH_DATA = 0x00000080UL, 943 E_DMX_FQ_SKIP_PCR_RUSH_DATA = 0x00000100UL, 944 E_DMX_FQ_SKIP_RASP_RUSH_DATA = 0x00000200UL, 945 E_DMX_FQ_SKIP_PVR1_RUSH_DATA = E_DMX_FQ_SKIP_RASP_RUSH_DATA, 946 E_DMX_FQ_SKIP_PCR1_RUSH_DATA = 0x00001000UL, 947 E_DMX_FQ_SKIP_PVR3_RUSH_DATA = E_DMX_FQ_SKIP_PCR1_RUSH_DATA, 948 E_DMX_FQ_SKIP_CFG1_MASK = 0x80000000UL, 949 E_DMX_FQ_SKIP_APES_C_RUSH_DATA = 0x80000008UL, 950 E_DMX_FQ_SKIP_APES_D_RUSH_DATA = 0x80000010UL, 951 E_DMX_FQ_SKIP_V3DPES_RUSH_DATA = 0x80000020UL, 952 E_DMX_FQ_SKIP_PVR2_RUSH_DATA = 0x80000200UL, 953 }DMX_FQ_SkipPath; 954 955 /// DMX TEI Remove Error Packet Infomation 956 typedef enum 957 { 958 E_DMX_TEI_REMOVE_AUDIO_PKT, ///< DMX TEI Remoce Audio Packet 959 E_DMX_TEI_REMOVE_VIDEO_PKT, ///< DMX TEI Remoce Video Packet 960 961 E_DMX_TEI_REMOVE_PKT0_LIVE, 962 E_DMX_TEI_REMOVE_PKT0_FILE, 963 E_DMX_TEI_REMOVE_PKT1, 964 E_DMX_TEI_REMOVE_PKT2, 965 966 }DMX_TEI_RmPktType; 967 968 //STC update Control Parameters define 969 #define eStcUpdateCtrlMode MS_U8 970 #define DMX_STC_UPDATE_FW 0x00 971 #define DMX_STC_UPDATE_HK 0x01 972 #define DMX_STC_UPDATE_UPDATEONCE 0x02 973 974 //S2P Clock Option 975 #define eS2PClkOpt MS_U32 976 #define S2P_CLK_OPT_NONE 0x00000000 977 #define S2P_CLK_OPT_INVERT 0x00000001 978 #define S2P_CLK_OPT_NON_INVERT 0x00000002 979 980 //////////////////////////////////////////////////////////////////////////////// 981 // include utopia v2 header files here 982 //////////////////////////////////////////////////////////////////////////////// 983 #ifdef DMX_UTOPIA_20 984 #include "apiDMX_v2.h" 985 #endif 986 987 //------------------------------------------------------------------------------------------------- 988 /// Initialize lib resource API 989 /// @ingroup TSP_General 990 /// @param pu32ResMemAddr \b IN: Pointer to store resource memory addresses 991 /// @return DMX_FILTER_STATUS_OK - Success 992 /// @return DMX_FILTER_STATUS_ERROR - Failure 993 //------------------------------------------------------------------------------------------------- 994 // DMX_FILTER_STATUS MApi_DMX_InitLibResource(void *pResMemAddr); 995 //------------------------------------------------------------------------------------------------- 996 /// Set TSP firmware address and size. 997 /// @ingroup TSP_General 998 /// @param pFwAddr \b IN: TSP firmware address in DRAM physical address 999 /// @param u32FwSize \b IN: TSP firmware size 1000 /// @return DMX_FILTER_STATUS_OK - Success 1001 /// @return DMX_FILTER_STATUS_ERROR - Failure 1002 /// @note It should be called before calling any other Demux API functions. 1003 //------------------------------------------------------------------------------------------------- 1004 DMX_FILTER_STATUS MApi_DMX_SetFW(MS_PHY pFwAddr, MS_U32 u32FwSize); // In DRAM physical address 1005 //------------------------------------------------------------------------------------------------- 1006 /// Set the MIU address for TSP aeon (firmware) used. 1007 /// @ingroup TSP_General 1008 /// @param phyDataAddr \b IN: MIU phsyical address 1009 /// @param u32size \b IN: MIU buffer size 1010 /// @return DMX_FILTER_STATUS_OK - Success 1011 /// @return DMX_FILTER_STATUS_ERROR - Failure 1012 //------------------------------------------------------------------------------------------------- 1013 DMX_FILTER_STATUS MApi_DMX_SetFwDataAddr(MS_PHY phyDataAddr, MS_U32 u32size); 1014 /// Set TSP is work on HK or AEON. 1015 /// @ingroup TSP_General 1016 /// @param bIsHK \b IN: TRUE: HK, FALSE: AEON 1017 /// @return DMX_FILTER_STATUS_OK - Success 1018 /// @return DMX_FILTER_STATUS_ERROR - Failure 1019 //------------------------------------------------------------------------------------------------- 1020 DMX_FILTER_STATUS MApi_DMX_SetHK(MS_BOOL bIsHK); // OBSOLETE 1021 //------------------------------------------------------------------------------------------------- 1022 /// Initialize Demux module. 1023 /// @ingroup TSP_General 1024 /// @return DMX_FILTER_STATUS_OK - Success 1025 /// @return DMX_FILTER_STATUS_ERROR - Failure 1026 /// @note It should be called before calling any other Demux API functions. 1027 //------------------------------------------------------------------------------------------------- 1028 DMX_FILTER_STATUS MApi_DMX_Init(void); 1029 1030 //------------------------------------------------------------------------------------------------- 1031 /// Initialize Demux API for Virtual Quere Enable 1032 /// @ingroup TSP_General 1033 /// @param param \b IN: Init Virtual Quere Setting 1034 /// @return DMX_FILTER_STATUS_OK - Success 1035 /// @return DMX_FILTER_STATUS_ERROR - Failure 1036 /// @note if want to use virtual quere, please call this API after calling MApi_DMX_Init. (VQ does not support for all chip) 1037 //------------------------------------------------------------------------------------------------- 1038 DMX_FILTER_STATUS MApi_DMX_TSPInit(DMX_TSPParam *param); 1039 //------------------------------------------------------------------------------------------------- 1040 /// Exit Demux API 1041 /// @ingroup TSP_General 1042 /// @return DMX_FILTER_STATUS_OK - Success 1043 /// @return DMX_FILTER_STATUS_ERROR - Failure 1044 //------------------------------------------------------------------------------------------------- 1045 DMX_FILTER_STATUS MApi_DMX_Exit(void); 1046 1047 //------------------------------------------------------------------------------------------------- 1048 /// Force exit Demux API 1049 /// @ingroup TSP_General 1050 /// @return DMX_FILTER_STATUS_OK - Success 1051 /// @return DMX_FILTER_STATUS_ERROR - Failure 1052 /// @note It is special case for MM 1053 ///------------------------------------------------------------------------------------------------- 1054 // DMX_FILTER_STATUS MApi_DMX_ForceExit(void); 1055 //------------------------------------------------------------------------------------------------- 1056 /// Save DMX driver states to DRAM. 1057 /// @ingroup DMX_STR 1058 /// @return DMX_FILTER_STATUS_OK - Success 1059 /// @return DMX_FILTER_STATUS_ERROR - Failure 1060 //------------------------------------------------------------------------------------------------- 1061 DMX_FILTER_STATUS MApi_DMX_Suspend(void); 1062 //------------------------------------------------------------------------------------------------- 1063 /// Restore DMX driver states from DRAM. And TSP need input the firmware info. to reload TSP FW. 1064 /// @ingroup DMX_STR 1065 /// @param phyFWAddr \b IN: TSP firmware load address 1066 /// @param u32FWSize \b IN: TSP firmware size 1067 /// @return DMX_FILTER_STATUS_OK - Success 1068 /// @return DMX_FILTER_STATUS_ERROR - Failure 1069 //------------------------------------------------------------------------------------------------- 1070 DMX_FILTER_STATUS MApi_DMX_Resume(MS_PHY phyFWAddr, MS_U32 u32FWSize); 1071 //------------------------------------------------------------------------------------------------- 1072 /// Check TSP is alive or not. (Firmware) 1073 /// @ingroup TSP_General 1074 /// @return DMX_FILTER_STATUS_OK - Success 1075 /// @return DMX_FILTER_STATUS_ERROR - Failure 1076 //------------------------------------------------------------------------------------------------- 1077 DMX_FILTER_STATUS MApi_DMX_ChkAlive(void); 1078 1079 //------------------------------------------------------------------------------------------------- 1080 /// Reset TSP and MM. It will reset all filter and do HW reset. 1081 /// @ingroup TSP_General 1082 /// @return DMX_FILTER_STATUS_OK - Success 1083 /// @return DMX_FILTER_STATUS_ERROR - Failure 1084 //------------------------------------------------------------------------------------------------- 1085 // DMX_FILTER_STATUS MApi_DMX_Reset(void); 1086 1087 //------------------------------------------------------------------------------------------------- 1088 /// Release TSP driver HW lock semaphone 1089 /// @ingroup TSP_General 1090 /// @return DMX_FILTER_STATUS_OK - Success 1091 /// @return DMX_FILTER_STATUS_ERROR - Failure 1092 //------------------------------------------------------------------------------------------------- 1093 // DMX_FILTER_STATUS MApi_DMX_ReleaseSemaphone(void); 1094 1095 //------------------------------------------------------------------------------------------------- 1096 /// Enable/Disable TSP MIU internal write protect. Include PVR record buffer and section buffer. 1097 /// @ingroup TSP_General 1098 /// @param bEnable \b IN: Enable/Disable protect 1099 /// @param pphyStartAddr \b IN: Protect start address. Array[0-3]: [0]: PVR, [1-2]: Section, [3]: PVR1 1100 /// @param pphyEndAddr \b IN: Protect end address. Array[0-3]: [0]: PVR, [1-2]: Section, [3]: PVR1 1101 /// @return DMX_FILTER_STATUS_OK - Success 1102 /// @return DMX_FILTER_STATUS_ERROR - Failure 1103 //------------------------------------------------------------------------------------------------- 1104 // void MApi_DMX_WriteProtect_Enable(MS_BOOL bEnable, MS_PHY* pphyStartAddr, MS_PHY* pphyEndAddr); 1105 1106 //------------------------------------------------------------------------------------------------- 1107 /// Enable/Disable Demux MIU internal Firmware write protect. 1108 /// @ingroup TSP_General 1109 /// @param bEnable \b IN: Enable/Disable protect 1110 /// @param phyStartAddr \b IN: Protect start address. 1111 /// @param phyEndAddr \b IN: Protect end address. 1112 /// @return DMX_FILTER_STATUS_OK - Success 1113 /// @return DMX_FILTER_STATUS_ERROR - Failure 1114 //------------------------------------------------------------------------------------------------- 1115 // void MApi_DMX_OrzWriteProtect_Enable(MS_BOOL bEnable, MS_PHY phyStartAddr, MS_PHY phyEndAddr); 1116 //----------------- 1117 // DMX_ToBeRemove 1118 //----------------- 1119 //------------------------------------------------------------------------------------------------- 1120 /// Read drop packet count of AV due to duplicate. (Use new debug function to get this information) 1121 /// @ingroup DMX_ToBeRemove 1122 /// @param eDmxPktType \b IN: The packet type wihch want to remove 1123 /// @param bEnable \b IN: Enable or Disable 1124 /// @return DMX_FILTER_STATUS_OK - Success 1125 /// @return DMX_FILTER_STATUS_ERROR - Failure 1126 //------------------------------------------------------------------------------------------------- 1127 // // DMX_FILTER_STATUS MApi_DMX_Read_DropPktCnt(MS_U16* pu16ADropCnt, MS_U16* pu16VDropCnt); 1128 // DMX_FILTER_STATUS MApi_DMX_Read_DropPktCnt(MS_U16* pu16ADropCnt, MS_U16* pu16VDropCnt); 1129 //------------------------------------------------------------------------------------------------- 1130 /// Control DMX STR functions. 1131 /// @ingroup DMX_STR 1132 /// @param u16PowerState \b IN: STR power mode. (to control STR suspend & resume case.) 1133 /// @param phyFWAddr \b IN: TSP firmware load address 1134 /// @param u32FWSize \b IN: TSP firmware size 1135 /// @return : Utopia status - UTOPIA_STATUS_SUCCESS (Succeed) or UTOPIA_STATUS_FAIL (Fail) 1136 //------------------------------------------------------------------------------------------------- 1137 MS_U32 MApi_DMX_SetPowerState(EN_POWER_MODE u16PowerState, MS_PHY phyFWAddr, MS_U32 u32FWSize); 1138 DMX_FILTER_STATUS MApi_DMX_TEI_RemoveErrorPkt(DMX_TEI_RmPktType eDmxPktType, MS_BOOL bEnable); 1139 //------------------------------------------------------------------------------------------------- 1140 /// Set Demux Flow packet mode 1141 /// @ingroup TSP_General 1142 /// @param DmxFlow \b IN: TSP flow path 1143 /// @param ePktMode \b IN: Packet mode of flow path. 1144 /// @return DMX_FILTER_STATUS_OK - Success 1145 /// @return DMX_FILTER_STATUS_ERROR - Failure 1146 //------------------------------------------------------------------------------------------------- 1147 // DMX_FILTER_STATUS MApi_DMX_SetPacketMode(DMX_FLOW DmxFlow, DMX_PacketMode ePktMode); 1148 //------------------------------------------------------------------------------------------------- 1149 /// Set Sync Byte value to Stream source ID or TS source ID. 1150 /// @ingroup TSP_Merge 1151 /// @param u32SrcID \b IN: Index of stream source id or TS source id 1152 /// @param u8SyncByte \b IN: Sync byte, defalut value is 0x47 1153 /// @return DMX_FILTER_STATUS_OK - Success 1154 /// @return DMX_FILTER_STATUS_ERROR - Failure 1155 /// @note: u32SrcID - Stream source ID is from 0 ~7 1156 /// TS source ID is mapping TSIF index 1157 //------------------------------------------------------------------------------------------------- 1158 // DMX_FILTER_STATUS MApi_DMX_SetMergeStrSyncByte(MS_U32 u32SrcID, MS_U8 u8SyncByte); 1159 //------------------------------------------------------------------------------------------------- 1160 /// Set enable/disable drop scramble packet of FIFO/PVR. If enable, scramble packet can't pass through FIFO/PVR. 1161 /// @ingroup TSP_General 1162 /// @param DmxFltType \b IN: Type select: FIFO or PVR 1163 /// @param bEnable \b IN: Enable/Disable 1164 /// @return DMX_FILTER_STATUS_OK - Success 1165 /// @return DMX_FILTER_STATUS_ERROR - Failure 1166 //------------------------------------------------------------------------------------------------- 1167 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_DropScmbPkt(DMX_FILTER_TYPE pDmxFltType, MS_BOOL bEnable); 1168 1169 // owner ship set/checking 1170 //-------------------------------------------------------------------------------------------------- 1171 /// Set demux filter owner. 1172 /// @ingroup TSP_General 1173 /// @param u8DmxIdStart \b IN: Demux filter start index 1174 /// @param u8DmxIdEnd \b IN: Demux filter end index 1175 /// @param bOwner \b IN: TRUE for owner, FALSE for not owner 1176 /// @return DMX_FILTER_STATUS_OK - Success 1177 /// @return DMX_FILTER_STATUS_ERROR - Failure 1178 //-------------------------------------------------------------------------------------------------- 1179 DMX_FILTER_STATUS MApi_DMX_SetOwner(MS_U8 u8DmxIdStart, MS_U8 u8DmxIdEnd, MS_BOOL bOwner); //OBSOLETE 1180 1181 //-------------------------------------------------------------------------------------------------- 1182 /// Query DMX specific hardware capability. 1183 /// @ingroup TSP_General 1184 /// @param DmxQueryType \b IN: query type 1185 /// @param pOutput \b OUT: answer of query type 1186 /// @return DMX_FILTER_STATUS_OK - Success 1187 /// @return DMX_FILTER_STATUS_ERROR - Failure 1188 //-------------------------------------------------------------------------------------------------- 1189 DMX_FILTER_STATUS MApi_DMX_GetCap(DMX_QUERY_TYPE DmxQueryType, void* pOutput); 1190 //----------------- 1191 // DMX_ToBeModified 1192 //----------------- 1193 //-------------------------------------------------------------------------------------------------- 1194 /// Query DMX specific hardware capability by string type. 1195 /// @ingroup DMX_ToBeModified_TSP 1196 /// @param pstrQueryType \b IN: String of capability item 1197 /// @param s32Strlen \b IN: String size of capability item 1198 /// @param pOutput \b OUT: answer of query type 1199 /// @param pseOutSize \b OUT: Output data length 1200 /// @return DMX_FILTER_STATUS_OK - Success 1201 /// @return DMX_FILTER_STATUS_ERROR - Failure 1202 /// @note: Keep MApi_DMX_GetCap function and refine interface for parameter 1203 //-------------------------------------------------------------------------------------------------- 1204 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_GetCap_Ex(char* pstrQueryType, MS_S32 s32Strlen, void* pOutput, MS_S32* ps32OutSize); 1205 1206 //------------------------------------------------------------------------------------------------- 1207 /// Invert Demux parallel input bit order 1208 /// @ingroup TSP_General 1209 /// @param DmxFlow \b IN: TSP flow path 1210 /// @param bInvert \b IN: Invert bit order of TS parallel in. (TRUE: Invert, FALSE: Not invert) 1211 /// @return DMX_FILTER_STATUS_OK - Success 1212 /// @return DMX_FILTER_STATUS_ERROR - Failure 1213 //------------------------------------------------------------------------------------------------ 1214 // DMX_FILTER_STATUS MApi_DMX_Parl_Invert(DMX_FLOW DmxFlow, MS_BOOL bInvert); 1215 //------------------------------------------------------------------------------------------------- 1216 /// Set Demux DMA burst length. 1217 /// @ingroup TSP_General 1218 /// @param BurstType \b IN: Burst length 1219 /// @return DMX_FILTER_STATUS_OK - Success 1220 /// @return DMX_FILTER_STATUS_ERROR - Failure 1221 //------------------------------------------------------------------------------------------------ 1222 // // DMX_FILTER_STATUS MApi_DMX_SetBurstLen(DMX_BURSTTYPE BurstType); 1223 // DMX_FILTER_STATUS MApi_DMX_SetBurstLen(DMX_BURSTTYPE BurstType); 1224 //------------------------------------------------------------------------------------------------- 1225 /// Enable/Disable TSP VQ. 1226 /// @ingroup TSP_General 1227 /// @param bEnable \b IN: Enable/Disable 1228 /// @return DMX_FILTER_STATUS_OK - Success 1229 /// @return DMX_FILTER_STATUS_ERROR - Failure 1230 //------------------------------------------------------------------------------------------------- 1231 // DMX_FILTER_STATUS MApi_DMX_VQ_Enable(MS_BOOL bEnable); 1232 1233 //----------------- 1234 // TSP_Flow 1235 //----------------- 1236 //------------------------------------------------------------------------------------------------- 1237 /// Set Demux Flow config. 1238 /// @ingroup TSP_Flow 1239 /// @param DmxFlow \b IN: TSP flow path 1240 /// @param DmxFlowInput \b IN: Input port. (ex: external pad0, internal demod...etc) 1241 /// @param bClkInv \b IN: TS-in options: clock phase inversion 1242 /// @param bExtSync \b IN: TS-in options: sync by external signal 1243 /// @param bParallel \b IN: TS-in is parallel interface or serial interface 1244 /// @return DMX_FILTER_STATUS_OK - Success 1245 /// @return DMX_FILTER_STATUS_ERROR - Failure 1246 //------------------------------------------------------------------------------------------------- 1247 DMX_FILTER_STATUS MApi_DMX_FlowSet(DMX_FLOW DmxFlow, DMX_FLOW_INPUT DmxFlowInput, MS_BOOL bClkInv, MS_BOOL bExtSync, MS_BOOL bParallel); 1248 //-------------------------------------------------------------------------------------------------- 1249 /// Setting PVR flow. 1250 /// @ingroup TSP_Flow 1251 /// @param Eng \b IN: PVR Engine ID 1252 /// @param ePvrSrcTSIf \b IN: Select the record source 1253 /// @param bDscmbRec \b IN: TRUE for recording dscmbled stream; FALSE for recording orignal stream 1254 /// @return DMX_FILTER_STATUS_OK - Success 1255 /// @return DMX_FILTER_STATUS_ERROR - Failure 1256 //-------------------------------------------------------------------------------------------------- 1257 DMX_FILTER_STATUS MApi_DMX_PVR_FlowSet(DMX_PVR_ENG Eng, DMX_TSIF ePvrSrcTSIf, MS_BOOL bDscmbRec); 1258 1259 //------------------------------------------------------------------------------------------------- 1260 /// Get Demux Flow setting. 1261 /// @ingroup TSP_Flow 1262 /// @param DmxFlow \b IN: TSP flow path 1263 /// @param pDmxFlowInput \b OUT: pointer to store DMX input flow value. 1264 /// @param pbClkInv \b OUT: pointer to store clock phase inversion 1265 /// @param pbExtSync \b OUT: pointer to store sync by external signal 1266 /// @param pbParallel \b OUT: pointer to store parallel interface or serial interface 1267 /// @return DMX_FILTER_STATUS_OK - Success 1268 /// @return DMX_FILTER_STATUS_ERROR - Failure 1269 //------------------------------------------------------------------------------------------------- 1270 DMX_FILTER_STATUS MApi_DMX_Get_FlowInput_Status(DMX_FLOW DmxFlow, DMX_FLOW_INPUT *pDmxFlowInput, MS_BOOL *pbClkInv, MS_BOOL *pbExtSync, MS_BOOL *pbParallel); 1271 1272 //------------------------------------------------------------------------------------------------- 1273 /// Enable Demux flow path. 1274 /// @ingroup TSP_Flow 1275 /// @param DmxFlow \b IN: TSP flow path 1276 /// @param bEnable \b IN: TRUE: enable, FALSE: disable 1277 /// @return DMX_FILTER_STATUS_OK - Success 1278 /// @return DMX_FILTER_STATUS_ERROR - Failure 1279 //------------------------------------------------------------------------------------------------- 1280 // DMX_FILTER_STATUS MApi_DMX_FlowEnable(DMX_FLOW DmxFlow, MS_BOOL bEnable); 1281 //------------------------------------------------------------------------------------------------- 1282 /// Set/Get DScmbler engine id depend on TSIF path 1283 /// @ingroup TSP_Flow 1284 /// @param eTsIf \b IN: TSP flow path (interface) 1285 /// @param pu32EngId \b IN/OUT: pointer to store dscmb engine id 1286 /// @param bSet \b IN: TRUE:Set dscmb engine id ; FALSE: Get dscmb engine id 1287 /// @return DMX_FILTER_STATUS_OK - Success 1288 /// @return DMX_FILTER_STATUS_ERROR - Failure 1289 //------------------------------------------------------------------------------------------------- 1290 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_Flow_DscmbEng(DMX_TSIF eTsIf, MS_U32* pu32EngId, MS_BOOL bSet); 1291 1292 //------------------------------------------------------------------------------------------------- 1293 /// Configure TS output pad. 1294 /// @ingroup TSP_Flow 1295 /// @param eOutPad \b IN: Select output pad 1296 /// @param eInSrcPad \b IN: Select input source pad 1297 /// @param bInParallel \b IN: TRUE: input source is paralleled; FALSE: input source is serial in 1298 /// @param u32ResvNum \b IN: Reserved value of the number of reserved parameters for future using 1299 /// @param pu32vRes \b IN: Reserved pointer to store parameters for future using 1300 /// @return DMX_FILTER_STATUS_OK - Success 1301 /// @return DMX_FILTER_STATUS_ERROR - Failure 1302 /// @note Only EXT_PAD1 and EXT_PAD3 has output mode 1303 /// @note If output from S2P mode, input source should be external input pad only 1304 /// @note If output from TSO mode, eInputPad should be E_DRVTSP_PAD_TSO 1305 /// @note If input source is internal demod, output mode can be demod out or TSO out 1306 //------------------------------------------------------------------------------------------------- 1307 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TsOutputPadCfg(DMX_FLOW_OUTPUT_PAD eOutPad, DMX_FLOW_INPUT eInSrcPad, MS_BOOL bInParallel, MS_U32 u32ResvNum, MS_U32 *pu32Resv); 1308 1309 //-------------------------------------------------------------------------------------------------/// Configure output pad 1310 /// Set S2P output clock phase and invert. 1311 /// @ingroup TSP_Flow 1312 /// @param u16Val \b IN: Value of phase 1313 /// @param bEnable \b IN: Enable/Disable phase tuning 1314 /// @param u32Reserved \b IN: Reserved for future using 1315 /// @return DMX_FILTER_STATUS_OK - Success 1316 /// @return DMX_FILTER_STATUS_ERROR - Failure 1317 /// @note Configure for S2P mode 1318 //------------------------------------------------------------------------------------------------- 1319 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TsS2POutputClkPhase(MS_U16 u16Val, MS_BOOL bEnable, MS_U32 u32S2pOpt); 1320 1321 //----------------- 1322 // TSP_STC 1323 //----------------- 1324 //-------------------------------------------------------------------------------------------------- 1325 /// Enable/Disable STC64 bit mode. 1326 /// @ingroup TSP_STC 1327 /// @param bEnable \b IN: Enable or Disable STC64 mode 1328 /// @return DMX_FILTER_STATUS_OK - Success 1329 /// @return DMX_FILTER_STATUS_ERROR - Failure 1330 /// @note This is also set by TSP init function. 1331 //-------------------------------------------------------------------------------------------------- 1332 DMX_FILTER_STATUS MApi_DMX_STC64_Mode_Enable(MS_BOOL bEnable); 1333 //------------------------------------------------------------------------------------------------- 1334 /// Get STC counter. 1335 /// @ingroup DMX_ToBeRemove 1336 /// @param pu32Stc32 \b OUT: STC counter (bit 32) 1337 /// @param pu32Stc \b OUT: STC counter (bit 31 to bit 0) 1338 /// @return DMX_FILTER_STATUS_OK - Success 1339 /// @return DMX_FILTER_STATUS_ERROR - Failure 1340 //------------------------------------------------------------------------------------------------- 1341 DMX_FILTER_STATUS MApi_DMX_Stc_Get(MS_U32* pu32Stc32, MS_U32* pu32Stc); 1342 //------------------------------------------------------------------------------------------------- 1343 /// Set STC counter. 1344 /// @ingroup DMX_ToBeRemove 1345 /// @param pu32Stc32 \b OUT: STC counter (bit 32) 1346 /// @param pu32Stc \b OUT: STC counter (bit 31 to bit 0) 1347 /// @return DMX_FILTER_STATUS_OK - Success 1348 /// @return DMX_FILTER_STATUS_ERROR - Failure 1349 //------------------------------------------------------------------------------------------------- 1350 DMX_FILTER_STATUS MApi_DMX_Stc_Set(MS_U32 u32Stc32, MS_U32 u32Stc); 1351 //------------------------------------------------------------------------------------------------- 1352 /// Get PCR value. 1353 /// @ingroup DMX_ToBeRemove 1354 /// @param pu32Pcr32 \b OUT: PCR counter (bit 32) 1355 /// @param pu32Pcr \b OUT: PCR counter (bit 31 to bit 0) 1356 /// @return DMX_FILTER_STATUS_OK - Success 1357 /// @return DMX_FILTER_STATUS_ERROR - Failure 1358 //------------------------------------------------------------------------------------------------- 1359 DMX_FILTER_STATUS MApi_DMX_Pcr_Get(MS_U32* pu32Pcr32, MS_U32* pu32Pcr); 1360 //------------------------------------------------------------------------------------------------- 1361 /// Select STC Engine. 1362 /// @ingroup TSP_STC 1363 /// @param eFltSrc \b IN: Fliter Source type and Filter source ID 1364 /// @param u32StcEng \b IN: STC engine ID (0, 1) 1365 /// @return DMX_FILTER_STATUS_OK - Success 1366 /// @return DMX_FILTER_STATUS_ERROR - Failure 1367 /// @note Only support in driver version 3.0. 1368 //------------------------------------------------------------------------------------------------- 1369 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_Stc_Select(DMX_FILTER_TYPE eFltSrc, MS_U32 u32StcEng); 1370 //------------------------------------------------------------------------------------------------- 1371 /// Get STC counter. 1372 /// @ingroup TSP_STC 1373 /// @param u8Eng \b IN: STC Engine ID 1374 /// @param pu32Stc32 \b OUT: STC counter (bit 32) 1375 /// @param pu32Stc \b OUT: STC counter (bit 31 to bit 0) 1376 /// @return DMX_FILTER_STATUS_OK - Success 1377 /// @return DMX_FILTER_STATUS_ERROR - Failure 1378 //------------------------------------------------------------------------------------------------- 1379 DMX_FILTER_STATUS MApi_DMX_Stc_Eng_Get(MS_U8 u8Eng, MS_U32* pu32Stc32, MS_U32* pu32Stc); 1380 1381 //------------------------------------------------------------------------------------------------- 1382 /// Set STC counter. 1383 /// @ingroup TSP_STC 1384 /// @param u8Eng \b IN: STC Engine ID 1385 /// @param pu32Stc32 \b OUT: STC counter (bit 32) 1386 /// @param pu32Stc \b OUT: STC counter (bit 31 to bit 0) 1387 /// @return DMX_FILTER_STATUS_OK - Success 1388 /// @return DMX_FILTER_STATUS_ERROR - Failure 1389 //------------------------------------------------------------------------------------------------- 1390 DMX_FILTER_STATUS MApi_DMX_Stc_Eng_Set(MS_U8 u8Eng, MS_U32 u32Stc32, MS_U32 u32Stc); 1391 1392 //------------------------------------------------------------------------------------------------- 1393 /// Get PCR. 1394 /// @ingroup TSP_STC 1395 /// @param u32PcrEng \b INPUT: PCR Eng 1396 /// @param pu32Pcr32 \b OUT: PCR counter (bit 32) 1397 /// @param pu32Pcr \b OUT: PCR counter (bit 31 to bit 0) 1398 /// @return DMX_FILTER_STATUS_OK - Success 1399 /// @return DMX_FILTER_STATUS_ERROR - Failure 1400 //------------------------------------------------------------------------------------------------- 1401 DMX_FILTER_STATUS MApi_DMX_Pcr_Eng_Get(MS_U8 u8PcrEng, MS_U32* pu32Pcr32, MS_U32* pu32Pcr); 1402 //------------------------------------------------------------------------------------------------- 1403 /// Set STC control. 1404 /// @ingroup TSP_STC 1405 /// @param u8Eng \b IN: STC Engine ID 1406 /// @param eMode \b IN: STC update control options 1407 /// @return DMX_FILTER_STATUS_OK - Success 1408 /// @return DMX_FILTER_STATUS_ERROR - Failure 1409 /// @note eMode: 0x00 -> Update STC by TSP FW 1410 /// @note 0x01 -> Update STC by HK 1411 /// @note 0x02 -> Update STC Once when PCR reset 1412 //------------------------------------------------------------------------------------------------- 1413 DMX_FILTER_STATUS MApi_DMX_STC_UpdateCtrl(MS_U8 u8Eng, eStcUpdateCtrlMode eMode); 1414 //------------------------------------------------------------------------------------------------- 1415 /// Add or subtract STC Offset. 1416 /// @ingroup TSP_STC 1417 /// @param u8Eng \b IN: STC Engine ID 1418 /// @param u32Offset \b IN: STC offset value 1419 /// @param bAdd \b IN: If TRUE, add the offset value; otherwise subtract the offset value 1420 /// @return DMX_FILTER_STATUS_OK - Success 1421 /// @return DMX_FILTER_STATUS_ERROR - Failure 1422 //------------------------------------------------------------------------------------------------- 1423 // DMX_FILTER_STATUS MApi_DMX_Stc_Eng_SetOffset(MS_U32 u32Eng, MS_U32 u32Offset, MS_BOOL bAdd); 1424 1425 //------------------------------------------------------------------------------------------------- 1426 /// Adjust STC Clock. 1427 /// @ingroup TSP_STC 1428 /// @param u32EngId \b IN: STC Engine ID 1429 /// @param bUpClk \b IN: If TRUE, Clk will be faster, and if FALSE, Clk will be slower 1430 /// @param u32Percentage \b IN: The percentage of STC clock ratio 1431 /// @return DMX_FILTER_STATUS_OK - Success 1432 /// @return DMX_FILTER_STATUS_ERROR - Failure 1433 //------------------------------------------------------------------------------------------------- 1434 DMX_FILTER_STATUS MApi_DMX_Stc_Clk_Adjust(MS_U32 u32EngId, MS_BOOL bUpClk, MS_U32 u32Percentage); 1435 1436 //----------------- 1437 // TSP_Filter 1438 //----------------- 1439 //------------------------------------------------------------------------------------------------- 1440 /// Open a demux filter. 1441 /// @ingroup TSP_Filter 1442 /// @param DmxFltType \b IN: The filter information to allocate 1443 /// @param pu8DmxId \b OUT: The available demux filer index 1444 /// @return DMX_FILTER_STATUS_OK - Success 1445 /// @return DMX_FILTER_STATUS_ERROR - Failure 1446 //------------------------------------------------------------------------------------------------- 1447 DMX_FILTER_STATUS MApi_DMX_Open(DMX_FILTER_TYPE DmxFltType, MS_U8* pu8DmxId); 1448 1449 //------------------------------------------------------------------------------------------------- 1450 /// Close a demux filter. 1451 /// @ingroup TSP_Filter 1452 /// @param u8DmxId \b IN: the demux filer index to free 1453 /// @return DMX_FILTER_STATUS_OK - Success 1454 /// @return DMX_FILTER_STATUS_ERROR - Failure 1455 //------------------------------------------------------------------------------------------------- 1456 DMX_FILTER_STATUS MApi_DMX_Close(MS_U8 u8DmxId); 1457 1458 //------------------------------------------------------------------------------------------------- 1459 /// Activate a demux filter. 1460 /// @ingroup TSP_Filter 1461 /// @param u8DmxId \b IN: the demux filer index to activate 1462 /// @return DMX_FILTER_STATUS_OK - Success 1463 /// @return DMX_FILTER_STATUS_ERROR - Failure 1464 //------------------------------------------------------------------------------------------------- 1465 DMX_FILTER_STATUS MApi_DMX_Start(MS_U8 u8DmxId); 1466 1467 //------------------------------------------------------------------------------------------------- 1468 /// Deactivate a demux filter. 1469 /// @ingroup TSP_Filter 1470 /// @param u8DmxId \b IN: the demux filer index to deactivate 1471 /// @return DMX_FILTER_STATUS_OK - Success 1472 /// @return DMX_FILTER_STATUS_ERROR - Failure 1473 //------------------------------------------------------------------------------------------------- 1474 DMX_FILTER_STATUS MApi_DMX_Stop(MS_U8 u8DmxId); 1475 1476 //------------------------------------------------------------------------------------------------- 1477 /// Get a demux filter information. 1478 /// @ingroup TSP_Filter 1479 /// @param u8DmxId \b IN: the demux filer index 1480 /// @param pDmxFltInfo \b IN/OUT: the demux filer info 1481 /// @param pDmxFltType \b IN/OUT: the demux filer type 1482 /// @param bSet \b IN: set/get 1483 /// @return DMX_FILTER_STATUS_OK - Success 1484 /// @return DMX_FILTER_STATUS_ERROR - Failure 1485 //------------------------------------------------------------------------------------------------- 1486 DMX_FILTER_STATUS MApi_DMX_Info(MS_U8 u8DmxId, DMX_Flt_info* pDmxFltInfo, DMX_FILTER_TYPE* pDmxFltType, MS_BOOL bSet); 1487 1488 //------------------------------------------------------------------------------------------------- 1489 /// Set a demux filter PID. 1490 /// @ingroup TSP_Filter 1491 /// @param u8DmxId \b IN: the demux filer index 1492 /// @param pu16Pid \b IN/OUT: PID 1493 /// @param bSet \b IN: set/get 1494 /// @return DMX_FILTER_STATUS_OK - Success 1495 /// @return DMX_FILTER_STATUS_ERROR - Failure 1496 //------------------------------------------------------------------------------------------------- 1497 DMX_FILTER_STATUS MApi_DMX_Pid(MS_U8 u8DmxId, MS_U16* pu16Pid, MS_BOOL bSet); 1498 1499 //------------------------------------------------------------------------------------------------- 1500 /// Get a demux filter status. 1501 /// @ingroup TSP_Filter 1502 /// @param u8DmxId \b IN: the demux filer index 1503 /// @param pbEnable \b OUT: the demux filer enable/disable 1504 /// @return DMX_FILTER_STATUS_OK - Success 1505 /// @return DMX_FILTER_STATUS_ERROR - Failure 1506 //------------------------------------------------------------------------------------------------- 1507 DMX_FILTER_STATUS MApi_DMX_IsStart(MS_U8 u8DmxId, MS_BOOL* pbEnable); 1508 1509 //-------------------------------------------------------------------------------------------------- 1510 /// Copy section data to assigned buffer 1511 /// @ingroup TSP_Filter 1512 /// @param u8DmxId \b IN: demux ID 1513 /// @param pu8Buf \b OUT: section buffer address 1514 /// @param u32BufSize \b IN: section buffer size 1515 /// @param pu32ActualSize \b IN: section data size 1516 /// @param pu32RmnSize \b OUT: section buffer remainning data size 1517 /// @param pfCheckCB \b IN: callback function to check data correct or not 1518 /// @return DMX_FILTER_STATUS_OK - Success 1519 /// @return DMX_FILTER_STATUS_ERROR - Failure 1520 //-------------------------------------------------------------------------------------------------- 1521 DMX_FILTER_STATUS MApi_DMX_CopyData(MS_U8 u8DmxId, MS_U8* pu8Buf, MS_U32 u32BufSize, MS_U32* pu32ActualSize, MS_U32* pu32RmnSize, DMX_CheckCb pfCheckCB); 1522 1523 //-------------------------------------------------------------------------------------------------- 1524 /// Ask demuxer to process section/pvr data for Non-OS driver. 1525 /// @ingroup TSP_Filter 1526 /// @param u32FltId \b IN: Which filter id to process. 0xFFFFFFFF means process all filters 1527 /// @param u32Timeout \b IN: Max time for TSP to process 1528 /// @return DMX_FILTER_STATUS_OK - Success 1529 /// @return DMX_FILTER_STATUS_ERROR - Failure 1530 /// @note Calling this function in OS environment causes nothing 1531 //-------------------------------------------------------------------------------------------------- 1532 DMX_FILTER_STATUS MApi_DMX_Proc(MS_U8 u8DmxId, DMX_EVENT* pEvent); 1533 1534 //-------------------------------------------------------------------------------------------------- 1535 /// Change DMX filter source type. 1536 /// @ingroup TSP_Filter 1537 /// @param u8DmxId \b IN: DMX filter ID 1538 /// @param DmxFltSrcType \b IN: DMX filter Source Type and filter source id 1539 /// @return DMX_FILTER_STATUS_OK - Success 1540 /// @return DMX_FILTER_STATUS_ERROR - Failure 1541 //-------------------------------------------------------------------------------------------------- 1542 DMX_FILTER_STATUS MApi_DMX_Change_FilterSource(MS_U8 u8DmxId, DMX_FILTER_TYPE DmxFltSrcType); 1543 //-------------------------------------------------------------------------------------------------- 1544 ///MApi_DMX_FilterFlowSwitch : Switch filter source from one channel to another. 1545 /// @ingroup TSP_Filter 1546 /// @param TgtFlow \b IN: chagne to this path setting 1547 /// @return DMX_FILTER_STATUS_OK - Success 1548 /// @return DMX_FILTER_STATUS_ERROR - Failure 1549 /// @note TSP 1.0: 1550 /// @note DMX_FILTER_SOURCE_TYPE_LIVE 1551 /// @note DMX_FILTER_SOURCE_TYPE_TS1 1552 /// @note TSP 2.0: 1553 /// @note DMX_FILTER_SOURCE_TYPE_PLAYBACK 1554 /// @note DMX_FILTER_SOURCE_TYPE_PVR0 1555 /// @note DMX_FILTER_SOURCE_TYPE_PVR1 1556 /// @note TSP 4.0: 1557 /// @note DMX_FILTER_SOURCE_TYPE_LIVE 1558 /// @note DMX_FILTER_SOURCE_TYPE_FILE 1559 /// @note DMX_FILTER_SOURCE_TYPE_TS1 1560 /// @note DMX_FILTER_SOURCE_TYPE_TS2 1561 /// @note DMX_FILTER_SOURCE_TYPE_TS3 1562 //-------------------------------------------------------------------------------------------------- 1563 DMX_FILTER_STATUS MApi_DMX_LiveSrcSwitch(DMX_FILTER_TYPE TgtFlow); 1564 /// Get demux filter owner. 1565 /// @ingroup TSP_General 1566 /// @param u8DmxIdStart \b IN: Demux filter index 1567 /// @param bOwner \b OUT: Pointer to store return value of owner flag 1568 /// @return DMX_FILTER_STATUS_OK - Success 1569 /// @return DMX_FILTER_STATUS_ERROR - Failure 1570 //-------------------------------------------------------------------------------------------------- 1571 // DMX_FILTER_STATUS MApi_DMX_GetOwner(MS_U8 u8DmxId, MS_BOOL* pbOwner); //OBSOLETE 1572 //----------------- 1573 // TSP_SCMB 1574 //----------------- 1575 //------------------------------------------------------------------------------------------------- 1576 /// Get PID filter scramble status. 1577 /// @ingroup TSP_SCMB 1578 /// @param FltSrc \b IN : Filter source 1579 /// @param u32FltGroupId \b IN : Pid filter group id, every 32 filter for 1 group. 0: filter 0~31, 1: 32~63, 2: 64~95, 3: 96~127 1580 /// @param PidFltId \b IN : Pid filter id for getting. If 0xFFFFFFFF, means getting the status of all filters of the same group 1581 /// @param pu32ScmbSts \b OUT : The scrmabling status of pid filter. 1582 /// @return TSP_Result 1583 /// @note pu32ScmbSts: If getting all group status, every bit means one status of every filter. 1584 /// @note If only checking one filter, 1 means scrambled status and 0 means non-scrambled status. 1585 //------------------------------------------------------------------------------------------------- 1586 DMX_FILTER_STATUS MApi_DMX_Get_FltScmbSts(DMX_FILTER_TYPE FltSrc, MS_U32 u32FltGroupId, MS_U32 PidFltId, MS_U32 *pu32ScmbSts); 1587 //------------------------------------------------------------------------------------------------- 1588 /// Get the PES scrambling control status. 1589 /// @ingroup TSP_SCMB 1590 /// @param u8DmxId \b IN: the demux filer Id 1591 /// @param pu8scmb \b OUT: the PES scrambling status. bit 0~ bit3, Every bit indicates one status of one packet. bit4 ~ bit7, packet count 1592 /// @return DMX_FILTER_STATUS_OK - Success 1593 /// @return DMX_FILTER_STATUS_ERROR - Failure 1594 /// @note Must open and start filter with DMX_FILTER_TYPE_PACKET type and DMX_SECT_MODE_PESSCMCHK mode 1595 //------------------------------------------------------------------------------------------------- 1596 DMX_FILTER_STATUS MApi_DMX_Get_PesScmbSts(MS_U8 u8DmxId, MS_U8* pu8scmb); 1597 //------------------------------------------------------------------------------------------------- 1598 /// Get the TS scrambling control status. 1599 /// @ingroup TSP_SCMB 1600 /// @param u8DmxId \b IN: the demux filer Id 1601 /// @param pu8ScmSts \b OUT: TS scrambling status. bit 0~ bit3, Every bit indicates one status of one packet. bit4 ~ bit7, packet count 1602 /// @return DMX_FILTER_STATUS_OK - Success 1603 /// @return DMX_FILTER_STATUS_ERROR - Failure 1604 /// @note Must open and start filter with DMX_FILTER_TYPE_PACKET type and DMX_SECT_MODE_PESSCMCHK mode 1605 //------------------------------------------------------------------------------------------------- 1606 DMX_FILTER_STATUS MApi_DMX_Get_TsScmbSts(MS_U8 u8DmxId, MS_U8* pu8ScmSts); 1607 1608 //----------------- 1609 // TSP_STB 1610 //----------------- 1611 // ---------------- [NOTE] API for TSP Ver2.0 HW architecture.------------- 1612 //------------------------------------------------------------------------------------------------- 1613 /// Open a demux filter and attach to a existed filter and buffer 1614 /// @ingroup TSP_STB 1615 /// @param DmxFltType \b IN: the filter information to allocate 1616 /// @param pu8DmxId \b OUT: the available demux filer Id 1617 /// @param u8TargetDmxId \b IN: the target demux filer Id 1618 /// @return DMX_FILTER_STATUS_OK - Success 1619 /// @return DMX_FILTER_STATUS_ERROR - Failure 1620 /// @note Only use on TSP 2.0 (STB) 1621 /// @note API for U4 TSP N filter to 1 Buffer HW architecture. 1622 //------------------------------------------------------------------------------------------------- 1623 // DMX_FILTER_STATUS MApi_DMX_Open_MultiFlt( DMX_FILTER_TYPE DmxFltType , MS_U8* pu8DmxId, MS_U8 u8TargetDmxId); 1624 //------------------------------------------------------------------------------------------------- 1625 /// Enable drop section filter packet. 1626 /// @ingroup TSP_STB 1627 /// @param bSet \b IN: TRUE: enable, FALSE: disable 1628 /// @return DMX_FILTER_STATUS_OK - Success 1629 /// @return DMX_FILTER_STATUS_ERROR - Failure 1630 /// @note Only use on TSP 2.0 (STB) 1631 //------------------------------------------------------------------------------------------------- 1632 // DMX_FILTER_STATUS MApi_DMX_Drop_Enable(MS_BOOL bSet); 1633 //-------------------------------------------------------------------------------- 1634 1635 //----------------- 1636 // TSP_SecFilter 1637 //----------------- 1638 //------------------------------------------------------------------------------------------------- 1639 /// Reset demux filer buffer. 1640 /// @ingroup TSP_SecFilter 1641 /// @param u8DmxId \b IN: the target demux filer index 1642 /// @return DMX_FILTER_STATUS_OK - Success 1643 /// @return DMX_FILTER_STATUS_ERROR - Failure 1644 //------------------------------------------------------------------------------------------------- 1645 DMX_FILTER_STATUS MApi_DMX_SectReset(MS_U8 u8DmxId); 1646 //------------------------------------------------------------------------------------------------- 1647 /// Set the read pointer of demux filer buffer. 1648 /// @ingroup TSP_SecFilter 1649 /// @param u8DmxId \b IN: the target demux filer index 1650 /// @param Read \b IN: the read pointer to be set 1651 /// @return DMX_FILTER_STATUS_OK - Success 1652 /// @return DMX_FILTER_STATUS_ERROR - Failure 1653 //------------------------------------------------------------------------------------------------- 1654 DMX_FILTER_STATUS MApi_DMX_SectReadSet(MS_U8 u8DmxId, MS_PHY Read); 1655 //------------------------------------------------------------------------------------------------- 1656 /// Get the read pointer of demux filer buffer. 1657 /// @ingroup TSP_SecFilter 1658 /// @param u8DmxId \b IN: the target demux filer index 1659 /// @param pRead \b OUT: the pointer to store the obtained read pointer 1660 /// @return DMX_FILTER_STATUS_OK - Success 1661 /// @return DMX_FILTER_STATUS_ERROR - Failure 1662 //------------------------------------------------------------------------------------------------- 1663 DMX_FILTER_STATUS MApi_DMX_SectReadGet(MS_U8 u8DmxId, MS_PHY* pRead); 1664 //------------------------------------------------------------------------------------------------- 1665 /// Get the write pointer of demux filer buffer. 1666 /// @ingroup TSP_SecFilter 1667 /// @param u8DmxId \b IN: the target demux filer index 1668 /// @param pWrite \b OUT: the pointer to store the obtained write pointer 1669 /// @return DMX_FILTER_STATUS_OK - Success 1670 /// @return DMX_FILTER_STATUS_ERROR - Failure 1671 //------------------------------------------------------------------------------------------------- 1672 DMX_FILTER_STATUS MApi_DMX_SectWriteGet(MS_U8 u8DmxId, MS_PHY* pWrite); 1673 //------------------------------------------------------------------------------------------------- 1674 /// Get the start pointer of demux filer buffer. 1675 /// @ingroup TSP_SecFilter 1676 /// @param u8DmxId \b IN: the target demux filer index 1677 /// @param pStart \b OUT: the pointer to store the obtained start pointer 1678 /// @return DMX_FILTER_STATUS_OK - Success 1679 /// @return DMX_FILTER_STATUS_ERROR - Failure 1680 //------------------------------------------------------------------------------------------------- 1681 DMX_FILTER_STATUS MApi_DMX_SectStartGet(MS_U8 u8DmxId, MS_PHY* pStart); 1682 //------------------------------------------------------------------------------------------------- 1683 /// Get the end pointer of demux filer buffer. 1684 /// @ingroup TSP_SecFilter 1685 /// @param u8DmxId \b IN: the target demux filer index 1686 /// @param pEnd \b OUT: the pointer to store the obtained end pointer 1687 /// @return DMX_FILTER_STATUS_OK - Success 1688 /// @return DMX_FILTER_STATUS_ERROR - Failure 1689 //------------------------------------------------------------------------------------------------- 1690 DMX_FILTER_STATUS MApi_DMX_SectEndGet(MS_U8 u8DmxId, MS_PHY* pEnd); 1691 //------------------------------------------------------------------------------------------------- 1692 /// Set demux filer match patterns. 1693 /// @ingroup TSP_SecFilter 1694 /// @param u8DmxId \b IN: the target demux filer index 1695 /// @param pPattern \b IN: the match patterns 1696 /// @param pMask \b IN: the bit mask for match patterns 1697 /// @param pu8NotMask \b IN: the bit mask for negative match patterns 1698 /// @param MatchSize \b IN: the size in bytes for match patterns. 1699 /// @return DMX_FILTER_STATUS_OK - Success 1700 /// @return DMX_FILTER_STATUS_ERROR - Failure 1701 /// @note The match pattern size is 16 bytes 1702 /// @note match mask -- must set 1 to be compare (customer request) 1703 /// @note not match mask -- must set 1 to compare 1704 //------------------------------------------------------------------------------------------------- 1705 DMX_FILTER_STATUS MApi_DMX_SectPatternSet(MS_U8 u8DmxId, MS_U8* pPattern, MS_U8* pMask, MS_U8 *pu8NotMask, MS_U32 MatchSize); 1706 1707 //----------------- 1708 // TSP_TTX 1709 //----------------- 1710 //------------------------------------------------------------------------------------------------- 1711 /// Get Teltext section buffer write address. 1712 /// @ingroup TSP_TTX 1713 /// @param u8DmxId \b IN: the target demux filer index 1714 /// @param pWrite \b OUT: the pointer to store the obtained write pointer 1715 /// @return DMX_FILTER_STATUS_OK - Success 1716 /// @return DMX_FILTER_STATUS_ERROR - Failure 1717 /// @note Special case for TTX due to it can't use HW lock to do indirect read/write. (co-processer) 1718 //------------------------------------------------------------------------------------------------- 1719 // DMX_FILTER_STATUS MApi_DMX_TTX_WriteGet(MS_U8 u8DmxId, MS_PHY* pWrite); 1720 1721 //------------------------------------------------------------------------------------------------- 1722 /// Check can access TSP or not due to different CPU co-process. (HK and AEON) 1723 /// @ingroup TSP_TTX 1724 /// @param u32Try \b IN: TRUE: check, FALSE: not check 1725 /// @return DMX_FILTER_STATUS_OK - Success 1726 /// @return DMX_FILTER_STATUS_ERROR - Failure 1727 //------------------------------------------------------------------------------------------------- 1728 // DMX_FILTER_STATUS MApi_DMX_GetAccess(MS_U32 u32Try); //OBSOLETE 1729 //------------------------------------------------------------------------------------------------- 1730 /// Unlock HW semaphore. 1731 /// @ingroup TSP_TTX 1732 /// @return DMX_FILTER_STATUS_OK - Success 1733 /// @return DMX_FILTER_STATUS_ERROR - Failure 1734 //------------------------------------------------------------------------------------------------- 1735 // DMX_FILTER_STATUS MApi_DMX_ReleaseAccess(void); //OBSOLETE 1736 1737 //----------------- 1738 // TSP_FIFO 1739 //----------------- 1740 //-------------------------------------------------------------------------------------------------- 1741 /// Reset AVFIFO. 1742 /// @ingroup TSP_FIFO 1743 /// @param DmxFltType \b IN: demux type 1744 /// @param bReset \b IN: section buffer size 1745 /// @return DMX_FILTER_STATUS_OK - Success 1746 /// @return DMX_FILTER_STATUS_ERROR - Failure 1747 //-------------------------------------------------------------------------------------------------- 1748 DMX_FILTER_STATUS MApi_DMX_AVFifo_Reset(DMX_FILTER_TYPE DmxFltType, MS_BOOL bFlush); 1749 1750 //-------------------------------------------------------------------------------------------------- 1751 /// Get AVFIFO status (Level). 1752 /// @ingroup TSP_FIFO 1753 /// @param DmxFltType \b IN: demux type 1754 /// @param u32FifoLevel \b OUT: fifo level 1755 /// @return DMX_FILTER_STATUS_OK - Success 1756 /// @return DMX_FILTER_STATUS_ERROR - Failure 1757 //-------------------------------------------------------------------------------------------------- 1758 DMX_FILTER_STATUS MApi_DMX_AVFifo_Status(DMX_FILTER_TYPE DmxFltType, DMX_FIFO_STATUS* u32FifoLevel); 1759 //-------------------------------------------------------------------------------------------------- 1760 /// Enable remove duplicate A/V packets. 1761 /// @ingroup DMX_ToBeRemove 1762 /// @param bEnable \b IN: Enable or Disable 1763 /// @return DMX_FILTER_STATUS_OK - Success 1764 /// @return DMX_FILTER_STATUS_ERROR - Failure 1765 /// @note It will apply to all FIFO. 1766 //-------------------------------------------------------------------------------------------------- 1767 DMX_FILTER_STATUS MApi_DMX_RemoveDupAVPkt(MS_BOOL bEnable); 1768 1769 //-------------------------------------------------------------------------------------------------- 1770 /// Enable remove duplicate A/V Fifo packets. 1771 /// @ingroup TSP_FIFO 1772 /// @param DmxFltType \b IN: demux type 1773 /// @param bEnable \b IN: Enable or Disable 1774 /// @return DMX_FILTER_STATUS_OK - Success 1775 /// @return DMX_FILTER_STATUS_ERROR - Failure 1776 //-------------------------------------------------------------------------------------------------- 1777 // DMX_FILTER_STATUS MApi_DMX_RemoveDupAVFifoPkt(DMX_FILTER_TYPE DmxFltType, MS_BOOL bEnable); 1778 1779 //-------------------------------------------------------------------------------------------------- 1780 /// Enable/Disable Audio AB S 1781 /// @ingroup TSP_FIFO 1782 ///@param bEnable \b IN: Enable/Disable 1783 /// @return DMX_FILTER_STATUS_OK - Success 1784 /// @return DMX_FILTER_STATUS_ERROR - Failure 1785 //-------------------------------------------------------------------------------------------------- 1786 // DMX_FILTER_STATUS MApi_DMX_AU_BD_Mode_Enable(MS_BOOL bEnable); 1787 1788 //-------------------------------------------------------------------------------------------------- 1789 /// Enable/Disable AV FIFO block mechanism. 1790 /// @ingroup TSP_FIFO 1791 /// @param DmxFltType \b IN: demux type 1792 /// @param bEnable \b OUT: TRUR: Enable block mechanism, FALSE: Disable block mechanism 1793 /// @return DMX_FILTER_STATUS_OK - Success 1794 /// @return DMX_FILTER_STATUS_ERROR - Failure 1795 /// @note Not supprot for all chips 1796 //-------------------------------------------------------------------------------------------------- 1797 // DMX_FILTER_STATUS MApi_DMX_AVFifo_BlockEnable(DMX_FILTER_TYPE DmxFltType, MS_BOOL bEnable); 1798 1799 // PVR Record API (Old) 1800 //------------------------------------------------------------------------------------------------- 1801 /// Set up the recording parameters. 1802 /// @ingroup DMX_ToBeRemove 1803 /// @param pInfo \b IN: the recording parameters 1804 /// @return DMX_FILTER_STATUS_OK - Success 1805 /// @return DMX_FILTER_STATUS_ERROR - Failure 1806 /// @note Keep the function which have engine parameter. 1807 //------------------------------------------------------------------------------------------------- 1808 DMX_FILTER_STATUS MApi_DMX_Pvr_Open(DMX_Pvr_info* pPvrInfo); 1809 //------------------------------------------------------------------------------------------------- 1810 /// Clear the recording parameters. 1811 /// @ingroup DMX_ToBeRemove 1812 /// @return DMX_FILTER_STATUS_OK - Success 1813 /// @return DMX_FILTER_STATUS_ERROR - Failure 1814 /// @note Keep the function which have engine parameter. 1815 //------------------------------------------------------------------------------------------------- 1816 DMX_FILTER_STATUS MApi_DMX_Pvr_Close(void); 1817 //------------------------------------------------------------------------------------------------- 1818 /// Pause/Resume PVR engine. 1819 /// @ingroup DMX_ToBeRemove 1820 /// @param bPause \b IN: TRUE: pause, FALSE: resume 1821 /// @return DMX_FILTER_STATUS_OK - Success 1822 /// @return DMX_FILTER_STATUS_ERROR - Failure 1823 /// @note Keep the function which have engine parameter. 1824 //------------------------------------------------------------------------------------------------- 1825 // DMX_FILTER_STATUS MApi_DMX_Pvr_Pause(MS_BOOL bPause); 1826 //------------------------------------------------------------------------------------------------- 1827 /// Set the PID to be recorded. 1828 /// @ingroup DMX_ToBeRemove 1829 /// @param Pid \b IN: The target PID to be recorded 1830 /// @param pu8DmxId \b OUT: The demux filter Id for this recorded PID 1831 /// @return DMX_FILTER_STATUS_OK - Success 1832 /// @return DMX_FILTER_STATUS_ERROR - Failure 1833 /// @note Keep the function which have engine parameter. 1834 //------------------------------------------------------------------------------------------------- 1835 DMX_FILTER_STATUS MApi_DMX_Pvr_Pid_Open(MS_U32 Pid, MS_U8* pu8DmxId); 1836 1837 //------------------------------------------------------------------------------------------------- 1838 /// Free the PID to be recorded. 1839 /// @ingroup DMX_ToBeRemove 1840 /// @param u8DmxId \b IN: The demux filter Id from MApi_DMX_Pvr_Pid_Open 1841 /// @return DMX_FILTER_STATUS_OK - Success 1842 /// @return DMX_FILTER_STATUS_ERROR - Failure 1843 /// @note Keep the function which have engine parameter. 1844 //------------------------------------------------------------------------------------------------- 1845 DMX_FILTER_STATUS MApi_DMX_Pvr_Pid_Close(MS_U8 u8DmxId); 1846 1847 //------------------------------------------------------------------------------------------------- 1848 /// Start to record. 1849 /// @ingroup DMX_ToBeRemove 1850 /// @param bPvrAll \b IN: TRUE to record original bit stream, FALSE to recording the PIDs of interests 1851 /// @return DMX_FILTER_STATUS_OK - Success 1852 /// @return DMX_FILTER_STATUS_ERROR - Failure 1853 /// @note Keep the function which have engine parameter. 1854 //------------------------------------------------------------------------------------------------- 1855 DMX_FILTER_STATUS MApi_DMX_Pvr_Start(MS_BOOL bPvrAll); 1856 1857 //------------------------------------------------------------------------------------------------- 1858 /// Stop recording. 1859 /// @ingroup DMX_ToBeRemove 1860 /// @return DMX_FILTER_STATUS_OK - Success 1861 /// @return DMX_FILTER_STATUS_ERROR - Failure 1862 /// @note Keep the function which have engine parameter. 1863 //------------------------------------------------------------------------------------------------- 1864 DMX_FILTER_STATUS MApi_DMX_Pvr_Stop(void); 1865 1866 //------------------------------------------------------------------------------------------------- 1867 /// Get write pointer of recording buffer. 1868 /// @ingroup DMX_ToBeRemove 1869 /// @param pphyWrite \b OUT: the pointer to store the obtained write pointer 1870 /// @return DMX_FILTER_STATUS_OK - Success 1871 /// @return DMX_FILTER_STATUS_ERROR - Failure 1872 /// @note Keep the function which have engine parameter. 1873 //------------------------------------------------------------------------------------------------- 1874 DMX_FILTER_STATUS MApi_DMX_Pvr_WriteGet(MS_PHY* pphyWrite); 1875 1876 //------------------------------------------------------------------------------------------------- 1877 /// Set recording packet mode. 1878 /// @ingroup DMX_ToBeRemove 1879 /// @param bSet \b IN: TRUE: enable 192 mode, FALSE: disable 192 mode 1880 /// @return DMX_FILTER_STATUS_OK - Success 1881 /// @return DMX_FILTER_STATUS_ERROR - Failure 1882 /// @note Keep the function which have engine parameter. 1883 //------------------------------------------------------------------------------------------------- 1884 DMX_FILTER_STATUS MApi_DMX_PVR_SetPacketMode(MS_BOOL bSet); 1885 1886 //------------------------------------------------------------------------------------------------- 1887 /// Set recording starting time stamp. 1888 /// @ingroup DMX_ToBeRemove 1889 /// @param u32Stamp \b IN: Record time-stamp (LPCR) 1890 /// @return DMX_FILTER_STATUS_OK - Success 1891 /// @return DMX_FILTER_STATUS_ERROR - Failure 1892 /// @note Keep the function which have engine parameter. 1893 //------------------------------------------------------------------------------------------------- 1894 DMX_FILTER_STATUS MApi_DMX_Pvr_SetRecordStamp(MS_U32 u32Stamp); 1895 1896 //------------------------------------------------------------------------------------------------- 1897 /// Get current recording time stamp. 1898 /// @ingroup DMX_ToBeRemove 1899 /// @param pu32Stamp \b OUT: the pointer to store the obtained record time-stamp (LPCR) 1900 /// @return DMX_FILTER_STATUS_OK - Success 1901 /// @return DMX_FILTER_STATUS_ERROR - Failure 1902 /// @note Keep the function which have engine parameter. 1903 //------------------------------------------------------------------------------------------------- 1904 DMX_FILTER_STATUS MApi_DMX_Pvr_GetRecordStamp(MS_U32* pu32Stamp); 1905 1906 //------------------------------------------------------------------------------------------------- 1907 /// Enable MOBF encrypt. 1908 /// @ingroup DMX_ToBeRemove 1909 /// @param bEnable \b IN: PVR MOBF Enable/Disable 1910 /// @param u32key0 \b IN: MOBF encrypt key0 1911 /// @param u32key1 \b IN: MOBF encrypt key1 1912 /// @return DMX_FILTER_STATUS_OK - Success 1913 /// @return DMX_FILTER_STATUS_ERROR - Failure 1914 /// @note Keep the function which have engine parameter. 1915 //------------------------------------------------------------------------------------------------- 1916 // DMX_FILTER_STATUS MApi_DMX_Pvr_MOBF_Enable(MS_BOOL bEnable, MS_U32 u32key0, MS_U32 u32key1); 1917 1918 //PVR Playback API (Old) 1919 //------------------------------------------------------------------------------------------------- 1920 /// Set playback time stamp. 1921 /// @ingroup TSP_FILEIN_PVR 1922 /// @param u32Stamp \b IN: time stamp 1923 /// @return DMX_FILTER_STATUS_OK - Success 1924 /// @return DMX_FILTER_STATUS_ERROR - Failure 1925 //------------------------------------------------------------------------------------------------- 1926 DMX_FILTER_STATUS MApi_DMX_Pvr_SetPlaybackStamp(MS_U32 u32Stamp); 1927 //------------------------------------------------------------------------------------------------- 1928 /// Get playback time stamp 1929 /// @ingroup TSP_FILEIN_PVR 1930 /// @param u32Stamp \b OUT: time stamp 1931 /// @return DMX_FILTER_STATUS_OK - Success 1932 /// @return DMX_FILTER_STATUS_ERROR - Failure 1933 //------------------------------------------------------------------------------------------------- 1934 DMX_FILTER_STATUS MApi_DMX_Pvr_GetPlaybackStamp(MS_U32* pu32Stamp); 1935 //------------------------------------------------------------------------------------------------- 1936 /// Enable filein time stamp. (filein use 192 mode) 1937 /// @ingroup DMX_ToBeModified_TSP 1938 /// @return DMX_FILTER_STATUS_OK - Success 1939 /// @return DMX_FILTER_STATUS_ERROR - Failure 1940 /// @note: Merge with MApi_DMX_Pvr_TimeStampDisable 1941 //------------------------------------------------------------------------------------------------- 1942 DMX_FILTER_STATUS MApi_DMX_Pvr_TimeStampEnable(void); 1943 //------------------------------------------------------------------------------------------------- 1944 /// Disable filein time stamp. (filein not use 192 mode) 1945 /// @ingroup DMX_ToBeModified_TSP 1946 /// @return DMX_FILTER_STATUS_OK - Success 1947 /// @return DMX_FILTER_STATUS_ERROR - Failure 1948 /// @note: Merge with MApi_DMX_Pvr_TimeStampEnable 1949 //------------------------------------------------------------------------------------------------- 1950 DMX_FILTER_STATUS MApi_DMX_Pvr_TimeStampDisable(void); 1951 1952 1953 //----------------- 1954 // TSP_PVR_General 1955 //----------------- 1956 //------------------------------------------------------------------------------------------------- 1957 /// Set up the recording parameters. 1958 /// @ingroup TSP_PVR_General 1959 /// @param Eng \b IN: PVR engine ID 1960 /// @param pInfo \b IN: the recording parameters 1961 /// @return DMX_FILTER_STATUS_OK - Success 1962 /// @return DMX_FILTER_STATUS_ERROR - Failure 1963 //------------------------------------------------------------------------------------------------- 1964 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Open(DMX_PVR_ENG Eng ,DMX_Pvr_info* pPvrInfo); 1965 1966 //------------------------------------------------------------------------------------------------- 1967 /// Clear the recording parameters. 1968 /// @ingroup TSP_PVR_General 1969 /// @param Eng \b IN: PVR engine ID 1970 /// @return DMX_FILTER_STATUS_OK - Success 1971 /// @return DMX_FILTER_STATUS_ERROR - Failure 1972 //------------------------------------------------------------------------------------------------- 1973 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Close(DMX_PVR_ENG Eng ); 1974 1975 //------------------------------------------------------------------------------------------------- 1976 /// Pause/Resume PVR engine. 1977 /// @ingroup TSP_PVR_General 1978 /// @param Eng \b IN: PVR engine ID 1979 /// @param bPause \b IN: TRUE: pause, FALSE: resume 1980 /// @return DMX_FILTER_STATUS_OK - Success 1981 /// @return DMX_FILTER_STATUS_ERROR - Failure 1982 //------------------------------------------------------------------------------------------------- 1983 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Pause(DMX_PVR_ENG Eng ,MS_BOOL bPause); 1984 1985 //------------------------------------------------------------------------------------------------- 1986 /// Set the PID to be recorded. 1987 /// @ingroup TSP_PVR_General 1988 /// @param Eng \b IN: PVR engine ID 1989 /// @param Pid \b IN: The target PID to be recorded 1990 /// @param pu8DmxId \b OUT: The demux filter Id for this recorded PID 1991 /// @return DMX_FILTER_STATUS_OK - Success 1992 /// @return DMX_FILTER_STATUS_ERROR - Failure 1993 //------------------------------------------------------------------------------------------------- 1994 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Pid_Open(DMX_PVR_ENG Eng ,MS_U32 Pid, MS_U8* pu8DmxId); 1995 1996 //------------------------------------------------------------------------------------------------- 1997 /// Free the PID to be recorded. 1998 /// @ingroup TSP_PVR_General 1999 /// @param Eng \b IN: PVR engine ID 2000 /// @param u8DmxId \b IN: The demux filter Id from MApi_DMX_Pvr_Pid_Open 2001 /// @return DMX_FILTER_STATUS_OK - Success 2002 /// @return DMX_FILTER_STATUS_ERROR - Failure 2003 //------------------------------------------------------------------------------------------------- 2004 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Pid_Close(DMX_PVR_ENG Eng ,MS_U8 u8DmxId); 2005 2006 //------------------------------------------------------------------------------------------------- 2007 /// Start to record. 2008 /// @ingroup TSP_PVR_General 2009 /// @param Eng \b IN: PVR engine ID 2010 /// @param bPvrAll \b IN: TRUE to record original bit stream, FALSE to recording the PIDs of interests 2011 /// @return DMX_FILTER_STATUS_OK - Success 2012 /// @return DMX_FILTER_STATUS_ERROR - Failure 2013 //------------------------------------------------------------------------------------------------- 2014 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Start(DMX_PVR_ENG Eng ,MS_BOOL bPvrAll); 2015 2016 //------------------------------------------------------------------------------------------------- 2017 /// Stop recording. 2018 /// @ingroup TSP_PVR_General 2019 /// @param Eng \b IN: PVR engine ID 2020 /// @return DMX_FILTER_STATUS_OK - Success 2021 /// @return DMX_FILTER_STATUS_ERROR - Failure 2022 //------------------------------------------------------------------------------------------------- 2023 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Stop(DMX_PVR_ENG Eng ); 2024 2025 //------------------------------------------------------------------------------------------------- 2026 /// Get write pointer of recording buffer. 2027 /// @ingroup TSP_PVR_General 2028 /// @param Eng \b IN: PVR engine ID 2029 /// @param pphyWrite \b OUT: the pointer to store the obtained write pointer 2030 /// @return DMX_FILTER_STATUS_OK - Success 2031 /// @return DMX_FILTER_STATUS_ERROR - Failure 2032 //------------------------------------------------------------------------------------------------- 2033 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_WriteGet(DMX_PVR_ENG Eng ,MS_PHY* pphyWrite); 2034 2035 //------------------------------------------------------------------------------------------------- 2036 /// Set recording packet mode. 2037 /// @ingroup TSP_PVR_General 2038 /// @param Eng \b IN: PVR engine ID 2039 /// @param bSet \b IN: TRUE: enable 192 mode, FALSE: disable 192 mode 2040 /// @return DMX_FILTER_STATUS_OK - Success 2041 /// @return DMX_FILTER_STATUS_ERROR - Failure 2042 //------------------------------------------------------------------------------------------------- 2043 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_SetPacketMode(DMX_PVR_ENG Eng ,MS_BOOL bSet); 2044 2045 //------------------------------------------------------------------------------------------------- 2046 /// Set recording starting time stamp. 2047 /// @ingroup TSP_PVR_General 2048 /// @param Eng \b IN: PVR engine ID 2049 /// @param u32Stamp \b IN: Record time-stamp (LPCR) 2050 /// @return DMX_FILTER_STATUS_OK - Success 2051 /// @return DMX_FILTER_STATUS_ERROR - Failure 2052 //------------------------------------------------------------------------------------------------- 2053 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_SetRecordStamp(DMX_PVR_ENG Eng ,MS_U32 u32Stamp); 2054 2055 //------------------------------------------------------------------------------------------------- 2056 /// Get current recording time stamp. 2057 /// @ingroup TSP_PVR_General 2058 /// @param Eng \b IN: PVR engine ID 2059 /// @param pu32Stamp \b OUT: the pointer to store the obtained record time-stamp (LPCR) 2060 /// @return DMX_FILTER_STATUS_OK - Success 2061 /// @return DMX_FILTER_STATUS_ERROR - Failure 2062 //------------------------------------------------------------------------------------------------- 2063 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_GetRecordStamp(DMX_PVR_ENG Eng ,MS_U32* pu32Stamp); 2064 2065 //------------------------------------------------------------------------------------------------- 2066 /// Enable MOBF encrypt. 2067 /// @ingroup TSP_PVR_General 2068 /// @param Eng \b IN: PVR engine ID 2069 /// @param bEnable \b IN: PVR MOBF Enable/Disable 2070 /// @param u32key0 \b IN: MOBF encrypt key0 2071 /// @param u32key1 \b IN: MOBF encrypt key1 2072 /// @return DMX_FILTER_STATUS_OK - Success 2073 /// @return DMX_FILTER_STATUS_ERROR - Failure 2074 //------------------------------------------------------------------------------------------------- 2075 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_MOBF_Enable(MS_U8 u8Eng, MS_BOOL bEnable, MS_U32 u32key0, MS_U32 u32key1); 2076 2077 //------------------------------------------------------------------------------------------------- 2078 /// Check if PVR engine is started. 2079 /// @ingroup TSP_PVR_General 2080 /// @param Eng \b IN: PVR engine ID 2081 /// @param pbIsStart \b OUT: Pointer to store PVR engine starting status 2082 /// @return DMX_FILTER_STATUS_OK - Success 2083 /// @return DMX_FILTER_STATUS_ERROR - Failure 2084 //------------------------------------------------------------------------------------------------- 2085 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_IsStart(DMX_PVR_ENG Eng, MS_BOOL *pbIsStart); 2086 //----------------- 2087 // TSP_PVR_STB 2088 //----------------- 2089 //------------------------------------------------------------------------------------------------- 2090 /// Set/Get PVR PID filter PID. 2091 /// @ingroup TSP_PVR_STB 2092 /// @param Eng \b IN: PVR engine ID 2093 /// @param u8DmxId \b IN: PID filter index 2094 /// @param Pid \b IN: PID value 2095 /// @param bSet \b IN: TRUE: set, FALSE: get 2096 /// @return DMX_FILTER_STATUS_OK - Success 2097 /// @return DMX_FILTER_STATUS_ERROR - Failure 2098 /// @note Only TSP 2.0/4.0 use this function now. 2099 //------------------------------------------------------------------------------------------------- 2100 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_Pid(DMX_PVR_ENG Eng ,MS_U8 u8DmxId , MS_U32 *Pid, MS_BOOL bSet); 2101 //------------------------------------------------------------------------------------------------- 2102 /// Set PVR time-stamp clock. 2103 /// @ingroup TSP_PVR_General 2104 /// @param Eng \b IN: PVR engine ID 2105 /// @param eClk \b IN: select 90K or 27M 2106 /// @return DMX_FILTER_STATUS_OK - Success 2107 /// @return DMX_FILTER_STATUS_ERROR - Failure 2108 //------------------------------------------------------------------------------------------------- 2109 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_SetRecordStampClk(DMX_PVR_ENG Eng, DMX_TimeStamp_Clk eClk); 2110 //------------------------------------------------------------------------------------------------- 2111 /// Set RASP callback engine size. 2112 /// @ingroup TSP_PVR_STB 2113 /// @param Eng \b IN: PVR engine ID 2114 /// @param eClk \b IN: select 90K or 27M 2115 /// @return DMX_FILTER_STATUS_OK - Success 2116 /// @return DMX_FILTER_STATUS_ERROR - Failure 2117 /// @note Only TSP 2.0 use this function now. 2118 //------------------------------------------------------------------------------------------------- 2119 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_CallbackSize(DMX_PVR_ENG Eng, MS_U32* pu32CallbackSize, MS_BOOL bSet); 2120 //------------------------------------------------------------------------------------------------- 2121 ///Set PVR CA SPS enable mode 2122 /// @ingroup TSP_PVR_STB 2123 /// @param Eng \b IN: PVR Engine ID 2124 /// @param eCaMode \b IN: CA PVR Selection, 0: from TSP, 1: from ca program0, 2: from ca program1 2125 /// @param bspsEnable \b IN: SPS mode enabled flag 2126 /// @return DMX_FILTER_STATUS_OK - Success 2127 /// @return DMX_FILTER_STATUS_ERROR - Failure 2128 //------------------------------------------------------------------------------------------------- 2129 // DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_SetCaMode(DMX_PVR_ENG Eng, DMX_CA_PVRMODE eCaMode, MS_BOOL bspsEnable); 2130 2131 //------------------------------------------------------------------------------------------------- 2132 /// Set playback time-stamp clock. 2133 /// @ingroup TSP_FILEIN_PVR 2134 /// @param Eng \b IN: PVR engine ID 2135 /// @param eClk \b IN: select 90K or 27M 2136 /// @return DMX_FILTER_STATUS_OK - Success 2137 /// @return DMX_FILTER_STATUS_ERROR - Failure 2138 //------------------------------------------------------------------------------------------------- 2139 DMX_FILTER_STATUS MApi_DMX_Pvr_Eng_SetPlaybackStampClk(MS_U8 u8Eng, DMX_TimeStamp_Clk eClk); 2140 2141 //PVR CA API (Old) 2142 //------------------------------------------------------------------------------------------------- 2143 /// Open PVR PID filter for recording scramble stream depended on Engine ID. 2144 /// @ingroup DMX_ToBeRemove 2145 /// @param Pid \b IN: PID to record 2146 /// @param pu8DmxId \b IN: Pointer to store PVR PID filter index 2147 /// @param u8ShareKeyType \b IN: PID filter share key type. 0: Not use sharekey filters. 2148 /// @return DMX_FILTER_STATUS_OK - Success 2149 /// @return DMX_FILTER_STATUS_ERROR - Failure 2150 /// @note Keep the function which have engine parameter. 2151 //------------------------------------------------------------------------------------------------- 2152 DMX_FILTER_STATUS MApi_DMX_PvrCA_Pid_Open(MS_U32 Pid, MS_U8* pu8DmxId); 2153 2154 //------------------------------------------------------------------------------------------------- 2155 /// Close PVR PID filter depended on Engine ID. 2156 /// @ingroup DMX_ToBeRemove 2157 /// @param u8DmxId \b IN: PID filter index to close 2158 /// @return DMX_FILTER_STATUS_OK - Success 2159 /// @return DMX_FILTER_STATUS_ERROR - Failure 2160 /// @note Keep the function which have engine parameter. 2161 //------------------------------------------------------------------------------------------------- 2162 DMX_FILTER_STATUS MApi_DMX_PvrCA_Pid_Close(MS_U8 u8DmxId); 2163 2164 //------------------------------------------------------------------------------------------------- 2165 /// Start to record scramble stream depend on engine id. 2166 /// @ingroup DMX_ToBeRemove 2167 /// @param bPvrAll \b IN: If true, record all stream data; if false, record data by PIDs 2168 /// @return DMX_FILTER_STATUS_OK - Success 2169 /// @return DMX_FILTER_STATUS_ERROR - Failure 2170 /// @note Keep the function which have engine parameter. 2171 //------------------------------------------------------------------------------------------------- 2172 DMX_FILTER_STATUS MApi_DMX_PvrCA_Start(MS_BOOL bPvrAll); 2173 //------------------------------------------------------------------------------------------------- 2174 /// Stop to record scramble stream. 2175 /// @ingroup DMX_ToBeRemove 2176 /// @return DMX_FILTER_STATUS_OK - Success 2177 /// @return DMX_FILTER_STATUS_ERROR - Failure 2178 /// @note Keep the function which have engine parameter. 2179 //------------------------------------------------------------------------------------------------- 2180 DMX_FILTER_STATUS MApi_DMX_PvrCA_Stop(void); 2181 2182 //----------------- 2183 // TSP_PVR_CA 2184 //----------------- 2185 //------------------------------------------------------------------------------------------------- 2186 /// Open PVR PID filter for recording scramble stream depended on Engine ID. 2187 /// @ingroup TSP_PVR_CA 2188 /// @param Eng \b IN: PVR engine ID 2189 /// @param Pid \b IN: PID to record 2190 /// @param pu8DmxId \b IN: Pointer to store PVR PID filter index 2191 /// @param u8ShareKeyType \b IN: PID filter share key type. 0: Not use sharekey filters. 2192 /// @return DMX_FILTER_STATUS_OK - Success 2193 /// @return DMX_FILTER_STATUS_ERROR - Failure 2194 //------------------------------------------------------------------------------------------------- 2195 DMX_FILTER_STATUS MApi_DMX_PvrCA_Eng_Pid_Open(DMX_PVR_ENG Eng, MS_U32 Pid, MS_U8* pu8DmxId, MS_U8 u8ShareKeyType); 2196 //------------------------------------------------------------------------------------------------- 2197 /// Close PVR PID filter depended on Engine ID. 2198 /// @ingroup TSP_PVR_CA 2199 /// @param Eng \b IN: PVR engine ID 2200 /// @param u8DmxId \b IN: PID filter index to close 2201 /// @return DMX_FILTER_STATUS_OK - Success 2202 /// @return DMX_FILTER_STATUS_ERROR - Failure 2203 //------------------------------------------------------------------------------------------------- 2204 DMX_FILTER_STATUS MApi_DMX_PvrCA_Eng_Pid_Close(DMX_PVR_ENG Eng, MS_U8 u8DmxId); 2205 //------------------------------------------------------------------------------------------------- 2206 /// Start to record scramble stream depend on engine id. 2207 /// @ingroup TSP_PVR_CA 2208 /// @param Eng \b IN: PVR engine ID 2209 /// @param bPvrAll \b IN: If true, record all stream data; if false, record data by PIDs 2210 /// @return DMX_FILTER_STATUS_OK - Success 2211 /// @return DMX_FILTER_STATUS_ERROR - Failure 2212 //------------------------------------------------------------------------------------------------- 2213 DMX_FILTER_STATUS MApi_DMX_PvrCA_Eng_Start(DMX_PVR_ENG Eng, MS_BOOL bPvrAll); 2214 //------------------------------------------------------------------------------------------------- 2215 /// Stop to record scramble stream. 2216 /// @ingroup TSP_PVR_CA 2217 /// @param Eng \b IN: PVR engine ID 2218 /// @return DMX_FILTER_STATUS_OK - Success 2219 /// @return DMX_FILTER_STATUS_ERROR - Failure 2220 //------------------------------------------------------------------------------------------------- 2221 DMX_FILTER_STATUS MApi_DMX_PvrCA_Eng_Stop(DMX_PVR_ENG Eng); 2222 //--------------------------------------------- 2223 2224 //----------------- 2225 // TSP_FILEIN_PVR 2226 //----------------- 2227 //------------------------------------------------------------------------------------------------- 2228 /// Open & set pid filter for file-in PVR using. 2229 /// @ingroup TSP_FILEIN_PVR 2230 /// @param Eng \b IN : PVR eigine id 2231 /// @param Pid \b IN : PVR PID to record 2232 /// @param pu8DmxId \b OUT: Pointer to store PID filter index 2233 /// @param u8ShareKeyType \b IN : The flag of sharekey filter using. if 0, not use sharekey filters 2234 /// @return DMX_FILTER_STATUS_OK - Success 2235 /// @return DMX_FILTER_STATUS_ERROR - Failure 2236 //------------------------------------------------------------------------------------------------- 2237 // DMX_FILTER_STATUS MApi_DMX_Filein_Pvr_Eng_Pid_Open(DMX_PVR_ENG Eng, MS_U32 Pid, MS_U8* pu8DmxId, MS_U8 u8ShareKeyType); 2238 2239 //------------------------------------------------------------------------------------------------- 2240 /// Close pid filter of file-in PVR. 2241 /// @ingroup TSP_FILEIN_PVR 2242 /// @param Eng \b IN : PVR eigine id 2243 /// @param u8DmxId \b IN : PID filter id 2244 /// @return DMX_FILTER_STATUS_OK - Success 2245 /// @return DMX_FILTER_STATUS_ERROR - Failure 2246 //------------------------------------------------------------------------------------------------- 2247 // DMX_FILTER_STATUS MApi_DMX_Filein_Pvr_Eng_Pid_Close(DMX_PVR_ENG Eng, MS_U8 u8DmxId); 2248 2249 //------------------------------------------------------------------------------------------------- 2250 /// Start file-in PVR recording. 2251 /// @ingroup TSP_FILEIN_PVR 2252 /// @param Eng \b IN : PVR eigine id 2253 /// @param bPvrAll \b IN : FALSE is record PID, TRUE is record All ts data 2254 /// @return DMX_FILTER_STATUS_OK - Success 2255 /// @return DMX_FILTER_STATUS_ERROR - Failure 2256 //------------------------------------------------------------------------------------------------- 2257 // DMX_FILTER_STATUS MApi_DMX_Filein_Pvr_Eng_Start(DMX_PVR_ENG Eng, MS_BOOL bPvrAll); 2258 2259 //------------------------------------------------------------------------------------------------- 2260 /// Stop file-in PVR recording. 2261 /// @ingroup TSP_FILEIN_PVR 2262 /// @param Eng \b IN : PVR eigine id 2263 /// @return DMX_FILTER_STATUS_OK - Success 2264 /// @return DMX_FILTER_STATUS_ERROR - Failure 2265 //------------------------------------------------------------------------------------------------- 2266 // DMX_FILTER_STATUS MApi_DMX_Filein_Pvr_Eng_Stop(DMX_PVR_ENG Eng); 2267 //--------------------------------------------- 2268 2269 2270 // File-in API (Old) 2271 //------------------------------------------------------------------------------------------------- 2272 /// Start to get bit stream from memory. 2273 /// @ingroup DMX_ToBeRemove 2274 /// @param Dst \b IN: file in destination type 2275 /// @param pBuf \b IN: the memory containing the bit stream 2276 /// @param u32BufSize \b IN: the size the memory to get 2277 /// @return DMX_FILTER_STATUS_OK - Success 2278 /// @return DMX_FILTER_STATUS_ERROR - Failure 2279 /// @note Keep the function which have path parameter. 2280 //------------------------------------------------------------------------------------------------- 2281 DMX_FILTER_STATUS MApi_DMX_Filein_Start(DMX_FILEIN_DST Dst, MS_PHY pBuf, MS_U32 u32BufSize); // msAPI_DMX_PESPlayback/msAPI_DMX_TSPlayback will integrate into it 2282 //------------------------------------------------------------------------------------------------- 2283 /// Stop to get bit stream from memeory. 2284 /// @ingroup DMX_ToBeRemove 2285 /// @return DMX_FILTER_STATUS_OK - Success 2286 /// @return DMX_FILTER_STATUS_ERROR - Failure 2287 /// @note Keep the function which have path parameter. 2288 //------------------------------------------------------------------------------------------------- 2289 DMX_FILTER_STATUS MApi_DMX_Filein_Stop(void); 2290 2291 //------------------------------------------------------------------------------------------------- 2292 /// Set up parameters for input bit stream from memory. 2293 /// @ingroup DMX_ToBeRemove 2294 /// @param pFileinInfo \b IN: the file in parameters 2295 /// @return DMX_FILTER_STATUS_OK - Success 2296 /// @return DMX_FILTER_STATUS_ERROR - Failure 2297 /// @note Keep the function which have path parameter. 2298 //------------------------------------------------------------------------------------------------- 2299 DMX_FILTER_STATUS MApi_DMX_Filein_Info(DMX_Filein_info *pFileinInfo); 2300 //------------------------------------------------------------------------------------------------- 2301 /// Pause to get bit stream by memeory. 2302 /// @ingroup DMX_ToBeRemove 2303 /// @return DMX_FILTER_STATUS_OK - Success 2304 /// @return DMX_FILTER_STATUS_ERROR - Failure 2305 /// @note Keep the function which have path parameter. 2306 //------------------------------------------------------------------------------------------------- 2307 DMX_FILTER_STATUS MApi_DMX_Filein_Pause(void); 2308 //------------------------------------------------------------------------------------------------- 2309 /// Pause to get bit stream by memeory. 2310 /// @ingroup DMX_ToBeRemove 2311 /// @return DMX_FILTER_STATUS_OK - Success 2312 /// @return DMX_FILTER_STATUS_ERROR - Failure 2313 /// @note Keep the function which have path parameter. 2314 //------------------------------------------------------------------------------------------------- 2315 DMX_FILTER_STATUS MApi_DMX_Filein_Resume(void); 2316 2317 //------------------------------------------------------------------------------------------------- 2318 /// Check if no memory transfer is under going. 2319 /// @ingroup DMX_ToBeRemove 2320 /// @return TRUE - if idle 2321 /// @return FALSE - otherwise 2322 /// @note Keep the function which have path parameter. 2323 //------------------------------------------------------------------------------------------------- 2324 MS_BOOL MApi_DMX_Filein_IsIdle(void); 2325 2326 //------------------------------------------------------------------------------------------------- 2327 /// Check if memory transfer is under going. 2328 /// @ingroup DMX_ToBeRemove 2329 /// @return TRUE - if idle 2330 /// @return FALSE - otherwise 2331 /// @note Keep the function which have path parameter. 2332 //------------------------------------------------------------------------------------------------- 2333 MS_BOOL MApi_DMX_Filein_IsBusy(void); 2334 2335 //------------------------------------------------------------------------------------------------- 2336 /// Check if memory transfer is paused. 2337 /// @ingroup DMX_ToBeRemove 2338 /// @return TRUE - if idle 2339 /// @return FALSE - otherwise 2340 /// @note Keep the function which have path parameter. 2341 //------------------------------------------------------------------------------------------------- 2342 MS_BOOL MApi_DMX_Filein_IsPause(void); 2343 2344 //------------------------------------------------------------------------------------------------- 2345 /// Reset CMDQ. 2346 /// @ingroup DMX_ToBeRemove 2347 /// @return DMX_FILTER_STATUS_OK - Success 2348 /// @return DMX_FILTER_STATUS_ERROR - Failure 2349 /// @note Keep the function which have path parameter. 2350 //------------------------------------------------------------------------------------------------- 2351 DMX_FILTER_STATUS MApi_DMX_Filein_CMDQ_Reset(void); 2352 2353 //------------------------------------------------------------------------------------------------- 2354 /// Get the number of CMDQ empty slot. 2355 /// @ingroup DMX_ToBeRemove 2356 /// @param pu32EmptySlot \b OUT: empty slot number 2357 /// @return DMX_FILTER_STATUS_OK - Success 2358 /// @return DMX_FILTER_STATUS_ERROR - Failure 2359 /// @note Keep the function which have path parameter. 2360 //------------------------------------------------------------------------------------------------- 2361 DMX_FILTER_STATUS MApi_DMX_Filein_CMDQ_GetEmptyNum(MS_U32 *pu32EmptySlot); 2362 2363 //------------------------------------------------------------------------------------------------- 2364 /// Get Command queue FIFO level. 2365 /// @ingroup DMX_ToBeRemove 2366 /// @param pu8CmdQStatus \b OUT: fifo level, 0~3 2367 /// @return DMX_FILTER_STATUS_OK - Success 2368 /// @return DMX_FILTER_STATUS_ERROR - Failure 2369 /// @note Keep the function which have path parameter. 2370 //------------------------------------------------------------------------------------------------- 2371 DMX_FILTER_STATUS MApi_DMX_Filein_CMDQ_FIFOWriteLevel(MS_U8 *pu8CmdQStatus); 2372 2373 //------------------------------------------------------------------------------------------------- 2374 /// Disable 192 mode blovk scheme to bypass fill-in timestamp 2375 /// @ingroup DMX_ToBeRemove 2376 /// @param bbypass \b IN: TRUE: bypass file-in timestamp, FALSE: not bypass 2377 /// @return None 2378 /// @note Keep the function which have path parameter. 2379 //------------------------------------------------------------------------------------------------- 2380 void MApi_DMX_BypassFileInTimeStamp(MS_BOOL bbypass); 2381 //------------------------------------------------------------------------------------------------- 2382 /// Get Command queue FIFO level. 2383 /// @ingroup DMX_ToBeRemove 2384 /// @param pu8CmdQStatus \b OUT: fifo level, 0~3 2385 /// @return DMX_FILTER_STATUS_OK - Success 2386 /// @return DMX_FILTER_STATUS_ERROR - Failure 2387 /// @note Keep the function which have path parameter. 2388 //------------------------------------------------------------------------------------------------- 2389 DMX_FILTER_STATUS MApi_DMX_Filein_CMDQ_FIFOWriteLevel(MS_U8 *pu8CmdQStatus); 2390 2391 //------------------------------------------------------------------------------------------------- 2392 /// Get filein time stamp. (Current time stamp from TS packet). It is used on 192 packet mode. 2393 /// @ingroup DMX_ToBeRemove 2394 /// @param pu32FileInTS \b OUT: pointer to store time-stamp value 2395 /// @return DMX_FILTER_STATUS_OK - Success 2396 /// @return DMX_FILTER_STATUS_ERROR - Failure 2397 /// @note Keep the function which have path parameter. 2398 //------------------------------------------------------------------------------------------------- 2399 DMX_FILTER_STATUS MApi_DMX_GetFileInTimeStamp(MS_U32 *pu32FileInTS); 2400 2401 //------------------------------------------------------------------------------------------------- 2402 /// Get playback read address. 2403 /// @ingroup DMX_ToBeRemove 2404 /// @param pphyRead \b OUT: pointer to store read address 2405 /// @return DMX_FILTER_STATUS_OK - Success 2406 /// @return DMX_FILTER_STATUS_ERROR - Failure 2407 /// @note Keep the function which have path parameter. 2408 //------------------------------------------------------------------------------------------------- 2409 DMX_FILTER_STATUS MApi_DMX_Filein_GetReadAddr(MS_PHY* pphyRead); 2410 2411 //------------------------------------------------------------------------------------------------- 2412 /// Enable MOBF decrypt key. 2413 /// @ingroup DMX_ToBeRemove 2414 /// @param bEnable \b IN: File-in MOBF Enable/Disable 2415 /// @param u32key \b IN: MOBF dyncrypt u32key 2416 /// @return DMX_FILTER_STATUS_OK - Success 2417 /// @return DMX_FILTER_STATUS_ERROR - Failure 2418 /// @note Keep the function which have path parameter. 2419 //------------------------------------------------------------------------------------------------- 2420 DMX_FILTER_STATUS MApi_DMX_Filein_MOBF_Enable(MS_BOOL bEnable, MS_U32 u32key); 2421 2422 //----------------- 2423 // TSP_Playback 2424 //----------------- 2425 //------------------------------------------------------------------------------------------------- 2426 /// Start to get bit stream from memory. 2427 /// @ingroup TSP_Playback 2428 /// @param ePath \b IN: file in path (TSIF) 2429 /// @param Dst \b IN: file in destination type 2430 /// @param pBuf \b IN: the memory containing the bit stream 2431 /// @param u32BufSize \b IN: the size the memory to get 2432 /// @return DMX_FILTER_STATUS_OK - Success 2433 /// @return DMX_FILTER_STATUS_ERROR - Failure 2434 //------------------------------------------------------------------------------------------------- 2435 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_Start(DMX_FILEIN_PATH ePath, DMX_FILEIN_DST Dst, MS_PHY pBuf, MS_U32 u32BufSize); // msAPI_DMX_PESPlayback/msAPI_DMX_TSPlayback will integrate into it 2436 //------------------------------------------------------------------------------------------------- 2437 /// Stop to get bit stream from memeory. 2438 /// @ingroup TSP_Playback 2439 /// @param ePath \b IN: file in path (TSIF) 2440 /// @return DMX_FILTER_STATUS_OK - Success 2441 /// @return DMX_FILTER_STATUS_ERROR - Failure 2442 //------------------------------------------------------------------------------------------------- 2443 // DMX_FILTER_STATUS MApi_DMX_Filein_Eng_Stop(DMX_FILEIN_PATH ePath); 2444 //------------------------------------------------------------------------------------------------- 2445 /// Set up parameters for input bit stream from memory. 2446 /// @ingroup TSP_Playback 2447 /// @param ePath \b IN: file in path (TSIF) 2448 /// @param pFileinInfo \b IN: the file in parameters 2449 /// @return DMX_FILTER_STATUS_OK - Success 2450 /// @return DMX_FILTER_STATUS_ERROR - Failure 2451 //------------------------------------------------------------------------------------------------- 2452 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_Info(DMX_FILEIN_PATH ePath, DMX_Filein_info *pFileinInfo); 2453 //------------------------------------------------------------------------------------------------- 2454 /// Pause to get bit stream by memeory. 2455 /// @ingroup TSP_Playback 2456 /// @param ePath \b IN: file in path (TSIF) 2457 /// @return DMX_FILTER_STATUS_OK - Success 2458 /// @return DMX_FILTER_STATUS_ERROR - Failure 2459 //------------------------------------------------------------------------------------------------- 2460 // DMX_FILTER_STATUS MApi_DMX_Filein_Eng_Pause(DMX_FILEIN_PATH ePath); 2461 //------------------------------------------------------------------------------------------------- 2462 /// Pause to get bit stream by memeory. 2463 /// @ingroup TSP_Playback 2464 /// @param ePath \b IN: file in path (TSIF) 2465 /// @return DMX_FILTER_STATUS_OK - Success 2466 /// @return DMX_FILTER_STATUS_ERROR - Failure 2467 //------------------------------------------------------------------------------------------------- 2468 // DMX_FILTER_STATUS MApi_DMX_Filein_Eng_Resume(DMX_FILEIN_PATH ePath); 2469 2470 //------------------------------------------------------------------------------------------------- 2471 /// Check if no memory transfer is under going. 2472 /// @ingroup TSP_Playback 2473 /// @param ePath \b IN: file in path (TSIF) 2474 /// @return TRUE - if idle 2475 /// @return FALSE - otherwise 2476 //------------------------------------------------------------------------------------------------- 2477 MS_BOOL MApi_DMX_Filein_Eng_IsIdle(DMX_FILEIN_PATH ePath); 2478 //------------------------------------------------------------------------------------------------- 2479 /// Check if memory transfer is under going. 2480 /// @ingroup TSP_Playback 2481 /// @param ePath \b IN: file in path (TSIF) 2482 /// @return TRUE - if idle 2483 /// @return FALSE - otherwise 2484 //------------------------------------------------------------------------------------------------- 2485 // MS_BOOL MApi_DMX_Filein_Eng_IsBusy(DMX_FILEIN_PATH ePath); 2486 //------------------------------------------------------------------------------------------------- 2487 /// Check if memory transfer is paused. 2488 /// @ingroup TSP_Playback 2489 /// @param ePath \b IN: file in path (TSIF) 2490 /// @return TRUE - if idle 2491 /// @return FALSE - otherwise 2492 //------------------------------------------------------------------------------------------------- 2493 // MS_BOOL MApi_DMX_Filein_Eng_IsPause(DMX_FILEIN_PATH ePath); 2494 //------------------------------------------------------------------------------------------------- 2495 /// Reset CMDQ. 2496 /// @ingroup TSP_Playback 2497 /// @param ePath \b IN: file in path (TSIF) 2498 /// @return DMX_FILTER_STATUS_OK - Success 2499 /// @return DMX_FILTER_STATUS_ERROR - Failure 2500 //------------------------------------------------------------------------------------------------- 2501 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_CMDQ_Reset(DMX_FILEIN_PATH ePath); 2502 //------------------------------------------------------------------------------------------------- 2503 /// Get the number of CMDQ empty slot. 2504 /// @ingroup TSP_Playback 2505 /// @param ePath \b IN: file in path (TSIF) 2506 /// @param pu32EmptySlot \b OUT: empty slot number 2507 /// @return DMX_FILTER_STATUS_OK - Success 2508 /// @return DMX_FILTER_STATUS_ERROR - Failure 2509 //------------------------------------------------------------------------------------------------- 2510 // DMX_FILTER_STATUS MApi_DMX_Filein_Eng_CMDQ_GetEmptyNum(DMX_FILEIN_PATH ePath, MS_U32 *pu32EmptySlot); 2511 //------------------------------------------------------------------------------------------------- 2512 /// Disable 192 mode blovk scheme to bypass fill-in timestamp 2513 /// @ingroup TSP_Playback 2514 /// @param ePath \b IN: file in path (TSIF) 2515 /// @param bbypass \b IN: TRUE: bypass file-in timestamp, FALSE: not bypass 2516 /// @return None 2517 //------------------------------------------------------------------------------------------------- 2518 void MApi_DMX_Filein_Eng_BypassFileInTimeStamp(DMX_FILEIN_PATH ePath, MS_BOOL bbypass); 2519 //------------------------------------------------------------------------------------------------- 2520 /// Get Command queue FIFO level. 2521 /// @ingroup TSP_Playback 2522 /// @param ePath \b IN: file in path (TSIF) 2523 /// @param pu8CmdQStatus \b OUT: fifo level, 0~3 2524 /// @return DMX_FILTER_STATUS_OK - Success 2525 /// @return DMX_FILTER_STATUS_ERROR - Failure 2526 //------------------------------------------------------------------------------------------------- 2527 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_CMDQ_FIFOWriteLevel(DMX_FILEIN_PATH ePath, MS_U8 *pu8CmdQStatus); 2528 //------------------------------------------------------------------------------------------------- 2529 /// Get filein time stamp. (Current time stamp from TS packet). It is used on 192 packet mode. 2530 /// @ingroup TSP_Playback 2531 /// @param ePath \b IN: file in path (TSIF) 2532 /// @param pu32FileInTS \b OUT: pointer to store time-stamp value 2533 /// @return DMX_FILTER_STATUS_OK - Success 2534 /// @return DMX_FILTER_STATUS_ERROR - Failure 2535 //------------------------------------------------------------------------------------------------- 2536 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_GetFileInTimeStamp(DMX_FILEIN_PATH ePath, MS_U32 *pu32FileInTS); 2537 2538 //------------------------------------------------------------------------------------------------- 2539 /// Get playback read address. 2540 /// @ingroup TSP_Playback 2541 /// @param ePath \b IN: file in path (TSIF) 2542 /// @param pphyRead \b OUT: pointer to store read address 2543 /// @return DMX_FILTER_STATUS_OK - Success 2544 /// @return DMX_FILTER_STATUS_ERROR - Failure 2545 //------------------------------------------------------------------------------------------------- 2546 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_GetReadAddr(DMX_FILEIN_PATH ePath, MS_PHY* pphyRead); 2547 //------------------------------------------------------------------------------------------------- 2548 /// Enable MOBF decrypt key. 2549 /// @ingroup TSP_Playback 2550 /// @param ePath \b IN: file in path (TSIF) 2551 /// @param bEnable \b IN: File-in MOBF Enable/Disable 2552 /// @param u32key \b IN: MOBF dyncrypt u32key 2553 /// @return DMX_FILTER_STATUS_OK - Success 2554 /// @return DMX_FILTER_STATUS_ERROR - Failure 2555 //------------------------------------------------------------------------------------------------- 2556 // DMX_FILTER_STATUS MApi_DMX_Filein_Eng_MOBF_Enable(DMX_FILEIN_PATH ePath, MS_BOOL bEnable, MS_U32 u32key); 2557 2558 //------------------------------------------------------------------------------------------------- 2559 /// Enable FileEng Playback time stamp. 2560 /// @ingroup TSP_Playback 2561 /// @param ePath \b IN: file in path (TSIF) 2562 /// @return DMX_FILTER_STATUS_OK - Success 2563 /// @return DMX_FILTER_STATUS_ERROR - Failure 2564 //------------------------------------------------------------------------------------------------- 2565 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_PlaybackTimeStampEnable(DMX_FILEIN_PATH ePath); 2566 2567 //------------------------------------------------------------------------------------------------- 2568 /// Disable fileEng Playback time stamp. 2569 /// @ingroup TSP_Playback 2570 /// @param ePath \b IN: file in path (TSIF) 2571 /// @return DMX_FILTER_STATUS_OK - Success 2572 /// @return DMX_FILTER_STATUS_ERROR - Failure 2573 //------------------------------------------------------------------------------------------------- 2574 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_PlaybackTimeStampDisable(DMX_FILEIN_PATH ePath); 2575 2576 //------------------------------------------------------------------------------------------------- 2577 /// Set playback time stamp. (LPCR) 2578 /// @ingroup TSP_Playback 2579 /// @param ePath \b IN: file in path (TSIF) 2580 /// @param u32Stamp \b IN: time-stamp value 2581 /// @return DMX_FILTER_STATUS_OK - Success 2582 /// @return DMX_FILTER_STATUS_ERROR - Failure 2583 //------------------------------------------------------------------------------------------------- 2584 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_SetPlaybackStamp(DMX_FILEIN_PATH ePath,MS_U32 u32Stamp); 2585 //------------------------------------------------------------------------------------------------- 2586 /// Get playback time stamp. (LPCR) 2587 /// @ingroup TSP_Playback 2588 /// @param ePath \b IN: file in path (TSIF) 2589 /// @param pu32Stamp \b OUT: pointer to store time-stamp value 2590 /// @return DMX_FILTER_STATUS_OK - Success 2591 /// @return DMX_FILTER_STATUS_ERROR - Failure 2592 //------------------------------------------------------------------------------------------------- 2593 DMX_FILTER_STATUS MApi_DMX_Filein_Eng_GetPlaybackStamp(DMX_FILEIN_PATH ePath,MS_U32* pu32Stamp); 2594 2595 2596 //------------------------------------------------------------- 2597 //MMFI & MINITSP API 2598 //----------------- 2599 // TSP_MM 2600 //----------------- 2601 //------------------------------------------------------------------------------------------------- 2602 /// Check mmfi engine is ilde or not. 2603 /// @ingroup TSP_MM 2604 /// @param ePath \b IN: MM File-in Path 2605 /// @return TRUE - Idle 2606 /// @return FALSE - not idle 2607 //------------------------------------------------------------------------------------------------- 2608 MS_BOOL MApi_DMX_MMFI_Filein_IsIdle(DMX_MMFI_PATH ePath); 2609 2610 //------------------------------------------------------------------------------------------------- 2611 /// Check mmfi engine is busy or not. 2612 /// @ingroup TSP_MM 2613 /// @param ePath \b IN: MM File-in Path 2614 /// @return TRUE - Busy 2615 /// @return FALSE - not busy 2616 //------------------------------------------------------------------------------------------------- 2617 // MS_BOOL MApi_DMX_MMFI_Filein_IsBusy(DMX_MMFI_PATH ePath); 2618 2619 //------------------------------------------------------------------------------------------------- 2620 /// Reset MMFilein Command queue 2621 /// @ingroup TSP_MM 2622 /// @param ePath \b IN: MM File-in Path 2623 /// @return DMX_FILTER_STATUS_OK - Success 2624 /// @return DMX_FILTER_STATUS_ERROR - Failure 2625 //------------------------------------------------------------------------------------------------- 2626 DMX_FILTER_STATUS MApi_DMX_MMFI_Filein_CMDQ_Reset(DMX_MMFI_PATH ePath); 2627 2628 //------------------------------------------------------------------------------------------------- 2629 /// Get the MMFilein CMDQ empty slot number. 2630 /// @ingroup TSP_MM 2631 /// @param ePath \b IN: MM File-in Path 2632 /// @param pu32EmptySlot \b OUT: Empty slot 2633 /// @return DMX_FILTER_STATUS_OK - Success 2634 /// @return DMX_FILTER_STATUS_ERROR - Failure 2635 //------------------------------------------------------------------------------------------------- 2636 DMX_FILTER_STATUS MApi_DMX_MMFI_Filein_CMDQ_GetEmptyNum(DMX_MMFI_PATH ePath, MS_U32 *pu32EmptySlot); 2637 2638 //------------------------------------------------------------------------------------------------- 2639 /// Start to get bit stream by memeory. 2640 /// @ingroup TSP_MM 2641 /// @param eDst \b IN: file in destination path 2642 /// @param pBuf \b IN: the memory containing the bit stream 2643 /// @param u32BufSize \b IN: the size the memory to get 2644 /// @return DMX_FILTER_STATUS_OK - Success 2645 /// @return DMX_FILTER_STATUS_ERROR - Failure 2646 //------------------------------------------------------------------------------------------------- 2647 DMX_FILTER_STATUS MApi_DMX_MMFI_Filein_Start(DMX_MMFI_DST eDst, MS_PHY pBuf, MS_U32 u32BufSize); 2648 2649 //------------------------------------------------------------------------------------------------- 2650 /// Set up parameters for input bit stream from memory. 2651 /// @ingroup TSP_MM 2652 /// @param ePath \b IN: MM File-in Path 2653 /// @param pFileinInfo \b IN: the file in parameters 2654 /// @return DMX_FILTER_STATUS_OK - Success 2655 /// @return DMX_FILTER_STATUS_ERROR - Failure 2656 //------------------------------------------------------------------------------------------------- 2657 DMX_FILTER_STATUS MApi_DMX_MMFI_Filein_Info(DMX_MMFI_PATH ePath, DMX_Filein_info *pFileinInfo); 2658 2659 //------------------------------------------------------------------------------------------------- 2660 /// Disable 192 mode blovk scheme to bypass fill-in timestamp 2661 /// @ingroup TSP_MM 2662 /// @param ePath \b IN: MM File-in Path 2663 /// @param bbypass \b IN: If true, bypass file-in timestamp. 2664 /// @return None 2665 //------------------------------------------------------------------------------------------------- 2666 // void MApi_DMX_MMFI_Filein_BypassTimeStamp(DMX_MMFI_PATH ePath, MS_BOOL bbypass); 2667 //------------------------------------------------------------------------------------------------- 2668 /// Free the PID of MM Filein. 2669 /// @ingroup TSP_MM 2670 /// @param ePath \b IN: MM File-in Path 2671 /// @param pu32FileInTS \b OUT: pointer for timestamp value 2672 /// @return DMX_FILTER_STATUS_OK - Success 2673 /// @return DMX_FILTER_STATUS_ERROR - Failure 2674 //------------------------------------------------------------------------------------------------- 2675 DMX_FILTER_STATUS MApi_DMX_MMFI_GetFileInTimeStamp(DMX_MMFI_PATH ePath, MS_U32 *pu32FileInTS); 2676 2677 //MMFI (MMFI Only) API 2678 //------------------------------------------------------------------------------------------------- 2679 /// Set the PID to be MM File-in 2680 /// @ingroup TSP_MM 2681 /// @param flttype \b IN: MMFI filter type 2682 /// @param u16Pid \b IN: The target PID for MM Filein 2683 /// @param pu8DmxId \b OUT: The demux filter Id for this MMFilein PID 2684 /// @return DMX_FILTER_STATUS_OK - Success 2685 /// @return DMX_FILTER_STATUS_ERROR - Failure 2686 //------------------------------------------------------------------------------------------------- 2687 DMX_FILTER_STATUS MApi_DMX_MMFI_Pid_Open(DMX_MMFI_FLTTYPE flttype, MS_U16 u16Pid, MS_U8* pu8DmxId); 2688 2689 //------------------------------------------------------------------------------------------------- 2690 /// Free the PID of MM Filein. 2691 /// @ingroup TSP_MM 2692 /// @param u8DmxId \b IN: The demux filter Id from MApi_DMX_Pvr_Pid_Open 2693 /// @return DMX_FILTER_STATUS_OK - Success 2694 /// @return DMX_FILTER_STATUS_ERROR - Failure 2695 //------------------------------------------------------------------------------------------------- 2696 DMX_FILTER_STATUS MApi_DMX_MMFI_Pid_Close(MS_U8 u8DmxId); 2697 2698 //------------------------------------------------------------------------------------------------- 2699 /// Get MMFilein Command queue fifo level. 2700 /// @ingroup TSP_MM 2701 /// @param ePath \b IN: MM File-in Path 2702 /// @param pu8CmdQStatus \b OUT: fifo level, 0~3 2703 /// @return DMX_FILTER_STATUS_OK - Success 2704 /// @return DMX_FILTER_STATUS_ERROR - Failure 2705 //------------------------------------------------------------------------------------------------- 2706 DMX_FILTER_STATUS MApi_DMX_MMFI_Filein_CMDQ_FIFOWriteLevel(DMX_MMFI_PATH ePath, MS_U8 *pu8CmdQStatus); 2707 2708 //------------------------------------------------------------------------------------------------- 2709 /// Set MMFI playback timestamp. 2710 /// @ingroup TSP_MM 2711 /// @param ePath \b IN: MM File-in Path 2712 /// @param u32pcr2 \b IN: LPCR2 value 2713 /// @return DMX_FILTER_STATUS_OK - Success 2714 /// @return DMX_FILTER_STATUS_ERROR - Failure 2715 //------------------------------------------------------------------------------------------------- 2716 DMX_FILTER_STATUS MApi_DMX_MMFI_SetPlaybackTimeStamp(DMX_MMFI_PATH ePath, MS_U32 u32pcr2); 2717 2718 //------------------------------------------------------------------------------------------------- 2719 /// Get MMFI Playback timestamp. 2720 /// @ingroup TSP_MM 2721 /// @param ePath \b IN: MM File-in Path 2722 /// @param pu32pcr2 \b OUT: pointer to store LCPR2 value 2723 /// @return DMX_FILTER_STATUS_OK - Success 2724 /// @return DMX_FILTER_STATUS_ERROR - Failure 2725 //------------------------------------------------------------------------------------------------- 2726 DMX_FILTER_STATUS MApi_DMX_MMFI_GetPlaybackTimeStamp(DMX_MMFI_PATH ePath, MS_U32 *pu32pcr2); 2727 2728 //------------------------------------------------------------------------------------------------- 2729 /// Enable remove duplicate A/V packets. 2730 /// @ingroup TSP_MM 2731 /// @param bEnable \b IN: Enable or Disable 2732 /// @return DMX_FILTER_STATUS_OK - Success 2733 /// @return DMX_FILTER_STATUS_ERROR - Failure 2734 //------------------------------------------------------------------------------------------------- 2735 DMX_FILTER_STATUS MApi_DMX_MMFI_RemoveDupAVPkt(MS_BOOL bEnable); 2736 //------------------------------------------------------------------------------------------------- 2737 /// Enable MMFI timestamp mode. 2738 /// @ingroup DMX_ToBeModified_MM 2739 /// @param ePath \b IN: MM File-in Path 2740 /// @return DMX_FILTER_STATUS_OK - Success 2741 /// @return DMX_FILTER_STATUS_ERROR - Failure 2742 /// @note: Merge with MApi_DMX_MMFI_TimeStampDisable 2743 //------------------------------------------------------------------------------------------------- 2744 DMX_FILTER_STATUS MApi_DMX_MMFI_TimeStampEnable(DMX_MMFI_PATH ePath); 2745 //------------------------------------------------------------------------------------------------- 2746 /// Disable MMFI timestamp mode. 2747 /// @ingroup DMX_ToBeModified_MM 2748 /// @param ePath \b IN: MM File-in Path 2749 /// @return DMX_FILTER_STATUS_OK - Success 2750 /// @return DMX_FILTER_STATUS_ERROR - Failure 2751 /// @note: Merge with MApi_DMX_MMFI_TimeStampEnable 2752 //------------------------------------------------------------------------------------------------- 2753 DMX_FILTER_STATUS MApi_DMX_MMFI_TimeStampDisable(DMX_MMFI_PATH ePath); 2754 //------------------------------------------------------------------------------------------------- 2755 /// Set MMFI playback timestamp. 2756 /// @ingroup DMX_ToBeRemove 2757 /// @param ePath \b IN: MM File-in Path 2758 /// @param u32pcr2 \b IN: LPCR2 value 2759 /// @return DMX_FILTER_STATUS_OK - Success 2760 /// @return DMX_FILTER_STATUS_ERROR - Failure 2761 /// @note Duplicate function. 2762 //------------------------------------------------------------------------------------------------- 2763 DMX_FILTER_STATUS MApi_DMX_MMFI_SetPlaybackTimeStamp(DMX_MMFI_PATH ePath, MS_U32 u32Stamp); 2764 2765 //------------------------------------------------------------------------------------------------- 2766 /// Enable/Disable MMFI MOBF function and set MOBF key index. 2767 /// @ingroup TSP_MM 2768 /// @param ePath \b IN: MM File-in Path 2769 /// @param bEnable \b IN: Enable or Disable 2770 /// @param u32key \b IN: MOBF key index 2771 /// @return DMX_FILTER_STATUS_OK - Success 2772 /// @return DMX_FILTER_STATUS_ERROR - Failure 2773 //------------------------------------------------------------------------------------------------- 2774 // DMX_FILTER_STATUS MApi_DMX_MMFI_MOBF_Enable(DMX_MMFI_PATH ePath, MS_BOOL bEnable, MS_U32 u32key); 2775 2776 //------------------------------------------------------------------------------------------------- 2777 /// Set MMFI MOBF level. 2778 /// @ingroup TSP_MM 2779 /// @param ePath \b IN: MM File-in Path 2780 /// @param u8level \b IN: the value of MOBF level 2781 /// @return DMX_FILTER_STATUS_OK - Success 2782 /// @return DMX_FILTER_STATUS_ERROR - Failure 2783 /// @note only used on TSP 1.0 2784 //------------------------------------------------------------------------------------------------- 2785 // DMX_FILTER_STATUS MApi_DMX_MMFI_MOBF_SetLevel(DMX_MMFI_PATH epath, MS_U8 u8level); 2786 //------------------------------------------------------------------------------------------------- 2787 /// Set MMFI MOBF level. 2788 /// @ingroup TSP_MM 2789 /// @param ePath \b IN: MM File-in Path 2790 /// @param u8level \b IN: the value of MOBF level 2791 /// @return DMX_FILTER_STATUS_OK - Success 2792 /// @return DMX_FILTER_STATUS_ERROR - Failure 2793 /// @note only used on TSP 1.0 2794 //------------------------------------------------------------------------------------------------- 2795 DMX_FILTER_STATUS MApi_DMX_MMFI_TimeStampClk(DMX_MMFI_PATH ePath, DMX_TimeStamp_Clk eClk); 2796 2797 //------------------------------------------------------------- 2798 2799 2800 //----------------- 2801 // TSO_General 2802 //----------------- 2803 //------------------------------------------------------------------------------------------------- 2804 /// Set up parameters for input bit stream from memory of TSO path. 2805 /// @ingroup TSO_General 2806 /// @param u8Eng \b IN: TSO engine ID 2807 /// @param pFileinInfo \b IN: the file in parameters 2808 /// @return DMX_FILTER_STATUS_OK - Success 2809 /// @return DMX_FILTER_STATUS_ERROR - Failure 2810 //------------------------------------------------------------------------------------------------- 2811 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_Info(MS_U8 u8Eng, DMX_Filein_info *pFileinInfo); 2812 2813 //------------------------------------------------------------------------------------------------- 2814 /// Check if no memory transfer is under going of TSO path 2815 /// @ingroup TSO_General 2816 /// @param u8Eng \b IN: TSO engine ID 2817 /// @return TRUE - if idle 2818 /// @return FALSE - otherwise 2819 //------------------------------------------------------------------------------------------------- 2820 // MS_BOOL SYMBOL_WEAK MApi_DMX_TSO_Filein_IsIdle(MS_U8 u8Eng); 2821 2822 //------------------------------------------------------------------------------------------------- 2823 /// Get TSO file-in CMDQ empty number. 2824 /// @ingroup TSO_General 2825 /// @param u8Eng \b IN: TSO engine ID 2826 /// @param pu32EmptySlot \b OUT: pointer to store CMDQ empty slot number 2827 /// @return DMX_FILTER_STATUS_OK - Success 2828 /// @return DMX_FILTER_STATUS_ERROR - Failure 2829 //------------------------------------------------------------------------------------------------- 2830 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_CMDQ_GetEmptyNum(MS_U8 u8Eng, MS_U32 *pu32EmptySlot); 2831 2832 //------------------------------------------------------------------------------------------------- 2833 /// Get TSO file-in CMDQ reset. 2834 /// @ingroup TSO_General 2835 /// @param u8Eng \b IN: TSO engine ID 2836 /// @return DMX_FILTER_STATUS_OK - Success 2837 /// @return DMX_FILTER_STATUS_ERROR - Failure 2838 //------------------------------------------------------------------------------------------------- 2839 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_CMDQ_Reset(MS_U8 u8Eng); 2840 2841 //------------------------------------------------------------------------------------------------- 2842 /// Start to get bit stream by memeory of TSO path. 2843 /// @ingroup TSO_General 2844 /// @param u8Eng \b IN: TSO engine ID 2845 /// @param pBuf \b IN: the memory containing the bit stream 2846 /// @param u32BufSize \b IN: the size the memory to get 2847 /// @return DMX_FILTER_STATUS_OK - Success 2848 /// @return DMX_FILTER_STATUS_ERROR - Failure 2849 //------------------------------------------------------------------------------------------------- 2850 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_Start(MS_U8 u8Eng, MS_PHY pBuf, MS_U32 u32BufSize); 2851 2852 //------------------------------------------------------------------------------------------------- 2853 /// Stop to get bit stream by memeory of TSO path. 2854 /// @ingroup TSO_General 2855 /// @param u8Eng \b IN: TSO engine ID 2856 /// @return DMX_FILTER_STATUS_OK - Success 2857 /// @return DMX_FILTER_STATUS_ERROR - Failure 2858 //------------------------------------------------------------------------------------------------- 2859 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_Stop(MS_U8 u8Eng); 2860 2861 //------------------------------------------------------------------------------------------------- 2862 /// Set TSO playback time stamp. (LPCR) 2863 /// @ingroup TSO_General 2864 /// @param u8Eng \b IN: TSO engine ID 2865 /// @param u32Stamp \b OUT: pointer to store timestamp value 2866 /// @return DMX_FILTER_STATUS_OK - Success 2867 /// @return DMX_FILTER_STATUS_ERROR - Failure 2868 //------------------------------------------------------------------------------------------------- 2869 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_SetPlaybackTimeStamp(MS_U8 u8Eng, MS_U32 u32Stamp); 2870 2871 //------------------------------------------------------------------------------------------------- 2872 /// Get TSO file-in time stamp. (LPCR) 2873 /// @ingroup TSO_General 2874 /// @param u8Eng \b IN: TSO engine ID 2875 /// @param pu32Stamp \b OUT: pointer to store timestamp value 2876 /// @return DMX_FILTER_STATUS_OK - Success 2877 /// @return DMX_FILTER_STATUS_ERROR - Failure 2878 //------------------------------------------------------------------------------------------------- 2879 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_GetPlaybackStamp(MS_U8 u8Eng, MS_U32* pu32Stamp); 2880 2881 //------------------------------------------------------------------------------------------------- 2882 /// Get TSO file-in time stamp. 2883 /// @ingroup TSO_General 2884 /// @param u8Eng \b IN: TSO engine ID 2885 /// @param pu32Stamp \b OUT: pointer to store timestamp value 2886 /// @return DMX_FILTER_STATUS_OK - Success 2887 /// @return DMX_FILTER_STATUS_ERROR - Failure 2888 //------------------------------------------------------------------------------------------------- 2889 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_GetFileInTimeStamp(MS_U8 u8Eng, MS_U32 *pu32Stamp); 2890 2891 //------------------------------------------------------------------------------------------------- 2892 /// Disable 192 mode block scheme to bypass fill-in timestamp. 2893 /// @ingroup TSO_General 2894 /// @param u8Eng \b IN: TSO engine id. 2895 /// @param bbypass \b IN: If true, bypass file-in timestamp. 2896 /// @return DMX_FILTER_STATUS_OK - Success 2897 /// @return DMX_FILTER_STATUS_ERROR - Failure 2898 //------------------------------------------------------------------------------------------------- 2899 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_BypassFileInTimeStamp(MS_U8 u8Eng, MS_BOOL bbypass); 2900 //------------------------------------------------------------------------------------------------- 2901 /// Enable TSO file in time stamp. 2902 /// @ingroup DMX_ToBeModified_MM_TSO 2903 /// @param u8Eng \b IN: TSO engine id. 2904 /// @return DMX_FILTER_STATUS_OK - Success 2905 /// @return DMX_FILTER_STATUS_ERROR - Failure 2906 //------------------------------------------------------------------------------------------------- 2907 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_TimeStampEnable(MS_U8 u8Eng); 2908 2909 //------------------------------------------------------------------------------------------------- 2910 /// Disable TSO file in time stamp 2911 /// @ingroup DMX_ToBeModified_MM_TSO 2912 /// @param u8Eng \b IN: TSO engine id. 2913 /// @return DMX_FILTER_STATUS_OK - Success 2914 /// @return DMX_FILTER_STATUS_ERROR - Failure 2915 //------------------------------------------------------------------------------------------------- 2916 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_TimeStampDisable(MS_U8 u8Eng); 2917 //------------------------------------------------------------------------------------------------- 2918 /// Set TSO Out Clock. 2919 /// @ingroup TSO_General 2920 /// @param u8Eng \b IN: TSO engine ID 2921 /// @param eTsOutClk \b IN: TSO out clock select 2922 /// @param eTsOutClkSrc \b IN: TSO out clock source select 2923 /// @param u16DivNum \b IN: If select DMPLLDIV source, setting Divide number 2924 /// @param bClkInv \b IN: If Out Clock invert 2925 /// @return DMX_FILTER_STATUS_OK - Success 2926 /// @return DMX_FILTER_STATUS_ERROR - Failure 2927 /// @note If eTsOutClk is E_DMX_TSO_OUTCLK_DIV2N, eTsOutClkSrc could be E_DMX_TSO_OUTCLKSRC_172M_2N/E_DMX_TSO_OUTCLKSRC_288M_2N/E_DMX_TSO_OUTCLKSRC_432M_2N, 2928 /// @note and user should set u16DivNum to generate final output clock. 2929 /// @note If eTsOutClk is E_DMX_TSO_OUTCLK_DIVN, eTsOutClkSrc could be E_DMX_TSO_OUTCLKSRC_216M_N, and user should set u16DivNum to generate final output clock. 2930 /// @note If eTsOutClk is E_DMX_TSO_OUTCLK_PTSOOUT/E_DMX_TSO_OUTCLK_PTSOOUT_DIV8, eTsOutClkSrc could be E_DMX_TSO_OUTCLKSRC_P_TS0IN/E_DMX_TSO_OUTCLKSRC_P_TS1IN, etc, 2931 /// @note and this colck is from external pad 2932 /// @note E_DMX_TSO_OUTCLK_62M/E_DMX_TSO_OUTCLK_54M/E_DMX_TSO_OUTCLK_27M/E_DMX_TSO_OUTCLK_Dmd are const 2933 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_SetOutClk(MS_U8 u8Eng, DMX_TSO_OutClk eTsOutClk, DMX_TSO_OutClkSrc eTsOutClkSrc, MS_U16 u16DivNum, MS_BOOL bClkInv); 2934 2935 //------------------------------------------------------------------------------------------------- 2936 /// Enable or disable TSO output. 2937 /// @ingroup TSO_General 2938 /// @param u8Eng \b IN: TSO engine ID 2939 /// @param bEnable \b IN: TRUE is enable, FALSE is disable 2940 /// @return DMX_FILTER_STATUS_OK - Success 2941 /// @return DMX_FILTER_STATUS_ERROR - Failure 2942 //------------------------------------------------------------------------------------------------- 2943 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_OutputEnable(MS_U8 u8Eng, MS_BOOL bEnable); 2944 2945 //TSO2 API 2946 //------------------------------------------------------------------------------------------------- 2947 /// Set or get local stream ID of TSO Out. 2948 /// @ingroup TSO_General 2949 /// @param u8Eng \b IN: TSO engine ID 2950 /// @param eIf \b IN: TSO input TSIF 2951 /// @param pu8StrId \b IN or OUT: pointer to store local stream ID, default value is 0x47 2952 /// @param bSet \b IN: If TRUE, set local stream id, otherwise get local stream id 2953 /// @return DMX_FILTER_STATUS_OK - Success 2954 /// @return DMX_FILTER_STATUS_ERROR - Failure 2955 //------------------------------------------------------------------------------------------------- 2956 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_LocalStreamId(MS_U8 u8Eng, DMX_TSIF eIf, MS_U8* pu8StrId, MS_BOOL bSet); 2957 2958 //------------------------------------------------------------------------------------------------- 2959 /// Set TSO virtual queue buffer. 2960 /// @ingroup TSO_General 2961 /// @param u8Eng \b IN: TSO engine ID 2962 /// @param u32Addr \b IN: TSO VQ buffer address 2963 /// @param u32BufSize \b IN: TSO VQ buffer size 2964 /// @return DMX_FILTER_STATUS_OK - Success 2965 /// @return DMX_FILTER_STATUS_ERROR - Failure 2966 //------------------------------------------------------------------------------------------------- 2967 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_SVQBuf_Set(MS_U8 u8Eng, MS_PHY phyAddr, MS_U32 u32BufSize); 2968 2969 //------------------------------------------------------------------------------------------------- 2970 ///TSO (TS output) Demux Flow input sources configure getting and setting. 2971 /// @ingroup TSO_General 2972 /// @param eFlow \b IN: DMX TSO playback flow, DMX_FLOW_TSO_PLAYBACK/DMX_FLOW_TSO_PLAYBACK1 2973 /// @param eTSOInIf \b IN: TSO input interface, DMX_TSIF_LIVE0/DMX_TSIF_LIVE1/DMX_TSIF_LIVE2/DMX_TSIF_FILE0/DMX_TSIF_FILE1 2974 /// @param stInputInfo.Input \b IN/OUT: TSO input interface source, enum item of DMX_FLOW_INPUT 2975 /// @param stInputInfo.bClkInv \b IN/OUT: If TSO input interface source is from demod, please set clock invert type 2976 /// @param stInputInfo.bExtSync \b IN/OUT: If TSO input interface source is from demod, please set external sync type 2977 /// @param stInputInfo.bParallel \b IN/OUT: If TSO input interface source is from demod, please set parallel or serial type 2978 /// @param u8LocalStrId \b IN/OUT: The local stream ID (TS output sync byte) value, default is 0x47 2979 /// @param bBypassAll \b IN/OUT: TRUE means bypass all ts data for TSO playback; FALSE means tso will output ts data by PIDs 2980 /// @param bEnable \b IN/OUT: TRUE means enable TSO input now; FALSE means disable this TSO input fource 2981 /// @return DMX_FILTER_STATUS_OK - Success 2982 /// @return DMX_FILTER_STATUS_ERROR - Failure 2983 /// @note This API is for TSO 2.0 HW architecture. 2984 /// @note Serval TSO input will be merge to be one TSO output. This API is for configuring one of TSO input. 2985 /// @note If there are 3 TSO input source, you shold call this API 3 times for every TSO input path configure. 2986 //------------------------------------------------------------------------------------------------- 2987 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Flow_InputCfg(DMX_TSO_InputCfg* pstInputCfg); 2988 2989 //------------------------------------------------------------------------------------------------- 2990 /// TSO (TS output) Demux Flow output path configure 2991 /// @ingroup TSO_General 2992 /// @param eFlow \b IN: DMX TSO playback flow, DMX_FLOW_TSO_PLAYBACK/DMX_FLOW_TSO_PLAYBACK1 2993 /// @param eOutPad \b IN: TSO output pad select, DMX_FLOW_OUTPUT_EXT_PAD1/DMX_FLOW_OUTPUT_EXT_PAD3/// 2994 /// @param u16OutPktSize \b IN/OUT: TSO output packet size. default vale is 188 bytes 2995 /// @param bEnable \b IN/OUT: TRUE means enable TSO output now; FALSE means disable TSO output 2996 /// @param bDefOutClk \b IN: TURE means using default clock setting given by driver; FALSE means set output clock by user parameters 2997 /// @param bOutClkInv \b IN/OUT: Set inver type of TSO output clock 2998 /// @param eTsoOutClk \b IN/OUT: Select TSO output clock, enum item of DMX_TSO_OutClk 2999 /// @param eTsoOutClkSrc \b IN/OUT: Select TSO output clock source, enum item of DMX_TSO_OutClkSrc 3000 /// @param u16DivNum \b IN/OUT: If TSO output clock source is E_DMX_TSO_OUTCLK_DIV2N/E_DMX_TSO_OUTCLK_DIVN, set this value for clock generatng. 3001 /// @param bSet \b IN: TURE: set, FALSE: get 3002 /// @return DMX_FILTER_STATUS_OK - Success 3003 /// @return DMX_FILTER_STATUS_ERROR - Failure 3004 /// @note This API is for TSO 2.0 HW architecture. 3005 /// @note Serval TSO input will be merge to be one TSO output. This API is for configuring TSO output path. 3006 /// @note TSO output clock source selection, please also refer to MApi_DMX_TSO_SetOutClk API. 3007 //------------------------------------------------------------------------------------------------- 3008 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Flow_OutputCfg(DMX_TSO_OutputCfg* pstOutputCfg); 3009 //------------------------------------------------------------------------------------------------- 3010 /// TSO (TS output) input pid filter open. 3011 /// @ingroup TSO_General 3012 /// @param u8Eng \b IN: TSO engine ID 3013 /// @param eTSOInSrc \b IN: TSO PID filter source 3014 /// @param u16Pid \b IN: PID value of TSO PID filter 3015 /// @param pu16DmxId \b IN: Pointer to store PID filter ID 3016 /// @return DMX_FILTER_STATUS_OK - Success 3017 /// @return DMX_FILTER_STATUS_ERROR - Failure 3018 //------------------------------------------------------------------------------------------------- 3019 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Pid_Open(MS_U8 u8Eng, DMX_TSIF eTSOInSrc, MS_U16 u16Pid, MS_U16* pu16DmxId); 3020 3021 //------------------------------------------------------------------------------------------------- 3022 /// TSO (TS output) input pid filter close. 3023 /// @ingroup TSO_General 3024 /// @param u8Eng \b IN: TSO engine ID 3025 /// @param u16DmxId \b IN: TSO PID filter source 3026 /// @return DMX_FILTER_STATUS_OK - Success 3027 /// @return DMX_FILTER_STATUS_ERROR - Failure 3028 //------------------------------------------------------------------------------------------------- 3029 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Pid_Close(MS_U8 u8Eng, MS_U16 u16DmxId); 3030 //------------------------------------------------------------------------------------------------- 3031 /// Get TSO file-in read address. 3032 /// @ingroup TSO_General 3033 /// @param u8Eng \b IN: TSO engine ID 3034 /// @param pu32Read \b OUT: pointer to store read address 3035 /// @return DMX_FILTER_STATUS_OK - Success 3036 /// @return DMX_FILTER_STATUS_ERROR - Failure 3037 //------------------------------------------------------------------------------------------------- 3038 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_TSO_Filein_GetReadAddr(MS_U8 u8Eng, MS_PHY* pphyRead); 3039 //---------------------------------------------------------- 3040 3041 3042 //-------------------------------------------------------------------------------------------------- 3043 /// Get TSP firmware version. 3044 /// @ingroup TSP_General 3045 /// @param u32FWVer \b OUT: TSP firmware version infomation 3046 /// @return DMX_FILTER_STATUS_OK - Success 3047 /// @return DMX_FILTER_STATUS_ERROR - Failure 3048 //-------------------------------------------------------------------------------------------------- 3049 // DMX_FILTER_STATUS MApi_TSP_Get_FW_VER(MS_U32* u32FWVer); 3050 //------------------------------------------------------------------------------------------------- 3051 /// Set TSP Debug Level. 3052 /// @ingroup TSP_General 3053 /// @param u16DbgSwitch \b IN: debug level. 3054 /// @return DMX_FILTER_STATUS_OK - Success 3055 /// @return DMX_FILTER_STATUS_ERROR - Failure 3056 //------------------------------------------------------------------------------------------------- 3057 DMX_FILTER_STATUS MApi_DMX_SetDbgLevel(DMX_DBGMSG_LEVEL level); 3058 3059 //----------------- 3060 // TSP_Debug 3061 //----------------- 3062 //------------------------------------------------------------------------------------------------- 3063 /// Get interrupt count. 3064 /// @ingroup TSP_Debug 3065 /// @param pu32Count \b OUT: interrupt count 3066 /// @return DMX_FILTER_STATUS_OK - Success 3067 /// @return DMX_FILTER_STATUS_ERROR - Failure 3068 //------------------------------------------------------------------------------------------------- 3069 // DMX_FILTER_STATUS MApi_DMX_Get_Intr_Count(MS_U32* pu32Count); 3070 //-------------------------------------------------------------------------------------------------- 3071 /// Get TSP driver library information 3072 /// @ingroup TSP_General 3073 /// @param ppVersion \b OUT: TSP library version infomation 3074 /// @return DMX_FILTER_STATUS_OK - Success 3075 /// @return DMX_FILTER_STATUS_ERROR - Failure 3076 //-------------------------------------------------------------------------------------------------- 3077 DMX_FILTER_STATUS MApi_DMX_GetLibVer(const MSIF_Version **ppVersion); 3078 3079 //------------------------------------------------------------------------------------------------- 3080 /// Get the register value of HW debug port . 3081 /// @ingroup TSP_Debug 3082 /// @param u32DbgSel \b IN: Set which HW debug info you want to get. (ex: 0x4F, check TSIF0 data info) 3083 /// @param u32DbgInfo \b OUT: pointer to store the debug port value 3084 /// @return DMX_FILTER_STATUS_OK - Success 3085 /// @return DMX_FILTER_STATUS_ERROR - Failure 3086 //------------------------------------------------------------------------------------------------- 3087 DMX_FILTER_STATUS MApi_DMX_GetDbgPortInfo(MS_U32 u32DbgSel,MS_U32* u32DbgInfo); 3088 //------------------------------------------------------------------------------------------------- 3089 /// Set memory buffer information for TSP AEON to print debug message. 3090 /// @ingroup TSP_Debug 3091 /// @param phyAddr \b IN: physical address of buffer 3092 /// @param u32Size \b IN: size of buffer 3093 /// @param u32DbgWord \b IN: control word to filter debug message 3094 /// @return DMX_FILTER_STATUS_OK - Success 3095 /// @return DMX_FILTER_STATUS_ERROR - Failure 3096 //------------------------------------------------------------------------------------------------- 3097 // DMX_FILTER_STATUS MApi_DMX_SetFwDbgParam(MS_PHY phyAddr, MS_U32 u32Size, MS_U32 u32DbgWord); 3098 //------------------------------------------------------------------------------------------------- 3099 /// Get dis-continue count by ts source and specific FIFO. 3100 /// @ingroup TSP_Debug 3101 /// @param pDmxInfo \b IN: set control parameter to get related tsif packet count. 3102 /// @param pu32Cnt \b OUT: dis-continue packet count 3103 /// @return DMX_FILTER_STATUS_OK - Success 3104 /// @return DMX_FILTER_STATUS_ERROR - Failure 3105 //------------------------------------------------------------------------------------------------- 3106 DMX_FILTER_STATUS MApi_DMX_Get_DisContiCnt(DMX_DisContiCnt_info* pDmxInfo, MS_U32* pu32Cnt); 3107 //------------------------------------------------------------------------------------------------- 3108 /// Get drop packet count by ts source and specific FIFO. 3109 /// @ingroup TSP_Debug 3110 /// @param pDmxInfo \b IN: set control parameter to get related source packet count. 3111 /// @param pu32Cnt \b OUT: drop packet count 3112 /// @return DMX_FILTER_STATUS_OK - Success 3113 /// @return DMX_FILTER_STATUS_ERROR - Failure 3114 //------------------------------------------------------------------------------------------------- 3115 DMX_FILTER_STATUS MApi_DMX_Get_DropPktCnt(DMX_DropPktCnt_info* pDmxInfo, MS_U32* pu32Cnt); 3116 3117 //------------------------------------------------------------------------------------------------- 3118 ///Get locked packet count by ts source and specific FIFO. 3119 /// @ingroup TSP_Debug 3120 /// @param pDmxInfo \b IN: set control parameter to get related tsif packet count. 3121 /// @param pu32Cnt \b OUT: Lock packet count 3122 /// @return DMX_FILTER_STATUS_OK - Success 3123 /// @return DMX_FILTER_STATUS_ERROR - Failure 3124 //------------------------------------------------------------------------------------------------- 3125 DMX_FILTER_STATUS MApi_DMX_Get_LockPktCnt(DMX_LockPktCnt_info* pDmxInfo, MS_U32* pu32Cnt); 3126 //------------------------------------------------------------------------------------------------- 3127 ///Get dis-continue count by ts source and specific FIFO. 3128 /// @ingroup TSP_Debug 3129 /// @param pDmxInfo \b IN: set control parameter to get related source packet count. 3130 /// @param pu32Cnt \b OUT: AV packet count 3131 /// @return DMX_FILTER_STATUS_OK - Success 3132 /// @return DMX_FILTER_STATUS_ERROR - Failure 3133 //------------------------------------------------------------------------------------------------- 3134 DMX_FILTER_STATUS MApi_DMX_Get_AVPktCnt(DMX_AVPktCnt_info* DmxInfo, MS_U32* pu32Cnt); 3135 //------------------------------------------------------------------------------------------------- 3136 /// Get section TEI packet count by ts source. 3137 /// @ingroup TSP_Debug 3138 /// @param FltSrc \b IN: TS source 3139 /// @param pu32PktCnt \b OUT: TEI packet count 3140 /// @return DMX_FILTER_STATUS_OK - Success 3141 /// @return DMX_FILTER_STATUS_ERROR - Failure 3142 //------------------------------------------------------------------------------------------------- 3143 // DMX_FILTER_STATUS MApi_DMX_Get_SecTEI_PktCount(DMX_FILTER_TYPE FltSrc, MS_U32* pu32PktCnt); 3144 //------------------------------------------------------------------------------------------------- 3145 /// Reset section TEI packet count by DMX filter index. 3146 /// @ingroup TSP_Debug 3147 /// @param FltSrc \b IN: TS source 3148 /// @return DMX_FILTER_STATUS_OK - Success 3149 /// @return DMX_FILTER_STATUS_ERROR - Failure 3150 //------------------------------------------------------------------------------------------------- 3151 // DMX_FILTER_STATUS MApi_DMX_Reset_SecTEI_PktCount(DMX_FILTER_TYPE FltSrc); 3152 //------------------------------------------------------------------------------------------------- 3153 /// Get section dis-continue packet count. 3154 /// @ingroup TSP_Debug 3155 /// @param u32DmxID \b IN: DMX filter index 3156 /// @param pu32PktCnt \b OUT: Dis-continue packet count 3157 /// @return DMX_FILTER_STATUS_OK - Success 3158 /// @return DMX_FILTER_STATUS_ERROR - Failure 3159 //------------------------------------------------------------------------------------------------- 3160 // DMX_FILTER_STATUS MApi_DMX_Get_SecDisCont_PktCount(MS_U32 u32DmxID, MS_U32* pu32PktCnt); 3161 //------------------------------------------------------------------------------------------------- 3162 /// Reset section dis-continue packet count. 3163 /// @ingroup TSP_Debug 3164 /// @param u32DmxID \b IN: DMX filter Id 3165 /// @return DMX_FILTER_STATUS_OK - Success 3166 /// @return DMX_FILTER_STATUS_ERROR - Failure 3167 //------------------------------------------------------------------------------------------------- 3168 // DMX_FILTER_STATUS MApi_DMX_Reset_SecDisCont_PktCount(MS_U32 u32DmxID); 3169 //----------------------------------------------------- 3170 3171 //----------------- 3172 // TSP_FIQ 3173 //----------------- 3174 //------------------------------------------------------------------------------------------------- 3175 /// Enable/Disable section filter rush pass. 3176 /// @ingroup TSP_FIQ 3177 /// @param u32DmxID \b IN: DMX filter Id 3178 /// @param u8Enable \b IN: TRUE: enable, FALSE: disable 3179 /// @return DMX_FILTER_STATUS_OK - Success 3180 /// @return DMX_FILTER_STATUS_ERROR - Failure 3181 /// @note Now only TSP 2.0 & TSP 4.0 support it. 3182 //------------------------------------------------------------------------------------------------- 3183 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_FQ_SetFltRushPass(MS_U8 u8DmxId, MS_U8 u8Enable); 3184 //------------------------------------------------------------------------------------------------- 3185 /// Initialize Demux API for FIQ Enable. 3186 /// @ingroup TSP_FIQ 3187 /// @param u32FQEng \b IN: FQ engine id 3188 /// @param pFQInfo \b IN: Init FQ Setting 3189 /// @return DMX_FILTER_STATUS_OK - Success 3190 /// @return DMX_FILTER_STATUS_ERROR - Failure 3191 /// @note if want to use FQ, please call this API after calling MApi_DMX_Init. (FQ does not support for all chip) 3192 //------------------------------------------------------------------------------------------------- 3193 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_FQ_Init(MS_U32 u32FQEng, DMX_FQ_Info* pFQInfo); 3194 //------------------------------------------------------------------------------------------------- 3195 /// Finalize Demux API for FIQ. 3196 /// @ingroup TSP_FIQ 3197 /// @param u32FQEng \b IN: FQ engine id 3198 /// @return DMX_FILTER_STATUS_OK - Success 3199 /// @return DMX_FILTER_STATUS_ERROR - Failure 3200 //------------------------------------------------------------------------------------------------- 3201 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_FQ_Exit(MS_U32 u32FQEng); 3202 //------------------------------------------------------------------------------------------------- 3203 /// Enable FIQ rush function. 3204 /// @ingroup TSP_FIQ 3205 /// @param u32FQEng \b IN: FQ engine id 3206 /// @return DMX_FILTER_STATUS_OK - Success 3207 /// @return DMX_FILTER_STATUS_ERROR - Failure 3208 //------------------------------------------------------------------------------------------------- 3209 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_FQ_RushEnable(MS_U32 u32FQEng); 3210 3211 //------------------------------------------------------------------------------------------------- 3212 /// Select path to skip rush data. 3213 /// @ingroup TSP_FIQ 3214 /// @param u32FQEng \b IN: FQ engine id 3215 /// @param eSkipPath \b IN: Select path to skip rush data 3216 /// @return DMX_FILTER_STATUS_OK - Success 3217 /// @return DMX_FILTER_STATUS_ERROR - Failure 3218 //------------------------------------------------------------------------------------------------- 3219 DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_FQ_SkipRushData(MS_U32 u32FQEng, DMX_FQ_SkipPath eSkipPath); 3220 //----------------------------------------------------- 3221 3222 //----------------- 3223 // TSP_Merge 3224 //----------------- 3225 //------------------------------------------------------------------------------------------------- 3226 /// Set or Get merge stream source id and sync byte 3227 /// @ingroup TSP_Merge 3228 /// @param eIf \b IN: Eunm value of DMX TSIF selection 3229 /// @param u8StrId \b IN: Stream index 3230 /// @param pu8SyncByte \b IN: Pointer to sync bytearray of merege streams 3231 /// @param bSet \b IN: TRUE to setting data or FALSE to getting table 3232 /// @return DMX_FILTER_STATUS_OK - Success 3233 /// @return DMX_FILTER_STATUS_ERROR - Failure 3234 /// @note: Currently, maxmum number is 8, and don't call this API when stream processing is started 3235 //------------------------------------------------------------------------------------------------- 3236 // DMX_FILTER_STATUS SYMBOL_WEAK MApi_DMX_MStr_SyncByte(DMX_TSIF eIf, MS_U8 u8StrId, MS_U8* pu8SyncByte, MS_BOOL bSet); 3237 //----------------------------------------------------- 3238 3239 3240 //--- Common Interface for TSP config and Api commands ------------// 3241 //------------------------------------------------------------------------------------------------- 3242 /// General function for set cmd or get infomation. 3243 /// @ingroup TSP_Debug 3244 /// @param u32Cmd \b IN: DMX filter Id 3245 /// @param u32Config \b IN: Config 0 (define by case) 3246 /// @param u32DataNum \b IN: Config 0 (define by case) 3247 /// @param pData \b OUT: Output data 3248 /// @return DMX_FILTER_STATUS_OK - Success 3249 /// @return DMX_FILTER_STATUS_ERROR - Failure 3250 //------------------------------------------------------------------------------------------------- 3251 DMX_FILTER_STATUS MApi_DMX_CMD_Run(MS_U32 u32Cmd, MS_U32 u32Config, MS_U32 u32DataNum, void *pData); 3252 3253 #if 0 3254 DMX_FILTER_STATUS MApi_DMX_ResetFileinTimestamp(void) 3255 #endif 3256 3257 3258 #ifdef __cplusplus 3259 } 3260 #endif 3261 3262 #endif // #ifndef __API_DMX_H__ 3263