drm/i915: Add support for audio driver notifications
Subsystems (2)
RFC PATCH v4 2/7 drm/i915: Add support for audio driver notifications
Notifiations like mode change, hot plug and edid to the audio driver are added. This is inturn used by the audio driver for its functionality.
A new interface file capturing the notifications needed by the audio driver is added
Signed-off-by Pierre-Louis Bossart <[email protected]>
Signed-off-by Jerome Anand <[email protected]>
--- drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_audio.c | 8 ++++++ drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lpe_audio.c | 46 ++++++++++++++++++++++++++++++++++ include/drm/intel_lpe_audio.h | 1 + 5 files changed, 59 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +3 -0
@@ -3561,6 +3561,9 @@ int intel_lpe_audio_setup(struct drm_i915_private *dev_priv);void intel_lpe_audio_teardown (struct drm_i915_private *dev_priv);void intel_lpe_audio_irq_handler (struct drm_i915_private *dev_priv);bool intel_lpe_audio_detect (struct drm_i915_private *dev_priv); +void intel_lpe_audio_notify (struct drm_i915_private *dev_priv, +void *eld,int port,int tmds_clk_speed, +bool connected);/* intel_i2c.c */ extern int intel_setup_gmbus (struct drm_device *dev);
drivers/gpu/drm/i915/intel_audio.c +8 -0
@@ -24,6 +24,7 @@#include <linux/kernel.h> #include <linux/component.h> #include <drm/i915_component.h> +#include <drm/intel_lpe_audio.h> #include "intel_drv.h" #include <drm/drmP.h>
@@ -627,6 +628,10 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder,if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) acomp->audio_ops->pin_eld_notify (acomp->audio_ops->audio_ptr, (int ) port, (int ) pipe); + +if (HAS_LPE_AUDIO (dev_priv)) +intel_lpe_audio_notify (dev_priv, connector->eld, port, + crtc_state->port_clock, true); }/**
@@ -660,6 +665,9 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder)if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) acomp->audio_ops->pin_eld_notify (acomp->audio_ops->audio_ptr, (int ) port, (int ) pipe); + +if (HAS_LPE_AUDIO (dev_priv)) +intel_lpe_audio_notify (dev_priv,NULL , port,0 , true); }/**
drivers/gpu/drm/i915/intel_hdmi.c +1 -0
@@ -36,6 +36,7 @@#include <drm/drm_edid.h> #include "intel_drv.h" #include <drm/i915_drm.h> +#include <drm/intel_lpe_audio.h> #include "i915_drv.h" static struct drm_device *intel_hdmi_to_dev (struct intel_hdmi *intel_hdmi)
drivers/gpu/drm/i915/intel_lpe_audio.c +46 -0
49 lines not on this page · raw message
include/drm/intel_lpe_audio.h +1 -0
@@ -25,6 +25,7 @@#define _INTEL_LPE_AUDIO_H_#include <linux/types.h> +#include <linux/spinlock_types.h> #define HDMI_MAX_ELD_BYTES 128
Signature · 6 lines
2.9.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx