Skip to content

Commit f1ec5be

Browse files
chenhuacaitiwai
authored andcommitted
ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
There are several Loongson-3 based laptops produced by CZC or Lemote, they use alc269/alc662 codecs and need specific pin-tables, this patch add their pin-tables. Signed-off-by: Huacai Chen <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 5649625 commit f1ec5be

File tree

1 file changed

+114
-0
lines changed

1 file changed

+114
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6166,6 +6166,11 @@ enum {
61666166
ALC289_FIXUP_ASUS_GA502,
61676167
ALC256_FIXUP_ACER_MIC_NO_PRESENCE,
61686168
ALC285_FIXUP_HP_GPIO_AMP_INIT,
6169+
ALC269_FIXUP_CZC_B20,
6170+
ALC269_FIXUP_CZC_TMI,
6171+
ALC269_FIXUP_CZC_L101,
6172+
ALC269_FIXUP_LEMOTE_A1802,
6173+
ALC269_FIXUP_LEMOTE_A190X,
61696174
};
61706175

61716176
static const struct hda_fixup alc269_fixups[] = {
@@ -7404,6 +7409,89 @@ static const struct hda_fixup alc269_fixups[] = {
74047409
.chained = true,
74057410
.chain_id = ALC285_FIXUP_HP_GPIO_LED
74067411
},
7412+
[ALC269_FIXUP_CZC_B20] = {
7413+
.type = HDA_FIXUP_PINS,
7414+
.v.pins = (const struct hda_pintbl[]) {
7415+
{ 0x12, 0x411111f0 },
7416+
{ 0x14, 0x90170110 }, /* speaker */
7417+
{ 0x15, 0x032f1020 }, /* HP out */
7418+
{ 0x17, 0x411111f0 },
7419+
{ 0x18, 0x03ab1040 }, /* mic */
7420+
{ 0x19, 0xb7a7013f },
7421+
{ 0x1a, 0x0181305f },
7422+
{ 0x1b, 0x411111f0 },
7423+
{ 0x1d, 0x411111f0 },
7424+
{ 0x1e, 0x411111f0 },
7425+
{ }
7426+
},
7427+
.chain_id = ALC269_FIXUP_DMIC,
7428+
},
7429+
[ALC269_FIXUP_CZC_TMI] = {
7430+
.type = HDA_FIXUP_PINS,
7431+
.v.pins = (const struct hda_pintbl[]) {
7432+
{ 0x12, 0x4000c000 },
7433+
{ 0x14, 0x90170110 }, /* speaker */
7434+
{ 0x15, 0x0421401f }, /* HP out */
7435+
{ 0x17, 0x411111f0 },
7436+
{ 0x18, 0x04a19020 }, /* mic */
7437+
{ 0x19, 0x411111f0 },
7438+
{ 0x1a, 0x411111f0 },
7439+
{ 0x1b, 0x411111f0 },
7440+
{ 0x1d, 0x40448505 },
7441+
{ 0x1e, 0x411111f0 },
7442+
{ 0x20, 0x8000ffff },
7443+
{ }
7444+
},
7445+
.chain_id = ALC269_FIXUP_DMIC,
7446+
},
7447+
[ALC269_FIXUP_CZC_L101] = {
7448+
.type = HDA_FIXUP_PINS,
7449+
.v.pins = (const struct hda_pintbl[]) {
7450+
{ 0x12, 0x40000000 },
7451+
{ 0x14, 0x01014010 }, /* speaker */
7452+
{ 0x15, 0x411111f0 }, /* HP out */
7453+
{ 0x16, 0x411111f0 },
7454+
{ 0x18, 0x01a19020 }, /* mic */
7455+
{ 0x19, 0x02a19021 },
7456+
{ 0x1a, 0x0181302f },
7457+
{ 0x1b, 0x0221401f },
7458+
{ 0x1c, 0x411111f0 },
7459+
{ 0x1d, 0x4044c601 },
7460+
{ 0x1e, 0x411111f0 },
7461+
{ }
7462+
},
7463+
.chain_id = ALC269_FIXUP_DMIC,
7464+
},
7465+
[ALC269_FIXUP_LEMOTE_A1802] = {
7466+
.type = HDA_FIXUP_PINS,
7467+
.v.pins = (const struct hda_pintbl[]) {
7468+
{ 0x12, 0x40000000 },
7469+
{ 0x14, 0x90170110 }, /* speaker */
7470+
{ 0x17, 0x411111f0 },
7471+
{ 0x18, 0x03a19040 }, /* mic1 */
7472+
{ 0x19, 0x90a70130 }, /* mic2 */
7473+
{ 0x1a, 0x411111f0 },
7474+
{ 0x1b, 0x411111f0 },
7475+
{ 0x1d, 0x40489d2d },
7476+
{ 0x1e, 0x411111f0 },
7477+
{ 0x20, 0x0003ffff },
7478+
{ 0x21, 0x03214020 },
7479+
{ }
7480+
},
7481+
.chain_id = ALC269_FIXUP_DMIC,
7482+
},
7483+
[ALC269_FIXUP_LEMOTE_A190X] = {
7484+
.type = HDA_FIXUP_PINS,
7485+
.v.pins = (const struct hda_pintbl[]) {
7486+
{ 0x14, 0x99130110 }, /* speaker */
7487+
{ 0x15, 0x0121401f }, /* HP out */
7488+
{ 0x18, 0x01a19c20 }, /* rear mic */
7489+
{ 0x19, 0x99a3092f }, /* front mic */
7490+
{ 0x1b, 0x0201401f }, /* front lineout */
7491+
{ }
7492+
},
7493+
.chain_id = ALC269_FIXUP_DMIC,
7494+
},
74077495
};
74087496

