aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4613.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2022-06-08 02:09:16 +0000
committerMark Brown <broonie@kernel.org>2022-06-24 16:21:36 +0100
commited0073bd0fccec459b526918be70bf9dc551581a (patch)
treec83e324702f21c798d4ea4db71d58288ede615c2 /sound/soc/codecs/ak4613.c
parentASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in .set_jack_detect (diff)
downloadlinux-dev-ed0073bd0fccec459b526918be70bf9dc551581a.tar.xz
linux-dev-ed0073bd0fccec459b526918be70bf9dc551581a.zip
ASoC: ak4613: cares Simple-Audio-Card case for TDM
Renesas is the only user of ak4613 on upstream for now, and commit f28dbaa958fbd8 ("ASoC: ak4613: add TDM256 support") added TDM256 support. Renesas tested part of it, because of board connection. It was assuming ak4613 is probed via Audio-Graph-Card, but it might be probed via Simple-Audio-Card either. It will indicates WARNING in such case. This patch fixup it. Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/87h74v29f7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r--sound/soc/codecs/ak4613.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 55e773f92122..93606e5afd8f 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -868,10 +868,12 @@ static void ak4613_parse_of(struct ak4613_priv *priv,
/*
* connected STDI
+ * TDM support is assuming it is probed via Audio-Graph-Card style here.
+ * Default is SDTIx1 if it was probed via Simple-Audio-Card for now.
*/
sdti_num = of_graph_get_endpoint_count(np);
- if (WARN_ON((sdti_num > 3) || (sdti_num < 1)))
- return;
+ if ((sdti_num >= SDTx_MAX) || (sdti_num < 1))
+ sdti_num = 1;
AK4613_CONFIG_SDTI_set(priv, sdti_num);
}