From e2ef36c688d5844a986424c3194bd33212c968ce Mon Sep 17 00:00:00 2001
From: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Date: Tue, 13 Dec 2011 11:47:22 -0200
Subject: [PATCH] ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
Git-commit: e2ef36c688d5844a986424c3194bd33212c968ce
Patch-mainline: 3.2-rc6
References: FATE#313695

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@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_sigmatel.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4921,6 +4921,12 @@ static int find_mute_led_gpio(struct hda
 				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;
+			}
 		}
 
 		/*
