Re: [PATCH 1/2] ALSA: hda/realtek: Add speaker depop sequence to alc225_shutup
From: Takashi Iwai
Date: Sat Oct 31 2026 - 11:48:16 EST
On Thu, 29 Oct 2026 06:59:44 +0100,
Zhang Heng wrote:
>
> Mute speaker pins and disable their pin widgets, with a 75 ms delay
> after each step, before cutting EAPD in alc225_shutup(). This
> prevents the pop noise that occurs on suspend when the amplifier
> loses its input signal while still powered.
>
> Reported-by: John Doe <coolcrew45@xxxxxxxxxxx>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=221616
> Tested-by: John Doe <coolcrew45@xxxxxxxxxxx>
> Signed-off-by: Zhang Heng <zhangheng@xxxxxxxxxx>
This will be applied to all devices that use ALC225 codec, so the
influence is pretty high. Are you sure that it's the only and best
way to address the problem of the reported device?
thanks,
Takashi
> ---
> sound/hda/codecs/realtek/alc269.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> index 23329d5887a5..67ce5b130f81 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -665,6 +665,7 @@ static void alc225_shutup(struct hda_codec *codec)
> struct alc_spec *spec = codec->spec;
> hda_nid_t hp_pin = alc_get_hp_pin(spec);
> bool hp1_pin_sense, hp2_pin_sense;
> + int i;
>
> if (!hp_pin)
> hp_pin = 0x21;
> @@ -698,6 +699,16 @@ static void alc225_shutup(struct hda_codec *codec)
> alc_update_coef_idx(codec, 0x4a, 3 << 10, 0);
> alc_enable_headset_jack_key(codec);
> }
> +
> + for (i = 0; i < spec->gen.autocfg.speaker_outs; i++)
> + snd_hda_codec_write(codec, spec->gen.autocfg.speaker_pins[i], 0,
> + AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
> + msleep(75);
> + for (i = 0; i < spec->gen.autocfg.speaker_outs; i++)
> + snd_hda_codec_write(codec, spec->gen.autocfg.speaker_pins[i], 0,
> + AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
> + msleep(75);
> +
> alc_auto_setup_eapd(codec, false);
> alc_shutup_pins(codec);
> if (spec->ultra_low_power) {
> --
> 2.25.1
>