digitaltrails / ddcutil-service

A Dbus ddcutil server for control of DDC Monitors/VDUs
GNU General Public License v2.0
11 stars 1 forks source link

EDID decoder not accessible via libddcutil #3

Closed digitaltrails closed 7 months ago

digitaltrails commented 9 months ago

Binary serial-number and other fields decoded from edid is not exposed by libddcutil.

For the moment I've copied the binary serial decode into the ddcutil-dbus-server source. That's the main field needed at this point.

digitaltrails commented 9 months ago

Could probably add macros to the ddcutil library header for some of these. Ask @rockowitz?

digitaltrails commented 7 months ago

Decided to copy the small amount of code needed from libddcutil.

rockowitz commented 7 months ago

DDCA_Display_Info contains the ASCII "serial number", but not the binary serial number. It's entirely reasonable for it to contain the binary serial number as well. Unfortunately, adding another field would break binary compatibility and entail a SONAME bump. So it won't happen any time soon. However, DDCA_Display_Info contains the raw edid, and as you've seen it takes just one C statement to extract the binary serial number.

digitaltrails commented 7 months ago

DDCA_Display_Info contains the ASCII "serial number", but not the binary serial number. It's entirely reasonable for it to contain the binary serial number as well. Unfortunately, adding another field would break binary compatibility and entail a SONAME bump. So it won't happen any time soon. However, DDCA_Display_Info contains the raw edid, and as you've seen it takes just one C statement to extract the binary serial number.

As the code is trivial and a well defined standard interpretation of the EDID, I see no harm in copying it.

Rather than including extra info in DDCA_Display_Info, a future development of libddcutil could just expose some functions for decoding the edid.