struct senary_spec *spec = codec->spec;
unsigned int mask = spec->gpio_mute_led_mask | spec->gpio_mic_led_mask;
- if (mask) {
- snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_MASK,
- mask);
- snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_DIRECTION,
- mask);
- snd_hda_codec_write(codec, codec->core.afg, 0, AC_VERB_SET_GPIO_DATA,
- spec->gpio_led);
- }
+ if (mask)
+ snd_hda_codec_set_gpio(codec, mask, mask, spec->gpio_led, 0);
}
static int senary_init(struct hda_codec *codec)