This is a note to let you know that I've just added the patch titled ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek) to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d5b6b65e75ce607c2734227524e11574317a1c1a Mon Sep 17 00:00:00 2001 From: David Henningsson <david.henningsson@xxxxxxxxxxxxx> Date: Wed, 6 Nov 2013 10:50:44 +0100 Subject: ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek) From: David Henningsson <david.henningsson@xxxxxxxxxxxxx> commit d5b6b65e75ce607c2734227524e11574317a1c1a upstream. Some HP machines with Realtek codecs have mute LEDs connected to VREF pins. However when these go into runtime suspend, the pin powers down and its pin control is disabled, thus disabling the LED too. This patch fixes that issue by making sure that the pin stays in D0 with correct pin control. BugLink: https://bugs.launchpad.net/bugs/1248465 Tested-by: Franz Hsieh <franz.hsieh@xxxxxxxxxxxxx> Signed-off-by: David Henningsson <david.henningsson@xxxxxxxxxxxxx> Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/pci/hda/patch_realtek.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2765,6 +2765,23 @@ static void alc269_fixup_mic_mute_hook(v snd_hda_set_pin_ctl_cache(codec, spec->mute_led_nid, pinval); } +/* Make sure the led works even in runtime suspend */ +static unsigned int led_power_filter(struct hda_codec *codec, + hda_nid_t nid, + unsigned int power_state) +{ + struct alc_spec *spec = codec->spec; + + if (power_state != AC_PWRST_D3 || nid != spec->mute_led_nid) + return power_state; + + /* Set pin ctl again, it might have just been set to 0 */ + snd_hda_set_pin_ctl(codec, nid, + snd_hda_codec_get_pin_target(codec, nid)); + + return AC_PWRST_D0; +} + static void alc269_fixup_hp_mute_led(struct hda_codec *codec, const struct hda_fixup *fix, int action) { @@ -2784,6 +2801,7 @@ static void alc269_fixup_hp_mute_led(str spec->mute_led_nid = pin - 0x0a + 0x18; spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; spec->gen.vmaster_mute_enum = 1; + codec->power_filter = led_power_filter; snd_printd("Detected mute LED for %x:%d\n", spec->mute_led_nid, spec->mute_led_polarity); break; @@ -2799,6 +2817,7 @@ static void alc269_fixup_hp_mute_led_mic spec->mute_led_nid = 0x18; spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; spec->gen.vmaster_mute_enum = 1; + codec->power_filter = led_power_filter; } } @@ -2811,6 +2830,7 @@ static void alc269_fixup_hp_mute_led_mic spec->mute_led_nid = 0x19; spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; spec->gen.vmaster_mute_enum = 1; + codec->power_filter = led_power_filter; } } Patches currently in stable-queue which might be from david.henningsson@xxxxxxxxxxxxx are queue-3.10/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch queue-3.10/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch queue-3.10/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html