Skip to content

Commit

Permalink
ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
Browse files Browse the repository at this point in the history
gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 26, 2009
1 parent 15e7f8b commit 043958e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4184,9 +4184,23 @@ static void stac_store_hints(struct hda_codec *codec)
p = snd_hda_get_hint(codec, "eapd_mask");
if (p)
spec->eapd_mask = simple_strtoul(p, NULL, 0) & spec->gpio_mask;
p = snd_hda_get_hint(codec, "gpio_mute");
if (p)
spec->gpio_mute = simple_strtoul(p, NULL, 0) & spec->gpio_mask;
val = snd_hda_get_bool_hint(codec, "eapd_switch");
if (val >= 0)
spec->eapd_switch = val;
p = snd_hda_get_hint(codec, "gpio_led_polarity");
if (p)
spec->gpio_led_polarity = simple_strtoul(p, NULL, 0);
p = snd_hda_get_hint(codec, "gpio_led");
if (p) {
spec->gpio_led = simple_strtoul(p, NULL, 0);
spec->gpio_mask |= spec->gpio_led;
spec->gpio_dir |= spec->gpio_led;
if (spec->gpio_led_polarity)
spec->gpio_data |= spec->gpio_led;
}
}

static int stac92xx_init(struct hda_codec *codec)
Expand Down

0 comments on commit 043958e

Please sign in to comment.