Bug 40748 - Please provide a way to disable HDMI audio
Summary: Please provide a way to disable HDMI audio
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 15:52 UTC by Tom Horsley
Modified: 2017-07-24 23:04 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Horsley 2011-09-09 15:52:29 UTC
Circumstances:

Using a TV (a Samsung in this case) as a monitor. Using the DVI output of the
ASUS P8H67-V (REV 3.0) motherboard (H67 chipset, i7-2600K Sandy Bridge processor). (Running fedora 15 x86_64).

Using a DVI->HDMI cable to hook the motherboard to the TV (because that cable
is long enough to work and the previous system didn't have an HDMI output).
Using the analog audio output from the motherboard to the analog audio input
of the Samsung TV.

Results:

As is documented in various places when you start to search for why you hear
no sound, the graphics system gets EDID that says "I can do hdmi audio",
the graphics system then tells the TV, "You are in luck! I can do HDMI
audio output!". At this point, the TV stops listening to the analog audio
input.

The bug:

Cleverly, however, the DVI->HDMI cable does not provide any wires for the
sound to travel over, so there is no sound at all.

What I'd like to happen:

I'd love an option I could pass to the driver to tell it not to mention HDMI
audio.

Better yet, I'd love it if the H67 chipset could communicate to the driver
that the dadgum DVI connector is the one being used, not the HDMI connector,
so it could automatically avoid mentioning HDMI.

Finally, another option is the one the NVidia driver provides - I can give
it an edited EDID to use instead of the one it gets from the TV, that way
I can remove the mention of HDMI audio support from the EDID block.

Editorial comment:

"Helpful" software has been the bane of my existence for years, now we are
getting "helpful" hardware as well :-).

I have a (hopefully) good quality HDMI cable on order that should be long
enough to reach the TV, so the work around will be to just use a cable that
provides audio, but tossing an option in a config file is a lot cheaper
than buying a new cable.
Comment 1 Chris Wilson 2011-09-09 16:00:09 UTC
xrandr --output DVI1 --set audio off
Comment 2 Tom Horsley 2011-09-09 16:18:14 UTC
Just tried xrandr - it makes the screen blank impressively for a moment,
but analog audio still doesn't work. Tried turning the TV on and off
after first test to see if that would help, but still no analog audio.
Comment 3 Chris Wilson 2011-09-09 16:26:50 UTC
Well that prevents us from preparing the connection to send/receive audio inside the vblank. But we will still be setting the HDMI encoding flag based on the advertised capability, so I wonder if that is the issue. I don't have a convenient property for that, but 

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi
index 226ba83..1bb6996 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -335,8 +335,8 @@ intel_hdmi_detect(struct drm_connector *connector, bool forc
        if (edid) {
                if (edid->input & DRM_EDID_INPUT_DIGITAL) {
                        status = connector_status_connected;
-                       intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid
-                       intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
+                       //intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(ed
+                       //intel_hdmi->has_audio = drm_detect_monitor_audio(edid)
                }
                connector->display_info.raw_edid = NULL;
                kfree(edid);

should force us to treat the connection as a simple DVI link.
Comment 4 Adam Jackson 2011-10-10 11:29:22 UTC
(In reply to comment #0)

> Cleverly, however, the DVI->HDMI cable does not provide any wires for the
> sound to travel over, so there is no sound at all.

This is wrong.  HDMI's audio signalling is entirely in-band.  HDMI has precisely one additional wire relative to (the digital subset of) DVI, which is for CEC control, a slow serial bus entirely unrelated to audio.
Comment 5 Tom Horsley 2011-10-10 13:30:02 UTC
Then why can't I (and, judging from google results) lots of other people
get sound over a DVI connector? The exact same hardware with an HDMI to
HDMI cable installed produces perfectly good sound.
Comment 6 James Cloos 2011-10-10 16:28:49 UTC
b> Then why can't I (and, judging from google results) lots of other people
b> get sound over a DVI connector? The exact same hardware with an HDMI to
b> HDMI cable installed produces perfectly good sound.

Presumably the *card* (rather than the cable) lacks support for audio.
Comment 7 Tom Horsley 2011-10-10 17:02:50 UTC
It is the same card (or in this case the same built in video on the
motherboard). The driver even thinks it is talking to an HDMI output,
it is merely one that is brought out to a DVI connector on the back
of the computer (right next to the HDMI connector which has functioning
audio). The driver software is apparently incapable of determining
that it is talking to a DVI connection rather than an HDMI connection.

There is also this:

http://en.wikipedia.org/wiki/HDMI#Audio.2Fvideo

which has a "Audio support" section that says audio won't work over DVI.

In any case, it doesn't matter what the cause of the failure is.

If it is something about the hardware other than the DVI connector that
is preventing the audio from working, then I'd still need a way to
stop the driver from telling the TV that it is going to get audio
over HDMI, because once the TV learns that, it refuses to accept audio
from any other input source.
Comment 8 Daniel Vetter 2012-02-20 11:38:40 UTC
commit b1d7e4b41fd0f72ea8149056778db5d737739305
Author: Wu Fengguang <fengguang.wu@intel.com>
Date:   Tue Feb 14 11:45:36 2012 +0800

    drm/i915: add a "force-dvi" HDMI audio mode

as merged into drm-intel-next should fix this. --set audio force-dvi forces the hdmi audio to off.

Please reopen if this is not quite what you want/need.
Comment 9 Tom Horsley 2012-02-20 15:01:54 UTC
> as merged into drm-intel-next should fix this. --set audio force-dvi forces the
> hdmi audio to off.

Sounds good to me, but what command actually takes those new arguments?
Are they xrandr args?
Comment 10 Daniel Vetter 2012-02-21 00:05:22 UTC
> --- Comment #9 from Tom Horsley <horsley1953@gmail.com> 2012-02-20 15:01:54 PST ---
> > as merged into drm-intel-next should fix this. --set audio force-dvi forces the
> > hdmi audio to off.
> 
> Sounds good to me, but what command actually takes those new arguments?
> Are they xrandr args?

Yep, xrandr --output HDMI1 --set audio force-dvi


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.