drm/vc4: Add HDMI audio support
authorEric Anholt <eric@anholt.net>
Mon, 27 Feb 2017 20:28:02 +0000 (12:28 -0800)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 01:07:24 +0000 (01:07 +0000)
commit30c8d60a3c7ba35d2d7b3c8d85b48ff42a3fd1db
treef311660cabf52738b4c9a6cb67e64c75746ad512
parent622b5bd63ee4e7abf92355a9b497c814428284ac
drm/vc4: Add HDMI audio support

The HDMI encoder IP embeds all needed blocks to output audio, with a
custom DAI called MAI moving audio between the two parts of the HDMI
core.  This driver now exposes a sound card to let users stream audio
to their display.

Using the hdmi-codec driver has been considered here, but MAI meant
having to significantly rework hdmi-codec, and it would have left
little shared code with the I2S mode anyway.

The encoder requires that the audio be SPDIF-formatted frames only,
which alsalib will format-convert for us.

This patch is the combined work of Eric Anholt (initial register setup
with a separate dmaengine driver and using simple-audio-card) and
Boris Brezillon (moving it all into HDMI, massive debug to get it
actually working), and which Eric has the permission to release.

v2: Drop "-audio" from sound card name, since that's already implied
    (suggestion by Boris)

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170227202803.12855-2-eric@anholt.net
drivers/gpu/drm/vc4/Kconfig
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_regs.h