* Re: force DVI mode without audio [not found] <1325272048-28597-1-git-send-email-aarcange@redhat.com> @ 2011-12-31 1:28 ` Wu Fengguang [not found] ` <20111231122010.GA4172@redhat.com> 0 siblings, 1 reply; 7+ messages in thread From: Wu Fengguang @ 2011-12-31 1:28 UTC (permalink / raw) To: Andrea Arcangeli; +Cc: intel-gfx, Wang Zhenyu Hi Andrea, On Fri, Dec 30, 2011 at 08:07:27PM +0100, Andrea Arcangeli wrote: > Hi, > > after upgrading my HTPC to HD3000 graphics (2700K), I didn't find > anymore a way to disable the hdmi audio from the DVI2HDMI cable (I > connect DVI output of the motherboard to the HDMI input of the LCDTV > in HD). So I added it to the driver as it looks a missing tweak that I > need. > > (I also have proper audio setup connected to the second output of the > soundcard, but unless I watch a movie or listen music I keep it off so > I like the LCDTV speaker to work too, and if I turn on the proper > sound then I mute the TV) > > With the readon I was using radeon.audio=0 at boot to achieve the > exact same thing. Without this, the LCDTV won't play the audio coming > from the line in analog cable as it's fooled into thinking the audio > comes through the hdmi cable when it cannot. > > It's all working perfectly now. Have you tried the "audio" property which can be listed with xrandr --prop Thanks, Fengguang --- Related commits: commit 3f43c48d333777e815ae68d66396cb6dfbc2dd79 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu May 12 22:17:24 2011 +0100 drm/i915: Share the common force-audio property between connectors Make the audio property creation routine common and share the single property between the connectors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 55b7d6e8c4690047ac001026cb75a47f747db816 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Sep 19 09:29:33 2010 +0100 drm/i915/hdmi: Add 'force_audio' property Allow the user to override the detection of the sink's audio capabilities from EDID. Not all sinks support the required EDID level to specify whether they handle audio over the display connection, so allow the user to enable it manually. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Thanks, Fengguang ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20111231122010.GA4172@redhat.com>]
* Re: force DVI mode without audio [not found] ` <20111231122010.GA4172@redhat.com> @ 2011-12-31 12:49 ` Wu Fengguang [not found] ` <20111231131113.GC4172@redhat.com> 0 siblings, 1 reply; 7+ messages in thread From: Wu Fengguang @ 2011-12-31 12:49 UTC (permalink / raw) To: Andrea Arcangeli; +Cc: intel-gfx, Wang Zhenyu On Sat, Dec 31, 2011 at 01:20:11PM +0100, Andrea Arcangeli wrote: > On Sat, Dec 31, 2011 at 09:28:37AM +0800, Wu Fengguang wrote: > > Hi Andrea, > > > > On Fri, Dec 30, 2011 at 08:07:27PM +0100, Andrea Arcangeli wrote: > > > Hi, > > > > > > after upgrading my HTPC to HD3000 graphics (2700K), I didn't find > > > anymore a way to disable the hdmi audio from the DVI2HDMI cable (I > > > connect DVI output of the motherboard to the HDMI input of the LCDTV > > > in HD). So I added it to the driver as it looks a missing tweak that I > > > need. > > > > > > (I also have proper audio setup connected to the second output of the > > > soundcard, but unless I watch a movie or listen music I keep it off so > > > I like the LCDTV speaker to work too, and if I turn on the proper > > > sound then I mute the TV) > > > > > > With the readon I was using radeon.audio=0 at boot to achieve the > > > exact same thing. Without this, the LCDTV won't play the audio coming > > > from the line in analog cable as it's fooled into thinking the audio > > > comes through the hdmi cable when it cannot. > > > > > > It's all working perfectly now. > > > > Have you tried the "audio" property which can be listed with > > > > xrandr --prop > > I wasn't aware about this one, thanks for the tip. > > I tried: > > xrandr --output HDMI1 --set "audio" off > > that made the sound working for half a second, then it stops working. > > If I run: > > xrandr --output HDMI1 --set "audio" on > xrandr --output HDMI1 --set "audio" off > > at every invocation (including "on") I can hear sound for half a > second and then it stops no matter if it's left on or off. That's an interesting bug. What's the kernel version you are running? The dmesg may tell something (especially if boot with "drm.debug=6"). > So I applied my patch again for now. If you fix the above I guess > adding a little script to my KDE autostart directory would work fine. OK. > Also note, CTRL+ALT+F1 going back to console doesn't help either. I > didn't try to play audio before starting X though, not sure what > happens if I never run X and I try to play audio. Yeah, that could be a problem. I see that /sys/class/drm/card0/card0-HDMI-A-1/ exports several drm connector properties, however the (currently still i915 specific) "audio" property is not there. It should be good to make it a general one and export it in drivers/gpu/drm/drm_sysfs.c. > BTW, initially I tried to set only has_audio to false, but that wasn't > enough I had to set hdmi to off too and force it to DVI mode to make > audio work with my TVLCD (LG brand). You mean the "has_hdmi_sink = false"? Well does that mean we need to one more property for it? The property _interface_ is per port, which can support 2+ HDMI/DP jacks well. Thanks, Fengguang ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20111231131113.GC4172@redhat.com>]
* [PATCH] drm/i915: add an "off-dvi" HDMI audio mode [not found] ` <20111231131113.GC4172@redhat.com> @ 2012-01-06 3:26 ` Wu Fengguang 2012-01-06 15:08 ` Jesse Barnes 0 siblings, 1 reply; 7+ messages in thread From: Wu Fengguang @ 2012-01-06 3:26 UTC (permalink / raw) To: Andrea Arcangeli; +Cc: intel-gfx, Wang Zhenyu Andrea, Would you test this patch at convenient time? Thanks, Fengguang --- Subject: drm/i915: add an "off-dvi" HDMI audio mode Date: Fri Jan 06 11:04:00 CST 2012 When HDMI-DVI converter is used, it's not only necessary to turn off audio, but also to disable HDMI_MODE_SELECT and video infoframe. Since the DVI mode is mainly tied to audio functionality from end user POV, add a new "off-dvi" audio mode: xrandr --output HDMI1 --set audio off-dvi Reported-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> --- drivers/gpu/drm/i915/i915_drv.h | 7 +++++++ drivers/gpu/drm/i915/intel_hdmi.c | 8 +++++--- drivers/gpu/drm/i915/intel_modes.c | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) --- linux.orig/drivers/gpu/drm/i915/i915_drv.h 2011-12-22 10:53:26.000000000 +0800 +++ linux/drivers/gpu/drm/i915/i915_drv.h 2012-01-06 11:20:03.000000000 +0800 @@ -736,6 +736,13 @@ typedef struct drm_i915_private { atomic_t forcewake_count; } drm_i915_private_t; +enum hdmi_force_audio { + HDMI_AUDIO_OFF_DVI = -2, /* no aux data for HDMI-DVI converter */ + HDMI_AUDIO_OFF, /* force turn off HDMI audio */ + HDMI_AUDIO_AUTO, /* trust EDID */ + HDMI_AUDIO_ON, /* force turn on HDMI audio */ +}; + enum i915_cache_level { I915_CACHE_NONE, I915_CACHE_LLC, --- linux.orig/drivers/gpu/drm/i915/intel_hdmi.c 2011-12-22 10:53:27.000000000 +0800 +++ linux/drivers/gpu/drm/i915/intel_hdmi.c 2012-01-06 11:03:56.000000000 +0800 @@ -335,7 +335,9 @@ intel_hdmi_detect(struct drm_connector * if (edid) { if (edid->input & DRM_EDID_INPUT_DIGITAL) { status = connector_status_connected; - intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); + if (intel_hdmi->force_audio != HDMI_AUDIO_OFF_DVI) + intel_hdmi->has_hdmi_sink = + drm_detect_hdmi_monitor(edid); intel_hdmi->has_audio = drm_detect_monitor_audio(edid); } connector->display_info.raw_edid = NULL; @@ -411,8 +413,8 @@ intel_hdmi_set_property(struct drm_conne else has_audio = i > 0; - if (has_audio == intel_hdmi->has_audio) - return 0; + if (i == HDMI_AUDIO_OFF_DVI) + intel_hdmi->has_hdmi_sink = 0; intel_hdmi->has_audio = has_audio; goto done; --- linux.orig/drivers/gpu/drm/i915/intel_modes.c 2011-12-22 10:53:27.000000000 +0800 +++ linux/drivers/gpu/drm/i915/intel_modes.c 2012-01-06 11:21:19.000000000 +0800 @@ -84,6 +84,7 @@ int intel_ddc_get_modes(struct drm_conne } static const char *force_audio_names[] = { + "off-dvi", "off", "auto", "on", @@ -106,7 +107,8 @@ intel_attach_force_audio_property(struct return; for (i = 0; i < ARRAY_SIZE(force_audio_names); i++) - drm_property_add_enum(prop, i, i-1, force_audio_names[i]); + drm_property_add_enum(prop, i, i-2, + force_audio_names[i]); dev_priv->force_audio_property = prop; } ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: add an "off-dvi" HDMI audio mode 2012-01-06 3:26 ` [PATCH] drm/i915: add an "off-dvi" HDMI audio mode Wu Fengguang @ 2012-01-06 15:08 ` Jesse Barnes 2012-01-07 13:39 ` Wu Fengguang [not found] ` <20120106161257.GI28604@redhat.com> 0 siblings, 2 replies; 7+ messages in thread From: Jesse Barnes @ 2012-01-06 15:08 UTC (permalink / raw) To: Wu Fengguang; +Cc: Andrea Arcangeli, intel-gfx, Wang Zhenyu On Fri, 6 Jan 2012 11:26:40 +0800 Wu Fengguang <fengguang.wu@intel.com> wrote: > Andrea, > > Would you test this patch at convenient time? > > Thanks, > Fengguang > > --- > Subject: drm/i915: add an "off-dvi" HDMI audio mode > Date: Fri Jan 06 11:04:00 CST 2012 > > When HDMI-DVI converter is used, it's not only necessary to turn off > audio, but also to disable HDMI_MODE_SELECT and video infoframe. Since > the DVI mode is mainly tied to audio functionality from end user POV, > add a new "off-dvi" audio mode: > > xrandr --output HDMI1 --set audio off-dvi > > Reported-by: Andrea Arcangeli <aarcange@redhat.com> > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> > --- My only complaint here is that off-dvi isn't an intuitive name. We don't have any better way of detecting an HDMI->DVI converter with other EDID bits perhaps? A better name might be off-dvi-mode or off-dvi-only or something. -- Jesse Barnes, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: add an "off-dvi" HDMI audio mode 2012-01-06 15:08 ` Jesse Barnes @ 2012-01-07 13:39 ` Wu Fengguang 2012-01-11 7:01 ` Wu Fengguang [not found] ` <20120106161257.GI28604@redhat.com> 1 sibling, 1 reply; 7+ messages in thread From: Wu Fengguang @ 2012-01-07 13:39 UTC (permalink / raw) To: Jesse Barnes; +Cc: Andrea Arcangeli, intel-gfx, Wang Zhenyu On Fri, Jan 06, 2012 at 07:08:33AM -0800, Jesse Barnes wrote: > On Fri, 6 Jan 2012 11:26:40 +0800 > Wu Fengguang <fengguang.wu@intel.com> wrote: > > > Andrea, > > > > Would you test this patch at convenient time? > > > > Thanks, > > Fengguang > > > > --- > > Subject: drm/i915: add an "off-dvi" HDMI audio mode > > Date: Fri Jan 06 11:04:00 CST 2012 > > > > When HDMI-DVI converter is used, it's not only necessary to turn off > > audio, but also to disable HDMI_MODE_SELECT and video infoframe. Since > > the DVI mode is mainly tied to audio functionality from end user POV, > > add a new "off-dvi" audio mode: > > > > xrandr --output HDMI1 --set audio off-dvi > > > > Reported-by: Andrea Arcangeli <aarcange@redhat.com> > > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> > > --- > > My only complaint here is that off-dvi isn't an intuitive name. We > don't have any better way of detecting an HDMI->DVI converter with > other EDID bits perhaps? We have intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); which _should_ auto detect HDMI/DVI connections. I guess Andrea ran into problem with that due to broken EDID. Anyway I'll try to test if that drm_detect_hdmi_monitor() will ever work for the HDMI/DVI monitors in my lab. > A better name might be off-dvi-mode or off-dvi-only or something. OK, will change to "off-dvi-mode". Thanks, Fengguang ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: add an "off-dvi" HDMI audio mode 2012-01-07 13:39 ` Wu Fengguang @ 2012-01-11 7:01 ` Wu Fengguang 0 siblings, 0 replies; 7+ messages in thread From: Wu Fengguang @ 2012-01-11 7:01 UTC (permalink / raw) To: Jesse Barnes; +Cc: Andrea Arcangeli, intel-gfx, Wang Zhenyu On Sat, Jan 07, 2012 at 09:39:19PM +0800, Wu Fengguang wrote: > On Fri, Jan 06, 2012 at 07:08:33AM -0800, Jesse Barnes wrote: > > On Fri, 6 Jan 2012 11:26:40 +0800 > > Wu Fengguang <fengguang.wu@intel.com> wrote: > > > > > Andrea, > > > > > > Would you test this patch at convenient time? > > > > > > Thanks, > > > Fengguang > > > > > > --- > > > Subject: drm/i915: add an "off-dvi" HDMI audio mode > > > Date: Fri Jan 06 11:04:00 CST 2012 > > > > > > When HDMI-DVI converter is used, it's not only necessary to turn off > > > audio, but also to disable HDMI_MODE_SELECT and video infoframe. Since > > > the DVI mode is mainly tied to audio functionality from end user POV, > > > add a new "off-dvi" audio mode: > > > > > > xrandr --output HDMI1 --set audio off-dvi > > > > > > Reported-by: Andrea Arcangeli <aarcange@redhat.com> > > > Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> > > > --- > > > > My only complaint here is that off-dvi isn't an intuitive name. We > > don't have any better way of detecting an HDMI->DVI converter with > > other EDID bits perhaps? > > We have > > intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); > > which _should_ auto detect HDMI/DVI connections. > > I guess Andrea ran into problem with that due to broken EDID. Anyway > I'll try to test if that drm_detect_hdmi_monitor() will ever work for > the HDMI/DVI monitors in my lab. I verified that drm_detect_hdmi_monitor() at least works fine for me when HDMI<>DVI converter is used: [ 12.567158] [drm:intel_hdmi_detect], has_hdmi_sink=0 has_audio=0 force_audio=0 So it's probably Andrea's monitor sending the wrong EDID. Thanks, Fengguang ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <20120106161257.GI28604@redhat.com>]
* Re: [PATCH] drm/i915: add an "off-dvi" HDMI audio mode [not found] ` <20120106161257.GI28604@redhat.com> @ 2012-01-07 13:44 ` Wu Fengguang 0 siblings, 0 replies; 7+ messages in thread From: Wu Fengguang @ 2012-01-07 13:44 UTC (permalink / raw) To: Andrea Arcangeli; +Cc: intel-gfx, Wang Zhenyu On Fri, Jan 06, 2012 at 05:12:57PM +0100, Andrea Arcangeli wrote: > On Fri, Jan 06, 2012 at 07:08:33AM -0800, Jesse Barnes wrote: > > A better name might be off-dvi-mode or off-dvi-only or something. > > force-dvi is probably better name, off is counter intuitive. Yeah, "force-dvi" looks good! > I didn't test the patch yet, I'll do soon. Thank you! It did take effect judging from the dmesg on my HDMI box, however I've not yet tested the HDMI-to-DVI setup. Thanks, Fengguang ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-11 7:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1325272048-28597-1-git-send-email-aarcange@redhat.com>
2011-12-31 1:28 ` force DVI mode without audio Wu Fengguang
[not found] ` <20111231122010.GA4172@redhat.com>
2011-12-31 12:49 ` Wu Fengguang
[not found] ` <20111231131113.GC4172@redhat.com>
2012-01-06 3:26 ` [PATCH] drm/i915: add an "off-dvi" HDMI audio mode Wu Fengguang
2012-01-06 15:08 ` Jesse Barnes
2012-01-07 13:39 ` Wu Fengguang
2012-01-11 7:01 ` Wu Fengguang
[not found] ` <20120106161257.GI28604@redhat.com>
2012-01-07 13:44 ` Wu Fengguang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.