summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-14 16:52:00 +0200
committerTakashi Iwai <tiwai@suse.de>2012-05-15 08:58:38 +0200
commit7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0 (patch)
treea98f20e72a9f343f8491befbe6806f26fef3559b /sound/pci
parent8c7dd8907637d863bdd175f24e895cbcfe03e1e5 (diff)
downloadlinux-3.10-7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0.tar.gz
linux-3.10-7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0.tar.bz2
linux-3.10-7560931fbd0a7cb86b8cb06f363c5e4984f4f7d0.zip
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')
-rw-r--r--sound/pci/hda/patch_sigmatel.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index b04179be620..0669149a92f 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)
val = snd_hda_get_bool_hint(codec, "eapd_switch");
if (val >= 0)
spec->eapd_switch = val;
- get_int_hint(codec, "gpio_led_polarity", &spec->gpio_led_polarity);
- if (get_int_hint(codec, "gpio_led", &spec->gpio_led)) {
- spec->gpio_mask |= spec->gpio_led;
- spec->gpio_dir |= spec->gpio_led;
- if (spec->gpio_led_polarity)
- spec->gpio_data |= spec->gpio_led;
- }
}
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)
struct sigmatel_spec *spec = codec->spec;
const struct dmi_device *dev = NULL;
+ if (get_int_hint(codec, "gpio_led", &spec->gpio_led)) {
+ get_int_hint(codec, "gpio_led_polarity",
+ &spec->gpio_led_polarity);
+ return 1;
+ }
if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) {
while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
NULL, dev))) {