diff options
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e2f83591161b..92b9b4324372 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -417,9 +417,11 @@ static void stac_update_outputs(struct hda_codec *codec) | |||
417 | val &= ~spec->eapd_mask; | 417 | val &= ~spec->eapd_mask; |
418 | else | 418 | else |
419 | val |= spec->eapd_mask; | 419 | val |= spec->eapd_mask; |
420 | if (spec->gpio_data != val) | 420 | if (spec->gpio_data != val) { |
421 | spec->gpio_data = val; | ||
421 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, | 422 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, |
422 | val); | 423 | val); |
424 | } | ||
423 | } | 425 | } |
424 | } | 426 | } |
425 | 427 | ||
@@ -3231,7 +3233,7 @@ static const struct hda_fixup stac927x_fixups[] = { | |||
3231 | /* configure the analog microphone on some laptops */ | 3233 | /* configure the analog microphone on some laptops */ |
3232 | { 0x0c, 0x90a79130 }, | 3234 | { 0x0c, 0x90a79130 }, |
3233 | /* correct the front output jack as a hp out */ | 3235 | /* correct the front output jack as a hp out */ |
3234 | { 0x0f, 0x0227011f }, | 3236 | { 0x0f, 0x0221101f }, |
3235 | /* correct the front input jack as a mic */ | 3237 | /* correct the front input jack as a mic */ |
3236 | { 0x0e, 0x02a79130 }, | 3238 | { 0x0e, 0x02a79130 }, |
3237 | {} | 3239 | {} |
@@ -3612,20 +3614,18 @@ static int stac_parse_auto_config(struct hda_codec *codec) | |||
3612 | static int stac_init(struct hda_codec *codec) | 3614 | static int stac_init(struct hda_codec *codec) |
3613 | { | 3615 | { |
3614 | struct sigmatel_spec *spec = codec->spec; | 3616 | struct sigmatel_spec *spec = codec->spec; |
3615 | unsigned int gpio; | ||
3616 | int i; | 3617 | int i; |
3617 | 3618 | ||
3618 | /* override some hints */ | 3619 | /* override some hints */ |
3619 | stac_store_hints(codec); | 3620 | stac_store_hints(codec); |
3620 | 3621 | ||
3621 | /* set up GPIO */ | 3622 | /* set up GPIO */ |
3622 | gpio = spec->gpio_data; | ||
3623 | /* turn on EAPD statically when spec->eapd_switch isn't set. | 3623 | /* turn on EAPD statically when spec->eapd_switch isn't set. |
3624 | * otherwise, unsol event will turn it on/off dynamically | 3624 | * otherwise, unsol event will turn it on/off dynamically |
3625 | */ | 3625 | */ |
3626 | if (!spec->eapd_switch) | 3626 | if (!spec->eapd_switch) |
3627 | gpio |= spec->eapd_mask; | 3627 | spec->gpio_data |= spec->eapd_mask; |
3628 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, gpio); | 3628 | stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); |
3629 | 3629 | ||
3630 | snd_hda_gen_init(codec); | 3630 | snd_hda_gen_init(codec); |
3631 | 3631 | ||
@@ -3915,6 +3915,7 @@ static void stac_setup_gpio(struct hda_codec *codec) | |||
3915 | { | 3915 | { |
3916 | struct sigmatel_spec *spec = codec->spec; | 3916 | struct sigmatel_spec *spec = codec->spec; |
3917 | 3917 | ||
3918 | spec->gpio_mask |= spec->eapd_mask; | ||
3918 | if (spec->gpio_led) { | 3919 | if (spec->gpio_led) { |
3919 | if (!spec->vref_mute_led_nid) { | 3920 | if (!spec->vref_mute_led_nid) { |
3920 | spec->gpio_mask |= spec->gpio_led; | 3921 | spec->gpio_mask |= spec->gpio_led; |