Configuring Analog Sound DVI to HDMI

From MythTV Official Wiki
Jump to: navigation, search

Newer nVidia hardware supports audio over HDMI. When a display device notifies the drivers that it will accept audio, the card will provide an audio stream. This will occur on both HDMI and DVI ports, whether or not the card has pass-through audio inputs. Some TVs will automatically use this empty audio stream, and have no option to switch to another input

Acquire EDID Block

In order to resolve this, the nVidia drivers must be provided a modified EDID block saying the TV does not support audio. On nVidia hardware, there are two ways to acquire the original EDID block.

Using nvidia-settings

This method requires you have a mouse and keyboard attached to the machine.

  1. Run 'nvidia-settings' on the local X-Server
  2. Click the entry corresponding to your TV (e.g. DFP-0)
  3. Click 'Acquire EDID' and save the 'edid.bin' file

Using nvidia-xconfig

This method can be performed completely from a text console.

  1. Run an X server with enough verbosity to print out the EDID block
    startx -- -logverbose 6
  2. After the X-Server has finished initializing, close it
  3. Find your log file, it will probably be in /var/log/Xorg.0.log
  4. Extract the EDID block using nvidia-xconfig
    nvidia-xconfig --extract-edids-from-file=/var/log/Xorg.0.log --extract-edids-output-file=edid.bin
  5. The previous nvidia-xconfig command may fail to extract an EDID even if it's present in the log file. Open the log file and look for 16 lines of raw hex (it should be exactly 512 characters once all the spaces and non-hex characters have been removed). Copy the raw hex into a hex editor like HxD and save it as edid.bin (the resulting file should be exactly 256 bytes).

Modify EDID Block

The EDID block contains a block listing capable extensions, which must be removed. A program to do this is available at Download 'edid_disable_exts' and compile if necessary. The program takes two arguments, the input file and the output file, so process your original EDID and save the new one in '/etc/X11/'.

Version 1.2 of edid_disable_exts supports a --to-dvi command line argument that leaves advanced resolution/hz settings intact.

Apply Modified EDID

Open your '/etc/X11/xorg.conf' file, and go to the Device section for your video card. Add the line
Option "CustomEDID" "DFP-0:/etc/X11/edid.modified.bin"
to tell the driver to use your custom block rather than acquiring one from your TV. The changes will take effect after a restart of X.