tiny-pilot / edid2bin

Converts a hex EDID to a binary EDID.
0 stars 1 forks source link

Why does the resulting file differ when compared to an extracted EDID? #1

Open cghague opened 1 year ago

cghague commented 1 year ago

It is possible to extract an EDID using v4l2-ctl. The output format can be either hex (the default) or raw binary. It appears that this method produces a different output than edid2bin, despite starting from the same hex input. An analysis of the files using "AW EDID Editor" suggests they still contain the same information.

It would be good to understand why this happens and to determine if there are any implications to it.

Steps to reproduce the issue

This assumes you have a valid hex EDID saved as edid_source.hex, a working TinyPilot device and an installed copy of edid2bin and it's requirements.

Create a binary version of the EDID using v4l2-ctl on a TinyPilot device

  1. Copy edid_source.hex on to the device.
  2. Set the hex EDID as the active EDID: sudo v4l2-ctl --device=/dev/video0 --set-edid=file=edid_source.hex --fix-edid-checksums
  3. Extract the now applied EDID in binary format: sudo v4l2-ctl --device=/dev/video0 --get-edid=file=edid_v4l2.bin,format=raw

Create a binary version of the EDID using edid2bin

  1. Copy edid_source.hex into the edid2bin directory.
  2. If nessesary, activate the Python venv: . venv/bin/activate
  3. Convert the hex EDID into binary format: cat edid_source.hex | ./app/main.py -o edid_edid2bin.bin

Compare the two binary files

  1. Copy edid_edid2bin.bin and edid_v4l2.bin into the same location.
  2. Compare the file sizes using ls -al edid*.bin.
  3. Optionally, directly compare the files using e.g. xxd.
mtlynch commented 1 year ago

@cghague - Can you include more specific repro steps for this?