Commit 3e1fab33 authored by Eric Millbrandt's avatar Eric Millbrandt Committed by Ben Hutchings

ASoC: wm8978: pll incorrectly configured when codec is master

commit 55c6f4cb upstream.

When MCLK is supplied externally and BCLK and LRC are configured as outputs
(codec is master), the PLL values are only calculated correctly on the first
transmission.  On subsequent transmissions, at differenct sample rates, the
wrong PLL values are used.  Test for f_opclk instead of f_pllout to determine
if the PLL values are needed.
Signed-off-by: default avatarEric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 3686bdea
...@@ -749,7 +749,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream, ...@@ -749,7 +749,7 @@ static int wm8978_hw_params(struct snd_pcm_substream *substream,
wm8978->mclk_idx = -1; wm8978->mclk_idx = -1;
f_sel = wm8978->f_mclk; f_sel = wm8978->f_mclk;
} else { } else {
if (!wm8978->f_pllout) { if (!wm8978->f_opclk) {
/* We only enter here, if OPCLK is not used */ /* We only enter here, if OPCLK is not used */
int ret = wm8978_configure_pll(codec); int ret = wm8978_configure_pll(codec);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment