Skip to content

Commit

Permalink
ALSA: hda - Fix Acer Aspire models with analog mics.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dylan Reid authored and Takashi Iwai committed Nov 19, 2012
1 parent 0619ba8 commit 08a978d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -6013,6 +6013,16 @@ static void alc269_fixup_mic2_mute(struct hda_codec *codec,
}
}

static void alc271_hp_gate_mic_jack(struct hda_codec *codec,
const struct alc_fixup *fix,
int action)
{
struct alc_spec *spec = codec->spec;

if (action == ALC_FIXUP_ACT_PROBE)
snd_hda_jack_set_gating_jack(codec, spec->ext_mic_pin,
spec->autocfg.hp_pins[0]);
}

enum {
ALC269_FIXUP_SONY_VAIO,
Expand All @@ -6035,6 +6045,8 @@ enum {
ALC269_FIXUP_INV_DMIC,
ALC269_FIXUP_LENOVO_DOCK,
ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT,
ALC271_FIXUP_AMIC_MIC2,
ALC271_FIXUP_HP_GATE_MIC_JACK,
};

static const struct alc_fixup alc269_fixups[] = {
Expand Down Expand Up @@ -6179,6 +6191,22 @@ static const struct alc_fixup alc269_fixups[] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
},
[ALC271_FIXUP_AMIC_MIC2] = {
.type = ALC_FIXUP_PINS,
.v.pins = (const struct alc_pincfg[]) {
{ 0x14, 0x99130110 }, /* speaker */
{ 0x19, 0x01a19c20 }, /* mic */
{ 0x1b, 0x99a7012f }, /* int-mic */
{ 0x21, 0x0121401f }, /* HP out */
{ }
},
},
[ALC271_FIXUP_HP_GATE_MIC_JACK] = {
.type = ALC_FIXUP_FUNC,
.v.func = alc271_hp_gate_mic_jack,
.chained = true,
.chain_id = ALC271_FIXUP_AMIC_MIC2,
},
};

static const struct snd_pci_quirk alc269_fixup_tbl[] = {
Expand All @@ -6199,6 +6227,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
SND_PCI_QUIRK_VENDOR(0x104d, "Sony VAIO", ALC269_FIXUP_SONY_VAIO),
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
Expand Down

0 comments on commit 08a978d

Please sign in to comment.