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

Commit df73d83f authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixup



The ALC660VD_FIX_ASUS_GPIO1 quirk requires to set up GPIO bit0 ON
while bit 1 OFF.  Implement the fixup function and convert from the
static init verbs.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d44a6864
Loading
Loading
Loading
Loading
+13 −8
Original line number Original line Diff line number Diff line
@@ -7354,16 +7354,21 @@ static void alc861vd_fixup_dallas(struct hda_codec *codec,
	}
	}
}
}


static const struct hda_fixup alc861vd_fixups[] = {
	[ALC660VD_FIX_ASUS_GPIO1] = {
		.type = HDA_FIXUP_VERBS,
		.v.verbs = (const struct hda_verb[]) {
/* reset GPIO1 */
/* reset GPIO1 */
			{0x01, AC_VERB_SET_GPIO_MASK, 0x03},
static void alc660vd_fixup_asus_gpio1(struct hda_codec *codec,
			{0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
				      const struct hda_fixup *fix, int action)
			{0x01, AC_VERB_SET_GPIO_DATA, 0x01},
{
			{ }
	struct alc_spec *spec = codec->spec;

	if (action == HDA_FIXUP_ACT_PRE_PROBE)
		spec->gpio_mask |= 0x02;
	alc_fixup_gpio(codec, action, 0x01);
}
}

static const struct hda_fixup alc861vd_fixups[] = {
	[ALC660VD_FIX_ASUS_GPIO1] = {
		.type = HDA_FIXUP_FUNC,
		.v.func = alc660vd_fixup_asus_gpio1,
	},
	},
	[ALC861VD_FIX_DALLAS] = {
	[ALC861VD_FIX_DALLAS] = {
		.type = HDA_FIXUP_FUNC,
		.type = HDA_FIXUP_FUNC,