aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2012-11-19 01:56:40 -0500
committerTakashi Iwai <tiwai@suse.de>2012-11-19 13:50:34 -0500
commit08a978db518dfceb37998bc74a7fed03540cfd08 (patch)
tree32bed50058ca13b7473aed793551f6c2ceaacac4 /sound/pci/hda
parent0619ba8c17b121ef0273be181198659b17d84247 (diff)
ALSA: hda - Fix Acer Aspire models with analog mics.
The Acer Aspire AO756 has an analog built-in mic on nid 0x1b and an external mic on nid 0x19. The BIOS doesn't set this up. The mic detect on this Acer Aspire netbook and Acer C7 ChromeBook is only valid when the headphone is plugged. The detect circuit relies on the tip detect switch being closed on the jack. Tell hda_jack to ignore the mic sense unless the headphones are plugged. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_realtek.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 89737ae49152..fe99176a35f1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6013,6 +6013,16 @@ static void alc269_fixup_mic2_mute(struct hda_codec *codec,
6013 } 6013 }
6014} 6014}
6015 6015
6016static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
6017 const struct alc_fixup *fix,
6018 int action)
6019{
6020 struct alc_spec *spec = codec->spec;
6021
6022 if (action == ALC_FIXUP_ACT_PROBE)
6023 snd_hda_jack_set_gating_jack(codec, spec->ext_mic_pin,
6024 spec->autocfg.hp_pins[0]);
6025}
6016 6026
6017enum { 6027enum {
6018 ALC269_FIXUP_SONY_VAIO, 6028 ALC269_FIXUP_SONY_VAIO,
@@ -6035,6 +6045,8 @@ enum {
6035 ALC269_FIXUP_INV_DMIC, 6045 ALC269_FIXUP_INV_DMIC,
6036 ALC269_FIXUP_LENOVO_DOCK, 6046 ALC269_FIXUP_LENOVO_DOCK,
6037 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, 6047 ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
6048 ALC271_FIXUP_AMIC_MIC2,
6049 ALC271_FIXUP_HP_GATE_MIC_JACK,
6038}; 6050};
6039 6051
6040static const struct alc_fixup alc269_fixups[] = { 6052static const struct alc_fixup alc269_fixups[] = {
@@ -6179,6 +6191,22 @@ static const struct alc_fixup alc269_fixups[] = {
6179 .type = ALC_FIXUP_FUNC, 6191 .type = ALC_FIXUP_FUNC,
6180 .v.func = alc269_fixup_pincfg_no_hp_to_lineout, 6192 .v.func = alc269_fixup_pincfg_no_hp_to_lineout,
6181 }, 6193 },
6194 [ALC271_FIXUP_AMIC_MIC2] = {
6195 .type = ALC_FIXUP_PINS,
6196 .v.pins = (const struct alc_pincfg[]) {
6197 { 0x14, 0x99130110 }, /* speaker */
6198 { 0x19, 0x01a19c20 }, /* mic */
6199 { 0x1b, 0x99a7012f }, /* int-mic */
6200 { 0x21, 0x0121401f }, /* HP out */
6201 { }
6202 },
6203 },
6204 [ALC271_FIXUP_HP_GATE_MIC_JACK] = {
6205 .type = ALC_FIXUP_FUNC,
6206 .v.func = alc271_hp_gate_mic_jack,
6207 .chained = true,
6208 .chain_id = ALC271_FIXUP_AMIC_MIC2,
6209 },
6182}; 6210};
6183 6211
6184static const struct snd_pci_quirk alc269_fixup_tbl[] = { 6212static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6199,6 +6227,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
6199 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), 6227 SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
6200 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO), 6228 SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
6201 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z), 6229 SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
6230 SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
6202 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC), 6231 SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
6203 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK), 6232 SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
6204 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE), 6233 SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),