Skip to content

Commit 4bf5bf5

Browse files
edward-ptiwai
authored andcommitted
ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
Lenovo TianYi510Pro-14IOB (17aa:3742) require quirk for enabling headset-mic Signed-off-by: Edward Pacman <[email protected]> Cc: <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216756 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 696b66a commit 4bf5bf5

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10999,6 +10999,17 @@ static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
1099910999
}
1100011000
}
1100111001

11002+
static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec,
11003+
const struct hda_fixup *fix, int action)
11004+
{
11005+
struct alc_spec *spec = codec->spec;
11006+
11007+
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
11008+
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
11009+
spec->gen.hp_automute_hook = alc897_hp_automute_hook;
11010+
}
11011+
}
11012+
1100211013
static const struct coef_fw alc668_coefs[] = {
1100311014
WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
1100411015
WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
@@ -11082,6 +11093,8 @@ enum {
1108211093
ALC897_FIXUP_LENOVO_HEADSET_MIC,
1108311094
ALC897_FIXUP_HEADSET_MIC_PIN,
1108411095
ALC897_FIXUP_HP_HSMIC_VERB,
11096+
ALC897_FIXUP_LENOVO_HEADSET_MODE,
11097+
ALC897_FIXUP_HEADSET_MIC_PIN2,
1108511098
};
1108611099

1108711100
static const struct hda_fixup alc662_fixups[] = {
@@ -11508,6 +11521,19 @@ static const struct hda_fixup alc662_fixups[] = {
1150811521
{ }
1150911522
},
1151011523
},
11524+
[ALC897_FIXUP_LENOVO_HEADSET_MODE] = {
11525+
.type = HDA_FIXUP_FUNC,
11526+
.v.func = alc897_fixup_lenovo_headset_mode,
11527+
},
11528+
[ALC897_FIXUP_HEADSET_MIC_PIN2] = {
11529+
.type = HDA_FIXUP_PINS,
11530+
.v.pins = (const struct hda_pintbl[]) {
11531+
{ 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
11532+
{ }
11533+
},
11534+
.chained = true,
11535+
.chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE
11536+
},
1151111537
};
1151211538

1151311539
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
@@ -11560,6 +11586,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1156011586
SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
1156111587
SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
1156211588
SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
11589+
SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
1156311590
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
1156411591
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
1156511592
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),

0 commit comments

Comments
 (0)