mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Zhang Heng <zhangheng@kylinos.cn>
Cc: tiwai@suse.com, perex@perex.cz, kailang@realtek.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	John Doe <coolcrew45@disroot.org>
Subject: Re: [PATCH 1/2] ALSA: hda/realtek: Add speaker depop sequence to alc225_shutup
Date: Sat, 31 Oct 2026 16:47:58 +0100	[thread overview]
Message-ID: <874ie1swgh.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261029055945.188723-1-zhangheng@kylinos.cn>

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@disroot.org>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=221616
> Tested-by: John Doe <coolcrew45@disroot.org>
> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>

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
> 

  parent reply	other threads:[~2026-10-31 15:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  5:59 Zhang Heng
2026-10-29  5:59 ` [PATCH 2/2] ALSA: hda/realtek: Convert HP AIO SPK fixup to INIT-stage depop Zhang Heng
2026-10-31 15:47 ` Takashi Iwai [this message]
2026-11-01  8:48   ` [PATCH 1/2] ALSA: hda/realtek: Add speaker depop sequence to alc225_shutup Zhang Heng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ie1swgh.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=coolcrew45@disroot.org \
    --cc=kailang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=zhangheng@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®