Commit 4c30f3c9 authored by Takashi Iwai's avatar Takashi Iwai Committed by Ben Hutchings

ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs

commit c507de88 upstream.

stac_store_hints() does utterly wrong for masking the values for
gpio_dir and gpio_data, likely due to copy&paste errors.  Fortunately,
this feature is used very rarely, so the impact must be really small.
Reported-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 64991747
...@@ -4309,9 +4309,9 @@ static void stac_store_hints(struct hda_codec *codec) ...@@ -4309,9 +4309,9 @@ static void stac_store_hints(struct hda_codec *codec)
spec->gpio_mask; spec->gpio_mask;
} }
if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir)) if (get_int_hint(codec, "gpio_dir", &spec->gpio_dir))
spec->gpio_mask &= spec->gpio_mask;
if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
spec->gpio_dir &= spec->gpio_mask; spec->gpio_dir &= spec->gpio_mask;
if (get_int_hint(codec, "gpio_data", &spec->gpio_data))
spec->gpio_data &= spec->gpio_mask;
if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask)) if (get_int_hint(codec, "eapd_mask", &spec->eapd_mask))
spec->eapd_mask &= spec->gpio_mask; spec->eapd_mask &= spec->gpio_mask;
if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute)) if (get_int_hint(codec, "gpio_mute", &spec->gpio_mute))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment