| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2011, 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: btnr_priv.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/11 $ |
|---|
| 12 | * $brcm_Date: 5/4/11 4:22p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/portinginterface/tnr/btnr_priv.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/11 5/4/11 4:22p atanugul |
|---|
| 21 | * SW7231-32: Reverting back to version 9 |
|---|
| 22 | * |
|---|
| 23 | * Hydra_Software_Devel/10 5/3/11 3:20p vishk |
|---|
| 24 | * SW7231-32: Implement the Nexus code to support the 3461 frontend chip. |
|---|
| 25 | * Undo the changes done since version 8. |
|---|
| 26 | * |
|---|
| 27 | * Hydra_Software_Devel/9 4/11/11 5:15p atanugul |
|---|
| 28 | * SW3128-2: Add Get_Settings and SetSettings support to 3128 TNR PI |
|---|
| 29 | * |
|---|
| 30 | * Hydra_Software_Devel/8 6/22/10 6:15p vishk |
|---|
| 31 | * SW7420-839: Add support to program AGC gain to 31xx TNR PI |
|---|
| 32 | * |
|---|
| 33 | * Hydra_Software_Devel/7 11/17/09 7:59p farshidf |
|---|
| 34 | * SW7550-38: update the code to the latest nexus call |
|---|
| 35 | * |
|---|
| 36 | * Hydra_Software_Devel/6 11/10/09 7:11p farshidf |
|---|
| 37 | * 7550-38: add the tuner code |
|---|
| 38 | * |
|---|
| 39 | * Hydra_Software_Devel/5 8/21/09 6:12p vishk |
|---|
| 40 | * PR 57484: Bcm31xx: Add Power Management support for TNR |
|---|
| 41 | * |
|---|
| 42 | * Hydra_Software_Devel/4 6/7/05 8:35a dlwin |
|---|
| 43 | * PR 14682: Added additional functions for Docsis and general use. New |
|---|
| 44 | * function 'BTNR_GetInfo()' returns additional informtion for the tuner. |
|---|
| 45 | * |
|---|
| 46 | * Hydra_Software_Devel/3 4/1/05 5:26p dlwin |
|---|
| 47 | * PR 14682: Added semi-private functions for QamCm to use to AGC |
|---|
| 48 | * readings. This required for Docsis integration. |
|---|
| 49 | * |
|---|
| 50 | * Hydra_Software_Devel/2 10/7/03 8:52a dlwin |
|---|
| 51 | * Removed the need to call a create generic tuner handle. |
|---|
| 52 | * |
|---|
| 53 | * Hydra_Software_Devel/1 8/26/03 2:20p dlwin |
|---|
| 54 | * Initial version |
|---|
| 55 | * |
|---|
| 56 | ***************************************************************************/ |
|---|
| 57 | |
|---|
| 58 | #ifndef BTNR_PRIV_H__ |
|---|
| 59 | #define BTNR_PRIV_H__ |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | #ifdef __cplusplus |
|---|
| 63 | extern "C" { |
|---|
| 64 | #endif |
|---|
| 65 | |
|---|
| 66 | |
|---|
| 67 | /*************************************************************************** |
|---|
| 68 | Summary: |
|---|
| 69 | This typedef defines the pointer to Tuner Set Rf Freq. function. |
|---|
| 70 | |
|---|
| 71 | Description: |
|---|
| 72 | This is pointer to 'Custom' part of tuner module for setting the Rf Freq. |
|---|
| 73 | |
|---|
| 74 | See Also: |
|---|
| 75 | BTNR_P_Handle |
|---|
| 76 | |
|---|
| 77 | ****************************************************************************/ |
|---|
| 78 | typedef BERR_Code (*BTNR_SetRfFreqFunc)( |
|---|
| 79 | void *hDevImp, /* Device handle */ |
|---|
| 80 | uint32_t freq, /* Requested tuner freq., in Hertz */ |
|---|
| 81 | BTNR_TunerMode tunerMode /* Requested tuner mode */ |
|---|
| 82 | ); |
|---|
| 83 | |
|---|
| 84 | /*************************************************************************** |
|---|
| 85 | Summary: |
|---|
| 86 | This typedef defines the pointer to Tuner Get Rf Freq. function. |
|---|
| 87 | |
|---|
| 88 | Description: |
|---|
| 89 | This is pointer to 'Custom' part of tuner module for getting the |
|---|
| 90 | current Rf Freq. setting. |
|---|
| 91 | |
|---|
| 92 | See Also: |
|---|
| 93 | BTNR_P_Handle |
|---|
| 94 | |
|---|
| 95 | ****************************************************************************/ |
|---|
| 96 | typedef BERR_Code (*BTNR_GetRfFreqFunc)( |
|---|
| 97 | void *hDevImp, /* Device handle */ |
|---|
| 98 | uint32_t *freq, /* [output] Returns tuner freq., in Hertz */ |
|---|
| 99 | BTNR_TunerMode *tunerMode /* [output] Returns tuner mode */ |
|---|
| 100 | ); |
|---|
| 101 | |
|---|
| 102 | /*************************************************************************** |
|---|
| 103 | Summary: |
|---|
| 104 | This typedef defines the pointer to Tuner Close function. |
|---|
| 105 | |
|---|
| 106 | Description: |
|---|
| 107 | This is pointer to 'Custom' part of tuner module for closing tuner module. |
|---|
| 108 | |
|---|
| 109 | See Also: |
|---|
| 110 | BTNR_P_Handle |
|---|
| 111 | |
|---|
| 112 | ****************************************************************************/ |
|---|
| 113 | typedef BERR_Code (*BTNR_CloseFunc)( |
|---|
| 114 | BTNR_Handle hDev /* [in] Device handle */ |
|---|
| 115 | ); |
|---|
| 116 | |
|---|
| 117 | /*************************************************************************** |
|---|
| 118 | Summary: |
|---|
| 119 | This typedef defines the pointer to Tuner Get AGC register value. |
|---|
| 120 | |
|---|
| 121 | Description: |
|---|
| 122 | This is pointer to 'Custom' part of tuner module for getting the |
|---|
| 123 | current AGC register value. |
|---|
| 124 | |
|---|
| 125 | See Also: |
|---|
| 126 | BTNR_P_Handle |
|---|
| 127 | |
|---|
| 128 | ****************************************************************************/ |
|---|
| 129 | typedef BERR_Code (*BTNR_GetAgcRegValFunc)( |
|---|
| 130 | void *hDevImp, /* Device handle */ |
|---|
| 131 | uint32_t regOffset, /* [in] AGC register offset */ |
|---|
| 132 | uint32_t *agcVal /* [output] Returns AGC register value */ |
|---|
| 133 | ); |
|---|
| 134 | |
|---|
| 135 | /*************************************************************************** |
|---|
| 136 | Summary: |
|---|
| 137 | This typedef defines the pointer to Tuner Set AGC register value. |
|---|
| 138 | |
|---|
| 139 | Description: |
|---|
| 140 | This is pointer to 'Custom' part of tuner module for setting the |
|---|
| 141 | current AGC register value. |
|---|
| 142 | |
|---|
| 143 | See Also: |
|---|
| 144 | BTNR_P_Handle |
|---|
| 145 | |
|---|
| 146 | ****************************************************************************/ |
|---|
| 147 | typedef BERR_Code (*BTNR_SetAgcRegValFunc)( |
|---|
| 148 | void *hDevImp, /* Device handle */ |
|---|
| 149 | uint32_t regOffset, /* [in] AGC register offset */ |
|---|
| 150 | uint32_t *agcVal /* [input] Sets AGC register value */ |
|---|
| 151 | ); |
|---|
| 152 | |
|---|
| 153 | /*************************************************************************** |
|---|
| 154 | Summary: |
|---|
| 155 | This typedef defines the pointer to Tuner Get Info. |
|---|
| 156 | |
|---|
| 157 | Description: |
|---|
| 158 | This is pointer to tuner module for getting the tuner Info. |
|---|
| 159 | |
|---|
| 160 | See Also: |
|---|
| 161 | BTNR_P_Handle |
|---|
| 162 | |
|---|
| 163 | ****************************************************************************/ |
|---|
| 164 | typedef BERR_Code (*BTNR_GetInfoFunc)( |
|---|
| 165 | void *hDevImp, /* Device handle */ |
|---|
| 166 | BTNR_TunerInfo *tnrInfo /* [output] Tuner information */ |
|---|
| 167 | ); |
|---|
| 168 | |
|---|
| 169 | /*************************************************************************** |
|---|
| 170 | Summary: |
|---|
| 171 | This function gets the power-saver mode. |
|---|
| 172 | |
|---|
| 173 | Description: |
|---|
| 174 | This function returns the current power-saver mode. |
|---|
| 175 | |
|---|
| 176 | See Also: |
|---|
| 177 | BTNR_P_Handle |
|---|
| 178 | |
|---|
| 179 | ****************************************************************************/ |
|---|
| 180 | typedef BERR_Code (*BTNR_GetPowerSaverFunc)( |
|---|
| 181 | void *hDevImp, /* Device handle */ |
|---|
| 182 | BTNR_PowerSaverSettings *pwrSettings /* Tuner power saver information */ |
|---|
| 183 | ); |
|---|
| 184 | |
|---|
| 185 | /*************************************************************************** |
|---|
| 186 | Summary: |
|---|
| 187 | This function enable the power-saver mode. |
|---|
| 188 | |
|---|
| 189 | Description: |
|---|
| 190 | This function is responsible for enabling/disabling the downstream tuner |
|---|
| 191 | power-saver mode. When the power-saver mode is enabled, the |
|---|
| 192 | Qam In-Band Downstream tuner is shutdown. |
|---|
| 193 | |
|---|
| 194 | |
|---|
| 195 | See Also: |
|---|
| 196 | BTNR_P_Handle |
|---|
| 197 | |
|---|
| 198 | ****************************************************************************/ |
|---|
| 199 | typedef BERR_Code (*BTNR_SetPowerSaverFunc)( |
|---|
| 200 | void *hDevImp, /* Device handle */ |
|---|
| 201 | BTNR_PowerSaverSettings *pwrSettings /* Tuner power saver information */ |
|---|
| 202 | ); |
|---|
| 203 | |
|---|
| 204 | /*************************************************************************** |
|---|
| 205 | Summary: |
|---|
| 206 | This function gets the TNR settings |
|---|
| 207 | |
|---|
| 208 | Description: |
|---|
| 209 | This function gets the TNR settings |
|---|
| 210 | |
|---|
| 211 | See Also: |
|---|
| 212 | BTNR_P_Handle |
|---|
| 213 | |
|---|
| 214 | ****************************************************************************/ |
|---|
| 215 | typedef BERR_Code (*BTNR_GetSettingsFunc)( |
|---|
| 216 | BTNR_Handle hDev, /* Device handle */ |
|---|
| 217 | BTNR_Settings *settings /* TNR settings. */ |
|---|
| 218 | ); |
|---|
| 219 | |
|---|
| 220 | /*************************************************************************** |
|---|
| 221 | Summary: |
|---|
| 222 | This function sets the TNR settings |
|---|
| 223 | |
|---|
| 224 | Description: |
|---|
| 225 | This function sets the TNR settings |
|---|
| 226 | |
|---|
| 227 | |
|---|
| 228 | See Also: |
|---|
| 229 | BTNR_P_Handle |
|---|
| 230 | |
|---|
| 231 | ****************************************************************************/ |
|---|
| 232 | typedef BERR_Code (*BTNR_SetSettingsFunc)( |
|---|
| 233 | BTNR_Handle hDev, /* Device handle */ |
|---|
| 234 | BTNR_Settings *settings /* TNR settings. */ |
|---|
| 235 | ); |
|---|
| 236 | |
|---|
| 237 | /*************************************************************************** |
|---|
| 238 | Summary: |
|---|
| 239 | The private handle for Tuner module |
|---|
| 240 | |
|---|
| 241 | Description: |
|---|
| 242 | A private handle for BTNR device, not exposed any modules outside of |
|---|
| 243 | BTNR. |
|---|
| 244 | |
|---|
| 245 | See Also: |
|---|
| 246 | |
|---|
| 247 | ****************************************************************************/ |
|---|
| 248 | typedef struct BTNR_P_Handle |
|---|
| 249 | { |
|---|
| 250 | void *hDevImpl; /* Device Implementation handle */ |
|---|
| 251 | uint32_t magicId; /* Used to check if structure is corrupt */ |
|---|
| 252 | BTNR_SetRfFreqFunc pSetRfFreq; /* ptr to tune tuner function */ |
|---|
| 253 | BTNR_GetRfFreqFunc pGetRfFreq; /* ptr to get tuned frequency function */ |
|---|
| 254 | BTNR_GetAgcRegValFunc pGetAgcRegVal; /* ptr to get AGC register value */ |
|---|
| 255 | BTNR_GetInfoFunc pGetInfo; /* ptr to get Tuner information */ |
|---|
| 256 | BTNR_CloseFunc pClose; /* ptr to close tuner module function */ |
|---|
| 257 | BTNR_GetPowerSaverFunc pGetPowerSaver; /* ptr to Get tuner power saver module function */ |
|---|
| 258 | BTNR_SetPowerSaverFunc pSetPowerSaver; /* ptr to set tuner power saver module function */ |
|---|
| 259 | BTNR_SetAgcRegValFunc pSetAgcRegVal; /* ptr to set AGC register value */ |
|---|
| 260 | BTNR_GetSettingsFunc pGetSettings; /* ptr to Get tuner power saver module function */ |
|---|
| 261 | BTNR_SetSettingsFunc pSetSettings; /* ptr to set tuner power saver module function */ |
|---|
| 262 | } BTNR_P_Handle; |
|---|
| 263 | |
|---|
| 264 | |
|---|
| 265 | #ifdef __cplusplus |
|---|
| 266 | } |
|---|
| 267 | #endif |
|---|
| 268 | |
|---|
| 269 | #endif |
|---|
| 270 | |
|---|
| 271 | |
|---|
| 272 | |
|---|