Commit a3e19973 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210

BIOS on HP Mini 210 doesn't provide the proper "HP_Mute_LED" DMI
string, thus the driver doesn't initialize the GPIO, too.  In the
earlier kernel, the driver falls back to GPIO1, but since 3.3 we've
stopped this due to other wrongly advertised machines.

For fixing this particular case, add a new model type to specify the
default polarity explicitly so that the fallback to GPIO1 is handled.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923

Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent bc733d49
...@@ -101,6 +101,7 @@ enum { ...@@ -101,6 +101,7 @@ enum {
STAC_92HD83XXX_HP_cNB11_INTQUAD, STAC_92HD83XXX_HP_cNB11_INTQUAD,
STAC_HP_DV7_4000, STAC_HP_DV7_4000,
STAC_HP_ZEPHYR, STAC_HP_ZEPHYR,
STAC_92HD83XXX_HP_LED,
STAC_92HD83XXX_MODELS STAC_92HD83XXX_MODELS
}; };
...@@ -1675,6 +1676,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = { ...@@ -1675,6 +1676,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
[STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad",
[STAC_HP_DV7_4000] = "hp-dv7-4000", [STAC_HP_DV7_4000] = "hp-dv7-4000",
[STAC_HP_ZEPHYR] = "hp-zephyr", [STAC_HP_ZEPHYR] = "hp-zephyr",
[STAC_92HD83XXX_HP_LED] = "hp-led",
}; };
static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
...@@ -1729,6 +1731,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { ...@@ -1729,6 +1731,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561, SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561,
"HP", STAC_HP_ZEPHYR), "HP", STAC_HP_ZEPHYR),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660,
"HP Mini", STAC_92HD83XXX_HP_LED),
{} /* terminator */ {} /* terminator */
}; };
...@@ -5507,6 +5511,7 @@ static void stac92hd8x_fill_auto_spec(struct hda_codec *codec) ...@@ -5507,6 +5511,7 @@ static void stac92hd8x_fill_auto_spec(struct hda_codec *codec)
static int patch_stac92hd83xxx(struct hda_codec *codec) static int patch_stac92hd83xxx(struct hda_codec *codec)
{ {
struct sigmatel_spec *spec; struct sigmatel_spec *spec;
int default_polarity = -1; /* no default cfg */
int err; int err;
spec = kzalloc(sizeof(*spec), GFP_KERNEL); spec = kzalloc(sizeof(*spec), GFP_KERNEL);
...@@ -5555,9 +5560,12 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) ...@@ -5555,9 +5560,12 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
case STAC_HP_ZEPHYR: case STAC_HP_ZEPHYR:
spec->init = stac92hd83xxx_hp_zephyr_init; spec->init = stac92hd83xxx_hp_zephyr_init;
break; break;
case STAC_92HD83XXX_HP_LED:
default_polarity = 1;
break;
} }
if (find_mute_led_cfg(codec, -1/*no default cfg*/)) if (find_mute_led_cfg(codec, default_polarity))
snd_printd("mute LED gpio %d polarity %d\n", snd_printd("mute LED gpio %d polarity %d\n",
spec->gpio_led, spec->gpio_led,
spec->gpio_led_polarity); spec->gpio_led_polarity);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment