To support HDMI audio on the rk3588 based devices, the generic HDMI Codec framework is used in the dw-hdmi-qp DRM bridge driver. The implementation is mainly based on the downstream driver, ported to the generic HDMI Codec framework [1] recently merged in the master branch. The parameters computation has been kept as is and the data stored in the dw_hdmi_qp struct as been cleaned up. The table for the N values has been edited to reflect N recommended values as well as CTS recommended values. The downstream kernel also implements a machine driver for HDMI audio but it is doing exactly what the simple-audio-card driver does, so use that instead in the RK3588 SoC device tree. Based on Linus' master branch. [1]: https://lore.kernel.org/all/20241224-drm-bridge-hdmi-connector-v10-0-dc89577cd438@xxxxxxxxxx/ Changes since v4: - Moved hdmi0_audio node the rk3588-base.dtsi - Enable hdmi0_audio in rk3588-rock-5b.dts Changes since v3: - Renamed function to start with dw_hdmi_qp Changes since v2: - Also clear the audio infoframe - Write AUDI_CONTENTS0 to its default value in case it gets overwritten. - Store tmds_char_rate in the dw_hdmi_qp struct in atomic_enable - Clear tmds_char_rate in atomic_disable and only write registers when tmds_char_rate is not 0. - Do not use connector_state duplicates Changes since v1: - Remove useless audio_mutex (was used downstream for multiple drivers access to audio functions) - Let hdmi_codec build and setup audio infoframes - Only access audio registers when connector is connected - Rebased on master branch Detlev Casanova (2): arm64: dts: rockchip: Add HDMI0 audio output for rk3588 SoC arm64: dts: rockchip: Enable HDMI0 audio output for Rock 5B Sugar Zhang (1): drm/bridge: synopsys: Add audio support for dw-hdmi-qp arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 17 + .../boot/dts/rockchip/rk3588-rock-5b.dts | 8 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 497 ++++++++++++++++++ 3 files changed, 522 insertions(+) -- 2.48.1