Skip to content

Commit ef184b3

Browse files
committed
Merge branch '7.0/snd-codecs' into 7.0/base
Signed-off-by: Eric Naim <dnaim@cachyos.org>
2 parents 6f575a5 + a18eac7 commit ef184b3

File tree

19 files changed

+1466
-17
lines changed

19 files changed

+1466
-17
lines changed

drivers/acpi/scan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
17501750
* by the drivers/platform/x86/serial-multi-instantiate.c driver, which
17511751
* knows which client device id to use for each resource.
17521752
*/
1753+
{"AWDZ8399", },
17531754
{"BSG1160", },
17541755
{"BSG2150", },
17551756
{"CSC3551", },
@@ -1758,6 +1759,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
17581759
{"CSC3557", },
17591760
{"INT33FE", },
17601761
{"INT3515", },
1762+
{"MAX98390", },
17611763
{"TXNW2781", },
17621764
/* Non-conforming _HID for Cirrus Logic already released */
17631765
{"CLSA0100", },

drivers/platform/x86/serial-multi-instantiate.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,18 +400,40 @@ static const struct smi_node tas2781_hda = {
400400
.bus_type = SMI_AUTO_DETECT,
401401
};
402402

403+
static const struct smi_node max98390_hda = {
404+
.instances = {
405+
{ "max98390-hda", IRQ_RESOURCE_NONE, 0 },
406+
{ "max98390-hda", IRQ_RESOURCE_NONE, 0 },
407+
{ "max98390-hda", IRQ_RESOURCE_NONE, 0 },
408+
{ "max98390-hda", IRQ_RESOURCE_NONE, 0 },
409+
{}
410+
},
411+
.bus_type = SMI_I2C,
412+
};
413+
414+
static const struct smi_node aw88399_hda = {
415+
.instances = {
416+
{ "aw88399-hda", IRQ_RESOURCE_AUTO, 0 },
417+
{ "aw88399-hda", IRQ_RESOURCE_AUTO, 0 },
418+
{}
419+
},
420+
.bus_type = SMI_AUTO_DETECT,
421+
};
422+
403423
/*
404424
* Note new device-ids must also be added to ignore_serial_bus_ids in
405425
* drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
406426
*/
407427
static const struct acpi_device_id smi_acpi_ids[] = {
428+
{ "AWDZ8399", (unsigned long)&aw88399_hda },
408429
{ "BSG1160", (unsigned long)&bsg1160_data },
409430
{ "BSG2150", (unsigned long)&bsg2150_data },
410431
{ "CSC3551", (unsigned long)&cs35l41_hda },
411432
{ "CSC3554", (unsigned long)&cs35l54_hda },
412433
{ "CSC3556", (unsigned long)&cs35l56_hda },
413434
{ "CSC3557", (unsigned long)&cs35l57_hda },
414435
{ "INT3515", (unsigned long)&int3515_data },
436+
{ "MAX98390", (unsigned long)&max98390_hda },
415437
{ "TXNW2781", (unsigned long)&tas2781_hda },
416438
/* Non-conforming _HID for Cirrus Logic already released */
417439
{ "CLSA0100", (unsigned long)&cs35l41_hda },

sound/hda/codecs/realtek/alc269.c

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3254,6 +3254,34 @@ static void find_cirrus_companion_amps(struct hda_codec *cdc)
32543254
comp_generic_fixup(cdc, HDA_FIXUP_ACT_PRE_PROBE, bus, acpi_ids[i].hid, match, count);
32553255
}
32563256

