Skip to content

Commit b2904df

Browse files
jimxbj-dottiwai
authored andcommitted
ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781
TIAS2781 is unofficial hardware id in ACPI for tas2781 in HDA, has been used for several projects. TXNW is the official hardware id for TI, will be used in new projects, including device on SPI bus, which was enumerated by drivers/acpi/scan.c, and probed by smi_probe() in drivers/platform/x86/serial-multi-instantiate.c. This patch will support both TIAS2781 and TXNW2781 in ACPI with tas2781 under HDA. As our I2C driver will handle all of slaver devices, so we probe first device only: "TXNW2781:00-tas2781-hda.0" Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20250616035607.2569-1-baojun.xu@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 8629eea commit b2904df

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

sound/pci/hda/patch_realtek.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7328,7 +7328,7 @@ static void alc285_fixup_asus_ga403u(struct hda_codec *cdc, const struct hda_fix
73287328
alc_fixup_inv_dmic(cdc, fix, action);
73297329
}
73307330

7331-
static void tas2781_fixup_i2c(struct hda_codec *cdc,
7331+
static void tas2781_fixup_tias_i2c(struct hda_codec *cdc,
73327332
const struct hda_fixup *fix, int action)
73337333
{
73347334
comp_generic_fixup(cdc, action, "i2c", "TIAS2781", "-%s:00", 1);
@@ -7339,6 +7339,12 @@ static void tas2781_fixup_spi(struct hda_codec *cdc, const struct hda_fixup *fix
73397339
comp_generic_fixup(cdc, action, "spi", "TXNW2781", "-%s:00-tas2781-hda.%d", 2);
73407340
}
73417341

7342+
static void tas2781_fixup_txnw_i2c(struct hda_codec *cdc,
7343+
const struct hda_fixup *fix, int action)
7344+
{
7345+
comp_generic_fixup(cdc, action, "i2c", "TXNW2781", "-%s:00-tas2781-hda.%d", 1);
7346+
}
7347+
73427348
static void yoga7_14arb7_fixup_i2c(struct hda_codec *cdc,
73437349
const struct hda_fixup *fix, int action)
73447350
{
@@ -8007,6 +8013,7 @@ enum {
80078013
ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI,
80088014
ALC287_FIXUP_TAS2781_I2C,
80098015
ALC245_FIXUP_TAS2781_SPI_2,
8016+
ALC287_FIXUP_TXNW2781_I2C,
80108017
ALC287_FIXUP_YOGA7_14ARB7_I2C,
80118018
ALC245_FIXUP_HP_MUTE_LED_COEFBIT,
80128019
ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT,
@@ -10261,7 +10268,7 @@ static const struct hda_fixup alc269_fixups[] = {
1026110268
},
1026210269
[ALC287_FIXUP_TAS2781_I2C] = {
1026310270
.type = HDA_FIXUP_FUNC,
10264-
.v.func = tas2781_fixup_i2c,
10271+
.v.func = tas2781_fixup_tias_i2c,
1026510272
.chained = true,
1026610273
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
1026710274
},
@@ -10271,6 +10278,12 @@ static const struct hda_fixup alc269_fixups[] = {
1027110278
.chained = true,
1027210279
.chain_id = ALC285_FIXUP_HP_GPIO_LED,
1027310280
},
10281+
[ALC287_FIXUP_TXNW2781_I2C] = {
10282+
.type = HDA_FIXUP_FUNC,
10283+
.v.func = tas2781_fixup_txnw_i2c,
10284+
.chained = true,
10285+
.chain_id = ALC285_FIXUP_THINKPAD_HEADSET_JACK,
10286+
},
1027410287
[ALC287_FIXUP_YOGA7_14ARB7_I2C] = {
1027510288
.type = HDA_FIXUP_FUNC,
1027610289
.v.func = yoga7_14arb7_fixup_i2c,
@@ -11329,8 +11342,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1132911342
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
1133011343
SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
1133111344
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
11332-
SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TAS2781_I2C),
11333-
SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TAS2781_I2C),
11345+
SND_PCI_QUIRK(0x17aa, 0x391f, "Yoga S990-16 pro Quad YC Quad", ALC287_FIXUP_TXNW2781_I2C),
11346+
SND_PCI_QUIRK(0x17aa, 0x3920, "Yoga S990-16 pro Quad VECO Quad", ALC287_FIXUP_TXNW2781_I2C),
1133411347
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
1133511348
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
1133611349
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,11 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt)
587587
device_name = "TIAS2781";
588588
hda_priv->save_calibration = tas2781_save_calibration;
589589
tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
590+
} else if (strstarts(dev_name(&clt->dev),
591+
"TXNW2781:00-tas2781-hda.0")) {
592+
device_name = "TXNW2781";
593+
hda_priv->save_calibration = tas2781_save_calibration;
594+
tas_hda->priv->global_addr = TAS2781_GLOBAL_ADDR;
590595
} else if (strstr(dev_name(&clt->dev), "INT8866")) {
591596
device_name = "INT8866";
592597
hda_priv->save_calibration = tas2563_save_calibration;
@@ -725,6 +730,7 @@ static const struct i2c_device_id tas2781_hda_i2c_id[] = {
725730
static const struct acpi_device_id tas2781_acpi_hda_match[] = {
726731
{"INT8866", 0 },
727732
{"TIAS2781", 0 },
733+
{"TXNW2781", 0 },
728734
{}
729735
};
730736
MODULE_DEVICE_TABLE(acpi, tas2781_acpi_hda_match);

0 commit comments

Comments
 (0)