5 Copyright (C) 2013 Silicon Image, Inc.
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation version 2.
10 This program is distributed AS-IS WITHOUT ANY WARRANTY of any
11 kind, whether express or implied; INCLUDING without the implied warranty
12 of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE or NON-INFRINGEMENT. See
13 the GNU General Public License for more details at http://www.gnu.org/licenses/gpl-2.0.html.
17 #if !defined(SI_EDID_H)
21 SI_PUSH_STRUCT_PACKING
//(
23 typedef struct SI_PACK_THIS_STRUCT _TwoBytes_t
27 }TwoBytes_t
,*PTwoBytes_t
;
30 #define EDID_EXTENSION_TAG 0x02
31 #define EDID_EXTENSION_BLOCK_MAP 0xF0
32 #define EDID_REV_THREE 0x03
33 //#define LONG_DESCR_LEN 18
34 #define EDID_BLOCK_0 0x00
35 #define EDID_BLOCK_2_3 0x01
36 //#define EDID_BLOCK_0_OFFSET 0x0000
41 ,DBTC_AUDIO_DATA_BLOCK
= 1
42 ,DBTC_VIDEO_DATA_BLOCK
= 2
43 ,DBTC_VENDOR_SPECIFIC_DATA_BLOCK
= 3
44 ,DBTC_SPEAKER_ALLOCATION_DATA_BLOCK
= 4
45 ,DBTC_VESA_DTC_DATA_BLOCK
= 5
47 ,DBTC_USE_EXTENDED_TAG
= 7
48 }data_block_tag_code_e
;
49 typedef struct SI_PACK_THIS_STRUCT _data_block_header_fields_t
51 uint8_t length_following_header
:5;
52 data_block_tag_code_e tag_code
:3;
53 }data_block_header_fields_t
,*Pdata_block_header_fields_t
;
55 typedef union SI_PACK_THIS_STRUCT _data_block_header_byte_t
57 data_block_header_fields_t fields
;
59 }data_block_header_byte_t
,*Pdata_block_header_byte_t
;
63 ETC_VIDEO_CAPABILITY_DATA_BLOCK
= 0
64 ,ETC_VENDOR_SPECIFIC_VIDEO_DATA_BLOCK
= 1
65 ,ETC_VESA_VIDEO_DISPLAY_DEVICE_INFORMATION_DATA_BLOCK
= 2
66 ,ETC_VESA_VIDEO_DATA_BLOCK
= 3
67 ,ETC_HDMI_VIDEO_DATA_BLOCK
= 4
68 ,ETC_COLORIMETRY_DATA_BLOCK
= 5
69 ,ETC_VIDEO_RELATED
= 6
71 ,ETC_CEA_MISC_AUDIO_FIELDS
= 16
72 ,ETC_VENDOR_SPECIFIC_AUDIO_DATA_BLOCK
= 17
73 ,ETC_HDMI_AUDIO_DATA_BLOCK
= 18
74 ,ETC_AUDIO_RELATED
= 19
79 typedef struct SI_PACK_THIS_STRUCT _extended_tag_code_t
81 extended_tag_code_e etc
:8;
82 }extended_tag_code_t
,*Pextended_tag_code_t
;
84 typedef struct SI_PACK_THIS_STRUCT _cea_short_descriptor_t
87 unsigned char native
:1;
89 }cea_short_descriptor_t
,*Pcea_short_descriptor_t
;
91 typedef struct SI_PACK_THIS_STRUCT _MHL_short_desc_t
93 cea_short_descriptor_t cea_short_desc
;
94 MHL2_video_descriptor_t mhl_vid_desc
;
95 }MHL_short_desc_t
,*PMHL_short_desc_t
;
97 typedef struct SI_PACK_THIS_STRUCT _video_data_block_t
99 data_block_header_byte_t header
;
100 cea_short_descriptor_t short_descriptors
[1];//open ended
101 }video_data_block_t
,*p_video_data_block_t
;
106 afd_linear_PCM_IEC60958
= 1
108 ,afd_MPEG1_layers_1_2
= 3
109 ,afd_MPEG1_layer_3
= 4
110 ,afdMPEG2_MultiChannel
= 5
114 ,afd_one_bit_audio
= 9
115 ,afd_dolby_digital
= 10
123 typedef struct SI_PACK_THIS_STRUCT _CEA_short_audio_descriptor_t
125 unsigned char max_channels_minus_one
:3;
126 AudioFormatCodes_e audio_format_code
:4;
127 unsigned char F17
:1;
129 unsigned char freq_32_Khz
:1;
130 unsigned char freq_44_1_KHz
:1;
131 unsigned char freq_48_KHz
:1;
132 unsigned char freq_88_2_KHz
:1;
133 unsigned char freq_96_KHz
:1;
134 unsigned char freq_176_4_KHz
:1;
135 unsigned char freq_192_KHz
:1;
136 unsigned char F27
:1;
140 struct SI_PACK_THIS_STRUCT
142 unsigned res_16_bit
:1;
143 unsigned res_20_bit
:1;
144 unsigned res_24_bit
:1;
147 struct SI_PACK_THIS_STRUCT
149 uint8_t max_bit_rate_div_by_8_KHz
;
151 struct SI_PACK_THIS_STRUCT
153 uint8_t default_zero
;
156 }CEA_short_audio_descriptor_t
,*PCEA_short_audio_descriptor_t
;
158 typedef struct SI_PACK_THIS_STRUCT _audio_data_block_t
160 data_block_header_byte_t header
;
161 CEA_short_audio_descriptor_t short_audio_descriptors
[1]; // open ended
162 }audio_data_block_t
,*Paudio_data_block_t
;
164 typedef struct SI_PACK_THIS_STRUCT _speaker_allocation_flags_t
166 unsigned char spk_front_left_front_right
:1;
167 unsigned char spk_LFE
:1;
168 unsigned char spk_front_center
:1;
169 unsigned char spk_rear_left_rear_right
:1;
170 unsigned char spk_rear_center
:1;
171 unsigned char spk_front_left_center_front_right_center
:1;
172 unsigned char spk_rear_left_center_rear_right_center
:1;
173 unsigned char spk_reserved
:1;
174 }speaker_allocation_flags_t
,*Pspeaker_allocation_flags_t
;
175 typedef struct SI_PACK_THIS_STRUCT _speaker_allocation_data_block_payload_t
177 speaker_allocation_flags_t speaker_alloc_flags
;
180 }speaker_allocation_data_block_payload_t
,*Pspeaker_allocation_data_block_payload_t
;
182 typedef struct SI_PACK_THIS_STRUCT _speaker_allocation_data_block_t
184 data_block_header_byte_t header
;
185 speaker_allocation_data_block_payload_t payload
;
187 }speaker_allocation_data_block_t
,*Pspeaker_allocation_data_block_t
;
189 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_BA_t
193 }HDMI_LLC_BA_t
,*PHDMI_LLC_BA_t
;
195 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_DC_t
199 }HDMI_LLC_DC_t
,*PHDMI_LLC_DC_t
;
201 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_Byte6_t
203 unsigned char DVI_dual
:1;
204 unsigned char reserved
:2;
205 unsigned char DC_Y444
:1;
206 unsigned char DC_30bit
:1;
207 unsigned char DC_36bit
:1;
208 unsigned char DC_48bit
:1;
209 unsigned char supports_AI
:1;
210 }HDMI_LLC_Byte6_t
,*PHDMI_LLC_Byte6_t
;
212 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_byte8_t
214 unsigned char CNC0_adjacent_pixels_independent
:1;
215 unsigned char CNC1_specific_processing_still_pictures
:1;
216 unsigned char CNC2_specific_processing_cinema_content
:1;
217 unsigned char CNC3_specific_processing_low_AV_latency
:1;
218 unsigned char reserved
:1;
219 unsigned char HDMI_video_present
:1;
220 unsigned char I_latency_fields_present
:1;
221 unsigned char latency_fields_present
:1;
222 }HDMI_LLC_byte8_t
,*PHDMI_LLC_byte8_t
;
226 imsz_NO_ADDITIONAL
= 0
227 ,imsz_ASPECT_RATIO_CORRECT_BUT_NO_GUARRANTEE_OF_CORRECT_SIZE
= 1
228 ,imsz_CORRECT_SIZES_ROUNDED_TO_NEAREST_1_CM
= 2
229 ,imsz_CORRECT_SIZES_DIVIDED_BY_5_ROUNDED_TO_NEAREST_5_CM
= 3
232 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_Byte13_t
234 unsigned char reserved
:3;
235 image_size_e image_size
:2;
236 unsigned char _3D_multi_present
:2;
237 unsigned char _3D_present
:1;
238 }HDMI_LLC_Byte13_t
,*PHDMI_LLC_Byte13_t
;
240 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_Byte14_t
242 unsigned char HDMI_3D_len
:5;
243 unsigned char HDMI_VIC_len
:3;
244 }HDMI_LLC_Byte14_t
,*PHDMI_LLC_Byte14_t
;
246 typedef struct SI_PACK_THIS_STRUCT _VSDB_byte_13_through_byte_15_t
248 HDMI_LLC_Byte13_t byte13
;
249 HDMI_LLC_Byte14_t byte14
;
250 uint8_t vicList
[1]; // variable length list base on HDMI_VIC_len
251 }VSDB_byte_13_through_byte_15_t
,*PVSDB_byte_13_through_byte_15_t
;
253 typedef struct SI_PACK_THIS_STRUCT _VSDB_all_fields_byte_9_through_byte15_t
255 uint8_t video_latency
;
256 uint8_t audio_latency
;
257 uint8_t interlaced_video_latency
;
258 uint8_t interlaced_audio_latency
;
259 VSDB_byte_13_through_byte_15_t byte_13_through_byte_15
;
260 // There must be no fields after here
261 }VSDB_all_fields_byte_9_through_byte15_t
,*PVSDB_all_fields_byte_9_through_byte15_t
;
263 typedef struct SI_PACK_THIS_STRUCT _VSDB_all_fields_byte_9_through_byte_15_sans_progressive_latency_t
265 uint8_t interlaced_video_latency
;
266 uint8_t interlaced_audio_latency
;
267 VSDB_byte_13_through_byte_15_t byte_13_through_byte_15
;
268 // There must be no fields after here
269 }VSDB_all_fields_byte_9_through_byte_15_sans_progressive_latency_t
,*PVSDB_all_fields_byte_9_through_byte_15_sans_progressive_latency_t
;
271 typedef struct SI_PACK_THIS_STRUCT _VSDB_all_fields_byte_9_through_byte_15_sans_interlaced_latency_t
273 uint8_t video_latency
;
274 uint8_t audio_latency
;
275 VSDB_byte_13_through_byte_15_t byte_13_through_byte_15
;
276 // There must be no fields after here
277 }VSDB_all_fields_byte_9_through_byte_15_sans_interlaced_latency_t
,*PVSDB_all_fields_byte_9_through_byte_15_sans_interlaced_latency_t
;
279 typedef struct SI_PACK_THIS_STRUCT _VSDB_all_fields_byte_9_through_byte_15_sans_all_latency_t
281 VSDB_byte_13_through_byte_15_t byte_13_through_byte_15
;
282 // There must be no fields after here
283 }VSDB_all_fields_byte_9_through_byte_15_sans_all_latency_t
,*PVSDB_all_fields_byte_9_through_byte_15_sans_all_latency_t
;
285 typedef struct SI_PACK_THIS_STRUCT _HDMI_LLC_vsdb_payload_t
289 HDMI_LLC_Byte6_t byte6
;
290 uint8_t maxTMDSclock
;
291 HDMI_LLC_byte8_t byte8
;
294 VSDB_all_fields_byte_9_through_byte_15_sans_all_latency_t vsdb_all_fields_byte_9_through_byte_15_sans_all_latency
;
295 VSDB_all_fields_byte_9_through_byte_15_sans_progressive_latency_t vsdb_all_fields_byte_9_through_byte_15_sans_progressive_latency
;
296 VSDB_all_fields_byte_9_through_byte_15_sans_interlaced_latency_t vsdb_all_fields_byte_9_through_byte_15_sans_interlaced_latency
;
297 VSDB_all_fields_byte_9_through_byte15_t vsdb_all_fields_byte_9_through_byte_15
;
298 }vsdb_fields_byte_9_through_byte_15
;
299 // There must be no fields after here
300 }HDMI_LLC_vsdb_payload_t
,*PHDMI_LLC_vsdb_payload_t
;
302 typedef struct SI_PACK_THIS_STRUCT st_3D_structure_all_15_8_t
304 uint8_t frame_packing
: 1;
305 uint8_t reserved1
: 5;
306 uint8_t top_bottom
: 1;
307 uint8_t reserved2
: 1;
308 }_3D_structure_all_15_8_t
,*P_3D_structure_all_15_8_t
;
310 typedef struct SI_PACK_THIS_STRUCT st_3D_structure_all_7_0_t
312 uint8_t side_by_side
: 1;
313 uint8_t reserved
: 7;
314 }_3D_structure_all_7_0_t
,*P_3D_structure_all_7_0_t
;
317 typedef struct SI_PACK_THIS_STRUCT tag_3D_structure_all_t
319 _3D_structure_all_15_8_t _3D_structure_all_15_8
;
320 _3D_structure_all_7_0_t _3D_structure_all_7_0
;
321 }_3D_structure_all_t
,*P_3D_structure_all_t
;
324 typedef struct SI_PACK_THIS_STRUCT tag_3D_mask_t
326 uint8_t _3D_mask_15_8
;
327 uint8_t _3D_mask_7_0
;
328 }_3D_mask_t
,*P_3D_mask_t
;
332 typedef struct SI_PACK_THIS_STRUCT tag_2D_VIC_order_3D_structure_t
334 _3D_structure_e _3D_structure
:4; // definition from info frame
335 unsigned _2D_VIC_order
:4;
336 }_2D_VIC_order_3D_structure_t
,*P_2D_VIC_order_3D_structure_t
;
338 typedef struct SI_PACK_THIS_STRUCT tag_3D_detail_t
340 unsigned char reserved
:4;
341 unsigned char _3D_detail
:4;
342 }_3D_detail_t
,*P_3D_detail_t
;
344 typedef struct SI_PACK_THIS_STRUCT tag_3D_structure_and_detail_entry_sans_byte1_t
346 _2D_VIC_order_3D_structure_t byte0
;
347 /*see HDMI 1.4 spec w.r.t. contents of 3D_structure_X */
348 }_3D_structure_and_detail_entry_sans_byte1_t
,*P_3D_structure_and_detail_entry_sans_byte1_t
;
350 typedef struct SI_PACK_THIS_STRUCT tag_3D_structure_and_detail_entry_with_byte1_t
352 _2D_VIC_order_3D_structure_t byte0
;
354 }_3D_structure_and_detail_entry_with_byte1_t
,*P_3D_structure_and_detail_entry_with_byte1_t
;
356 typedef union tag_3D_structure_and_detail_entry_u
358 _3D_structure_and_detail_entry_sans_byte1_t sans_byte1
;
359 _3D_structure_and_detail_entry_with_byte1_t with_byte1
;
360 }_3D_structure_and_detail_entry_u
,*P_3D_structure_and_detail_entry_u
;
362 typedef struct SI_PACK_THIS_STRUCT _HDMI_3D_sub_block_sans_all_AND_mask_t
364 _3D_structure_and_detail_entry_u _3D_structure_and_detail_list
[1];
365 }HDMI_3D_sub_block_sans_all_AND_mask_t
,*PHDMI_3D_sub_block_sans_all_AND_mask_t
;
367 typedef struct SI_PACK_THIS_STRUCT _HDMI_3D_sub_block_sans_mask_t
369 _3D_structure_all_t _3D_structure_all
;
370 _3D_structure_and_detail_entry_u _3D_structure_and_detail_list
[1];
371 }HDMI_3D_sub_block_sans_mask_t
,*PHDMI_3D_sub_block_sans_mask_t
;
373 typedef struct SI_PACK_THIS_STRUCT _HDMI_3D_sub_block_with_all_AND_mask_t
375 _3D_structure_all_t _3D_structure_all
;
377 _3D_structure_and_detail_entry_u _3D_structure_and_detail_list
[1];
378 }HDMI_3D_sub_block_with_all_AND_mask_t
,*PHDMI_3D_sub_block_with_all_AND_mask_t
;
382 HDMI_3D_sub_block_sans_all_AND_mask_t hDMI_3D_sub_block_sans_all_AND_mask
;
383 HDMI_3D_sub_block_sans_mask_t HDMI_3D_sub_block_sans_mask
;
384 HDMI_3D_sub_block_with_all_AND_mask_t HDMI_3D_sub_block_with_all_AND_mask
;
385 }HDMI_3D_sub_block_t
,*PHDMI_3D_sub_block_t
;
387 typedef struct SI_PACK_THIS_STRUCT _vsdb_t
389 data_block_header_byte_t header
;
393 HDMI_LLC_vsdb_payload_t HDMI_LLC
;
394 uint8_t payload
[1]; // open ended
402 }colorimetry_xvYCC_e
;
404 typedef struct SI_PACK_THIS_STRUCT _colorimetry_xvYCC_t
406 colorimetry_xvYCC_e xvYCC
:2;
407 unsigned char reserved1
:6;
408 }colorimetry_xvYCC_t
,*Pcolorimetry_xvYCC_t
;
410 typedef struct SI_PACK_THIS_STRUCT _colorimetry_meta_data_t
412 unsigned char meta_data
:3;
413 unsigned char reserved2
:5;
414 }colorimetry_meta_data_t
,*Pcolorimetry_meta_data_t
;
416 typedef struct SI_PACK_THIS_STRUCT _colorimetry_data_payload_t
418 colorimetry_xvYCC_t ci_data
;
419 colorimetry_meta_data_t cm_meta_data
;
420 }colorimetry_data_payload_t
,*Pcolorimetry_data_payload_t
;
421 typedef struct SI_PACK_THIS_STRUCT _colorimetry_data_block_t
423 data_block_header_byte_t header
;
424 extended_tag_code_t extended_tag
;
425 colorimetry_data_payload_t payload
;
427 }colorimetry_data_block_t
,*Pcolorimetry_data_block_t
;
432 ,ceou_ALWAYS_OVERSCANNED
= 1
433 ,ceou_ALWAYS_UNDERSCANNED
= 2
435 }CE_overscan_underscan_behavior_e
;
440 ,itou_ALWAYS_OVERSCANNED
= 1
441 ,itou_ALWAYS_UNDERSCANNED
= 2
443 }IT_overscan_underscan_behavior_e
;
448 ,ptou_ALWAYS_OVERSCANNED
= 1
449 ,ptou_ALWAYS_UNDERSCANNED
= 2
451 }PT_overscan_underscan_behavior_e
;
453 typedef struct SI_PACK_THIS_STRUCT _video_capability_data_payload_t
455 CE_overscan_underscan_behavior_e S_CE
:2;
456 IT_overscan_underscan_behavior_e S_IT
:2;
457 PT_overscan_underscan_behavior_e S_PT
:2;
459 unsigned quantization_range_selectable
:1;
460 }video_capability_data_payload_t
,*Pvideo_capability_data_payload_t
;
462 typedef struct SI_PACK_THIS_STRUCT _video_capability_data_block_t
464 data_block_header_byte_t header
;
465 extended_tag_code_t extended_tag
;
466 video_capability_data_payload_t payload
;
468 }video_capability_data_block_t
,*Pvideo_capability_data_block_t
;
470 typedef struct SI_PACK_THIS_STRUCT _CEA_data_block_collection_t
472 data_block_header_byte_t header
;
476 extended_tag_code_t extended_tag
;
477 cea_short_descriptor_t short_descriptor
;
479 // open ended array of cea_short_descriptor_t starts here
480 }CEA_data_block_collection_t
,*PCEA_data_block_collection_t
;
482 typedef struct SI_PACK_THIS_STRUCT _CEA_extension_version_1_t
484 uint8_t reservedMustBeZero
;
485 uint8_t reserved
[123];
486 }CEA_extension_version_1_t
,*PCEA_extension_version_1_t
;
488 typedef struct SI_PACK_THIS_STRUCT _CEA_extension_2_3_misc_support_t
490 uint8_t total_number_detailed_timing_descriptors_in_entire_EDID
:4;
491 uint8_t YCrCb422_support
:1;
492 uint8_t YCrCb444_support
:1;
493 uint8_t basic_audio_support
:1;
494 uint8_t underscan_IT_formats_by_default
:1;
495 }CEA_extension_2_3_misc_support_t
,*PCEA_extension_2_3_misc_support_t
;
496 typedef struct SI_PACK_THIS_STRUCT _CEA_extension_version_2_t
498 CEA_extension_2_3_misc_support_t misc_support
;
500 uint8_t reserved
[123];
501 }CEA_extension_version_2_t
,*PCEA_extension_version_2_t
;
503 typedef struct SI_PACK_THIS_STRUCT _CEA_extension_version_3_t
505 CEA_extension_2_3_misc_support_t misc_support
;
508 uint8_t data_block_collection
[123];
509 uint8_t reserved
[123];
511 }CEA_extension_version_3_t
,*PCEA_extension_version_3_t
;
513 typedef struct SI_PACK_THIS_STRUCT _block_map_t
516 uint8_t block_tags
[126];
518 }block_map_t
, *Pblock_map_t
;
520 typedef struct SI_PACK_THIS_STRUCT _CEA_extension_t
524 uint8_t byte_offset_to_18_byte_descriptors
;
527 CEA_extension_version_1_t version1
;
528 CEA_extension_version_2_t version2
;
529 CEA_extension_version_3_t version3
;
532 }CEA_extension_t
,*PCEA_extension_t
;
534 typedef struct SI_PACK_THIS_STRUCT _detailed_timing_descriptor_t
536 uint8_t pixel_clock_low
;
537 uint8_t pixel_clock_high
;
538 uint8_t horz_active_7_0
;
539 uint8_t horz_blanking_7_0
;
540 struct SI_PACK_THIS_STRUCT
542 unsigned char horz_blanking_11_8
:4;
543 unsigned char horz_active_11_8
:4;
544 }horz_active_blanking_high
;
545 uint8_t vert_active_7_0
;
546 uint8_t vert_blanking_7_0
;
547 struct SI_PACK_THIS_STRUCT
549 unsigned char vert_blanking_11_8
:4;
550 unsigned char vert_active_11_8
:4;
551 }vert_active_blanking_high
;
552 uint8_t horz_sync_offset_7_0
;
553 uint8_t horz_sync_pulse_width7_0
;
554 struct SI_PACK_THIS_STRUCT
556 unsigned char vert_sync_pulse_width_3_0
:4;
557 unsigned char vert_sync_offset_3_0
:4;
558 }vert_sync_offset_width
;
559 struct SI_PACK_THIS_STRUCT
561 unsigned char vert_sync_pulse_width_5_4
:2;
562 unsigned char vert_sync_offset_5_4
:2;
563 unsigned char horz_sync_pulse_width_9_8
:2;
564 unsigned char horzSyncOffset9_8
:2;
565 }hs_offset_hs_pulse_width_vs_offset_vs_pulse_width
;
566 uint8_t horz_image_size_in_mm_7_0
;
567 uint8_t vert_image_size_in_mm_7_0
;
568 struct SI_PACK_THIS_STRUCT
570 unsigned char vert_image_size_in_mm_11_8
:4;
571 unsigned char horz_image_size_in_mm_11_8
:4;
573 uint8_t horz_border_in_lines
;
574 uint8_t vert_border_in_pixels
;
575 struct SI_PACK_THIS_STRUCT
577 unsigned char stereo_bit_0
:1;
578 unsigned char sync_signal_options
:2;
579 unsigned char sync_signal_type
:2;
580 unsigned char stereo_bits_2_1
:2;
581 unsigned char interlaced
:1;
583 }detailed_timing_descriptor_t
,*Pdetailed_timing_descriptor_t
;
585 typedef struct SI_PACK_THIS_STRUCT _red_green_bits_1_0_t
587 unsigned char green_y
:2;
588 unsigned char green_x
:2;
589 unsigned char red_y
:2;
590 unsigned char red_x
:2;
591 }red_green_bits_1_0_t
,*Pred_green_bits_1_0_t
;
593 typedef struct SI_PACK_THIS_STRUCT _blue_white_bits_1_0_t
595 unsigned char white_y
:2;
596 unsigned char white_x
:2;
597 unsigned char blue_y
:2;
598 unsigned char blue_x
:2;
600 }blue_white_bits_1_0_t
,*Pblue_white_bits_1_0_t
;
603 typedef struct SI_PACK_THIS_STRUCT _established_timings_I_t
605 unsigned char et800x600_60Hz
:1;
606 unsigned char et800x600_56Hz
:1;
607 unsigned char et640x480_75Hz
:1;
608 unsigned char et640x480_72Hz
:1;
609 unsigned char et640x480_67Hz
:1;
610 unsigned char et640x480_60Hz
:1;
611 unsigned char et720x400_88Hz
:1;
612 unsigned char et720x400_70Hz
:1;
613 }established_timings_I_t
,*Pestablished_timings_I_t
;
615 typedef struct SI_PACK_THIS_STRUCT _established_timings_II_t
617 unsigned char et1280x1024_75Hz
:1;
618 unsigned char et1024x768_75Hz
:1;
619 unsigned char et1024x768_70Hz
:1;
620 unsigned char et1024x768_60Hz
:1;
621 unsigned char et1024x768_87HzI
:1;
622 unsigned char et832x624_75Hz
:1;
623 unsigned char et800x600_75Hz
:1;
624 unsigned char et800x600_72Hz
:1;
625 }established_timings_II_t
,*Pestablished_timings_II_t
;
627 typedef struct SI_PACK_THIS_STRUCT _manufacturers_timings_t
629 unsigned char reserved
:7;
630 unsigned char et1152x870_75Hz
:1;
631 }manufacturers_timings_t
,*Pmanufacturers_timings_t
;
639 }image_aspect_ratio_e
;
641 typedef struct SI_PACK_THIS_STRUCT _standard_timing_t
643 unsigned char horz_pix_div_8_minus_31
;
644 unsigned char field_refresh_rate_minus_60
:6;
645 image_aspect_ratio_e image_aspect_ratio
:2;
646 }standard_timing_t
,*Pstandard_timing_t
;
648 typedef struct SI_PACK_THIS_STRUCT _EDID_block0_t
650 unsigned char header_data
[8];
651 TwoBytes_t id_manufacturer_name
;
652 TwoBytes_t id_product_code
;
653 unsigned char serial_number
[4];
654 unsigned char week_of_manufacture
;
655 unsigned char year_of_manufacture
;
656 unsigned char EDID_version
;
657 unsigned char EDID_revision
;
658 unsigned char video_input_definition
;
659 unsigned char horz_screen_size_or_aspect_ratio
;
660 unsigned char vert_screen_size_or_aspect_ratio
;
661 unsigned char display_transfer_characteristic
;
662 unsigned char feature_support
;
663 red_green_bits_1_0_t red_green_bits_1_0
;
664 blue_white_bits_1_0_t blue_white_bits_1_0
;
667 unsigned char green_x
;
668 unsigned char green_y
;
669 unsigned char blue_x
;
670 unsigned char blue_y
;
671 unsigned char white_x
;
672 unsigned char white_y
;
673 established_timings_I_t established_timings_I
;
674 established_timings_II_t established_timings_II
;
675 manufacturers_timings_t manufacturers_timings
;
676 standard_timing_t standard_timings
[8];
677 detailed_timing_descriptor_t detailed_timing_descriptors
[4];
678 unsigned char extension_flag
;
679 unsigned char checksum
;
681 }EDID_block0_t
,*PEDID_block0_t
;
683 typedef struct SI_PACK_THIS_STRUCT _monitor_name_t
685 uint8_t flag_required
[2];
686 uint8_t flag_reserved
;
687 uint8_t data_type_tag
;
689 uint8_t ascii_name
[13];
692 }monitor_name_t
,*Pmonitor_name_t
;
694 typedef struct SI_PACK_THIS_STRUCT _monitor_range_limits_t
697 uint8_t flag_required
[2];
698 uint8_t flag_reserved
;
699 uint8_t data_type_tag
;
701 uint8_t min_vertical_rate_in_Hz
;
702 uint8_t max_vertical_rate_in_Hz
;
703 uint8_t min_horizontal_rate_in_KHz
;
704 uint8_t max_horizontal_rate_in_KHz
;
705 uint8_t max_pixel_clock_in_MHz_div_10
;
706 uint8_t tag_secondary_formula
;
708 }monitor_range_limits_t
,*Pmonitor_range_limits_t
;
711 typedef union tag_18_byte_descriptor_u
713 detailed_timing_descriptor_t dtd
;
715 monitor_range_limits_t range_limits
;
716 }_18_byte_descriptor_u
,*P_18_byte_descriptor_u
;
719 typedef struct SI_PACK_THIS_STRUCT _display_mode_3D_info_t
721 unsigned char dmi_3D_supported
:1;
722 unsigned char dmi_sufficient_bandwidth
:1;
723 }display_mode_3D_info_t
,*Pdisplay_mode_3D_info_t
;
727 vif_single_frame_rate
= 0x00
728 ,vif_dual_frame_rate
= 0x01
744 ,par_16_to_45_160_to_45
745 ,par_1_to_15_10_to_15
747 ,par_2_to_15_20_to_15
752 ,par_4_to_27_40_to_27
758 ,par_8_to_27_80_to_27
759 ,par_8_to_45_80_to_45
761 }pixel_aspect_ratio_e
;
765 typedef struct SI_PACK_THIS_STRUCT _VIC_info_fields_t
767 image_aspect_ratio_e image_aspect_ratio
:2;
768 VIC_scan_mode_e interlaced
:1;
769 pixel_aspect_ratio_e pixel_aspect_ratio
:5;
771 VIC_info_flags_e frame_rate_info
:1;
772 uint8_t clocks_per_pixel_shift_count
:2;
773 uint8_t field2_v_blank
:2;
775 }VIC_info_fields_t
,*PVIC_info_fields_t
;
779 typedef struct SI_PACK_THIS_STRUCT _VIC_info_t
783 uint16_t h_blank_in_pixels
;
784 uint16_t v_blank_in_pixels
;
785 uint32_t field_rate_in_milliHz
;
786 VIC_info_fields_t fields
;
787 // uint16_t pixClockDiv10000;
788 }VIC_info_t
,*PVIC_info_t
;
790 typedef struct SI_PACK_THIS_STRUCT _HDMI_VIC_info_t
794 uint32_t field_rate_0_in_milliHz
,field_rate_1_in_milliHz
;
795 uint32_t pixel_clock_0
,pixel_clock_1
;
796 }HDMI_VIC_info_t
,*PHDMI_VIC_info_t
;
799 #if 1//def ENABLE_EDID_DEBUG_PRINT //(
800 void dump_EDID_block_impl(const char *pszFunction
, int iLineNum
,uint8_t override
,uint8_t *pData
,uint16_t length
);
801 void clear_EDID_block_impl(uint8_t *pData
);
802 #define DUMP_EDID_BLOCK(override,pData,length) dump_EDID_block_impl(__FUNCTION__,__LINE__,override,(uint8_t *)pData,length);
803 #define CLEAR_EDID_BLOCK(pData) clear_EDID_block_impl(pData);
805 #define DUMP_EDID_BLOCK(override,pData,length) /* nothing to do */
806 #define CLEAR_EDID_BLOCK(pData) /* nothing to do */
809 enum EDID_error_codes
812 EDID_INCORRECT_HEADER
,
814 EDID_NO_861_EXTENSIONS
,
815 EDID_SHORT_DESCRIPTORS_OK
,
816 EDID_LONG_DESCRIPTORS_OK
,
819 EDID_V_DESCR_OVERFLOW
,
820 EDID_UNKNOWN_TAG_CODE
,
821 EDID_NO_DETAILED_DESCRIPTORS
,
822 EDID_DDC_BUS_REQ_FAILURE
,
823 EDID_DDC_BUS_RELEASE_FAILURE
,
826 SI_POP_STRUCT_PACKING
//)
828 #endif /* #if !defined(SI_EDID_H) */