| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2007-2011 Broadcom Corporation |
|---|
| 3 | * |
|---|
| 4 | * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | * |
|---|
| 14 | * Except as expressly set forth in the Authorized License, |
|---|
| 15 | * |
|---|
| 16 | * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | * |
|---|
| 20 | * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | * |
|---|
| 29 | * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | * ANY LIMITED REMEDY. |
|---|
| 37 | * |
|---|
| 38 | * $brcm_Workfile: nexus_component_output.h $ |
|---|
| 39 | * $brcm_Revision: 9 $ |
|---|
| 40 | * $brcm_Date: 7/25/11 3:00p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/modules/display/7400/include/nexus_component_output.h $ |
|---|
| 47 | * |
|---|
| 48 | * 9 7/25/11 3:00p jhaberf |
|---|
| 49 | * SWDTV-8043: added null_allowed attribute for some APIs |
|---|
| 50 | * |
|---|
| 51 | * 8 12/23/10 11:28a erickson |
|---|
| 52 | * SW7405-5070: added comment for SCART component output |
|---|
| 53 | * |
|---|
| 54 | * 7 5/14/09 9:02a erickson |
|---|
| 55 | * PR55101: add NEXUS_ComponentOutputSettings.dacs.RGB.noSync |
|---|
| 56 | * |
|---|
| 57 | * 6 4/11/08 11:05a erickson |
|---|
| 58 | * PR40157: add HSync option to ComponentOutput for VGA output |
|---|
| 59 | * |
|---|
| 60 | * 5 4/3/08 12:11p erickson |
|---|
| 61 | * PR41302: add MPAA decimation |
|---|
| 62 | * |
|---|
| 63 | * 4 2/6/08 12:42p vsilyaev |
|---|
| 64 | * PR 38682: Added attributes for the linux/kernel proxy mode |
|---|
| 65 | * |
|---|
| 66 | * 3 1/23/08 9:22p vobadm |
|---|
| 67 | * PR35457: update docs |
|---|
| 68 | * |
|---|
| 69 | * 2 1/23/08 2:39p erickson |
|---|
| 70 | * PR35457: update docs |
|---|
| 71 | * |
|---|
| 72 | * 1 1/18/08 2:16p jgarrett |
|---|
| 73 | * PR 38808: Merging to main branch |
|---|
| 74 | * |
|---|
| 75 | **************************************************************************/ |
|---|
| 76 | #ifndef NEXUS_COMPONENT_OUTPUT_H__ |
|---|
| 77 | #define NEXUS_COMPONENT_OUTPUT_H__ |
|---|
| 78 | |
|---|
| 79 | #include "nexus_display_types.h" |
|---|
| 80 | |
|---|
| 81 | #ifdef __cplusplus |
|---|
| 82 | extern "C" { |
|---|
| 83 | #endif |
|---|
| 84 | |
|---|
| 85 | /** |
|---|
| 86 | Summary: |
|---|
| 87 | Handle for the component video output interface. |
|---|
| 88 | **/ |
|---|
| 89 | typedef struct NEXUS_ComponentOutput *NEXUS_ComponentOutputHandle; |
|---|
| 90 | |
|---|
| 91 | /** |
|---|
| 92 | Summary: |
|---|
| 93 | Component colorspace options |
|---|
| 94 | |
|---|
| 95 | Description: |
|---|
| 96 | For SCART output, set the following: |
|---|
| 97 | NEXUS_ComponentOutputSettings settings; |
|---|
| 98 | settings.type = NEXUS_ComponentOutputType_eRGB; |
|---|
| 99 | settings.dacs.RGB.noSync = true; |
|---|
| 100 | **/ |
|---|
| 101 | typedef enum NEXUS_ComponentOutputType |
|---|
| 102 | { |
|---|
| 103 | NEXUS_ComponentOutputType_eRGB, |
|---|
| 104 | NEXUS_ComponentOutputType_eYPrPb |
|---|
| 105 | } NEXUS_ComponentOutputType; |
|---|
| 106 | |
|---|
| 107 | /** |
|---|
| 108 | Summary: |
|---|
| 109 | Settings for Component video output interface |
|---|
| 110 | |
|---|
| 111 | Description: |
|---|
| 112 | ComponentOutput also supports VGA output with an optional HSync DAC setting. |
|---|
| 113 | **/ |
|---|
| 114 | typedef struct NEXUS_ComponentOutputSettings |
|---|
| 115 | { |
|---|
| 116 | NEXUS_ComponentOutputType type; |
|---|
| 117 | union { |
|---|
| 118 | struct { |
|---|
| 119 | NEXUS_VideoDac dacY; |
|---|
| 120 | NEXUS_VideoDac dacPr; |
|---|
| 121 | NEXUS_VideoDac dacPb; |
|---|
| 122 | } YPrPb; |
|---|
| 123 | struct { |
|---|
| 124 | NEXUS_VideoDac dacGreen; |
|---|
| 125 | NEXUS_VideoDac dacRed; |
|---|
| 126 | NEXUS_VideoDac dacBlue; |
|---|
| 127 | NEXUS_VideoDac dacHSync; /* Optional. If you want to drive a VGA output with an hsync dac, set this to that dac. VSync will be automatically driven by HW if HSync is set. |
|---|
| 128 | For a RGB component output, set this to NEXUS_VideoDac_eNone and Hsync will be driven on green. |
|---|
| 129 | Set this to NEXUS_VideoDac_eNone and noSync to true if no Hsync on any dac. */ |
|---|
| 130 | bool noSync; /* If true, then there will be no Hsync on either green or an Hsync dac. */ |
|---|
| 131 | } RGB; |
|---|
| 132 | } dacs; |
|---|
| 133 | |
|---|
| 134 | bool mpaaDecimationEnabled; /* When MPAA decimation is enabled, a significant number of pixels in the output video |
|---|
| 135 | signal are replaced with values interpolated from neighboring pixels. |
|---|
| 136 | Therefore, video quality is lowered. */ |
|---|
| 137 | } NEXUS_ComponentOutputSettings; |
|---|
| 138 | |
|---|
| 139 | /* |
|---|
| 140 | Summary: |
|---|
| 141 | Get default settings for the structure. |
|---|
| 142 | |
|---|
| 143 | Description: |
|---|
| 144 | This is required in order to make application code resilient to the addition of new strucutre members in the future. |
|---|
| 145 | */ |
|---|
| 146 | void NEXUS_ComponentOutput_GetDefaultSettings( |
|---|
| 147 | NEXUS_ComponentOutputSettings *pSettings /* [out] Settings */ |
|---|
| 148 | ); |
|---|
| 149 | |
|---|
| 150 | /** |
|---|
| 151 | Summary: |
|---|
| 152 | Open a new Component video output interface |
|---|
| 153 | **/ |
|---|
| 154 | NEXUS_ComponentOutputHandle NEXUS_ComponentOutput_Open( /* attr{destructor=NEXUS_ComponentOutput_Close} */ |
|---|
| 155 | unsigned index, |
|---|
| 156 | const NEXUS_ComponentOutputSettings *pSettings /* attr{null_allowed=y} */ |
|---|
| 157 | ); |
|---|
| 158 | |
|---|
| 159 | /** |
|---|
| 160 | Summary: |
|---|
| 161 | Close the ComponentOutput interface |
|---|
| 162 | **/ |
|---|
| 163 | void NEXUS_ComponentOutput_Close( |
|---|
| 164 | NEXUS_ComponentOutputHandle output |
|---|
| 165 | ); |
|---|
| 166 | |
|---|
| 167 | /** |
|---|
| 168 | Summary: |
|---|
| 169 | Get current settings |
|---|
| 170 | **/ |
|---|
| 171 | void NEXUS_ComponentOutput_GetSettings( |
|---|
| 172 | NEXUS_ComponentOutputHandle output, |
|---|
| 173 | NEXUS_ComponentOutputSettings *pSettings /* [out] Settings */ |
|---|
| 174 | ); |
|---|
| 175 | |
|---|
| 176 | /** |
|---|
| 177 | Summary: |
|---|
| 178 | Apply new settings |
|---|
| 179 | **/ |
|---|
| 180 | NEXUS_Error NEXUS_ComponentOutput_SetSettings( |
|---|
| 181 | NEXUS_ComponentOutputHandle output, |
|---|
| 182 | const NEXUS_ComponentOutputSettings *pSettings |
|---|
| 183 | ); |
|---|
| 184 | |
|---|
| 185 | /** |
|---|
| 186 | Summary: |
|---|
| 187 | Returns the abstract NEXUS_VideoOutput connector for this Interface. |
|---|
| 188 | The NEXUS_VideoOutput connector is added to a Display in order to route that Displa's video to the output. |
|---|
| 189 | |
|---|
| 190 | Description: |
|---|
| 191 | Used in NEXUS_Display_AddOutput |
|---|
| 192 | **/ |
|---|
| 193 | NEXUS_VideoOutput NEXUS_ComponentOutput_GetConnector( |
|---|
| 194 | NEXUS_ComponentOutputHandle output |
|---|
| 195 | ); |
|---|
| 196 | |
|---|
| 197 | #ifdef __cplusplus |
|---|
| 198 | } |
|---|
| 199 | #endif |
|---|
| 200 | |
|---|
| 201 | #endif /* NEXUS_COMPONENT_OUTPUT_H__ */ |
|---|