brcm2708: add kernel 4.14 support
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.14 / 950-0209-ASoC-pcm512x-revert-downstream-changes.patch
1 From ddb523d853a0d64275424f935d8bb6da4af3b4dc Mon Sep 17 00:00:00 2001
2 From: Matthias Reichl <hias@horus.com>
3 Date: Fri, 2 Feb 2018 20:30:41 +0100
4 Subject: [PATCH 209/454] ASoC: pcm512x: revert downstream changes
5
6 This partially reverts commit 185ea05465aac8bf02a0d2b2f4289d42c72870b7
7 which was added by https://github.com/raspberrypi/linux/pull/1152
8
9 The downstream pcm512x changes caused a regression, it broke normal
10 use of the 24bit format with the codec, eg when using simple-audio-card.
11
12 The actual bug with 24bit playback is the incorrect usage
13 of physical_width in various drivers in the downstream tree
14 which causes 24bit data to be transmitted with 32 clock
15 cycles. So it's not the pcm512x that needs fixing, it's the
16 soundcard drivers.
17
18 Signed-off-by: Matthias Reichl <hias@horus.com>
19 ---
20 sound/soc/codecs/pcm512x.c | 3 +--
21 1 file changed, 1 insertion(+), 2 deletions(-)
22
23 --- a/sound/soc/codecs/pcm512x.c
24 +++ b/sound/soc/codecs/pcm512x.c
25 @@ -851,8 +851,7 @@ static int pcm512x_set_dividers(struct s
26 int fssp;
27 int gpio;
28
29 - lrclk_div = snd_pcm_format_physical_width(params_format(params))
30 - * params_channels(params);
31 + lrclk_div = snd_soc_params_to_frame_size(params);
32 if (lrclk_div == 0) {
33 dev_err(dev, "No LRCLK?\n");
34 return -EINVAL;