]>
Commit | Line | Data |
---|---|---|
2425ddcb GKH |
1 | From e73694d871867cae8471d2350ce89acb38bc2b63 Mon Sep 17 00:00:00 2001 |
2 | From: Nikesh Oswal <Nikesh.Oswal@cirrus.com> | |
3 | Date: Wed, 23 Dec 2015 14:18:05 +0000 | |
4 | Subject: ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz | |
5 | ||
6 | From: Nikesh Oswal <Nikesh.Oswal@cirrus.com> | |
7 | ||
8 | commit e73694d871867cae8471d2350ce89acb38bc2b63 upstream. | |
9 | ||
10 | For a sample rate of 12kHz the bclk was taken from the 44.1kHz table as | |
11 | we test for a multiple of 8kHz. This patch fixes this issue by testing | |
12 | for multiples of 4kHz instead. | |
13 | ||
14 | Signed-off-by: Nikesh Oswal <Nikesh.Oswal@cirrus.com> | |
15 | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | |
16 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | ||
19 | --- | |
20 | sound/soc/codecs/arizona.c | 2 +- | |
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
22 | ||
23 | --- a/sound/soc/codecs/arizona.c | |
24 | +++ b/sound/soc/codecs/arizona.c | |
25 | @@ -1057,7 +1057,7 @@ static int arizona_hw_params(struct snd_ | |
26 | int chan_limit = arizona->pdata.max_channels_clocked[dai->id - 1]; | |
27 | int bclk, lrclk, wl, frame, bclk_target; | |
28 | ||
29 | - if (params_rate(params) % 8000) | |
30 | + if (params_rate(params) % 4000) | |
31 | rates = &arizona_44k1_bclk_rates[0]; | |
32 | else | |
33 | rates = &arizona_48k_bclk_rates[0]; |