HDMI EDID

EDID的简介和解析 一、EDID简介 EDID: Extended Display Identification Data (外部显示设备标识数据)----指DDC通讯中传输的显示设备数据。 Q1:EDID是什么? A1:EDID的全称是Extended Display Identification Data(扩展显示标识数据),VGA、DVI的EDID由主块128字节组成,HDMI的EDID增加... 阅读详情
1.何为EDID
现在的显示设备比如显示器,电视等都HDMI接口,那通常每个HDMI接口都保留有一份EDID数据,这个数据可以存在程序里面由系统启动过程中来初始化,更常见的做法是每个HDMI口会有一个EEPROM来保存这份数据,这个EEPROM也只是有256bytes大小。外接设备如DVD播放器在HDMI热插拔的时候就会通过HDMI的DDC通道来读取EDID数据。EDID里面主要是定义了这显示设备所支持的图像分辨率,支持的声音格式,声音通道,及3D等等,其目的是告诉外接设备我所支持的特性,让外接设备输出一个我所支持的timing,否则外接设备输出的timing并不支持的话那就没有图像,声音的显示了。

2.数据格式及linux驱动
Hdmi edid 数据解析  

一.EDID数据格式:

EDID 1.3 data format
Byte sequence 


00-19 Header information
00–07 Header information "00h FFh FFh FFh FFh FFh FFh 00h"
08–09 Manufacturer ID. These IDs are assigned by Microsoft. "00001=A”; “00010=B”; ... “11010=Z”. Bit 7 (at address 08h) is 0, the first character (letter) is located at bits 6 → 2 (at address 08h), the second character (letter) is located at bits 1 & 0 (at address 08h) and bits 7 → 5 (at address 09h), and the third character (letter) is located at bits 4 → 0 (at address 09h).
10–11 Product ID Code (stored as LSB first). Assigned by manufacturer.
12–15 32-bit Serial Number. No requirement for the format. Usually stored as LSB first. In order to maintain compatibility with previous requirements the field should set at least one byte of the field to be non-zero if an ASCII serial number descriptor is provided in the detailed timing section.
16 Week of Manufacture. This varies by manufacturer. One way is to count January 1–7 as week 1, January 8–15 as week 2 and so on. Some count based on the week number (Sunday-Saturday). Valid range is 1-54.
17 Year of Manufacture. Add 1990 to the value for actual year.
18 EDID Version Number "01h"
19 EDID Revision Number "03h"


20-24 Basic display parameters
20 Video input definition
7 0=analog 1=digital
6 video level

00=0.7, 0.3; 01=0.714, 0.286; 10=1, 0.4; 11=0.7, 0
5
4 blank-to-black setup
3 separate syncs
2 composite sync
1 sync on green
0 serration vsync 1=DFP 1.x compatible
21 Maximum Horizontal Image Size (in centimeters).
22 Maximum Vertical Image Size (in centimetres).
23 Display Gamma. Divide by 100, then add 1 for actual value.
24 Power Management and Supported Feature(s):
7 standby
6 suspend
5 active-off/low power
4 Display type:

00=monochrome, 01=RGB colour, 10=non RGB multicolour, 11=undefined
3
2 standard colour space
1 preferred timing mode
0 default GTF supported


25-34 Chromaticity coordinates
25 low significant bits for Red X (bit 7-6), Red Y (bit 5-4), Green X (bit 3-2), Green Y (bit 1-0).
26 low significant bits for Blue X (bit 7-6), Blue Y (bit 5-4), White X (bit 3-2), White Y (bit 1-0).
27–34 high significant bits for Red X, Red Y, Green X, Green Y, Blue X, Blue Y, White X, White Y. To decode actual value, rearrange bits as follows: High significant bits 7-0 for (channel), low significant bits for (channel). Actual value is between 0.000 and 0.999, but encoded value is between 000h and 3FFh. Normalize by *999/1023.


35 Established timing I:

720×400@70 Hz, 720×400@88 Hz, 640×480@60 Hz, 640×480@67 Hz, 640×480@72 Hz, 640×480@75 Hz, 800×600@56 Hz, 800×600@60 Hz


36 Established timing II:

800×600@72 Hz, 800×600@75 Hz, 832×624@75 Hz, 1024×768@87 Hz (Interlaced), 1024×768@60 Hz, 1024×768@70 Hz, 1024×768@75 Hz, 1280×1024@75 Hz


