From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 284093845D0 for ; Sat, 11 Apr 2026 14:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775919482; cv=none; b=JJPvZOfBfp7dyhUeXw5twLvg01Rin4znQIuiVpKOesyifmOGnWbrU0e6+8tZDZcWTzuDanmTnfKLoryrnPAeEuClNo9ilLOHnFXVyvO0uOYTXe9WVZknVRgT41iZKX7ntieVv+EvObjDQZZfhDZaForRKpbFSWXaWayDXWjZViE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775919482; c=relaxed/simple; bh=3L+gTDPXvRqyUGB8yEtL8RbSZ9xTZaawwb3B9aSZ2Eo=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=SztR8UlnFITCae3a885xuQ4PJeM/o+SUVUQGa23gqHdjVRtZY65bVjg46w7OEdV95r29eJwfQPUrmjKFg3R8Iam+npPCERfirSKgfZIyaXIFoLAObA+vluR189bJFnRog12VqqQnlTD9Dx8sSGXpptnS3DZGAOFonJO9nWx++NI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=MTGtYh9Q; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="MTGtYh9Q" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-488a4bc360bso16244055e9.0 for ; Sat, 11 Apr 2026 07:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775919479; x=1776524279; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=sXiZV9+jNfCTqb1kpRrOCPDhkoywHHddqhZQJ9yG43Y=; b=MTGtYh9Qb92cA0noWdAI02/GO8eYkHp7SNlW6eJp6dXnN69YsFX2KvrQOu6R0sLQvs aPNnCU8Tr1ajgRCdWEyFnAeUIm7Dau7ka7CvNmZxbvYyK+vUbylmGUR089VSFQMkR1a9 b3ZPHH7UKbP2KKrrFQC/MgH0LeEnvwIEoVueSkTlVKSK8kpIyuXNYItjSa9z9NSGgXPp FL59NbAhJZt6czj3Qav1CAhymtXhW5pUXw5S5NUoHzTYunej3tUZZiPJkP97YSzwEDGG NMVR0GXvmRRm13uDAmMiw4f3thiXx1AT/lG+KU/IlCvma/ORhMGfS1boQcbkC3vjBsIo 60sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775919479; x=1776524279; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sXiZV9+jNfCTqb1kpRrOCPDhkoywHHddqhZQJ9yG43Y=; b=RmjvZ5SQdgsRSgpTpswGGGAT0+JUIZeq2cMHIbPRPzBmHv5XofgcSKY9whQdvN0PwT Pnoya/68Lg3qLUWzdP6Qp/1sWnW93EtXSYNaIvFU+cpDSCBnXU8Phq6JAzlcW7/EBt4q D2b2WV09k+m4cYUVsbeIQ8UYUAE3upZXXBNBO902MiLdsX9rgz022DeDHsTJZSminWT5 9jay5vyhsccf7YblRX3z2Enexg2mGsbL9lRYu6+s1VQTdApaxFHxmZpa5M88EPPfXfy9 c/ubGfVEZRzZqV2CSjaoZdKbY5l1BZzKhjDxDlfxZyRWniWLoIHROx2NukMSHvWdr+Tk 9tnA== X-Gm-Message-State: AOJu0Ywnc9czRXsAkMaiUL9pf6LNOArMboOBXHJagqY4UgRZLH6/sTTW +Uuzt3KrM2NpVDmOoWUE1tD1mFnKCbS+S8lw7ZPvthIBbr1u/HZX3twvYNwKnKGdRWc= X-Gm-Gg: AeBDietbhmiI6pQmzq7O92j8f1+GjpquyhDLTB4iH5HqXUJ4jTDjA2wPMTwCw/6xgeC ybnvdX578Zun5OOodmPFCWcxZHQfJ6OqhkppVX2wIwFXTFFh2UObZtR8LRqmNQ6SsUxKCWtzxvD tK8vMy5sxSsTRcxBGjv7P8Ol2U6ZV3FTfg34xx4ZENIRR7ykSJ087GbD7YAwYzkQxPdI/xyZYrL aQpiYTdOoS2zyuzKz8QR9QPhMtBGVgAhnl+Br8Ok3/Ycq/TtVSHt1kpiiV3V5aXAwADowKLyh25 YL+MVdZip68nDyvB3F12CUWDRCcDzJbeGDzJJNYCEtMdJDcaJWmxGtsJXlSdotfZvfbGenNe90S z5nDDEdPvrCfHSGjfAKxEfBLwibayiwirJsiG6dhc/r8US8LdbueLIGxaOWKBWOtwaxUqoRcLu9 OBJzfw9fcgtIIrsPebeq+r X-Received: by 2002:a05:600c:5303:b0:488:b196:d249 with SMTP id 5b1f17b1804b1-488d67bf74fmr94580245e9.5.1775919478531; Sat, 11 Apr 2026 07:57:58 -0700 (PDT) Received: from [127.0.1.1] ([151.61.248.52]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d5dc7070sm48882375e9.10.2026.04.11.07.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2026 07:57:58 -0700 (PDT) From: Valerio Setti Subject: [PATCH RFC v2 00/11] Add support for AUDIN driver in Amlogic GXBB Date: Sat, 11 Apr 2026 16:57:25 +0200 Message-Id: <20260411-audin-rfc-v2-0-4c8a6ec5fcab@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAFVh2mkC/zWMQQrCMBAAv1L2bMomTcV6Kgg+wKt4SNKNXbCtb GpRSv9uEDzOMMwKiYQpwbFYQWjhxNOYwewKCL0b76S4ywwGzR6tRuVeHY9KYlDGVj742NRkK8j 9Uyjy+/e6wuV8gluWUaZBzb2Q+29qNBp1jdo0pUVjD0qrJdE8c+vd58FeqAzTANv2BYV9E0GdA AAA X-Change-ID: 20260410-audin-rfc-243bcbf95e43 To: Jerome Brunet , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Valerio Setti Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, devicetree@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4155; i=vsetti@baylibre.com; h=from:subject:message-id; bh=3L+gTDPXvRqyUGB8yEtL8RbSZ9xTZaawwb3B9aSZ2Eo=; b=owGbwMvMwCF2z3ty7kUrRgbG02pJDJm3EvMrp3xIYrqlk9QyY03Z7YcCk2RnTMt/5L3ztJD16 VYB7eczOkpZGMQ4GGTFFFlYpt/7XVCq9tA44WQBzBxWJpAhDFycAjARgRpGhrvchk/fnHOIk1ri yDjFt/HV32ob1/Wp05Mt9ect9rr904+R4UTGHruHeRNEnj0r+DB3uXUYl6LVwqV9ARlRjcKspdp HGAA= X-Developer-Key: i=vsetti@baylibre.com; a=openpgp; fpr=0497DEFB707526E13360C970DE4B936DD13A0100 This series adds support for I2S audio input (AUDIN) on the Amlogic GXBB platform. It has been largely reshaped compared to what proposed in v1. Instead of adding an HACK commit to allow AIU to export its clock so that also AUDIN can control it, now the design closely follows what was implemented in the Meson AXG platform. "aiu-encoder-i2s" becomes the shared interface for playback/capture and it controls pins and clocks; data formatting is implemented in formatters which are named "aiu-formatter-i2s" and "audin-decoder-i2s" [1]. Formatters are DAPM widgets which are dynamically attached/detached to the streams when the latters starts/stop, respectively. As of now only I2S input is supported, because it's the only one I could physically test in my setup, but other input sources (ex: SPDIF) are also allowed according to the SOC's manual and can be added in the future. This series was tested on an OdroidC2 board (Amlogic S905 SOC) with an NXP SGTL5000 codec connected to its I2S input port. Since this work brings GX platform very close to the AXG one, once this series is accepted, follow up work will be done in order to unify GX and AXG formatters so as to minimize the number of implementations. The series a bit long and it includes changes to drivers, dt-bindings and device-tree. Of course this only happens because this is an RFC and I wanted to give a full overview of what will be the final design. If no objection is raised, this patch series will be split into 3: one for reshaping AIU and introducing formatters, one to add AUDIN driver and its dt-bindings, one for the device-tree changes. [1]: Different naming for the aiu part is related to the fact that "aiu-encoder-i2s" is already used for the interface and the goal of this series was to introduce the minimum amount of changes that allow I2S capture to work. Renaming can be implemented in the future as follow up activity. v1 -> v2: - Reshaped design so that GX platforms will use the same design pattern of AXG ones. This helped removing the need for an HACK commit. -- 2.39.5 --- Valerio Setti (11): ASoC: meson: gx: add gx-formatter and gx-interface ASoC: meson: aiu-encoder-i2s: use gx_iface and gx_stream structures ASoC: meson: aiu: introduce I2S output formatter ASoC: meson: aiu: use aiu-formatter-i2s to format I2S output data ASoC: dt-bindings: amlogic: add schema for audin-formatter and audin-toddr ASoC: meson: gx: add AUDIN I2S Decoder driver ASoC: meson: gx: add AUDIN FIFO driver ASoC: meson: aiu: add I2S Capture DAI ASoC: meson: gx-card: add support for AUDIN FIFO arm64: dts: amlogic: gx: add nodes for AUDIN decoder and FIFO arm64: dts: amlogic: odroid-c2: add support for I2S audio input .../sound/amlogic,meson-gx-audin-decoder-i2s.yaml | 49 +++ .../sound/amlogic,meson-gx-audin-fifo.yaml | 63 +++ arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 32 ++ .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 34 ++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 26 ++ sound/soc/meson/Kconfig | 17 + sound/soc/meson/Makefile | 6 + sound/soc/meson/aiu-encoder-i2s.c | 219 +++++++---- sound/soc/meson/aiu-formatter-i2s.c | 106 +++++ sound/soc/meson/aiu.c | 37 +- sound/soc/meson/aiu.h | 4 + sound/soc/meson/audin-decoder-i2s.c | 218 +++++++++++ sound/soc/meson/audin-fifo.c | 432 +++++++++++++++++++++ sound/soc/meson/gx-card.c | 14 +- sound/soc/meson/gx-formatter.c | 304 +++++++++++++++ sound/soc/meson/gx-formatter.h | 47 +++ sound/soc/meson/gx-interface.h | 50 +++ 17 files changed, 1567 insertions(+), 91 deletions(-) --- base-commit: 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f change-id: 20260410-audin-rfc-243bcbf95e43 Best regards, -- Valerio Setti