From d94d483e5f0798294aa1eb738c203acc4a7f415e Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com>
Date: Fri, 2 Feb 2018 20:30:42 +0100
Subject: [PATCH 214/454] ASoC: hifiberry_dacplus: fix S24_LE format

Remove set_bclk_ratio call so 24-bit data is transmitted in
24 bclk cycles.

Signed-off-by: Matthias Reichl <hias@horus.com>
---
 sound/soc/bcm/hifiberry_dacplus.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

--- a/sound/soc/bcm/hifiberry_dacplus.c
+++ b/sound/soc/bcm/hifiberry_dacplus.c
@@ -216,20 +216,11 @@ static int snd_rpi_hifiberry_dacplus_upd
 	return 0;
 }
 
-static int snd_rpi_hifiberry_dacplus_set_bclk_ratio_pro(
-	struct snd_soc_dai *cpu_dai, struct snd_pcm_hw_params *params)
-{
-	int bratio = snd_pcm_format_physical_width(params_format(params))
-		* params_channels(params);
-	return snd_soc_dai_set_bclk_ratio(cpu_dai, bratio);
-}
-
 static int snd_rpi_hifiberry_dacplus_hw_params(
 	struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params)
 {
-	int ret;
+	int ret = 0;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 
 	if (snd_rpi_hifiberry_is_dacpro) {
 		struct snd_soc_codec *codec = rtd->codec;
@@ -237,13 +228,8 @@ static int snd_rpi_hifiberry_dacplus_hw_
 		snd_rpi_hifiberry_dacplus_set_sclk(codec,
 			params_rate(params));
 
-		ret = snd_rpi_hifiberry_dacplus_set_bclk_ratio_pro(cpu_dai,
-			params);
-		if (!ret)
-			ret = snd_rpi_hifiberry_dacplus_update_rate_den(
-				substream, params);
-	} else {
-		ret = snd_soc_dai_set_bclk_ratio(cpu_dai, 64);
+		ret = snd_rpi_hifiberry_dacplus_update_rate_den(
+			substream, params);
 	}
 	return ret;
 }
