EDID Override - Injecting a Dolby VSVDB Block

Yeah looks like it, basically normally 2 128byte blocks so file size in most cases would be 256byte

Can use the load command from the first posts here to try and load, it will not tell you if it failed, but can check the dmesg logging I put some “fail” logging in when it cannot pass the checksums etc and fails to load for some reason.
Note: when it fails to load it just reloads the existing without any indication there was an error, so for a while that threw me thinking everything was fine until added the “fail” logging, and worked out the correct format for the EDID files.


Edit: I tried the first one from that list, it loads ok, but looks like not changing the max nits for me in the logging, so not sure.

I do see they contain V2 DV VSVDB, but would think that should be fine, as I guess quite a few displays been tested with CE are V2.

 Vendor-Specific Video Data Block (Dolby), OUI 00-D0-46:
    Version: 2 (12 bytes)
    Supports YUV422 12 bit
    DM Version: 3.x
    Backlt Min Luma: 100 cd/m^2
    Interface: Low-Latency
    Supports 10b 12b 444: Not supported
    Target Min PQ v2: 0 (0.00000000 cd/m^2)
    Target Max PQ v2: 2640 (385 cd/m^2)
    Unique Rx, Ry: 0.70703125, 0.28906250
    Unique Gx, Gy: 0.16796875, 0.79687500
    Unique Bx, By: 0.12890625, 0.04296875

