From patchwork Thu Jan 23 22:28:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Detlev Casanova X-Patchwork-Id: 13948711 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35C73C02182 for ; Thu, 23 Jan 2025 22:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=IiaZ0u0lGcoufNKau2ACXmwzn7fAmtQ0CsVGqeHnYLg=; b=1jMofZuJMaCdke0T0nLr6PzCE4 VJ3AZC55palarg1yGpjt+Ht4DZeKLSyoD+ocxudMXpQzh8v9AsWl0Px2jJ+FgH6Q/8DlNWNuS0Sn1 Wurrh9CeJHZBI+nonTYJwwLcirqzpO7VseMMbeVOPtWTJfXTXYkB3EeI1Qtd/KCiupOLfdZrou1rk CcEZtY2+lNHE47WSgiwkLkRrYM8XPnE0pA/UXiOdGLpe94r/PPr/l9vXoyDDyLPxN86VGRMqCX17T s3fOGfwdEW7kShoaqt4zuFO1+Q0jRt+HjDiCp7N5qYItH1aaMP7yQoDplZnD+SoGDQWU+lu8EhCUx y5HyFzoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tb5ig-0000000DPeM-2UEs; Thu, 23 Jan 2025 22:30:38 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tb5hF-0000000DPHh-3jA0; Thu, 23 Jan 2025 22:29:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1737671347; bh=lhdPIRPV1EIPaxeK+CehOf2BLDHtI+qHEjmo6IGSujQ=; h=From:To:Cc:Subject:Date:From; b=g+TO+Qu+FchNW09ozcweoOY27PIzeRQd1sA61HjvjuFCx/jM185aHDLWgh9gukSNi xC8D2BkdWRpwvU4BXyBauf3BJFY9NBUufuJo9ADwI1ClcAQr4ywpZVdtLnV4bjOwU/ Hfs997D977jAOKfXFmlUzkG3oARIjP1cTKzEMC7z1Fc2KB6XO550s5pPxV9ksoSc3g Rny3tN4RR5rp83L6cNNCJh94nZWODlOoxATUIop/zReHy/B+BgFJ2FHMLYFUmKAZV/ HdghJU+ntrl52PF/M3Yq1IUKqwvOvpxMDCbQG5cAjhJdp2Xk7i1+H3JRpuADPLmrnO n7v9K6PKNHsNQ== Received: from earth.mtl.collabora.ca (mtl.collabora.ca [66.171.169.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: detlev) by bali.collaboradmins.com (Postfix) with ESMTPSA id 9BD5017E0E9E; Thu, 23 Jan 2025 23:29:03 +0100 (CET) From: Detlev Casanova To: linux-kernel@vger.kernel.org Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sebastian Reichel , Cristian Ciocaltea , Alexey Charkov , Jianfeng Liu , Dragan Simic , FUKAUMI Naoki , Geert Uytterhoeven , Detlev Casanova , Johan Jonker , Kever Yang , Dmitry Baryshkov , Sugar Zhang , Algea Cao , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, kernel@collabora.com Subject: [PATCH v2 0/2] Add HDMI audio on the Radxa ROCK 5B Date: Thu, 23 Jan 2025 17:28:05 -0500 Message-ID: <20250123222850.223255-1-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250123_142910_088577_AF8B0715 X-CRM114-Status: GOOD ( 13.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 DRM tree. The parameters computation has been kept as is and the data stored in the dw_hdmi_qp struct as been cleaned up. 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 ROCK 5B device tree. Based on Linus' master branch. 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 (1): arm64: dts: rockchip: Add HDMI0 audio output on rock-5b Sugar Zhang (1): drm/bridge: synopsys: Add audio support for dw-hdmi-qp arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 1 + .../boot/dts/rockchip/rk3588-rock-5b.dts | 19 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 424 ++++++++++++++++++ 3 files changed, 444 insertions(+)