aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0740-Switch-to-snd_soc_dai_set_bclk_ratio.patch
blob: b104f00efcae5f7bf20975b9ef3f6d307d04b171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
 }