From: Kailang <kailang@realtek.com>
To: "Takashi Iwai" <tiwai@suse.de>,
"Jérémy Bethmont" <jeremy.bethmont@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
"regressions@leemhuis.info" <regressions@leemhuis.info>
Subject: RE: [REGRESSION] Audio popping on ThinkPad X1 Carbon Gen 12 (ALC287) after commit d2e01e0c5e94
Date: Mon, 13 Apr 2026 09:16:07 +0000 [thread overview]
Message-ID: <f59a70ca796b4d09822f514e7f25ac5c@realtek.com> (raw)
In-Reply-To: <871phsrsnf.wl-tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 3792 bytes --]
Hi Jeremy,
You can test attach patch.
BR,
Kailang
-----Original Message-----
From: Takashi Iwai <tiwai@suse.de>
Sent: Tuesday, March 10, 2026 4:33 PM
To: Jérémy Bethmont <jeremy.bethmont@gmail.com>
Cc: Kailang <kailang@realtek.com>; alsa-devel@alsa-project.org; regressions@lists.linux.dev; regressions@leemhuis.info
Subject: Re: [REGRESSION] Audio popping on ThinkPad X1 Carbon Gen 12 (ALC287) after commit d2e01e0c5e94
External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.
On Tue, 10 Mar 2026 09:24:38 +0100,
Jérémy Bethmont wrote:
>
> Hi Takashi,
>
> Thank you for looking into this so quickly.
>
> As requested, I have attached the output of `alsa-info.sh --no-upload`
> from my machine.
>
> Please let me know if you have a proposed patch you would like me to
> test. I am happy to build it and verify if it resolves the popping on
> my hardware.
I guess dropping the alc_process_coef_fw(codec, en_coefs) call at closing would fix your problem while keeping the one at open.
But I'm not sure about any side-effect by that.
Kailang, could you check this?
BTW, when you disable runtime PM, does the pop noise still appears?
thanks,
Takashi
>
> Best regards,
> Jeremy
>
> On Tue, 10 Mar 2026 at 13:47, Takashi Iwai <tiwai@suse.de> wrote:
> >
> > On Tue, 10 Mar 2026 01:01:11 +0100,
> > Jérémy Bethmont wrote:
> > >
> > > Hi Takashi, Kailang,
> > >
> > > I am reporting an audio regression introduced in kernel 6.18.13 on
> > > the Lenovo ThinkPad X1 Carbon Gen 12 (Meteor Lake, Realtek ALC287
> > > codec,
> > > SSID: 0x17aa231e).
> > >
> > > Since this update, the laptop emits a short, noticeable hardware
> > > pop/blip from the speakers exactly when an audio stream closes and
> > > the PCM state suspends. It happens consistently a few seconds
> > > after playback finishes (e.g., after a system notification or
> > > terminal bell).
> > >
> > > I have tracked the regression down to the following commit:
> > > d2e01e0c5e947da0b5005ca89efa82baeb232adc ("ALSA: hda/realtek -
> > > fixed speaker no sound")
> > >
> > > #regzbot introduced: d2e01e0c5e947da0b5005ca89efa82baeb232adc
> > >
> > > Root cause analysis:
> > > The commit modifies the `alc287_alc1318_playback_pcm_hook`
> > > function, adding raw COEF writes to disable/enable AMP silence
> > > detection on HDA_GEN_PCM_ACT_OPEN and HDA_GEN_PCM_ACT_CLOSE.
> > >
> > > Because `alc287_alc1318_playback_pcm_hook` is a shared hook used
> > > by multiple Lenovo ALC287/ALC1318 devices, these unconditional
> > > `WRITE_COEF` instructions are being sent to hardware that does not
> > > need the silence detection fix. On the X1 Carbon Gen 12, executing
> > > `alc_process_coef_fw(codec, en_coefs)` upon stream close triggers
> > > an immediate electrical pop. Monitoring with `pw-mon` confirms the
> > > hardware pop coincides perfectly with the monitor_FR / monitor_FL
> > > ports going idle/suspended.
> > >
> > > Proposed solution:
> > > Could we revert this commit, or alternatively, wrap these specific
> > > silence-detection COEF writes in a targeted `ALC287_FIXUP` quirk
> > > matched via SSID/DMI, rather than executing them globally in the
> > > shared playback hook?
> >
> > Could you give alsa-info.sh output? Run the script with --no-upload
> > option and attach the output.
> >
> > I guess the bug might not be specific to your device but happening
> > in general with all matching ones. As a workaround for such a pop
> > noise, we often need to reorder verbs or put some delay between verbs.
> >
> >
> > Takashi
>
>
>
> --
> Jérémy Bethmont
>
[-- Attachment #2: 0000-x1-gen12-speaker.patch --]
[-- Type: application/octet-stream, Size: 2204 bytes --]
From 95b64bfc26c492ca2fbff1718fdf40f7da499b4c Mon Sep 17 00:00:00 2001
From: Kailang Yang <kailang@realtek.com>
Date: Tue, 12 Nov 2024 14:03:53 +0800
Subject: [PATCH] ALSA: hda/realtek - update set GPIO3 to default for Thinkpad with ALC1318
If user no update BIOS, the speaker will no sound.
This patch support old BIOS to have sound from speaker.
Fixes: 1e707769df07 ("ALSA: hda/realtek - Set GPIO3 to default at S4 state for Thinkpad with ALC1318")
Signed-off-by: Kailang Yang <kailang@realtek.com>
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 74ca0bb6c091..d83b29f9a70f 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7450,7 +7450,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct snd_pcm_substream *substream,
int action)
{
- alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */
switch (action) {
case HDA_GEN_PCM_ACT_OPEN:
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
@@ -7464,7 +7463,6 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
static void alc287_s4_power_gpio3_default(struct hda_codec *codec)
{
if (is_s4_suspend(codec)) {
- alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
}
}
@@ -7473,9 +7471,17 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
+ static const struct coef_fw coefs[] = {
+ WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC300),
+ WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
+ WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301),
+ WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
+ };
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
+ alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
+ alc_process_coef_fw(codec, coefs);
spec->power_hook = alc287_s4_power_gpio3_default;
spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
}
next prev parent reply other threads:[~2026-04-13 9:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 0:01 [REGRESSION] Audio popping on ThinkPad X1 Carbon Gen 12 (ALC287) after commit d2e01e0c5e94 Jérémy Bethmont
2026-03-10 6:47 ` Takashi Iwai
2026-03-10 8:24 ` Jérémy Bethmont
2026-03-10 8:32 ` Takashi Iwai
2026-03-10 9:40 ` Jérémy Bethmont
2026-04-13 9:16 ` Kailang [this message]
2026-04-14 6:37 ` Jérémy Bethmont
2026-04-14 6:43 ` Kailang
2026-04-14 7:23 ` Jérémy Bethmont
2026-04-14 7:39 ` Takashi Iwai
2026-04-14 7:57 ` Kailang
2026-04-14 8:14 ` Takashi Iwai
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=f59a70ca796b4d09822f514e7f25ac5c@realtek.com \
--to=kailang@realtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=jeremy.bethmont@gmail.com \
--cc=regressions@leemhuis.info \
--cc=regressions@lists.linux.dev \
--cc=tiwai@suse.de \
/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