* [PATCH] ALSA: hda/realtek: Fix speaker dropouts on MSI GE66 Raider 11UE
@ 2026-09-09 19:31 Andrew Udvare
2026-09-10 15:55 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Udvare @ 2026-09-09 19:31 UTC (permalink / raw)
To: Takashi Iwai, Jaroslav Kysela; +Cc: linux-sound, linux-kernel, Andrew Udvare
The speakers on this laptop are driven by a Realtek ALC1316 smart amplifier
sitting behind the ALC298 processing-coefficient tunnel. Nothing configures
it, so it runs on its power-up defaults with silence detection enabled: the
speaker path is muted after roughly 0.2 s of quiet and takes roughly 0.4 s
to reopen. Anything arriving in that window is lost, so the beginning of
every sound that follows a pause is cut off. It is most obvious with speech
synthesis, where the first syllable of each utterance disappears, but it
affects music equally. Headphones do not pass through the amplifier and are
never affected.
Measured on the affected machine with generated tones: isolated 150 ms
bursts spaced one second apart are inaudible, the same bursts spaced 100 ms
apart are heard, and a continuous tone loses only its first 0.4 s.
Add a fixup that programs the amplifier's initialisation sequence at codec
init, which turns silence detection off. Writes go through the tunnel with
coefficient 0x22 selecting the amplifier, 0x23 carrying the 16-bit
register, 0x24 and 0x25 the value's high and low halves, and 0x26
committing.
Link: https://github.com/thesofproject/sof/issues/5842
Signed-off-by: Andrew Udvare <audvare@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 50 +++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index ecc9c6e6a..8f55c3c00 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1840,6 +1840,48 @@ struct alc298_samsung_amp_desc {
unsigned short init_seq[2][2];
};
+/*
+ * The MSI GE66 Raider 11UE drives its speakers through a Realtek ALC1316 smart
+ * amplifier, reached over the ALC298 coefficient tunnel. Left unconfigured the
+ * amplifier's silence detection mutes the speaker path after about 0.2 s of
+ * quiet and takes about 0.4 s to reopen, so the start of every sound that
+ * follows a pause is lost. Headphones do not pass through the amplifier and are
+ * unaffected.
+ *
+ * Tunnel layout for ALC286/ALC298: coefficient 0x22 selects the amplifier, 0x23
+ * carries the 16-bit register, 0x24 and 0x25 the value's high and low halves,
+ * and 0x26 commits. Bit 4 of the commit word is a self-clearing go bit.
+ */
+static void alc298_fixup_alc1316_amp(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ static const unsigned short init_seq[][2] = {
+ { 0x0000, 0x01 }, { 0xc001, 0x14 }, { 0xc003, 0x00 }, { 0xc004, 0x11 },
+ { 0xc005, 0x00 }, { 0xc006, 0x00 }, { 0xc007, 0x11 }, { 0xc008, 0x11 },
+ { 0xc009, 0x00 }, { 0xc730, 0x06 }, { 0xc612, 0x16 }, { 0xc00f, 0xf7 },
+ { 0xc00a, 0xd8 }, { 0xc00b, 0xb7 }, { 0xc60b, 0xff }, { 0xc60c, 0x37 },
+ { 0xc605, 0xf0 }, { 0xc020, 0x00 }, { 0xc022, 0xd6 }, { 0xc023, 0x00 },
+ { 0xc025, 0xd6 }, { 0xc602, 0x07 }, { 0xc603, 0x07 }, { 0xd101, 0x00 },
+ { 0xc093, 0x80 }, { 0xc090, 0x87 }, { 0xc091, 0x11 }, { 0xc614, 0x20 },
+ { 0xc615, 0x0a }, { 0xc616, 0x02 }, { 0xc617, 0x00 }, { 0xc050, 0x80 },
+ { 0xc051, 0x7f }, { 0xc052, 0x00 }, { 0xc053, 0x70 }, { 0xc054, 0x00 },
+ { 0xc0a2, 0x01 }, { 0xc09d, 0x80 }, { 0xc09c, 0x71 }
+ };
+ int i;
+
+ if (action != HDA_FIXUP_ACT_INIT)
+ return;
+
+ alc_write_coef_idx(codec, 0x22, 0x0010);
+
+ for (i = 0; i < ARRAY_SIZE(init_seq); i++) {
+ alc_write_coef_idx(codec, 0x23, init_seq[i][0]);
+ alc_write_coef_idx(codec, 0x24, 0x0000);
+ alc_write_coef_idx(codec, 0x25, init_seq[i][1]);
+ alc_write_coef_idx(codec, 0x26, 0xb031);
+ }
+}
+
static void alc298_fixup_samsung_amp(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -4211,6 +4253,7 @@ enum {
ALC236_FIXUP_HP_15_FD0XXX,
ALC236_FIXUP_LENOVO_INV_DMIC,
ALC298_FIXUP_SAMSUNG_AMP,
+ ALC298_FIXUP_MSI_GE66_ALC1316_AMP,
ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS,
ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS,
ALC298_FIXUP_LG_GRAM_STYLE_14,
@@ -6006,6 +6049,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc295_fixup_hp_pavilion_mute_led_1b,
},
+ [ALC298_FIXUP_MSI_GE66_ALC1316_AMP] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc298_fixup_alc1316_amp,
+ },
[ALC298_FIXUP_SAMSUNG_AMP] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc298_fixup_samsung_amp,
@@ -7933,6 +7980,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x144d, 0xc1cc, "Samsung Galaxy Book3 Ultra (NT960XFH)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS),
SND_PCI_QUIRK(0x1458, 0x900e, "Gigabyte G5 KF5 (2023)", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_HEADSET_MIC),
+ SND_PCI_QUIRK(0x1462, 0x12fb, "MSI GE66 Raider 11UE",
+ ALC298_FIXUP_MSI_GE66_ALC1316_AMP),
SND_PCI_QUIRK(0x1462, 0xb120, "MSI Cubi MS-B120", ALC283_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1462, 0xb171, "Cubi N 8GL (MS-B171)", ALC283_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK),
@@ -8515,6 +8564,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC298_FIXUP_HUAWEI_MBX_STEREO, .name = "huawei-mbx-stereo"},
{.id = ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE, .name = "alc256-medion-headset"},
{.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
+ {.id = ALC298_FIXUP_MSI_GE66_ALC1316_AMP, .name = "alc298-alc1316-amp"},
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
{.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda/realtek: Fix speaker dropouts on MSI GE66 Raider 11UE
2026-09-09 19:31 [PATCH] ALSA: hda/realtek: Fix speaker dropouts on MSI GE66 Raider 11UE Andrew Udvare
@ 2026-09-10 15:55 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-09-10 15:55 UTC (permalink / raw)
To: Andrew Udvare; +Cc: Takashi Iwai, Jaroslav Kysela, linux-sound, linux-kernel
On Wed, 09 Sep 2026 21:31:04 +0200,
Andrew Udvare wrote:
>
> The speakers on this laptop are driven by a Realtek ALC1316 smart amplifier
> sitting behind the ALC298 processing-coefficient tunnel. Nothing configures
> it, so it runs on its power-up defaults with silence detection enabled: the
> speaker path is muted after roughly 0.2 s of quiet and takes roughly 0.4 s
> to reopen. Anything arriving in that window is lost, so the beginning of
> every sound that follows a pause is cut off. It is most obvious with speech
> synthesis, where the first syllable of each utterance disappears, but it
> affects music equally. Headphones do not pass through the amplifier and are
> never affected.
>
> Measured on the affected machine with generated tones: isolated 150 ms
> bursts spaced one second apart are inaudible, the same bursts spaced 100 ms
> apart are heard, and a continuous tone loses only its first 0.4 s.
>
> Add a fixup that programs the amplifier's initialisation sequence at codec
> init, which turns silence detection off. Writes go through the tunnel with
> coefficient 0x22 selecting the amplifier, 0x23 carrying the 16-bit
> register, 0x24 and 0x25 the value's high and low halves, and 0x26
> committing.
>
> Link: https://github.com/thesofproject/sof/issues/5842
> Signed-off-by: Andrew Udvare <audvare@gmail.com>
As it's a non-trivial change, I applied to for-next branch (for 7.4).
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-10 15:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-09 19:31 [PATCH] ALSA: hda/realtek: Fix speaker dropouts on MSI GE66 Raider 11UE Andrew Udvare
2026-09-10 15:55 ` Takashi Iwai
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®