74097497
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7693,9 +7781,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
76937781
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
76947782
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
76957783
SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS),
7784+
SND_PCI_QUIRK(0x1b35, 0x1235, "CZC B20", ALC269_FIXUP_CZC_B20),
7785+
SND_PCI_QUIRK(0x1b35, 0x1236, "CZC TMI", ALC269_FIXUP_CZC_TMI),
7786+
SND_PCI_QUIRK(0x1b35, 0x1237, "CZC L101", ALC269_FIXUP_CZC_L101),
76967787
SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
76977788
SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
76987789
SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
7790+
SND_PCI_QUIRK(0x1c06, 0x2013, "Lemote A1802", ALC269_FIXUP_LEMOTE_A1802),
7791+
SND_PCI_QUIRK(0x1c06, 0x2015, "Lemote A190X", ALC269_FIXUP_LEMOTE_A190X),
76997792

77007793
#if 0
77017794
/* Below is a quirk table taken from the old code.
@@ -8951,6 +9044,7 @@ enum {
89519044
ALC662_FIXUP_LED_GPIO1,
89529045
ALC662_FIXUP_IDEAPAD,
89539046
ALC272_FIXUP_MARIO,
9047+
ALC662_FIXUP_CZC_ET26,
89549048
ALC662_FIXUP_CZC_P10T,
89559049
ALC662_FIXUP_SKU_IGNORE,
89569050
ALC662_FIXUP_HP_RP5800,
@@ -9020,6 +9114,25 @@ static const struct hda_fixup alc662_fixups[] = {
90209114
.type = HDA_FIXUP_FUNC,
90219115
.v.func = alc272_fixup_mario,
90229116
},
9117+
[ALC662_FIXUP_CZC_ET26] = {
9118+
.type = HDA_FIXUP_PINS,
9119+
.v.pins = (const struct hda_pintbl[]) {
9120+
{0x12, 0x403cc000},
9121+
{0x14, 0x90170110}, /* speaker */
9122+
{0x15, 0x411111f0},
9123+
{0x16, 0x411111f0},
9124+
{0x18, 0x01a19030}, /* mic */
9125+
{0x19, 0x90a7013f}, /* int-mic */
9126+
{0x1a, 0x01014020},
9127+
{0x1b, 0x0121401f},
9128+
{0x1c, 0x411111f0},
9129+
{0x1d, 0x411111f0},
9130+
{0x1e, 0x40478e35},
9131+
{}
9132+
},
9133+
.chained = true,
9134+
.chain_id = ALC662_FIXUP_SKU_IGNORE
9135+
},
90239136
[ALC662_FIXUP_CZC_P10T] = {
90249137
.type = HDA_FIXUP_VERBS,
90259138
.v.verbs = (const struct hda_verb[]) {
@@ -9403,6 +9516,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
94039516
SND_PCI_QUIRK(0x1849, 0x5892, "ASRock B150M", ALC892_FIXUP_ASROCK_MOBO),
94049517
SND_PCI_QUIRK(0x19da, 0xa130, "Zotac Z68", ALC662_FIXUP_ZOTAC_Z68),
94059518
SND_PCI_QUIRK(0x1b0a, 0x01b8, "ACER Veriton", ALC662_FIXUP_ACER_VERITON),
9519+
SND_PCI_QUIRK(0x1b35, 0x1234, "CZC ET26", ALC662_FIXUP_CZC_ET26),
94069520
SND_PCI_QUIRK(0x1b35, 0x2206, "CZC P10T", ALC662_FIXUP_CZC_P10T),
94079521
SND_PCI_QUIRK(0x1025, 0x0566, "Acer Aspire Ethos 8951G", ALC669_FIXUP_ACER_ASPIRE_ETHOS),
94089522

0 commit comments

Comments
 (0)