aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/display
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>2024-12-24 03:47:55 +0200
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2025-01-04 08:47:11 +0200
commitbaf616647fe6f857a0cf2187197de31e9bb17a71 (patch)
tree3397f2a595938fc739c14f456528686f864a1989 /include/drm/display
parentASoC: hdmi-codec: move no_capture_mute to struct hdmi_codec_pdata (diff)
downloadlinux-baf616647fe6f857a0cf2187197de31e9bb17a71.tar.gz
linux-baf616647fe6f857a0cf2187197de31e9bb17a71.zip
drm/connector: implement generic HDMI audio helpers
Several DRM drivers implement HDMI codec support (despite its name it applies to both HDMI and DisplayPort drivers). Implement generic framework to be used by these drivers. This removes a requirement to implement get_eld() callback and provides default implementation for codec's plug handling. Acked-by: Maxime Ripard <mripard@kernel.org> Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-3-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'include/drm/display')
-rw-r--r--include/drm/display/drm_hdmi_audio_helper.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/drm/display/drm_hdmi_audio_helper.h b/include/drm/display/drm_hdmi_audio_helper.h
new file mode 100644
index 000000000000..c9a6faef4109
--- /dev/null
+++ b/include/drm/display/drm_hdmi_audio_helper.h
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: MIT */
+
+#ifndef DRM_DISPLAY_HDMI_AUDIO_HELPER_H_
+#define DRM_DISPLAY_HDMI_AUDIO_HELPER_H_
+
+#include <linux/types.h>
+
+struct drm_connector;
+struct drm_connector_hdmi_audio_funcs;
+
+struct device;
+
+int drm_connector_hdmi_audio_init(struct drm_connector *connector,
+ struct device *hdmi_codec_dev,
+ const struct drm_connector_hdmi_audio_funcs *funcs,
+ unsigned int max_i2s_playback_channels,
+ bool spdif_playback,
+ int sound_dai_port);
+void drm_connector_hdmi_audio_plugged_notify(struct drm_connector *connector,
+ bool plugged);
+
+#endif