ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
PATCH v2 1/1 ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
Some HP laptop models do not have a properly filled OEM string used to set the gpio and polarity of the mute led. Make the mute led configuration work for this case.
---
Em Seg, 2011-12-12 às 17:10 +0100, Takashi Iwai escreveu:
Quoted 5 lines
Yes,
subsytem_idcan be used. OTOH, I guessHP_Mute_LED_P_Gcheck would be easier and may cover more machines. So, I prefer the latter.
Is this ok?
Instead of setting polarity to 1, I can select it by subsystem_id list.
Abraços,
Gustavo
sound/pci/hda/patch_sigmatel.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
sound/pci/hda/patch_sigmatel.c +6 -0
@@ -4929,6 +4929,12 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)set_hp_led_gpio (codec);return 1 ; } +/* BIOS bug: unfilled OEM string */ +if (strstr (dev->name,"HP_Mute_LED_P_G" )) { +set_hp_led_gpio (codec); + spec->gpio_led_polarity =1 ; +return 1 ; + } }/*
Signature · 6 lines
1.7.7.3 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Tue, 13 Dec 2011 11:47:22 -0200,
Quoted 10 lines · Gustavo Maciel Dias Vieira
Some HP laptop models do not have a properly filled OEM string used to set the gpio and polarity of the mute led. Make the mute led configuration work for this case.
Signed-off-by Gustavo Maciel Dias Vieira <[email protected]>---
Em Seg, 2011-12-12 às 17:10 +0100, Takashi Iwai escreveu:
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Yes,
subsytem_idcan be used. OTOH, I guessHP_Mute_LED_P_Gcheck would be easier and may cover more machines. So, I prefer the latter.Is this ok?
Instead of setting polarity to 1, I can select it by
subsystem_idlist.
I think it's OK for now. This can be done changed later once when there are more crappy BIOS than one thinks.
Applied now. Thanks.
Takashi
Quoted 27 lines
Abraços,
Gustavosound/pci/hda/patch_sigmatel.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)sound/pci/hda/patch_sigmatel.c +6
-0@@ -4929,6 +4929,12 @@ static int find_mute_led_gpio(struct hda_codec *codec, int default_polarity)set_hp_led_gpio (codec);return 1 ; } +/* BIOS bug: unfilled OEM string */ +if (strstr (dev->name,"HP_Mute_LED_P_G" )) { +set_hp_led_gpio (codec); + spec->gpio_led_polarity =1 ; +return 1 ; + } }/* Signature · 1 line
1.7.7.3
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel