Skip to content

Commit

Permalink
ASoC: nau8825: fix bug in FLL parameter
Browse files Browse the repository at this point in the history
BugLink: http://bugs.launchpad.net/bugs/1637517

commit a8961ca 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>

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
  • Loading branch information
John-Hsu authored and Luis Henriques committed Nov 8, 2016
1 parent 61f06b0 commit 1177899
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/nau8825.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1177899

Please sign in to comment.