diff options
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 3556408d6ece..6345df131a00 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1608,7 +1608,7 @@ static const struct snd_pci_quirk stac92hd73xx_codec_id_cfg_tbl[] = { | |||
1608 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x043a, | 1608 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x043a, |
1609 | "Alienware M17x", STAC_ALIENWARE_M17X), | 1609 | "Alienware M17x", STAC_ALIENWARE_M17X), |
1610 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, | 1610 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490, |
1611 | "Alienware M17x", STAC_ALIENWARE_M17X), | 1611 | "Alienware M17x R3", STAC_DELL_EQ), |
1612 | {} /* terminator */ | 1612 | {} /* terminator */ |
1613 | }; | 1613 | }; |
1614 | 1614 | ||
@@ -4163,13 +4163,15 @@ static int enable_pin_detect(struct hda_codec *codec, hda_nid_t nid, | |||
4163 | return 1; | 4163 | return 1; |
4164 | } | 4164 | } |
4165 | 4165 | ||
4166 | static int is_nid_hp_pin(struct auto_pin_cfg *cfg, hda_nid_t nid) | 4166 | static int is_nid_out_jack_pin(struct auto_pin_cfg *cfg, hda_nid_t nid) |
4167 | { | 4167 | { |
4168 | int i; | 4168 | int i; |
4169 | for (i = 0; i < cfg->hp_outs; i++) | 4169 | for (i = 0; i < cfg->hp_outs; i++) |
4170 | if (cfg->hp_pins[i] == nid) | 4170 | if (cfg->hp_pins[i] == nid) |
4171 | return 1; /* nid is a HP-Out */ | 4171 | return 1; /* nid is a HP-Out */ |
4172 | 4172 | for (i = 0; i < cfg->line_outs; i++) | |
4173 | if (cfg->line_out_pins[i] == nid) | ||
4174 | return 1; /* nid is a line-Out */ | ||
4173 | return 0; /* nid is not a HP-Out */ | 4175 | return 0; /* nid is not a HP-Out */ |
4174 | }; | 4176 | }; |
4175 | 4177 | ||
@@ -4375,7 +4377,7 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4375 | continue; | 4377 | continue; |
4376 | } | 4378 | } |
4377 | 4379 | ||
4378 | if (is_nid_hp_pin(cfg, nid)) | 4380 | if (is_nid_out_jack_pin(cfg, nid)) |
4379 | continue; /* already has an unsol event */ | 4381 | continue; /* already has an unsol event */ |
4380 | 4382 | ||
4381 | pinctl = snd_hda_codec_read(codec, nid, 0, | 4383 | pinctl = snd_hda_codec_read(codec, nid, 0, |
@@ -4868,7 +4870,14 @@ static int find_mute_led_cfg(struct hda_codec *codec, int default_polarity) | |||
4868 | /* BIOS bug: unfilled OEM string */ | 4870 | /* BIOS bug: unfilled OEM string */ |
4869 | if (strstr(dev->name, "HP_Mute_LED_P_G")) { | 4871 | if (strstr(dev->name, "HP_Mute_LED_P_G")) { |
4870 | set_hp_led_gpio(codec); | 4872 | set_hp_led_gpio(codec); |
4871 | spec->gpio_led_polarity = 1; | 4873 | switch (codec->subsystem_id) { |
4874 | case 0x103c148a: | ||
4875 | spec->gpio_led_polarity = 0; | ||
4876 | break; | ||
4877 | default: | ||
4878 | spec->gpio_led_polarity = 1; | ||
4879 | break; | ||
4880 | } | ||
4872 | return 1; | 4881 | return 1; |
4873 | } | 4882 | } |
4874 | } | 4883 | } |
@@ -5069,9 +5078,9 @@ static int stac92xx_update_led_status(struct hda_codec *codec) | |||
5069 | spec->gpio_dir, spec->gpio_data); | 5078 | spec->gpio_dir, spec->gpio_data); |
5070 | } else { | 5079 | } else { |
5071 | notmtd_lvl = spec->gpio_led_polarity ? | 5080 | notmtd_lvl = spec->gpio_led_polarity ? |
5072 | AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_GRD; | 5081 | AC_PINCTL_VREF_50 : AC_PINCTL_VREF_GRD; |
5073 | muted_lvl = spec->gpio_led_polarity ? | 5082 | muted_lvl = spec->gpio_led_polarity ? |
5074 | AC_PINCTL_VREF_GRD : AC_PINCTL_VREF_HIZ; | 5083 | AC_PINCTL_VREF_GRD : AC_PINCTL_VREF_50; |
5075 | spec->vref_led = muted ? muted_lvl : notmtd_lvl; | 5084 | spec->vref_led = muted ? muted_lvl : notmtd_lvl; |
5076 | stac_vrefout_set(codec, spec->vref_mute_led_nid, | 5085 | stac_vrefout_set(codec, spec->vref_mute_led_nid, |
5077 | spec->vref_led); | 5086 | spec->vref_led); |