Skip to content

Commit 5af2902

Browse files
KailangYangtiwai
authored andcommitted
ALSA: hda/realtek - Add Headset Mic supported for HP cPC
HP ALC671 need to support Headset Mic. Signed-off-by: Kailang Yang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent d662117 commit 5af2902

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8484,6 +8484,29 @@ static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,
84848484
}
84858485
}
84868486

8487+
static void alc671_fixup_hp_headset_mic2(struct hda_codec *codec,
8488+
const struct hda_fixup *fix, int action)
8489+
{
8490+
struct alc_spec *spec = codec->spec;
8491+
8492+
static const struct hda_pintbl pincfgs[] = {
8493+
{ 0x19, 0x02a11040 }, /* use as headset mic, with its own jack detect */
8494+
{ 0x1b, 0x0181304f },
8495+
{ }
8496+
};
8497+
8498+
switch (action) {
8499+
case HDA_FIXUP_ACT_PRE_PROBE:
8500+
spec->gen.mixer_nid = 0;
8501+
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
8502+
snd_hda_apply_pincfgs(codec, pincfgs);
8503+
break;
8504+
case HDA_FIXUP_ACT_INIT:
8505+
alc_write_coef_idx(codec, 0x19, 0xa054);
8506+
break;
8507+
}
8508+
}
8509+
84878510
static const struct coef_fw alc668_coefs[] = {
84888511
WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
84898512
WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
@@ -8557,6 +8580,7 @@ enum {
85578580
ALC662_FIXUP_LENOVO_MULTI_CODECS,
85588581
ALC669_FIXUP_ACER_ASPIRE_ETHOS,
85598582
ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET,
8583+
ALC671_FIXUP_HP_HEADSET_MIC2,
85608584
};
85618585

85628586
static const struct hda_fixup alc662_fixups[] = {
@@ -8898,6 +8922,10 @@ static const struct hda_fixup alc662_fixups[] = {
88988922
.chained = true,
88998923
.chain_id = ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET
89008924
},
8925+
[ALC671_FIXUP_HP_HEADSET_MIC2] = {
8926+
.type = HDA_FIXUP_FUNC,
8927+
.v.func = alc671_fixup_hp_headset_mic2,
8928+
},
89018929
};
89028930

89038931
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -9080,6 +9108,22 @@ static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = {
90809108
{0x12, 0x90a60130},
90819109
{0x14, 0x90170110},
90829110
{0x15, 0x0321101f}),
9111+
SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
9112+
{0x14, 0x01014010},
9113+
{0x17, 0x90170150},
9114+
{0x1b, 0x01813030},
9115+
{0x21, 0x02211020}),
9116+
SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
9117+
{0x14, 0x01014010},
9118+
{0x18, 0x01a19040},
9119+
{0x1b, 0x01813030},
9120+
{0x21, 0x02211020}),
9121+
SND_HDA_PIN_QUIRK(0x10ec0671, 0x103c, "HP cPC", ALC671_FIXUP_HP_HEADSET_MIC2,
9122+
{0x14, 0x01014020},
9123+
{0x17, 0x90170110},
9124+
{0x18, 0x01a19050},
9125+
{0x1b, 0x01813040},
9126+
{0x21, 0x02211030}),
90839127
{}
90849128
};
90859129

0 commit comments

Comments
 (0)