Mute LEDs turn off when on battery mode (HP / Realtek)
Bug #1248465 reported by
David Henningsson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Undecided
|
David Henningsson |
Bug Description
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.
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-saucy removed: verification-needed-saucy |
To post a comment you must log in.
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.
Cc: <email address hidden> /bugs.launchpad .net/bugs/ 1248465 pci/hda/ patch_realtek. c | 20 +++++++ +++++++ ++++++
BugLink: https:/
Tested-by: Franz Hsieh <email address hidden>
Signed-off-by: David Henningsson <email address hidden>
---
sound/
1 file changed, 20 insertions(+)
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c fixup_mic_ mute_hook( void *private_data, int enabled) hda_set_ pin_ctl_ cache(codec, spec->mute_led_nid, pinval);
index a51f48c..0acbe82 100644
--- a/sound/
+++ b/sound/
@@ -2955,6 +2955,23 @@ static void alc269_
snd_
}
+/* Make sure the led works even in runtime suspend */ filter( struct hda_codec *codec, set_pin_ ctl(codec, nid, codec_get_ pin_target( codec, nid)); fixup_hp_ mute_led( struct hda_codec *codec, fixup_hp_ mute_led( struct hda_codec *codec, >mute_led_ nid = pin - 0x0a + 0x18; >gen.vmaster_ mute.hook = alc269_ fixup_mic_ mute_hook; >gen.vmaster_ mute_enum = 1; printd( "Detected mute LED for %x:%d\n", spec->mute_led_nid,
spec->mute_ led_polarity) ; fixup_hp_ mute_led_ mic1(struct hda_codec *codec, >mute_led_ nid = 0x18; >gen.vmaster_ mute.hook = alc269_ fixup_mic_ mute_hook; >gen.vmaster_ mute_enum = 1;
+static unsigned int led_power_
+ 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_
+ snd_hda_
+
+ return AC_PWRST_D0;
+}
+
static void alc269_
const struct hda_fixup *fix, int action)
{
@@ -2974,6 +2991,7 @@ static void alc269_
spec-
spec-
spec-
+ codec->power_filter = led_power_filter;
snd_
break;
@@ -2989,6 +3007,7 @@ static void alc269_
spec-
spec-
spec-
+ codec->power_filter = led_power_filter;
}
}
@@ -3001,6 +3020,7 @@ static void alc269_ fixup_hp_ mute_led_ mic2(struct hda_codec *codec, >mute_led_ nid = 0x19; >gen.vmaster_ mute.hook = alc269_ fixup_mic_ mute_hook; >gen.vmaster_ mute_enum = 1;
spec-
spec-
spec-
+ codec->power_filter = led_power_filter;
}
}
--
1.7.9.5