4197d4a1d24c6ee3d0e3b0b3717fd0d948e14200
[openwrt/staging/dangole.git] /
1 From 1d5b2b562fd800069f4090142e201d696ad1122a Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Thu, 22 Feb 2018 13:07:53 +0100
4 Subject: [PATCH 230/454] ASoC: allo-boss-dac: transmit S24_LE with 64 BCLK
5 cycles
6
7 Signed-off-by: Matthias Reichl <hias@horus.com>
8 ---
9 sound/soc/bcm/allo-boss-dac.c | 11 +++++++++++
10 1 file changed, 11 insertions(+)
11
12 --- a/sound/soc/bcm/allo-boss-dac.c
13 +++ b/sound/soc/bcm/allo-boss-dac.c
14 @@ -273,6 +273,8 @@ static int snd_allo_boss_hw_params(
15 {
16 int ret = 0;
17 struct snd_soc_pcm_runtime *rtd = substream->private_data;
18 + int channels = params_channels(params);
19 + int width = snd_pcm_format_physical_width(params_format(params));
20
21 if (snd_soc_allo_boss_master) {
22 struct snd_soc_codec *codec = rtd->codec;
23 @@ -282,7 +284,16 @@ static int snd_allo_boss_hw_params(
24
25 ret = snd_allo_boss_update_rate_den(
26 substream, params);
27 + if (ret)
28 + return ret;
29 }
30 +
31 + ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x03, 0x03,
32 + channels, width);
33 + if (ret)
34 + return ret;
35 + ret = snd_soc_dai_set_tdm_slot(rtd->codec_dai, 0x03, 0x03,
36 + channels, width);
37 return ret;
38 }
39