diff options
author | Mark Brown <broonie@kernel.org> | 2022-06-07 11:53:44 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-07 11:53:44 +0100 |
commit | 2947683c534e45090b669bda06123201ff950c49 (patch) | |
tree | 33d8036b29cd0d8ea7c00ad91fae2bd5747e9ef7 | |
parent | 88406aa6dbbbb3a1752b130f14b47218a2251f3a (diff) | |
parent | fed3d9297a9bf8b342c034e74a1fdba6940fe84a (diff) | |
download | lwn-2947683c534e45090b669bda06123201ff950c49.tar.gz lwn-2947683c534e45090b669bda06123201ff950c49.zip |
Switch to use internal PLL for iMCLK
Merge series from Hui Wang <hui.wang@canonical.com>:
Taking your advice and try to enable internal PLL to get a more
accurate sample rate. And I also changed the fsl-asoc-card.c to support
the nau8822 codec, now the sound quality is pretty good on my imx6sx
EVB.
-rw-r--r-- | sound/soc/codecs/nau8822.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c index f4f68b549e1a..3907d1dd8cee 100644 --- a/sound/soc/codecs/nau8822.c +++ b/sound/soc/codecs/nau8822.c @@ -730,6 +730,13 @@ static int nau8822_set_pll(struct snd_soc_dai *dai, int pll_id, int source, freq_out == pll_param->freq_out) return 0; + if (freq_out == 0) { + dev_dbg(component->dev, "PLL disabled\n"); + snd_soc_component_update_bits(component, + NAU8822_REG_POWER_MANAGEMENT_1, NAU8822_PLL_EN_MASK, NAU8822_PLL_OFF); + return 0; + } + fs = freq_out / 256; ret = nau8822_calc_pll(freq_in, fs, pll_param); |