From 136fa4d86ecd6097d58623612bb94e6cd6cfb112 Mon Sep 17 00:00:00 2001 From: Peter Meiser Date: Mon, 26 Oct 2026 06:07:41 +0100 Subject: [PATCH] Fix Waveshare WM8960 microphone capture noise The WM8960 codec was missing regulator supply definitions and DAPM routes required for proper microphone bias handling, resulting in excessive capture noise and poor wake-word detection on Raspberry Pi 4 running LineageOS. - Define all five WM8960 regulator supplies, mapping the digital rails to 3.3 V and speaker rails to 5 V. - Add the missing MICB dependency routes to both left and right boost mixers so DAPM correctly manages the microphone bias generator. These changes improve the captured signal-to-noise ratio and microphone reliability for the Waveshare WM8960 sound card. Refs: https://github.com/raspberrypi/linux/issues/4384 Signed-off-by: Peter Meiser --- arch/arm/boot/dts/overlays/wm8960-soundcard-overlay.dts | 5 ++++- sound/soc/codecs/wm8960.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/wm8960-soundcard-overlay.dts b/arch/arm/boot/dts/overlays/wm8960-soundcard-overlay.dts index c879d4fd89c833..05403b5254758c 100644 --- a/arch/arm/boot/dts/overlays/wm8960-soundcard-overlay.dts +++ b/arch/arm/boot/dts/overlays/wm8960-soundcard-overlay.dts @@ -34,7 +34,10 @@ reg = <0x1a>; #sound-dai-cells = <0>; AVDD-supply = <&vdd_5v0_reg>; - DVDD-supply = <&vdd_3v3_reg>; + DBVDD-supply = <&vdd_3v3_reg>; + DCVDD-supply = <&vdd_3v3_reg>; + SPKVDD1-supply = <&vdd_5v0_reg>; + SPKVDD2-supply = <&vdd_5v0_reg>; clocks = <&wm8960_mclk>; clock-names = "mclk"; }; diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 9a7475cf4c3c97..aa517945699f0c 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -422,6 +422,7 @@ SND_SOC_DAPM_PGA("OUT3 VMID", WM8960_POWER2, 1, 0, NULL, 0), }; static const struct snd_soc_dapm_route audio_paths[] = { + { "Left Boost Mixer", NULL, "MICB"}, { "Left Boost Mixer", "LINPUT1 Switch", "LINPUT1" }, { "Left Boost Mixer", "LINPUT2 Switch", "LINPUT2" }, { "Left Boost Mixer", "LINPUT3 Switch", "LINPUT3" }, @@ -431,6 +432,7 @@ static const struct snd_soc_dapm_route audio_paths[] = { { "Left Input Mixer", NULL, "LINPUT2" }, { "Left Input Mixer", NULL, "LINPUT3" }, + { "Right Boost Mixer", NULL, "MICB"}, { "Right Boost Mixer", "RINPUT1 Switch", "RINPUT1" }, { "Right Boost Mixer", "RINPUT2 Switch", "RINPUT2" }, { "Right Boost Mixer", "RINPUT3 Switch", "RINPUT3" },