brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 950-0210-ASoC-allo-boss-dac-fix-S24_LE-format.patch
1 From ae1a548ef0cb1a25242201bca5fefa5090728ea8 Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Fri, 2 Feb 2018 20:30:42 +0100
4 Subject: [PATCH 210/454] ASoC: allo-boss-dac: fix S24_LE format
5
6 Remove set_bclk_ratio call so 24-bit data is transmitted in
7 24 bclk cycles.
8
9 Signed-off-by: Matthias Reichl <hias@horus.com>
10 ---
11 sound/soc/bcm/allo-boss-dac.c | 20 ++------------------
12 1 file changed, 2 insertions(+), 18 deletions(-)
13
14 --- a/sound/soc/bcm/allo-boss-dac.c
15 +++ b/sound/soc/bcm/allo-boss-dac.c
16 @@ -222,14 +222,6 @@ static int snd_allo_boss_update_rate_den
17 return 0;
18 }
19
20 -static int snd_allo_boss_set_bclk_ratio_pro(
21 - struct snd_soc_dai *cpu_dai, struct snd_pcm_hw_params *params)
22 -{
23 - int bratio = snd_pcm_format_physical_width(params_format(params))
24 - * params_channels(params);
25 - return snd_soc_dai_set_bclk_ratio(cpu_dai, bratio);
26 -}
27 -
28 static void snd_allo_boss_gpio_mute(struct snd_soc_card *card)
29 {
30 if (mute_gpio)
31 @@ -281,9 +273,6 @@ static int snd_allo_boss_hw_params(
32 {
33 int ret = 0;
34 struct snd_soc_pcm_runtime *rtd = substream->private_data;
35 - struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
36 - unsigned int sample_bits =
37 - snd_pcm_format_physical_width(params_format(params));
38
39 if (snd_soc_allo_boss_master) {
40 struct snd_soc_codec *codec = rtd->codec;
41 @@ -291,13 +280,8 @@ static int snd_allo_boss_hw_params(
42 snd_allo_boss_set_sclk(codec,
43 params_rate(params));
44
45 - ret = snd_allo_boss_set_bclk_ratio_pro(cpu_dai,
46 - params);
47 - if (!ret)
48 - ret = snd_allo_boss_update_rate_den(
49 - substream, params);
50 - } else {
51 - ret = snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
52 + ret = snd_allo_boss_update_rate_den(
53 + substream, params);
54 }
55 return ret;
56 }