/**************************************************************************** * Copyright (c) 2004 Digital Stream Technologies Inc. All Rights Reserved. * * Module: dsthalca.h * Author: Jun-ku Park, hwatk@dstreamtech.com * Description: DST HAL [Conditional Access] Platform Independent Includes * * $Id * ***************************************************************************/ #ifndef __DST_HALCA_H__ #define __DST_HALCA_H__ #include "dsthalcommon.h" typedef enum { CaState_UNKNOWN=0, /* Tuner is not initialized. */ CaState_INIT, /* Tuner is initialized. */ CaState_START, /* Tuner is started. */ CaState_STOP, /* Tuner is stopped. */ CaState_MAX } CaState_t; typedef enum { CaScrMode_DEFAULT=0, CaScrMode_ECB=200, CaScrMode_CBC, CaScrMode_MAX } CaScrMode_t; typedef enum { CaScrType_PASSTHROUGH=0, CaScrType_3DES=200, CaScrType_DES, CaScrType_MAX } CaScrType_t; typedef enum { CaDescrMode_DEFAULT=0, CaDescrMode_ECB=200, CaDescrMode_CBC, CaDescrMode_MAX } CaDescrMode_t; typedef enum { CaDescrType_PASSTHROUGH=0, CaDescrType_DVB_CSA=200, CaDescrType_3DES, CaDescrType_DES, CaDescrType_CSS, CaDescrType_M2, CaDescrType_MAX } CaDescrType_t; typedef enum { CaParity_ODD = 1L, CaParity_EVEN, } CaParity_t; typedef struct tag_DST_CA { CaState_t bCurState; /* Scrambler Attribute */ CaScrMode_t ScrMode; CaScrType_t ScrType; DS_BOOL ScrParityEnable; /* Descramber Attribute */ CaDescrMode_t DescrMode; CaDescrType_t DescrType; DS_BOOL DescrParityEnable; /* CA PID Filter */ DS_U32 Pid1, Pid2; /* CA Key */ DS_U32 dwEvenKeyHigh; DS_U32 dwEvenKeyLow; DS_U32 dwOddKeyHigh; DS_U32 dwOddKeyLow; DS_BOOL bStarted; } *P_DST_CA, DST_CA; #ifdef __cplusplus extern "C" { #endif DHL_RESULT DHL_CA_Init(void); DHL_RESULT DHL_CA_SetScramblingAlgorithm( CaScrMode_t Mode, CaScrType_t Type, DS_BOOL bParityEnable ); DHL_RESULT DHL_CA_SetDescramblingAlgorithm( CaDescrMode_t Mode, CaDescrType_t Type, DS_BOOL bParityEnable ); DHL_RESULT DHL_CA_Start( DS_U32 Pid1, DS_U32 Pid2, DS_U32 EvenKeyHigh, DS_U32 EvenKeyLow, DS_U32 OddKeyHigh, DS_U32 OddKeyLow ); DHL_RESULT DHL_CA_Stop(void); DHL_RESULT DHL_CA_Close(void); DHL_RESULT DHL_CA_ChangePIDs( DS_U32 Pid1, DS_U32 Pid2 ); DHL_RESULT DHL_CA_SetMode(CaDescrMode_t mode); CaDescrMode_t DHL_CA_GetMode(void); DS_BOOL DHL_CA_IsStarted(void); #ifdef __cplusplus } #endif #endif /* __DST_HALCA_H__ */