Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cghague opened this issue Apr 24, 2023 · 1 comment
Open

Comments

@cghague
Copy link

cghague commented Apr 24, 2023

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
Copy link
Contributor

mtlynch commented Apr 24, 2023

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

@mtlynch mtlynch removed their assignment Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants