Commit 37e4fccc authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda/sigmatel: Clean up with the new GPIO helper



Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-7-tiwai@suse.de
parent 735b3739
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -309,15 +309,7 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask,
	/* Configure GPIOx as CMOS */
	snd_hda_codec_write(codec, fg, 0, 0x7e7, 0);

	snd_hda_codec_write(codec, fg, 0,
			    AC_VERB_SET_GPIO_MASK, gpiomask);
	snd_hda_codec_write_sync(codec, fg, 0,
			   AC_VERB_SET_GPIO_DIRECTION, gpiodir); /* sync */

	msleep(1);

	snd_hda_codec_write_sync(codec, fg, 0,
			   AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */
	snd_hda_codec_set_gpio(codec, gpiomask, gpiodir, gpiostate, 1);
}

/* hook for controlling mic-mute LED GPIO */