3257+
static void aw88399_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
3258+
{
3259+
comp_generic_fixup(cdc, action, "i2c", "AWDZ8399", "-%s:00-aw88399-hda.%d", 2);
3260+
}
3261+
3262+
static void alc287_fixup_legion_16iax10h_aw88399(struct hda_codec *codec,
3263+
const struct hda_fixup *fix, int action)
3264+
{
3265+
static const struct hda_pintbl pincfgs[] = {
3266+
{ 0x1d, 0x411111f0 }, /* unused bogus pin */
3267+
{ }
3268+
};
3269+
3270+
/*
3271+
* Force DAC 0x02 for the bass speaker 0x17, as the default 0x06 lacks volume controls.
3272+
*/
3273+
static const hda_nid_t conn[] = { 0x02 };
3274+
3275+
alc269_fixup_limit_int_mic_boost(codec, fix, action);
3276+
3277+
switch (action) {
3278+
case HDA_FIXUP_ACT_PRE_PROBE:
3279+
snd_hda_apply_pincfgs(codec, pincfgs);
3280+
snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
3281+
break;
3282+
}
3283+
}
3284+
32573285
static void cs35l41_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
32583286
{
32593287
comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
@@ -3279,6 +3307,11 @@ static void cs35l41_fixup_spi_four(struct hda_codec *codec, const struct hda_fix
32793307
comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
32803308
}
32813309

3310+
static void max98390_fixup_i2c_four(struct hda_codec *codec, const struct hda_fixup *fix, int action)
3311+
{
3312+
comp_generic_fixup(codec, action, "i2c", "MAX98390", "-%s:00-max98390-hda.%d", 4);
3313+
}
3314+
32823315
static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix,
32833316
int action)
32843317
{
@@ -4001,6 +4034,7 @@ enum {
40014034
ALC298_FIXUP_SAMSUNG_AMP,
40024035
ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS,
40034036
ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS,
4037+
ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS,
40044038
ALC298_FIXUP_LG_GRAM_STYLE_14,
40054039
ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
40064040
ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET,
@@ -4124,6 +4158,8 @@ enum {
41244158
ALC245_FIXUP_ACER_MICMUTE_LED,
41254159
ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
41264160
ALC236_FIXUP_HP_DMIC,
4161+
ALC287_FIXUP_AW88399_I2C_2,
4162+
ALC287_FIXUP_LENOVO_LEGION_AW88399,
41274163
};
41284164

41294165
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -5719,6 +5755,10 @@ static const struct hda_fixup alc269_fixups[] = {
57195755
.type = HDA_FIXUP_FUNC,
57205756
.v.func = alc298_fixup_lg_gram_style_14
57215757
},
5758+
[ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS] = {
5759+
.type = HDA_FIXUP_FUNC,
5760+
.v.func = max98390_fixup_i2c_four
5761+
},
57225762
[ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET] = {
57235763
.type = HDA_FIXUP_VERBS,
57245764
.v.verbs = (const struct hda_verb[]) {
@@ -6666,6 +6706,16 @@ static const struct hda_fixup alc269_fixups[] = {
66666706
{ 0x12, 0x90a60160 }, /* use as internal mic */
66676707
{ }
66686708
},
6709+
},
6710+
[ALC287_FIXUP_AW88399_I2C_2] = {
6711+
.type = HDA_FIXUP_FUNC,
6712+
.v.func = aw88399_fixup_i2c_two,
6713+
},
6714+
[ALC287_FIXUP_LENOVO_LEGION_AW88399] = {
6715+
.type = HDA_FIXUP_FUNC,
6716+
.v.func = alc287_fixup_legion_16iax10h_aw88399,
6717+
.chained = true,
6718+
.chain_id = ALC287_FIXUP_AW88399_I2C_2,
66696719
}
66706720
};
66716721

@@ -7430,6 +7480,11 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
74307480
SND_PCI_QUIRK(0x144d, 0xc876, "Samsung 730QED (NP730QED-KA2US)", ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
74317481
SND_PCI_QUIRK(0x144d, 0xca03, "Samsung Galaxy Book2 Pro 360 (NP930QED)", ALC298_FIXUP_SAMSUNG_AMP),
74327482
SND_PCI_QUIRK(0x144d, 0xca06, "Samsung Galaxy Book3 360 (NP730QFG)", ALC298_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET),
7483+
SND_PCI_QUIRK(0x144d, 0xca07, "Samsung Galaxy Book4 Pro 14-inch (NP940XGK)", ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS),
7484+
SND_PCI_QUIRK(0x144d, 0xc890, "Samsung Galaxy Book4 Pro 16 inch (NP960XGK)", ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS),
7485+
SND_PCI_QUIRK(0x144d, 0xc892, "Samsung Galaxy Book4 Pro 360 (NP960QGK)", ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS),
7486+
SND_PCI_QUIRK(0x144d, 0xc1da, "Samsung Galaxy Book5 Pro 360 (NP960QHA)", ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS),
7487+
SND_PCI_QUIRK(0x144d, 0xc1d8, "Samsung Galaxy Book4 Ultra (NP960XGL)", ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS),
74337488
SND_PCI_QUIRK(0x144d, 0xc868, "Samsung Galaxy Book2 Pro (NP930XED)", ALC298_FIXUP_SAMSUNG_AMP),
74347489
SND_PCI_QUIRK(0x144d, 0xc870, "Samsung Galaxy Book2 Pro (NP950XED)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
74357490
SND_PCI_QUIRK(0x144d, 0xc872, "Samsung Galaxy Book2 Pro (NP950XEE)", ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS),
@@ -7680,6 +7735,11 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
76807735
SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
76817736
SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
76827737
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
7738+
SND_PCI_QUIRK(0x17aa, 0x3906, "Lenovo Legion Pro 7i 16IAX10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
7739+
SND_PCI_QUIRK(0x17aa, 0x3907, "Lenovo Legion Pro 7i 16IAX10H / Y9000P IAX10", ALC287_FIXUP_LENOVO_LEGION_AW88399),
7740+
SND_PCI_QUIRK(0x17aa, 0x3d6c, "Lenovo Legion Pro 7i 16IAX10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
7741+
SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo Legion Pro 7 16AFR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
7742+
SND_PCI_QUIRK(0x17aa, 0x3939, "Lenovo Legion Pro 7 16AFR10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
76837743
SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
76847744
SND_PCI_QUIRK(0x17aa, 0x3911, "Lenovo Yoga Pro 7 14IAH10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
76857745
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
@@ -7957,6 +8017,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
79578017
{.id = ALC298_FIXUP_SAMSUNG_AMP, .name = "alc298-samsung-amp"},
79588018
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_2_AMPS, .name = "alc298-samsung-amp-v2-2-amps"},
79598019
{.id = ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS, .name = "alc298-samsung-amp-v2-4-amps"},
8020+
{.id = ALC298_FIXUP_SAMSUNG_MAX98390_4_AMPS, .name = "alc298-samsung-max98390-4-amps"},
79608021
{.id = ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET, .name = "alc256-samsung-headphone"},
79618022
{.id = ALC255_FIXUP_XIAOMI_HEADSET_MIC, .name = "alc255-xiaomi-headset"},
79628023
{.id = ALC274_FIXUP_HP_MIC, .name = "alc274-hp-mic-detect"},

sound/hda/codecs/side-codecs/Kconfig

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,43 @@ config SND_HDA_SCODEC_TAS2781_SPI
141141

142142
comment "Set to Y if you want auto-loading the side codec driver"
143143
depends on SND_HDA=y && SND_HDA_SCODEC_TAS2781_SPI=m
144+
145+
config SND_HDA_SCODEC_MAX98390
146+
tristate
147+
select SND_HDA_GENERIC
148+
select SND_HDA_SCODEC_COMPONENT
149+
150+
config SND_HDA_SCODEC_MAX98390_I2C
151+
tristate "Build MAX98390 HD-audio side codec support for I2C Bus"
152+
depends on I2C
153+
depends on ACPI
154+
depends on SND_SOC
155+
select SND_SOC_MAX98390
156+
select SND_HDA_SCODEC_MAX98390
157+
help
158+
Say Y or M here to include MAX98390 I2C HD-audio side codec support
159+
in snd-hda-intel driver, such as ALC298.
160+
161+
comment "Set to Y if you want auto-loading the side codec driver"
162+
depends on SND_HDA=y && SND_HDA_SCODEC_MAX98390_I2C=m
163+
164+
config SND_HDA_SCODEC_AW88399
165+
tristate
166+
select SND_HDA_GENERIC
167+
168+
config SND_HDA_SCODEC_AW88399_I2C
169+
tristate "Build AW88399 HD-audio side codec support for I2C Bus"
170+
depends on I2C
171+
depends on ACPI
172+
depends on SND_SOC
173+
select SND_HDA_SCODEC_AW88399
174+
select SND_SOC_AW88399
175+
help
176+
Say Y or M here to include AW88399 I2C HD-audio side codec support
177+
in snd-hda-intel driver, such as ALC287.
178+
179+
This is for systems where the AW88399 smart amplifier is connected
180+
as a side codec to the HDA controller, rather than via SOF/SSP.
181+
182+
comment "Set to Y if you want auto-loading the side codec driver"
183+
depends on SND_HDA=y && SND_HDA_SCODEC_AW88399_I2C=m

sound/hda/codecs/side-codecs/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ snd-hda-scodec-component-y := hda_component.o
1313
snd-hda-scodec-tas2781-y := tas2781_hda.o
1414
snd-hda-scodec-tas2781-i2c-y := tas2781_hda_i2c.o
1515
snd-hda-scodec-tas2781-spi-y := tas2781_hda_spi.o
16+
snd-hda-scodec-max98390-y := max98390_hda.o max98390_hda_filters.o
17+
snd-hda-scodec-max98390-i2c-y := max98390_hda_i2c.o
18+
snd-hda-scodec-aw88399-y := aw88399_hda.o aw88399_hda_property.o
19+
snd-hda-scodec-aw88399-i2c-y := aw88399_hda_i2c.o
1620

1721
obj-$(CONFIG_SND_HDA_CIRRUS_SCODEC) += snd-hda-cirrus-scodec.o
1822
obj-$(CONFIG_SND_HDA_CIRRUS_SCODEC_KUNIT_TEST) += snd-hda-cirrus-scodec-test.o
@@ -26,3 +30,7 @@ obj-$(CONFIG_SND_HDA_SCODEC_COMPONENT) += snd-hda-scodec-component.o
2630
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781) += snd-hda-scodec-tas2781.o
2731
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_I2C) += snd-hda-scodec-tas2781-i2c.o
2832
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_SPI) += snd-hda-scodec-tas2781-spi.o
33+
obj-$(CONFIG_SND_HDA_SCODEC_MAX98390) += snd-hda-scodec-max98390.o
34+
obj-$(CONFIG_SND_HDA_SCODEC_MAX98390_I2C) += snd-hda-scodec-max98390-i2c.o
35+
obj-$(CONFIG_SND_HDA_SCODEC_AW88399) += snd-hda-scodec-aw88399.o
36+
obj-$(CONFIG_SND_HDA_SCODEC_AW88399_I2C) += snd-hda-scodec-aw88399-i2c.o

0 commit comments

Comments
 (0)