From nobody Sun Apr 12 07:25:04 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 3B78938B143 for ; Sat, 11 Apr 2026 14:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775919496; cv=none; b=m+REj5AO3aaxyPNx+5Vjx5E6yXz893wJEZJHKvNtpH9+UpaO0FdUMR2IYP+9gLoN4clIZEN8TLrftbaJuRTPd3B9PGrJukeBN7Vr6DzsyicL88gfWg9YrgChl4fhiD5yHQxf5LKcUuAzH2nIliSDO1NPpxNW/bNJq6uxlGxwh88= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775919496; c=relaxed/simple; bh=2ntYm7/hmH/uH7c2NHvmQVtKZ8poNaDp8J/gvOxFEnk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bZIEVMVqoSUbSaMBNx62dYYuztLPuOVLSlI/L88kLgVwC1macclUqssAlj1r74RZPQrx/I9PyLmNt9GXo2/qF+7NkkxkCct0KUIZtiIKYcXSNu0HxWfj0iTJbfFtVSA6qO+g4VGle8TW64C12uYqYcq+Sdmv0d42Zz2s8Vu6Leo= 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=xO2gMGmO; arc=none smtp.client-ip=209.85.128.49 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="xO2gMGmO" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-488af96f6b2so39703505e9.0 for ; Sat, 11 Apr 2026 07:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1775919490; x=1776524290; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=DII7aCMHxbnEfo6qVNehUuDSdlZbo8e6WaMr0UUHHGk=; b=xO2gMGmO03TMIIxh26JDuKigo3E2SsVrhI0fth7ztBWS+K1d2p4fdyBLHefEPLgZdI l28SZMO0RI1Pqgx4KCjYik5bWnbtcx6J1UnfAHpOYkzUTGDmqHq/21b0Qn+PCxmogKzR y7B5IUOWVqEJnI1ekUGaitgKFZAkyf8CH5F+9si0tjmczrczmPtWyOrUXKF4q/76fUD5 OhCY8TFjvUFDTT6D/9bqD4g0AIsgVMu6KseFu1+Zvd/f0xHV7IzGZmOX1PbG/wIRPp3y kakZsa2Bo691TTegG2sQ62+hrF7qSUmHYfKb5nCgM0oUKMkmDDwEcVCSa+vuA0n43IlV 3gMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775919490; x=1776524290; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=DII7aCMHxbnEfo6qVNehUuDSdlZbo8e6WaMr0UUHHGk=; b=cWDzcmpipIZBsR1dH3wMdcLRYgX28QXG/+UjfM8gvrWo0+JAW1FIt2q1LLuCPV1NpI S3UDFKHM6U9eDTRH86Hj7krDF/WXmDykLdFG1vgTNSg97zi4lRzVuqjSOVjlyWSmSinu 6TW3e0fybyM3wEixFrZ+Wv38Km0Z7iidWwJu0/xuBMoy1HgMOCl2Wga8vjDh7aep8zjS DMMJjkHhVpxJzkKwcNvVuEL8Z8qYujppLYE88cG6zY4q9q2NaFm+rAsIvBRCXuKRkzwX Ti6w/cc0C5hNQkjKrBZn7DJEBSEgHknb9wnq0pHAdNBhhGVI0R2yTz8+4CsJe1HfbPeC boEw== X-Gm-Message-State: AOJu0YxcKuxdXI0dougDZha7CoYMzIVCcjevKBQPvgaTZj4PCNlMxNbj h/1YpeuLNMhZ3Drtdt08LPEBD6oWOKonokaf5+rgYxwMIbA6xqiTC5VEUqdXtfx8X5Y= X-Gm-Gg: AeBDiesBbEoeiAk3WBDMh7B14ETNh6ci9Dtu6WJZhwe6hg6hUYkGEtELDHDzqTP3U0l CJ80ldkJ2t4nAVMDAGWRUcsmigaEoD61Cg05//m5bthhpGHyzAYT5xwtJt43VFNH8ZRletnwyfH /tEikUmUAoLO0t9n3bXDYIeREb/9wpx+G2YOZDLPThlNWLyEkxVA0ysylT/zy+0W21TcCnwbw5N swIIPZ1h3E9hmqhM+0Yr2PToXQyTWd+TksDLotvEbFJh+HCn4w7iIMDkrcaJcKJZ7ZYKCuXsNJH n+21KXEAAfa6mj6ksGG2+Z4qqOcfbcpE3m7aB63AJ3uv0lgzYKwUscRx5RxUprWPP3eYHfsrmZJ o9hbFSCfIMysv5VBAsIOgj3lltajQf0JILOD5Bx3ubY/W9ZzKdKBaNmUWpQ9Dd64brDvo4RhaWM QubTRS5H654NgDT3wsRUPg X-Received: by 2002:a05:600c:30d2:b0:488:e192:6fb5 with SMTP id 5b1f17b1804b1-488e19270cbmr11503025e9.24.1775919490161; Sat, 11 Apr 2026 07:58:10 -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.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Apr 2026 07:58:09 -0700 (PDT) From: Valerio Setti Date: Sat, 11 Apr 2026 16:57:34 +0200 Subject: [PATCH RFC v2 09/11] ASoC: meson: gx-card: add support for AUDIN FIFO 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: quoted-printable Message-Id: <20260411-audin-rfc-v2-9-4c8a6ec5fcab@baylibre.com> References: <20260411-audin-rfc-v2-0-4c8a6ec5fcab@baylibre.com> In-Reply-To: <20260411-audin-rfc-v2-0-4c8a6ec5fcab@baylibre.com> 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=2163; i=vsetti@baylibre.com; h=from:subject:message-id; bh=2ntYm7/hmH/uH7c2NHvmQVtKZ8poNaDp8J/gvOxFEnk=; b=owGbwMvMwCF2z3ty7kUrRgbG02pJDJm3EksmrahWzn5x4WJtQN9LV2MG+cX3n90/v2bLvk2Pc 56rXmW06yhlYRDjYJAVU2RhmX7vd0Gp2kPjhJMFMHNYmUCGMHBxCsBE/mgx/K+7ttJNs2e2wi0/ j5oX17Y4BPCdOmtw+cEkWbmYU/HcskaMDI+OnHHQteZYLetsyuvQYCp/q3T7pBKJ8ze1v4kfnCj lywEA X-Developer-Key: i=vsetti@baylibre.com; a=openpgp; fpr=0497DEFB707526E13360C970DE4B936DD13A0100 Slightly modify "gx_card_cpu_identify()" by making the compatible matching string an input parameter. This allows to easily support also "meson-gx-audin-fifo" with minimal changes. Signed-off-by: Valerio Setti --- sound/soc/meson/gx-card.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index b408cc2bbc9193ae56d02b4fcd05af8df3f93d80..1e48dbbf7324dfa6ca66026d944= 422dadf4204c0 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -65,10 +65,10 @@ static int gx_card_parse_i2s(struct snd_soc_card *card, } =20 static int gx_card_cpu_identify(struct snd_soc_dai_link_component *c, - char *match) + char *compatible_match, char *dai_match) { - if (of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) { - if (strstr(c->dai_name, match)) + if (of_device_is_compatible(c->of_node, compatible_match)) { + if (strstr(c->dai_name, dai_match)) return 1; } =20 @@ -94,21 +94,23 @@ static int gx_card_add_link(struct snd_soc_card *card, = struct device_node *np, if (ret) return ret; =20 - if (gx_card_cpu_identify(dai_link->cpus, "FIFO")) + if (gx_card_cpu_identify(dai_link->cpus, DT_PREFIX "aiu", "FIFO")) return meson_card_set_fe_link(card, dai_link, np, true); + else if (gx_card_cpu_identify(dai_link->cpus, DT_PREFIX "meson-gx-audin-f= ifo", "FIFO")) + return meson_card_set_fe_link(card, dai_link, np, false); =20 ret =3D meson_card_set_be_link(card, dai_link, np); if (ret) return ret; =20 /* Or apply codec to codec params if necessary */ - if (gx_card_cpu_identify(dai_link->cpus, "CODEC CTRL")) { + if (gx_card_cpu_identify(dai_link->cpus, DT_PREFIX "aiu", "CODEC CTRL")) { dai_link->c2c_params =3D &codec_params; dai_link->num_c2c_params =3D 1; } else { dai_link->no_pcm =3D 1; /* Check if the cpu is the i2s encoder and parse i2s data */ - if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder")) + if (gx_card_cpu_identify(dai_link->cpus, DT_PREFIX "aiu", "I2S Encoder")) ret =3D gx_card_parse_i2s(card, np, index); } =20 --=20 2.39.5