[1/4] drm/i915: Add audio hotplug info struct
diff mbox

Message ID 1437578891-8197-2-git-send-email-david.henningsson@canonical.com
State New
Headers show

Commit Message

David Henningsson July 22, 2015, 3:28 p.m. UTC
This struct will be used to transfer information from the i915
driver to the hda driver on HDMI hotplug events.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 include/drm/i915_component.h |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Patch
diff mbox

diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h
index c9a8b64..d4c5648 100644
--- a/include/drm/i915_component.h
+++ b/include/drm/i915_component.h
@@ -24,8 +24,22 @@ 
 #ifndef _I915_COMPONENT_H_
 #define _I915_COMPONENT_H_
 
+struct hdac_bus;
+
+struct i915_audio_hotplug_info {
+	int connector_type; /* DRM_MODE_CONNECTOR_*, meant for userspace */
+	int connector_type_id; /* Index within a DRM_MODE_CONNECTOR_* type, meant for userspace */
+	int port; /* Used for mapping to affected nid */
+	int port_multi_stream_device; /* For DP multi-streaming */
+
+	bool plugged_in;
+	const unsigned char *eld;
+	int eld_size;
+};
+
 struct i915_audio_component {
 	struct device *dev;
+	struct hdac_bus *hdac_bus;
 
 	const struct i915_audio_component_ops {
 		struct module *owner;
@@ -34,6 +48,10 @@  struct i915_audio_component {
 		void (*codec_wake_override)(struct device *, bool enable);
 		int (*get_cdclk_freq)(struct device *);
 	} *ops;
+
+	const struct i915_audio_component_audio_ops {
+		void (*hotplug_notify)(struct hdac_bus *, const struct i915_audio_hotplug_info *);
+	} *audio_ops;
 };
 
 #endif /* _I915_COMPONENT_H_ */