source: svn/trunk/zas_dstar/hal/include/dsthalca.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
File size: 2.4 KB
Line 
1/****************************************************************************
2 * Copyright (c) 2004 Digital Stream Technologies Inc.  All Rights Reserved.
3 *
4 * Module:      dsthalca.h
5 * Author:              Jun-ku Park, hwatk@dstreamtech.com
6 * Description: DST HAL [Conditional Access] Platform Independent Includes
7 *             
8 * $Id
9 *
10 ***************************************************************************/
11
12#ifndef __DST_HALCA_H__
13#define __DST_HALCA_H__
14
15#include "dsthalcommon.h"
16
17typedef enum {
18        CaState_UNKNOWN=0,      /* Tuner is not initialized. */
19        CaState_INIT,           /* Tuner is initialized. */
20        CaState_START,          /* Tuner is started. */
21        CaState_STOP,           /* Tuner is stopped. */
22        CaState_MAX
23} CaState_t;
24
25typedef enum {
26        CaScrMode_DEFAULT=0,
27        CaScrMode_ECB=200,
28        CaScrMode_CBC,
29        CaScrMode_MAX
30} CaScrMode_t;
31
32typedef enum {
33        CaScrType_PASSTHROUGH=0,
34        CaScrType_3DES=200,
35        CaScrType_DES,
36        CaScrType_MAX
37} CaScrType_t;
38
39typedef enum {
40        CaDescrMode_DEFAULT=0,
41        CaDescrMode_ECB=200,
42        CaDescrMode_CBC,
43        CaDescrMode_MAX
44} CaDescrMode_t;
45
46typedef enum {
47        CaDescrType_PASSTHROUGH=0,
48        CaDescrType_DVB_CSA=200,
49        CaDescrType_3DES,
50        CaDescrType_DES,
51        CaDescrType_CSS,
52        CaDescrType_M2,
53        CaDescrType_MAX
54} CaDescrType_t;
55
56typedef enum {
57        CaParity_ODD = 1L,
58        CaParity_EVEN,
59} CaParity_t;
60
61typedef struct tag_DST_CA
62{
63        CaState_t                       bCurState;
64       
65        /* Scrambler Attribute */
66        CaScrMode_t                     ScrMode;
67        CaScrType_t                     ScrType;
68        DS_BOOL                         ScrParityEnable;
69       
70        /* Descramber Attribute */
71        CaDescrMode_t           DescrMode;
72        CaDescrType_t           DescrType;
73        DS_BOOL                         DescrParityEnable;
74       
75        /* CA PID Filter */
76        DS_U32                          Pid1, Pid2;
77       
78        /* CA Key */
79        DS_U32                          dwEvenKeyHigh;
80        DS_U32                          dwEvenKeyLow;
81        DS_U32                          dwOddKeyHigh;
82        DS_U32                          dwOddKeyLow;
83       
84        DS_BOOL                         bStarted;
85} *P_DST_CA, DST_CA;
86
87#ifdef __cplusplus
88extern "C" {
89#endif
90
91DHL_RESULT DHL_CA_Init(void);
92DHL_RESULT DHL_CA_SetScramblingAlgorithm( CaScrMode_t Mode, CaScrType_t Type, DS_BOOL bParityEnable );
93DHL_RESULT DHL_CA_SetDescramblingAlgorithm( CaDescrMode_t Mode, CaDescrType_t Type, DS_BOOL bParityEnable );
94DHL_RESULT DHL_CA_Start( DS_U32 Pid1, DS_U32 Pid2, DS_U32 EvenKeyHigh, DS_U32 EvenKeyLow, DS_U32 OddKeyHigh, DS_U32 OddKeyLow );
95DHL_RESULT DHL_CA_Stop(void);
96DHL_RESULT DHL_CA_Close(void);
97DHL_RESULT DHL_CA_ChangePIDs( DS_U32 Pid1, DS_U32 Pid2 );
98
99DHL_RESULT DHL_CA_SetMode(CaDescrMode_t mode);
100CaDescrMode_t DHL_CA_GetMode(void);
101DS_BOOL DHL_CA_IsStarted(void);
102
103#ifdef __cplusplus
104}
105#endif
106
107#endif /* __DST_HALCA_H__ */
Note: See TracBrowser for help on using the repository browser.