diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-05-14 10:52:00 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-15 02:58:38 -0400 |
commit | 7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0 (patch) | |
tree | a98f20e72a9f343f8491befbe6806f26fef3559b /sound/pci/hda | |
parent | 8c7dd8907637d863bdd175f24e895cbcfe03e1e5 (diff) |
ALSA: hda - Evaluate gpio_led hints at the right moment
The hints regarding the mute-LED must be evaluated during the codec
parsing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index b04179be6205..0669149a92fc 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4232,13 +4232,6 @@ static void stac_store_hints(struct hda_codec *codec) | |||
4232 | val = snd_hda_get_bool_hint(codec, "eapd_switch"); | 4232 | val = snd_hda_get_bool_hint(codec, "eapd_switch"); |
4233 | if (val >= 0) | 4233 | if (val >= 0) |
4234 | spec->eapd_switch = val; | 4234 | spec->eapd_switch = val; |
4235 | get_int_hint(codec, "gpio_led_polarity", &spec->gpio_led_polarity); | ||
4236 | if (get_int_hint(codec, "gpio_led", &spec->gpio_led)) { | ||
4237 | spec->gpio_mask |= spec->gpio_led; | ||
4238 | spec->gpio_dir |= spec->gpio_led; | ||
4239 | if (spec->gpio_led_polarity) | ||
4240 | spec->gpio_data |= spec->gpio_led; | ||
4241 | } | ||
4242 | } | 4235 | } |
4243 | 4236 | ||
4244 | static void stac_issue_unsol_events(struct hda_codec *codec, int num_pins, | 4237 | static void stac_issue_unsol_events(struct hda_codec *codec, int num_pins, |
@@ -4843,6 +4836,11 @@ static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) | |||
4843 | struct sigmatel_spec *spec = codec->spec; | 4836 | struct sigmatel_spec *spec = codec->spec; |
4844 | const struct dmi_device *dev = NULL; | 4837 | const struct dmi_device *dev = NULL; |
4845 | 4838 | ||
4839 | if (get_int_hint(codec, "gpio_led", &spec->gpio_led)) { | ||
4840 | get_int_hint(codec, "gpio_led_polarity", | ||
4841 | &spec->gpio_led_polarity); | ||
4842 | return 1; | ||
4843 | } | ||
4846 | if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) { | 4844 | if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) { |
4847 | while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, | 4845 | while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, |
4848 | NULL, dev))) { | 4846 | NULL, dev))) { |