Skip to content

Commit c33f0d4

Browse files
simontrimmertiwai
authored andcommitted
ALSA: hda/realtek: Add quirks for ASUS Laptops using CS35L56
These ASUS laptops use the Realtek HDA codec combined with a number of CS35L56 amplifiers. The SSID of the GA403U matches a previous ASUS laptop - we can tell them apart because they use different codecs. Signed-off-by: Simon Trimmer <[email protected]> Message-ID: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 831ec5e commit c33f0d4

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6875,11 +6875,38 @@ static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const st
68756875
comp_generic_fixup(cdc, action, "i2c", "CLSA0101", "-%s:00-cs35l41-hda.%d", 2);
68766876
}
68776877

6878+
static void cs35l56_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6879+
{
6880+
comp_generic_fixup(cdc, action, "i2c", "CSC3556", "-%s:00-cs35l56-hda.%d", 2);
6881+
}
6882+
6883+
static void cs35l56_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6884+
{
6885+
comp_generic_fixup(cdc, action, "i2c", "CSC3556", "-%s:00-cs35l56-hda.%d", 4);
6886+
}
6887+
6888+
static void cs35l56_fixup_spi_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6889+
{
6890+
comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 2);
6891+
}
6892+
68786893
static void cs35l56_fixup_spi_four(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
68796894
{
68806895
comp_generic_fixup(cdc, action, "spi", "CSC3556", "-%s:00-cs35l56-hda.%d", 4);
68816896
}
68826897

6898+
static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
6899+
{
6900+
/*
6901+
* The same SSID has been re-used in different hardware, they have
6902+
* different codecs and the newer GA403U has a ALC285.
6903+
*/
6904+
if (cdc->core.vendor_id == 0x10ec0285)
6905+
cs35l56_fixup_i2c_two(cdc, fix, action);
6906+
else
6907+
alc_fixup_inv_dmic(cdc, fix, action);
6908+
}
6909+
68836910
static void tas2781_fixup_i2c(struct hda_codec *cdc,
68846911
const struct hda_fixup *fix, int action)
68856912
{
@@ -7436,6 +7463,10 @@ enum {
74367463
ALC256_FIXUP_ACER_SFG16_MICMUTE_LED,
74377464
ALC256_FIXUP_HEADPHONE_AMP_VOL,
74387465
ALC245_FIXUP_HP_SPECTRE_X360_EU0XXX,
7466+
ALC285_FIXUP_CS35L56_SPI_2,
7467+
ALC285_FIXUP_CS35L56_I2C_2,
7468+
ALC285_FIXUP_CS35L56_I2C_4,
7469+
ALC285_FIXUP_ASUS_GA403U,
74397470
};
74407471

74417472
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -9643,6 +9674,22 @@ static const struct hda_fixup alc269_fixups[] = {
96439674
.type = HDA_FIXUP_FUNC,
96449675
.v.func = alc245_fixup_hp_spectre_x360_eu0xxx,
96459676
},
9677+
[ALC285_FIXUP_CS35L56_SPI_2] = {
9678+
.type = HDA_FIXUP_FUNC,
9679+
.v.func = cs35l56_fixup_spi_two,
9680+
},
9681+
[ALC285_FIXUP_CS35L56_I2C_2] = {
9682+
.type = HDA_FIXUP_FUNC,
9683+
.v.func = cs35l56_fixup_i2c_two,
9684+
},
9685+
[ALC285_FIXUP_CS35L56_I2C_4] = {
9686+
.type = HDA_FIXUP_FUNC,
9687+
.v.func = cs35l56_fixup_i2c_four,
9688+
},
9689+
[ALC285_FIXUP_ASUS_GA403U] = {
9690+
.type = HDA_FIXUP_FUNC,
9691+
.v.func = alc285_fixup_asus_ga403u,
9692+
},
96469693
};
96479694

96489695
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -10096,14 +10143,15 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1009610143
SND_PCI_QUIRK(0x1043, 0x1a83, "ASUS UM5302LA", ALC294_FIXUP_CS35L41_I2C_2),
1009710144
SND_PCI_QUIRK(0x1043, 0x1a8f, "ASUS UX582ZS", ALC245_FIXUP_CS35L41_SPI_2),
1009810145
SND_PCI_QUIRK(0x1043, 0x1b11, "ASUS UX431DA", ALC294_FIXUP_ASUS_COEF_1B),
10099-
SND_PCI_QUIRK(0x1043, 0x1b13, "Asus U41SV", ALC269_FIXUP_INV_DMIC),
10146+
SND_PCI_QUIRK(0x1043, 0x1b13, "ASUS U41SV/GA403U", ALC285_FIXUP_ASUS_GA403U),
1010010147
SND_PCI_QUIRK(0x1043, 0x1b93, "ASUS G614JVR/JIR", ALC245_FIXUP_CS35L41_SPI_2),
1010110148
SND_PCI_QUIRK(0x1043, 0x1bbd, "ASUS Z550MA", ALC255_FIXUP_ASUS_MIC_NO_PRESENCE),
1010210149
SND_PCI_QUIRK(0x1043, 0x1c03, "ASUS UM3406HA", ALC287_FIXUP_CS35L41_I2C_2),
1010310150
SND_PCI_QUIRK(0x1043, 0x1c23, "Asus X55U", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
1010410151
SND_PCI_QUIRK(0x1043, 0x1c33, "ASUS UX5304MA", ALC245_FIXUP_CS35L41_SPI_2),
1010510152
SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2),
1010610153
SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401),
10154+
SND_PCI_QUIRK(0x1043, 0x1c63, "ASUS GU605M", ALC285_FIXUP_CS35L56_SPI_2),
1010710155
SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS),
1010810156
SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC),
1010910157
SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS),
@@ -10115,11 +10163,14 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1011510163
SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401),
1011610164
SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE),
1011710165
SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2),
10166+
SND_PCI_QUIRK(0x1043, 0x1df3, "ASUS UM5606", ALC285_FIXUP_CS35L56_I2C_4),
1011810167
SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2),
1011910168
SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502),
1012010169
SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2),
1012110170
SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS),
1012210171
SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS),
10172+
SND_PCI_QUIRK(0x1043, 0x1e63, "ASUS H7606W", ALC285_FIXUP_CS35L56_I2C_2),
10173+
SND_PCI_QUIRK(0x1043, 0x1e83, "ASUS GA605W", ALC285_FIXUP_CS35L56_I2C_2),
1012310174
SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401),
1012410175
SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2),
1012510176
SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401),

0 commit comments

Comments
 (0)