brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0065-ASoC-wm8804-Implement-MCLK-configuration-options-add.patch
1 From e83ad608ca30c502633123ce317f7451491951c0 Mon Sep 17 00:00:00 2001
2 From: Daniel Matuschek <info@crazy-audio.com>
3 Date: Wed, 15 Jan 2014 21:41:23 +0100
4 Subject: [PATCH 065/381] ASoC: wm8804: Implement MCLK configuration options,
5 add 32bit support WM8804 can run with PLL frequencies of 256xfs and 128xfs
6 for most sample rates. At 192kHz only 128xfs is supported. The existing
7 driver selects 128xfs automatically for some lower samples rates. By using an
8 additional mclk_div divider, it is now possible to control the behaviour.
9 This allows using 256xfs PLL frequency on all sample rates up to 96kHz. It
10 should allow lower jitter and better signal quality. The behavior has to be
11 controlled by the sound card driver, because some sample frequency share the
12 same setting. e.g. 192kHz and 96kHz use 24.576MHz master clock. The only
13 difference is the MCLK divider.
14
15 This also added support for 32bit data.
16
17 Signed-off-by: Daniel Matuschek <daniel@matuschek.net>
18 ---
19 sound/soc/codecs/wm8804.c | 3 ++-
20 1 file changed, 2 insertions(+), 1 deletion(-)
21
22 --- a/sound/soc/codecs/wm8804.c
23 +++ b/sound/soc/codecs/wm8804.c
24 @@ -304,6 +304,7 @@ static int wm8804_hw_params(struct snd_p
25 blen = 0x1;
26 break;
27 case 24:
28 + case 32:
29 blen = 0x2;
30 break;
31 default:
32 @@ -515,7 +516,7 @@ static const struct snd_soc_dai_ops wm88
33 };
34
35 #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
36 - SNDRV_PCM_FMTBIT_S24_LE)
37 + SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
38
39 #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
40 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \