diff options
author | John Hsu <KCHSU0@nuvoton.com> | 2016-09-13 11:56:03 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-22 12:40:24 +0200 |
commit | 9b3aaaa8d6a0a61f84b394d29c7c8653641a5924 (patch) | |
tree | 7a4db4a24cd413388cbf89519b85848d654a126c | |
parent | 9119232cc92a269d7860b4aa51f07d3923a3cc10 (diff) |
ASoC: nau8825: fix bug in FLL parameter
commit a8961cae29c38e225120c40c3340dbde2f552e60 upstream.
In the FLL parameter calculation, the FVCO should choose the maximum one.
The patch is to fix the bug about the wrong FVCO chosen.
Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | sound/soc/codecs/nau8825.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 2e59a85e360b..ff566376da40 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1907,7 +1907,7 @@ static int nau8825_calc_fll_param(unsigned int fll_in, unsigned int fs, /* Calculate the FLL 10-bit integer input and the FLL 16-bit fractional * input based on FDCO, FREF and FLL ratio. */ - fvco = div_u64(fvco << 16, fref * fll_param->ratio); + fvco = div_u64(fvco_max << 16, fref * fll_param->ratio); fll_param->fll_int = (fvco >> 16) & 0x3FF; fll_param->fll_frac = fvco & 0xFFFF; return 0; |