Commit 95f74c41b2e53f541f2f66c8ba3dac1601ebd409
1 parent
161ebf295e
Exists in
master
and in
16 other branches
ALSA: hda - Fix mute LED on HP laptops in runtime suspend
When HP laptops with mute and mic-record LEDs go to runtime suspend, these LEDs are turned on forcibly no matter whether GPIO pis are on or off. This strange behavior seems triggered by resetting the HD-audio bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to avoid the link reset at runtime suspend and set it for these HP machines. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 3 changed files with 6 additions and 2 deletions Side-by-side Diff
sound/pci/hda/hda_codec.h
... | ... | @@ -698,6 +698,7 @@ |
698 | 698 | unsigned int in_reset:1; /* during reset operation */ |
699 | 699 | unsigned int power_keep_link_on:1; /* don't power off HDA link */ |
700 | 700 | unsigned int no_response_fallback:1; /* don't fallback at RIRB error */ |
701 | + unsigned int avoid_link_reset:1; /* don't reset link at runtime PM */ | |
701 | 702 | |
702 | 703 | int primary_dig_out_type; /* primary digital out PCM type */ |
703 | 704 | }; |
sound/pci/hda/hda_intel.c
... | ... | @@ -2986,7 +2986,8 @@ |
2986 | 2986 | STATESTS_INT_MASK); |
2987 | 2987 | |
2988 | 2988 | azx_stop_chip(chip); |
2989 | - azx_enter_link_reset(chip); | |
2989 | + if (!chip->bus->avoid_link_reset) | |
2990 | + azx_enter_link_reset(chip); | |
2990 | 2991 | azx_clear_irq_pending(chip); |
2991 | 2992 | if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) |
2992 | 2993 | hda_display_power(false); |
sound/pci/hda/patch_sigmatel.c
... | ... | @@ -2091,8 +2091,10 @@ |
2091 | 2091 | { |
2092 | 2092 | struct sigmatel_spec *spec = codec->spec; |
2093 | 2093 | |
2094 | - if (action == HDA_FIXUP_ACT_PRE_PROBE) | |
2094 | + if (action == HDA_FIXUP_ACT_PRE_PROBE) { | |
2095 | 2095 | spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ |
2096 | + codec->bus->avoid_link_reset = 1; | |
2097 | + } | |
2096 | 2098 | } |
2097 | 2099 | |
2098 | 2100 | static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec, |