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

ALSA: hda/ca0132: 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-8-tiwai@suse.de
parent 37e4fccc
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -3755,22 +3755,12 @@ static void ca0132_gpio_setup(struct hda_codec *codec)

	switch (ca0132_quirk(spec)) {
	case QUIRK_SBZ:
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_DIRECTION, 0x07);
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_MASK, 0x07);
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_DATA, 0x04);
		snd_hda_codec_set_gpio(codec, 0x07, 0x07, 0x04, 0);
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_DATA, 0x06);
		break;
	case QUIRK_R3DI:
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_DIRECTION, 0x1E);
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_MASK, 0x1F);
		snd_hda_codec_write(codec, 0x01, 0,
				AC_VERB_SET_GPIO_DATA, 0x0C);
		snd_hda_codec_set_gpio(codec, 0x1F, 0x1E, 0x0C, 0);
		break;
	default:
		break;