brcm2708: add kernel 4.14 support
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.14 / 950-0118-ASoC-bcm2835-Enforce-full-symmetry.patch
1 From 5f88ff5e23cd30d28c0f4604cd159d899fde4dc7 Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Sun, 7 May 2017 16:24:57 +0200
4 Subject: [PATCH 118/454] ASoC: bcm2835: Enforce full symmetry
5
6 bcm2835's configuration registers can't be changed when a stream
7 is running, which means asymmetric configurations aren't supported.
8
9 Channel and rate symmetry are already enforced by constraints
10 but samplebits had been missed.
11
12 As hw_params doesn't check for symmetry constraints by itself
13 and just returns success if a stream is running this led to
14 situations where asymmetric configurations were seeming to
15 succeed but of course didn't work because the hardware wasn't
16 configured at all.
17
18 Fix this by adding the missing samplerate symmetry constraint.
19
20 Signed-off-by: Matthias Reichl <hias@horus.com>
21 ---
22 sound/soc/bcm/bcm2835-i2s.c | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25 --- a/sound/soc/bcm/bcm2835-i2s.c
26 +++ b/sound/soc/bcm/bcm2835-i2s.c
27 @@ -783,7 +783,8 @@ static struct snd_soc_dai_driver bcm2835
28 | SNDRV_PCM_FMTBIT_S32_LE
29 },
30 .ops = &bcm2835_i2s_dai_ops,
31 - .symmetric_rates = 1
32 + .symmetric_rates = 1,
33 + .symmetric_samplebits = 1,
34 };
35
36 static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg)