| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2011, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bxdm_dih.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/2 $ |
|---|
| 12 | * $brcm_Date: 12/14/11 1:54p $ |
|---|
| 13 | * |
|---|
| 14 | * [File Description:] |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/commonutils/xdm/bxdm_dih.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/2 12/14/11 1:54p btosi |
|---|
| 21 | * SW7405-3984: added |
|---|
| 22 | * BXDM_DisplayInterruptHandler_(Set/Get)PictureProviderMode_isr |
|---|
| 23 | * |
|---|
| 24 | * Hydra_Software_Devel/1 2/16/10 10:50a nilesh |
|---|
| 25 | * SW7405-2993: Initial XDM version |
|---|
| 26 | * |
|---|
| 27 | ***************************************************************************/ |
|---|
| 28 | |
|---|
| 29 | #ifndef BXDM_DIH_H_ |
|---|
| 30 | #define BXDM_DIH_H_ |
|---|
| 31 | |
|---|
| 32 | #include "bxdm.h" |
|---|
| 33 | |
|---|
| 34 | #ifdef __cplusplus |
|---|
| 35 | extern "C" { |
|---|
| 36 | #endif |
|---|
| 37 | |
|---|
| 38 | #if 0 |
|---|
| 39 | } |
|---|
| 40 | #endif |
|---|
| 41 | |
|---|
| 42 | typedef struct BXDM_DisplayInterruptHandler_P_Context *BXDM_DisplayInterruptHandler_Handle; |
|---|
| 43 | |
|---|
| 44 | typedef struct BXDM_DisplayInterruptHandler_AddPictureProviderInterface_Settings |
|---|
| 45 | { |
|---|
| 46 | uint32_t uiVDCRectangleNumber; |
|---|
| 47 | } BXDM_DisplayInterruptHandler_AddPictureProviderInterface_Settings; |
|---|
| 48 | |
|---|
| 49 | /* BXDM_DisplayInterruptHandler_Create creates an instance |
|---|
| 50 | * of a Display Interrupt Handle (DIH). Typically, there is |
|---|
| 51 | * one DIH for each Display Interrupt Provider (DIP) module |
|---|
| 52 | */ |
|---|
| 53 | BERR_Code |
|---|
| 54 | BXDM_DisplayInterruptHandler_Create( |
|---|
| 55 | BXDM_DisplayInterruptHandler_Handle *phXdmDih |
|---|
| 56 | ); |
|---|
| 57 | |
|---|
| 58 | BERR_Code |
|---|
| 59 | BXDM_DisplayInterruptHandler_Destroy( |
|---|
| 60 | BXDM_DisplayInterruptHandler_Handle hXdmDih |
|---|
| 61 | ); |
|---|
| 62 | |
|---|
| 63 | BERR_Code |
|---|
| 64 | BXDM_DIH_AddPictureProviderInterface_GetDefaultSettings ( |
|---|
| 65 | BXDM_DisplayInterruptHandler_AddPictureProviderInterface_Settings *pstDefSettings |
|---|
| 66 | ); |
|---|
| 67 | |
|---|
| 68 | /* BXDM_DisplayInterruptHandler_AddPictureProviderInterface is used by the application |
|---|
| 69 | * to register a Picture Provider (PP) with the Display Interrupt Handler (DIH). The DIH |
|---|
| 70 | * will call into the PP on each Picture Data Ready ISR and provide it the |
|---|
| 71 | * Display Interrupt Info. The PP will provide a linked list of BAVC_MFD_Picture structs |
|---|
| 72 | */ |
|---|
| 73 | BERR_Code |
|---|
| 74 | BXDM_DisplayInterruptHandler_AddPictureProviderInterface( |
|---|
| 75 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 76 | BXDM_DisplayInterruptHandler_PictureProvider_isr fCallback, |
|---|
| 77 | void * pPrivateContext, |
|---|
| 78 | BXDM_DisplayInterruptHandler_AddPictureProviderInterface_Settings *patDefSettings |
|---|
| 79 | ); |
|---|
| 80 | |
|---|
| 81 | BERR_Code |
|---|
| 82 | BXDM_DisplayInterruptHandler_RemovePictureProviderInterface( |
|---|
| 83 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 84 | BXDM_DisplayInterruptHandler_PictureProvider_isr fCallback, |
|---|
| 85 | void *pPrivateContext |
|---|
| 86 | ); |
|---|
| 87 | |
|---|
| 88 | /* BXDM_DisplayInterruptHandler_Callback_isr is passed to the |
|---|
| 89 | * Display Interrupt Provider (DIP). In this callback, the DIH |
|---|
| 90 | * will cycle through each Picture Provider (PP) that is registered |
|---|
| 91 | * and create a super-linked list of BAVC_MFD_Picture structs that |
|---|
| 92 | * is then provided to the installed PictureDataReady callback handler |
|---|
| 93 | */ |
|---|
| 94 | BERR_Code |
|---|
| 95 | BXDM_DisplayInterruptHandler_Callback_isr( |
|---|
| 96 | void *pPrivateContext, |
|---|
| 97 | BXDM_DisplayInterruptInfo *pstDisplayInterruptInfo ); |
|---|
| 98 | |
|---|
| 99 | /* BXDM_DisplayInterruptHandler_PictureDataReady_isr is the typedef for |
|---|
| 100 | * the function that needs to receive the the BAVC_MFD_Picture linked list. |
|---|
| 101 | * This typedef matches the prototype for BVDC_Source_MpegDataReady() |
|---|
| 102 | */ |
|---|
| 103 | typedef BERR_Code (*BXDM_DisplayInterruptHandler_PictureDataReady_isr)( |
|---|
| 104 | void *pPrivateContext, |
|---|
| 105 | int32_t iPrivateParam, |
|---|
| 106 | BAVC_MFD_Picture *pMFDPicture ); |
|---|
| 107 | |
|---|
| 108 | /* BXDM_DisplayInterruptHandler_InstallCallback_PictureDataReadyInterrupt is used |
|---|
| 109 | * by the app to register it's MAVC_MFD_Picture handler. |
|---|
| 110 | * Typically, this will be BVDC_Source_MpegDataReady() |
|---|
| 111 | */ |
|---|
| 112 | BERR_Code |
|---|
| 113 | BXDM_DisplayInterruptHandler_InstallCallback_PictureDataReadyInterrupt( |
|---|
| 114 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 115 | BXDM_DisplayInterruptHandler_PictureDataReady_isr fCallback, |
|---|
| 116 | void *pPrivateContext, |
|---|
| 117 | int32_t iPrivateParam |
|---|
| 118 | ); |
|---|
| 119 | |
|---|
| 120 | BERR_Code |
|---|
| 121 | BXDM_DisplayInterruptHandler_UnInstallCallback_PictureDataReadyInterrupt( |
|---|
| 122 | BXDM_DisplayInterruptHandler_Handle hXdmDih |
|---|
| 123 | ); |
|---|
| 124 | |
|---|
| 125 | /* BXDM_DisplayInterruptHandler_Display_isr is the typedef for |
|---|
| 126 | * the function that needs to receive a callback for each display interrupt. |
|---|
| 127 | */ |
|---|
| 128 | typedef void (*BXDM_DisplayInterruptHandler_Display_isr)( |
|---|
| 129 | void *pPrivateContext, |
|---|
| 130 | int32_t iPrivateParam, |
|---|
| 131 | void *Unused |
|---|
| 132 | ); |
|---|
| 133 | |
|---|
| 134 | /* BXDM_DisplayInterruptHandler_InstallCallback_DisplayInterrupt is used |
|---|
| 135 | * by the app to register a callback for the each display interupt. |
|---|
| 136 | */ |
|---|
| 137 | BERR_Code |
|---|
| 138 | BXDM_DisplayInterruptHandler_InstallCallback_DisplayInterrupt( |
|---|
| 139 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 140 | BXDM_DisplayInterruptHandler_Display_isr fCallback, |
|---|
| 141 | void *pPrivateContext, |
|---|
| 142 | int32_t iPrivateParam |
|---|
| 143 | ); |
|---|
| 144 | |
|---|
| 145 | BERR_Code |
|---|
| 146 | BXDM_DisplayInterruptHandler_UnInstallCallback_DisplayInterrupt( |
|---|
| 147 | BXDM_DisplayInterruptHandler_Handle hXdmDih |
|---|
| 148 | ); |
|---|
| 149 | |
|---|
| 150 | /* SW7405-3984: the Set/Get mode API's provide a way to disable |
|---|
| 151 | * a PictureProvide (XDM) without unregistering it from the DIP. |
|---|
| 152 | * When a PictureProvider is "disabled", the associated callback |
|---|
| 153 | * will not be executed by in BXDM_DisplayInterruptHandler_Callback_isr. |
|---|
| 154 | */ |
|---|
| 155 | typedef enum BXDM_DisplayInterruptHandler_PictureProviderMode |
|---|
| 156 | { |
|---|
| 157 | BXDM_DisplayInterruptHandler_PictureProviderMode_eDisabled=0, |
|---|
| 158 | BXDM_DisplayInterruptHandler_PictureProviderMode_eEnabled, |
|---|
| 159 | |
|---|
| 160 | BXDM_DisplayInterruptHandler_PictureProviderMode_eMax |
|---|
| 161 | } BXDM_DisplayInterruptHandler_PictureProviderMode; |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | BERR_Code |
|---|
| 165 | BXDM_DisplayInterruptHandler_SetPictureProviderMode_isr( |
|---|
| 166 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 167 | BXDM_DisplayInterruptHandler_PictureProvider_isr fCallback, |
|---|
| 168 | void * pPrivateContext, |
|---|
| 169 | BXDM_DisplayInterruptHandler_PictureProviderMode eMode |
|---|
| 170 | ); |
|---|
| 171 | |
|---|
| 172 | BERR_Code |
|---|
| 173 | BXDM_DisplayInterruptHandler_GetPictureProviderMode_isr( |
|---|
| 174 | BXDM_DisplayInterruptHandler_Handle hXdmDih, |
|---|
| 175 | BXDM_DisplayInterruptHandler_PictureProvider_isr fCallback, |
|---|
| 176 | void * pPrivateContext, |
|---|
| 177 | BXDM_DisplayInterruptHandler_PictureProviderMode * peMode |
|---|
| 178 | ); |
|---|
| 179 | |
|---|
| 180 | #ifdef __cplusplus |
|---|
| 181 | } |
|---|
| 182 | #endif |
|---|
| 183 | |
|---|
| 184 | #endif /* BXDM_DIH_H_ */ |
|---|