drm: xlnx: zynqmp_dpsub: Add DP audio support
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 23 Oct 2024 11:52:43 +0000 (14:52 +0300)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Thu, 19 Dec 2024 06:54:00 +0000 (08:54 +0200)
commit3ec5c15793051c9fe102ed0674c7925a56205385
tree019135375912c52aac5e648d22573e901e05258e
parent0e0ab2462fd3a4c44f03617a9e107ef8c754e05e
drm: xlnx: zynqmp_dpsub: Add DP audio support

Add basic DisplayPort audio support.

Support non-live audio playback from two PCMs (DMA channels), and the
volume control in the audio mixer.

As older dtb files may not have the audio DMA channels defined, the
driver will just mark the audio support as disabled if the audio DMA is
missing, and will continue with only display support.

Note: Reset doesn't seem to work (ZYNQMP_DISP_AUD_SOFT_RESET). If we do
a reset, audio playback won't start again even if, afaics, we do set up
all the necessary registers. So, at the moment, resetting the audio
block in dp_dai_hw_free() is commented out.

Tested-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Reviewed-by: Vishal Sagar <vishal.sagar@amd.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241023-xilinx-dp-audio-v4-3-5128881457be@ideasonboard.com
drivers/gpu/drm/xlnx/Kconfig
drivers/gpu/drm/xlnx/Makefile
drivers/gpu/drm/xlnx/zynqmp_disp.c
drivers/gpu/drm/xlnx/zynqmp_disp_regs.h
drivers/gpu/drm/xlnx/zynqmp_dp.c
drivers/gpu/drm/xlnx/zynqmp_dp.h
drivers/gpu/drm/xlnx/zynqmp_dp_audio.c [new file with mode: 0644]
drivers/gpu/drm/xlnx/zynqmp_dpsub.c
drivers/gpu/drm/xlnx/zynqmp_dpsub.h