37 Manufacturer's reserved timing:

00h for none
bit 7: 1152x870 @ 75 Hz (Mac II, Apple)

38–53 Standard timing identification


First byte: Horizontal resolution. Multiply by 8, then add 248 for actual value.
Second byte:

bit 7-6
Aspect ratio. Actual vertical resolution depends on horizontal resolution.
00=16:10, 01=4:3, 10=5:4, 11=16:9 (00=1:1 prior to v1.3)
bit 5-0
Vertical frequency. Add 60 to get actual value.

54–71 Descriptor Block 1
54–55 Pixel Clock (in 10 kHz) or 0 (55 MSB 54 LSB)

If Pixel Clock is non null:
56: Horizontal Active (in pixels)
57: Horizontal Blanking (in pixels)
58: Horizontal Active high (4 upper bits)
Horizontal Blanking high (4 lower bits)
59: Vertical Active (in lines)
60: Vertical Blanking (in lines)
61: high significant bits for Vertical Active (4 upper bits)
high significant bits for Vertical Blanking (4 lower bits)
62: Horizontal Sync Offset (in pixels)
63: Horizontal Sync Pulse Width (in pixels)
64: Vertical Sync Offset (in lines) (4 upper bits)
Vertical Sync Pulse Width (in lines) (4 lower bits)
65: high significant bits for Horizontal Sync Offset (bit 7-6)
high significant bits for Horizontal Sync Pulse Width (bit 5-4)
high significant bits for Vertical Sync Offset (bit 3-2)
high significant bits for Vertical Sync Pulse Width (bit 1-0)
66: Horizontal Image Size (in mm)
67: Vertical Image Size (in mm)
68: high significant bits for Horizontal Image Size (4 upper bits)
high significant bits for Vertical Image Size (4 lower bits)
69: Horizontal Border (in pixels representing only one side)
70: Vertical Border (in lines representing only one side)
71: Interlaced or not (bit 7)
Stereo or not (bit 6-5) ("00" means not)
Separate Sync or not (bit 4-3)
Vertical Sync positive or not (bit 2)
Horizontal Sync positive or not (bit 1)
Stereo Mode (bit 0) (unused if 6-5 are 00)
If Pixel Clock is null:
56: 0
57: Block type
FFh=Monitor Serial Number, FEh=ASCII string, FDh=Monitor Range Limits, FCh=Monitor name, 
FBh=Colour Point Data, FAh, Standard Timing Data, F9h=Currently undefined, 
0Fh=defined by manufacturer
58: 0
59–71: Descriptor block contents.
If block type is FFh, FEh, or FCh, the entire area is a text string.
If block type is FDh:
59–63:
Min Vertical frequency, Max Vertical frequency, 
Min Horizontal frequency (in kHz), Max Horizontal frequency (in kHz), pixel clock 
(in MHz (multiply by 10 for actual value))
64–65: Secondary GTF toggle
If encoded value is 000A, bytes 59-63 are used. If encoded value is 0200, 
bytes 67–71 are used.
66: Start horizontal frequency (in kHz). Multiply by 2 for actual value.
67: C. Divide by 2 for actual value.
68-69: M (stored as LSB first).
70: K
71: J. Divide by 2 for actual value.
If block type is FBh:
59: W Index 0. If set to 0, bytes 60-63 are not used. If set to 1, 60–63 are 
assigned to white point index #1
64: W Index 1. If set to 0, bytes 65-68 are not used. If set to 2, 65–68 are 
assigned to white point index #2
White point index structure:
First byte
bit 3-2: low significant bits for White X (bit 3-2), White Y (bit 1-0)
Second to third byte: high significant bits for White X, White Y.
Fourth byte: Gamma. Divide by 100, then add 1 for actual value.
To decode White X and White Y, see bytes 25-34.
If block type is FAh:
59–70: Standard Timing Identification. 2 bytes for each record.
For structure details, see bytes 38-53.

72–89 Descriptor Block 2


90–107 Descriptor Block 3


108–125 Descriptor Block 4


126 Extension Flag. 

This is the number of extension blocks which follow this block. Prior to EDID 1.3, it is ignored, and should be set to 0.


127 Checksum. 

