Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
* by the drivers/platform/x86/serial-multi-instantiate.c driver, which
* knows which client device id to use for each resource.
*/
{"AWDZ8399", },
{"BSG1160", },
{"BSG2150", },
{"CSC3551", },
Expand Down
10 changes: 10 additions & 0 deletions drivers/platform/x86/serial-multi-instantiate.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,21 @@ static const struct smi_node tas2781_hda = {
.bus_type = SMI_AUTO_DETECT,
};

static const struct smi_node aw88399_hda = {
.instances = {
{ "aw88399-hda", IRQ_RESOURCE_AUTO, 0 },
{ "aw88399-hda", IRQ_RESOURCE_AUTO, 0 },
{}
},
.bus_type = SMI_AUTO_DETECT,
};

/*
* Note new device-ids must also be added to ignore_serial_bus_ids in
* drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
*/
static const struct acpi_device_id smi_acpi_ids[] = {
{ "AWDZ8399", (unsigned long)&aw88399_hda },
{ "BSG1160", (unsigned long)&bsg1160_data },
{ "BSG2150", (unsigned long)&bsg2150_data },
{ "CSC3551", (unsigned long)&cs35l41_hda },
Expand Down
28 changes: 26 additions & 2 deletions sound/hda/codecs/realtek/alc269.c
Original file line number Diff line number Diff line change
Expand Up @@ -2974,6 +2974,16 @@ static void cs35l41_fixup_i2c_four(struct hda_codec *cdc, const struct hda_fixup
comp_generic_fixup(cdc, action, "i2c", "CSC3551", "-%s:00-cs35l41-hda.%d", 4);
}

static void aw88399_fixup_i2c_two(struct hda_codec *cdc, const struct hda_fixup *fix, int action)
{
comp_generic_fixup(cdc, action, "i2c", "AWDZ8399", "-%s:00-aw88399-hda.%d", 2);
}

static void alc287_fixup_legion_16iax_aw88399(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
}

static void cs35l41_fixup_spi_two(struct hda_codec *codec, const struct hda_fixup *fix, int action)
{
comp_generic_fixup(codec, action, "spi", "CSC3551", "-%s:00-cs35l41-hda.%d", 2);
Expand Down Expand Up @@ -3737,6 +3747,8 @@ enum {
ALC269_FIXUP_POSITIVO_P15X_HEADSET_MIC,
ALC289_FIXUP_ASUS_ZEPHYRUS_DUAL_SPK,
ALC256_FIXUP_VAIO_RPL_MIC_NO_PRESENCE,
ALC287_FIXUP_AW88399_I2C_2,
ALC287_FIXUP_LENOVO_LEGION_AW88399,
};

/* A special fixup for Lenovo C940 and Yoga Duet 7;
Expand Down Expand Up @@ -6182,8 +6194,18 @@ static const struct hda_fixup alc269_fixups[] = {
{ }
},
.chained = true,
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
}
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST,
},
[ALC287_FIXUP_AW88399_I2C_2] = {
.type = HDA_FIXUP_FUNC,
.v.func = aw88399_fixup_i2c_two,
},
[ALC287_FIXUP_LENOVO_LEGION_AW88399] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc287_fixup_legion_16iax_aw88399,
.chained = true,
.chain_id = ALC287_FIXUP_AW88399_I2C_2,
},
};

static const struct hda_quirk alc269_fixup_tbl[] = {
Expand Down Expand Up @@ -7123,6 +7145,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD),
SND_PCI_QUIRK(0x17aa, 0x38fd, "ThinkBook plus Gen5 Hybrid", ALC287_FIXUP_TAS2781_I2C),
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
SND_PCI_QUIRK(0x17aa, 0x3906, "Lenovo Legion Pro 7 16IAX10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
SND_PCI_QUIRK(0x17aa, 0x3907, "Lenovo Legion Pro 7 16IAX10H", ALC287_FIXUP_LENOVO_LEGION_AW88399),
SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
Expand Down
21 changes: 21 additions & 0 deletions sound/hda/codecs/side-codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,24 @@ config SND_HDA_SCODEC_TAS2781_SPI

comment "Set to Y if you want auto-loading the side codec driver"
depends on SND_HDA=y && SND_HDA_SCODEC_TAS2781_SPI=m

config SND_HDA_SCODEC_AW88399
tristate
select SND_HDA_GENERIC

config SND_HDA_SCODEC_AW88399_I2C
tristate "Build AW88399 HD-audio side codec support for I2C Bus"
depends on I2C
depends on ACPI
depends on SND_SOC
select SND_HDA_SCODEC_AW88399
select SND_SOC_AW88399
help
Say Y or M here to include AW88399 I2C HD-audio side codec support
in snd-hda-intel driver, such as ALC287.

This is for systems where the AW88399 smart amplifier is connected
as a side codec to the HDA controller, rather than via SOF/SSP.

comment "Set to Y if you want auto-loading the side codec driver"
depends on SND_HDA=y && SND_HDA_SCODEC_AW88399_I2C=m
4 changes: 4 additions & 0 deletions sound/hda/codecs/side-codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ snd-hda-scodec-component-y := hda_component.o
snd-hda-scodec-tas2781-y := tas2781_hda.o
snd-hda-scodec-tas2781-i2c-y := tas2781_hda_i2c.o
snd-hda-scodec-tas2781-spi-y := tas2781_hda_spi.o
snd-hda-scodec-aw88399-y := aw88399_hda.o
snd-hda-scodec-aw88399-i2c-y := aw88399_hda_i2c.o

obj-$(CONFIG_SND_HDA_CIRRUS_SCODEC) += snd-hda-cirrus-scodec.o
obj-$(CONFIG_SND_HDA_CIRRUS_SCODEC_KUNIT_TEST) += snd-hda-cirrus-scodec-test.o
Expand All @@ -26,3 +28,5 @@ obj-$(CONFIG_SND_HDA_SCODEC_COMPONENT) += snd-hda-scodec-component.o
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781) += snd-hda-scodec-tas2781.o
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_I2C) += snd-hda-scodec-tas2781-i2c.o
obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_SPI) += snd-hda-scodec-tas2781-spi.o
obj-$(CONFIG_SND_HDA_SCODEC_AW88399) += snd-hda-scodec-aw88399.o
obj-$(CONFIG_SND_HDA_SCODEC_AW88399_I2C) += snd-hda-scodec-aw88399-i2c.o
Loading