diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-09-05 02:25:34 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-09-21 17:52:41 -0400 |
commit | e0dac65ed45e72fe34cc7ccc76de0ba220bd38bb (patch) | |
tree | f6f1628bb63a9db0b77318e0486e91d26c918ae0 /drivers/gpu/drm/i915/intel_hdmi.c | |
parent | 76adaa34db407f174dd06370cb60f6029c33b465 (diff) |
drm/i915: pass ELD to HDMI/DP audio driver
Add ELD support for Intel Eaglelake, IbexPeak/Ironlake,
SandyBridge/CougarPoint and IvyBridge/PantherPoint chips.
ELD (EDID-Like Data) describes to the HDMI/DP audio driver the audio
capabilities of the plugged monitor. It's built and passed to audio
driver in 2 steps:
(1) at get_modes time, parse EDID and save ELD to drm_connector.eld[]
(2) at mode_set time, write drm_connector.eld[] to the Transcoder's hw
ELD buffer and set the ELD_valid bit to inform HDMI/DP audio driver
This patch is tested OK on G45/HDMI, IbexPeak/HDMI and IvyBridge/HDMI+DP.
Test scheme: plug in the HDMI/DP monitor, and run
cat /proc/asound/card0/eld*
to check if the monitor name, HDMI/DP type, etc. show up correctly.
Minor imperfection: the GEN5_AUD_CNTL_ST/DIP_Port_Select field always
reads 0 (reserved). Without knowing the port number, I worked it around
by setting the ELD_valid bit for ALL the three ports. It's tested to not
be a problem, because the audio driver will find invalid ELD data and
hence rightfully abort, even when it sees the ELD_valid indicator.
Thanks to Zhenyu and Pierre-Louis for a lot of valuable help and testing.
CC: Zhao Yakui <yakui.zhao@intel.com>
CC: Wang Zhenyu <zhenyu.z.wang@intel.com>
CC: Jeremy Bush <contractfrombelow@gmail.com>
CC: Christopher White <c.white@pulseforce.com>
CC: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
CC: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 226ba830f383..75026ba41a8e 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -245,8 +245,11 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder, | |||
245 | sdvox |= HDMI_MODE_SELECT; | 245 | sdvox |= HDMI_MODE_SELECT; |
246 | 246 | ||
247 | if (intel_hdmi->has_audio) { | 247 | if (intel_hdmi->has_audio) { |
248 | DRM_DEBUG_DRIVER("Enabling HDMI audio on pipe %c\n", | ||
249 | pipe_name(intel_crtc->pipe)); | ||
248 | sdvox |= SDVO_AUDIO_ENABLE; | 250 | sdvox |= SDVO_AUDIO_ENABLE; |
249 | sdvox |= SDVO_NULL_PACKETS_DURING_VSYNC; | 251 | sdvox |= SDVO_NULL_PACKETS_DURING_VSYNC; |
252 | intel_write_eld(encoder, adjusted_mode); | ||
250 | } | 253 | } |
251 | 254 | ||
252 | if (intel_crtc->pipe == 1) { | 255 | if (intel_crtc->pipe == 1) { |