aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-26 02:17:20 -0400
committerTakashi Iwai <tiwai@suse.de>2012-07-26 02:21:53 -0400
commita3e199732b8e2b272e82cc1ccc49c35239ed6c5a (patch)
tree89ad39e7ec6c17827a60808fb4839bb5a40b7e7e /sound/pci
parentbc733d495267a23ef8660220d696c6e549ce30b3 (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a1596a3b171c..217ee1f344b8 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -101,6 +101,7 @@ enum {
101 STAC_92HD83XXX_HP_cNB11_INTQUAD, 101 STAC_92HD83XXX_HP_cNB11_INTQUAD,
102 STAC_HP_DV7_4000, 102 STAC_HP_DV7_4000,
103 STAC_HP_ZEPHYR, 103 STAC_HP_ZEPHYR,
104 STAC_92HD83XXX_HP_LED,
104 STAC_92HD83XXX_MODELS 105 STAC_92HD83XXX_MODELS
105}; 106};
106 107
@@ -1675,6 +1676,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
1675 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad", 1676 [STAC_92HD83XXX_HP_cNB11_INTQUAD] = "hp_cNB11_intquad",
1676 [STAC_HP_DV7_4000] = "hp-dv7-4000", 1677 [STAC_HP_DV7_4000] = "hp-dv7-4000",
1677 [STAC_HP_ZEPHYR] = "hp-zephyr", 1678 [STAC_HP_ZEPHYR] = "hp-zephyr",
1679 [STAC_92HD83XXX_HP_LED] = "hp-led",
1678}; 1680};
1679 1681
1680static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { 1682static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
@@ -1729,6 +1731,8 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
1729 "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), 1731 "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
1730 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561, 1732 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3561,
1731 "HP", STAC_HP_ZEPHYR), 1733 "HP", STAC_HP_ZEPHYR),
1734 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3660,
1735 "HP Mini", STAC_92HD83XXX_HP_LED),
1732 {} /* terminator */ 1736 {} /* terminator */
1733}; 1737};
1734 1738
@@ -5507,6 +5511,7 @@ static void stac92hd8x_fill_auto_spec(struct hda_codec *codec)
5507static int patch_stac92hd83xxx(struct hda_codec *codec) 5511static int patch_stac92hd83xxx(struct hda_codec *codec)
5508{ 5512{
5509 struct sigmatel_spec *spec; 5513 struct sigmatel_spec *spec;
5514 int default_polarity = -1; /* no default cfg */
5510 int err; 5515 int err;
5511 5516
5512 spec = kzalloc(sizeof(*spec), GFP_KERNEL); 5517 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
@@ -5555,9 +5560,12 @@ again:
5555 case STAC_HP_ZEPHYR: 5560 case STAC_HP_ZEPHYR:
5556 spec->init = stac92hd83xxx_hp_zephyr_init; 5561 spec->init = stac92hd83xxx_hp_zephyr_init;
5557 break; 5562 break;
5563 case STAC_92HD83XXX_HP_LED:
5564 default_polarity = 1;
5565 break;
5558 } 5566 }
5559 5567
5560 if (find_mute_led_cfg(codec, -1/*no default cfg*/)) 5568 if (find_mute_led_cfg(codec, default_polarity))
5561 snd_printd("mute LED gpio %d polarity %d\n", 5569 snd_printd("mute LED gpio %d polarity %d\n",
5562 spec->gpio_led, 5570 spec->gpio_led,
5563 spec->gpio_led_polarity); 5571 spec->gpio_led_polarity);