8c2bdbc7c791ca246d0297dfbc1372ac428a8e6d
[openwrt/staging/noltari.git] /
1 From 05a5419c9e0ec993bc8dafd60e9fbe6c04e9e8c0 Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Thu, 22 Feb 2018 13:09:30 +0100
4 Subject: [PATCH 231/454] ASoC: hifiberry_dacplus: transmit S24_LE with 64 BCLK
5 cycles
6
7 Signed-off-by: Matthias Reichl <hias@horus.com>
8 ---
9 sound/soc/bcm/hifiberry_dacplus.c | 11 +++++++++++
10 1 file changed, 11 insertions(+)
11
12 --- a/sound/soc/bcm/hifiberry_dacplus.c
13 +++ b/sound/soc/bcm/hifiberry_dacplus.c
14 @@ -221,16 +221,27 @@ static int snd_rpi_hifiberry_dacplus_hw_
15 {
16 int ret = 0;
17 struct snd_soc_pcm_runtime *rtd = substream->private_data;
18 + int channels = params_channels(params);
19 + int width = 32;
20
21 if (snd_rpi_hifiberry_is_dacpro) {
22 struct snd_soc_codec *codec = rtd->codec;
23
24 + width = snd_pcm_format_physical_width(params_format(params));
25 +
26 snd_rpi_hifiberry_dacplus_set_sclk(codec,
27 params_rate(params));
28
29 ret = snd_rpi_hifiberry_dacplus_update_rate_den(
30 substream, params);
31 }
32 +
33 + ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x03, 0x03,
34 + channels, width);
35 + if (ret)
36 + return ret;
37 + ret = snd_soc_dai_set_tdm_slot(rtd->codec_dai, 0x03, 0x03,
38 + channels, width);
39 return ret;
40 }
41