lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250210150129.40248-5-vsetti@baylibre.com>
Date: Mon, 10 Feb 2025 16:01:27 +0100
From: Valerio Setti <vsetti@...libre.com>
To: jbrunet@...libre.com,
	neil.armstrong@...aro.org,
	khilman@...libre.com,
	martin.blumenstingl@...glemail.com,
	linux-amlogic@...ts.infradead.org,
	linux-sound@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	Valerio Setti <vsetti@...libre.com>
Subject: [PATCH RFC 4/6] ASoC: meson: add support for AUDIN in gx-card

Extend the gx-card module in order to support the audio input capabilities
provided by AUDIN driver.

Signed-off-by: Valerio Setti <vsetti@...libre.com>
---
 sound/soc/meson/gx-card.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c
index b408cc2bbc91..c59bb18b0951 100644
--- a/sound/soc/meson/gx-card.c
+++ b/sound/soc/meson/gx-card.c
@@ -67,7 +67,8 @@ static int gx_card_parse_i2s(struct snd_soc_card *card,
 static int gx_card_cpu_identify(struct snd_soc_dai_link_component *c,
 				char *match)
 {
-	if (of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) {
+	if ((of_device_is_compatible(c->of_node, DT_PREFIX "aiu")) ||
+	    (of_device_is_compatible(c->of_node, DT_PREFIX "audin"))) {
 		if (strstr(c->dai_name, match))
 			return 1;
 	}
@@ -96,6 +97,8 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np,
 
 	if (gx_card_cpu_identify(dai_link->cpus, "FIFO"))
 		return  meson_card_set_fe_link(card, dai_link, np, true);
+	else if (gx_card_cpu_identify(dai_link->cpus, "TODDR"))
+		return  meson_card_set_fe_link(card, dai_link, np, false);
 
 	ret = meson_card_set_be_link(card, dai_link, np);
 	if (ret)
@@ -107,8 +110,11 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np,
 		dai_link->num_c2c_params = 1;
 	} else {
 		dai_link->no_pcm = 1;
-		/* Check if the cpu is the i2s encoder and parse i2s data */
-		if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder"))
+		/* Check if the cpu is the i2s encoder|decoder and parse
+		 * i2s data
+		 */
+		if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder") ||
+		    gx_card_cpu_identify(dai_link->cpus, "I2S Decoder"))
 			ret = gx_card_parse_i2s(card, np, index);
 	}
 
-- 
2.39.5


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