From: Kailang <kailang@realtek.com>
To: "Jérémy Bethmont" <jeremy.bethmont@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
"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: Tue, 14 Apr 2026 06:43:56 +0000 [thread overview]
Message-ID: <658f53ada52f4de9a0c852dd56554a2a@realtek.com> (raw)
In-Reply-To: <CAC88DftEBEEEvODGUZzkry+kgAm=SfH=PAsxwu+SABMBMRMs=Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5039 bytes --]
Sorry!! Attached wrong file.
Attached again.
-----Original Message-----
From: Jérémy Bethmont <jeremy.bethmont@gmail.com>
Sent: Tuesday, April 14, 2026 2:37 PM
To: Kailang <kailang@realtek.com>
Cc: Takashi Iwai <tiwai@suse.de>; 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.
Hi Kailang,
Thank you for the patch. However, I believe you may have attached the wrong file by mistake.
The attached patch ("0000-x1-gen12-speaker.patch") is dated November 12, 2024. Its commit message mentions fixing an issue with older BIOS versions.
Could you please double-check?
Best regards,
Jeremy
On Mon, 13 Apr 2026 at 16:16, Kailang <kailang@realtek.com> wrote:
>
> 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
> >
--
Jérémy Bethmont
[-- Attachment #2: 0000-x1-gen12-speaker-pop.patch --]
[-- Type: application/octet-stream, Size: 1934 bytes --]
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 2cf1cc3cb91c..72d19f180881 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -3654,22 +3654,11 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct snd_pcm_substream *substream,
int action)
{
- static const struct coef_fw dis_coefs[] = {
- WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
- WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
- }; /* Disable AMP silence detection */
- static const struct coef_fw en_coefs[] = {
- WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
- WRITE_COEF(0x28, 0x0084), WRITE_COEF(0x29, 0xb023),
- }; /* Enable AMP silence detection */
-
switch (action) {
case HDA_GEN_PCM_ACT_OPEN:
- alc_process_coef_fw(codec, dis_coefs);
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x954f); /* write gpio3 to high */
break;
case HDA_GEN_PCM_ACT_CLOSE:
- alc_process_coef_fw(codec, en_coefs);
alc_write_coefex_idx(codec, 0x5a, 0x00, 0x554f); /* write gpio3 as default value */
break;
}
@@ -3692,10 +3681,15 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC301),
WRITE_COEF(0x28, 0x0001), WRITE_COEF(0x29, 0xb023),
};
+ static const struct coef_fw dis_coefs[] = {
+ WRITE_COEF(0x24, 0x0013), WRITE_COEF(0x25, 0x0000), WRITE_COEF(0x26, 0xC203),
+ WRITE_COEF(0x28, 0x0004), WRITE_COEF(0x29, 0xb023),
+ }; /* Disable AMP silence detection */
if (action != HDA_FIXUP_ACT_PRE_PROBE)
return;
alc_update_coef_idx(codec, 0x10, 1<<11, 1<<11);
+ alc_process_coef_fw(codec, dis_coefs);
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-14 6:44 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
2026-04-14 6:37 ` Jérémy Bethmont
2026-04-14 6:43 ` Kailang [this message]
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=658f53ada52f4de9a0c852dd56554a2a@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