From 2e5f704305c97c5ae26420f61c0242c151c91533 Mon Sep 17 00:00:00 2001
From: j-schambacher <joerg@i2audio.com>
Date: Tue, 19 May 2020 13:56:17 +0200
Subject: [PATCH] Switch to snd_soc_dai_set_bclk_ratio Replaces
 obsolete function snd_soc_dai_set_tdm_slot

Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
---
 sound/soc/bcm/hifiberry_dacplusadcpro.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

--- a/sound/soc/bcm/hifiberry_dacplusadcpro.c
+++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c
@@ -406,21 +406,14 @@ static int snd_rpi_hifiberry_dacplusadcp
 			return ret;
 	}
 
-	ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x03, 0x03,
-		channels, width);
+	ret = snd_soc_dai_set_bclk_ratio(rtd->cpu_dai, channels * width);
 	if (ret)
 		return ret;
-	ret = snd_soc_dai_set_tdm_slot(rtd->codec_dais[0], 0x03, 0x03,
-		channels, width);
+	ret = snd_soc_dai_set_bclk_ratio(rtd->codec_dais[0], channels * width);
 	if (ret)
 		return ret;
-	ret = snd_soc_dai_set_tdm_slot(rtd->codec_dais[1], 0x03, 0x03,
-		channels, width);
-	if (ret)
-		return ret;
-
 	if (snd_rpi_hifiberry_is_dacpro && ops->hw_params)
-			ret = ops->hw_params(substream, params, dai);
+		ret = ops->hw_params(substream, params, dai);
 	return ret;
 }
 
