1 | /* |
2 | Copyright (c) 2012 Broadcom Europe Ltd |
3 | All rights reserved. |
4 | |
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the following conditions are met: |
7 | * Redistributions of source code must retain the above copyright |
8 | notice, this list of conditions and the following disclaimer. |
9 | * Redistributions in binary form must reproduce the above copyright |
10 | notice, this list of conditions and the following disclaimer in the |
11 | documentation and/or other materials provided with the distribution. |
12 | * Neither the name of the copyright holder nor the |
13 | names of its contributors may be used to endorse or promote products |
14 | derived from this software without specific prior written permission. |
15 | |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY |
20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ |
27 | |
28 | /* |
29 | * This file contains all the properties one can set in HDMI |
30 | * Each property has up to two parameters corresponding to list of enums one can set via |
31 | * the set/get property function from TV service (HOST) or HDMI middleware API (Videocore) |
32 | * Each property also has a default value for these parameters. Please refer to |
33 | * individual properties for details. |
34 | */ |
35 | |
36 | #ifndef _VC_HDMI_PROPERTY_H_ |
37 | #define _VC_HDMI_PROPERTY_H_ |
38 | #include "vcinclude/common.h" |
39 | |
40 | /** |
41 | * Property type |
42 | */ |
43 | typedef enum { |
44 | HDMI_PROPERTY_PIXEL_ENCODING = 0, /**< Set pixel encoding, value of property is HDMI_PIXEL_ENCODING_T, default is RGB full range (unless it is not supported) */ |
45 | HDMI_PROPERTY_PIXEL_CLOCK_TYPE = 1, /**< See HDMI_PIXEL_CLOCK_TYPE_T, default is HDMI_PIXEL_CLOCK_TYPE_PAL */ |
46 | HDMI_PROPERTY_CONTENT_TYPE = 2, /**< Set content type flag EDID_ContentType_T */ |
47 | HDMI_PROPERTY_FUZZY_MATCH = 3, /**< disable (0 - default) or enable (1) fuzzy format match */ |
48 | HDMI_PROPERTY_3D_STRUCTURE = 4, /**< Set the 3D structure of the next HDMI power on (only for CEA mode) */ |
49 | |
50 | //More properties to be added here |
51 | HDMI_PROPERTY_MAX /**< place holder */ |
52 | } HDMI_PROPERTY_T; |
53 | |
54 | /** |
55 | * Setting/getting a property |
56 | */ |
57 | typedef struct { |
58 | HDMI_PROPERTY_T property; |
59 | uint32_t param1; |
60 | uint32_t param2; |
61 | //More fields may be added here if required in future |
62 | } HDMI_PROPERTY_PARAM_T; |
63 | |
64 | /** |
65 | * PIXEL_ENCODING: param1: encoding type, param2: n/a |
66 | * Setting encoding type is subjected to support in EDID |
67 | */ |
68 | typedef enum { |
69 | HDMI_PIXEL_ENCODING_DEFAULT = 0, /**<Default, note that CEA modes (except VGA) default to RGB limited but DMT modes default to RGB full */ |
70 | HDMI_PIXEL_ENCODING_RGB_LIMITED, |
71 | HDMI_PIXEL_ENCODING_RGB_FULL, |
72 | HDMI_PIXEL_ENCODING_YCbCr444_LIMITED, |
73 | HDMI_PIXEL_ENCODING_YCbCr444_FULL, |
74 | /** YCbCr 422 are not used at the moment */ |
75 | HDMI_PIXEL_ENCODING_YCbCr422_LIMITED, |
76 | HDMI_PIXEL_ENCODING_YCbCr422_FULL, |
77 | HDMI_PIXEL_ENCODING_MAX /**<place holder */ |
78 | } HDMI_PIXEL_ENCODING_T; |
79 | |
80 | /** |
81 | * PIXEL_CLOCK_TYPE: param1: pixel clock type, param2: n/a |
82 | * Pixel clock nudge factor (set pixel clock type) |
83 | */ |
84 | typedef enum { |
85 | HDMI_PIXEL_CLOCK_TYPE_PAL = 0, /**< Use norminal pixel clock (default) */ |
86 | HDMI_PIXEL_CLOCK_TYPE_NTSC = 1, /**< Multiply norminal pixel clock by 1000/1001 to get the alternative frame rate e.g. 59.94Hz rather than 60, not applicable to all formats */ |
87 | HDMI_PIXEL_CLOCK_TYPE_MAX /**< place holder */ |
88 | } HDMI_PIXEL_CLOCK_TYPE_T; |
89 | |
90 | /** |
91 | * Content type: param1: EDID content type, param2: n/a |
92 | */ |
93 | /** |
94 | * Content type: the enum is the actual value in AVI infoframe + 1 |
95 | * because NODATA and Graphics both have value zero |
96 | */ |
97 | typedef enum { |
98 | EDID_ContentType_NODATA = 0x0, /**<Content type none */ |
99 | EDID_ContentType_Graphics = 0x1, /**<Graphics, ITC must be set to 1 */ |
100 | EDID_ContentType_Photo = 0x2, /**<Photo */ |
101 | EDID_ContentType_Cinema = 0x3, /**<Cinema */ |
102 | EDID_ContentType_Game = 0x4, /**<Game */ |
103 | EDID_ContentType_MAX /**<place holder */ |
104 | } EDID_ContentType_T; |
105 | |
106 | /** |
107 | * Fuzzy match: param1 zero (disabled) or non-zero (enabled), param2: n/a |
108 | * If enabled, match format in EDID based on resolutions and formats only |
109 | * Default is zero (disabled, so match on blanking periods and pixel clock) |
110 | * Set to non-zero to enable fuzzy match |
111 | */ |
112 | typedef enum { |
113 | EDID_FUZZY_MATCH_DISABLED = 0x0, |
114 | EDID_FUZZY_MATCH_ENABLED = 0x1, |
115 | EDID_FUZZY_MATCH_MAX |
116 | } EDID_FuzzyMatch_T; |
117 | |
118 | /** |
119 | * 3D structure: param1 - 3D structure (e.g. top/bottom side by side) (default value is none, i.e. 2D) |
120 | * param2 - n/a at the moment, may be used in the future |
121 | * |
122 | * 3D structure is auto reset to "2D" every time HDMI is power on. Only affect CEA formats. |
123 | */ |
124 | /* |
125 | * Matched to the 3d struct bit fields stored internally to represent 3D support in EDID |
126 | */ |
127 | typedef enum { |
128 | HDMI_3D_FORMAT_NONE = 0, /**<plain and simple 2D! */ |
129 | HDMI_3D_FORMAT_SBS_HALF = (1<<7), /**<side by side half horizontal */ |
130 | HDMI_3D_FORMAT_TB_HALF = (1<<6), /**<top and bottom half vertical */ |
131 | HDMI_3D_FORMAT_FRAME_PACKING = (1<<8), /**<frame packed */ |
132 | HDMI_3D_FORMAT_FRAME_SEQUENTIAL = (1<<9), /**<Output left on even frames and right on odd frames (typically 120Hz)*/ |
133 | /* More 3D structs, e.g. full frame packing, may be added here */ |
134 | HDMI_3D_FORMAT_INVALID = 0xFFFF |
135 | } HDMI_3D_FORMAT_T; |
136 | |
137 | #endif //_VC_HDMI_PROPERTY_H_ |
138 | |