Skip to content

Commit 322f74e

Browse files
jason77-wangtiwai
authored andcommitted
ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines
There is a headset jack on the front panel, when we plug a headset into it, the headset mic can't trigger unsol events, and read_pin_sense() can't detect its presence too. So add this fixup to fix this issue. Cc: <[email protected]> Signed-off-by: Hui Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 1e9a328 commit 322f74e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

sound/pci/hda/patch_conexant.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ enum {
271271
CXT_FIXUP_HP_SPECTRE,
272272
CXT_FIXUP_HP_GATE_MIC,
273273
CXT_FIXUP_MUTE_LED_GPIO,
274+
CXT_FIXUP_HEADSET_MIC,
275+
CXT_FIXUP_HP_MIC_NO_PRESENCE,
274276
};
275277

276278
/* for hda_fixup_thinkpad_acpi() */
@@ -350,6 +352,18 @@ static void cxt_fixup_headphone_mic(struct hda_codec *codec,
350352
}
351353
}
352354

355+
static void cxt_fixup_headset_mic(struct hda_codec *codec,
356+
const struct hda_fixup *fix, int action)
357+
{
358+
struct conexant_spec *spec = codec->spec;
359+
360+
switch (action) {
361+
case HDA_FIXUP_ACT_PRE_PROBE:
362+
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
363+
break;
364+
}
365+
}
366+
353367
/* OPLC XO 1.5 fixup */
354368

355369
/* OLPC XO-1.5 supports DC input mode (e.g. for use with analog sensors)
@@ -880,6 +894,19 @@ static const struct hda_fixup cxt_fixups[] = {
880894
.type = HDA_FIXUP_FUNC,
881895
.v.func = cxt_fixup_mute_led_gpio,
882896
},
897+
[CXT_FIXUP_HEADSET_MIC] = {
898+
.type = HDA_FIXUP_FUNC,
899+
.v.func = cxt_fixup_headset_mic,
900+
},
901+
[CXT_FIXUP_HP_MIC_NO_PRESENCE] = {
902+
.type = HDA_FIXUP_PINS,
903+
.v.pins = (const struct hda_pintbl[]) {
904+
{ 0x1a, 0x02a1113c },
905+
{ }
906+
},
907+
.chained = true,
908+
.chain_id = CXT_FIXUP_HEADSET_MIC,
909+
},
883910
};
884911

885912
static const struct snd_pci_quirk cxt5045_fixups[] = {
@@ -934,6 +961,8 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
934961
SND_PCI_QUIRK(0x103c, 0x8115, "HP Z1 Gen3", CXT_FIXUP_HP_GATE_MIC),
935962
SND_PCI_QUIRK(0x103c, 0x814f, "HP ZBook 15u G3", CXT_FIXUP_MUTE_LED_GPIO),
936963
SND_PCI_QUIRK(0x103c, 0x822e, "HP ProBook 440 G4", CXT_FIXUP_MUTE_LED_GPIO),
964+
SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
965+
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
937966
SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
938967
SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
939968
SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),

0 commit comments

Comments
 (0)