ALSA: hda/realtek: Fix speakers on ASUS ExpertBook PM3606CHA

The internal speakers of the ASUS ExpertBook PM3606CHA (Realtek ALC256,
PCI SSID 1043:3501) stay silent with the default codec setup, and the
headphone jack is not detected either.  The codec needs COEF values that
differ from its power-on defaults: COEF 0x10, 0x16, 0x35, 0x37 and 0x57
on NID 0x20 have to be set to the values used by the Windows driver.
Toggling the codec GPIOs, and the existing ALC256 fixups alone, make no
difference.

Apply the COEFs from a new fixup at the INIT action, so that they are
restored after resume as well.  Chain to ALC256_FIXUP_ASUS_MIC_NO_PRESENCE
to keep the headset mic and the jack detection working, which the
fallback pin quirk provided before for this machine.

The COEF values were found by the reporter of the Ubuntu bug below, who
compared the codec state against the one under the Windows driver.

Tested on an ASUS ExpertBook PM3606CHA (BIOS PM3606CHA.304) with the
change applied to v7.2.5: with this fixup alone, the speakers, the
headphones with jack detection, and the headset mic all work, also
after suspend and resume.

Link: https://bugs.launchpad.net/bugs/2167288
Signed-off-by: Saim Masood <s.m.saim074@gmail.com>
Link: https://patch.msgid.link/065927dd-cabf-449a-992d-64887eedda01@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Saim Masood 2026-09-19 05:07:09 +05:00 committed by Takashi Iwai
parent 767b90004d
commit 556cca74b6

View File

@ -3579,6 +3579,27 @@ static void alc233_fixup_no_audio_jack(struct hda_codec *codec,
alc_process_coef_fw(codec, alc233_fixup_no_audio_jack_coefs);
}
static const struct coef_fw alc256_asus_speaker_coefs[] = {
WRITE_COEF(0x10, 0x7f20), WRITE_COEF(0x16, 0x0c50), WRITE_COEF(0x35, 0x8d6a),
WRITE_COEF(0x37, 0xfe06), WRITE_COEF(0x57, 0x7f7f),
{}
};
static void alc256_fixup_asus_speaker_coefs(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
{
/*
* The internal speakers of the ASUS ExpertBook PM3606CHA stay silent
* with the default COEF values. These are the values set by the
* Windows driver. They are applied on every init so that they are
* restored after resume, too.
*/
if (action != HDA_FIXUP_ACT_INIT)
return;
alc_process_coef_fw(codec, alc256_asus_speaker_coefs);
}
static void alc256_fixup_mic_no_presence_and_resume(struct hda_codec *codec,
const struct hda_fixup *fix,
int action)
@ -4429,6 +4450,7 @@ enum {
ALC285_LENOVO_DAC_RENAME,
ALC287_FIXUP_YOGA9_SPEAKER2_TO_DAC1,
ALC256_FIXUP_IPASON_SMARTBOOK_S1,
ALC256_FIXUP_ASUS_SPEAKER_COEFS,
};
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@ -7203,6 +7225,12 @@ static const struct hda_fixup alc269_fixups[] = {
{ }
},
},
[ALC256_FIXUP_ASUS_SPEAKER_COEFS] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc256_fixup_asus_speaker_coefs,
.chained = true,
.chain_id = ALC256_FIXUP_ASUS_MIC_NO_PRESENCE,
},
};
static const struct hda_quirk alc269_fixup_tbl[] = {
@ -7969,6 +7997,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x31e1, "ASUS B5605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x31f1, "ASUS B3605CCA", ALC294_FIXUP_ASUS_CS35L41_SPI_2),
SND_PCI_QUIRK(0x1043, 0x3391, "ASUS PM3606CKA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x3501, "ASUS PM3606CHA", ALC256_FIXUP_ASUS_SPEAKER_COEFS),
SND_PCI_QUIRK(0x1043, 0x3601, "ASUS PM5406CGA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x3611, "ASUS PM5606CGA", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1043, 0x3701, "ASUS P5406CCA", ALC245_FIXUP_CS35L41_SPI_2),