xref: /utopia/UTPA2-700.0.x/mxlib/include/drvDMD_INTERN_DVBS_v2.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
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   drvDMD_DVBS_INTERN.h
98 /// @brief  DVBS Driver Interface
99 /// @author MStar Semiconductor Inc.
100 ///////////////////////////////////////////////////////////////////////////////////////////////////
101 
102 #ifndef _DRV_DVBS_V2_H_
103 #define _DRV_DVBS_V2_H_
104 
105 //#include "MsCommon.h"
106 //#include "drvDMD_common.h"
107 #include "drvDMD_INTERN_DVBS.h"
108 #ifdef __cplusplus
109 extern "C"
110 {
111 #endif
112 
113 #ifndef DLL_PUBLIC
114 #define DLL_PUBLIC
115 #endif
116 //-------------------------------------------------------------------------------------------------
117 //  Driver Capability
118 //-------------------------------------------------------------------------------------------------
119 typedef enum {
120     DMD_DVBS_DRV_CMD_Init,
121     DMD_DVBS_DRV_CMD_Exit,
122     DMD_DVBS_DRV_CMD_SetDbgLevel,
123     DMD_DVBS_DRV_CMD_GetInfo,
124     DMD_DVBS_DRV_CMD_GetLibVer,
125     DMD_DVBS_DRV_CMD_GetFWVer,
126     DMD_DVBS_DRV_CMD_GetDSPReg,
127     DMD_DVBS_DRV_CMD_SetDSPReg,
128     DMD_DVBS_DRV_CMD_GetReg,
129     DMD_DVBS_DRV_CMD_SetReg,
130     DMD_DVBS_DRV_CMD_SetSerialControl,
131     DMD_DVBS_DRV_CMD_BlindScan_Config,
132     DMD_DVBS_DRV_CMD_BlindScan_Config_symbol_rate_list,
133     DMD_DVBS_DRV_CMD_SetConfig,
134     DMD_DVBS_DRV_CMD_SetConfig_symbol_rate_list,
135     DMD_DVBS_DRV_CMD_SetActive,
136     DMD_DVBS_DRV_CMD_GetLockWithRFPower,
137     DMD_DVBS_DRV_CMD_GetSignalStrengthWithRFPower,
138     //DMD_DVBS_DRV_CMD_GetSignalQualityWithRFPower,
139     DMD_DVBS_DRV_CMD_ActiveDmdSwitch,
140     DMD_DVBS_DRV_CMD_GetSNR,
141     DMD_DVBS_DRV_CMD_GetPostViterbiBer,
142     DMD_DVBS_DRV_CMD_GetPacketErr,
143     DMD_DVBS_DRV_CMD_GetCellID,
144     DMD_DVBS_DRV_CMD_GetStatus,
145     DMD_DVBS_DRV_CMD_SetPowerState,
146     DMD_DVBS_DRV_CMD_Demod_Restart,
147     DMD_DVBS_DRV_CMD_Get_FreqOffset,
148     DMD_DVBS_DRV_CMD_BlindScan_Start,
149     DMD_DVBS_DRV_CMD_BlindScan_NextFreq,
150     DMD_DVBS_DRV_CMD_BlindScan_Cancel,
151     DMD_DVBS_DRV_CMD_BlindScan_End,
152     DMD_DVBS_DRV_CMD_BlindScan_GetChannel,
153     DMD_DVBS_DRV_CMD_BlindScan_GetCurrentFreq,
154     DMD_DVBS_DRV_CMD_BlindScan_WaitCurFreqFinished,
155     DMD_DVBS_DRV_CMD_BlindScan_GetTunerFreq,
156     DMD_DVBS_DRV_CMD_DiSEqC_Init,
157     DMD_DVBS_DRV_CMD_DiSEqC_SetLNBOut,
158     DMD_DVBS_DRV_CMD_DiSEqC_GetLNBOut,
159     DMD_DVBS_DRV_CMD_DiSEqC_Set22kOnOff,
160     DMD_DVBS_DRV_CMD_DiSEqC_Get22kOnOff,
161     DMD_DVBS_DRV_CMD_DiSEqC_SendCmd,
162     DMD_DVBS_DRV_CMD_DiSEqC_SetTxToneMode,
163     DMD_DVBS_DRV_CMD_DiSEqC_SetTone,
164     DMD_DVBS_DRV_CMD_UnicableAGCCheckPower,
165     DMD_DVBS_DRV_CMD_GetIFAGC,
166 
167     //Leo add
168     DMD_DVBS_DRV_CMD_GetTsDivNum,
169     DMD_DVBS_DRV_CMD_GetCurrentDemodCodeRate,
170     DMD_DVBS_DRV_CMD_GetTunrSignalLevel_PWR,
171     //Terry add
172     DMD_DVBS_DRV_CMD_Set_IS_ID,
173     DMD_DVBS_DRV_CMD_Set_Default_IS_ID,
174     DMD_DVBS_DRV_CMD_Get_IS_ID_INFO,
175     DMD_DVBS_DRV_CMD_VCM_Init,
176     DMD_DVBS_DRV_CMD_VCM_Check,
177     DMD_DVBS_DRV_CMD_VCM_Enabled,
178     DMD_DVBS_DRV_CMD_VCM_Mode,
179     DMD_DVBS_DRV_CMD_INT_MODE,
180     DMD_DVBS_DRV_CMD_GetParam,
181     DMD_DVBS_DRV_CMD_GetAGCInfo
182 } DMD_DVBS_DRV_COMMAND;
183 
184 
185 typedef struct DLL_PACKED _DMD_DVBS_InitData_Transform
186 {
187     // tuner parameter
188     MS_U8 u8SarChannel;
189 
190 /*
191     DMD_RFAGC_SSI *pTuner_RfagcSsi;
192     MS_U16 u16Tuner_RfagcSsi_Size;
193     DMD_IFAGC_SSI *pTuner_IfagcSsi_LoRef;
194     MS_U16 u16Tuner_IfagcSsi_LoRef_Size;
195     DMD_IFAGC_SSI *pTuner_IfagcSsi_HiRef;
196     MS_U16 u16Tuner_IfagcSsi_HiRef_Size;
197     DMD_IFAGC_ERR *pTuner_IfagcErr_LoRef;
198     MS_U16 u16Tuner_IfagcErr_LoRef_Size;
199     DMD_IFAGC_ERR *pTuner_IfagcErr_HiRef;
200     MS_U16 u16Tuner_IfagcErr_HiRef_Size;
201     DMD_SQI_CN_NORDIGP1 *pSqiCnNordigP1;
202     MS_U16 u16SqiCnNordigP1_Size;
203 */
204     // register init
205     MS_U8 *u8DMD_DVBS_DSPRegInitExt; // TODO use system variable type
206     MS_U8 u8DMD_DVBS_DSPRegInitSize;
207     MS_U8 *u8DMD_DVBS_InitExt; // TODO use system variable type
208 } DMD_DVBS_InitData_Transform;
209 
210 
211 typedef struct DLL_PACKED _DVBS_Init_PARAM
212 {
213 	DMD_DVBS_InitData_Transform *pDMD_DVBS_InitData;
214 	MS_U32 u32InitDataLen;
215 	MS_BOOL ret;
216 }DVBS_Init_PARAM,*PDVBS_Init_PARAM;
217 
218 typedef struct DLL_PACKED _DVBS_SetDbgLevel_PARAM
219 {
220 	DMD_DVBS_DbgLv u8DbgLevel;
221 	MS_BOOL ret;
222 }DVBS_SetDbgLevel_PARAM,*PDVBS_SetDbgLevel_PARAM;
223 
224 typedef struct DLL_PACKED _DVBS_EXIT_PARAM_PARAM
225 {
226 	MS_BOOL ret;
227 }DVBS_EXIT_PARAM_PARAM,*PDVBS_EXIT_PARAM_PARAM;
228 
229 typedef struct DLL_PACKED _DVBS_GetInfo_PARAM
230 {
231 	const DMD_DVBS_Info* ret_info;
232 }DVBS_GetInfo_PARAM,*PDVBS_GetInfo_PARAM;
233 
234 typedef struct _DVBS_GetLibVer_PARAM
235 {
236 	const MSIF_Version **ppVersion;
237 	MS_BOOL ret;
238 }DVBS_GetLibVer_PARAM,*PDVBS_GetLibVer_PARAM;
239 
240 typedef struct DLL_PACKED _DVBS_GetFWVer_PARAM
241 {
242 	MS_U16 *ver;
243 	MS_BOOL ret;
244 }DVBS_GetFWVer_PARAM,*PDVBS_GetFWVer_PARAM;
245 
246 
247 typedef struct DLL_PACKED _DVBS_GetDSPReg_PARAM
248 {
249 	MS_U16 u16Addr;
250 	MS_U8 *pu8Data;
251 	MS_BOOL ret;
252 }DVBS_GetDSPReg_PARAM,*PDVBS_GetDSPReg_PARAM;
253 
254 typedef struct DLL_PACKED _DVBS_SetDSPReg_PARAM
255 {
256 	MS_U16 u16Addr;
257 	MS_U8 pu8Data;
258 	MS_BOOL ret;
259 }DVBS_SetDSPReg_PARAM,*PDVBS_SetDSPReg_PARAM;
260 
261 
262 typedef struct DLL_PACKED _DVBS_GetReg_PARAM
263 {
264 	MS_U16 u16Addr;
265 	MS_U8 *pu8Data;
266 	MS_BOOL ret;
267 }DVBS_GetReg_PARAM,*PDVBS_GetReg_PARAM;
268 
269 typedef struct DLL_PACKED _DVBS_SetReg_PARAM
270 {
271 	MS_U16 u16Addr;
272 	MS_U8 u8Data;
273 	MS_BOOL ret;
274 }DVBS_SetReg_PARAM,*PDVBS_SetReg_PARAM;
275 
276 
277 typedef struct DLL_PACKED _DVBS_SetSerialControl_PARAM
278 {
279 	MS_BOOL bEnable;
280 	MS_BOOL ret;
281 }DVBS_SetSerialControl_PARAM,*PDVBS_SetSerialControl_PARAM;
282 
283 typedef struct DLL_PACKED _DVBS_BlindScan_Config_Symbol_rate_list_PARAM
284 {
285 	MS_U32 u32SymbolRate;
286 	DMD_DVBS_MODULATION_TYPE eQamMode;
287 	MS_U32 u32IFFreq;
288 	MS_BOOL bSpecInv;
289 	MS_BOOL bSerialTS;
290 	MS_U16 *pu16_symbol_rate_list;
291 	MS_U8 u8_symbol_rate_list_num;
292 	MS_BOOL ret;
293 }DVBS_BlindScan_Config_Symbol_rate_list_PARAM,*PDVBS_BlindScan_Config_Symbol_rate_list_PARAM;
294 
295 typedef struct DLL_PACKED _DVBS_SetConfig_Symbol_rate_list_PARAM
296 {
297 	MS_U16 u16SymbolRate;
298 	DMD_DVBS_MODULATION_TYPE eQamMode;
299 	MS_U32 u32IFFreq;
300 	MS_BOOL bSpecInv;
301 	MS_BOOL bSerialTS;
302 	MS_U16 *pu16_symbol_rate_list;
303 	MS_U8 u8_symbol_rate_list_num;
304 	MS_BOOL ret;
305 }DVBS_SetConfig_Symbol_rate_list_PARAM,*PDVBS_SetConfig_Symbol_rate_list_PARAM;
306 
307 typedef struct DLL_PACKED _DVBS_SetActive_PARAM
308 {
309 	MS_BOOL bEnable;
310 	MS_BOOL ret;
311 }DVBS_SetActive_PARAM,*PDVBS_SetActive_PARAM;
312 
313 typedef struct DLL_PACKED _DVBS_GetLockWithRFPower
314 {
315 	DMD_DVBS_GETLOCK_TYPE eType;
316 	DMD_DVBS_LOCK_STATUS *eLockStatus;
317 	MS_U32 u32CurrRFPowerDbm;
318 	MS_U32 u32NoChannelRFPowerDbm;
319 	MS_BOOL ret;
320 }DVBS_GetLockWithRFPower,*PDVBS_GetLockWithRFPower;
321 
322 typedef struct DLL_PACKED _DVBS_ActiveDmdSwitch_PARAM
323 {
324 	MS_U8 demod_no;
325 	MS_BOOL ret;
326 }DVBS_ActiveDmdSwitch_PARAM,*PDVBS_ActiveDmdSwitch_PARAM;
327 
328 typedef struct _DVBS_GetSignalStrengthWithRFPower_PARAM
329 {
330 	MS_U16 fRFPowerDbm;
331 	DMD_DVBS_DEMOD_TYPE *pDemodType;
332 	MS_U8  *u8_DVBS2_CurrentCodeRateLocal;
333 	MS_U8   *u8_DVBS2_CurrentConstellationLocal;
334 	MS_BOOL ret;
335 }DVBS_GetSignalStrengthWithRFPower_PARAM,*PDVBS_GetSignalStrengthWithRFPower_PARAM;
336 
337 //Leo add
338 typedef struct _DVBS_GetIFAGC_PARAM
339 {
340 	MS_U8 *ifagc_reg;
341 	MS_U8 *ifagc_reg_lsb;
342 	MS_U16 *ifagc_err_reg;
343 	MS_BOOL ret;
344 }DVBS_GetIFAGC_PARAM,*PDVBS_GetIFAGC_PARAM;
345 
346 
347 //typedef struct DLL_PACKED _DVBS_GetPacketErr_PARAM
348 
349 typedef struct _DVBS_GetSNR_PARAM
350 {
351 	MS_U32 *u32NDA_SNR_A;
352 	MS_U32 *u32NDA_SNR_AB;
353 	MS_BOOL ret;
354 }DVBS_GetSNR_PARAM,*PDVBS_GetSNR_PARAM;
355 
356 
357 typedef struct _DVBS_GetPostViterbiBer_PARAM
358 {
359 	MS_U32 *BitErr_reg;
360 	MS_U16 *BitErrPeriod_reg;
361 	MS_BOOL ret;
362 }DVBS_GetPostViterbiBer_PARAM,*PDVBS_GetPostViterbiBer_PARAM;
363 
364 
365 typedef struct DLL_PACKED _DVBS_GetPacketErr_PARAM
366 {
367 	MS_U16 *pktErr;
368 	MS_BOOL ret;
369 }DVBS_GetPacketErr_PARAM,*PDVBS_GetPacketErr_PARAM;
370 
371 typedef struct DLL_PACKED _DVBS_GetCellID_PARAM
372 {
373 	MS_U16 *u16CellID;
374 	MS_BOOL ret;
375 }DVBS_GetCellID_PARAM,*PDVBS_GetCellID_PARAM;
376 
377 
378 typedef struct _DVBS_GetStatus_PARAM
379 {
380 	DMD_DVBS_MODULATION_TYPE *pQAMMode;
381 	MS_U32 *u32SymbolRate;
382 	MS_S16  *s16CFO;
383 	MS_BOOL ret;
384 }DVBS_GetStatus_PARAM,*PDVBS_GetStatus_PARAM;
385 
386 
387 typedef struct DLL_PACKED _DVBS_SetPowerState_PARAM
388 {
389 	EN_POWER_MODE u16PowerState;
390 	MS_U32 ret_U32;
391 }DVBS_SetPowerState_PARAM,*PDVBS_SetPowerState_PARAM;
392 
393 typedef struct DLL_PACKED _DVBS_Get_FreqOffset_PARAM
394 {
395 	MS_S16  *s16CFO;
396 	MS_BOOL bRet;
397 }DVBS_Get_FreqOffset_PARAM,*PDVBS_Get_FreqOffset_PARAM;
398 
399 typedef struct DLL_PACKED _DVBS_BlindScan_Start_PARAM
400 {
401 	MS_U16 u16StartFreq;
402 	MS_U16 u16EndFreq;
403 	MS_BOOL bRet;
404 }DVBS_BlindScan_Start_PARAM,*PDVBS_BlindScan_Start_PARAM;
405 
406 typedef struct DLL_PACKED _DVBS_BlindScan_NextFreq_PARAM
407 {
408 	MS_BOOL *bBlindScanEnd;
409 	MS_BOOL bRet;
410 }DVBS_BlindScan_NextFreq_PARAM,*PDVBS_BlindScan_NextFreq_PARAM;
411 
412 
413 typedef struct DLL_PACKED _DVBS_BlindScan_Cancel_PARAM
414 {
415 	MS_BOOL bRet;
416 }DVBS_BlindScan_Cancel_PARAM,*PDVBS_BlindScan_Cancel_PARAM;
417 
418 typedef struct DLL_PACKED _DVBS_BlindScan_End_PARAM
419 {
420 	MS_BOOL bRet;
421 }DVBS_BlindScan_End_PARAM,*PDVBS_BlindScan_End_PARAM;
422 
423 typedef struct DLL_PACKED _DVBS_BlindScan_GetChannel_PARAM
424 {
425 	MS_U16 u16ReadStart;
426 	MS_U16 *u16TPNum;
427 	HAL_DEMOD_MS_FE_CARRIER_PARAM *pTable;
428 	MS_BOOL bRet;
429 }DVBS_BlindScan_GetChannel_PARAM,*PDVBS_BlindScan_GetChannel_PARAM;
430 
431 typedef struct DLL_PACKED _DVBS_BlindScan_GetCurrentFreq_PARAM
432 {
433 	MS_U32 *u32CurrentFreq;
434 	MS_BOOL bRet;
435 }DVBS_BlindScan_GetCurrentFreq_PARAM,*PDVBS_BlindScan_GetCurrentFreq_PARAM;
436 
437 typedef struct DLL_PACKED _DVBS_BlindScan_WaitCurFreqFinished_PARAM
438 {
439 	MS_U8 *u8Progress;
440 	MS_U8 *u8FindNum;
441 	MS_U8 *substate_reg;
442 	MS_U32 *u32Data;
443 	MS_U16 *symbolrate_reg;
444 	MS_U16 *CFO_reg;
445 	MS_BOOL bRet;
446 }DVBS_BlindScan_WaitCurFreqFinished_PARAM,*PDVBS_BlindScan_WaitCurFreqFinished_PARAM;
447 
448 typedef struct DLL_PACKED _DVBS_BlindScan_GetTunerFreq_PARAM
449 {
450 	MS_U16 *u16TunerCenterFreq;
451 	MS_U16 *u16TunerCutOffFreq;
452 	MS_BOOL bRet;
453 }DVBS_BlindScan_GetTunerFreq_PARAM,*PDVBS_BlindScan_GetTunerFreq_PARAM;
454 
455 typedef struct DLL_PACKED _DVBS_DiSEqC_Init_PARAM
456 {
457 	MS_BOOL bRet;
458 }DVBS_DiSEqC_Init_PARAM,*PDVBS_DiSEqC_Init_PARAM;
459 
460 typedef struct DLL_PACKED _DVBS_DiSEqC_SetLNBOut_PARAM
461 {
462        MS_BOOL bLow;
463 	MS_BOOL bRet;
464 }DVBS_DiSEqC_SetLNBOut_PARAM,*PDVBS_DiSEqC_SetLNBOut_PARAM;
465 
466 typedef struct DLL_PACKED _DVBS_DiSEqC_GetLNBOut_PARAM
467 {
468        MS_BOOL *bLNBOutLow;
469 	MS_BOOL bRet;
470 }DVBS_DiSEqC_GetLNBOut_PARAM,*PDVBS_DiSEqC_GetLNBOut_PARAM;
471 
472 typedef struct DLL_PACKED _DVBS_DiSEqC_Set22kOnOff_PARAM
473 {
474        MS_BOOL b22kOn;
475 	MS_BOOL bRet;
476 }DVBS_DiSEqC_Set22kOnOff_PARAM,*PDVBS_DiSEqC_Set22kOnOff_PARAM;
477 
478 typedef struct DLL_PACKED _DVBS_DiSEqC_Get22kOnOff_PARAM
479 {
480        MS_BOOL *b22kOn;
481 	MS_BOOL bRet;
482 }DVBS_DiSEqC_Get22kOnOff_PARAM,*PDVBS_DiSEqC_Get22kOnOff_PARAM;
483 
484 typedef struct DLL_PACKED _DVBS_DiSEqC_SendCmd_PARAM
485 {
486        MS_U8 *pCmd;
487 	MS_U8 u8CmdSize;
488 	MS_BOOL bRet;
489 }DVBS_DiSEqC_SendCmd_PARAM,*PDVBS_DiSEqC_SendCmd_PARAM;
490 
491 typedef struct DLL_PACKED _DVBS_DiSEqC_SetTxToneMode_PARAM
492 {
493        MS_BOOL bTxTone22kOff;
494 	MS_BOOL bRet;
495 }DVBS_DiSEqC_SetTxToneMode_PARAM,*PDVBS_DiSEqC_SetTxToneMode_PARAM;
496 
497 typedef struct DLL_PACKED _DVBS_DiSEqC_SetTone_PARAM
498 {
499        MS_BOOL bTone1;
500 	MS_BOOL bRet;
501 }DVBS_DiSEqC_SetTone_PARAM,*PDVBS_DiSEqC_SetTone_PARAM;
502 
503 typedef struct DLL_PACKED _DVBS_UnicableAGCCheckPower_PARAM
504 {
505        MS_BOOL pbAGCCheckPower;
506 	MS_BOOL bRet;
507 }DVBS_UnicableAGCCheckPower_PARAM,*PDVBS_UnicableAGCCheckPower_PARAM;
508 
509 typedef struct DLL_PACKED _DVBS_GetTsDivNum_PARAM
510 {
511        MS_U32 *u32SymbolRate;
512 	MS_U8* system_type_reg;
513 	MS_U8 *code_rate_idx;
514 	MS_U8 *fec_type_idx;
515 	MS_U8 *pilot_flag;
516 	MS_U32 *u32temp;
517 	MS_U8 *code_rate_reg;
518 	MS_BOOL bRet;
519 }DVBS_GetTsDivNum_PARAM,*PDVBS_GetTsDivNum_PARAM;
520 
521 typedef struct DLL_PACKED _DVBS_GetCurrentDemodCodeRate_PARAM
522 {
523        DMD_DVBS_CODE_RATE_TYPE *pCodeRate;
524 	MS_BOOL bRet;
525 }DVBS_GetCurrentDemodCodeRate_PARAM,*PDVBS_GetCurrentDemodCodeRate_PARAM;
526 
527 typedef struct DLL_PACKED _DVBS_GetTunrSignalLevel_PWR_PARAM
528 {
529        MS_U16 *u16Data;
530 	MS_BOOL bRet;
531 }DVBS_GetTunrSignalLevel_PWR_PARAM,*PDVBS_GetTunrSignalLevel_PWR_PARAM;
532 #ifdef UFO_SUPPORT_VCM
533 typedef struct DLL_PACKED _DVBS_SetDefaultVCM_PARAM
534 {
535        MS_U8 *u8IS_ID;
536        MS_U8 *u8IS_ID_table;
537 	MS_BOOL ret;
538 }DVBS_SetDefaultVCM_PARAM,*PDVBS_SetDefaultVCM_PARAM;
539 
540 typedef struct DLL_PACKED _DVBS_SetVCM_PARAM
541 {
542        MS_U8 u8IS_ID;
543    	MS_BOOL ret;
544 }DVBS_SetVCM_PARAM,*PDVBS_SetVCM_PARAM;
545 
546 typedef struct DLL_PACKED _DVBS_GetVCM_PARAM
547 {
548        MS_U8 *u8IS_ID;
549        MS_U8 *u8IS_ID_table;
550 	MS_BOOL ret;
551 }DVBS_GetVCM_PARAM,*PDVBS_GetVCM_PARAM;
552 
553 typedef struct DLL_PACKED _DVBS_VCM_INIT_PARAM
554 {
555         DMD_DVBS_VCM_OPT u8VCM_OPT;
556         MS_U8 u8IS_ID;
557         MS_U32 u32DVBS2_DJB_START_ADDR;
558         MS_BOOL ret;
559 }DVBS_VCM_INIT_PARAM,*PDVBS_VCM_INIT_PARAM;
560 
561 typedef struct DLL_PACKED _DVBS_VCM_CHECK
562 {
563         MS_BOOL ret;
564 }DVBS_VCM_CHECK,*PDVBS_VCM_CHECK;
565 
566 typedef struct DLL_PACKED _DVBS_VCM_ENABLED
567 {
568         MS_U8 u8VCM_ENABLED;
569         MS_BOOL ret;
570 }DVBS_VCM_ENABLED,*PDVBS_VCM_ENABLED;
571 
572 typedef struct DLL_PACKED _DVBS_VCM_MODE
573 {
574         DMD_DVBS_VCM_OPT u8VCM_OPT;
575         MS_BOOL ret;
576 }DVBS_VCM_MODE,*PDVBS_VCM_MODE;
577 
578 #endif
579 
580 #ifdef UFO_DEMOD_DVBS_SUPPORT_DMD_INT
581 typedef struct DLL_PACKED _DVBS_INT_MODE
582 {
583         fpIntCallBack fpCB;
584         MS_BOOL ret;
585 }DVBS_INT_MODE,*PDVBS_INT_MODE;
586 #endif
587 
588 #ifdef UFO_DEMOD_GetParam_NEW_FLOW
589 /// Define tuning paramter of DVB-S front-end
590 typedef struct DLL_PACKED _DVBS_GET_INFO
591 {
592     //HAL_DEMOD_EN_SAT_MOD_TYPE             eDemod_Type;                        ///< Mode type
593     HAL_DEMOD_EN_SAT_CONSTEL_TYPE           eConstellation;                     ///< Constellation type
594     HAL_DEMOD_EN_SAT_ROLL_OFF_TYPE          eRollOff;                           ///< Roll-Off factor
595     HAL_DEMOD_EN_SAT_IQ_MODE                eIQ_Mode;                           ///< IQ mode
596     HAL_DEMOD_EN_CONV_CODE_RATE_TYPE        eCodeRate;                          ///< Converlution code rate
597     MS_U32                                	u32SymbolRate;
598     HAL_DEMOD_EN_SAT_MOD_TYPE               eDemodType;
599     float                                   eFreqoff;
600     //MS_U8                                 u8Polarity;                         // 0: Horizon; > 0(default 1): Vertical;
601     //MS_S16                                s16FreqOffset;
602     MS_BOOL ret;
603 } DVBS_GET_INFO, *PDVBS_GET_INFO;
604 #endif
605 
606 #ifdef UFO_DEMOD_GET_AGC_INFO
607 typedef struct DLL_PACKED _DVBS_GET_AGC_INFO
608 {
609     MS_U8 u8dbg_mode;
610     MS_U16 *pu16Data;
611     MS_BOOL ret;
612 } DVBS_GET_AGC_INFO, *PDVBS_GET_AGC_INFO;
613 #endif
614 
615 void DVBSRegisterToUtopia(void);
616 
617 
618 
619 
620 /*******kernel mode transform structure***************/
621 
622 
623 
624 
625 
626 /*************************************************/
627 
628 
629 MS_U32 DVBSOpen(void** pInstantTmp, MS_U32 u32ModuleVersion, void* pAttribute);
630 MS_U32 DVBSClose(void* pInstantTmp);
631 MS_U32 DVBSIoctl(void* pInstantTmp, MS_U32 u32Cmd, void* pArgs);
632 //MS_U32 DVBSStr(MS_U32 u32PowerState, void* pModule);
633 
634 
635 #ifdef __cplusplus
636 }
637 #endif
638 
639 #endif // _DRV_DVBS_H_
640 
641