]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda/realtek - fixed speaker no sound update
authorKailang Yang <kailang@realtek.com>
Tue, 14 Apr 2026 07:44:04 +0000 (15:44 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 14 Apr 2026 08:14:44 +0000 (10:14 +0200)
Fixed speaker has pop noise on Lenovo Thinkpad X11 Carbon Gen 12.

Fixes: 630fbc6e870e ("ALSA: hda/realtek - fixed speaker no sound")
Reported-and-tested-by: Jeremy Bethmont <jeremy.bethmont@gmail.com>
Closes: https://lore.kernel.org/CAC88DfsHrhyhy0Pn1O-z9egBvMYu=6NYgcvcC6KCgwh_-Ldkxg@mail.gmail.com
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/realtek/alc269.c

index 0579762a191ad2361b537e9f2e23e11d4485a58c..b33f425763f92aacd9ad54c0c0afec18101efb3a 100644 (file)
@@ -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;