summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/zte/zx_vou.c
diff options
context:
space:
mode:
authorShawn Guo2016-12-01 10:20:31 +0100
committerShawn Guo2017-01-28 03:17:39 +0100
commit83d7115250c181da6dacd187671e174f8be71dfd (patch)
tree85e9ffe28dcd3ec58cc8881fa34faf30ec3f4003 /drivers/gpu/drm/zte/zx_vou.c
parentdrm: zte: select VIDEOMODE_HELPERS in Kconfig (diff)
downloadkernel-qcow2-linux-83d7115250c181da6dacd187671e174f8be71dfd.tar.gz
kernel-qcow2-linux-83d7115250c181da6dacd187671e174f8be71dfd.tar.xz
kernel-qcow2-linux-83d7115250c181da6dacd187671e174f8be71dfd.zip
drm: zte: support hdmi audio through spdif
It enables HDMI audio support through SPDIF interface based on generic hdmi-audio-codec driver. The HDMI hardware supports more audio interfaces than SPDIF, like I2S, which may be added later. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/zte/zx_vou.c')
-rw-r--r--drivers/gpu/drm/zte/zx_vou.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/zte/zx_vou.c b/drivers/gpu/drm/zte/zx_vou.c
index 73fe15c17c32..f89ad7f72fdb 100644
--- a/drivers/gpu/drm/zte/zx_vou.c
+++ b/drivers/gpu/drm/zte/zx_vou.c
@@ -119,6 +119,15 @@ static inline struct zx_vou_hw *crtc_to_vou(struct drm_crtc *crtc)
return zcrtc->vou;
}
+void vou_inf_hdmi_audio_sel(struct drm_crtc *crtc,
+ enum vou_inf_hdmi_audio aud)
+{
+ struct zx_crtc *zcrtc = to_zx_crtc(crtc);
+ struct zx_vou_hw *vou = zcrtc->vou;
+
+ zx_writel_mask(vou->vouctl + VOU_INF_HDMI_CTRL, VOU_HDMI_AUD_MASK, aud);
+}
+
void vou_inf_enable(const struct vou_inf *inf, struct drm_crtc *crtc)
{
struct zx_crtc *zcrtc = to_zx_crtc(crtc);