ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
commit 4bf5bf54476dffe60e6b6d8d539f67309ff599e2 upstream. Lenovo TianYi510Pro-14IOB (17aa:3742) require quirk for enabling headset-mic Signed-off-by: Edward Pacman <edward@edward-p.xyz> Cc: <stable@vger.kernel.org> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216756 Link: https://lore.kernel.org/r/20221207133218.18989-1-edward@edward-p.xyz Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fad324bc07
commit
12622fa053
@ -9777,6 +9777,17 @@ static void alc897_fixup_lenovo_headset_mic(struct hda_codec *codec,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec,
|
||||||
|
const struct hda_fixup *fix, int action)
|
||||||
|
{
|
||||||
|
struct alc_spec *spec = codec->spec;
|
||||||
|
|
||||||
|
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
||||||
|
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
|
||||||
|
spec->gen.hp_automute_hook = alc897_hp_automute_hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static const struct coef_fw alc668_coefs[] = {
|
static const struct coef_fw alc668_coefs[] = {
|
||||||
WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
|
WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0),
|
||||||
WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
|
WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80),
|
||||||
@ -9860,6 +9871,8 @@ enum {
|
|||||||
ALC897_FIXUP_LENOVO_HEADSET_MIC,
|
ALC897_FIXUP_LENOVO_HEADSET_MIC,
|
||||||
ALC897_FIXUP_HEADSET_MIC_PIN,
|
ALC897_FIXUP_HEADSET_MIC_PIN,
|
||||||
ALC897_FIXUP_HP_HSMIC_VERB,
|
ALC897_FIXUP_HP_HSMIC_VERB,
|
||||||
|
ALC897_FIXUP_LENOVO_HEADSET_MODE,
|
||||||
|
ALC897_FIXUP_HEADSET_MIC_PIN2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct hda_fixup alc662_fixups[] = {
|
static const struct hda_fixup alc662_fixups[] = {
|
||||||
@ -10286,6 +10299,19 @@ static const struct hda_fixup alc662_fixups[] = {
|
|||||||
{ }
|
{ }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[ALC897_FIXUP_LENOVO_HEADSET_MODE] = {
|
||||||
|
.type = HDA_FIXUP_FUNC,
|
||||||
|
.v.func = alc897_fixup_lenovo_headset_mode,
|
||||||
|
},
|
||||||
|
[ALC897_FIXUP_HEADSET_MIC_PIN2] = {
|
||||||
|
.type = HDA_FIXUP_PINS,
|
||||||
|
.v.pins = (const struct hda_pintbl[]) {
|
||||||
|
{ 0x1a, 0x01a11140 }, /* use as headset mic, without its own jack detect */
|
||||||
|
{ }
|
||||||
|
},
|
||||||
|
.chained = true,
|
||||||
|
.chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
||||||
@ -10338,6 +10364,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
|
|||||||
SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
|
SND_PCI_QUIRK(0x17aa, 0x32cb, "Lenovo ThinkCentre M70", ALC897_FIXUP_HEADSET_MIC_PIN),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
|
SND_PCI_QUIRK(0x17aa, 0x32cf, "Lenovo ThinkCentre M950", ALC897_FIXUP_HEADSET_MIC_PIN),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
|
SND_PCI_QUIRK(0x17aa, 0x32f7, "Lenovo ThinkCentre M90", ALC897_FIXUP_HEADSET_MIC_PIN),
|
||||||
|
SND_PCI_QUIRK(0x17aa, 0x3742, "Lenovo TianYi510Pro-14IOB", ALC897_FIXUP_HEADSET_MIC_PIN2),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
|
SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo Ideapad Y550P", ALC662_FIXUP_IDEAPAD),
|
||||||
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
|
SND_PCI_QUIRK(0x17aa, 0x3a0d, "Lenovo Ideapad Y550", ALC662_FIXUP_IDEAPAD),
|
||||||
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
|
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
|
||||||
|
Loading…
Reference in New Issue
Block a user