kernel: bump 5.4 to 5.4.48
[oweals/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0748-Switch-to-snd_soc_dai_set_bclk_ratio.patch
1 From 2e5f704305c97c5ae26420f61c0242c151c91533 Mon Sep 17 00:00:00 2001
2 From: j-schambacher <joerg@i2audio.com>
3 Date: Tue, 19 May 2020 13:56:17 +0200
4 Subject: [PATCH] Switch to snd_soc_dai_set_bclk_ratio Replaces
5  obsolete function snd_soc_dai_set_tdm_slot
6
7 Signed-off-by: Joerg Schambacher <joerg@i2audio.com>
8 ---
9  sound/soc/bcm/hifiberry_dacplusadcpro.c | 13 +++----------
10  1 file changed, 3 insertions(+), 10 deletions(-)
11
12 --- a/sound/soc/bcm/hifiberry_dacplusadcpro.c
13 +++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c
14 @@ -406,21 +406,14 @@ static int snd_rpi_hifiberry_dacplusadcp
15                         return ret;
16         }
17  
18 -       ret = snd_soc_dai_set_tdm_slot(rtd->cpu_dai, 0x03, 0x03,
19 -               channels, width);
20 +       ret = snd_soc_dai_set_bclk_ratio(rtd->cpu_dai, channels * width);
21         if (ret)
22                 return ret;
23 -       ret = snd_soc_dai_set_tdm_slot(rtd->codec_dais[0], 0x03, 0x03,
24 -               channels, width);
25 +       ret = snd_soc_dai_set_bclk_ratio(rtd->codec_dais[0], channels * width);
26         if (ret)
27                 return ret;
28 -       ret = snd_soc_dai_set_tdm_slot(rtd->codec_dais[1], 0x03, 0x03,
29 -               channels, width);
30 -       if (ret)
31 -               return ret;
32 -
33         if (snd_rpi_hifiberry_is_dacpro && ops->hw_params)
34 -                       ret = ops->hw_params(substream, params, dai);
35 +               ret = ops->hw_params(substream, params, dai);
36         return ret;
37  }
38