This byte should be programmed such that the sum of all 128 bytes equals 00h. 


CEA EDID Timing Extension Version 3 data format:

Byte sequence
00: Extension tag (which kind of extension block this is); 02h for CEA EDID
01: Revision number (Version number); 03h for Version 3
02: Byte number "d" within this block where the 18-byte DTDs begin. If no non-DTD data is present 
in this extension block, the value should be set to 04h (the byte after next). If set to 00h,
there are no DTDs present in this block and no non-DTD data.
03: Number of DTDs present, other Version 2+ information
bit 7: 1 if display supports underscan, 0 if not
bit 6: 1 if display supports basic audio, 0 if not
bit 5: 1 if display supports YCbCr 4:4:4, 0 if not
bit 4: 1 if display supports YCbCr 4:2:2, 0 if not
bit 3..0: total number of native formats in the DTDs included in this block
04: Start of Data Block Collection. If byte 02 is set to 04h, this is where the DTD collection
begins. If byte 02 is set to another value, byte 04 is where the Data Block Collection begins,
and the DTD collection follows immediately thereafter.

The Data Block Collection contains one or more data blocks detailing video, audio, and speaker
placement information about the display. The blocks can be placed in any order, and the initial
byte of each block defines both its type and its length:
bit 7..5: Block Type Tag (1 is audio, 2 is video, 3 is vendor specific, 4 is speaker
allocation, all other values Reserved) 
bit 4..0: Total number of bytes in this block following this byte
Once one data block has ended, the next byte is assumed to be the beginning of the next data
block. This is the case until the byte (designated in Byte 02, above) where the DTDs are known 
to begin.

Any Audio Data Block contains one or more 3-byte Short Audio Descriptors (SADs). Each SAD
details audio format, channel number, and bitrate/resolution capabilities of the display as
follows:
SAD Byte 1 (format and number of channels):
bit 7: Reserved (0)
bit 6..3: Audio format code
1 = Linear Pulse Code Modulation (LPCM)
2 = AC-3
3 = MPEG1 (Layers 1 and 2)
4 = MP3
5 = MPEG2
6 = AAC
7 = DTS
8 = ATRAC
0, 15: Reserved 
9 = One-bit audio aka SACD
10 = DD+
11 = DTS-HD
12 = MLP/Dolby TrueHD
13 = DST Audio
14 = Microsoft WMA Pro
bit 2..0: number of channels minus 1 (i.e. 000 = 1 channel; 001 = 2 channels; 111 =
8 channels)

SAD Byte 2 (sampling frequencies supported):
bit 7: Reserved (0)
bit 6: 192kHz
bit 5: 176kHz
bit 4: 96kHz
bit 3: 88kHz
bit 2: 48kHz
bit 1: 44kHz
bit 0: 32kHz

SAD Byte 3 (bitrate):
For LPCM, bits 7:3 are reserved and the remaining bits define bit depth
bit 2: 24 bit
bit 1: 20 bit
bit 0: 16 bit
For all other sound formats, bits 7..0 designate the maximum supported bitrate divided by 
8kbps.

Any Video Data Block will contain one or more 1-byte Short Video Descriptors (SVDs). They are 
decoded as follows:
bit 7: 1 to designate that this should be considered a "native" resolution, 0 for non-native
bit 6..0: index value to a table of standard resolutions/timings from CEA/EIA-861E:

Code
Short Aspect
Name Ratio HxV @ F

