| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2012, 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: bhdm.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/116 $ |
|---|
| 12 | * $brcm_Date: 3/19/12 11:33a $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: Q:/projects/7425/latest/magnum/portinginterface/hdm/7038/bhdm.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/116 3/19/12 11:33a rgreen |
|---|
| 21 | * SW7425-2650: Move BHDM_SupportedVideoInfo to |
|---|
| 22 | * BHDM_EDID_GetSupportedVideoInfo |
|---|
| 23 | * |
|---|
| 24 | * Hydra_Software_Devel/115 3/1/12 1:20p rgreen |
|---|
| 25 | * SW7425-2515: Remove unused CEC code which is now located in CEC pi; |
|---|
| 26 | * remove CEC EventHandle |
|---|
| 27 | * |
|---|
| 28 | * Hydra_Software_Devel/114 2/23/12 10:49a rgreen |
|---|
| 29 | * SW7125-1146,SW7408-317: Merge changes |
|---|
| 30 | * |
|---|
| 31 | * Hydra_Software_Devel/SW7408-317/1 2/21/12 6:33p rgreen |
|---|
| 32 | * SW7125-1146,SW7408-317: Treat RxSense and HP events separately. Update |
|---|
| 33 | * processing of both events |
|---|
| 34 | * |
|---|
| 35 | * Hydra_Software_Devel/113 1/4/12 3:31p rgreen |
|---|
| 36 | * SW7405-5004: Use BAVC_HDMI_xxx vs BHDM_xxx macros |
|---|
| 37 | * |
|---|
| 38 | * Hydra_Software_Devel/112 11/30/11 11:14a rgreen |
|---|
| 39 | * SW7405-5004: Replace BKNI_Memcmp for structure with field by field |
|---|
| 40 | * comparison |
|---|
| 41 | * |
|---|
| 42 | * Hydra_Software_Devel/111 4/29/11 4:48p vle |
|---|
| 43 | * SW7125-798: Revised |
|---|
| 44 | * |
|---|
| 45 | * Hydra_Software_Devel/110 4/22/11 11:48a vle |
|---|
| 46 | * SW7125-798: Add API to allow customer to control pre-emphasis settings |
|---|
| 47 | * |
|---|
| 48 | * Hydra_Software_Devel/SW7125-798/2 4/21/11 10:57a vle |
|---|
| 49 | * SW7125-798: Update pre-emphasis configuration structure for both 65nm |
|---|
| 50 | * and 40nm platforms. |
|---|
| 51 | * |
|---|
| 52 | * Hydra_Software_Devel/SW7125-798/1 2/3/11 11:26a vle |
|---|
| 53 | * SW7125-798: Add NEXUS API to allow customer to control pre-emphasis |
|---|
| 54 | * settings |
|---|
| 55 | * |
|---|
| 56 | * Hydra_Software_Devel/109 2/17/11 7:38p jtna |
|---|
| 57 | * SW7420-1141: rework HDMI power management. break public API to allow |
|---|
| 58 | * for StandbySettings |
|---|
| 59 | * |
|---|
| 60 | * Hydra_Software_Devel/108 10/20/10 6:48p jtna |
|---|
| 61 | * SW7420-972: added standby/resume functions. removed references to |
|---|
| 62 | * 108MHz BCHP_PWR node. |
|---|
| 63 | * |
|---|
| 64 | * Hydra_Software_Devel/107 9/28/10 7:18p vle |
|---|
| 65 | * SW7422-23: Refactor HDMI code to isolate platform dependent code |
|---|
| 66 | * furthermore. Add support for 7422 and other 40nm platforms. |
|---|
| 67 | * |
|---|
| 68 | * Hydra_Software_Devel/106 9/22/10 7:10p vle |
|---|
| 69 | * SW7405-4782: Merge to main branch |
|---|
| 70 | * |
|---|
| 71 | * Hydra_Software_Devel/SW7405-4782/1 9/10/10 8:43p vle |
|---|
| 72 | * SW7405-4782: Changing aspect ratio does not require HDCP re- |
|---|
| 73 | * authentication. |
|---|
| 74 | * |
|---|
| 75 | * Hydra_Software_Devel/105 6/28/10 6:59p vle |
|---|
| 76 | * SW7208-59: Add API to control the HDMI data transfer mode, master or |
|---|
| 77 | * slave |
|---|
| 78 | * |
|---|
| 79 | * Hydra_Software_Devel/104 4/23/10 10:43a vle |
|---|
| 80 | * SW7420-676: merge to main branch |
|---|
| 81 | * |
|---|
| 82 | * Hydra_Software_Devel/SW7420-676/1 4/21/10 2:27p vle |
|---|
| 83 | * SW7420-676: Add API to return supported video info |
|---|
| 84 | * |
|---|
| 85 | * Hydra_Software_Devel/103 4/16/10 6:50p vle |
|---|
| 86 | * SW7420-543: BHDM_InputPixelClock enum should be private |
|---|
| 87 | * |
|---|
| 88 | * Hydra_Software_Devel/102 3/26/10 4:33p vle |
|---|
| 89 | * SW7601-172: Merge xvYCC support with Gamut Metadata Packet transmission |
|---|
| 90 | * from bdvd branch |
|---|
| 91 | * |
|---|
| 92 | * Hydra_Software_Devel/101 2/26/10 5:17p vle |
|---|
| 93 | * SW7405-3016: Remove software i2c settings from HDM PI. This mode is |
|---|
| 94 | * configure in I2C module |
|---|
| 95 | * |
|---|
| 96 | * Hydra_Software_Devel/100 2/23/10 12:48a vle |
|---|
| 97 | * SW7420-579: Refactor HDMI PI. |
|---|
| 98 | * |
|---|
| 99 | * Hydra_Software_Devel/16 1/18/10 6:47p vle |
|---|
| 100 | * SW7342-129: Add BHDM_GetPreEmphasisConfiguration and |
|---|
| 101 | * BHDM_SetPreEmphasisConfiguration implementations. |
|---|
| 102 | * |
|---|
| 103 | * Hydra_Software_Devel/15 1/8/10 5:19p vle |
|---|
| 104 | * SW7405-3740: Port changes to 7420, 7468, and other platforms. |
|---|
| 105 | * Add isr callback to provide immediate notifcation of HP changes vs |
|---|
| 106 | * waiting for event processing |
|---|
| 107 | * |
|---|
| 108 | * Hydra_Software_Devel/14 9/21/09 6:14p vle |
|---|
| 109 | * SW7601-164: Merge changes in bdvd_v3.0 branch |
|---|
| 110 | * |
|---|
| 111 | * Hydra_Software_Devel/bdvd_v3.0/1 9/21/09 3:01p rbshah |
|---|
| 112 | * PR16772[DVD]:[ see HiDef-DVD bug tracking system for more info ]. The |
|---|
| 113 | * ability to have the app. get/set the N value for HW-CTS was |
|---|
| 114 | * added as precautionary measure. Appears it's not needed anymore |
|---|
| 115 | * so taking it out. |
|---|
| 116 | * |
|---|
| 117 | * Hydra_Software_Devel/13 8/26/09 3:41p vle |
|---|
| 118 | * SW7405-2670: |
|---|
| 119 | * Add implementation of interrupt based receiver sense |
|---|
| 120 | * |
|---|
| 121 | * Hydra_Software_Devel/12 7/22/09 7:35p vle |
|---|
| 122 | * PR56776: Prevent HDCP An Timeout |
|---|
| 123 | * |
|---|
| 124 | * Hydra_Software_Devel/11 6/25/09 3:04p vle |
|---|
| 125 | * PR56132, PR48151: |
|---|
| 126 | * Add support for Get HDMI Vendor Specific Info Frame |
|---|
| 127 | * Correct channel assignment for PCM 5.1 |
|---|
| 128 | * |
|---|
| 129 | * Hydra_Software_Devel/10 3/11/09 6:29p vle |
|---|
| 130 | * PR52873: Merge changes from bdvd_v2.0 branch to Hydra branch |
|---|
| 131 | * Ensure we don't miss a hot-plug pulse whenever we're waiting. |
|---|
| 132 | * Ensure HDMI input/drift FIFO is initialized and re-centered, disable |
|---|
| 133 | * GCP packet generation when connect to DVI monitors. |
|---|
| 134 | * Updated all the Audio CRP N-CTS values (both SW and HW CTS modes) |
|---|
| 135 | * |
|---|
| 136 | * Hydra_Software_Devel/bdvd_v2.0/11 3/9/09 1:58p rbshah |
|---|
| 137 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Updated |
|---|
| 138 | * all the Audio CRP N-CTS tables with those generated by the HW |
|---|
| 139 | * folks (Vincent Y. and Chris P.). We now have "official" values for both |
|---|
| 140 | * HW and SW CTS modes. |
|---|
| 141 | * |
|---|
| 142 | * Also modified the Display/HDMI API so application can only set N values |
|---|
| 143 | * related to HW CTS. In other words, prior API for updating SW CTS values |
|---|
| 144 | * was removed. |
|---|
| 145 | * |
|---|
| 146 | * Tested all audio sample rates (except 176.4KHz) at all color depths and |
|---|
| 147 | * all relevant pixel clock rates using both HW and CW CTS with the Astro. |
|---|
| 148 | * |
|---|
| 149 | * Hydra_Software_Devel/bdvd_v2.0/10 2/24/09 3:43p rbshah |
|---|
| 150 | * PR_13243 [ see HiDef-DVD bug tracking system for more info ]. Enhance |
|---|
| 151 | * Display/HDMI API to allow the app. precise control over |
|---|
| 152 | * N and CTS values used for Audio Clock Regen (ACR) packets. This |
|---|
| 153 | * required a little re-design of the N/CTS tables in BHDM. |
|---|
| 154 | * |
|---|
| 155 | * Hydra_Software_Devel/bdvd_v2.0/9 2/18/09 9:44a rbshah |
|---|
| 156 | * PR_13266 [ see HiDef-DVD bug tracking system for more info ]. Added |
|---|
| 157 | * Bluray and Super Audio CD types as requested. |
|---|
| 158 | * |
|---|
| 159 | * Hydra_Software_Devel/bdvd_v2.0/8 1/29/09 3:41p rbshah |
|---|
| 160 | * PR_12826 [ see HiDef-DVD bug tracking system for more info ]. Ensure |
|---|
| 161 | * we don't miss a hot-plug pulse whenever we're waiting (in |
|---|
| 162 | * the PI as well as BDVD). Also removed an unnecessary wait before |
|---|
| 163 | * starting HDCP. |
|---|
| 164 | * |
|---|
| 165 | * Hydra_Software_Devel/9 3/9/09 3:20p vle |
|---|
| 166 | * PR50570, PR50918, PR49277, PR49652, PR52873: |
|---|
| 167 | * Add API to mute/unmute audio, update pixel repitition support, add |
|---|
| 168 | * SetPixelDataOverride API for transmission of black video. Merge |
|---|
| 169 | * changes/updates from bdvd_v2.0 to main branch. |
|---|
| 170 | * |
|---|
| 171 | * Hydra_Software_Devel/8 3/3/09 8:23p vle |
|---|
| 172 | * PR50569: Add HW Ri/Pj checking feature. Merged from bdvd branch after |
|---|
| 173 | * Rajul's testing effort. |
|---|
| 174 | * |
|---|
| 175 | * Hydra_Software_Devel/bdvd_v2.0/6 1/23/09 10:14a rbshah |
|---|
| 176 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Checkin |
|---|
| 177 | * code drop from Anthony Le for Auto Ri,Pj feature in the |
|---|
| 178 | * 7601B0 (Digital Video PR50569). |
|---|
| 179 | * |
|---|
| 180 | * This is disabled by default and will be turned on once it has |
|---|
| 181 | * been tested and soaked. |
|---|
| 182 | * |
|---|
| 183 | * Did verify the A0 build! |
|---|
| 184 | * |
|---|
| 185 | * Hydra_Software_Devel/7 1/12/09 7:34p vle |
|---|
| 186 | * PR49277: Merge to main branch. |
|---|
| 187 | * Add pixel repetition support for 480p |
|---|
| 188 | * |
|---|
| 189 | * Hydra_Software_Devel/PR49277/2 1/12/09 7:18p vle |
|---|
| 190 | * PR49277: Update to add pixel repetition support. |
|---|
| 191 | * |
|---|
| 192 | * Hydra_Software_Devel/bdvd_v2.0/7 1/27/09 4:18p rbshah |
|---|
| 193 | * PR_12826 [ see HiDef-DVD bug tracking system for more info ]. Add |
|---|
| 194 | * logic to wait for stable video to arrive from VEC before we |
|---|
| 195 | * start the HDCP authentication process. |
|---|
| 196 | * |
|---|
| 197 | * This checkin may not solve the Simplay failure at hand, but it's |
|---|
| 198 | * something that needs to be done anyway. |
|---|
| 199 | * |
|---|
| 200 | * Hydra_Software_Devel/bdvd_v2.0/6 1/23/09 10:14a rbshah |
|---|
| 201 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Checkin |
|---|
| 202 | * code drop from Anthony Le for Auto Ri,Pj feature in the |
|---|
| 203 | * 7601B0 (Digital Video PR50569). |
|---|
| 204 | * |
|---|
| 205 | * This is disabled by default and will be turned on once it has |
|---|
| 206 | * been tested and soaked. |
|---|
| 207 | * |
|---|
| 208 | * Did verify the A0 build! |
|---|
| 209 | * |
|---|
| 210 | * Hydra_Software_Devel/bdvd_v2.0/5 1/21/09 11:56a rbshah |
|---|
| 211 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Enhance |
|---|
| 212 | * Display/HDMI API to allow application to mute/unmute just |
|---|
| 213 | * audio (Digital Video PR50570). |
|---|
| 214 | * |
|---|
| 215 | * This feature is only available on the 7601B0. |
|---|
| 216 | * |
|---|
| 217 | * Hydra_Software_Devel/bdvd_v2.0/4 1/20/09 5:06p rbshah |
|---|
| 218 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Take 2: |
|---|
| 219 | * need to shift the 8-bit color component values to 12-bits. |
|---|
| 220 | * |
|---|
| 221 | * Hydra_Software_Devel/bdvd_v2.0/3 1/20/09 4:02p rbshah |
|---|
| 222 | * PR_10346 [ see HiDef-DVD bug tracking system for more info ]. Use new |
|---|
| 223 | * B0 feature to transmit black video correctly in YCC color |
|---|
| 224 | * space [Digital Video PR49652]. |
|---|
| 225 | * |
|---|
| 226 | * Hydra_Software_Devel/bdvd_v2.0/2 1/12/09 5:18p rbshah |
|---|
| 227 | * PR_12066 [ Enable pixel repetition to allow HBR audio at lower video |
|---|
| 228 | * resolutions ]. Wrap up pixel repetition support at bdvd api. Quick |
|---|
| 229 | * verification of |
|---|
| 230 | * 480p and 576p 2x, 4x and 480i 4x at all color depths. |
|---|
| 231 | * |
|---|
| 232 | * Hydra_Software_Devel/bdvd_v2.0/1 1/9/09 5:57p rbshah |
|---|
| 233 | * PR_12066 [ Enable pixel repetition to allow HBR audio at lower video |
|---|
| 234 | * resolutions ]. Re-work VDC HDMI RM table and lookup. Also absorb |
|---|
| 235 | * pixel repetition |
|---|
| 236 | * support in BHDM from Anthony Le. |
|---|
| 237 | * |
|---|
| 238 | * Still work in progress. |
|---|
| 239 | * |
|---|
| 240 | * Hydra_Software_Devel/PR49277/1 1/8/09 4:30p vle |
|---|
| 241 | * PR49277: Add pixel repetition support for 480p |
|---|
| 242 | * |
|---|
| 243 | * Hydra_Software_Devel/6 12/23/08 7:27p vle |
|---|
| 244 | * PR50081: Merge to main branch. |
|---|
| 245 | * Add deep color support. |
|---|
| 246 | * |
|---|
| 247 | * Hydra_Software_Devel/PR50081/2 12/11/08 2:19p vle |
|---|
| 248 | * PR50081: Add deep color support for 7601. |
|---|
| 249 | * |
|---|
| 250 | * Hydra_Software_Devel/PR50081/1 12/8/08 5:30p vle |
|---|
| 251 | * PR50081: add deep color support. |
|---|
| 252 | * |
|---|
| 253 | * Hydra_Software_Devel/5 12/5/08 2:28p vle |
|---|
| 254 | * PR 48987: Update variable name for better description |
|---|
| 255 | * |
|---|
| 256 | * Hydra_Software_Devel/4 12/2/08 8:02p vle |
|---|
| 257 | * PR48987: Add setting to enable I2C bit bang mode. |
|---|
| 258 | * |
|---|
| 259 | * Hydra_Software_Devel/3 12/2/08 11:20a vle |
|---|
| 260 | * PR44535: Add settings to allow user to always force enable display even |
|---|
| 261 | * with the same HDMI settings. |
|---|
| 262 | * |
|---|
| 263 | * Hydra_Software_Devel/2 10/28/08 10:35p vle |
|---|
| 264 | * PR44535: Update CTS programming using Vincent latest calculated values. |
|---|
| 265 | * Merge changes from branch bdvd v2.0 |
|---|
| 266 | * |
|---|
| 267 | * Hydra_Software_Devel/1 10/9/08 4:37p vle |
|---|
| 268 | * PR44535: Merge to main Hydra dev. branch |
|---|
| 269 | * |
|---|
| 270 | * Hydra_Software_Devel/PR44535/2 9/12/08 2:54p vle |
|---|
| 271 | * PR44535: Update CTS settings. Add 1080p support. |
|---|
| 272 | * |
|---|
| 273 | * Hydra_Software_Devel/PR44535/bdvd_v2.0/1 9/5/08 4:57p rbshah |
|---|
| 274 | * PR_10374 [ Adding support for 7601 ]. Initial checkin for HDMI |
|---|
| 275 | * support. Not functional yet, but app_hdmi now |
|---|
| 276 | * compiles and runs. EDID is operational. Video support requires a few |
|---|
| 277 | * VDC tweaks that will come shortly (next day or two). |
|---|
| 278 | * |
|---|
| 279 | * Some of the BHDM changes provided by Anthony Le. |
|---|
| 280 | * |
|---|
| 281 | * Hydra_Software_Devel/PR44535/1 8/6/08 7:47p vle |
|---|
| 282 | * PR44535: Initial version |
|---|
| 283 | * |
|---|
| 284 | ***************************************************************************/ |
|---|
| 285 | |
|---|
| 286 | |
|---|
| 287 | /*= Module Overview ********************************************************* |
|---|
| 288 | <verbatim> |
|---|
| 289 | |
|---|
| 290 | Overview |
|---|
| 291 | The HDMI (High-Definition Multimedia Interface) API is a library used to |
|---|
| 292 | provide HDMI/DVI (Digital Visual Interface) functionality between Broadcom |
|---|
| 293 | cores and the connected HDMI/DVI receivers. |
|---|
| 294 | |
|---|
| 295 | The API includes support for associated HDMI functionality such as parsing |
|---|
| 296 | of the EDID (Extended Display Identification Data) contained in the HDMI/DVI |
|---|
| 297 | monitors as well as support for HDCP (High-bandwidth Data Content Protection) |
|---|
| 298 | |
|---|
| 299 | Additional support for reading CEC (Consumer Electronic Control) will also be |
|---|
| 300 | provided. |
|---|
| 301 | |
|---|
| 302 | |
|---|
| 303 | Sample Code |
|---|
| 304 | // |
|---|
| 305 | // ******************************************** |
|---|
| 306 | // Delclare / Initialize Device Handles for... |
|---|
| 307 | // ******************************************** |
|---|
| 308 | |
|---|
| 309 | BHDM_Handle MyHDMI |
|---|
| 310 | BCHP_Handle MyChip; |
|---|
| 311 | BREG_Handle MyRegister; |
|---|
| 312 | BINT_Handle MyInterupt; |
|---|
| 313 | BREG_I2C_Handle MyI2C; |
|---|
| 314 | |
|---|
| 315 | |
|---|
| 316 | // ******************************************** |
|---|
| 317 | // Video Display Handle Must be open prior to |
|---|
| 318 | // opening HDMI device |
|---|
| 319 | // ******************************************** |
|---|
| 320 | BVDC_Open(&hDisplay,...) |
|---|
| 321 | |
|---|
| 322 | // ******************************************** |
|---|
| 323 | // Get/Modify Default Settings for HDMI |
|---|
| 324 | // ******************************************** |
|---|
| 325 | BHDM_GetDefaultSettings(&BHDM_Settings) |
|---|
| 326 | |
|---|
| 327 | // ******************************************** |
|---|
| 328 | // open HDMI Device Handle |
|---|
| 329 | // ******************************************** |
|---|
| 330 | BHDM_Open(..., BHDM_Settings) |
|---|
| 331 | |
|---|
| 332 | |
|---|
| 333 | // ******************************************** |
|---|
| 334 | // Set VDC DAC Configuration |
|---|
| 335 | // See VDC Porting Interface |
|---|
| 336 | // ******************************************** |
|---|
| 337 | |
|---|
| 338 | |
|---|
| 339 | BVDC_ApplyChanges(...) |
|---|
| 340 | |
|---|
| 341 | // ******************************************** |
|---|
| 342 | // Enable the VEC output to the HDMI device |
|---|
| 343 | // ******************************************** |
|---|
| 344 | |
|---|
| 345 | BVDC_Display_SetHdmiConfiguration( |
|---|
| 346 | hDisplay, BVDC_Hdmi_0, BVDC_HdmiOutput_eHDRGB) ; |
|---|
| 347 | |
|---|
| 348 | BVDC_ApplyChanges(...) |
|---|
| 349 | |
|---|
| 350 | |
|---|
| 351 | // ******************************************** |
|---|
| 352 | // check the attached receiver for HDMI support. |
|---|
| 353 | // HDMI support is determined by the existence of |
|---|
| 354 | // the Vendor Specific Data Block (VSDB) in the EDID |
|---|
| 355 | // ******************************************** |
|---|
| 356 | |
|---|
| 357 | rc = BHDM_EDID_IsRxDeviceHdmi(hHDMI, &MyRxVSDB, &RxHasHdmiSupport) ; |
|---|
| 358 | if (rc != BERR_SUCCESS) |
|---|
| 359 | process error - return ; |
|---|
| 360 | |
|---|
| 361 | // ******************************************** |
|---|
| 362 | |
|---|
| 363 | |
|---|
| 364 | // ******************************************** |
|---|
| 365 | // get/modify current HDMI settings for display |
|---|
| 366 | // default display mode is DVI |
|---|
| 367 | // use the current video format used by the VDC |
|---|
| 368 | // GetHdmiSettings can be used if in a different |
|---|
| 369 | // area of the code |
|---|
| 370 | // ******************************************** |
|---|
| 371 | |
|---|
| 372 | BVDC_Display_GetVideoFormat(hDisplay, &MyVDCFormat) ; |
|---|
| 373 | MyHdmiSettings.eInputVideoFmt = MyVDCFormat ; |
|---|
| 374 | |
|---|
| 375 | |
|---|
| 376 | // ******************************************** |
|---|
| 377 | // Set the Pixel Clock Rate based on TBD (headend |
|---|
| 378 | // or stream) |
|---|
| 379 | // ******************************************** |
|---|
| 380 | MyHdmiSettings.eInputPixelClock = BHDM_PixelClock_eXXX ; |
|---|
| 381 | |
|---|
| 382 | |
|---|
| 383 | // ******************************************** |
|---|
| 384 | // if neccessary, set parameters for HDMI Audio |
|---|
| 385 | // ******************************************** |
|---|
| 386 | if (RxHasHdmiSupport) |
|---|
| 387 | { |
|---|
| 388 | MyHdmiSettings.eOutputFormat = BHDM_OutputFormat_eHDMIMode ; |
|---|
| 389 | MyHdmiSettings.eAudioSamplingRate = BAVC_AudioSamplingRate_eXXX ; |
|---|
| 390 | } |
|---|
| 391 | |
|---|
| 392 | |
|---|
| 393 | // ******************************************** |
|---|
| 394 | // Enable/Turn on the HDMI Output |
|---|
| 395 | // ******************************************** |
|---|
| 396 | if ((rc = BHDM_EnableDisplay(hHDMI, &MyHdmiSettings)) == BERR_SUCCESS) |
|---|
| 397 | printf("DisplayOutput Enabled") ; |
|---|
| 398 | else |
|---|
| 399 | { |
|---|
| 400 | // check Return Code for possible errors |
|---|
| 401 | printf("*** ERROR Enabling DVI/HDMI Output to the Display") ; |
|---|
| 402 | } |
|---|
| 403 | . |
|---|
| 404 | . |
|---|
| 405 | . |
|---|
| 406 | </verbatim> |
|---|
| 407 | ****************************************************************************/ |
|---|
| 408 | |
|---|
| 409 | #ifndef BHDM_H__ |
|---|
| 410 | #define BHDM_H__ |
|---|
| 411 | |
|---|
| 412 | #include "bchp.h" /* Chip Info */ |
|---|
| 413 | #include "breg_mem.h" /* Chip register access. */ |
|---|
| 414 | #include "bkni.h" /* Kernel Interface */ |
|---|
| 415 | #include "bint.h" /* Interrupt */ |
|---|
| 416 | #include "breg_i2c.h" /* I2C */ |
|---|
| 417 | #include "bavc.h" /* A/V constants */ |
|---|
| 418 | #include "bavc_hdmi.h" /* HDMI A/V constants */ |
|---|
| 419 | #include "berr_ids.h" /* Error codes */ |
|---|
| 420 | #include "bfmt.h" /* Video Formats */ |
|---|
| 421 | #include "bdbg.h" /* Debug Support */ |
|---|
| 422 | #include "bhdm_config.h" |
|---|
| 423 | |
|---|
| 424 | #ifdef __cplusplus |
|---|
| 425 | extern "C" { |
|---|
| 426 | #endif |
|---|
| 427 | |
|---|
| 428 | |
|---|
| 429 | |
|---|
| 430 | /****************************************************************************** |
|---|
| 431 | Summary: |
|---|
| 432 | HDMI Context Handle |
|---|
| 433 | *******************************************************************************/ |
|---|
| 434 | typedef struct BHDM_P_Handle *BHDM_Handle ; |
|---|
| 435 | |
|---|
| 436 | |
|---|
| 437 | /****************************************************************************** |
|---|
| 438 | Summary: |
|---|
| 439 | HDMI Basic Return Codes |
|---|
| 440 | *******************************************************************************/ |
|---|
| 441 | #define BHDM_BASE_ERRS 0 |
|---|
| 442 | |
|---|
| 443 | #define BHDM_NOT_IMPLEMENTED BERR_MAKE_CODE(BERR_HDM_ID, BHDM_BASE_ERRS + 1) |
|---|
| 444 | #define BHDM_RX_FEATURE_NOT_SUPPORTED BERR_MAKE_CODE(BERR_HDM_ID, BHDM_BASE_ERRS + 2) |
|---|
| 445 | #define BHDM_NO_RX_DEVICE BERR_MAKE_CODE(BERR_HDM_ID, BHDM_BASE_ERRS + 3) |
|---|
| 446 | #define BHDM_UNSUPPORTED_VIDEO_FORMAT BERR_MAKE_CODE(BERR_HDM_ID, BHDM_BASE_ERRS + 4) |
|---|
| 447 | #define BHDM_HARDWARE_ERROR BERR_MAKE_CODE(BERR_HDM_ID, BHDM_BASE_ERRS + 5) |
|---|
| 448 | |
|---|
| 449 | |
|---|
| 450 | #define BHDM_HDCP_ERRS 100 /* HDCP error codes */ |
|---|
| 451 | #define BHDM_EDID_ERRS 200 /* EDID error codes */ |
|---|
| 452 | #define BHDM_CEC_ERRS 300 /* CEC error codes */ |
|---|
| 453 | |
|---|
| 454 | |
|---|
| 455 | /****************************************************************************** |
|---|
| 456 | Summary: |
|---|
| 457 | HDMI Packet Size in Bytes |
|---|
| 458 | *******************************************************************************/ |
|---|
| 459 | #define BHDM_NUM_PACKET_BYTES 28 |
|---|
| 460 | |
|---|
| 461 | #define BHDM_INFOFRAME_PACKET_TYPE 0x80 |
|---|
| 462 | |
|---|
| 463 | |
|---|
| 464 | /****************************************************************************** |
|---|
| 465 | Summary: |
|---|
| 466 | Enumerated Type of different events available from the HDMI code |
|---|
| 467 | |
|---|
| 468 | Description: |
|---|
| 469 | The HDMI core supports for five sets of interrupts (HDMI, HDCP, CEC, Hot Plug, |
|---|
| 470 | and RAM). Applications can request notification of events associated with these |
|---|
| 471 | interrupts. This enumeration can be passed to the BHDM_GetEvent function |
|---|
| 472 | |
|---|
| 473 | See Also: |
|---|
| 474 | o BHDM_GetEvent |
|---|
| 475 | |
|---|
| 476 | *******************************************************************************/ |
|---|
| 477 | typedef enum |
|---|
| 478 | { |
|---|
| 479 | BHDM_EventHDMI, |
|---|
| 480 | BHDM_EventHDCP, |
|---|
| 481 | BHDM_EventHDCPRiValue, |
|---|
| 482 | BHDM_EventHDCPPjValue, |
|---|
| 483 | BHDM_EventHDCPRepeater, |
|---|
| 484 | BHDM_EventHotPlug, |
|---|
| 485 | BHDM_EventFIFO, /* debugging event */ |
|---|
| 486 | BHDM_EventRAM, /* debugging event */ |
|---|
| 487 | BHDM_EventRxSense |
|---|
| 488 | } BHDM_EventType ; |
|---|
| 489 | |
|---|
| 490 | |
|---|
| 491 | /****************************************************************************** |
|---|
| 492 | Summary: |
|---|
| 493 | Enumerated Type of the output destinations for the HDMI data. |
|---|
| 494 | This enumeration is used in the Default Settings used by BHDM_Open |
|---|
| 495 | |
|---|
| 496 | Description: |
|---|
| 497 | The HDMI core must know where to place the output DVI/HDMI data. |
|---|
| 498 | This table enumerates those types |
|---|
| 499 | |
|---|
| 500 | BHDM_OutputPort_eDVO |
|---|
| 501 | BHDM_OutputPort_eHDMI |
|---|
| 502 | |
|---|
| 503 | |
|---|
| 504 | See Also: |
|---|
| 505 | o BHDM_Open |
|---|
| 506 | |
|---|
| 507 | *******************************************************************************/ |
|---|
| 508 | typedef enum |
|---|
| 509 | { |
|---|
| 510 | BHDM_OutputPort_eDVI, |
|---|
| 511 | BHDM_OutputPort_eDVO = BHDM_OutputPort_eDVI, |
|---|
| 512 | BHDM_OutputPort_eHDMI |
|---|
| 513 | } BHDM_OutputPort ; |
|---|
| 514 | |
|---|
| 515 | |
|---|
| 516 | |
|---|
| 517 | /****************************************************************************** |
|---|
| 518 | Summary: |
|---|
| 519 | Enumerated Type of the format of the data from the HDMI Core |
|---|
| 520 | This enumeration is used in the Default Settings used by BHDM_Open |
|---|
| 521 | |
|---|
| 522 | Description: |
|---|
| 523 | The HDMI core must know which type (DVI / HDMI) of data to send to the Output |
|---|
| 524 | Port |
|---|
| 525 | |
|---|
| 526 | BHDM_OutputFormat_eDVO |
|---|
| 527 | BHDM_OutputFormat_eHDMI |
|---|
| 528 | BHDM_OutputFormat_e12BitDVOMode |
|---|
| 529 | BHDM_OutputFormat_e24BitDVOMode |
|---|
| 530 | BHDM_OutputFormat_e768pPanel |
|---|
| 531 | BHDM_OutputFormat_e1080pPanel |
|---|
| 532 | BHDM_OutputFormat_eSingleChannel1_DVOMode, |
|---|
| 533 | BHDM_OutputFormat_eSingleChannel2_DVOMOde, |
|---|
| 534 | BHDM_OutputFormat_eDualChannel1_DVOMode, |
|---|
| 535 | BHDM_OutputFormat_eDualChannel2_DVOMode |
|---|
| 536 | |
|---|
| 537 | See Also: |
|---|
| 538 | o BHDM_Open |
|---|
| 539 | |
|---|
| 540 | *******************************************************************************/ |
|---|
| 541 | typedef enum |
|---|
| 542 | { |
|---|
| 543 | BHDM_OutputFormat_eDVIMode, |
|---|
| 544 | BHDM_OutputFormat_eHDMIMode, |
|---|
| 545 | BHDM_OutputFormat_e12BitDVOMode, |
|---|
| 546 | BHDM_OutputFormat_e24BitDVOMode, |
|---|
| 547 | BHDM_OutputFormat_e768pPanel |
|---|
| 548 | } BHDM_OutputFormat ; |
|---|
| 549 | |
|---|
| 550 | |
|---|
| 551 | /****************************************************************************** |
|---|
| 552 | Summary: |
|---|
| 553 | Enumerated Type of the type of frames to be sent to the HDMI Rx |
|---|
| 554 | |
|---|
| 555 | Description: |
|---|
| 556 | The enumeration can be used to configure packets for sending to the HDMI Rx |
|---|
| 557 | |
|---|
| 558 | *******************************************************************************/ |
|---|
| 559 | typedef enum |
|---|
| 560 | { |
|---|
| 561 | BHDM_PACKET_eGCP_ID = 0, |
|---|
| 562 | BHDM_PACKET_eAVI_ID, |
|---|
| 563 | BHDM_PACKET_eAudioFrame_ID, |
|---|
| 564 | BHDM_PACKET_eSPD_ID, |
|---|
| 565 | BHDM_Packet_eVendorSpecific_ID, |
|---|
| 566 | BHDM_PACKET_eGamutMetadata_ID, |
|---|
| 567 | BHDM_Packet_eUser1, |
|---|
| 568 | BHDM_Packet_eUser2, |
|---|
| 569 | BHDM_Packet_eUser3, |
|---|
| 570 | BHDM_Packet_eUser4, |
|---|
| 571 | BHDM_Packet_eUser5, |
|---|
| 572 | BHDM_Packet_eUser6, |
|---|
| 573 | BHDM_Packet_eUser7, |
|---|
| 574 | BHDM_Packet_eUser8 |
|---|
| 575 | } BHDM_Packet ; |
|---|
| 576 | |
|---|
| 577 | |
|---|
| 578 | /* Moved BHDM_AVI_Packet_XXXX enumerations to |
|---|
| 579 | magnum/commonutils/bavc/bavc_hdmi.h */ |
|---|
| 580 | |
|---|
| 581 | /****************************************************************************** |
|---|
| 582 | Summary: |
|---|
| 583 | Enumerated Type to describe changes to the Audio or Video Rates input to |
|---|
| 584 | the HDMI core |
|---|
| 585 | |
|---|
| 586 | Description: |
|---|
| 587 | The enumeration can be used to set up callbacks to the HDMI |
|---|
| 588 | |
|---|
| 589 | |
|---|
| 590 | See Also: |
|---|
| 591 | *******************************************************************************/ |
|---|
| 592 | typedef enum |
|---|
| 593 | { |
|---|
| 594 | BHDM_Callback_Type_eUnknown = 0, |
|---|
| 595 | BHDM_Callback_Type_eAudioChange, |
|---|
| 596 | BHDM_Callback_Type_eVideoChange, |
|---|
| 597 | BHDM_Callback_Type_eManualAudioChange |
|---|
| 598 | } BHDM_Callback_Type ; |
|---|
| 599 | |
|---|
| 600 | |
|---|
| 601 | |
|---|
| 602 | /****************************************************************************** |
|---|
| 603 | Summary: |
|---|
| 604 | Enumerated Type for Pre-Emphasis Control |
|---|
| 605 | |
|---|
| 606 | Description: |
|---|
| 607 | The enumeration can be used to set up values for Pre-Emphasis Control |
|---|
| 608 | |
|---|
| 609 | |
|---|
| 610 | See Also: |
|---|
| 611 | o BHDM_EnablePreEmphasis |
|---|
| 612 | *******************************************************************************/ |
|---|
| 613 | typedef enum |
|---|
| 614 | { |
|---|
| 615 | BHDM_PreEmphasis_eOFF = 0, |
|---|
| 616 | BHDM_PreEmphasis_eDeepColorMode = 4, |
|---|
| 617 | BHDM_PreEmphasis_eLOW = 5, |
|---|
| 618 | BHDM_PreEmphasis_eMED = 10, |
|---|
| 619 | BHDM_PreEmphasis_eMAX = 15 |
|---|
| 620 | } BHDM_PreEmphasisSetting ; |
|---|
| 621 | |
|---|
| 622 | |
|---|
| 623 | /****************************************************************************** |
|---|
| 624 | Summary: |
|---|
| 625 | Pre-emphasic configurations settings |
|---|
| 626 | |
|---|
| 627 | Description: |
|---|
| 628 | This structure can be used to set up values for Pre-Emphasis Control |
|---|
| 629 | |
|---|
| 630 | |
|---|
| 631 | See Also: |
|---|
| 632 | o BHDM_GetPreEmphasisConfiguration |
|---|
| 633 | o BHDM_SetPreEmphasisConfiguration |
|---|
| 634 | *******************************************************************************/ |
|---|
| 635 | typedef struct _BHDM_PREEMPHASIS_CONFIGURATION_ |
|---|
| 636 | { |
|---|
| 637 | uint16_t uiPreEmphasis_CK; |
|---|
| 638 | uint16_t uiPreEmphasis_Ch0; |
|---|
| 639 | uint16_t uiPreEmphasis_Ch1; |
|---|
| 640 | uint16_t uiPreEmphasis_Ch2; |
|---|
| 641 | |
|---|
| 642 | /* The following fields only applicable to 65nm platforms. */ |
|---|
| 643 | uint8_t uiDriverAmp; |
|---|
| 644 | uint8_t uiRefCntl; |
|---|
| 645 | uint8_t uiTermR; |
|---|
| 646 | |
|---|
| 647 | /* The following fields only applicable to 40nm platforms */ |
|---|
| 648 | uint8_t uiHfEn; |
|---|
| 649 | uint16_t uiCurrentRatioSel; |
|---|
| 650 | uint8_t uiKP; |
|---|
| 651 | uint8_t uiKI; |
|---|
| 652 | uint8_t uiKA; |
|---|
| 653 | } BHDM_PreEmphasis_Configuration; |
|---|
| 654 | |
|---|
| 655 | |
|---|
| 656 | /****************************************************************************** |
|---|
| 657 | Summary: |
|---|
| 658 | Enumerated Type for Source Product Description Frame |
|---|
| 659 | |
|---|
| 660 | Description: |
|---|
| 661 | The enumeration can be used to set up values for he HDMI Source Product |
|---|
| 662 | Description Frame |
|---|
| 663 | |
|---|
| 664 | |
|---|
| 665 | See Also: |
|---|
| 666 | o BHDM_SetSPDInfoFramePacket |
|---|
| 667 | *******************************************************************************/ |
|---|
| 668 | typedef enum |
|---|
| 669 | { |
|---|
| 670 | BHDM_SPD_SourceDevice_eUnknown, |
|---|
| 671 | BHDM_SPD_SourceDevice_eDigitalSTB, |
|---|
| 672 | BHDM_SPD_SourceDevice_eDVD, |
|---|
| 673 | BHDM_SPD_SourceDevice_eDVHS, |
|---|
| 674 | BHDM_SPD_SourceDevice_eHDDVideo, |
|---|
| 675 | BHDM_SPD_SourceDevice_eDVC, |
|---|
| 676 | BHDM_SPD_SourceDevice_eDSC, |
|---|
| 677 | BHDM_SPD_SourceDevice_eVideoCD, |
|---|
| 678 | BHDM_SPD_SourceDevice_eGame, |
|---|
| 679 | BHDM_SPD_SourceDevice_ePC, |
|---|
| 680 | BHDM_SPD_SourceDevice_eBD, |
|---|
| 681 | BHDM_SPD_SourceDevice_eSuperAudioCD |
|---|
| 682 | } BHDM_SPD_SourceDevice ; |
|---|
| 683 | |
|---|
| 684 | |
|---|
| 685 | |
|---|
| 686 | /****************************************************************************** |
|---|
| 687 | Summary: |
|---|
| 688 | Enumerated Type for HDMI Audio Channels |
|---|
| 689 | |
|---|
| 690 | Description: |
|---|
| 691 | The enumeration can be used to set up the Audio Channels used in the Audio Infoframe Packets |
|---|
| 692 | and MAI bus. |
|---|
| 693 | |
|---|
| 694 | |
|---|
| 695 | See Also: |
|---|
| 696 | *******************************************************************************/ |
|---|
| 697 | typedef enum |
|---|
| 698 | { |
|---|
| 699 | |
|---|
| 700 | /* BHDM_ChannelAllocation_e_Front_Rear_Subwoofer */ |
|---|
| 701 | /* See CEA-861-x Audio Info frame */ |
|---|
| 702 | BHDM_ChannelAllocation_e_xx__xx__xx__xx__xx___xx_FR__FL =0, |
|---|
| 703 | BHDM_ChannelAllocation_eStereo = 0, |
|---|
| 704 | BHDM_ChannelAllocation_e2_0_0 = 0, |
|---|
| 705 | |
|---|
| 706 | BHDM_ChannelAllocation_e_xx__xx__xx__xx__xx__LFE_FR__FL = 1, |
|---|
| 707 | BHDM_ChannelAllocation_e2_0_1 = 1, |
|---|
| 708 | |
|---|
| 709 | BHDM_ChannelAllocation_e_xx__xx__xx__xx__FC___xx_FR__FL = 2, |
|---|
| 710 | BHDM_ChannelAllocation_e3_0_0 = 2, |
|---|
| 711 | |
|---|
| 712 | BHDM_ChannelAllocation_e_xx__xx__xx__xx__FC__LFE_FR__FL = 3, |
|---|
| 713 | BHDM_ChannelAllocation_e3_0_1 = 3, |
|---|
| 714 | |
|---|
| 715 | BHDM_ChannelAllocation_e_xx__xx__xx__RC__xx___xx_FR__FL = 4, |
|---|
| 716 | BHDM_ChannelAllocation_e2_1_0 = 4, |
|---|
| 717 | |
|---|
| 718 | BHDM_ChannelAllocation_e_xx__xx__xx__RC__xx__LFE_FR__FL = 5, |
|---|
| 719 | BHDM_ChannelAllocation_e2_1_1 = 5, |
|---|
| 720 | |
|---|
| 721 | BHDM_ChannelAllocation_e_xx__xx__xx__RC__FC___xx_FR__FL = 6, |
|---|
| 722 | BHDM_ChannelAllocation_e3_1_0 = 6, |
|---|
| 723 | |
|---|
| 724 | BHDM_ChannelAllocation_e_xx__xx__xx__RC__FC__LFE_FR__FL = 7, |
|---|
| 725 | BHDM_ChannelAllocation_e3_1_1 = 7, |
|---|
| 726 | |
|---|
| 727 | BHDM_ChannelAllocation_e_xx__xx__RR__RL__xx___xx_FR__FL = 8, |
|---|
| 728 | BHDM_ChannelAllocation_e2_2_0 = 8, |
|---|
| 729 | |
|---|
| 730 | BHDM_ChannelAllocation_e_xx__xx__RR__RL__xx__LFE_FR__FL = 9, |
|---|
| 731 | BHDM_ChannelAllocation_e2_2_1 = 9, |
|---|
| 732 | |
|---|
| 733 | BHDM_ChannelAllocation_e_xx__xx__RR__RL__FC___xx_FR__FL = 10, |
|---|
| 734 | BHDM_ChannelAllocation_e3_2_0 = 10, |
|---|
| 735 | |
|---|
| 736 | BHDM_ChannelAllocation_e_xx__xx__RR__RL__FC__LFE_FR__FL = 11, |
|---|
| 737 | BHDM_ChannelAllocation_e5_1 = 11, /* 5.1 */ |
|---|
| 738 | BHDM_ChannelAllocation_e3_2_1 = 11, |
|---|
| 739 | |
|---|
| 740 | BHDM_ChannelAllocation_e_xx__RC__RR__RL__xx___xx_FR__FL = 12, |
|---|
| 741 | BHDM_ChannelAllocation_e2_3_0 = 12, |
|---|
| 742 | |
|---|
| 743 | BHDM_ChannelAllocation_e_xx__RC__RR__RL__xx__LFE_FR__FL = 13, |
|---|
| 744 | BHDM_ChannelAllocation_e2_3_1 = 13, |
|---|
| 745 | |
|---|
| 746 | BHDM_ChannelAllocation_e_xx__RC__RR__RL__FC___xx_FR__FL = 14, |
|---|
| 747 | BHDM_ChannelAllocation_e3_3_0 = 14, |
|---|
| 748 | |
|---|
| 749 | BHDM_ChannelAllocation_e_xx__RC__RR__RL__FC__LFE_FR__FL = 15, |
|---|
| 750 | BHDM_ChannelAllocation_e3_3_1 = 15, |
|---|
| 751 | |
|---|
| 752 | BHDM_ChannelAllocation_e_RRC_RLC__RR__RL__xx__xx_FR__FL = 16, |
|---|
| 753 | BHDM_ChannelAllocation_e2_4_0 = 16, |
|---|
| 754 | |
|---|
| 755 | BHDM_ChannelAllocation_e_RRC_RLC__RR__RL__xx_LFE_FR__FL = 17, |
|---|
| 756 | BHDM_ChannelAllocation_e2_4_1 = 17, |
|---|
| 757 | |
|---|
| 758 | BHDM_ChannelAllocation_e_RRC_RLC__RR__RL__FC__xx_FR__FL = 18, |
|---|
| 759 | BHDM_ChannelAllocation_e3_4_0 = 18, |
|---|
| 760 | |
|---|
| 761 | BHDM_ChannelAllocation_e_RRC_RLC__RR__RL__FC_LFE_FR__FL = 19, |
|---|
| 762 | BHDM_ChannelAllocation_e3_4_1 = 19, |
|---|
| 763 | |
|---|
| 764 | BHDM_ChannelAllocation_e_FRC_FLC__xx__xx__xx__xx_FR__FL = 20, |
|---|
| 765 | BHDM_ChannelAllocation_e4_0_0 = 20, |
|---|
| 766 | |
|---|
| 767 | BHDM_ChannelAllocation_e_FRC_FLC__xx__xx__xx_LFE_FR__FL = 21, |
|---|
| 768 | BHDM_ChannelAllocation_e4_0_1 = 21, |
|---|
| 769 | |
|---|
| 770 | BHDM_ChannelAllocation_e_FRC_FLC__xx__xx__FC__xx_FR__FL = 22, |
|---|
| 771 | BHDM_ChannelAllocation_e5_0_0 = 22, |
|---|
| 772 | |
|---|
| 773 | BHDM_ChannelAllocation_e_FRC_FLC__xx__xx__FC_LFE_FR__FL = 23, |
|---|
| 774 | BHDM_ChannelAllocation_e5_0_1 = 23, |
|---|
| 775 | |
|---|
| 776 | BHDM_ChannelAllocation_e_FRC_FLC__xx__RC__xx__xx_FR__FL = 24, |
|---|
| 777 | BHDM_ChannelAllocation_e4_1_0 = 24, |
|---|
| 778 | |
|---|
| 779 | BHDM_ChannelAllocation_e_FRC_FLC__xx__RC__xx_LFE_FR__FL = 25, |
|---|
| 780 | BHDM_ChannelAllocation_e4_1_1 = 25, |
|---|
| 781 | |
|---|
| 782 | BHDM_ChannelAllocation_e_FRC_FLC__xx__RC__FC__xx_FR__FL = 26, |
|---|
| 783 | BHDM_ChannelAllocation_e5_1_0 = 26, |
|---|
| 784 | |
|---|
| 785 | BHDM_ChannelAllocation_e_FRC_FLC__xx__RC__FC_LFE_FR__FL = 27, |
|---|
| 786 | BHDM_ChannelAllocation_e5_1_1 = 27, |
|---|
| 787 | |
|---|
| 788 | BHDM_ChannelAllocation_e_FRC_FLC__RR__RL__xx__xx_FR__FL = 28, |
|---|
| 789 | BHDM_ChannelAllocation_e4_2_0 = 28, |
|---|
| 790 | |
|---|
| 791 | BHDM_ChannelAllocation_e_FRC_FLC__RR__RL__xx_LFE_FR__FL = 29, |
|---|
| 792 | BHDM_ChannelAllocation_e4_2_1 = 29, |
|---|
| 793 | |
|---|
| 794 | BHDM_ChannelAllocation_e_FRC_FLC__RR__RL__FC__xx_FR__FL = 30, |
|---|
| 795 | BHDM_ChannelAllocation_e5_2_0 = 30, |
|---|
| 796 | |
|---|
| 797 | BHDM_ChannelAllocation_e_FRC_FLC__RR__RL__FC_LFE_FR__FL = 31, |
|---|
| 798 | BHDM_ChannelAllocation_e5_2_1 = 31 |
|---|
| 799 | |
|---|
| 800 | } BHDM_AudioChannel ; |
|---|
| 801 | |
|---|
| 802 | #if BHDM_CONFIG_HDMI_1_3_SUPPORT |
|---|
| 803 | /*************************************************************************** |
|---|
| 804 | Summary: |
|---|
| 805 | HDMI settings used for setting HDMI color mode (standard and deep color modes) |
|---|
| 806 | |
|---|
| 807 | See Also |
|---|
| 808 | o BHDM_SetBitsPerPixel |
|---|
| 809 | ****************************************************************************/ |
|---|
| 810 | typedef struct _BHDM_ColorDepth_Settings |
|---|
| 811 | { |
|---|
| 812 | BAVC_HDMI_BitsPerPixel eBitsPerPixel; |
|---|
| 813 | } BHDM_ColorDepth_Settings; |
|---|
| 814 | #endif |
|---|
| 815 | |
|---|
| 816 | |
|---|
| 817 | /* Moved AVI info typedef to magnum/commonutils/bavc/bavc_hdmi.h */ |
|---|
| 818 | |
|---|
| 819 | |
|---|
| 820 | /*************************************************************************** |
|---|
| 821 | Summary: |
|---|
| 822 | Prototype for external modules to install callback with HDMI to notify of changes |
|---|
| 823 | |
|---|
| 824 | Description: |
|---|
| 825 | |
|---|
| 826 | Input: |
|---|
| 827 | pvParam1 - User defined data structure casted to void. |
|---|
| 828 | iParam2 - Additional user defined value. |
|---|
| 829 | pvData - Data to pass from HDMI to application thru callback. |
|---|
| 830 | |
|---|
| 831 | Output: |
|---|
| 832 | None |
|---|
| 833 | |
|---|
| 834 | See Also: |
|---|
| 835 | None |
|---|
| 836 | **************************************************************************/ |
|---|
| 837 | typedef void (*BHDM_CallbackFunc) |
|---|
| 838 | ( void *pvParam1, |
|---|
| 839 | int iParam2, |
|---|
| 840 | void *pvData ); |
|---|
| 841 | |
|---|
| 842 | |
|---|
| 843 | /*************************************************************************** |
|---|
| 844 | Summary: |
|---|
| 845 | HDMI settings used for BHDM_Open(). |
|---|
| 846 | |
|---|
| 847 | See Also |
|---|
| 848 | o BHDM_GetDefaultSettings |
|---|
| 849 | ****************************************************************************/ |
|---|
| 850 | typedef struct _BHDM_Settings_ |
|---|
| 851 | { |
|---|
| 852 | |
|---|
| 853 | /* |
|---|
| 854 | --NOTE: modifications to this BHDM_Settings structure must be |
|---|
| 855 | -- accounted for in the BHDM_P_HdmiSettingsChange function |
|---|
| 856 | */ |
|---|
| 857 | BFMT_VideoFmt eInputVideoFmt ; |
|---|
| 858 | |
|---|
| 859 | BAVC_Timebase eTimebase ; |
|---|
| 860 | |
|---|
| 861 | BHDM_OutputPort eOutputPort ; |
|---|
| 862 | BHDM_OutputFormat eOutputFormat ; |
|---|
| 863 | |
|---|
| 864 | BAVC_MatrixCoefficients eColorimetry ; |
|---|
| 865 | BFMT_AspectRatio eAspectRatio ; |
|---|
| 866 | BAVC_HDMI_PixelRepetition ePixelRepetition ; |
|---|
| 867 | |
|---|
| 868 | #if BHDM_CONFIG_HDMI_1_3_SUPPORT |
|---|
| 869 | BHDM_ColorDepth_Settings stColorDepth; |
|---|
| 870 | #endif |
|---|
| 871 | |
|---|
| 872 | /**** AVI Info Frame Structure ****/ |
|---|
| 873 | BAVC_HDMI_AviInfoFrame stAviInfoFrame ; |
|---|
| 874 | /**********************************/ |
|---|
| 875 | |
|---|
| 876 | /**** Audio Info Frame Structure ****/ |
|---|
| 877 | BAVC_HDMI_AudioInfoFrame stAudioInfoFrame ; |
|---|
| 878 | /**********************************/ |
|---|
| 879 | BAVC_AudioSamplingRate eAudioSamplingRate ; |
|---|
| 880 | BAVC_AudioFormat eAudioFormat ; |
|---|
| 881 | BAVC_AudioBits eAudioBits ; |
|---|
| 882 | |
|---|
| 883 | BHDM_SPD_SourceDevice eSpdSourceDevice ; |
|---|
| 884 | uint8_t SpdVendorName[BAVC_HDMI_SPD_IF_VENDOR_LEN+1] ; |
|---|
| 885 | uint8_t SpdDescription[BAVC_HDMI_SPD_IF_DESC_LEN+1] ; |
|---|
| 886 | |
|---|
| 887 | /**** Vendor Specific Info Frame Structure ****/ |
|---|
| 888 | BAVC_HDMI_VendorSpecificInfoFrame stVendorSpecificInfoFrame ; |
|---|
| 889 | /**********************************/ |
|---|
| 890 | |
|---|
| 891 | /* Currently this parameter is not being used */ |
|---|
| 892 | bool CalculateCts ; |
|---|
| 893 | |
|---|
| 894 | uint8_t uiDriverAmpDefault; |
|---|
| 895 | |
|---|
| 896 | bool AltDvoPath ; |
|---|
| 897 | |
|---|
| 898 | bool BypassEDIDChecking ; /* debug tool */ |
|---|
| 899 | bool bFifoMasterMode; /* Set true to enable master mode */ |
|---|
| 900 | |
|---|
| 901 | bool bForceEnableDisplay; /* Set to true to always enable display even when |
|---|
| 902 | using the same HDMI settings */ |
|---|
| 903 | bool bEnableAutoRiPjChecking; /* Set to true to enable auto Ri, Pj checking handle by HW */ |
|---|
| 904 | |
|---|
| 905 | } BHDM_Settings; |
|---|
| 906 | |
|---|
| 907 | |
|---|
| 908 | /****************************************************************************** |
|---|
| 909 | Summary: |
|---|
| 910 | Get the default settings for the HDMI device. |
|---|
| 911 | |
|---|
| 912 | Input: |
|---|
| 913 | <None> |
|---|
| 914 | |
|---|
| 915 | Output: |
|---|
| 916 | pBHDM_Settings - pointer to memory to hold default settings |
|---|
| 917 | |
|---|
| 918 | Returns: |
|---|
| 919 | BERR_SUCCESS - Successfully opened HDMI connection. |
|---|
| 920 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 921 | |
|---|
| 922 | See Also: |
|---|
| 923 | |
|---|
| 924 | *******************************************************************************/ |
|---|
| 925 | BERR_Code BHDM_GetDefaultSettings( |
|---|
| 926 | BHDM_Settings *pBHDM_DefaultSettings /* [out] pointer to memory to hold default settings */ |
|---|
| 927 | ) ; |
|---|
| 928 | |
|---|
| 929 | |
|---|
| 930 | |
|---|
| 931 | /****************************************************************************** |
|---|
| 932 | Summary: |
|---|
| 933 | Open a HDMI connection to a HDMI Rx. |
|---|
| 934 | |
|---|
| 935 | Input: |
|---|
| 936 | hChip - The chip handle that application created ealier during chip |
|---|
| 937 | initialization sequence. This handle is use for get chip |
|---|
| 938 | information, chip revision, and miscellaneous chip configurations. |
|---|
| 939 | |
|---|
| 940 | hRegister - The register handle that application created earlier during |
|---|
| 941 | the chip initialization sequence. This handle is use to access chip |
|---|
| 942 | registers (HDMI registers). |
|---|
| 943 | |
|---|
| 944 | hInterrupt - The interrupt handle that the application created earler during the |
|---|
| 945 | initialization sequence. This handle is used to process interrupts. |
|---|
| 946 | |
|---|
| 947 | hI2cRegHandle - The I2C handle that the application created earler during the |
|---|
| 948 | initialization sequence. This handle is used to access the HDMI Rx. |
|---|
| 949 | |
|---|
| 950 | pBHDM_Settings - The default settings for configuring the HDMI connection. This |
|---|
| 951 | sturcture can be queried prior to BHDM_Open with BHDM_GetDefaultSettings. |
|---|
| 952 | This parameter can be NULL. In this case the default setting will be used. |
|---|
| 953 | |
|---|
| 954 | Output: |
|---|
| 955 | phHDMI - pointer to previously allocated HDMI structure |
|---|
| 956 | |
|---|
| 957 | Returns: |
|---|
| 958 | BERR_SUCCESS - Successfully opened HDMI connection. |
|---|
| 959 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 960 | |
|---|
| 961 | See Also: |
|---|
| 962 | BHDM_Handle |
|---|
| 963 | BREG_Handle |
|---|
| 964 | BI2C_ChannelHandle |
|---|
| 965 | |
|---|
| 966 | *******************************************************************************/ |
|---|
| 967 | BERR_Code BHDM_Open( |
|---|
| 968 | BHDM_Handle *phHDMI, /* [out] HDMI handle */ |
|---|
| 969 | BCHP_Handle hChip, /* [in] Chip handle */ |
|---|
| 970 | BREG_Handle hRegister, /* [in] Register Interface to HDMI Tx Core */ |
|---|
| 971 | BINT_Handle hInterrupt, /* [in] Interrupt handle */ |
|---|
| 972 | BREG_I2C_Handle hI2cRegHandle, /* [in] I2C Interface to HDMI Rx */ |
|---|
| 973 | const BHDM_Settings *pBHDM_Settings /* [in] default HDMI settings */ |
|---|
| 974 | ) ; |
|---|
| 975 | |
|---|
| 976 | |
|---|
| 977 | |
|---|
| 978 | /****************************************************************************** |
|---|
| 979 | Summary: |
|---|
| 980 | Close the HDMI connection to the HDMI Rx. |
|---|
| 981 | |
|---|
| 982 | Description: |
|---|
| 983 | This function will close the HDMI connection to the HDMI Rx. A new HDMI |
|---|
| 984 | connection will have to be opened to display to the HDMI Rx again. |
|---|
| 985 | |
|---|
| 986 | Input: |
|---|
| 987 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 988 | |
|---|
| 989 | Output: |
|---|
| 990 | <None> |
|---|
| 991 | |
|---|
| 992 | Returns: |
|---|
| 993 | BERR_SUCCESS - Successfully closed the HDMI connection. |
|---|
| 994 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 995 | |
|---|
| 996 | See Also: |
|---|
| 997 | BHDM_Handle |
|---|
| 998 | *******************************************************************************/ |
|---|
| 999 | BERR_Code BHDM_Close( |
|---|
| 1000 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1001 | ) ; |
|---|
| 1002 | |
|---|
| 1003 | |
|---|
| 1004 | |
|---|
| 1005 | /****************************************************************************** |
|---|
| 1006 | Summary: |
|---|
| 1007 | Clear the Hot Plug Interrupt for the next event. |
|---|
| 1008 | |
|---|
| 1009 | Input: |
|---|
| 1010 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1011 | |
|---|
| 1012 | Output: |
|---|
| 1013 | <None> |
|---|
| 1014 | |
|---|
| 1015 | Returns: |
|---|
| 1016 | BERR_SUCCESS - Successfully reset the HotPlug interrupt. |
|---|
| 1017 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1018 | |
|---|
| 1019 | See Also: |
|---|
| 1020 | BHDM_Handle |
|---|
| 1021 | |
|---|
| 1022 | *******************************************************************************/ |
|---|
| 1023 | BERR_Code BHDM_ClearHotPlugInterrupt( |
|---|
| 1024 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1025 | ) ; |
|---|
| 1026 | |
|---|
| 1027 | |
|---|
| 1028 | /****************************************************************************** |
|---|
| 1029 | Summary: |
|---|
| 1030 | Check the Hot Plug Interrupt to see if there was a change (since last Clear). |
|---|
| 1031 | |
|---|
| 1032 | Input: |
|---|
| 1033 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1034 | |
|---|
| 1035 | Output: |
|---|
| 1036 | <None> |
|---|
| 1037 | |
|---|
| 1038 | Returns: |
|---|
| 1039 | BERR_SUCCESS - Successfully checked the HotPlug interrupt. |
|---|
| 1040 | |
|---|
| 1041 | See Also: |
|---|
| 1042 | BHDM_Handle |
|---|
| 1043 | |
|---|
| 1044 | *******************************************************************************/ |
|---|
| 1045 | BERR_Code BHDM_CheckHotPlugInterrupt( |
|---|
| 1046 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1047 | uint8_t *bHotPlugInterrupt /* [out] HPD changed or not */ |
|---|
| 1048 | ) ; |
|---|
| 1049 | |
|---|
| 1050 | |
|---|
| 1051 | /****************************************************************************** |
|---|
| 1052 | Summary: |
|---|
| 1053 | Check for an attached Rx Device. |
|---|
| 1054 | |
|---|
| 1055 | Description: |
|---|
| 1056 | Check if a receiver is attached to the HDMI transmitter |
|---|
| 1057 | |
|---|
| 1058 | |
|---|
| 1059 | Input: |
|---|
| 1060 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1061 | |
|---|
| 1062 | Output: |
|---|
| 1063 | DeviceAttached - flag indicating if a receiver device is attached or not |
|---|
| 1064 | |
|---|
| 1065 | Returns: |
|---|
| 1066 | BERR_SUCCESS - Rx Device is Attached. |
|---|
| 1067 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1068 | BHDM_NO_RX_DEVICE - No HDMI/DVI Rx Device is Attached. |
|---|
| 1069 | |
|---|
| 1070 | See Also: |
|---|
| 1071 | BHDM_Handle |
|---|
| 1072 | |
|---|
| 1073 | *******************************************************************************/ |
|---|
| 1074 | BERR_Code BHDM_RxDeviceAttached( |
|---|
| 1075 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1076 | uint8_t *RxDeviceAttached |
|---|
| 1077 | ) ; |
|---|
| 1078 | |
|---|
| 1079 | |
|---|
| 1080 | |
|---|
| 1081 | /****************************************************************************** |
|---|
| 1082 | Summary: |
|---|
| 1083 | Reset HDMI/DVI Rx device (for non-compliant receivers) |
|---|
| 1084 | |
|---|
| 1085 | Description: |
|---|
| 1086 | Some Silicon Image Receivers do not properly reset. The HDCP Specification |
|---|
| 1087 | calls for a reset of the DVI Rx when the HDCP Bksv value is written to the |
|---|
| 1088 | Rx. The SI Rxs require the TMDS output be disabled for 100 ms. This causes |
|---|
| 1089 | a temporary blanking of the screen; therefore this function should only be |
|---|
| 1090 | used when initial HDCP Authentication fails. |
|---|
| 1091 | |
|---|
| 1092 | Input: |
|---|
| 1093 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1094 | |
|---|
| 1095 | Output: |
|---|
| 1096 | <None> |
|---|
| 1097 | |
|---|
| 1098 | Returns: |
|---|
| 1099 | BERR_SUCCESS - Commands successfully initiated to Reset Rx Device. |
|---|
| 1100 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1101 | |
|---|
| 1102 | See Also: |
|---|
| 1103 | BHDM_Handle |
|---|
| 1104 | |
|---|
| 1105 | *******************************************************************************/ |
|---|
| 1106 | BERR_Code BHDM_ResetHdmiRx( |
|---|
| 1107 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1108 | ) ; |
|---|
| 1109 | |
|---|
| 1110 | |
|---|
| 1111 | |
|---|
| 1112 | /****************************************************************************** |
|---|
| 1113 | Summary: |
|---|
| 1114 | Enable (Display) TMDS Output |
|---|
| 1115 | |
|---|
| 1116 | Input: |
|---|
| 1117 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1118 | bEnableTmdsOutput - True=Enable TMDS False=Disable TMDS |
|---|
| 1119 | |
|---|
| 1120 | |
|---|
| 1121 | Output: |
|---|
| 1122 | <None> |
|---|
| 1123 | |
|---|
| 1124 | Returns: |
|---|
| 1125 | BERR_SUCCESS - TMDS Output Enabled. |
|---|
| 1126 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1127 | |
|---|
| 1128 | See Also: |
|---|
| 1129 | BHDM_Handle |
|---|
| 1130 | |
|---|
| 1131 | *******************************************************************************/ |
|---|
| 1132 | BERR_Code BHDM_EnableTmdsOutput( |
|---|
| 1133 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1134 | bool bEnableTmdsOutput /* [in] boolean to enable/disable */ |
|---|
| 1135 | ) ; |
|---|
| 1136 | |
|---|
| 1137 | |
|---|
| 1138 | |
|---|
| 1139 | |
|---|
| 1140 | /****************************************************************************** |
|---|
| 1141 | Summary: |
|---|
| 1142 | Set the AvMute (True/False) functionality for HDMI. |
|---|
| 1143 | |
|---|
| 1144 | Description: |
|---|
| 1145 | The AvMute (TRUE) signals to the HDMI Receiver that the current audio and |
|---|
| 1146 | video data can be considered invalid. The HDMI Receiver can use this to |
|---|
| 1147 | blank the display and mute the audio to minimize problems for the end user. |
|---|
| 1148 | |
|---|
| 1149 | AvMute (FALSE) signals the HDMI Receiver that it can begin processing audio |
|---|
| 1150 | and video data valid. |
|---|
| 1151 | |
|---|
| 1152 | This function is useful to notify the Receiver of changes in the TMDS clock |
|---|
| 1153 | frequency (i.e. channel change, format change etc.) |
|---|
| 1154 | |
|---|
| 1155 | |
|---|
| 1156 | Input: |
|---|
| 1157 | hHDMI - The HDMI device handle that the application created earlier |
|---|
| 1158 | during the system initialization sequence. |
|---|
| 1159 | |
|---|
| 1160 | bEnableAvMute - Disable/Enable handling audio/video data. |
|---|
| 1161 | |
|---|
| 1162 | Output: |
|---|
| 1163 | <none> |
|---|
| 1164 | |
|---|
| 1165 | Returns: |
|---|
| 1166 | BERR_SUCCESS - AVMute was enabled/disabled |
|---|
| 1167 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1168 | |
|---|
| 1169 | Note: |
|---|
| 1170 | Both the audio and video our muted at the receiver. They are not mutually |
|---|
| 1171 | exclusive. |
|---|
| 1172 | |
|---|
| 1173 | See Also: |
|---|
| 1174 | o BHDM_Handle |
|---|
| 1175 | o BHDM_Open |
|---|
| 1176 | |
|---|
| 1177 | *******************************************************************************/ |
|---|
| 1178 | BERR_Code BHDM_SetAvMute( |
|---|
| 1179 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1180 | bool bEnableAvMute /* [in] boolean to enable/disable */ |
|---|
| 1181 | ) ; |
|---|
| 1182 | |
|---|
| 1183 | |
|---|
| 1184 | /****************************************************************************** |
|---|
| 1185 | Summary: |
|---|
| 1186 | Mute/Unmute Audio on the HDMI interface. |
|---|
| 1187 | |
|---|
| 1188 | Description: |
|---|
| 1189 | This function may be used to mute just the audio on HDMI. This is |
|---|
| 1190 | independent of the AvMute functionality (done via GCP). It may |
|---|
| 1191 | be used in conjunction with BHDM_SetPixelDataOverride to implement |
|---|
| 1192 | an A/V mute that does not depend on the receiver's handling of the |
|---|
| 1193 | AV_MUTE flag in the GCP. |
|---|
| 1194 | |
|---|
| 1195 | |
|---|
| 1196 | Input: |
|---|
| 1197 | hHDMI - The HDMI device handle that the application created earlier |
|---|
| 1198 | during the system initialization sequence. |
|---|
| 1199 | |
|---|
| 1200 | bEnableAudioMute - Disable/Enable handling audio data. |
|---|
| 1201 | |
|---|
| 1202 | Output: |
|---|
| 1203 | <none> |
|---|
| 1204 | |
|---|
| 1205 | Returns: |
|---|
| 1206 | BERR_SUCCESS - AVMute was enabled/disabled |
|---|
| 1207 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1208 | |
|---|
| 1209 | Note: |
|---|
| 1210 | None |
|---|
| 1211 | |
|---|
| 1212 | See Also: |
|---|
| 1213 | o BHDM_Handle |
|---|
| 1214 | o BHDM_Open |
|---|
| 1215 | |
|---|
| 1216 | *******************************************************************************/ |
|---|
| 1217 | BERR_Code BHDM_SetAudioMute( |
|---|
| 1218 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1219 | bool bEnableAudioMute /* [in] boolean to enable/disable */ |
|---|
| 1220 | ) ; |
|---|
| 1221 | |
|---|
| 1222 | |
|---|
| 1223 | |
|---|
| 1224 | /****************************************************************************** |
|---|
| 1225 | Summary: |
|---|
| 1226 | Initialize the Drift FIFO |
|---|
| 1227 | |
|---|
| 1228 | Input: |
|---|
| 1229 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1230 | |
|---|
| 1231 | Output: |
|---|
| 1232 | <None> |
|---|
| 1233 | |
|---|
| 1234 | Returns: |
|---|
| 1235 | BERR_SUCCESS - |
|---|
| 1236 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1237 | |
|---|
| 1238 | See Also: |
|---|
| 1239 | BHDM_Handle |
|---|
| 1240 | |
|---|
| 1241 | *******************************************************************************/ |
|---|
| 1242 | BERR_Code BHDM_InitializeDriftFIFO( |
|---|
| 1243 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1244 | ) ; |
|---|
| 1245 | |
|---|
| 1246 | |
|---|
| 1247 | |
|---|
| 1248 | /*************************************************************************** |
|---|
| 1249 | Summary: |
|---|
| 1250 | Get the event handle for checking HDMI events. |
|---|
| 1251 | |
|---|
| 1252 | Input: |
|---|
| 1253 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1254 | EventType - Type of event the requested handle is for (CEC, HDCP, etc.) |
|---|
| 1255 | |
|---|
| 1256 | Output: |
|---|
| 1257 | pBHDMEvent - HDMI Event Handle |
|---|
| 1258 | |
|---|
| 1259 | Returns: |
|---|
| 1260 | BERR_SUCCESS - Sucessfully returned the HDMI handle |
|---|
| 1261 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1262 | |
|---|
| 1263 | See Also: |
|---|
| 1264 | BHDM_EventType |
|---|
| 1265 | |
|---|
| 1266 | ****************************************************************************/ |
|---|
| 1267 | BERR_Code BHDM_GetEventHandle( |
|---|
| 1268 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1269 | BHDM_EventType EventType, /* [in] HDMI Event Type */ |
|---|
| 1270 | BKNI_EventHandle *pBHDMEvent /* [out] event handle */ |
|---|
| 1271 | ); |
|---|
| 1272 | |
|---|
| 1273 | |
|---|
| 1274 | |
|---|
| 1275 | /*************************************************************************** |
|---|
| 1276 | Summary: |
|---|
| 1277 | Initialize the HDMI Packet RAM |
|---|
| 1278 | |
|---|
| 1279 | Input: |
|---|
| 1280 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1281 | |
|---|
| 1282 | Output: |
|---|
| 1283 | <None> |
|---|
| 1284 | |
|---|
| 1285 | Returns: |
|---|
| 1286 | BERR_SUCCESS - Sucessfully returned the HDMI handle |
|---|
| 1287 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1288 | |
|---|
| 1289 | See Also: |
|---|
| 1290 | |
|---|
| 1291 | ****************************************************************************/ |
|---|
| 1292 | BERR_Code BHDM_InitializePacketRAM( |
|---|
| 1293 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1294 | ) ; |
|---|
| 1295 | |
|---|
| 1296 | |
|---|
| 1297 | /*************************************************************************** |
|---|
| 1298 | Summary: |
|---|
| 1299 | Callback used for notification of changes to the Audio or Video Rate. |
|---|
| 1300 | |
|---|
| 1301 | Input: |
|---|
| 1302 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1303 | CallbackType - see BHDM_Callback_Type ; |
|---|
| 1304 | pvAudioOrVideoData - void pointer to structure containing information |
|---|
| 1305 | describing Audio or Video rate change |
|---|
| 1306 | |
|---|
| 1307 | Output: |
|---|
| 1308 | <None> |
|---|
| 1309 | |
|---|
| 1310 | Returns: |
|---|
| 1311 | <None> |
|---|
| 1312 | |
|---|
| 1313 | See Also: |
|---|
| 1314 | BHDM_Callback_Type |
|---|
| 1315 | BVDC_Display_InstallRateChangeCallback |
|---|
| 1316 | BAUD_InstallRateChangeCallback |
|---|
| 1317 | ****************************************************************************/ |
|---|
| 1318 | void BHDM_AudioVideoRateChangeCB_isr( |
|---|
| 1319 | BHDM_Handle hHDMI, |
|---|
| 1320 | int CallbackType, |
|---|
| 1321 | void *pvAudioOrVideoData) ; |
|---|
| 1322 | |
|---|
| 1323 | |
|---|
| 1324 | /*************************************************************************** |
|---|
| 1325 | Summary: |
|---|
| 1326 | Enable the HDMI/DVI display output |
|---|
| 1327 | |
|---|
| 1328 | |
|---|
| 1329 | Input: |
|---|
| 1330 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1331 | |
|---|
| 1332 | pHdmiSettings - Settings used to enable DVI/HDMI output |
|---|
| 1333 | |
|---|
| 1334 | Output: |
|---|
| 1335 | <None> |
|---|
| 1336 | |
|---|
| 1337 | Returns: |
|---|
| 1338 | BERR_SUCCESS - Enabled the display output |
|---|
| 1339 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1340 | |
|---|
| 1341 | See Also: |
|---|
| 1342 | |
|---|
| 1343 | ****************************************************************************/ |
|---|
| 1344 | BERR_Code BHDM_EnableDisplay( |
|---|
| 1345 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1346 | BHDM_Settings *pHdmiSettings /* [in] HDMI Settings to enable Display with */ |
|---|
| 1347 | ) ; |
|---|
| 1348 | |
|---|
| 1349 | |
|---|
| 1350 | |
|---|
| 1351 | /*************************************************************************** |
|---|
| 1352 | Summary: |
|---|
| 1353 | Disable HDMI/DVI display output |
|---|
| 1354 | |
|---|
| 1355 | |
|---|
| 1356 | Input: |
|---|
| 1357 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1358 | |
|---|
| 1359 | |
|---|
| 1360 | Output: |
|---|
| 1361 | <None> |
|---|
| 1362 | |
|---|
| 1363 | Returns: |
|---|
| 1364 | BERR_SUCCESS - Display output disabled |
|---|
| 1365 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1366 | |
|---|
| 1367 | See Also: |
|---|
| 1368 | BHDM_EnableDisplay |
|---|
| 1369 | BHDM_EnableTmdsOutput |
|---|
| 1370 | |
|---|
| 1371 | ****************************************************************************/ |
|---|
| 1372 | BERR_Code BHDM_DisableDisplay( |
|---|
| 1373 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1374 | ) ; |
|---|
| 1375 | |
|---|
| 1376 | |
|---|
| 1377 | |
|---|
| 1378 | /*************************************************************************** |
|---|
| 1379 | Summary: |
|---|
| 1380 | Get the current settings used for confuring the HDMI display and audio |
|---|
| 1381 | |
|---|
| 1382 | |
|---|
| 1383 | Input: |
|---|
| 1384 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1385 | |
|---|
| 1386 | Output: |
|---|
| 1387 | pHdmiSettings - Settings used to enable DVI/HDMI output |
|---|
| 1388 | |
|---|
| 1389 | |
|---|
| 1390 | Returns: |
|---|
| 1391 | BERR_SUCCESS - Settings returned in the pHdmiSettings structure |
|---|
| 1392 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1393 | |
|---|
| 1394 | See Also: |
|---|
| 1395 | |
|---|
| 1396 | ****************************************************************************/ |
|---|
| 1397 | BERR_Code BHDM_GetHdmiSettings( |
|---|
| 1398 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1399 | BHDM_Settings *pHdmiSettings /* [in] HDMI Settings to enable Display with */ |
|---|
| 1400 | ) ; |
|---|
| 1401 | |
|---|
| 1402 | |
|---|
| 1403 | /*************************************************************************** |
|---|
| 1404 | Summary: |
|---|
| 1405 | Set the current settings used to configure the HDMI display and audio |
|---|
| 1406 | |
|---|
| 1407 | |
|---|
| 1408 | Input: |
|---|
| 1409 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1410 | pHdmiSettings - Settings used to enable DVI/HDMI output |
|---|
| 1411 | |
|---|
| 1412 | |
|---|
| 1413 | Returns: |
|---|
| 1414 | BERR_SUCCESS - Settings returned in the pHdmiSettings structure |
|---|
| 1415 | |
|---|
| 1416 | See Also: |
|---|
| 1417 | BHDM_EnableDisplay |
|---|
| 1418 | ****************************************************************************/ |
|---|
| 1419 | BERR_Code BHDM_SetHdmiSettings( |
|---|
| 1420 | BHDM_Handle hHDMI, /* [in] handle to HDMI device */ |
|---|
| 1421 | BHDM_Settings *pHdmiSettings /* [in] pointer to memory to hold the current HDMI settings */ |
|---|
| 1422 | ); |
|---|
| 1423 | |
|---|
| 1424 | |
|---|
| 1425 | /*************************************************************************** |
|---|
| 1426 | Summary: |
|---|
| 1427 | Set the Timebase for the HDMI Rate Manager to use. |
|---|
| 1428 | |
|---|
| 1429 | Input: |
|---|
| 1430 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1431 | eTimebase - the selected Timebase to use |
|---|
| 1432 | |
|---|
| 1433 | Returns: |
|---|
| 1434 | BERR_SUCCESS - Timebase Set for use |
|---|
| 1435 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1436 | |
|---|
| 1437 | Note: |
|---|
| 1438 | The selected Timebase should be the same Timebase used for the VEC |
|---|
| 1439 | Rate Manager configured for HD |
|---|
| 1440 | |
|---|
| 1441 | See Also: |
|---|
| 1442 | BHDM_GetTimebase |
|---|
| 1443 | |
|---|
| 1444 | ****************************************************************************/ |
|---|
| 1445 | BERR_Code BHDM_SetTimebase( |
|---|
| 1446 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1447 | BAVC_Timebase eTimebase /* [in] HDMI Rate Manager Timebase to be used */ |
|---|
| 1448 | ) ; |
|---|
| 1449 | |
|---|
| 1450 | |
|---|
| 1451 | |
|---|
| 1452 | /*************************************************************************** |
|---|
| 1453 | Summary: |
|---|
| 1454 | Get the current Timebase in use by the HDMI Rate Manager |
|---|
| 1455 | |
|---|
| 1456 | Input: |
|---|
| 1457 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1458 | |
|---|
| 1459 | Output: |
|---|
| 1460 | eTimebase - the current Timebase |
|---|
| 1461 | |
|---|
| 1462 | Returns: |
|---|
| 1463 | BERR_SUCCESS - Timebase returned |
|---|
| 1464 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1465 | |
|---|
| 1466 | Note: |
|---|
| 1467 | The returned Timebase should be the same Timebase used for the VEC |
|---|
| 1468 | Rate Manager configured for HD |
|---|
| 1469 | |
|---|
| 1470 | See Also: |
|---|
| 1471 | BHDM_SetTimebase |
|---|
| 1472 | BHDM_GetHDMISettings |
|---|
| 1473 | |
|---|
| 1474 | ****************************************************************************/ |
|---|
| 1475 | BERR_Code BHDM_GetTimebase( |
|---|
| 1476 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1477 | BAVC_Timebase *eTimebase /* [out] current HDMI Rate Manager Timebase */ |
|---|
| 1478 | ) ; |
|---|
| 1479 | |
|---|
| 1480 | |
|---|
| 1481 | |
|---|
| 1482 | /*************************************************************************** |
|---|
| 1483 | Summary: |
|---|
| 1484 | Enable the transmission of the specified packet id |
|---|
| 1485 | |
|---|
| 1486 | Input: |
|---|
| 1487 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1488 | ePacketId - Packet ID to enable |
|---|
| 1489 | |
|---|
| 1490 | |
|---|
| 1491 | Returns: |
|---|
| 1492 | BERR_SUCCESS - Timebase returned |
|---|
| 1493 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1494 | |
|---|
| 1495 | |
|---|
| 1496 | See Also: |
|---|
| 1497 | BHDM_DisablePacketTransmission |
|---|
| 1498 | BHDM_SetUserDefinedPacket |
|---|
| 1499 | |
|---|
| 1500 | ****************************************************************************/ |
|---|
| 1501 | BERR_Code BHDM_EnablePacketTransmission( |
|---|
| 1502 | BHDM_Handle hHDMI, |
|---|
| 1503 | BHDM_Packet ePacketId) ; |
|---|
| 1504 | |
|---|
| 1505 | |
|---|
| 1506 | |
|---|
| 1507 | /*************************************************************************** |
|---|
| 1508 | Summary: |
|---|
| 1509 | Disable the transmission of the specified packet id |
|---|
| 1510 | |
|---|
| 1511 | Input: |
|---|
| 1512 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1513 | ePacketId - Packet ID to disable |
|---|
| 1514 | |
|---|
| 1515 | |
|---|
| 1516 | Returns: |
|---|
| 1517 | BERR_SUCCESS - Timebase returned |
|---|
| 1518 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1519 | |
|---|
| 1520 | |
|---|
| 1521 | See Also: |
|---|
| 1522 | BHDM_EnablePacketTransmission |
|---|
| 1523 | BHDM_SetUserDefinedPacket |
|---|
| 1524 | |
|---|
| 1525 | ****************************************************************************/ |
|---|
| 1526 | BERR_Code BHDM_DisablePacketTransmission( |
|---|
| 1527 | BHDM_Handle hHDMI, |
|---|
| 1528 | BHDM_Packet ePacketId) ; |
|---|
| 1529 | |
|---|
| 1530 | |
|---|
| 1531 | |
|---|
| 1532 | /*************************************************************************** |
|---|
| 1533 | Summary: |
|---|
| 1534 | Create/Set a user defined packet |
|---|
| 1535 | |
|---|
| 1536 | Input: |
|---|
| 1537 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1538 | ePacketId - Packet ID to store the user defined packet |
|---|
| 1539 | PacketType - Type ID of the Packet to transmit |
|---|
| 1540 | PacketVersion - Version of the Packet to transmit |
|---|
| 1541 | PacketLength - length of Packet Data excluding checksum (auto calculated) |
|---|
| 1542 | PacketData - pointer to the user packet data |
|---|
| 1543 | |
|---|
| 1544 | |
|---|
| 1545 | Returns: |
|---|
| 1546 | BERR_SUCCESS - Packet Created and transmitted |
|---|
| 1547 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1548 | |
|---|
| 1549 | Note: |
|---|
| 1550 | The Packet Data checksum value is computed automatically and is not part |
|---|
| 1551 | of the Packet Data passed to BHDM_SetUserDefinedPacket. |
|---|
| 1552 | |
|---|
| 1553 | Caller must manage available User Defined packets; User Packets can be |
|---|
| 1554 | overwritten. |
|---|
| 1555 | |
|---|
| 1556 | |
|---|
| 1557 | See Also: |
|---|
| 1558 | BHDM_EnablePacketTransmission |
|---|
| 1559 | BHDM_DisablePacketTransmission |
|---|
| 1560 | ****************************************************************************/ |
|---|
| 1561 | BERR_Code BHDM_SetUserDefinedPacket(BHDM_Handle hHDMI, |
|---|
| 1562 | BHDM_Packet ePacketId, |
|---|
| 1563 | |
|---|
| 1564 | uint8_t PacketType, |
|---|
| 1565 | uint8_t PacketVersion, |
|---|
| 1566 | uint8_t PacketLength, |
|---|
| 1567 | |
|---|
| 1568 | uint8_t *PacketData |
|---|
| 1569 | ) ; |
|---|
| 1570 | |
|---|
| 1571 | |
|---|
| 1572 | |
|---|
| 1573 | /*************************************************************************** |
|---|
| 1574 | Summary: |
|---|
| 1575 | Configure Pre-Emphasis Control |
|---|
| 1576 | |
|---|
| 1577 | Input: |
|---|
| 1578 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1579 | eValue - enumeration of the value to use on PreEmphasis Control |
|---|
| 1580 | |
|---|
| 1581 | |
|---|
| 1582 | Returns: |
|---|
| 1583 | BERR_SUCCESS - Pre-Emphasis Control enabled with the selected value |
|---|
| 1584 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1585 | |
|---|
| 1586 | |
|---|
| 1587 | Note: |
|---|
| 1588 | Pre-Emphasis *may* be used for extended DVI/HDMI cable lengths. |
|---|
| 1589 | |
|---|
| 1590 | |
|---|
| 1591 | See Also: |
|---|
| 1592 | BHDM_PreEmphasis |
|---|
| 1593 | ****************************************************************************/ |
|---|
| 1594 | BERR_Code BHDM_ConfigurePreEmphasis( |
|---|
| 1595 | BHDM_Handle hHDMI, |
|---|
| 1596 | BHDM_PreEmphasisSetting eValue |
|---|
| 1597 | ) ; |
|---|
| 1598 | |
|---|
| 1599 | |
|---|
| 1600 | /*************************************************************************** |
|---|
| 1601 | Summary: |
|---|
| 1602 | Get current Pre-Emphasis Control settings |
|---|
| 1603 | |
|---|
| 1604 | Input: |
|---|
| 1605 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1606 | stPreEmphasisConfig - structure containing all the pre-emphasis settings |
|---|
| 1607 | |
|---|
| 1608 | |
|---|
| 1609 | Returns: |
|---|
| 1610 | BERR_SUCCESS - Successfully retrieve current Pre-Emphasis settings |
|---|
| 1611 | |
|---|
| 1612 | Note: |
|---|
| 1613 | Pre-Emphasis *may* be used for extended DVI/HDMI cable lengths. |
|---|
| 1614 | |
|---|
| 1615 | See Also: |
|---|
| 1616 | BHDM_SetPreEmphasisConfiguration |
|---|
| 1617 | ****************************************************************************/ |
|---|
| 1618 | BERR_Code BHDM_GetPreEmphasisConfiguration( |
|---|
| 1619 | BHDM_Handle hHDMI, |
|---|
| 1620 | BHDM_PreEmphasis_Configuration *stPreEmphasisConfig |
|---|
| 1621 | ); |
|---|
| 1622 | |
|---|
| 1623 | |
|---|
| 1624 | /*************************************************************************** |
|---|
| 1625 | Summary: |
|---|
| 1626 | Set Pre-Emphasis Control with provided settings |
|---|
| 1627 | |
|---|
| 1628 | Input: |
|---|
| 1629 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1630 | stPreEmphasisConfig - structure containing all the pre-emphasis settings to be configured |
|---|
| 1631 | |
|---|
| 1632 | |
|---|
| 1633 | Returns: |
|---|
| 1634 | BERR_SUCCESS - Pre-Emphasis Control enabled with the selected value |
|---|
| 1635 | BERR_INVALID_PARAMETER - Provided settings are out of range |
|---|
| 1636 | |
|---|
| 1637 | Note: |
|---|
| 1638 | Pre-Emphasis *may* be used for extended DVI/HDMI cable lengths. |
|---|
| 1639 | |
|---|
| 1640 | See Also: |
|---|
| 1641 | BHDM_GetPreEmphasisConfiguration |
|---|
| 1642 | ****************************************************************************/ |
|---|
| 1643 | BERR_Code BHDM_SetPreEmphasisConfiguration( |
|---|
| 1644 | BHDM_Handle hHDMI, |
|---|
| 1645 | BHDM_PreEmphasis_Configuration *stPreEmphasisConfig |
|---|
| 1646 | ); |
|---|
| 1647 | |
|---|
| 1648 | |
|---|
| 1649 | /****************************************************************************** |
|---|
| 1650 | Summary: |
|---|
| 1651 | Set/Enable the Source Product Description Info Frame packet to be sent to the HDMI Rx |
|---|
| 1652 | |
|---|
| 1653 | Input: |
|---|
| 1654 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1655 | |
|---|
| 1656 | |
|---|
| 1657 | Returns: |
|---|
| 1658 | BERR_SUCCESS - Packet Created and transmitted |
|---|
| 1659 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1660 | |
|---|
| 1661 | |
|---|
| 1662 | See Also: |
|---|
| 1663 | *******************************************************************************/ |
|---|
| 1664 | BERR_Code BHDM_SetSPDInfoFramePacket( |
|---|
| 1665 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 1666 | ) ; |
|---|
| 1667 | |
|---|
| 1668 | |
|---|
| 1669 | |
|---|
| 1670 | /****************************************************************************** |
|---|
| 1671 | Summary: |
|---|
| 1672 | Get Receiver Sense Value |
|---|
| 1673 | |
|---|
| 1674 | Input: |
|---|
| 1675 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1676 | |
|---|
| 1677 | Output: |
|---|
| 1678 | ReceiverSense - 1 Rx Powered On; 0 Rx Powered Off |
|---|
| 1679 | |
|---|
| 1680 | |
|---|
| 1681 | Returns: |
|---|
| 1682 | BERR_SUCCESS - Receiver Sense returned |
|---|
| 1683 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1684 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1685 | |
|---|
| 1686 | |
|---|
| 1687 | See Also: |
|---|
| 1688 | *******************************************************************************/ |
|---|
| 1689 | BERR_Code BHDM_GetReceiverSense( |
|---|
| 1690 | BHDM_Handle hHDMI, |
|---|
| 1691 | uint8_t *ReceiverSense /* [in] HDMI handle */ |
|---|
| 1692 | ) ; |
|---|
| 1693 | |
|---|
| 1694 | |
|---|
| 1695 | /****************************************************************************** |
|---|
| 1696 | Summary: |
|---|
| 1697 | Set Vendor Specific InfoFrame |
|---|
| 1698 | |
|---|
| 1699 | Input: |
|---|
| 1700 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1701 | stVendorSpecificInfoFrame - structure containing Vendor Specific Info |
|---|
| 1702 | |
|---|
| 1703 | Returns: |
|---|
| 1704 | BERR_SUCCESS - Vendor Specific Info Frame data set |
|---|
| 1705 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1706 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1707 | |
|---|
| 1708 | |
|---|
| 1709 | See Also: |
|---|
| 1710 | BHDM_GetVendorSpecificInfoFrame |
|---|
| 1711 | *******************************************************************************/ |
|---|
| 1712 | BERR_Code BHDM_SetVendorSpecificInfoFrame( |
|---|
| 1713 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1714 | const BAVC_HDMI_VendorSpecificInfoFrame *stVendorSpecificInfoFrame |
|---|
| 1715 | ) ; |
|---|
| 1716 | |
|---|
| 1717 | |
|---|
| 1718 | /****************************************************************************** |
|---|
| 1719 | Summary: |
|---|
| 1720 | Set Vendor Specific InfoFrame |
|---|
| 1721 | |
|---|
| 1722 | Input: |
|---|
| 1723 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1724 | pVendorSpecificInfoFrame - pointer to structure to hold the Vendor Specific Infoframe values |
|---|
| 1725 | |
|---|
| 1726 | |
|---|
| 1727 | Returns: |
|---|
| 1728 | None |
|---|
| 1729 | |
|---|
| 1730 | See Also: |
|---|
| 1731 | BHDM_SetVendorSpecificInfoFramePacket |
|---|
| 1732 | *******************************************************************************/ |
|---|
| 1733 | void BHDM_GetVendorSpecificInfoFrame( |
|---|
| 1734 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1735 | BAVC_HDMI_VendorSpecificInfoFrame *pVendorSpecficInfoFrame |
|---|
| 1736 | ) ; |
|---|
| 1737 | |
|---|
| 1738 | |
|---|
| 1739 | /****************************************************************************** |
|---|
| 1740 | Summary: |
|---|
| 1741 | Set AVI InfoFrame |
|---|
| 1742 | |
|---|
| 1743 | Input: |
|---|
| 1744 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1745 | AviInfo - values to set info frame to |
|---|
| 1746 | |
|---|
| 1747 | |
|---|
| 1748 | Returns: |
|---|
| 1749 | BERR_SUCCESS - Avi Info Frame Packet information set |
|---|
| 1750 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1751 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1752 | |
|---|
| 1753 | |
|---|
| 1754 | See Also: |
|---|
| 1755 | BHDM_GetAviInfoFramePacket |
|---|
| 1756 | *******************************************************************************/ |
|---|
| 1757 | BERR_Code BHDM_SetAVIInfoFramePacket( |
|---|
| 1758 | BHDM_Handle hHDMI, |
|---|
| 1759 | BAVC_HDMI_AviInfoFrame *stAviInfoFrame |
|---|
| 1760 | ) ; |
|---|
| 1761 | |
|---|
| 1762 | |
|---|
| 1763 | |
|---|
| 1764 | /****************************************************************************** |
|---|
| 1765 | Summary: |
|---|
| 1766 | Get current AVI InfoFrame Settings |
|---|
| 1767 | |
|---|
| 1768 | Input: |
|---|
| 1769 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1770 | AviInfo - structure to copy AVI Info Frame values to |
|---|
| 1771 | |
|---|
| 1772 | |
|---|
| 1773 | Returns: |
|---|
| 1774 | BERR_SUCCESS - Avi Info Frame Packet information returned |
|---|
| 1775 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1776 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1777 | |
|---|
| 1778 | |
|---|
| 1779 | See Also: |
|---|
| 1780 | BHDM_GetAviInfoFramePacket |
|---|
| 1781 | *******************************************************************************/ |
|---|
| 1782 | BERR_Code BHDM_GetAVIInfoFramePacket( |
|---|
| 1783 | BHDM_Handle hHDMI, |
|---|
| 1784 | BAVC_HDMI_AviInfoFrame *stAviInfoFrame |
|---|
| 1785 | ) ; |
|---|
| 1786 | |
|---|
| 1787 | |
|---|
| 1788 | |
|---|
| 1789 | /****************************************************************************** |
|---|
| 1790 | Summary: |
|---|
| 1791 | Set Audio InfoFrame |
|---|
| 1792 | |
|---|
| 1793 | Input: |
|---|
| 1794 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1795 | stAudioInfoFrame - values to set info frame to |
|---|
| 1796 | |
|---|
| 1797 | |
|---|
| 1798 | Returns: |
|---|
| 1799 | BERR_SUCCESS - Avi Info Frame Packet information set |
|---|
| 1800 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1801 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1802 | |
|---|
| 1803 | |
|---|
| 1804 | See Also: |
|---|
| 1805 | BHDM_GetAudioInfoFramePacket |
|---|
| 1806 | *******************************************************************************/ |
|---|
| 1807 | BERR_Code BHDM_SetAudioInfoFramePacket( |
|---|
| 1808 | BHDM_Handle hHDMI, |
|---|
| 1809 | BAVC_HDMI_AudioInfoFrame *stAudioInfoFrame |
|---|
| 1810 | ) ; |
|---|
| 1811 | |
|---|
| 1812 | |
|---|
| 1813 | |
|---|
| 1814 | /****************************************************************************** |
|---|
| 1815 | Summary: |
|---|
| 1816 | Get current Audio InfoFrame Settings |
|---|
| 1817 | |
|---|
| 1818 | Input: |
|---|
| 1819 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1820 | stAudioInfoFrae - structure to copy Audio Info Frame values to |
|---|
| 1821 | |
|---|
| 1822 | |
|---|
| 1823 | Returns: |
|---|
| 1824 | BERR_SUCCESS - Audio Info Frame Packet information returned |
|---|
| 1825 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1826 | BHDM_HARDWARE_ERROR - Hardware Error with Device and/or Cable |
|---|
| 1827 | |
|---|
| 1828 | |
|---|
| 1829 | See Also: |
|---|
| 1830 | BHDM_GetAudioInfoFramePacket |
|---|
| 1831 | *******************************************************************************/ |
|---|
| 1832 | BERR_Code BHDM_GetAudioInfoFramePacket( |
|---|
| 1833 | BHDM_Handle hHDMI, |
|---|
| 1834 | BAVC_HDMI_AudioInfoFrame *stAudioInfoFrame |
|---|
| 1835 | ) ; |
|---|
| 1836 | |
|---|
| 1837 | |
|---|
| 1838 | |
|---|
| 1839 | /****************************************************************************** |
|---|
| 1840 | Summary: |
|---|
| 1841 | Get the preferred Colorimetry Setting based on the Output Format (DVI/HDMI) |
|---|
| 1842 | and current Video Format (SD/HD/PC) Setting |
|---|
| 1843 | |
|---|
| 1844 | Input: |
|---|
| 1845 | eOutputFormat - output (encoding) format sent to display (DVI vs HDMI) |
|---|
| 1846 | eVideoFmt - output display format: SD, HD, PC formats |
|---|
| 1847 | |
|---|
| 1848 | Returns: |
|---|
| 1849 | BERR_SUCCESS - Avi Info Frame Packet information returned |
|---|
| 1850 | |
|---|
| 1851 | |
|---|
| 1852 | See Also: |
|---|
| 1853 | none |
|---|
| 1854 | *******************************************************************************/ |
|---|
| 1855 | BERR_Code BHDM_GetColorimetry(BHDM_OutputFormat eOutputFormat, |
|---|
| 1856 | BFMT_VideoFmt eVideoFmt, BAVC_MatrixCoefficients *eColorimetry) ; |
|---|
| 1857 | |
|---|
| 1858 | |
|---|
| 1859 | /****************************************************************************** |
|---|
| 1860 | Summary: |
|---|
| 1861 | Set pixel repetition |
|---|
| 1862 | |
|---|
| 1863 | Input: |
|---|
| 1864 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1865 | ePixelRepetition - pixel repetition configuration to set |
|---|
| 1866 | |
|---|
| 1867 | |
|---|
| 1868 | Returns: |
|---|
| 1869 | BERR_SUCCESS - color depth mode successfully set |
|---|
| 1870 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1871 | BERR_NOT_SUPPORTED - requested color depth is not supported |
|---|
| 1872 | |
|---|
| 1873 | *******************************************************************************/ |
|---|
| 1874 | BERR_Code BHDM_SetPixelRepetition( |
|---|
| 1875 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1876 | BAVC_HDMI_PixelRepetition ePixelRepetition |
|---|
| 1877 | ) ; |
|---|
| 1878 | |
|---|
| 1879 | |
|---|
| 1880 | /****************************************************************************** |
|---|
| 1881 | Summary: |
|---|
| 1882 | Get pixel repetition |
|---|
| 1883 | |
|---|
| 1884 | Input: |
|---|
| 1885 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1886 | *ePixelRepetition - the current pixel repetition configuration |
|---|
| 1887 | |
|---|
| 1888 | |
|---|
| 1889 | Returns: |
|---|
| 1890 | BERR_SUCCESS - color depth mode successfully set |
|---|
| 1891 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1892 | BERR_NOT_SUPPORTED - requested color depth is not supported |
|---|
| 1893 | |
|---|
| 1894 | *******************************************************************************/ |
|---|
| 1895 | BERR_Code BHDM_GetPixelRepetition( |
|---|
| 1896 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1897 | BAVC_HDMI_PixelRepetition *ePixelRepetition |
|---|
| 1898 | ); |
|---|
| 1899 | |
|---|
| 1900 | |
|---|
| 1901 | /****************************************************************************** |
|---|
| 1902 | Summary: |
|---|
| 1903 | Set the HDMI data transferring mode (Master or Slave) |
|---|
| 1904 | |
|---|
| 1905 | Input: |
|---|
| 1906 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1907 | masterMode - a boolean indicating master (true) or slave (false) mode |
|---|
| 1908 | |
|---|
| 1909 | |
|---|
| 1910 | Returns: |
|---|
| 1911 | BERR_SUCCESS - data transfer mode successfully set |
|---|
| 1912 | |
|---|
| 1913 | *******************************************************************************/ |
|---|
| 1914 | BERR_Code BHDM_SetHdmiDataTransferMode( |
|---|
| 1915 | BHDM_Handle hHDMI, |
|---|
| 1916 | bool masterMode |
|---|
| 1917 | ); |
|---|
| 1918 | |
|---|
| 1919 | |
|---|
| 1920 | /****************************************************************************** |
|---|
| 1921 | Summary: |
|---|
| 1922 | Get the current HDMI data transferring mode (Master or Slave) |
|---|
| 1923 | |
|---|
| 1924 | Input: |
|---|
| 1925 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1926 | masterMode - a boolean indicating master (true) or slave (false) mode |
|---|
| 1927 | |
|---|
| 1928 | |
|---|
| 1929 | Returns: |
|---|
| 1930 | BERR_SUCCESS - successfully retrieve data transfer mode |
|---|
| 1931 | |
|---|
| 1932 | *******************************************************************************/ |
|---|
| 1933 | BERR_Code BHDM_GetHdmiDataTransferMode( |
|---|
| 1934 | BHDM_Handle hHDMI, |
|---|
| 1935 | bool *masterMode |
|---|
| 1936 | ); |
|---|
| 1937 | |
|---|
| 1938 | |
|---|
| 1939 | #if BHDM_CONFIG_HDMI_1_3_SUPPORT |
|---|
| 1940 | /****************************************************************************** |
|---|
| 1941 | Summary: |
|---|
| 1942 | Set output color mode (standard or deep color) |
|---|
| 1943 | |
|---|
| 1944 | Input: |
|---|
| 1945 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1946 | stColorDepthSettings - color mode configuration to set |
|---|
| 1947 | |
|---|
| 1948 | |
|---|
| 1949 | Returns: |
|---|
| 1950 | BERR_SUCCESS - color depth mode successfully set |
|---|
| 1951 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1952 | BERR_NOT_SUPPORTED - requested color depth is not supported |
|---|
| 1953 | |
|---|
| 1954 | *******************************************************************************/ |
|---|
| 1955 | BERR_Code BHDM_SetColorDepth( |
|---|
| 1956 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1957 | BHDM_ColorDepth_Settings *stColorDepthSettings |
|---|
| 1958 | ) ; |
|---|
| 1959 | |
|---|
| 1960 | |
|---|
| 1961 | /****************************************************************************** |
|---|
| 1962 | Summary: |
|---|
| 1963 | Get current output color mode (standard or deep color) |
|---|
| 1964 | |
|---|
| 1965 | Input: |
|---|
| 1966 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1967 | stColorDepthSettings - the current color mode configuration |
|---|
| 1968 | |
|---|
| 1969 | |
|---|
| 1970 | Returns: |
|---|
| 1971 | BERR_SUCCESS - color depth mode successfully set |
|---|
| 1972 | *******************************************************************************/ |
|---|
| 1973 | BERR_Code BHDM_GetColorDepth( |
|---|
| 1974 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1975 | BHDM_ColorDepth_Settings *stColorDepthSettings /* [out] color depth setting returns */ |
|---|
| 1976 | ); |
|---|
| 1977 | |
|---|
| 1978 | |
|---|
| 1979 | /****************************************************************************** |
|---|
| 1980 | Summary: |
|---|
| 1981 | Set pixel data override |
|---|
| 1982 | |
|---|
| 1983 | Input: |
|---|
| 1984 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 1985 | |
|---|
| 1986 | |
|---|
| 1987 | Returns: |
|---|
| 1988 | BERR_SUCCESS - override was successful |
|---|
| 1989 | BERR_INVALID_PARAMETER - Invalid function parameter. |
|---|
| 1990 | |
|---|
| 1991 | *******************************************************************************/ |
|---|
| 1992 | BERR_Code BHDM_SetPixelDataOverride( |
|---|
| 1993 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 1994 | uint8_t red, /* R (Cr) */ |
|---|
| 1995 | uint8_t green, /* G (Y) */ |
|---|
| 1996 | uint8_t blue /* B (Cb) */ |
|---|
| 1997 | ) ; |
|---|
| 1998 | |
|---|
| 1999 | |
|---|
| 2000 | /****************************************************************************** |
|---|
| 2001 | Summary: |
|---|
| 2002 | Clear pixel data override |
|---|
| 2003 | |
|---|
| 2004 | Input: |
|---|
| 2005 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2006 | |
|---|
| 2007 | Returns: |
|---|
| 2008 | BERR_SUCCESS - clear of override was successful |
|---|
| 2009 | |
|---|
| 2010 | *******************************************************************************/ |
|---|
| 2011 | BERR_Code BHDM_ClearPixelDataOverride( |
|---|
| 2012 | BHDM_Handle hHDMI /* [in] HDMI handle */ |
|---|
| 2013 | ) ; |
|---|
| 2014 | |
|---|
| 2015 | |
|---|
| 2016 | /****************************************************************************** |
|---|
| 2017 | Summary: |
|---|
| 2018 | Waits for stable video [to arrive from the VEC] |
|---|
| 2019 | |
|---|
| 2020 | Input: |
|---|
| 2021 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2022 | |
|---|
| 2023 | Returns: |
|---|
| 2024 | BERR_SUCCESS - |
|---|
| 2025 | |
|---|
| 2026 | *******************************************************************************/ |
|---|
| 2027 | BERR_Code BHDM_WaitForStableVideo( |
|---|
| 2028 | BHDM_Handle hHDMI, /* [in] HDMI handle */ |
|---|
| 2029 | uint32_t stablePeriod, /* [in] Period of time video should be stable */ |
|---|
| 2030 | uint32_t maxWait /* [in] Max amount of time to wait */ |
|---|
| 2031 | ) ; |
|---|
| 2032 | #endif |
|---|
| 2033 | |
|---|
| 2034 | |
|---|
| 2035 | /****************************************************************************** |
|---|
| 2036 | Summary: |
|---|
| 2037 | install Hot Plug Change Callback to notify of HP dtect changes |
|---|
| 2038 | |
|---|
| 2039 | Input: |
|---|
| 2040 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2041 | pfCallback_isr - callback for hotplug change |
|---|
| 2042 | |
|---|
| 2043 | *******************************************************************************/ |
|---|
| 2044 | BERR_Code BHDM_InstallHotplugChangeCallback( |
|---|
| 2045 | BHDM_Handle hHDMI, /* [in] HDMI Handle */ |
|---|
| 2046 | const BHDM_CallbackFunc pfCallback_isr, /* [in] cb for informing hotplug change */ |
|---|
| 2047 | void *pvParm1, /* [in] the first argument (void *) passed to the callback function */ |
|---|
| 2048 | int iParm2) ; /* [in] the second argument(int) passed to the callback function */ |
|---|
| 2049 | |
|---|
| 2050 | |
|---|
| 2051 | /****************************************************************************** |
|---|
| 2052 | Summary: |
|---|
| 2053 | Uninstall HotPlug Change Callback |
|---|
| 2054 | |
|---|
| 2055 | Input: |
|---|
| 2056 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2057 | pfCallback_isr - callback for hotplug change |
|---|
| 2058 | |
|---|
| 2059 | *******************************************************************************/ |
|---|
| 2060 | BERR_Code BHDM_UnInstallHotplugChangeCallback( |
|---|
| 2061 | BHDM_Handle hHDMI, /* [in] HDMI Handle */ |
|---|
| 2062 | const BHDM_CallbackFunc pfCallback_isr) ; /* [in] cb for hotplug change */ |
|---|
| 2063 | |
|---|
| 2064 | |
|---|
| 2065 | /****************************************************************************** |
|---|
| 2066 | Summary: |
|---|
| 2067 | install Rx Sense Change Callback to notify of HP dtect changes |
|---|
| 2068 | |
|---|
| 2069 | Input: |
|---|
| 2070 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2071 | pfCallback_isr - callback for RxSense change |
|---|
| 2072 | |
|---|
| 2073 | *******************************************************************************/ |
|---|
| 2074 | BERR_Code BHDM_InstallRxSenseChangeCallback( |
|---|
| 2075 | BHDM_Handle hHDMI, /* [in] HDMI Handle */ |
|---|
| 2076 | const BHDM_CallbackFunc pfCallback_isr, /* [in] cb for informing RxSense change */ |
|---|
| 2077 | void *pvParm1, /* [in] the first argument (void *) passed to the callback function */ |
|---|
| 2078 | int iParm2) ; /* [in] the second argument(int) passed to the callback function */ |
|---|
| 2079 | |
|---|
| 2080 | |
|---|
| 2081 | /****************************************************************************** |
|---|
| 2082 | Summary: |
|---|
| 2083 | Uninstall RxSense Change Callback |
|---|
| 2084 | |
|---|
| 2085 | Input: |
|---|
| 2086 | hHDMI - HDMI control handle that was previously opened by BHDM_Open. |
|---|
| 2087 | pfCallback_isr - callback for RxSense change |
|---|
| 2088 | |
|---|
| 2089 | *******************************************************************************/ |
|---|
| 2090 | BERR_Code BHDM_UnInstallRxSenseChangeCallback( |
|---|
| 2091 | BHDM_Handle hHDMI, /* [in] HDMI Handle */ |
|---|
| 2092 | const BHDM_CallbackFunc pfCallback_isr) ; /* [in] cb for RxSense change */ |
|---|
| 2093 | |
|---|
| 2094 | |
|---|
| 2095 | #if BHDM_CONFIG_PLL_KICKSTART_WORKAROUND |
|---|
| 2096 | typedef struct _BHDM_DEBUG_PLL_LOCK_STATUS_ |
|---|
| 2097 | { |
|---|
| 2098 | uint32_t uiPllKickStartCount ; |
|---|
| 2099 | uint32_t VcxoRegister ; |
|---|
| 2100 | uint8_t Lock ; |
|---|
| 2101 | |
|---|
| 2102 | } BHDM_DEBUG_PLL_LOCK_STATUS ; |
|---|
| 2103 | #endif |
|---|
| 2104 | |
|---|
| 2105 | /*************************************************************************** |
|---|
| 2106 | Summary: |
|---|
| 2107 | HDMI standby settings |
|---|
| 2108 | |
|---|
| 2109 | ****************************************************************************/ |
|---|
| 2110 | typedef struct BHDM_StandbySettings |
|---|
| 2111 | { |
|---|
| 2112 | bool bEnableWakeup; /* If true, then allows wakeup from standby using HDM. |
|---|
| 2113 | If false, the device is powered down during standby */ |
|---|
| 2114 | } BHDM_StandbySettings; |
|---|
| 2115 | |
|---|
| 2116 | /****************************************************************************** |
|---|
| 2117 | Summary: |
|---|
| 2118 | Get default HDMI standby settings |
|---|
| 2119 | |
|---|
| 2120 | *******************************************************************************/ |
|---|
| 2121 | void BHDM_GetDefaultStandbySettings( |
|---|
| 2122 | BHDM_StandbySettings *pSettings |
|---|
| 2123 | ); |
|---|
| 2124 | |
|---|
| 2125 | |
|---|
| 2126 | /****************************************************************************** |
|---|
| 2127 | Summary: |
|---|
| 2128 | Enter standby mode |
|---|
| 2129 | |
|---|
| 2130 | *******************************************************************************/ |
|---|
| 2131 | BERR_Code BHDM_Standby( |
|---|
| 2132 | BHDM_Handle hHDMI, /* [in] HDMI Handle */ |
|---|
| 2133 | const BHDM_StandbySettings *pSettings /* optional */ |
|---|
| 2134 | ); |
|---|
| 2135 | |
|---|
| 2136 | /****************************************************************************** |
|---|
| 2137 | Summary: |
|---|
| 2138 | Resume from standby mode |
|---|
| 2139 | |
|---|
| 2140 | *******************************************************************************/ |
|---|
| 2141 | BERR_Code BHDM_Resume( |
|---|
| 2142 | BHDM_Handle hHDMI /* [in] HDMI Handle */ |
|---|
| 2143 | ); |
|---|
| 2144 | |
|---|
| 2145 | #ifdef __cplusplus |
|---|
| 2146 | } |
|---|
| 2147 | #endif |
|---|
| 2148 | |
|---|
| 2149 | #endif /* BHDM_H__ */ |
|---|
| 2150 | |
|---|