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 #define _AUSIF_C_
94
95 ///////////////////////////////////////////////////////////////////////////////
96 //
97 /// file drvSIF.c
98 /// @author MStar Semiconductor Inc.
99 /// @brief SIF control driver
100 ///////////////////////////////////////////////////////////////////////////////
101 //
102 //------------------------------------------------------------------------------
103 // Header Files
104 //------------------------------------------------------------------------------
105 #include "ULog.h"
106 #include "MsCommon.h"
107 #include "MsTypes.h"
108
109 // Internal
110 #include "drvAUDIO_if.h"
111 #include "drvAUDIO.h"
112
113 #include "./internal/drvMAD.h"
114 #include "./internal/drvSIF.h"
115 #include "./internal/SifInitialTable.h"
116 #include "./internal/drvAUDIO_internal.h"
117
118 #include "regAUDIO.h"
119 #include "halAUDIO.h"
120 #include "halSIF.h"
121 #include "halMAD.h"
122 #include "halMAD2.h"
123 #include "drvSYS.h"
124
125 //-------------------------------------------------------------------------------------------------
126 // Driver Compiler Options
127 //-------------------------------------------------------------------------------------------------
128 #define HINIBBLE(u8Data) ((u8Data) >> 4)
129 #define LONIBBLE(u8Data) ((u8Data) << 4)
130 MS_U8 g_ucCarrierStableCnt = 0, g_ucPreCarrierStatus=0;
131
132 extern AU_CHIP_TYPE gAudioChipType;
133 extern void HAL_MAD2_DisEn_MIUREQ(void);
134
135 //-------------------------------------------------------------------------------------------------
136 // Extern Variables
137 //-------------------------------------------------------------------------------------------------
138 extern AUDIO_SHARED_VARS2 * g_AudioVars2;
139
140
141 ////////////////////////////////////////////////////////////////////////////////
142 /// @brief \b Function \b Name: MDrv_SIF_ReLoadCode()
143 /// @brief \b Function \b Description: This routine is used to reload the SIF algorithm code
144 /// @param dspCodeType \b type : sif algorithm type
145 /// @return MS_BOOL \b TRUE --DSP reload code okay
146 /// FALSE--DSP reload code fail
147 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_ReLoadCode(AUDIO_DSP_CODE_TYPE dspCodeType)148 MS_BOOL MDrv_SIF_ReLoadCode(AUDIO_DSP_CODE_TYPE dspCodeType)
149 {
150 return HAL_SIF_ReLoadCode(dspCodeType);
151 }
152
153 ////////////////////////////////////////////////////////////////////////////////
154 /// @brief \b Function \b Name: HAL_SIF_Init()
155 /// @brief \b Function \b Description: This routine is the initialization for SIF
156 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_Init(void)157 void MDrv_SIF_Init(void)
158 {
159 HAL_SIF_Init();
160 }
161
162 ////////////////////////////////////////////////////////////////////////////////
163 /// @brief \b Function \b Name : MDrv_SIF_SetSoundMode
164 /// @brief \b Function \b Description : This routine is to set the sound mode for SIF module.
165 /// @param u8ModeType \b : Sound Mode type
166 /// @return MS_BOOL \b : set SIF sound mode
167 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetSoundMode(AUDIO_SIF_SOUND_MODE u8ModeType)168 MS_BOOL MDrv_SIF_SetSoundMode(AUDIO_SIF_SOUND_MODE u8ModeType)
169 {
170 return (HAL_SIF_SetSoundMode(u8ModeType));
171 }
172
173 ////////////////////////////////////////////////////////////////////////////////
174 /// @brief \b Function \b Name: MDrv_SIF_SetSystem()
175 /// @brief \b Function \b Description: This routine is to set sif decoder system.
176 /// @param u8System_type \b system codec type :
177 /// AU_SIF_BTSC, //0
178 /// AU_SIF_PALSUM, //1
179 /// AU_SIF_EIAJ, //2
180 /// ......etc
181 /// @return MS_BOOL \b Set System ok or failure
182 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetSystem(En_DVB_decSystemType SystemType)183 MS_BOOL MDrv_SIF_SetSystem(En_DVB_decSystemType SystemType)
184 {
185 AUDIO_DSP_CODE_TYPE dspCodeType;
186 dspCodeType = HAL_AUDIO_Convert_EnDVBdecSystemType_to_AudioDspCodeType(SystemType);
187
188 return HAL_SIF_SetSystem(dspCodeType);
189 }
190
191 ////////////////////////////////////////////////////////////////////////////////
192 /// @brief \b Function \b Name : MDrv_SIF_StartAutoDetection
193 /// @brief \b Function \b Description : This routine is to start to detect the sound system for SIF Palsum module.
194 /// @return MS_BOOL \b : start auto tuning
195 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_StartAutoDetection(void)196 MS_BOOL MDrv_SIF_StartAutoDetection (void)
197 {
198 return HAL_SIF_StartAutoDetect();
199 }
200
201 ////////////////////////////////////////////////////////////////////////////////
202 /// @brief \b Function \b Name: MDrv_SIF_SetThreshold()
203 /// @brief \b Function \b Description: This routine is the subfunction of setting SIF threshold
204 /// @param ThrTbl \b : Thresholds Table.
205 /// From MApi_AUDIO_SIF_SetThreshold(THR_TBL_TYPE code *ThrTbl)
206 /// @param start_i \b : Thresholds Table starting index
207 /// - BTSC_TBL_INDEX
208 /// - A2_M_TBL_INDEX
209 /// - A2_M_TBL_INDEX
210 /// - A2_DK_TBL_INDEX
211 /// - FM_I_TBL_INDEX
212 /// - AM_TBL_INDEX
213 /// - NICAM_BG_TBL_INDEX
214 /// - NICAM_I_TBL_INDEX
215 /// - HIDEV_M_TBL_INDEX
216 /// - HIDEV_BG_TBL_INDEX
217 /// - HIDEV_DK_TBL_INDEX
218 /// - HIDEV_I_TBL_INDEX
219 /// @param num \b : Thresholds Table Length
220 /// - BTSC_TBL_LENGTH
221 /// - A2_M_TBL_LENGTH
222 /// - A2_M_TBL_LENGTH
223 /// - A2_DK_TBL_LENGTH
224 /// - FM_I_TBL_LENGTH
225 /// - AM_TBL_LENGTH
226 /// - NICAM_BG_TBL_LENGTH
227 /// - NICAM_I_TBL_LENGTH
228 /// - HIDEV_M_TBL_LENGTH
229 /// - HIDEV_BG_TBL_LENGTH
230 /// - HIDEV_DK_TBL_LENGTH
231 /// - HIDEV_I_TBL_LENGTH
232 /// @param standard_type \b : Standard Type
233 /// - BTSC_STANDARD
234 /// - A2_M_STANDARD
235 /// - A2_BG_STANDARD
236 /// - A2_DK_STANDARD
237 /// - A2_I_STANDARD
238 /// - AM_STANDARD
239 /// - NICAM_BG_STANDARD
240 /// - NICAM_I_STANDARD
241 /// - HIDEV_M_STANDARD
242 /// - HIDEV_BG_STANDARD
243 /// - HIDEV_DK_STANDARD
244 /// - HIDEV_I_STANDARD
245 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetThreshold(THR_TBL_TYPE * ThrTbl,MS_U8 start_i,MS_U8 num,AUDIO_SIF_SYSTEM_TYPE standard_type)246 void MDrv_SIF_SetThreshold(THR_TBL_TYPE *ThrTbl, MS_U8 start_i, MS_U8 num, AUDIO_SIF_SYSTEM_TYPE standard_type)
247 {
248 MS_U8 i;
249 MS_U16 value;
250 AUDIO_SIF_SYSTEM_TYPE system_type = standard_type;
251
252 system_type |= WRITE_THRESHOLD; // coverity 8855
253 ThrTbl = ThrTbl+start_i;
254 for(i=start_i; i<(start_i+num); i++)
255 {
256 value =( (0x00FF & ThrTbl->HiByteValue) <<8)|(0x00FF & ThrTbl->LowByteValue);
257 HAL_SIF_AccessThreshold(system_type,(AUDIO_SIF_THRESHOLD_TYPE)(i-start_i),value); // coverity 8855
258 ThrTbl++;
259 }
260 }
261
262 ////////////////////////////////////////////////////////////////////////////////
263 /// @brief \b Function \b Name : MDrv_SIF_AccessThreshold
264 /// @brief \b Function \b Description : This routine to read/write SIF threshold
265 /// @param rw_standard_type \b : standard type
266 /// @param u8Threshold_type \b : Threshold type
267 /// @param u16Value \b : write DRAM data value
268 /// @return MS_U32 \b : return DRAM data value
269 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_AccessThreshold(AUDIO_SIF_SYSTEM_TYPE rw_standard_type,AUDIO_SIF_THRESHOLD_TYPE u8Threshold_type,MS_U16 u16Value)270 MS_U32 MDrv_SIF_AccessThreshold(AUDIO_SIF_SYSTEM_TYPE rw_standard_type, AUDIO_SIF_THRESHOLD_TYPE u8Threshold_type, MS_U16 u16Value)
271 {
272 return HAL_SIF_AccessThreshold(rw_standard_type, u8Threshold_type, u16Value);
273 }
274
275 ////////////////////////////////////////////////////////////////////////////////
276 /// @brief \b Function \b Name : MDrv_SIF_GetOrginalGain
277 /// @brief \b Function \b Description : This routine to read current SIF gain
278 /// @return MS_BOOL \b :
279 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_GetOrginalGain(void)280 MS_BOOL MDrv_SIF_GetOrginalGain(void)
281 {
282 return HAL_SIF_GetOrginalGain();
283 }
284
285 ////////////////////////////////////////////////////////////////////////////////
286 /// @brief \b Function \b Name : MDrv_SIF_SetPrescale
287 /// @brief \b Function \b Description : This routine is to set the SIF Prescale.
288 /// @param u8Type \b :
289 /// SET_PRESCALE_A2_FM
290 /// SET_PRESCALE_NICAM
291 /// SET_PRESCALE_AM
292 /// SET_PRESCALE_HIDEV
293 /// SET_PRESCALE_FM_M
294 /// SET_PRESCALE_HIDEV_M
295 /// SET_PRESCALE_BTSC
296 /// SET_PRESCALE_BTSC_MONO
297 /// SET_PRESCALE_BTSC_STEREO
298 /// SET_PRESCALE_BTSC_SAP
299 /// @param db_value \b : The prescale value, unit is 0.25dB.
300 /// 0 : 0db
301 /// 1 : 0.25dB
302 /// -1 : -0.25dB
303 /// @return MS_BOOL \b :
304 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetPrescale(AUDIO_SIF_GAIN_TYPE gainType,MS_S32 db_value)305 MS_BOOL MDrv_SIF_SetPrescale(AUDIO_SIF_GAIN_TYPE gainType, MS_S32 db_value)
306 {
307 return HAL_SIF_SetPrescale(gainType, db_value);
308 }
309
310 ////////////////////////////////////////////////////////////////////////////////
311 /// @brief \b Function \b Name : MDrv_SIF_IsPALType
312 /// @brief \b Function \b Description : This routine to check if the Palsum is in pal_type state or not
313 /// @return MS_BOOL \b :
314 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_IsPALType(AUDIO_SIF_PAL_TYPE pal_type)315 MS_BOOL MDrv_SIF_IsPALType(AUDIO_SIF_PAL_TYPE pal_type)
316 {
317 MS_U8 sub_carrier_std;
318
319 if (!MDrv_SIF_CheckDecSys(MSAPI_AUD_ATV_PAL))
320 {
321 AUDIO_PRINT(AUDIO_DEBUG_LEVEL_ERROR, "DSP type not palsum\n");
322 return FALSE;
323 }
324
325 sub_carrier_std = HAL_SIF_SendCmd(AU_SIF_CMD_GET_STANDARD_CMD, NULL, NULL) & 0xF0;
326 switch( pal_type )
327 {
328 case AU_SIF_PAL_MONO:
329 if (sub_carrier_std > SIF_MODE_HIDEV )
330 return FALSE;
331 else if ((HAL_SIF_SendCmd(AU_SIF_CMD_GET_HIDEV_ENABLE, NULL, NULL) == TRUE) != (sub_carrier_std == SIF_MODE_HIDEV))
332 return FALSE;
333 break;
334 case AU_SIF_PAL_HIDEV:
335 if (sub_carrier_std != SIF_MODE_HIDEV )
336 return FALSE;
337 break;
338 case AU_SIF_PAL_A2:
339 if (sub_carrier_std != SIF_MODE_A2 )
340 return FALSE;
341 break;
342 case AU_SIF_PAL_NICAM:
343 if (sub_carrier_std != SIF_MODE_NICAM )
344 return FALSE;
345 break;
346 default:
347 return FALSE;// UT
348 }
349 return TRUE;
350 }
351
352 ////////////////////////////////////////////////////////////////////////////////
353 /// @brief \b Function \b Name : MDrv_SIF_SetPALType
354 /// @brief \b Function \b Description : Set Palsum to the pal_type state
355 /// @return MS_BOOL \b :
356 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetPALType(AUDIO_SIF_PAL_TYPE pal_type)357 MS_BOOL MDrv_SIF_SetPALType(AUDIO_SIF_PAL_TYPE pal_type)
358 {
359 MS_U8 sif_standard;
360 MS_U8 u8NicamSupport = TRUE;
361
362 if (!MDrv_SIF_CheckDecSys(MSAPI_AUD_ATV_PAL))
363 {
364 AUDIO_PRINT(AUDIO_DEBUG_LEVEL_ERROR, "DSP type not palsum\n");
365 return FALSE;
366 }
367
368 sif_standard = HAL_SIF_SendCmd(AU_SIF_CMD_GET_STANDARD_CMD, NULL, NULL) & 0x0F;
369
370 switch (pal_type) {
371 case AU_SIF_PAL_MONO:
372 AUDIO_PRINT(AUDIO_DEBUG_LEVEL_DEBUG, "Utopia Set MONO \r\n");
373 if (HAL_SIF_SendCmd(AU_SIF_CMD_GET_HIDEV_ENABLE, NULL, NULL) == TRUE) {
374 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard|SIF_MODE_HIDEV, NULL);
375 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, HAL_SIF_SendCmd(AU_SIF_CMD_GET_HIDEV_FILTER_BW_LEVEL, NULL, NULL));
376 HAL_SIF_SendCmd(AU_SIF_CMD_RESET_FC_TRACKING, NULL, NULL);
377 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, TRUE, NULL);
378 }
379 else {
380 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, FALSE, NULL);
381 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard|SIF_MODE_MONO, NULL);
382 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, 0x00);
383 }
384 break;
385 case AU_SIF_PAL_HIDEV:
386 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard|SIF_MODE_HIDEV, NULL);
387 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, HAL_SIF_SendCmd(AU_SIF_CMD_GET_HIDEV_FILTER_BW_LEVEL, NULL, NULL));
388 HAL_SIF_SendCmd(AU_SIF_CMD_RESET_FC_TRACKING, NULL, NULL);
389 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, TRUE, NULL);
390 break;
391 case AU_SIF_PAL_A2:
392 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, FALSE, NULL);
393 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard|SIF_MODE_A2, NULL);
394 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, 0x00);
395 break;
396 case AU_SIF_PAL_NICAM:
397 if (gAudioChipType == AU_CHIP_M12 || gAudioChipType == AU_CHIP_Euler) {
398 if (TRUE == MDrv_SYS_Query(E_SYS_QUERY_TTXNICAM_SUPPORTED))
399 {
400 u8NicamSupport= TRUE;
401 }
402 else
403 {
404 u8NicamSupport= FALSE;
405 }
406 }
407 if(u8NicamSupport) {
408 AUDIO_PRINT(AUDIO_DEBUG_LEVEL_DEBUG, "NICAM support, code = %x\n",u8NicamSupport);
409 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, FALSE, NULL);
410 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard|SIF_MODE_NICAM, NULL);
411 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, 0x00);
412 break;
413 }
414 else {
415 AUDIO_PRINT(AUDIO_DEBUG_LEVEL_DEBUG, "NICAM not support, code = %x\n",u8NicamSupport);
416 HAL_SIF_SendCmd(AU_SIF_CMD_ENABLE_FC_TRACKING, FALSE, NULL);
417 HAL_SIF_SendCmd(AU_SIF_CMD_SET_SUB_CARRIER_STD, sif_standard, NULL);
418 HAL_AUDIO_WriteMaskByte(AU_CMD_PFIRBANDWIDTH, 0x30, 0x00);
419 break;
420 }
421 }
422 return TRUE;
423 }
424
425 ////////////////////////////////////////////////////////////////////////////////
426 /// @brief \b Function \b Name : MDrv_SIF_SetStandardType
427 /// @brief \b Function \b Description : This routine to set sif audio system
428 /// @param sif_type \b : sif type
429 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SetStandardType(AUDIO_SIF_SET_STANDARD sif_type)430 void MDrv_SIF_SetStandardType(AUDIO_SIF_SET_STANDARD sif_type)
431 {
432 HAL_SIF_SendCmd(AU_SIF_CMD_SET_STD, sif_type, NULL);
433 }
434
435 ////////////////////////////////////////////////////////////////////////////////
436 /// @brief \b Function \b Name : MDrv_SIF_GetDspCodeType
437 /// @brief \b Function \b Description : This routine to get audio DSP type
438 /// @return AUDIO_DSP_CODE_TYPE \b : audio dsp code type
439 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_GetDspCodeType(void)440 AUDIO_DSP_CODE_TYPE MDrv_SIF_GetDspCodeType(void)
441 {
442 return HAL_SIF_GetDspCodeType();
443 }
444
445 ////////////////////////////////////////////////////////////////////////////////
446 /// @brief \b Function \b Name: MDrv_SIF_GetDspType()
447 /// @brief \b Function \b Description: This function is used to get the DSP(DSP_DEC or DSP_SE) which SIF module used.
448 /// @param <IN> \b NONE :
449 /// @param <OUT> \b NONE :
450 /// @param <RET> \b MS_U8 : DSP which SIF modules (DSP_DEC or DSP_SE)
451 /// @param <GLOBAL> \b NONE :
452 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_GetDspType(void)453 MS_U8 MDrv_SIF_GetDspType(void)
454 {
455 return HAL_SIF_GetDspType();
456 }
457 ////////////////////////////////////////////////////////////////////////////////
458 /// @brief \b Function \b Name: MDrv_SIF_SendCmd()
459 /// @brief \b Function \b Description: This routine is to set play/stop command for SIF.
460 /// @param u8DecCmd \b command type :
461 /// AU_DVB_DECCMD_STOP, //0
462 /// AU_DVB_DECCMD_PLAY, //1
463 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_SendCmd(AU_SIF_CMD u8DecCmd,MS_U8 comm_arg1,MS_U8 comm_arg2)464 MS_U8 MDrv_SIF_SendCmd(AU_SIF_CMD u8DecCmd, MS_U8 comm_arg1, MS_U8 comm_arg2)
465 {
466 MS_U8 u8Return = 0;
467 u8Return = HAL_SIF_SendCmd(u8DecCmd, comm_arg1, comm_arg2);
468
469 return u8Return;
470 }
471
472 ////////////////////////////////////////////////////////////////////////////////
473 /// @brief \b Function \b Name: MDrv_SIF_CheckDecSys()
474 /// @brief \b Function \b Description: This function will check whether current sif decoder equals giving DecSystem type
475 /// @param <IN> \b enDecSystem : DecSystem type
476 /// @param <RET> \b BOOL : True or False
477 ////////////////////////////////////////////////////////////////////////////////
MDrv_SIF_CheckDecSys(En_DVB_decSystemType enDecSystem)478 MS_BOOL MDrv_SIF_CheckDecSys(En_DVB_decSystemType enDecSystem)
479 {
480 return(HAL_SIF_CheckDecSys(enDecSystem));
481 }