]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
drm/i915: Add get_eld audio component
authorTakashi Iwai <tiwai@suse.de>
Thu, 12 Nov 2015 14:23:41 +0000 (15:23 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:21:12 +0000 (10:21 +0100)
commitb42eb3e970629bb440f952b4a5019b3f0ce15c40
treeda6b8680c485bf6b8ba57f8be82f78f7022eaffd
parent18366da4bbdc08c2da308852c14c6ae1cf2aa7fb
drm/i915: Add get_eld audio component

BugLink: http://bugs.launchpad.net/bugs/1540390
Implement a new i915_audio_component_ops, get_eld().  It's called by
the audio driver to fetch the current audio status and ELD of the
given HDMI/DP port.  It returns the size of expected ELD bytes if it's
valid, zero if no valid ELD is found, or a negative error code.  The
current state of audio on/off is stored in the given pointer, too.

Note that the returned size isn't limited to the given max bytes.  If
the size is greater than the max bytes, it means that only a part of
ELD has been copied back.

For achieving this implementation, a new field audio_connector is
added to struct intel_digital_port.  It points to the connector
assigned to the given digital port.  It's set/reset at each audio
enable/disable call in intel_audio.c, and protected with av_mutex.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit cae666ceb8c3f154351f7df29c522f7a7016bdc0)
Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
drivers/gpu/drm/i915/intel_audio.c
drivers/gpu/drm/i915/intel_drv.h
include/drm/i915_component.h