1 DMT0659 4:3 640x480p @ 59.94/60Hz
2 480p 4:3 720x480p @ 59.94/60Hz
3 480pH 16:9 720x480p @ 59.94/60Hz
4 720p 16:9 1280x720p @ 59.94/60Hz
5 1080i 16:9 1920x1080i @ 59.94/60Hz
6 480i 4:3 720(1440)x480i @ 59.94/60Hz
7 480iH 16:9 720(1440)x480i @ 59.94/60Hz
8 240p 4:3 720(1440)x240p @ 59.94/60Hz
9 240pH 16:9 720(1440)x240p @ 59.94/60Hz
10 480i4x 4:3 (2880)x480i @ 59.94/60Hz
11 480i4xH 16:9 (2880)x480i @ 59.94/60Hz
12 240p4x 4:3 (2880)x240p @ 59.94/60Hz
13 240p4xH 16:9 (2880)x240p @ 59.94/60Hz
14 480p2x 4:3 1440x480p @ 59.94/60Hz
15 480p2xH 16:9 1440x480p @ 59.94/60Hz
16 1080p 16:9 1920x1080p @ 59.94/60Hz
17 576p 4:3 720x576p @ 50Hz
18 576pH 16:9 720x576p @ 50Hz
19 720p50 16:9 1280x720p @ 50Hz
20 1080i25 16:9 1920x1080i @ 50Hz*
21 576i 4:3 720(1440)x576i @ 50Hz
22 576iH 16:9 720(1440)x576i @ 50Hz
23 288p 4:3 720(1440)x288p @ 50Hz
24 288pH 16:9 720(1440)x288p @ 50Hz
25 576i4x 4:3 (2880)x576i @ 50Hz
26 576i4xH 16:9 (2880)x576i @ 50Hz
27 288p4x 4:3 (2880)x288p @ 50Hz
28 288p4xH 16:9 (2880)x288p @ 50Hz
29 576p2x 4:3 1440x576p @ 50Hz
30 576p2xH 16:9 1440x576p @ 50Hz
31 1080p50 16:9 1920x1080p @ 50Hz
32 1080p24 16:9 1920x1080p @ 23.98/24Hz
33 1080p25 16:9 1920x1080p @ 25Hz
34 1080p30 16:9 1920x1080p @ 29.97/30Hz
35 480p4x 4:3 (2880)x480p @ 59.94/60Hz
36 480p4xH 16:9 (2880)x480p @ 59.94/60Hz
37 576p4x 4:3 (2880)x576p @ 50Hz
38 576p4xH 16:9 (2880)x576p @ 50Hz
39 1080i25 16:9 1920x1080i(1250 Total) @ 50Hz*
40 1080i50 16:9 1920x1080i @ 100Hz
41 720p100 16:9 1280x720p @ 100Hz
42 576p100 4:3 720x576p @ 100Hz
43 576p100H 16:9 720x576p @ 100Hz
44 576i50 4:3 720(1440)x576i @ 100Hz
45 576i50H 16:9 720(1440)x576i @ 100Hz
46 1080i60 16:9 1920x1080i @ 119.88/120Hz
47 720p120 16:9 1280x720p @ 119.88/120Hz
48 480p119 4:3 720x480p @ 119.88/120Hz
49 480p119H 16:9 720x480p @ 119.88/120Hz
50 480i59 4:3 720(1440)x480i @ 119.88/120Hz
51 480i59H 16:9 720(1440)x480i @ 119.88/120Hz
52 576p200 4:3 720x576p @ 200Hz
53 576p200H 16:9 720x576p @ 200Hz
54 576i100 4:3 720(1440)x576i @ 200Hz
55 576i100H 16:9 720(1440)x576i @ 200Hz
56 480p239 4:3 720x480p @ 239.76/240Hz
57 480p239H 16:9 720x480p @ 239.76/240Hz
58 480i119 4:3 720(1440)x480i @ 239.76/240Hz
59 480i119H 16:9 720(1440)x480i @ 239.76/240Hz
60 720p24 16:9 1280x720p @ 23.98/24Hz
61 720p25 16:9 1280x720p @ 25Hz
62 720p30 16:9 1280x720p @ 29.97/30Hz
63 1080p120 16:9 1920x1080p @ 119.88/120Hz


二.hdmi ddc bus是通过 i2c总线来通信的,因此要在kernel注册i2c驱动:

    i2c驱动的设备节点是/dev/hdmi_ddc_misc,这个驱动非常的简单,只做了将35 byte的edid数据从kernel空间传到用户空间。

然后就可以在用户空间读到这35 byte的数据:

fh = open("/dev/hdmi_ddc_misc",O_RDWR);
if (fh == -1) {
printf("open hdmi_ddc device error! ");
return 0;
}
if(ioctl(fh,HDMI_DDC_I2C_READ,hdmi_edid_data)<0){
perror("ioctl error");
exit(1);
} 


三.在用户空间对edid数据的解析:

//printf("Established timing monitor support:\n");
if(hdmi_edid_data[0] & ESTABLISHED_TIMING2)videoType |= (1 << VideoStd_640x480); 
if(hdmi_edid_data[0] & ESTABLISHED_TIMING3)videoType |= (1 << VideoStd_640x480);
if(hdmi_edid_data[0] & ESTABLISHED_TIMING4)videoType |= (1 << VideoStd_640x480);
if(hdmi_edid_data[0] & ESTABLISHED_TIMING5)videoType |= (1 << VideoStd_640x480);

if(hdmi_edid_data[1] & ESTABLISHED_TIMING14)videoType |= (1 << VideoStd_800x600);
if(hdmi_edid_data[1] & ESTABLISHED_TIMING15)videoType |= (1 << VideoStd_800x600);

if(hdmi_edid_data[1] & ESTABLISHED_TIMING9)videoType |= (1 << VideoStd_1024x768);
if(hdmi_edid_data[1] & ESTABLISHED_TIMING10)videoType |= (1 << VideoStd_1024x768);
if(hdmi_edid_data[1] & ESTABLISHED_TIMING11)videoType |= (1 << VideoStd_1024x768);

if(hdmi_edid_data[1] & ESTABLISHED_TIMING8)videoType |= (1 << VideoStd_1280x1024);

//printf("Standard timing monitor support:\n");
for(i=0;i<8;i++){
if(0x01 == hdmi_edid_data[i*2+2])goto st_end;
hsize = hdmi_edid_data[i*2+2]*8+248;
if(0x00 == (hdmi_edid_data[i*2+3] & 0xc0))vsize=hsize/16*10;
if(0x40 == (hdmi_edid_data[i*2+3] & 0xc0))vsize=hsize/4*3;
if(0x80 == (hdmi_edid_data[i*2+3] & 0xc0))vsize=hsize/5*4;
if(0xc0 == (hdmi_edid_data[i*2+3] & 0xc0))vsize=hsize/16*9;
rate = (hdmi_edid_data[i*2+3] & 0x3f)+60;
//printf("monitor support %dx%d@%d Hz\n",hsize,vsize,rate);
if((640 == hsize) && (480 == vsize))videoType |= (1 << VideoStd_640x480);
if((720 == hsize) && (480 == vsize))videoType |= (1 << VideoStd_720x480); 
if((800 == hsize) && (480 == vsize))videoType |= (1 << VideoStd_800x480); 
if((800 == hsize) && (600 == vsize))videoType |= (1 << VideoStd_800x600); 
if((1024 == hsize) && (768 == vsize))videoType |= (1 << VideoStd_1024x768); 
if((1280 == hsize) && (720 == vsize))videoType |= (1 << VideoStd_1280x720); 
if((1280 == hsize) && (1024 == vsize))videoType |= (1 << VideoStd_1280x1024); 
if((1600 == hsize) && (900 == vsize))videoType |= (1 << VideoStd_1600x900); 
if((1920 == hsize) && (1080 == vsize))videoType |= (1 << VideoStd_1920x1080); 
}

