In HDMI protocol, Extended Display Identification Data (EDID) is a data structure provided by a digital display to describe its capabilities to a video source (e.g. graphics card or set-top box).  The EDID includes manufacturer name and serial number, product type, phosphor or filter type, timings supported by the display, display size, luminance data and pixel mapping data.

For applications like HDMI CEC, it is required to know port number of HDMI port number of the TV/monitor connected. This post focus on how to get the HDMI port detail from the HDMI-EDID data. EDID structure versions range from v1.0 to v1.4; all these define upwards-compatible 128-byte structures. HDMI port information are avilabe in the EIA/CEA-861 extension block from Version 3 (from the −861B spec). This Version 3 includes four new optional types of data blocks: Video Data Blocks containing the aforementioned Short Video Descripter (SVD), Audio Data Blocks containing Short Audio Descriptors (SAD), Speaker Allocation Data Blocks containing information about the speaker configuration of the display device, and Vendor Specific Data Blocks which can contain information specific to a given vendor’s use.

The HDMI port information can be obtained from the**“Vendor Specific data Blocks”** as below.

A “Vendor Specific Data Block” (if any) contains as its first three bytes the vendor’s IEEE 24-bit registration number, LSB first. For HDMI, it is always 00-0C-03 for HDMI Licensing, LLC. It is followed by a two byte source physical address, LSB first. The source physical address provides the CEC physical address for upstream CEC devices

Below are few examples of EDID data and corresponding port number.

For Port ID 1 in SONY TV

For Port ID 3 in SONY TV

For Port ID 1 in Samsung Monitor

For Port ID 2 in Samsung Monitor

So, the MSB in the highlighted text gives you the port number of the HDMI data. It can take value from 1 to F (16 HDMI ports maximum)