Looking at the code which sets up the min and max luminance, it is only looking at dv version 1, so that explains why I do not see a change from the logging:

 if (vinfo->vout_device->dv_info->ver == 1) {
	if (vinfo->vout_device->dv_info->tmaxLUM) {

As all the VSVDB info I think is passed down to the dovi.ko this may not matter and possibly it handles v2 differently there, but no source code for that so don’t know what it does - will need empirical testing to check if correct.

Unfortunately though this means no easy way to tell the EDID is in effect from the existing logging on these DV V2 EDID.

Very good, i will check tomorrow

1 Like

Req if you are up for the task @cpm to create a Custom edid based of this pic ? I don’t know what to do with it but found out from avsforum what it should look like on my pj. Im also using a mac so the tools above wont work to make my own edid either i guess :lying_face:

It needs your EDID as a base, the first tool is for both Mac and PC so should be good if you did not know :wink:, it is not hard - better to teach how to fish :smiley:

Do you have the original spreadsheet that png was taken from? Would be useful to have.

Steps required:

  • Make sure the Ugoos is connected in your normal setup, projector, receiver etc. without your LLDV converter device.
  • ssh into the Ugoos
    • ssh needs to be enabled for CoreELEC via the settings
    • use terminal on mac to access the ugoos as the root user e.g.:
      • ssh root@192.168.86.236 (use the IP address of your Ugoos)
      • type in the password to login in.
    • Once logged in use this command to save your normal setup EDID.
      • echo save bin /storage/downloads/jonke-pj.bin > /sys/class/amhdmitx/amhdmitx0/edid
  • Enable samba for CoreELEC via the settings
    • Connect to the COREELEC network location and open the Downloads share
    • There you should find the jonke-pj.bin file.
  • Open the AW EDID Editor app
    • Drag the jonke-pj.bin file into the main window of the app
    • This should load the file and show its contents for manipulation.
    • Assuming you have no existing Dolby VSVDB you need to add one
      • On the left open the drop down Add new CEA Block
      • From the drop down list choose Vendor-Specific Video
      • On the right can then add the details
        • The IEEE OUI is in decimal in this app so for Dolby enter: 53318
        • For the Payload (Hex String) take from your picture e.g.: 490348A15855A2
    • File -> Save As... And save back to the Downloads folder as jonke-pj-lldv.bin
  • To double check the file we will open in the online parser.
    • EDID Decode
    • top left click choose file and open jonke-pj-lldv.bin
    • on the right panel I then see (among the many details):
       Vendor-Specific Video Data Block (Dolby), OUI 00-D0-46:
          Version: 2 (12 bytes)
          Supports YUV422 12 bit
          DM Version: 4.x
          Backlt Min Luma: 100 cd/m^2
          Interface: Low-Latency
          Supports 10b 12b 444: 12 bit
          Target Min PQ v2: 0 (0.00000000 cd/m^2)
          Target Max PQ v2: 2640 (385 cd/m^2)
          Unique Rx, Ry: 0.66406250, 0.32812500
          Unique Gx, Gy: 0.31250000, 0.67187500
          Unique Bx, By: 0.14453125, 0.03906250
      
    • Looks like some difference to the data in your picture, not sure which one is right! but can try it out.
  • finally load the new EDID via ssh
    • echo load /storage/downloads/jonke-pj-lldv.bin > /sys/class/amhdmitx/amhdmitx0/edid
    • type this command to check the log: dmesg
    • should see something like this at the end of the log:
      [ 5989.495198@0]- hdmitx: [load_edid_data] 256 bytes loaded from file /storage/downloads/jonke-pj-lldv.bin
      [ 5989.495206@0]- hdmitx: edid: EDID Parser:
      [ 5989.495223@0]- hdmitx: Edid_ParsingVendSpec:ieeeoui=0xd046,len=11
      [ 5989.495226@0]- hdmitx: v2 VSVDB: len=11, sup_2160p60hz=1, Interface=0
      [ 5989.495228@0]- hdmitx: Edid_ParsingVendSpec:ieeeoui=0xd046,len=11
      [ 5989.495230@0]- hdmitx: v2 VSVDB: len=11, sup_2160p60hz=1, Interface=0
      [ 5989.495240@0]- hdmitx: edid: get dtd0 vic: 781
      [ 5989.495250@0]- hdmitx: edid: get dtd1 vic: 97
      [ 5989.495252@0]- hdmitx: edid: get dtd2 vic: 16
      [ 5989.495254@0]- hdmitx: hdmitx: get PMT vic: 97
      [ 5989.495256@0]- hdmitx: edid: find IEEEOUT
      [ 5989.495262@0]- hdmitx: [load_edid_data] new edid loaded!
      
    • Restart (not reboot) CoreELEC so it picks up the new EDID info.
    • Make sure Use Player Led is enabled
    • Enable the new Use HDR output for Player Led setting and check out the results (no need for your LLDV converter device, should not be used)
    • Can add the load command into the autostart.sh if all looking good and want to keep that setup.
    • One caveat - if you hot plug the HDMI for any reason either physically pulling the plug whilst on or a receiver does it, then need to re-load the EDID again (if in autostart.sh can just reboot to pick up again)
2 Likes

Thanks cpm , i will test this later today and let you know how it goes. Don`t really know exakt source for the exel file other then this post https://www.avsforum.com/posts/62179157/

From the post it could read that the XLS may have come with the EZCOO maybe, did they give you any disk or a download link?

Edit: OK, found it here:
https://github.com/xnappo/ez_dv_edid_fw/archive/refs/heads/main.zip

Edit , worked ! Just a stupid c/p error from me :face_with_hand_over_mouth:

I did all steps but did not get the playerled setting in CE. Hope yo can take a look

First edid is the standard from my Marantz and Epson
epson-marantz-jonke-pj.bin.txt (256 Bytes)
Second is the new edited
jonke-pj.txt (256 Bytes)

did-decode (hex):

00 ff ff ff ff ff ff 00 35 49 59 00 01 01 01 01
00 20 01 03 80 01 01 78 0e de 50 a3 54 4c 99 26
0f 50 54 20 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 08 e8 00 30 f2 70 5a 80 b0 58
8a 00 40 84 63 00 00 1e 02 3a 80 18 71 38 2d 40
58 2c 45 00 40 84 63 00 00 1e 00 00 00 fc 00 6d
61 72 61 6e 74 7a 2d 41 56 52 0a 20 00 00 00 fd
00 18 55 0f 87 3c 00 0a 20 20 20 20 20 20 01 81

02 03 70 f0 55 61 60 66 65 5f 5e 5d 62 10 1f 22
20 05 14 04 13 12 11 03 02 01 35 0f 7f 07 3d 1e
c0 15 07 50 5f 7e 03 57 06 03 67 7e 03 5f 7e 01
83 5f 00 00 72 03 0c 00 22 00 b8 3c e0 42 42 42
42 00 80 01 02 03 04 67 d8 5d c4 01 78 80 0b e2
0f 0f e3 06 0d 01 eb 01 46 d0 00 49 03 48 a1 58
55 a2 e3 05 c0 00 e2 00 fb e6 11 46 d0 00 70 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4f

----------------

Block 0, Base EDID:
  EDID Structure Version & Revision: 1.3
  Vendor & Product Identification:
    Manufacturer: MJI
    Model: 89
    Serial Number: 16843009
    Made in: 2022
  Basic Display Parameters & Features:
    Digital display
    Maximum image size: 1 cm x 1 cm
    Gamma: 2.20
    RGB color display
    Default (sRGB) color space is primary color space
    First detailed timing is the preferred timing
  Color Characteristics:
    Red  : 0.6396, 0.3291
    Green: 0.2998, 0.5996
    Blue : 0.1494, 0.0595
    White: 0.3125, 0.3281
  Established Timings I & II:
    DMT 0x04:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Standard Timings: none
  Detailed Timing Descriptors:
    DTD 1:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz (1600 mm x 900 mm)
                 Hfront  176 Hsync  88 Hback  296 Hpol P
                 Vfront    8 Vsync  10 Vback   72 Vpol P
    DTD 2:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz (1600 mm x 900 mm)
                 Hfront   88 Hsync  44 Hback  148 Hpol P
                 Vfront    4 Vsync   5 Vback   36 Vpol P
    Display Product Name: 'marantz-AVR'
    Display Range Limits:
      Monitor ranges (GTF): 24-85 Hz V, 15-135 kHz H, max dotclock 600 MHz
  Extension blocks: 1
Checksum: 0x81

----------------

Block 1, CTA-861 Extension Block:
  Revision: 3
  Underscans IT Video Formats by default
  Basic audio support
  Supports YCbCr 4:4:4
  Supports YCbCr 4:2:2
  Native detailed modes: 0
  Video Data Block:
    VIC  97:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz
    VIC  96:  3840x2160   50.000000 Hz  16:9    112.500 kHz    594.000000 MHz
    VIC 102:  4096x2160   60.000000 Hz 256:135  135.000 kHz    594.000000 MHz
    VIC 101:  4096x2160   50.000000 Hz 256:135  112.500 kHz    594.000000 MHz
    VIC  95:  3840x2160   30.000000 Hz  16:9     67.500 kHz    297.000000 MHz
    VIC  94:  3840x2160   25.000000 Hz  16:9     56.250 kHz    297.000000 MHz
    VIC  93:  3840x2160   24.000000 Hz  16:9     54.000 kHz    297.000000 MHz
    VIC  98:  4096x2160   24.000000 Hz 256:135   54.000 kHz    297.000000 MHz
    VIC  16:  1920x1080   60.000000 Hz  16:9     67.500 kHz    148.500000 MHz
    VIC  31:  1920x1080   50.000000 Hz  16:9     56.250 kHz    148.500000 MHz
    VIC  34:  1920x1080   30.000000 Hz  16:9     33.750 kHz     74.250000 MHz
    VIC  32:  1920x1080   24.000000 Hz  16:9     27.000 kHz     74.250000 MHz
    VIC   5:  1920x1080i  60.000000 Hz  16:9     33.750 kHz     74.250000 MHz
    VIC  20:  1920x1080i  50.000000 Hz  16:9     28.125 kHz     74.250000 MHz
    VIC   4:  1280x720    60.000000 Hz  16:9     45.000 kHz     74.250000 MHz
    VIC  19:  1280x720    50.000000 Hz  16:9     37.500 kHz     74.250000 MHz
    VIC  18:   720x576    50.000000 Hz  16:9     31.250 kHz     27.000000 MHz
    VIC  17:   720x576    50.000000 Hz   4:3     31.250 kHz     27.000000 MHz
    VIC   3:   720x480    59.940060 Hz  16:9     31.469 kHz     27.000000 MHz
    VIC   2:   720x480    59.940060 Hz   4:3     31.469 kHz     27.000000 MHz
    VIC   1:   640x480    59.940476 Hz   4:3     31.469 kHz     25.175000 MHz
  Audio Data Block:
    Linear PCM:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1 32
      Supported sample sizes (bits): 24 20 16
    DTS:
      Max channels: 6
      Supported sample rates (kHz): 96 88.2 48 44.1
      Maximum bit rate: 1536 kb/s
    AC-3:
      Max channels: 6
      Supported sample rates (kHz): 48 44.1 32
      Maximum bit rate: 640 kb/s
    DTS-HD:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1
      Audio Format Code dependent value: 0x03
    Enhanced AC-3 (DD+):
      Max channels: 8
      Supported sample rates (kHz): 48 44.1
      Supports Joint Object Coding
      Supports Joint Object Coding with ACMOD28
    MAT (MLP):
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1
      Supports Dolby TrueHD, object audio PCM and channel-based PCM
      Hash calculation not required for object audio PCM or channel-based PCM
    DTS-HD:
      Max channels: 8
      Supported sample rates (kHz): 192 176.4 96 88.2 48 44.1
      Audio Format Code dependent value: 0x01
  Speaker Allocation Data Block:
    FL/FR - Front Left/Right
    LFE1 - Low Frequency Effects 1
    FC - Front Center
    BL/BR - Back Left/Right
    BC - Back Center
    RLC/RRC - Rear Left/Right of Center (Deprecated)
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03:
    Source physical address: 2.2.0.0
    Supports_AI
    DC_36bit
    DC_30bit
    DC_Y444
    Maximum TMDS clock: 300 MHz
    Video latency: 133 ms
    Audio latency: 133 ms
    Interlaced video latency: 133 ms
    Interlaced audio latency: 133 ms
    Extended HDMI video details:
      HDMI VICs:
        HDMI VIC 1:  3840x2160   30.000000 Hz  16:9     67.500 kHz    297.000000 MHz
        HDMI VIC 2:  3840x2160   25.000000 Hz  16:9     56.250 kHz    297.000000 MHz
        HDMI VIC 3:  3840x2160   24.000000 Hz  16:9     54.000 kHz    297.000000 MHz
        HDMI VIC 4:  4096x2160   24.000000 Hz 256:135   54.000 kHz    297.000000 MHz
  Vendor-Specific Data Block (HDMI Forum), OUI C4-5D-D8:
    Version: 1
    Maximum TMDS Character Rate: 600 MHz
    SCDC Present
    Supports UHD VIC
    Supports 12-bits/component Deep Color 4:2:0 Pixel Encoding
    Supports 10-bits/component Deep Color 4:2:0 Pixel Encoding
  YCbCr 4:2:0 Capability Map Data Block:
    VIC  97:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz
    VIC  96:  3840x2160   50.000000 Hz  16:9    112.500 kHz    594.000000 MHz
    VIC 102:  4096x2160   60.000000 Hz 256:135  135.000 kHz    594.000000 MHz
    VIC 101:  4096x2160   50.000000 Hz 256:135  112.500 kHz    594.000000 MHz
  HDR Static Metadata Data Block:
    Electro optical transfer functions:
      Traditional gamma - SDR luminance range
      SMPTE ST2084
      Hybrid Log-Gamma
    Supported static metadata descriptors:
      Static metadata type 1
  Vendor-Specific Video Data Block (Dolby), OUI 00-D0-46:
    Version: 2 (12 bytes)
    Supports YUV422 12 bit
    DM Version: 4.x
    Backlt Min Luma: 100 cd/m^2
    Interface: Low-Latency
    Supports 10b 12b 444: 12 bit
    Target Min PQ v2: 0 (0.00000000 cd/m^2)
    Target Max PQ v2: 2640 (385 cd/m^2)
    Unique Rx, Ry: 0.66406250, 0.32812500
    Unique Gx, Gy: 0.31250000, 0.67187500
    Unique Bx, By: 0.14453125, 0.03906250
  Colorimetry Data Block:
    BT2020YCC
    BT2020RGB
  Video Capability Data Block:
    YCbCr quantization: Selectable (via AVI YQ)
    RGB quantization: Selectable (via AVI Q)
    PT scan behavior: Supports both over- and underscan
    IT scan behavior: Always Underscanned
    CE scan behavior: Supports both over- and underscan
  Vendor-Specific Audio Data Block (Dolby), OUI 00-D0-46:
    Version: 1 (7 bytes)
    Height speaker zone present
    Surround speaker zone present
    Center speaker zone present
Checksum: 0x4f

----------------

Preferred Video Timing if only Block 0 is parsed:
  DTD   1:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz (1600 mm x 900 mm)
                 Hfront  176 Hsync  88 Hback  296 Hpol P
                 Vfront    8 Vsync  10 Vback   72 Vpol P

----------------

Preferred Video Timings if Block 0 and CTA-861 Blocks are parsed:
  VIC  97:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz
                 Hfront  176 Hsync  88 Hback  296 Hpol P
                 Vfront    8 Vsync  10 Vback   72 Vpol P
  DTD   1:  3840x2160   60.000000 Hz  16:9    135.000 kHz    594.000000 MHz (1600 mm x 900 mm)
                 Hfront  176 Hsync  88 Hback  296 Hpol P
                 Vfront    8 Vsync  10 Vback   72 Vpol P

----------------

Native Video Resolution:
  3840x2160

----------------

edid-decode SHA: 84ddf9155376 2021-10-03 10:37:45

Warnings:

Block 0, Base EDID:
  Basic Display Parameters & Features: Dubious maximum image size (1x1 is smaller than 10x10 cm).
Block 1, CTA-861 Extension Block:
  Video Data Block: For improved preferred timing interoperability, set 'Native detailed modes' to 1.
  Vendor-Specific Data Block (HDMI), OUI 00-0C-03: Progressive and Interlaced latency values are identical, no need for both.

Failures:

Block 0, Base EDID:
  Basic Display Parameters & Features: sRGB is signaled, but the chromaticities do not match.
  Detailed Timing Descriptor #1: Mismatch of image size 1600x900 mm vs display size 10x10 mm.
  Detailed Timing Descriptor #2: Mismatch of image size 1600x900 mm vs display size 10x10 mm.

EDID conformity: FAIL

Did you restart CE, different option to reboot

Restart Kodi (from the last option) in Power options / Home meny i skin ? Yes i did

Ok will try later when I get home.

1 Like

Cpm , my mistake it was a C/P error i ssh . I see setting now and will test it . Thanks :slight_smile:

Ok @cpm up n running . Pj switches to sdr and hdr in automode :partying_face: With the Ezcoo i had to force hdr.
Played som dv web-dl and iso , hdr/hdr10+ and finally som live tv from Tvheadend. Did not see any issues . Good thing was that i could view live tv in sdr without having to flip from hdr to sdr in PJ. But i must say i will change to vs10 for live tv when / if always lldv get fixed. VS10 for live tv looks so much better . But for now i cant stand the black screen delay on ch change.

Will continue to use this build and report any issues or possitive changes .

As always cpm, big thanks for all your work and help when needed. :raised_hands::star_struck:

Yeah this is really for playing DV content (as LLDV) and having it output as HDR for displays without the DV.

Will still need the VS10 to map other content up, and possible down if you want.
Mapping up it will be used in combination for example: SDR content → DV (LLDV) → 12bit HDR for display.

Congrats on getting it working :slight_smile:

1 Like

This is amazing work and will be gladly welcomed by the community. However, for this to work, it would require most of these steps to run in the background. I imagine things working something like this

  1. At boot, before Kodi is loaded CoreELEC checks for a file called edid.conf.in .config and also on the root of the flash drive
  2. If it finds the EDID file, it loads it otherwise proceed as normal.

In the CoreELEC settings, there will be a new setting called Enable LLDV which will be visible only if the connected display does not support LLDV or DV.

  1. By default, the setting will be disabled.
  2. When a user enables the setting, it will read the current EDID to a temp file and then modify it using edid-decode. Since edid-decode is written for linux, it should add it as a library. Then, the new EDID will be saved as edid.conf in .config and the user will be prompted to reboot CoreELEC.
  3. If the setting is disabled, edid.conf will be deleted.

In the future, once this feature is done, then a display check can be added

When Kodi is loaded, it should check if the edid file exists and then check to make sure that the display is the same. If not, the user should be prompted to disable and then reenable the Enable EDID setting to update them to the new display, There should also be an option to Ignore Once and Ignore Forever in case the user prefers to use an EDID file that does not match their display.

No need for the restart of kodi if all done in the autostart.sh before kodi starts.

The kernel will just pick up because it is loaded there.
And Kodi will look at the settings from the kernel when it starts.

This really solves for two cases.

  • Non-DV Display giving them effective LLDV capability, similar to HD Fury / EZCOO
  • VS10 cannot map down to HDR correctly without this, and probably better quality to SDR10, SDR8 with it as well, obviously cannot map up to DV without it on a non-DV display (But all this needs quality testing to see what the real differences are) Not withstanding that VS10 mapping down from DV to HDR10 probably becomes moot anyway with the LLDV output as 12Bit HDR.

Regarding you comments on making it integrated - yes as previously mentioned two elements would make it better:

  • Inject just the Dolby VSVDB into the current edid (probably needs to check to make sure one is not already present or maybe replace that as an option for correcting issues with certain displays) - edid-decode would be one approach to investigate.

  • On hot-plug re-apply the Dolby VSVDB - kodi in that case I think would be fine (no restart needed) as already thinks it’s there and only really checks on start up.

Agreed there are lots of checks that could be put in place and arrangement of settings etc. I would say that is pretty trivial to implement, but first need to see if things work and working well - which is what my builds are all about exploring the possibilities.

The bigger issue for most will be matching Dolby VSVDB settings to their display as this is likely beyond most peoples knowledge.

Also my impression is the CE Team would not want to integrate this for the complexity reasons, but it is there and maybe they will take it on, source will be available and can let anyone who is interested know what I have changed.

Congratulations to you, it’s working. DV is converted to full HDR and output from PQ0 while tonemapping to match the TV’s edid capabilities, using both minPQ and MaxPQ from EDID. This helps to get around the CM2.9 problem where dark shades disappear.
But now I need to think how to automatically add only the DV part.
Because for example if we add the edid from a TV with DV, and the user has a receiver, when the receiver is turned on, it substitutes the TV edid by adding its own strings, so if the user sometimes only turns on the TV without the receiver, we need to use the TV edid, and when the receiver and TV are on, we need to load the receiver part as well. The receiver usually changes the data about supported frequencies and sound. So you need to automate the process somehow.
Anyway, this is a great result, if CM4.0 would work in this mode too :slight_smile: Dreams-dreams.
Congratulations again, a little later I’ll check what happens with the color, because the color parameters of the white point should be loaded from your TV.

1 Like

I would guess that the only way the receiver could alter the edid and have it recognised by the connected device would be a hot plug event, eg. It pulling the HDMI connection pin down and then up.

What about just adding the capability to automatically load the edid file to CoreELEC and then push the rest of this to an addon?

I think that this would be a feature that would be in great demand by users and would certainly help to elevate kodi.

Anyway, it might be early stages, but I think a more streamline approach would attract more testers.

Left Ugoos on , shut down receiver and pj for a few hours and when i started them again .” Edid was lost ” / wrong colors on dv file . Had to reboot Ugoos and enable playerled again to get all working so i guess @DMDreview is right .

Will look again if it was a one off or the same thing happens

@cpm is 12 bit YUV 444 correct output for this build ? I get that on all files

Had some issues after a lot of testing .
On 2 files i had a blackscreen / no hdmi signal and after that i lost dolby vision. Had to reboot CE , restart Kodi did not help .
This happened randomly . The 2 files played fine before and played fine again once ce was rebooted.