Skip to content

Commit 6779120

Browse files
committed
ALSA: hda/realtek - Fix unexpected init_amp override
The commit 1c76aa5 ("ALSA: hda/realtek - Allow skipping spec->init_amp detection") changed the way to assign spec->init_amp field that specifies the way to initialize the amp. Along with the change, the commit also replaced a few fixups that set spec->init_amp in HDA_FIXUP_ACT_PROBE with HDA_FIXUP_ACT_PRE_PROBE. This was rather aligning to the other fixups, and not supposed to change the actual behavior. However, this change turned out to cause a regression on FSC S7020, which hit exactly the above. The reason was that there is still one place that overrides spec->init_amp after HDA_FIXUP_ACT_PRE_PROBE call, namely in alc_ssid_check(). This patch fixes the regression by adding the proper spec->init_amp override check, i.e. verifying whether it's still ALC_INIT_UNDEFINED. Fixes: 1c76aa5 ("ALSA: hda/realtek - Allow skipping spec->init_amp detection") Cc: <[email protected]> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207329 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 1c82679 commit 6779120

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -797,9 +797,11 @@ static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports)
797797
{
798798
if (!alc_subsystem_id(codec, ports)) {
799799
struct alc_spec *spec = codec->spec;
800-
codec_dbg(codec,
801-
"realtek: Enable default setup for auto mode as fallback\n");
802-
spec->init_amp = ALC_INIT_DEFAULT;
800+
if (spec->init_amp == ALC_INIT_UNDEFINED) {
801+
codec_dbg(codec,
802+
"realtek: Enable default setup for auto mode as fallback\n");
803+
spec->init_amp = ALC_INIT_DEFAULT;
804+
}
803805
}
804806
}
805807

0 commit comments

Comments
 (0)