Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f720bb9 authored by Herton Ronaldo Krzesinski's avatar Herton Ronaldo Krzesinski Committed by Takashi Iwai
Browse files

ALSA: hda/realtek - Fix detection of ALC271X codec

In commit af741c15 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
always after fixup"), alc_auto_parse_customize_define was moved after
detection of ALC271X.

The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
and it's set on alc_auto_parse_customize_define.

Move the alc_auto_parse_customize_define and its required fixup setup
before the block doing the ALC271X and other codec setup.

BugLink: https://bugs.launchpad.net/bugs/1006690


Signed-off-by: default avatarHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Reviewed-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e4db0952
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -6307,6 +6307,12 @@ static int patch_alc269(struct hda_codec *codec)

	spec = codec->spec;

	alc_pick_fixup(codec, alc269_fixup_models,
		       alc269_fixup_tbl, alc269_fixups);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);

	alc_auto_parse_customize_define(codec);

	if (codec->vendor_id == 0x10ec0269) {
		spec->codec_variant = ALC269_TYPE_ALC269VA;
		switch (alc_get_coef0(codec) & 0x00f0) {
@@ -6334,12 +6340,6 @@ static int patch_alc269(struct hda_codec *codec)
		alc269_fill_coef(codec);
	}

	alc_pick_fixup(codec, alc269_fixup_models,
		       alc269_fixup_tbl, alc269_fixups);
	alc_apply_fixup(codec, ALC_FIXUP_ACT_PRE_PROBE);

	alc_auto_parse_customize_define(codec);

	/* automatic parse from the BIOS config */
	err = alc269_parse_auto_config(codec);
	if (err < 0)