Skip to content

Commit 52bffe5

Browse files
committed
soundwire: dmi-quirks: Disable ghost Realtek devices
Many systems ship with a Realtek audio codec in the ACPI that doesn't physically exist in the system. This confuses the newer function topology system that creates the soundcard, as it builds the card based on the the ACPI information. Whilst we are working with the laptop vendors to try and stop this happening there are quite a few systems where this has shipped. Add a quirk to disable this "ghost" device. Currently this patch should cover: - Asus UX5406AA - Lenovo Yoga Pro 9i (83SF) - Lenovo Yoga Slim 7 Ultra (83QK) Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
1 parent 9559c45 commit 52bffe5

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

drivers/soundwire/dmi-quirks.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ static const struct adr_remap intel_rooks_county[] = {
9090
{}
9191
};
9292

93+
/*
94+
* Many platforms have ghost realtek devices in the ACPI that don't physically
95+
* exist, remove those devices.
96+
*/
97+
static const struct adr_remap ghost_realtek[] = {
98+
/* rt722 on link3 */
99+
{
100+
0x000330025d072201ull,
101+
0x0000000000000000ull
102+
},
103+
{}
104+
};
105+
93106
static const struct dmi_system_id adr_remap_quirk_table[] = {
94107
/* TGL devices */
95108
{
@@ -164,6 +177,28 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
164177
},
165178
.driver_data = (void *)hp_omen_16,
166179
},
180+
/* PTL devices */
181+
{
182+
.matches = {
183+
DMI_MATCH(DMI_SYS_VENDOR, "ASUS"),
184+
DMI_MATCH(DMI_BOARD_NAME, "UX5406AA"),
185+
},
186+
.driver_data = (void *)ghost_realtek,
187+
},
188+
{
189+
.matches = {
190+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
191+
DMI_MATCH(DMI_PRODUCT_NAME, "83QK"),
192+
},
193+
.driver_data = (void *)ghost_realtek,
194+
},
195+
{
196+
.matches = {
197+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
198+
DMI_MATCH(DMI_PRODUCT_NAME, "83SF"),
199+
},
200+
.driver_data = (void *)ghost_realtek,
201+
},
167202
{}
168203
};
169204

sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ bool snd_soc_acpi_intel_sdca_is_device_rt712_vb(void *arg)
3737
}
3838
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_sdca_is_device_rt712_vb, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
3939

40+
bool snd_soc_acpi_intel_allow_match_table(void *arg)
41+
{
42+
struct sdw_intel_ctx *ctx = arg;
43+
int i;
44+
45+
if (!ctx)
46+
return false;
47+
48+
for (i = 0; i < ctx->peripherals->num_peripherals; i++) {
49+
if (sdca_device_quirk_match(ctx->peripherals->array[i],
50+
SDCA_QUIRKS_RT712_VB))
51+
return true;
52+
}
53+
54+
return false;
55+
}
56+
EXPORT_SYMBOL_NS(snd_soc_acpi_intel_sdca_is_device_rt712_vb, "SND_SOC_ACPI_INTEL_SDCA_QUIRKS");
57+
4058
MODULE_DESCRIPTION("ASoC ACPI Intel SDCA quirks");
4159
MODULE_LICENSE("GPL");
4260
MODULE_IMPORT_NS("SND_SOC_SDCA");

0 commit comments

Comments
 (0)