| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2002-2008, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bsettop_cablecard.h $ |
|---|
| 11 | * $brcm_Revision: 3 $ |
|---|
| 12 | * $brcm_Date: 1/17/08 11:14a $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /BSEAV/api/include/bsettop_cablecard.h $ |
|---|
| 19 | * |
|---|
| 20 | * 3 1/17/08 11:14a vsilyaev |
|---|
| 21 | * PR38494: added definition for OOB pins control from 3255 |
|---|
| 22 | * |
|---|
| 23 | * PROD_TRINITY_REFSW_Devel/5 1/2/08 5:44p ayxiang |
|---|
| 24 | * PR38494: added definition for OOB pins control from 3255 |
|---|
| 25 | * |
|---|
| 26 | * PROD_TRINITY_REFSW_Devel/4 1/2/07 5:35p haisongw |
|---|
| 27 | * PR26393: 7401C0/C1 SPOD XPT interface support |
|---|
| 28 | * |
|---|
| 29 | * PROD_TRINITY_REFSW_Devel/3 12/29/06 4:05p haisongw |
|---|
| 30 | * PR26393: 7401C0/C1 SPOD XPT interface support |
|---|
| 31 | * |
|---|
| 32 | * PROD_TRINITY_REFSW_Devel/2 12/27/06 4:48p haisongw |
|---|
| 33 | * PR26258: add cablecard support in Settop API kernel mode |
|---|
| 34 | * |
|---|
| 35 | * PROD_TRINITY_REFSW_Devel/1 12/19/06 3:27p haisongw |
|---|
| 36 | * PR26258: add cablecard support in Settop API kernel mode |
|---|
| 37 | * |
|---|
| 38 | ****************************************************************************/ |
|---|
| 39 | #ifndef BSETTOP_CABLECARD_H__ |
|---|
| 40 | #define BSETTOP_CABLECARD_H__ |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | typedef struct bcablecard *bcablecard_t; |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | /*=************************* |
|---|
| 47 | The CableCARD interface is used to handle CableCARD resource. |
|---|
| 48 | It handles CableCARD transport routing. |
|---|
| 49 | There is ONLY one CableCARD available. |
|---|
| 50 | ****************************/ |
|---|
| 51 | |
|---|
| 52 | /* |
|---|
| 53 | Summary: |
|---|
| 54 | CableCARD operation mode |
|---|
| 55 | */ |
|---|
| 56 | typedef enum bcablecard_mode { |
|---|
| 57 | bcablecard_mode_oob, |
|---|
| 58 | bcablecard_mode_dsg, |
|---|
| 59 | bcablecard_mode_dsg_one_way, |
|---|
| 60 | bcablecard_mode_adv_dsg, |
|---|
| 61 | bcablecard_mode_adv_dsg_one_way |
|---|
| 62 | } bcablecard_mode; |
|---|
| 63 | |
|---|
| 64 | /* |
|---|
| 65 | Summary: |
|---|
| 66 | CableCARD physical pin control |
|---|
| 67 | */ |
|---|
| 68 | typedef enum bcablecard_physical_control { |
|---|
| 69 | bcablecard_physical_control_none = 0, |
|---|
| 70 | bcablecard_physical_control_init, |
|---|
| 71 | bcablecard_physical_control_cardin, |
|---|
| 72 | bcablecard_physical_control_applypower, |
|---|
| 73 | bcablecard_physical_control_resetdone, |
|---|
| 74 | bcablecard_physical_control_cardout, |
|---|
| 75 | bcablecard_physical_control_shutdown, |
|---|
| 76 | bcablecard_physical_control_applypower_3V, |
|---|
| 77 | bcablecard_physical_control_applypower_5V, |
|---|
| 78 | bcablecard_physical_control_disable_OOB_pins, |
|---|
| 79 | bcablecard_physical_control_enable_OOB_pins |
|---|
| 80 | } bcablecard_physical_control; |
|---|
| 81 | |
|---|
| 82 | #ifdef __cplusplus |
|---|
| 83 | extern "C" |
|---|
| 84 | { |
|---|
| 85 | #endif |
|---|
| 86 | |
|---|
| 87 | /* |
|---|
| 88 | Summary: |
|---|
| 89 | Open a CableCARD resource. |
|---|
| 90 | Description: |
|---|
| 91 | It initializes transport interface for cablecard. |
|---|
| 92 | */ |
|---|
| 93 | bcablecard_t bcablecard_open( |
|---|
| 94 | bobject_t cablecard_id /* cablecard object id */ |
|---|
| 95 | ); |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | /* |
|---|
| 99 | Summary: |
|---|
| 100 | Close a CableCARD resource. |
|---|
| 101 | Description: |
|---|
| 102 | It de-initializes transport interface for cablecard. |
|---|
| 103 | */ |
|---|
| 104 | void bcablecard_close( |
|---|
| 105 | bcablecard_t cablecard /* handle returned by bcablecard_open */ |
|---|
| 106 | ); |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | /** |
|---|
| 110 | Summary: |
|---|
| 111 | CableCARD settings |
|---|
| 112 | **/ |
|---|
| 113 | typedef struct bcablecard_settings { |
|---|
| 114 | bcablecard_mode mode; /* CableCARD operation mode*/ |
|---|
| 115 | btuner_qam_annex oob_annex; /* CableCARD OOB DS annex */ |
|---|
| 116 | btuner_qam_us_mode us_mode; /* CableCARD OOB US mode*/ |
|---|
| 117 | bcablecard_physical_control ctrl; /* CableCARD physical control*/ |
|---|
| 118 | } bcablecard_settings; |
|---|
| 119 | |
|---|
| 120 | /** |
|---|
| 121 | Summary: |
|---|
| 122 | CableCARD route settings |
|---|
| 123 | **/ |
|---|
| 124 | typedef struct bcablecard_route_settings { |
|---|
| 125 | unsigned int ltsid; /* ltsid per OpenCable CCIF spec*/ |
|---|
| 126 | bband_t band; /* Transport input band*/ |
|---|
| 127 | } bcablecard_route_settings; |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | /** |
|---|
| 131 | Summary: |
|---|
| 132 | Get current CableCARD settings |
|---|
| 133 | **/ |
|---|
| 134 | void bcablecard_get( |
|---|
| 135 | bcablecard_t cablecard, |
|---|
| 136 | bcablecard_settings *settings /* [out] */ |
|---|
| 137 | ); |
|---|
| 138 | |
|---|
| 139 | /** |
|---|
| 140 | Summary: |
|---|
| 141 | Set new CableCARD settings |
|---|
| 142 | **/ |
|---|
| 143 | bresult bcablecard_set( |
|---|
| 144 | bcablecard_t cablecard, |
|---|
| 145 | const bcablecard_settings *settings |
|---|
| 146 | ); |
|---|
| 147 | |
|---|
| 148 | /* |
|---|
| 149 | Summary: |
|---|
| 150 | Enable routing tuner's transport output to CableCARD. |
|---|
| 151 | Description: |
|---|
| 152 | */ |
|---|
| 153 | bresult bcablecard_route_add_tuner( |
|---|
| 154 | bcablecard_t cablecard, |
|---|
| 155 | btuner_t tuner /* which btuner's output to be routed to CableCARD */ |
|---|
| 156 | ); |
|---|
| 157 | |
|---|
| 158 | /* |
|---|
| 159 | Summary: |
|---|
| 160 | Disable routing tuner's transport output to CableCARD. |
|---|
| 161 | Description: |
|---|
| 162 | */ |
|---|
| 163 | bresult bcablecard_route_remove_tuner( |
|---|
| 164 | bcablecard_t cablecard, |
|---|
| 165 | btuner_t tuner /* which btuner's output NOT to be routed to cablecard */ |
|---|
| 166 | ); |
|---|
| 167 | |
|---|
| 168 | /* |
|---|
| 169 | Summary: |
|---|
| 170 | get settings for the transport route input from tuner to CableCARD |
|---|
| 171 | Description: |
|---|
| 172 | */ |
|---|
| 173 | bresult bcablecard_route_get( |
|---|
| 174 | bcablecard_t cablecard, |
|---|
| 175 | btuner_t tuner, /* tuner's output routed to POD */ |
|---|
| 176 | bcablecard_route_settings *settings /*CableCARD route settings*/ |
|---|
| 177 | ); |
|---|
| 178 | |
|---|
| 179 | #ifdef __cplusplus |
|---|
| 180 | } |
|---|
| 181 | #endif |
|---|
| 182 | |
|---|
| 183 | #endif |
|---|
| 184 | |
|---|