From edddb2fbe479c6a2a4ffac6fc9f4f2f7f3141c88 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Sat, 12 Sep 2020 00:39:19 +0000 Subject: [PATCH] Apparently, snd_soc_dai_set_bclk_ratio should be used where snd_soc_dai_set_tdm_slot is. See, for example, commit b78b30e32a19f1ac79c26e0a3e9f7bc7385a02a2 Author: j-schambacher Date: Tue May 19 13:56:17 2020 +0200 Switch to snd_soc_dai_set_bclk_ratio Replaces obsolete function snd_soc_dai_set_tdm_slot --- seeed-voicecard.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 1ed9a0e..43535aa 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -322,10 +322,8 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai, } if (simple_dai->slots) { - ret = snd_soc_dai_set_tdm_slot(dai, - simple_dai->tx_slot_mask, - simple_dai->rx_slot_mask, - simple_dai->slots, + ret = snd_soc_dai_set_bclk_ratio(dai, + simple_dai->slots * simple_dai->slot_width); if (ret && ret != -ENOTSUPP) { dev_err(dai->dev, "simple-card: set_tdm_slot error\n");