summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-26 10:36:12 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-26 10:36:12 +0100
commit043958e602ac2cbf918c0dab1e4e2a7f9751ebf6 (patch)
tree760ae6f9d6e574fc9a5d3f24ce4cc6b423466c3f
parent15e7f8b92aed71819411025279cd3df37f8c636b (diff)
ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
gpio_led, gpio_led_polarity and gpio_mute are added now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_sigmatel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 247be19e17b8..69dd5a4e52f2 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -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)