source: svn/newcon3bcm2_21bu/magnum/portinginterface/hdm/7552/bhdm_edid.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 53.6 KB
Line 
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_edid.h $
11 * $brcm_Revision: Hydra_Software_Devel/52 $
12 * $brcm_Date: 3/19/12 11:34a $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: Q:/projects/7425/latest/magnum/portinginterface/hdm/7038/bhdm_edid.h $
19 *
20 * Hydra_Software_Devel/52   3/19/12 11:34a rgreen
21 * SW7425-2650: Fix memory leak in HDM PI; Delcare/store supported Video
22 * ID Codes in hdm handlle vs mallocing to build list each time
23 *
24 * Hydra_Software_Devel/51   6/17/11 1:42p vle
25 * SW7405-5358, SW7405-5312: Separate 3D support from EDID parser to allow
26 * easier back port
27 *
28 * Hydra_Software_Devel/50   8/19/10 6:28p vle
29 * SW7335-815: Fix error passing bool by value instead of reference
30 *
31 * Hydra_Software_Devel/49   6/22/10 6:57p vle
32 * SW7405-3994: Add support to parse all Shorthand and additional 3D
33 * Timing/Structure support indication in HDMI 1.4a
34 *
35 * Hydra_Software_Devel/48   6/4/10 6:09p vle
36 * SW7405-3994: Merge to main branch
37 *
38 * Hydra_Software_Devel/SW7405-3994/1   5/14/10 6:12p vle
39 * SW7405-3994: Add support to check for supported 3D formats.
40 *
41 * Hydra_Software_Devel/47   5/11/10 7:14p vle
42 * SW7405-3994: Add topAndBottom 3D Structure
43 *
44 * Hydra_Software_Devel/46   5/7/10 5:45p rgreen
45 * SW7405-3994: Update EDID parsing for 3D structure
46 *
47 * Hydra_Software_Devel/45   4/23/10 10:43a vle
48 * SW7420-676: merge to main branch
49 *
50 * Hydra_Software_Devel/SW7420-676/1   4/21/10 2:27p vle
51 * SW7420-676: Add API to return supported video info
52 *
53 * Hydra_Software_Devel/44   4/5/10 10:18a rgreen
54 * SW7405-3994: Merge support for parsing HDMI 1.4 EDID VSDB
55 *
56 * Hydra_Software_Devel/SW7401-4363/3   3/5/10 4:11p rgreen
57 * JIRA:SW7405-3994: Update HDMI 1.4 parsing for 3D Structure fields in
58 * the VSDB
59 *
60 * Hydra_Software_Devel/SW7401-4363/2   3/1/10 7:23p rgreen
61 * SW7401-4363: Update the EDID parsing of the Vendor Specific Data Block
62 *
63 * Hydra_Software_Devel/SW7401-4363/1   3/1/10 3:36p rgreen
64 * SW7401-4363: Add Support to parse 3D information in the VSDB portion of the EDID
65 *
66 * Hydra_Software_Devel/43   1/21/10 5:20p vle
67 * SW7601-174: Max_TMDS_Clock_Rate needs to be 16-bit to prevent possible
68 * overflow
69 *
70 * Hydra_Software_Devel/42   12/23/08 8:06p vle
71 * PR50081,PR49866: Merge to main branch
72 * Add new API allowing application to get the device physical address
73 * even without CEC support.
74 * Add deep color support.
75 *
76 * Hydra_Software_Devel/PR50081/2   12/11/08 2:24p vle
77 * PR49866: Add new API allowing application to get the device physical
78 * address even without CEC support.
79 *
80 * Hydra_Software_Devel/PR50081/1   12/8/08 5:30p vle
81 * PR50081: add deep color support.
82 *
83 * Hydra_Software_Devel/41   10/24/08 5:56p vle
84 * PR 44535: Merge from bdvd v2.0 branch
85 *
86 * Hydra_Software_Devel/40   3/18/08 2:34p rgreen
87 * PR39705,PR36978: Support reading CEA Timing Extenstion V4 as V3
88 * Add typedef for SpeakerDB
89 *
90 * Hydra_Software_Devel/39   5/24/07 12:15p vle
91 * PR 31570: Add capability to parse CEA Colorimetry Data Block
92 *
93 * Hydra_Software_Devel/38   2/15/07 2:48p vle
94 * PR 27746: Added Support to EDID parser to process VSDB fields contained
95 * in HDMI 1.3
96 *
97 * Hydra_Software_Devel/37   1/29/07 6:48p vle
98 * PR 26912: Change to a more appropriate error code name,
99 * BHDM_EDID_DETAILTIMING_NOT_SUPPORTED
100 *
101 * Hydra_Software_Devel/36   1/11/07 6:38p vle
102 * PR 26877: Added Dummy descriptor tag.
103 *
104 * Hydra_Software_Devel/35   9/20/06 9:53p rgreen
105 * PR24304: Clean up debug output for EDID dump. Fix mislabeled vertical
106 * parameters (lines vs pixels)
107 *
108 * Hydra_Software_Devel/34   6/22/06 2:34p rgreen
109 * PR22104: Add BHDM_EDID_GetSupportedColorimetry function to return
110 * preferred *and* supported format.  Use instead of BHDM_GetColorimetry
111 *
112 * Hydra_Software_Devel/33   9/23/05 4:59p rgreen
113 * PR17297: Relax EDID checking;
114 *
115 * Hydra_Software_Devel/32   7/28/05 6:05p rgreen
116 * PR14853: Use CEA861 Video Descriptors to determine format when Detailed
117 * Timings contain PC formats
118 *
119 * Hydra_Software_Devel/31   6/30/05 4:28p rgreen
120 * PR14847: Modify HMI PI / Settop API to detect/configure audio
121 * configuration
122 *
123 * Hydra_Software_Devel/30   4/1/05 1:27p rgreen
124 * PR14616: Fix I2C redumdant reads
125 * Add support to Parse EDID Timing Extensions V1 and V2
126 *
127 * Hydra_Software_Devel/29   3/25/05 4:26p rgreen
128 * PR14616: Reduce Redundant i2c Reads
129 *
130 * Hydra_Software_Devel/28   3/18/05 7:27p rgreen
131 * PR8896: Add HDMI 1.1 support to read AI flag VSDB
132 * Remove depracated ResetLastEdidBlockRead
133 *
134 * Hydra_Software_Devel/27   2/14/05 1:43p rgreen
135 * PR12560:
136 * Add support for computer video formats which may be found
137 * in EDID Established Timing bytes
138 *
139 * Hydra_Software_Devel/26   1/26/05 7:23p rgreen
140 * PR13857,PR8896:
141 * Fix Compilation warnings.
142 * enclose debug functions/statements within if  BDBG_DEBUG_BUILD defines
143 *
144 * Use BFMT_GetVideoFormatInfoPtr vs BFMT_GetVideoFormatInfo.
145 *
146 * Modify BHDM_EDID_CheckRxHdmiAudioSupport to return 'Supported'
147 * argument;
148 * Use return code as function status return
149 *
150 * Hydra_Software_Devel/25   12/20/04 4:21p marcusk
151 * PR13506: Replaced all occurances of BAVC_AspectRatio with
152 * BFMT_AspectRatio
153 *
154 * Hydra_Software_Devel/24   11/5/04 5:45p rgreen
155 * PR13175: Fix IEEE Registration comparison; use char strings vs integers
156 * to avoid endian comparison problems
157 *
158 * Hydra_Software_Devel/23   10/18/04 11:58a rgreen
159 * PR8896: Add API function to retrieve Rx Monitor name from the EDID
160 *
161 * Hydra_Software_Devel/22   10/4/04 8:58p rgreen
162 * PR12090: Support 50 Hz Formats; add EDID ByPass Flag
163 *
164 * Hydra_Software_Devel/21   9/10/04 7:17p rgreen
165 * PR12090:
166 * Add BHDM_EDID_VideoFmtSupported to check for supported eVideoFmt
167 *
168 * Hydra_Software_Devel/20   7/16/04 5:26p rgreen
169 * PR 8896: HDMI Development / Test
170 * Add header for BDHM_EDID_Initialize function; will replace
171 * BHDM_EDID_ResetLastEdidBlockRead(
172 *
173 * Hydra_Software_Devel/19   4/22/04 7:14p rgreen
174 * PR8896: HDMI Development
175 * add functionality to reduce repetitive EDID reads.
176 * Add EDID debugging message (EDID) dump
177 *
178 * Hydra_Software_Devel/18   3/31/04 6:17p rgreen
179 * PR8896: HDMI API Development/Test
180 * Rename BHDM_EDDI_DESC_DATA_SIZE to BHDM_EDID_ASCII_STRING_LEN
181 * Add BHDM_EDID_GetSupportedVideoFormats
182 *
183 * Hydra_Software_Devel/17   1/26/04 11:42a rgreen
184 * PR8896: HDMI API Development/Test
185 * Add bHdmiDevice parameter to BHDM_EDID_IsRxDeviceHdmi to be used to
186 * determine if the
187 * attached receiver is Hdmi capablefor; the function result is used for
188 * success/failure
189 * of the function call.
190 *
191 * Remove BHDM_EDID_HDMI_VSDB_NOT_FOUND return code
192 *
193 * Hydra_Software_Devel/16   12/15/03 5:07p rgreen
194 * PR8896:
195 * Use new BHDM_EDID_RxVendorSpecificDB as parameter to
196 * BHDM_IsRxDeviceHdmi
197 * Update header documentation
198 *
199 * Hydra_Software_Devel/15   11/21/03 10:40a rgreen
200 * Add function BHDM_EDID_CheckRxHdmiVideoSupport
201 * Modifications to BHDM_EDID_CheckRxHdmiAudioSupport
202 *
203 * Hydra_Software_Devel/14   11/14/03 5:10p rgreen
204 * Add BAVC constants for checking if BCM Audio is Supported in the Rx
205 * Device
206 * See new function BHDM_EDID_CheckRxHdmiAudioSupport
207 *
208 * Add define constants for CEA bytes in the EDID  Timing Extensions
209 * Add HdmiData structure for use with new BHDM_EDID_IsRxDeviceHdmi
210 * function
211 *
212 * Hydra_Software_Devel/13   10/27/03 2:24p rgreen
213 * Add define values for EDID (Descriptors, etc.)
214 *
215 * Hydra_Software_Devel/12   10/6/03 8:32p rgreen
216 * Integrate API Review Comments
217 *
218 * Hydra_Software_Devel/11   9/30/03 5:07p lseverin
219 * fixed a few documentation (DocJet) warnings
220 *
221 * Hydra_Software_Devel/10   9/24/03 8:37p rgreen
222 * Changes to reflect internal HDMI review comments.
223 *
224 * Hydra_Software_Devel/9   4/15/03 6:01p rgreen
225 * Documentation Updates
226 *
227 * Hydra_Software_Devel/8   4/14/03 2:51p rgreen
228 * Documentation Updates
229 *
230 * Hydra_Software_Devel/7   3/27/03 5:05p rgreen
231 * Documentation Update
232 *
233 * Hydra_Software_Devel/6   3/27/03 4:54p rgreen
234 * Documentation Updates
235 *
236 * Hydra_Software_Devel/5   3/25/03 5:48p rgreen
237 * Fix EDID Data structure documentation
238 *
239 * Hydra_Software_Devel/3   3/20/03 6:01p rgreen
240 * Use StandardNamingConventions on enumeration types
241 *
242 * Hydra_Software_Devel/2   3/13/03 12:02p rgreen
243 * Update return codes for functions; Add module overview
244 *
245 * Hydra_Software_Devel/1   3/7/03 1:24p rgreen
246 * Beta Release of HDMI API
247 *
248 ***************************************************************************/
249#ifndef BHDM_EDID_H__
250#define BHDM_EDID_H__
251
252#include "bhdm.h"
253#include "bavc.h"
254
255/*=************************ Module Overview ********************************
256  The EDID (Enhanced Display Identification Data) functions provide support
257  for reading/interpretting the EDID prom contained in the DVI/HDMI Receiver.
258
259  The PROM has an I2C address of 0xA0.  These functions support the Enhanced
260  DDC protocol as needed.
261***************************************************************************/
262
263/************************************************************************
264Memory Requirements
265
266The Memory Requirements
267TBD
268***************************************************************************/
269
270
271#ifdef __cplusplus
272extern "C" {
273#endif
274
275#define BHDM_EDID_I2C_ADDR 0x50
276
277#define BHDM_EDID_NOT_IMPLEMENTED         BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  0)
278#define BHDM_EDID_NOT_FOUND               BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  1)
279#define BHDM_EDID_CHECKSUM_ERROR          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  2)
280#define BHDM_EDID_BLOCK_NOT_FOUND         BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  3)
281#define BHDM_EDID_DETAILTIMING_NOT_SUPPORTED  BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  4)
282#define BHDM_EDID_DESCRIPTOR_NOT_FOUND    BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  5)
283#define BHDM_EDID_INVALID_DESCRIPTOR_FOUND \
284                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  6)
285#define BHDM_EDID_MONITOR_RANGE_NOT_FOUND BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  7)
286#define BHDM_EDID_ERROR                   BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  8)
287#define BHDM_EDID_EXT_VERSION_NOT_SUPPORTED \
288                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+  9)
289#define BERR_EDID_NOT_ENOUGH_MEM          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 10)
290
291#define BHDM_EDID_HDMI_VSDB_REGID_ERROR   BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 11)
292#define BHDM_EDID_HDMI_UNKNOWN_CEA_TAG    BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 12)
293#define BHDM_EDID_HDMI_UNKNOWN_BIT_RATE   BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 13)
294#define BHDM_EDID_HDMI_AUDIO_FORMAT_UNSUPPORTED \
295                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 14)
296#define BHDM_EDID_HDMI_VIDEO_FORMAT_UNSUPPORTED \
297                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 15)
298#define BHDM_EDID_HDMI_NOT_SUPPORTED      BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 16)
299#define BHDM_EDID_VIDEO_FORMATS_UNAVAILABLE \
300                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 18)
301#define BHDM_EDID_AUDIO_FORMATS_UNAVAILABLE \
302                                          BERR_MAKE_CODE(BERR_HDM_ID, BHDM_EDID_ERRS+ 19)
303
304
305                                                       
306
307
308
309
310#define BHDM_EDID_BLOCKSIZE  128
311
312#define BHDM_EDID_HEADER           0x00
313#define BHDM_EDID_HEADER_SIZE      0x08
314
315#define BHDM_EDID_VENDOR_ID        0x08
316#define BHDM_EDID_PRODUCT_ID       0x0A
317#define BHDM_EDID_SERIAL_NO        0x0C
318#define BHDM_EDID_MANUFACTURE_WEEK 0x10
319#define BHDM_EDID_MANUFACTURE_YEAR 0x11
320#define BHDM_EDID_VERSION     0x12
321#define BHDM_EDID_REVISION    0x13
322#define BHDM_EDID_VIDEO_DEF        0x14
323#define BHDM_EDID_MAX_HORIZ_SIZE   0x15
324#define BHDM_EDID_MAX_VERT_SIZE    0x16
325#define BHDM_EDID_GAMMA            0x17
326#define BHDM_EDID_FEATURE_SUPPORT  0x18
327
328#define BHDM_EDID_ESTABLISHED_TIMINGS1 0x23
329        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_800x600_60HZ   0x01
330        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_800x600_56HZ   0x02
331        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_640x480_75HZ   0x04
332        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_640x480_72HZ   0x08
333        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_640x480_67HZ   0x10
334        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_640x480_60HZ   0x20
335        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_720x400_88HZ   0x40
336        #define BHDM_EDID_ESTABLISHED_TIMINGS_1_720x400_70HZ   0x80 
337
338#define BHDM_EDID_ESTABLISHED_TIMINGS2 0x24
339        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_1280x1024_75HZ 0x01
340        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_1024x768_75HZ  0x02
341        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_1024x768_70HZ  0x04
342        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_1024x768_60HZ  0x08
343        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_1024x768_87HZI 0x10
344        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_832x624_75HZ   0x20
345        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_800x600_75HZ   0x40
346        #define BHDM_EDID_ESTABLISHED_TIMINGS_2_800x600_72HZ   0x80
347
348#define BHDM_EDID_RESERVED_TIMINGS    0x25
349
350#define BHDM_EDID_STD_TIMING_1        0x26
351#define BHDM_EDID_STD_TIMING_2        0x28
352#define BHDM_EDID_STD_TIMING_3        0x2A
353#define BHDM_EDID_STD_TIMING_4        0x2C
354#define BHDM_EDID_STD_TIMING_5        0x2E
355#define BHDM_EDID_STD_TIMING_6        0x30
356#define BHDM_EDID_STD_TIMING_7        0x32
357#define BHDM_EDID_STD_TIMING_8        0x34
358
359#define BHDM_EDID_MONITOR_DESC_1      0x36 
360#define BHDM_EDID_MONITOR_DESC_SIZE   18
361
362        /* if descriptor is not DETAILED TIMING initial first bytes are:
363         *
364         *       0x00  0x01  0x02  0x03  0x04
365         *       ----  ----  ----  ----  ----
366         *
367         *              {0x00, 0x00, 0x00, 0xFF, 0x00}, // Monitor Serial Number
368         *              {0x00, 0x00, 0x00, 0xFE, 0x00}, // ASCII String
369         *              {0x00, 0x00, 0x00, 0xFD, 0x00}, // Monitor Range Limits
370         *              {0x00, 0x00, 0x00, 0xFC, 0x00}, // Monitor Name (ASCII)
371         *              {0x00, 0x00, 0x00, 0xFB, 0x00}, // Color Point Data
372         *              {0x00, 0x00, 0x00, 0xFA, 0x00}, // Additional Standard Timings
373         *                                                      // F9 - 11 Unused
374         *                                                  // 0F - 00 Manufacturer Descriptor
375         *              {0x00, 0x00, 0x00, 0x10, 0x00}, // Additional Standard Timings
376         */
377
378        #define BHDM_EDID_DESC_TAG 0x03
379                        #define BHDM_EDID_TAG_MONITOR_NAME  0xFC
380                        #define BHDM_EDID_TAG_MONITOR_ASCII 0xFE  /* ASCII String */
381                        #define BHDM_EDID_TAG_MONITOR_SN    0xFF  /* Serial Number */
382
383                        #define BHDM_EDID_TAG_MONITOR_RANGE 0xFD
384                        #define BHDM_EDID_TAG_DUMMY_DESC 0x10   /* Dummy descriptor, indicate that the descriptor space is unsed */
385
386        #define BHDM_EDID_DESC_DATA 0x05
387        #define BHDM_EDID_DESC_ASCII_STRING_LEN 13
388        #define BHDM_EDID_DESC_HEADER_LEN 0x05
389
390
391        #define BHDM_EDID_DESC_PIXEL_CLOCK_LO  0x00
392        #define BHDM_EDID_DESC_PIXEL_CLOCK_HI  0x01
393
394        #define BHDM_EDID_DESC_HACTIVE_PIXELS_LSB   0x02
395        #define BHDM_EDID_DESC_HBLANK_PIXELS_LSB    0x03
396        #define BHDM_EDID_DESC_HACTIVE_PIXELS_UN_F0 0x04
397        #define BHDM_EDID_DESC_HBLANK_PIXELS_UN_0F  0x04
398
399        #define BHDM_EDID_DESC_VACTIVE_LINES_LSB   0x05
400        #define BHDM_EDID_DESC_VBLANK_LINES_LSB    0x06
401        #define BHDM_EDID_DESC_VACTIVE_LINES_UN_F0 0x07
402        #define BHDM_EDID_DESC_VBLANK_LINES_UN_0F  0x07
403
404        #define BHDM_EDID_DESC_HSYNC_OFFSET_LSB    0x08
405        #define BHDM_EDID_DESC_HSYNC_WIDTH_LSB     0x09
406        #define BHDM_EDID_DESC_VSYNC_OFFSET_LN_F0  0x0A
407        #define BHDM_EDID_DESC_VSYNC_WIDTH_LN_0F   0x0A
408
409        #define BHDM_EDID_DESC_HSYNC_OFFSET_U2_C0  0x0B
410        #define BHDM_EDID_DESC_HSYNC_WIDTH_U2_30   0x0B
411        #define BHDM_EDID_DESC_VSYNC_OFFSET_U2_0C  0x0B
412        #define BHDM_EDID_DESC_VSYNC_WIDTH_U2_03   0x0B
413
414        #define BHDM_EDID_DESC_HSIZE_MM_LSB        0x0C
415        #define BHDM_EDID_DESC_VSIZE_MM_LSB        0x0D
416        #define BHDM_EDID_DESC_HSIZE_UN_F0         0x0E
417        #define BHDM_EDID_DESC_VSIZE_UN_0F         0x0E
418
419        #define BHDM_EDID_DESC_HBORDER_PIXELS      0x0F
420        #define BHDM_EDID_DESC_VBORDER_LINES       0x10
421        #define BHDM_EDID_DESC_PREFERRED_FLAGS     0x11
422
423        /* MONITOR RANGE DESCRIPTOR OFFSETS */
424        #define BHDM_EDID_DESC_RANGE_MIN_V_RATE    0x05
425        #define BHDM_EDID_DESC_RANGE_MAX_V_RATE    0x06
426        #define BHDM_EDID_DESC_RANGE_MIN_H_RATE    0x07
427        #define BHDM_EDID_DESC_RANGE_MAX_H_RATE    0x08
428        #define BHDM_EDID_DESC_RANGE_MAX_PCLOCK    0x09
429
430        #define EDID_DESC_TIMING_FORMULA      0x0A
431
432#define BHDM_EDID_EXTENSION               0x7E
433#define BHDM_EDID_CHECKSUM                0x7F   /* Checksum 7F */
434
435#define BHDM_EDID_EXT_TAG            0x00
436        #define BHDM_EDID_EXT_LCD_TIMINGS          0x01
437        #define BHDM_EDID_EXT_TIMING_DATA              0x02
438        #define BHDM_EDID_EXT_EDID_2_0             0x20
439        #define BHDM_EDID_EXT_COLOR_INFO           0x30
440        #define BHDM_EDID_EXT_DVI_FEATURE          0x40
441        #define BHDM_EDID_EXT_TOUCH_SCREEN         0x50
442        #define BHDM_EDID_EXT_BLOCK_MAP            0xF0
443        #define BHDM_EDID_EXT_MANUFACTURER         0xFF
444
445#define BHDM_EDID_MAX_BLOCK_MAP_EXTENSIONS      0xFF
446
447#define BHDM_EDID_EXT_VERSION                  0x01
448        #define BHDM_EDID_TIMING_VERSION_1             0x01
449        #define BHDM_EDID_TIMING_VERSION_2             0x02
450        #define BHDM_EDID_TIMING_VERSION_3             0x03
451        #define BHDM_EDID_TIMING_VERSION_4             0x04
452#define BHDM_EDID_EXT_DATA_OFFSET              0x02
453#define BHDM_EDID_EXT_MONITOR_SUPPORT          0x03
454#define BHDM_EDID_EXT_DATA_BLOCK_COLLECTION    0x04
455
456#define BHDM_EDID_EXT_CHECKSUM                 0x7F
457
458#define BHDM_EDID_MAX_CEA_VIDEO_ID_CODES 64
459
460
461/******************************************************************************
462Summary:
463Data structure containing basic data contained in the monitor's EDID PROM.
464
465Description:
466Each monitor has an embedded PROM at I2C address 0x50.  The data contained at
467this address is parsed and stored in this structure.
468
469See Also:
470        o BHDM_EDID_GetBasicData
471*******************************************************************************/
472typedef struct BHDM_EDID_BasicData
473{
474   uint8_t VendorID[2] ;  /* Vendor ID from Microsoft; compressed ASCII */
475   uint8_t ProductID[2] ; /* Product ID assigned by Vendor */
476   uint8_t SerialNum[4] ; /* Serial # assigned by Vendor; may be undefined */
477   uint8_t ManufWeek ;    /* Week of Manufture (1..53)          */
478   uint16_t ManufYear ;   /* Year of Manufacture + 1990         */
479   uint8_t EdidVersion ;  /* Version of Edid (version 1 or 2)   */
480   uint8_t EdidRevision ; /* Revision of Edid 1.3 or 2.0        */
481   uint8_t MaxHorizSize ; /* Max Horizontal Image size in cm.   */
482   uint8_t MaxVertSize ;  /* Max Vertical Image size in cm.     */
483   uint8_t Extensions ;   /* Number of 128 byte EDID extensions */
484
485   uint8_t features;      /* Features are not supported; standby,suspend, etc */
486
487} BHDM_EDID_BasicData ;
488
489
490/******************************************************************************
491Summary:
492Data structure containing Detail Timing data contained in a monitor's EDID
493PROM.
494
495Description:
496Each monitor has an embedded PROM at I2C address 0x50.  The data can contain
497several detail timing descriptions which describe what timings the monitor
498can support.  The timing data is parsed and stored in this structure.
499
500See Also:
501        o BHDM_EDID_GetDetailTiming
502*******************************************************************************/
503typedef struct BHDM_EDID_DetailTiming
504{
505   uint16_t PixelClock ;          /* Pixel Clock / 10000 */
506
507   uint16_t HorizActivePixels ;   /* Horizontal Active Pixels */
508   uint16_t HorizBlankingPixels ; /* Horizontal Blanking Pixels */
509
510   /* vertical arguments are lines, not pixels */
511   /* keep old names for compilation purposes */
512   uint16_t VerticalActiveLines ;        /* Vertical Active Lines */ 
513   uint16_t VerticalBlankingLines ; /* Vertical Blanking Lines */
514   
515   uint16_t VerticalActivePixels ;       /* Vertical Active Pixels */ 
516   uint16_t VerticalBlankingPixels ; /* Vertical Blanking Pixels */
517
518   uint16_t HSyncOffset ;  /* Pixels, from blanking starts */
519   uint16_t HSyncWidth ;   /* Horzontal Sync Pulse width */
520
521   uint16_t VSyncOffset ;  /* Vertical Sync Offset */
522   uint16_t VSyncWidth ;   /* Vertical Sync Pulse width */
523
524   uint16_t HSize_mm ;     /* Horizontal Image Size (mm) */
525   uint16_t VSize_mm ;     /* Vertical Image Size (mm) */
526
527   uint16_t HorizBorderPixels ;   /* Horizinatal Border in Pixels */
528   uint16_t VerticalBorderLines ; /* Vertical Border in Lines */
529
530   uint16_t Mode ; /* Additional Flags: Interlaced, Stereo, Analog, etc. */
531} BHDM_EDID_DetailTiming ;
532
533
534/******************************************************************************
535Summary:
536Data structure containing Monitor Ranges data contained in a monitor's EDID
537PROM.
538
539Description:
540Each monitor has an embedded PROM at I2C address 0x50.  The data must contain
541ranges which specify the min and maximum timings. The timing data is parsed
542and stored in this structure.
543
544See Also:
545        o BHDM_EDID_GetMonitorRange
546*******************************************************************************/
547typedef struct BHDM_EDID_MonitorRange
548{
549   uint16_t MinVertical ;    /* Minimum Vertical Rate (Hz) */
550   uint16_t MaxVertical ;    /* Maximum Vertical Rate (Hz) */
551   uint16_t MinHorizontal ;  /* Minimum Horizontal Rate (kHz) */
552   uint16_t MaxHorizontal ;  /* Maximum Horizontal Rate (kHz) */
553   uint16_t MaxPixelClock ;  /* Maximum Supported Pixel Clock Rate (MHz) */
554   uint8_t SecondaryTiming ; /* Secondary Timing Formula (if supported) */
555   uint8_t SecondaryTimingParameters[7] ;  /* Secondary Timing Formula Params */
556} BHDM_EDID_MonitorRange  ;
557
558
559/******************************************************************************
560Summary:
561Enumerated type containing the available descriptor tags that can be found in
562a monitor's EDID PROM.
563
564Description:
565Each monitor has an embedded PROM at I2C address 0x50.  The PROM may contain
566descriptors (name, serial number, etc.).  The available descriptor types are
567specified in this enumeration type.
568
569See Also:
570        o BHDM_EDID_GetMonitorRange
571*******************************************************************************/
572typedef enum BHDM_EDID_Tag
573{
574        BHDM_EDID_Tag_eMONITOR_NAME,  /* Monitor Name stored as ASCII */
575        BHDM_EDID_Tag_eMONITOR_ASCII, /* ASCII Text */
576        BHDM_EDID_Tag_eMONITOR_SN     /* Monitor Serial Number stored as ASCII */
577} BHDM_EDID_Tag ;
578
579
580/* DEFINES for 3D_Structure_ALL */
581#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_FRAME_PACKING 0x0001
582#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_FIELD_ALTERNATIVE 0x0002
583#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_LINE_ALTERNATIVE 0x0004
584#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_SBS_FULL        0x0008
585
586#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_LDEPTH  0x0010
587#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_LDEPTH_GFX      0x0020
588#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_TOP_BOTTOM      0x0040
589#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_07  0x0080
590
591#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_SBS_HALF_HORIZ  0x0100
592#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_09  0x0200
593#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_10  0x0400
594#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_11  0x0800
595
596#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_12  0x1000
597#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_13  0x2000
598#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_RESERVED_14  0x4000
599#define BHDM_EDID_VSDB_3D_STRUCTURE_ALL_SBS_HALF_QUINC  0x8000
600
601
602/* DEFINES for 3D_Structure_X */
603#define BHDM_EDID_VSDB_3D_STRUCTURE_X_FRAME_PACKING 0
604#define BHDM_EDID_VSDB_3D_STRUCTURE_X_FIELD_ALTERNATIVE 1
605#define BHDM_EDID_VSDB_3D_STRUCTURE_X_LINE_ALTERNATIVE 2
606#define BHDM_EDID_VSDB_3D_STRUCTURE_X_SBS_FULL  3
607#define BHDM_EDID_VSDB_3D_STRUCTURE_X_LDEPTH    4
608#define BHDM_EDID_VSDB_3D_STRUCTURE_X_LDEPTH_GFX        5
609#define BHDM_EDID_VSDB_3D_STRUCTURE_X_TOP_BOTTOM        6
610#define BHDM_EDID_VSDB_3D_STRUCTURE_X_RESERVED          7
611#define BHDM_EDID_VSDB_3D_STRUCTURE_X_SBS_HALF 8
612
613
614/* DEFINES for 3D_Ext_Data */
615/* values of 0000, 0001, 0010, 0011 are all Horizontal sub_sampling */
616#define BHDM_EDID_VSDB_3D_EXT_DATA_HORIZ_SUB_SAMPLING 3         
617
618/* values of 0100, 0101, 0110, 0111  are all Quincunx matrix */
619#define BHDM_EDID_VSDB_3D_EXT_DATA_QUINCUNX_MATRIX 7   
620
621/* values 1000 ~ 1111 are reserved */
622#define BHDM_EDID_VSDB_3D_EXT_DATA_HORIZ_RESERVED 8
623
624
625typedef uint16_t BHDM_EDID_3D_Structure_ALL ;                                                                                             
626
627/******************************************************************************
628Summary:
629Data structure containing HDMI parameters contained in the HDMI Receiver EDID
630PROM.
631
632Description:
633Each monitor has an embedded PROM at I2C address 0x50.  The PROM may contain
634information describing HDMI functionality supported by the monitor (audio, video
635etc.)
636
637See Also:
638        o BHDM_EDID_IsRxDeviceHdmi
639        o BHDM_EDID_CheckRxHdmiAudioSupport
640        o BHDM_EDID_CheckRxHdmiVideoSupport
641*******************************************************************************/
642typedef struct BHDM_EDID_RxVendorSpecificDB
643{
644        /* Vendor Specific Data Block */
645        uint8_t VsCode ;      /* Vendor Specific Tag Code = 3 */
646        uint8_t ucpIEEE_RegId[3] ; /* Registration Identified 0x000C03 */
647        uint8_t PhysAddr_A ;
648        uint8_t PhysAddr_B ;
649        uint8_t PhysAddr_C ;
650        uint8_t PhysAddr_D ;
651       
652        uint8_t SupportsAI ;
653        uint8_t DeepColor_30bit;
654        uint8_t DeepColor_36bit;       
655        uint8_t DeepColor_48bit;
656        uint8_t DeepColor_Y444;
657        uint8_t DVI_Dual;
658
659        uint16_t Max_TMDS_Clock_Rate;
660       
661        uint8_t Latency_Fields_Present;
662        uint8_t Video_Latency;
663        uint8_t Audio_Latency;
664        uint8_t Interlaced_Latency_Fields_Present;
665        uint8_t Interlaced_Video_Latency;
666        uint8_t Interlaced_Audio_Latency;
667               
668        uint8_t HDMI_Video_Present ;
669        uint8_t SupportedContentTypeGraphicsText ;
670        uint8_t SupportedContentTypePhoto ;
671        uint8_t SupportedContentTypeCinema ;
672        uint8_t SupportedContentTypeGame ;
673        uint8_t HDMI_3D_Present ;
674        uint8_t HDMI_3D_Multi_Present ;
675        uint8_t HDMI_Image_Size ;
676        uint8_t HDMI_VIC_Len ;
677        uint8_t HDMI_3D_Len ;           
678       
679        /* Functions Supported */
680        uint8_t Underscan ;
681        uint8_t Audio ;
682        uint8_t YCbCr444 ;
683        uint8_t YCbCr422 ;
684
685        uint8_t NativeFormatsInDescriptors ;
686
687} BHDM_EDID_RxVendorSpecificDB ;
688
689
690/******************************************************************************
691Summary:
692Data structure containing HDMI Speaker Data Block informationcontained in the HDMI Receiver
693EDID  PROM.
694
695
696See Also:
697        o BHDM_EDID_IsRxDeviceHdmi
698        o BHDM_EDID_CheckRxHdmiAudioSupport
699        o BHDM_EDID_CheckRxHdmiVideoSupport
700*******************************************************************************/
701typedef struct BHDM_EDID_SpeakerDB
702{
703        uint8_t uiSpeakerBlock ;
704        bool bHasRLC_RRC ;
705        bool bHasFLC_FRC ;
706        bool bHasRC ;
707        bool bHasRL_RR ;
708        bool bHasFC ;
709        bool bHasLFE ;
710        bool bHasFL_FR ;
711} BHDM_EDID_SpeakerDB ;
712
713
714/******************************************************************************
715Summary:
716Enumeration type containing CEA data tags that are contained in Data Blocks
717inside Version 3 Timing Extensions
718
719Description:
720Each monitor has an embedded PROM at I2C address 0x50.  The PROM may contain
721information describing HDMI functionality supported by the monitor (audio, video
722etc.)  These are the Data Block Tag IDs
723
724See Also:
725        o BHDM_EDID_IsRxDeviceHdmi
726        o BHDM_EDID_CheckRxHdmiAudioSupport
727        o BHDM_EDID_CheckRxHdmiVideoSupport
728*******************************************************************************/
729typedef enum BHDM_EDID_CeaDataBlockTag
730{
731        BHDM_EDID_CeaDataBlockTag_eReserved0,
732        BHDM_EDID_CeaDataBlockTag_eAudioDB,
733        BHDM_EDID_CeaDataBlockTag_eVideoDB,
734        BHDM_EDID_CeaDataBlockTag_eVSDB,
735        BHDM_EDID_CeaDataBlockTag_eSpeakerDB,
736        BHDM_EDID_CeaDataBlockTag_eReserved5,
737        BHDM_EDID_CeaDataBlockTag_eReserved6,
738        BHDM_EDID_CeaDataBlockTag_eExtendedDB
739} BHDM_EDID_CeaDataBlockTag ;
740
741
742/******************************************************************************
743Summary:
744Type Definition containing CEA Short Audio Descriptor Information contained in
745Data Blocks inside Version 3 Timing Extensions
746
747Description:
748CEA861B Short Audio Descriptors contain
749        Audio Format
750        Audio Channels
751        Audio Bits or Bit Rate
752
753
754See Also:
755        o BHDM_EDID_GetRxHdmiAudioSupport
756        o BHDM_EDID_CheckRxHdmiAudioSupport
757*******************************************************************************/
758typedef struct _BHDM_EDID_AUDIO_DESCRIPTOR
759{
760        bool Supported ;
761        uint8_t AudioChannels ;
762        uint8_t ucCeaSampleRates ;
763        uint8_t ucCeaNBits_BitRate ;  /* number bits or bit rate */
764} BHDM_EDID_AudioDescriptor ;
765
766
767/******************************************************************************
768Summary:
769Type Definition containing CEA Colorimetry data contained in Colorimetry
770Data Blocks inside Version 3 Timing Extensions
771
772Description:
773CEA861D Colorimetry Data Block contains
774        xvYCC709 and xvYCC601 flags
775        MetadataProfile0, MetadataProfile1 and MetadataProfile2 flags
776
777*******************************************************************************/
778typedef struct _BHDM_EDID_COLORIMETRY_DATA_BLOCK
779{
780        bool bxvYCC709;
781        bool bxvYCC601;
782        bool bMetadataProfile0;
783        bool bMetadataProfile1;
784        bool bMetadataProfile2;
785} BHDM_EDID_ColorimetryDataBlock;
786
787
788/******************************************************************************
789Summary:
790Type definition for indicating xvYCC colorimetries supported by the
791attached monitor.
792
793Description:
794Struct contains following (for now):
795        xvYCC709 and xvYCC601 flags
796
797See Also:
798        o BHDM_EDID_GetExtendedColorimetry
799*******************************************************************************/
800typedef struct _BHDM_EDID_EXTENDED_COLORIMETRY
801{
802        bool bxvYCC601;
803        bool bxvYCC709;
804} BHDM_EDID_ExtendedColorimetry ;
805
806/******************************************************************************
807Summary:
808Type definition for indicating xvYCC colorimetries supported by the
809attached monitor.
810
811Description:
812Struct contains following (for now):
813        xvYCC709 and xvYCC601 flags
814
815See Also:
816        o BHDM_EDID_GetExtendedColorimetry
817*******************************************************************************/
818typedef struct _BHDM_EDID_COLOR_DEPTH
819{
820        bool bColorDepth24bit;
821        bool bColorDepth30bit;
822        bool bColorDepth36bit;
823        bool bColorDepth48bit;
824               
825} BHDM_EDID_ColorDepth;
826
827
828/***************************************************************************
829Summary:
830        Holds related information of the attached receiver supported video formats.
831
832See Also
833        o BHDM_EDID_GetSupportedVideoInfo
834****************************************************************************/
835typedef struct _BHDM_EDID_VideoDescriptorInfo_
836{
837        uint8_t VideoIDCode[BHDM_EDID_MAX_CEA_VIDEO_ID_CODES] ;
838        uint8_t numDescriptors;
839} BHDM_EDID_VideoDescriptorInfo ;
840
841
842/******************************************************************************
843Summary:
844Retrieve the Nth 128-byte EDID block
845
846Input:
847        hHDMI - The HDMI device handle that the application created earlier
848        during the system initialization sequence.
849
850        iNthBlock - Number of the EDID Block to return
851
852        iBufSize - Size of the buffer to hold the EDID block...
853                  should be 128 bytes
854
855Output:
856        pBuffer - pointer to previously allocated 128 byte buffer to hold the
857        128-byte EDID block
858
859Returns:
860        BERR_SUCCESS              - EDID block retrieved
861        BERR_INVALID_PARAMETER    - Invalid function parameter
862        BHDM_EDID_NOT_ENOUGH_MEM  - Not enough memory to hold EDID block
863        BHDM_EDID_NOT_FOUND       - No EDID Available
864        BHDM_EDID_CHECKSUM_ERROR  - No EDID Checksum Error
865        BHDM_EDID_BLOCK_NOT_FOUND - Requested Block is not available
866
867
868See Also:
869        o BHDM_Handle
870
871*******************************************************************************/
872BERR_Code BHDM_EDID_GetNthBlock(
873   BHDM_Handle hHDMI,  /* [in] HDMI handle */
874   uint8_t iNthBlock, /* [in] EDID Block Number to retrieve */
875   uint8_t *pBuffer,   /* [out] pointer to input buffer */
876   uint16_t iBufSize   /* [in] Size of input buffer to write EDID to */
877) ;
878
879
880/******************************************************************************
881Summary:
882Retrieve the basic EDID data
883
884Input:
885        hHDMI - The HDMI device handle that the application created earlier
886        during the system initialization sequence.
887
888Output:
889        pMonitorData - pointer to BHDM_EDID_BasicData structure to hold the
890        Detail Timing data
891
892Returns:
893        BERR_SUCCESS            - Basic EDID Data successfully retrieved
894        BERR_INVALID_PARAMETER  - Invalid function parameter.
895        BHDM_EDID_NOT_FOUND      - No EDID Available
896        BHDM_EDID_CHECKSUM_ERROR - EDID Checksum Error
897        BHDM_EDID_BLOCK_NOT_FOUND       - EDID does not contain requested block
898
899See Also:
900        o BHDM_Handle
901        o BHDM_EDID_BasicData
902       
903*******************************************************************************/
904BERR_Code BHDM_EDID_GetBasicData(
905   BHDM_Handle hHDMI,               /* [in] HDMI handle */
906   BHDM_EDID_BasicData *pMonitorData /* [out] pointer to structure to hold Basic
907                                            EDID Data */
908) ;
909
910
911/******************************************************************************
912Summary:
913Retrieve EDID Detail Timing Data
914
915Description:
916This function can be used to read the preferred Video Format from the EDID
917of the attached monitor. 
918
919
920Input:
921        hHDMI - The HDMI device handle that the application created earlier
922        during the system initialization sequence.
923
924        NthTimingRequested - The number of the Detail Timing to retrieve
925
926
927Output:
928        pBHDM_EDID_DetailTiming - pointer to structure to hold the Detail Timing data
929        eVideoFmt - the preferred Video Format in BFMT_xxxxx
930
931Returns:
932        BERR_SUCCESS                   - Detail  Timing Information retrieved
933        BERR_INVALID_PARAMETER         - Invalid function parameter.
934        BHDM_EDID_NOT_FOUND             - No EDID Available
935        BHDM_EDID_CHECKSUM_ERROR        - EDID Checksum Error
936        BHDM_EDID_DETAILTIMING_NOT_SUPPORTED - Requested Detail Timing is not supported.
937
938See Also:
939        o BHDM_Handle
940        o BHDM_EDID_DetailTiming
941        o BFMT_VideoFmt
942
943
944*******************************************************************************/
945BERR_Code BHDM_EDID_GetDetailTiming(
946        BHDM_Handle hHDMI,                      /* [in] HDMI handle */
947        uint8_t NthTimingRequested, /* [in] number of the Detail Block to get */
948        BHDM_EDID_DetailTiming
949                *pBHDM_EDID_DetailTiming, /* [out] pointer to a BHDM_EDID_DetailTiming
950                                                                   structure to hold the data */
951        BFMT_VideoFmt *eVideoFmt
952) ;
953
954
955/******************************************************************************
956Summary:
957Retrieve a EDID Video Descriptor
958
959Description:
960EDID V3 Timing Extensions contain short Video Descriptors which provide
961information on supported formats
962
963Input:
964        hHDMI - The HDMI device handle that the application created earlier
965        during the system initialization sequence.
966        NthIdDescriptor - number of the descriptor to get
967
968
969Output:
970        VideoIdCode - pointer to the buffer to hold the Video ID Code (see CEA-861B)
971        BCM_VideoFmt - associated BCM_VideoFmt with VideoIdCode
972        NativeFormat - indicates if Video Format is a native format os the monitor
973
974Returns:
975        BERR_SUCCESS                 - Requested tag successfully found and copied
976        BERR_INVALID_PARAMETER       - Invalid function parameter.
977
978
979See Also:
980        o BHDM_Handle
981*******************************************************************************/
982BERR_Code BHDM_EDID_GetVideoDescriptor(
983        BHDM_Handle hHDMI,                       /* [in] HDMI handle */
984        uint8_t NthIdCode,           /* [in] number of the Video ID Code to get */
985        uint8_t *VideoIdCode,        /* [out] 861B Video ID Code  */
986        BFMT_VideoFmt *BCM_VideoFmt, /* [out] associated BFMT */
987        uint8_t *NativeFormat        /* [out] Native Monitor Format y/n */
988)  ;
989
990
991/******************************************************************************
992Summary:
993Retrieve a specified EDID descriptor
994
995Description:
996EDIDs may or may not contain ASCII descriptors which provide additional
997information about a monitor
998
999Input:
1000        hHDMI - The HDMI device handle that the application created earlier
1001        during the system initialization sequence.
1002
1003        tag - Type of Descriptor to search for
1004
1005        o BHDM_EDID_Tag_eMONITOR_NAME
1006        o BHDM_EDID_Tag_eMONITOR_ASCII
1007        o BHDM_EDID_Tag_eMONITOR_SN
1008
1009        iBufSize - size of buffer pointed to by pDescriptorText
1010
1011
1012Output:
1013        pDescriptorText - pointer to buffer to hold descriptor data.
1014        buffer must be <= 13 bytes
1015
1016Returns:
1017        BERR_SUCCESS                 - Requested tag successfully found and copied
1018        BERR_INVALID_PARAMETER       - Invalid function parameter.
1019        BHDM_EDID_NOT_FOUND          - No EDID Available
1020        BHDM_EDID_CHECKSUM_ERROR     - EDID Checksum Error
1021        BHDM_EDID_DESCRIPTOR_NOT_FOUND - Requested Descriptor is not available
1022        BERR_EDID_NOT_ENOUGH_MEM     - Not enough memory to hold the EDID descriptor
1023        BHDM_EDID_EXT_VERSION_NOT_SUPPORTED      - Requested EDID information is not supported
1024
1025Note:
1026        The calling function must allocate and free the 13 byte buffer pointed to by
1027        pDescriptorText
1028
1029See Also:
1030        o BHDM_Handle
1031        o BHDM_EDID_Tag 
1032*******************************************************************************/
1033BERR_Code BHDM_EDID_GetDescriptor(
1034   BHDM_Handle hHDMI, /* [in] HDMI handle */
1035   BHDM_EDID_Tag tag, /* [in] id of the descriptor tag to retrieve */
1036   uint8_t *pDescriptorText,    /* [out] pointer to memory to hold retrieved tag data */
1037   uint8_t iBufSize       /* [in ] mem size in bytes of pDescriptorText */
1038) ;
1039
1040
1041BERR_Code BHDM_EDID_GetMonitorName(
1042   BHDM_Handle hHDMI, /* [in] HDMI handle */
1043   uint8_t *pDescriptorText    /* [out] pointer to memory to hold retrieved tag data */
1044) ;
1045
1046
1047/******************************************************************************
1048Summary:
1049Retrieve the monitor ranges supported as specified in the EDID
1050
1051Description:
1052The EDID may contain a Descriptor that defines the Monitor Range Limits.
1053This function can be used to extract those ranges and place them in the
1054BHDM_EDID_MoniorRange structure.
1055
1056
1057Input:
1058        hHDMI - The HDMI device handle that the application created earlier
1059        during the system initialization sequence.
1060
1061Output:
1062        pMonitorRange - pointer to previously allocated structure to hold the
1063        Monitor Range information
1064
1065Returns:
1066        BERR_SUCCESS                   - Monitor Range Retrieved
1067        BERR_INVALID_PARAMETER         - Invalid function parameter.
1068        BHDM_EDID_NOT_FOUND             - EDID is Not Available
1069        BHDM_EDID_CHECKSUM_ERROR        - EDID Checksum Error
1070        BHDM_EDID_MONITOR_RANGE_NOT_FOUND - Monitor Range Not Available in EDID
1071
1072
1073See Also:
1074        o BHDM_Handle
1075        o BHDM_EDID_MonitorRange
1076
1077*******************************************************************************/
1078BERR_Code BHDM_EDID_GetMonitorRange(
1079   BHDM_Handle hHDMI,                    /* [in] HDMI handle */
1080   BHDM_EDID_MonitorRange *pMonitorRange /* [out] pointer to BHDM_EDID_MonitorRange
1081                                                                                    to hold the retrieved data */
1082);
1083
1084
1085
1086/******************************************************************************
1087Summary:
1088Check if the connected Receiver Device is HDMI Capable
1089
1090Description:
1091The EDID may contain a CEA-861B Vendor Specific Data Block (VSDB) in the first
1092Version 3 Timing Block.  This HDMI VSDB indicates the receiver is HDMI Capable
1093If the Receiver is HDMI capable, this function can be used to extract the
1094VSDB information and other functionality supported by the Receiver.
1095
1096Input:
1097        hHDMI - The HDMI device handle that the application created earlier
1098        during the system initialization sequence.
1099
1100Output:
1101        pRxVSDB - pointer to previously allocated structure to hold information
1102        contained in the Vendor Specific Data Block and other HDMI related data
1103        bHdmiDeive - pointer to boolean true to indicate Rx device supports HDMI
1104                       false to indicate device supports DVI only
1105
1106Returns:
1107        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1108        BERR_INVALID_PARAMETER          - Invalid function parameter.
1109        BHDM_EDID_HDMI_VSDB_NOT_FOUND   - VSDB not found
1110        BHDM_EDID_HDMI_VSDB_REGID_ERROR - Registration ID error in VSCB
1111
1112Note:
1113        All returns except BERR_SUCCESS indicate the attached device supports DVI
1114        only.
1115 
1116See Also:
1117        o BHDM_Handle
1118        o BHDM_EDID_HdmiData
1119
1120*******************************************************************************/
1121BERR_Code BHDM_EDID_IsRxDeviceHdmi(
1122   BHDM_Handle hHDMI,                    /* [in] HDMI handle */
1123   BHDM_EDID_RxVendorSpecificDB *pRxVSDB, /* [out] pointer to HDMI data structure
1124                                             to hold the retrieved data */
1125   bool *bHdmiDevice                     /* [out] pointer to bool indicating
1126                                                                                      attached device supports HDMI */
1127) ;
1128
1129
1130
1131/******************************************************************************
1132Summary:
1133Check if the connected HDMI Receiver can support specified audio parameters
1134
1135Description:
1136The EDID may contain CEA-861B Audio Descriptors contained within Version 3
1137Timing Extensions of the EDID.
1138This function will check if certain audio parameters are specified as being
1139supported by the HDMI Receiver.
1140
1141Input:
1142        hHDMI - The HDMI device handle that the application created earlier
1143        during the system initialization sequence.
1144        eAudioFormat - format of Audio (PCM, AC3, AAC, etc)
1145        eAudioSamplingRate - sampling rate of the Audio (32kHz, 44.1kHz, etc.)
1146        eAudioBits  - number of bits in each Audio Sample (16, 20, etc.)
1147        iCommpressedBitRate  - Compressed Bit Rate Supported by the HDMI Receiver
1148
1149
1150Output:
1151        iSupported - Specified audio format is reported as supported by EDID
1152
1153Returns:
1154        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1155        BERR_INVALID_PARAMETER          - Invalid function parameter.
1156        BHDM_EDID_HDMI_VSDB_NOT_FOUND   - VSDB not found
1157        BHDM_EDID_HDMI_UNKNOWN_CEA_TAG  - Unknown CEA Tag
1158        BHDM_EDID_HDMI_UNKNOWN_BIT_RATE - Unknown Bit Rate extracted from Audio Descriptor
1159        BHDM_EDID_HDMI_AUDIO_UNSUPPORTED - Rx does not support requested Audio Parameters
1160
1161Note:
1162        eAudioBits and iCompressedBitRate are mutually exclusive. 
1163        The eAudioBits  enumeration is to be used with eAudioFormat
1164        BAVC_AudioFormat_ePCM (uncompressed).
1165        The iCompressedBitRate is to be used with all other eAudioFormat
1166        enumerations.  The function uses the eAudioFormat to determie which
1167        argument to use.
1168
1169        Calling function should assume DVI if return value is not BERR_SUCCESS
1170 
1171See Also:
1172        o BHDM_Handle
1173
1174*******************************************************************************/
1175BERR_Code BHDM_EDID_CheckRxHdmiAudioSupport(
1176   BHDM_Handle hHDMI,                   /* [in] HDMI handle  */
1177   BAVC_AudioFormat       eAudioFormat, /* [in] Audio Format */
1178   BAVC_AudioSamplingRate eAudioSamplingRate, /* [in] Audio Rate to check for */
1179   BAVC_AudioBits         eAudioBits,   /* [in] Number of Bits if uncompressed */
1180   uint16_t         iCompressedBitRate, /* [in] Bit Rate if compressed audio */
1181   uint8_t *iSupported
1182)  ;
1183
1184
1185/******************************************************************************
1186Summary:
1187Check if the connected HDMI Receiver can support specified video parameters
1188
1189Description:
1190The EDID may contain CEA-861B Video Descriptors contained within Version 3
1191Timing Extensions of the EDID.
1192This function will check if certain video parameters are specified as being
1193supported by the HDMI Receiver.
1194
1195Input:
1196        hHDMI - The HDMI device handle that the application created earlier
1197
1198        HorizontalPixels - Number of active horizontal pixels
1199        VerticalPixels   - Number of active vertical pixels
1200        eScanType        - Enumeration of Scan Types (progressive, interlaced)
1201        eFrameRateCode   - Enumeration of Vertical Frequency (59.94 / 60Hz etc)
1202        eAspectRatio     - Enumeration of Aspect Ratio (16:9, 4:3 etc)
1203
1204
1205Output:
1206        *pNativeFormat   - specified input format is native to display (0, 1)
1207
1208Returns:
1209        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1210        BERR_INVALID_PARAMETER          - Invalid function parameter.
1211        BHDM_EDID_HDMI_VSDB_NOT_FOUND   - VSDB not found; HDMI Unsupported
1212        BHDM_EDID_HDMI_UNKNOWN_CEA_TAG  - Unknown CEA Tag
1213        BHDM_EDID_HDMI_VIDEO_FORMAT_UNSUPPORTED - Rx does not support requested Video Parameters
1214
1215Note:
1216        Calling function should assume DVI if return value is not BERR_SUCCESS
1217 
1218See Also:
1219        o BHDM_Handle
1220        o BHDM_EDID_HdmiData
1221
1222*******************************************************************************/
1223BERR_Code BHDM_EDID_CheckRxHdmiVideoSupport(
1224        BHDM_Handle hHDMI,                    /* [in] HDMI handle  */
1225        uint16_t           HorizontalPixels,  /* [in] Horiz Active Pixels */
1226        uint16_t           VerticalPixels,    /* [in] Vertical Active Pixels */
1227        BAVC_ScanType      eScanType,         /* [in] Progressive, Interlaced */
1228        BAVC_FrameRateCode eFrameRateCode,    /* [in] Vertical Frequency */
1229        BFMT_AspectRatio   eAspectRatio,      /* [in] Horiz  to Vertical Ratio */
1230        uint8_t            *pNativeFormat     /* [out] Requested format is a
1231                                                                                      native format to the monitor */
1232) ;
1233
1234
1235
1236/******************************************************************************
1237Summary:
1238Check if the connected HDMI Receiver can support the requested format
1239
1240Description:
1241Check if the attached monitor can support the requested BFMT_VideoFmt.  The
1242table containing the supported formats are loaded at hot plug events
1243
1244Input:
1245        hHDMI - The HDMI device handle that the application created earlier
1246        BFMT_VideoFmt - Requested Video Format
1247
1248Output:
1249        *pSupported   - flag specifying if requested format is supported
1250
1251Returns:
1252        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1253        BERR_INVALID_PARAMETER          - Invalid function parameter.
1254
1255Note:
1256        Calling function should assume the format is not supported if return value
1257        is not BERR_SUCCESS
1258 
1259See Also:
1260        o BHDM_Handle
1261        o BFMT_VideoFmt
1262
1263*******************************************************************************/
1264BERR_Code BHDM_EDID_VideoFmtSupported(
1265        BHDM_Handle hHDMI,        /* [in] HDMI handle  */
1266        BFMT_VideoFmt eVideoFmt,  /* requested video format */
1267        uint8_t *Supported        /* [out] true/false Requested format is 
1268                                                            supported by the monitor */
1269) ;
1270
1271
1272/******************************************************************************
1273Summary:
1274Return all video formats supported by the attached monitor.
1275
1276Description:
1277This function will fill an bool array matching the number of BFMT_VideoFmts that are
1278supported by the attached monitor.  True for supported; False if not.
1279
1280Input:
1281        hHDMI - The HDMI device handle that the application created earlier
1282
1283Output:
1284        *bVideoFormats - bool array of size BFMT_VideoFmt_eMaxCount indicating what
1285                         BFMTs are supported by the display
1286
1287Returns:
1288        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1289        BERR_INVALID_PARAMETER          - Invalid function parameter.
1290        BHDM_EDID_HDMI_VSDB_NOT_FOUND   - VSDB not found; HDMI Unsupported
1291        BHDM_EDID_HDMI_UNKNOWN_CEA_TAG  - Unknown CEA Tag
1292        BHDM_EDID_HDMI_VIDEO_FORMAT_UNSUPPORTED - Rx does not support requested Video Parameters
1293
1294Note:
1295        This function will check both EDID Version 3 Timing Extensions and
1296        Preferred Detailed Timing Descriptors.  While the V3 extensions include
1297        the formats contained in the Preferred Extensions, both are searched due
1298        to DVI monitors are not required to have V3 Timing Extensions.
1299 
1300See Also:
1301        o BHDM_Handle
1302        o BHDM_EDID_GetSupportedVideoFormats
1303        o BHDM_EDID_CheckRxHdmiVideoSupport
1304
1305*******************************************************************************/
1306BERR_Code BHDM_EDID_GetSupportedVideoFormats(
1307        BHDM_Handle hHDMI,                    /* [in] HDMI handle  */
1308        bool *bVideoFormats                   /* [out] supported true/false */
1309) ;
1310
1311
1312BERR_Code BHDM_EDID_GetSupported3DFormats(
1313        BHDM_Handle hHDMI,                                       /* [in] HDMI handle  */
1314        BHDM_EDID_3D_Structure_ALL *_3DFormats                                   /* [out] supported true/false */
1315);
1316
1317
1318#if BHDM_CONFIG_HDMI_3D_SUPPORT
1319/******************************************************************************
1320Summary:
1321Return information (video formats, video ID code, etc.) of all formats supported by the attached monitor.
1322
1323Description:
1324This function will return a structure contain a boolean array matching the number of
1325BFMT_VideoFmts that are supported by the attached monitor, a list of video ID code of the
1326support formats as well as the number of supported formats.
1327
1328Input:
1329        hHDMI - The HDMI device handle that the application created earlier
1330
1331Output:
1332        *stSupportedVideoInfo - structure holding supported video information
1333
1334Returns:
1335        BERR_SUCCESS                                    - Monitor is HDMI Capable and data retrieved
1336        BHDM_EDID_NOT_FOUND                     - No EDID found
1337        BHDM_EDID_VIDEO_FORMATS_UNAVAILABLE             - No supported formats were found
1338
1339See Also:
1340        o BHDM_Handle
1341        o BHDM_EDID_GetSupportedVideoFormats
1342
1343*******************************************************************************/
1344BERR_Code BHDM_EDID_GetSupportedVideoInfo(
1345        BHDM_Handle hHDMI,                                       /* [in] HDMI handle  */
1346        BHDM_EDID_VideoDescriptorInfo *pSupportedVideoInfo              /* [out] supported true/false */
1347);
1348#endif
1349
1350
1351/******************************************************************************
1352Summary:
1353Return all audio formats supported by the attached monitor.
1354
1355Description:
1356This function will fill an bool array matching the number of BFMT_VideoFmts that are
1357supported by the attached monitor.  True for supported; False if not.
1358
1359Input:
1360        hHDMI - The HDMI device handle that the application created earlier
1361
1362Output:
1363        BcmAudioFormats - array of size BAVC_AudioFmt_eMaxCount indicating what
1364                          audio are supported by the HDMI Rx
1365
1366Returns:
1367        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1368        BERR_INVALID_PARAMETER          - Invalid function parameter.
1369
1370 
1371See Also:
1372        o BHDM_Handle
1373        o BHDM_EDID_GetSupportedAudioFormats
1374        o BHDM_EDID_CheckRxHdmiAudioSupport
1375
1376*******************************************************************************/
1377BERR_Code BHDM_EDID_GetSupportedAudioFormats(
1378        BHDM_Handle hHDMI,                          /* [in] HDMI handle  */
1379        BHDM_EDID_AudioDescriptor *BcmAudioFormats  /* [out] supported formats */
1380) ;
1381
1382/******************************************************************************
1383Summary:
1384Dump all EDID blocks of the attached DVI/HDMI Receiver
1385
1386Description:
1387This function will fill an bool array matching the number of BFMT_VideoFmts that are
1388supported by the attached monitor.  True for supported; False if not.
1389
1390Input:
1391        hHDMI - The HDMI device handle that the application created earlier
1392
1393Returns:
1394        BERR_SUCCESS                    - Monitor is HDMI Capable and data retrieved
1395
1396See Also:
1397        o BHDM_Handle
1398
1399*******************************************************************************/
1400BERR_Code BHDM_EDID_DumpRawEDID(
1401        BHDM_Handle hHDMI                    /* [in] HDMI handle  */
1402) ;
1403
1404
1405/******************************************************************************
1406Summary:
1407Initialize the EDID information by re-reading the EDID in the monitor.
1408
1409Description:
1410This function will initialize EDID information read from an attached receiver
1411This function is useful for reading EDID after a Hot Plug event
1412
1413Input:
1414        hHDMI - The HDMI device handle that the application created earlier
1415
1416Returns:
1417
1418See Also:
1419        o BHDM_Handle
1420        o BHDM_EDID_GetSupportedFormats
1421        o BHDM_EDID_GetMonitorRange
1422
1423*******************************************************************************/
1424BERR_Code BHDM_EDID_Initialize(
1425        BHDM_Handle hHDMI                    /* [in] HDMI handle  */
1426) ;
1427
1428
1429
1430/******************************************************************************
1431Summary:
1432Get the Recommended/Supported Colorimetry to use based on the EDID information in the
1433monitor
1434
1435Description:
1436This function will get the colorimetry to use based on the selected format and output mode.  The
1437function make sure the format it selects is supported by the attached HDMI monitor
1438
1439This function must be used after the BHDM_EDID_Initialize function
1440
1441Input:
1442        hHDMI - The HDMI device handle that the application created earlier
1443        eOutputFormat - output (encoding) format sent to display (DVI vs HDMI mode)
1444        eVideoFmt - output display format: SD, HD, or PC format
1445        eColorimetry - Recommended and Supported Colorimetry
1446
1447Returns:
1448
1449See Also:
1450        o BHDM_Handle
1451        o BHDM_OutputFormat
1452        o BFMT_VideoFmt
1453       
1454
1455*******************************************************************************/
1456BERR_Code BHDM_EDID_GetSupportedColorimetry(
1457        BHDM_Handle hHDMI, BHDM_OutputFormat eOutputFormat, 
1458        BFMT_VideoFmt eVideoFmt, BAVC_MatrixCoefficients *eColorimetry) ;
1459
1460
1461
1462/******************************************************************************
1463Summary:
1464Get the supported Extended Colorimetry based on the EDID information of the
1465attached monitor.
1466
1467Description:
1468This function will return whether or not the attached HDMI monitor
1469supports the xvYCC (601 or 709 or both) colorimetry.
1470
1471This function must be used after the BHDM_EDID_Initialize function
1472
1473Input:
1474        hHDMI - The HDMI device handle that the application created earlier
1475
1476Output:
1477        pExtendedColorimetry - pointer to structure indicating xvYCC supported colorimetries
1478
1479Returns:
1480
1481See Also:
1482        o BHDM_Handle
1483        o BHDM_EDID_ExtendedColorimetry
1484
1485*******************************************************************************/
1486BERR_Code BHDM_EDID_GetExtendedColorimetry(
1487        BHDM_Handle hHDMI,
1488        BHDM_EDID_ExtendedColorimetry *pExtendedColorimetry) ;
1489
1490
1491/******************************************************************************
1492Summary:
1493Get the supported deep color mode based on the EDID information of the
1494attached monitor.
1495
1496Description:
1497This function will return the supported deep color modes (if any) of the attached HDMI sink
1498This function must be used after the BHDM_EDID_Initialize function
1499
1500Input:
1501        hHDMI - The HDMI device handle that the application created earlier
1502
1503Output:
1504        stSuppotedColorDepth - pointer to structure indicating supported color depth
1505        bYCbCrPixelEncoding - indicate YCbCr 4:4:4 pixel encoding support for the supported
1506                                                color depth
1507
1508Returns:
1509
1510See Also:
1511        o BHDM_Handle
1512        o BHDM_EDID_ExtendedColorimetry
1513
1514*******************************************************************************/
1515BERR_Code BHDM_EDID_GetSupportedColorDepth(
1516        BHDM_Handle hHDMI,
1517        BHDM_EDID_ColorDepth *stSuppotedColorDepth,     /* [out] */
1518        bool *bYCbCrPixelEncoding       /* [out] */
1519);
1520
1521
1522/******************************************************************************
1523Summary:
1524Get CEC Physical Address based on the EDID information of the
1525attached sink.
1526
1527Description:
1528This function will return the CEC Physical Address assigned to
1529us (Tx) by the attached sink.
1530
1531This function must be used after the BHDM_EDID_Initialize function
1532
1533Input:
1534        hHDMI - The HDMI device handle that the application created earlier
1535
1536Output:
1537        pMyPhysicalAddr - pointer to 2-byte array for receiving address
1538       
1539Returns:
1540        BERR_SUCCESS - Successfully returned the CEC Physical Addresses
1541        BHDM_EDID_NOT_FOUND
1542
1543See Also:
1544        o BHDM_Handle
1545
1546*******************************************************************************/
1547BERR_Code BHDM_EDID_GetMyCecPhysicalAddr(
1548   BHDM_Handle hHDMI,         /* [in] HDMI handle */
1549   uint8_t *pMyPhysicalAddr); /* [out] ptr to uint8 to hold Physical Addr */
1550
1551
1552#ifdef __cplusplus
1553}
1554#endif
1555
1556#endif /* BHDM_EDID_H__ */
Note: See TracBrowser for help on using the repository browser.