summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Vasut <marex@nabladev.com>2026-04-11 16:05:12 +0300
committerMark Brown <broonie@kernel.org>2026-04-27 00:55:14 +0300
commited05258250dc91bebd84bb8778217b0ce9992ff4 (patch)
treec07f20ef45b08b95d08602cb77d122b83f73c684
parentae93afff9818ae59e6434d1a202d3ed2540fa46d (diff)
downloadlinux-ed05258250dc91bebd84bb8778217b0ce9992ff4.tar.xz
ASoC: tlv320aic3x: Add multi endpoint support
Support multiple endpoints on TLV320AIC3xxx codec port when used in of_graph context. This patch allows to share the codec port between two CPU DAIs. Custom STM32MP255C board uses TLV320AIC3104 audio codec. This codec is connected to two serial audio interfaces, which are configured either as rx or tx. However, when the audio graph card parses the codec nodes, it expects to find DAI interface indexes matching the endpoints indexes. The current patch forces the use of DAI id 0 for both endpoints, which allows to share the codec DAI between the two CPU DAIs for playback and capture streams respectively. Signed-off-by: Marek Vasut <marex@nabladev.com> Link: https://patch.msgid.link/20260411130542.19777-1-marex@nabladev.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/tlv320aic3x.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index ce22298b43ef..b12c1952823b 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1689,8 +1689,15 @@ static int aic3x_component_probe(struct snd_soc_component *component)
return 0;
}
+static int aic3x_of_xlate_dai_id(struct snd_soc_component *component,
+ struct device_node *endpoint)
+{
+ return 0;
+}
+
static const struct snd_soc_component_driver soc_component_dev_aic3x = {
.set_bias_level = aic3x_set_bias_level,
+ .of_xlate_dai_id = aic3x_of_xlate_dai_id,
.probe = aic3x_component_probe,
.controls = aic3x_snd_controls,
.num_controls = ARRAY_SIZE(aic3x_snd_controls),