st_end:
//printf("CEA EDID Timing monitor support:\n");
if(0x01 != hdmi_edid_data[18])goto cet_end;
for(i=20;i<35;i++){
if(1 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_640x480);

if(2 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);
if(3 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);
if(48 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);
if(49 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);
if(56 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);
if(57 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_720x480);

if(4 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720);
if(19 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720); 
if(41 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720); 
if(47 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720); 
if(60 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720); 
if(61 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720); 
if(62 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1280x720);

if(16 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
if(31 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
if(32 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
if(33 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
if(34 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
if(63 == (hdmi_edid_data[i] & 0x7f))videoType |= (1 << VideoStd_1920x1080); 
}
cet_end:


四.数据协商,设置一种最佳的分辨率:

if(videoType & (1 << VideoStd_1280x720)) {
current_videotype = VideoStd_1280x720;
goto display_set_end;
}
if(videoType & (1 << VideoStd_1600x900)) {
current_videotype = VideoStd_1600x900;
SysFs_change(Display_Output_DVI, VideoStd_1600x900); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_1280x1024)){
current_videotype = VideoStd_1280x1024;
SysFs_change(Display_Output_DVI, VideoStd_1280x1024);
goto display_set_end;
}
if(videoType & (1 << VideoStd_1024x768)) {
current_videotype = VideoStd_1024x768;
SysFs_change(Display_Output_DVI, VideoStd_1024x768); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_800x480)) {
current_videotype = VideoStd_800x480;
SysFs_change(Display_Output_DVI, VideoStd_800x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_800x600)) {
current_videotype = VideoStd_800x600;
SysFs_change(Display_Output_DVI, VideoStd_800x600); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_640x480)) {
current_videotype = VideoStd_640x480;
SysFs_change(Display_Output_DVI, VideoStd_640x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_720x480)) {
current_videotype = VideoStd_720x480;
SysFs_change(Display_Output_DVI, VideoStd_720x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_1920x1080)){
current_videotype = VideoStd_1920x1080;
SysFs_change(Display_Output_DVI, VideoStd_1920x1080);
goto display_set_end;
}
display_set_end: 


五.提供给用户的API:

1.得到显示器支持的分辨率:

int get_monitor_support_video_type(void)
{
return videoType;
}

2.得到设备当前的分辨率:

int get_current_video_type(void)
{
return current_videotype;
}

3.设置分辨率:

int set_video_type(int videoType)
{
if(videoType & (1 << VideoStd_1280x720)) {
SysFs_change(Display_Output_DVI, VideoStd_1280x720); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_1600x900)) {
SysFs_change(Display_Output_DVI, VideoStd_1600x900); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_1280x1024)){
SysFs_change(Display_Output_DVI, VideoStd_1280x1024);
goto display_set_end;
}
if(videoType & (1 << VideoStd_1024x768)) {
SysFs_change(Display_Output_DVI, VideoStd_1024x768); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_800x480)) {
SysFs_change(Display_Output_DVI, VideoStd_800x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_800x600)) {
SysFs_change(Display_Output_DVI, VideoStd_800x600); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_640x480)) {
SysFs_change(Display_Output_DVI, VideoStd_640x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_720x480)) {
SysFs_change(Display_Output_DVI, VideoStd_720x480); 
goto display_set_end;
}
if(videoType & (1 << VideoStd_1920x1080)){
SysFs_change(Display_Output_DVI, VideoStd_1920x1080);
goto display_set_end;
}
display_set_end:
return 0;

}


现在的显示设备比如显示器,电视等都HDMI接口,那通常每个HDMI接口都保留有一份EDID数据,这个数据可以存在程序里面由系统启动过程中来初始化,更常见的做法是每个HDMI口会有一个EEPROM来保存这份数据,这个EEPROM也只是有256bytes大小。外接设备如DVD播放器在HDMI热插拔的时候就会通过HDMI的DDC通道来读取EDID数据。EDID里面主要是定义了这显示设备所支持的图像分辨率,支持的声音格式,声音通道,及3D等等,其目的是告诉外接设备我所支持的特性,让外接设备输出一个我所支持的timing,否则外接设备输出的timing并不支持的话那就没有图像,声音的显示了。
EDID结构体解析 (Extended Display Identification Data) 【代码】EDID结构体解析 (Extended Display Identification Data) 阅读详情

相关推荐

【HDMI原理】HDMI之EDID信息解读

​对于EDID信息的解读,首先需要了解EDID的基本结构。EDID是由多个块(Blocks)组成的,其中最基本的块被称为Block0或Base Block。Block0是EDID的第一个块,它包含了一些基本的显示器信息。Block0的大小为128个字节(Byte),每个字节使用16进制格式进行数据填写。每个字节(Byte)都包含了特定的信息,如显示器的制造商ID、产品序号、制造日期、支持的分辨率和刷新率等。这些信息被以特定的格式编码,并按照规定的顺序填写在Block0中的相应位置。

JWu的博客 1万+

EDID 详解

EDID

Gplusplus的博客 3万+

edid 工具获取hdmi_HDMI EDID 处理过程

DDC的参数EDID是一种VESA 标准数据格式,其中包含有关监视器及其性能的参数,包括供应商信息、最大图像大小、颜色设置、厂商预设置、频率范围的限制以及显示器名和序列号的字符串。EDID数据标准:EDID(Extended Display Identification Data Standard)至今已发布到第三版本,即EDID Version 3,前面分别有EDID Version 1.0,R...

weixin_39975810的博客 1296

HDMI EDID解读

