Skip to content

Commit 80a6ec7

Browse files
wensmripard
authored andcommitted
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: de34485 ("clk: sunxi-ng: sun4i: Use sigma-delta modulation for audio PLL") Cc: <stable@vger.kernel.org> # 4.15.x Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
1 parent 5b394b2 commit 80a6ec7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/clk/sunxi-ng/ccu-sun4i-a10.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,8 +1434,16 @@ static void __init sun4i_ccu_init(struct device_node *node,
14341434
return;
14351435
}
14361436

1437-
/* Force the PLL-Audio-1x divider to 1 */
14381437
val = readl(reg + SUN4I_PLL_AUDIO_REG);
1438+
1439+
/*
1440+
* Force VCO and PLL bias current to lowest setting. Higher
1441+
* settings interfere with sigma-delta modulation and result
1442+
* in audible noise and distortions when using SPDIF or I2S.
1443+
*/
1444+
val &= ~GENMASK(25, 16);
1445+
1446+
/* Force the PLL-Audio-1x divider to 1 */
14391447
val &= ~GENMASK(29, 26);
14401448
writel(val | (1 << 26), reg + SUN4I_PLL_AUDIO_REG);
14411449

0 commit comments

Comments
 (0)