Skip to contentSkip to conversation

clk: sunxi-ng: sun4i: Set VCO and PLL bias current to lowest setting

PATCH New Chen-Yu Tsai 2 participants 2 messages Sep 6, 2018 – Sep 7, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: sunxi-ng: sun4i: Set VCO and PLL bias current to lowest setting

The default mid-level PLL bias current setting interferes with sigma delta modulation. This manifests as decreased audio quality at lower sampling rates, which sounds like radio broadcast quality, and distortion noises at sampling rates at 48 kHz or above.

Changing the bias current settings to the lowest gets rid of the noise.

Fixes de3448519194 ("clk: sunxi-ng: sun4i: Use sigma-delta modulation

for audio PLL")

---
 drivers/clk/sunxi-ng/ccu-sun4i-a10.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun4i-a10.c +9 -1
index ffa5dac221e4..129ebd2588fd 100644
@@ -1434,8 +1434,16 @@ static void __init sun4i_ccu_init(struct device_node *node,
 		return;
 	}
 
-	/* Force the PLL-Audio-1x divider to 1 */
 	val = readl(reg + SUN4I_PLL_AUDIO_REG);
+
+	/*
+	 * Force VCO and PLL bias current to lowest setting. Higher
+	 * settings interfere with sigma-delta modulation and result
+	 * in audible noise and distortions when using SPDIF or I2S.
+	 */
+	val &= ~GENMASK(25, 16);
+
+	/* Force the PLL-Audio-1x divider to 1 */
 	val &= ~GENMASK(29, 26);
 	writel(val | (1 << 26), reg + SUN4I_PLL_AUDIO_REG);
 
Signature · 1 line
2.19.0.rc1
#1 lore raw

PATCH 1/1 clk: sunxi-ng: sun4i: Set VCO and PLL bias current to lowest setting

Quoted 5 lines · Chen-Yu Tsai

The default mid-level PLL bias current setting interferes with sigma delta modulation. This manifests as decreased audio quality at lower sampling rates, which sounds like radio broadcast quality, and distortion noises at sampling rates at 48 kHz or above.

Quoted 7 lines

Changing the bias current settings to the lowest gets rid of the noise.

Fixes de3448519194 ("clk: sunxi-ng: sun4i: Use sigma-delta modulation

for audio PLL")

Applied, thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180907/3af44284/attachment.sig>