现在的显示设备比如显示器,电视等都HDMI接口,那通常每个HDMI接口都保留有一份EDID数据,这个数据可以存在程序里面由系统启动过程中来初始化,更常见的做法是每个HDMI口会有一个EEPROM来保存这份数据,这个EEPROM也只是有256bytes大小。外接设备如DVD播放器在HDMI热插拔的时候就会通过HDMI的DDC通道来读取EDID数据。EDID里面主要是定义了这显示设备所支持的图像分辨率

7万+

HDMI之EDID分析

HDMI(HighDefinitionMultimediaInterface),作为新一代数字多媒体接口,能够传输高速率无压缩的数字音频、视频数据,HDMl1.2像素时钟可达165MHz,数据速率达到4.95Gbps,而HDMl1.3像素时钟则高达340MHz,数据速率达到10.2Gbps。目前高清1080p的数据带宽是2.2Gbps,HDMI完全可以用在高清图像传输中。事实上,目前高清图像传输也

4034

HDMI EDID详细解析

HDMI EDID详细解析 HDMI EDID的长度一般是256字节,分成2个Block,分别是Block0和Block1 PS:VGA和DVI接口的EDID,是只有一个Block而已,即Block0,共128字节 如果想了解更多EDID的知识,可以参考这篇文章 https://www.cnblogs.com/fire909090/p/10523604.html Block0 EDID Block0,共128字节,该block的格式是固定的,即每个字段的摆放位置是固定的,因此代码解析起来会相对简单些 一张长

cfl927096306的博客 2万+

hdmi tv 的edid_HDMI之EDID分析

HDMI(HighDefinitionMultimediaInterface),作为新一代数字多媒体接口,能够传输高速率无压缩的数字音频、视频数据,HDMl1.2像素时钟可达165MHz,数据速率达到4.95Gbps,而HDMl1.3像素时钟则高达340MHz,数据速率达到10.2Gbps。目前高清1080p的数据带宽是2.2Gbps,HDMI完全可以用在高清图像传输中。事实上,目前高清图像传输也...

weixin_30977485的博客 2651

HDMI之EDID入门篇

edid-decode 工欲善其事,必先利其器。edid-decode是一个很好的edid分析工具。 edid-decode commit : b00755e34eb12aa92416aaf1bb7b02603131afe0 编译 Linux环境,直接make。 Windows Msys2环境,需要稍作修改。将edid-decode-msys2.patch复制到当前目录。 git clone https://git.linuxtv.org/edid-decode.git cd edid-decode git

MTzhou的专栏 5062

HDMI之EDID

HDMI(HighDefinitionMultimediaInterface),作为新一代数字多媒体接口,能够传输高速率无压缩的数字音频、视频数据,HDMl1.2像素时钟可达165MHz,数据速率达到4.95Gbps,而HDMl1.3像素时钟则高达340MHz,数据速率达到10.2Gbps。目前高清1080p的数据带宽是2.2Gbps,HDMI完全可以用在高清图像传输中。事实上,目前高清图像传输也

linux嵌入式驱动软件开发 1万+

HDMI EDID获取过程

EDID通过HDMI DDC获取过程

qq_37057338的博客 1535

EDID详解 .docx

详细讲解EDID中每个字节的含义,希望对大家有所帮助,谢谢!

最为详细的HDMI接口EDID的解析,有它就够了

HDMI EDID详细解析 cfl927096306 2020-08-15 08:58:49 ...

USB_ABC的博客 12万+

vivado的 vid_edid 的自定义ip源码

vivado的 vid_edid 的自定义ip源码,在使用hdmi,dp的时候科使用到他。

edid 工具获取hdmi_HDMI EDID解读

E-EDID的数据结构http://blog.sina.com.cn/s/blog_679686370100vf09.htmlhttp://blog.youkuaiyun.com/wowo1109/article/details/8805045现在的显示设备比如显示器,电视等都HDMI接口,那通常每个HDMI接口都保留有一份EDID数据,这个数据可以存在程序里面由系统启动过程中来初始 化,更常见的做法是每个H...

weixin_39776787的博客 769

edid读取和编辑工具

win7可用的edid读取和编辑工具

获取与解析EDID信息

遵循UEFI规范,使用规定的协议获取显示器的EDID信息,并根据EDID标准对其进行解析。

上一篇: 垂直同步
下一篇: OPENGL颜色混合
KjfureOne
博客等级 码龄14年 72粉丝 70原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值