summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-06-07 11:53:44 +0100
committerMark Brown <broonie@kernel.org>2022-06-07 11:53:44 +0100
commit2947683c534e45090b669bda06123201ff950c49 (patch)
tree33d8036b29cd0d8ea7c00ad91fae2bd5747e9ef7
parent88406aa6dbbbb3a1752b130f14b47218a2251f3a (diff)
parentfed3d9297a9bf8b342c034e74a1fdba6940fe84a (diff)
downloadlwn-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.c7
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);