[alsa-devel] [PATCH v2] ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
Takashi Iwai
tiwai at suse.de
Tue Dec 13 14:56:24 CET 2011
At Tue, 13 Dec 2011 11:47:22 -0200,
Gustavo Maciel Dias Vieira wrote:
>
> 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 <gustavo at sagui.org>
> ---
>
> Em Seg, 2011-12-12 às 17:10 +0100, Takashi Iwai escreveu:
> >
> > Yes, subsytem_id can be used. OTOH, I guess HP_Mute_LED_P_G check
> > 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.
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
>
> Abraços,
> Gustavo
>
> sound/pci/hda/patch_sigmatel.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
> index eeb25d52..616678f 100644
> --- a/sound/pci/hda/patch_sigmatel.c
> +++ b/sound/pci/hda/patch_sigmatel.c
> @@ -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;
> + }
> }
>
> /*
> --
> 1.7.7.3
>
More information about the Alsa-devel
mailing list