* [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
@ 2026-12-02 20:15 陳チェン
2026-12-02 20:17 ` [PATCH v2 1/5] ASoC: amd: yc: stop the shared IRQ before tearing down platform devices 陳チェン
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:15 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
The ACP6x function is present on every Yellow Carp platform, including
boards where nothing is wired behind it: no DMIC array, no I2S codec and
no SoundWire peripheral. Firmware does not say so. The ACPI node
carries no consumer description, and the _WOV method on some boards is a
template that unconditionally returns 1, so the driver cannot tell
"present" from "used".
Binding the function on such a board has no upside and a real cost: the
probe path runs acp6x_init() and the runtime suspend path then gates the
audio clock (ACP_CLKMUX_SEL = 0) in acp6x_deinit(). The block shares
that clock domain with the HDA controller on the same PCI segment, and
HDA can end up with
snd_hda_intel 0000:06:00.6: CORB reset timeout#2, CORBRP = 65535
sometimes without recovering. This is the regression analysed in
https://gitlab.freedesktop.org/drm/amd/-/work_items/5529, which contains
the amd-s2idle reports for df4148a5a3cf with and without the commit on
this exact platform.
This series makes the existing board list -- already maintained for the
machine driver -- the signal for "a consumer is wired", and declines the
device when neither the list nor the AcpDmicConnected property says so.
Nothing is enabled, mapped or initialized and no register in the shared
clock domain is written; the PCI core suspends the function after the
failed probe. Boards in the list behave exactly as before.
Patch 1 is an independent use-after-free fix in the teardown path and
can be applied on its own.
Patches 2 and 3 are refactoring only. Patch 4 makes the probe decline
unlisted boards. Patch 5 adds a read-only module parameter for boards
the list gets wrong; it can be dropped if it is not wanted.
Tested on a MECHREVO JIAOLONG (rev 0x62), which has no DMIC consumer:
two s2idle cycles, no CORB errors, onboard HDA and playback unaffected.
Changes in v2:
- reposted with proper threading: v1 reached the list as six separate
messages because the submission path assigned a new Message-ID to the
cover letter, so the patches could not reference it
- patch 4: restored a blank line before the teardown comment
MuXian Chen (5):
ASoC: amd: yc: stop the shared IRQ before tearing down platform
devices
ASoC: amd: yc: share the ACP6x DMIC board list
ASoC: amd: yc: ask the firmware once about the ACP DMIC path
ASoC: amd: yc: refuse the ACP function when no DMIC is wired
ASoC: amd: yc: allow forcing the ACP DMIC decision
sound/soc/amd/yc/Makefile | 2 +-
sound/soc/amd/yc/acp6x-mach.c | 958 +-------------------------------
sound/soc/amd/yc/acp6x-quirks.c | 842 ++++++++++++++++++++++++++++
sound/soc/amd/yc/acp6x.h | 1 +
sound/soc/amd/yc/pci-acp6x.c | 29 +
5 files changed, 883 insertions(+), 949 deletions(-)
create mode 100644 sound/soc/amd/yc/acp6x-quirks.c
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/5] ASoC: amd: yc: stop the shared IRQ before tearing down platform devices
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
@ 2026-12-02 20:17 ` 陳チェン
2026-12-02 20:17 ` [PATCH v2 2/5] ASoC: amd: yc: share the ACP6x DMIC board list 陳チェン
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:17 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
The IRQ handler dereferences adata->pdev[0], which is freed by
platform_device_unregister(). The IRQ is released only afterwards via
devres, so a spurious interrupt in that window dereferences freed
memory:
BUG: kernel NULL pointer dereference, address: 0x10
RIP: acp6x_irq_handler
Disable the interrupts and release the IRQ before unregistering the
platform devices, and return IRQ_NONE if the drvdata has already been
cleared.
Signed-off-by: MuXian Chen <a18165943161@gmail.com>
---
sound/soc/amd/yc/pci-acp6x.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
index bacbfc55c598..23ee574592cf 100644
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -133,6 +133,8 @@ static irqreturn_t acp6x_irq_handler(int irq, void *dev_id)
val = acp6x_readl(adata->acp6x_base + ACP_EXTERNAL_INTR_STAT);
if (val & BIT(PDM_DMA_STAT)) {
yc_pdm_data = dev_get_drvdata(&adata->pdev[0]->dev);
+ if (!yc_pdm_data)
+ return IRQ_NONE;
acp6x_writel(BIT(PDM_DMA_STAT), adata->acp6x_base + ACP_EXTERNAL_INTR_STAT);
if (yc_pdm_data->capture_stream)
snd_pcm_period_elapsed(yc_pdm_data->capture_stream);
@@ -358,6 +360,13 @@ static void snd_acp6x_remove(struct pci_dev *pci)
int ret, index;
adata = pci_get_drvdata(pci);
+
+ /* Stop the shared IRQ before the platform devices it dereferences
+ * are unregistered.
+ */
+ acp6x_disable_interrupts(adata->acp6x_base);
+ devm_free_irq(&pci->dev, pci->irq, adata);
+
if (adata->acp6x_audio_mode == ACP6x_PDM_MODE) {
for (index = 0; index < ACP6x_DEVS; index++)
platform_device_unregister(adata->pdev[index]);
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/5] ASoC: amd: yc: share the ACP6x DMIC board list
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
2026-12-02 20:17 ` [PATCH v2 1/5] ASoC: amd: yc: stop the shared IRQ before tearing down platform devices 陳チェン
@ 2026-12-02 20:17 ` 陳チェン
2026-12-02 20:17 ` [PATCH v2 3/5] ASoC: amd: yc: ask the firmware once about the ACP DMIC path 陳チェン
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:17 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
The board list in acp6x-mach.c is the only reliable indication that a
platform actually wires the ACP DMIC path; firmware is not usable for
that (some boards ship a _WOV template that unconditionally returns 1).
Move it to a separate source file linked into snd-pci-acp6x and expose
snd_acp6x_platform_has_dmic(), which folds in the _WOV and
AcpDmicConnected checks with the same precedence the machine driver
used. The machine driver now calls the helper instead of carrying its
own copy of the decision logic.
No functional change.
Signed-off-by: MuXian Chen <a18165943161@gmail.com>
---
sound/soc/amd/yc/Makefile | 2 +-
sound/soc/amd/yc/acp6x-mach.c | 959 +-------------------------------
sound/soc/amd/yc/acp6x-quirks.c | 829 +++++++++++++++++++++++++++
sound/soc/amd/yc/acp6x.h | 1 +
4 files changed, 842 insertions(+), 949 deletions(-)
create mode 100644 sound/soc/amd/yc/acp6x-quirks.c
diff --git a/sound/soc/amd/yc/Makefile b/sound/soc/amd/yc/Makefile
index 7a0a3a410b2d..be8ffc7bf230 100644
--- a/sound/soc/amd/yc/Makefile
+++ b/sound/soc/amd/yc/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
# Yellow Carp platform Support
-snd-pci-acp6x-y := pci-acp6x.o
+snd-pci-acp6x-y := pci-acp6x.o acp6x-quirks.o
snd-acp6x-pdm-dma-y := acp6x-pdm-dma.o
snd-soc-acp6x-mach-y := acp6x-mach.o
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 41f8c0885865..00b086902643 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -11,8 +11,7 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <linux/io.h>
-#include <linux/dmi.h>
-#include <linux/acpi.h>
+#include <linux/pci.h>
#include "acp6x.h"
@@ -44,961 +43,25 @@ static struct snd_soc_card acp6x_card = {
.num_links = 1,
};
-static const struct dmi_system_id yc_acp_quirk_table[] = {
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Aspire AG14-22P"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Lecoo"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bellator N176"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "HP Laptop 15-fc0xxx"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "OMEN Gaming Laptop 16-ap0xxx"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5525"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D1"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D2"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D3"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D4"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21D5"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CQ"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CR"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CM"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CN"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CH"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CJ"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CK"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21CL"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21EF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21EM"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21EN"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21HY"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21J0"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21J5"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21JN"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21M1"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21M3"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21M4"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "21ME"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82TL"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82UG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82UU"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82V2"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "82YM"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83AS"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83BS"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83HN"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83UU"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Nitro ANV15-41"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN17-41"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83J2"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "83J3"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M6400RC"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M3402RA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M6500RE"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M6501RM"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "E1504FA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M7600RE"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M3502RA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 B7ED"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A17 HX D8WFKG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7VE"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7VF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Alpha 17 C7VF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 17 D7VEK"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 17 D7VF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vector A16 HX A8WHG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A16 HX D7WFKG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Raider A18 HX A7VHG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vector A16 HX A8WIG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Raider A18 HX A9WJG"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7 AMD"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R1 AMD"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 14 2022"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Redmi G 2022"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Razer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Blade 14 (2022) - RZ09-0427"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Swift SFA16-41"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "IRBIS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "15NBC1011"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK PM1503CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16z-n000"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb1xxx"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb2xxx"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A42"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A43"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A44"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A22"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A3E"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A7F"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8A81"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8B27"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8B2F"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8BD6"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8EE4"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8E35"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_BOARD_NAME, "8F06"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Laptop 16-e1xxx"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "MECHREVO"),
- DMI_MATCH(DMI_BOARD_NAME, "MRID6"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "MDC"),
- DMI_MATCH(DMI_BOARD_NAME, "Herbag_MDU"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "MDC"),
- DMI_MATCH(DMI_BOARD_NAME, "Herbag2_MDU"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "System76"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "pang12"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "System76"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "pang13"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"),
- DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
- DMI_MATCH(DMI_BOARD_NAME, "XyloD5_RBU"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vivobook_ASUSLaptop M6501RR_M6501RR"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK BM1503CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_BOARD_NAME, "PM1503CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VF"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VE"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7UC"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M7601RM"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
- DMI_MATCH(DMI_BOARD_NAME, "MS-17LN"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_BOARD_NAME, "PM1403CDA"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vivobook_ASUSLaptop M6500RE_M6500RE"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "XIAOMI"),
- DMI_MATCH(DMI_BOARD_NAME, "TM2423"),
- }
- },
- {
- .driver_data = &acp6x_card,
- .matches = {
- DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "HP 255R 15.6 inch G10 Notebook PC"),
- }
- },
- {}
-};
-
static int acp6x_probe(struct platform_device *pdev)
{
- const struct dmi_system_id *dmi_id;
- struct snd_soc_card *card;
- struct acpi_device *adev;
- acpi_handle handle;
- acpi_integer dmic_status;
+ struct pci_dev *pci = to_pci_dev(pdev->dev.parent);
+ struct snd_soc_card *card = &acp6x_card;
int ret;
- bool is_dmic_enable, wov_en;
-
- /* IF WOV entry not found, enable dmic based on AcpDmicConnected entry*/
- is_dmic_enable = false;
- wov_en = true;
- /* check the parent device's firmware node has _DSD or not */
- adev = ACPI_COMPANION(pdev->dev.parent);
- if (adev) {
- const union acpi_object *obj;
-
- if (!acpi_dev_get_property(adev, "AcpDmicConnected",
ACPI_TYPE_INTEGER, &obj) &&
- obj->integer.value == 1)
- is_dmic_enable = true;
- }
-
- handle = ACPI_HANDLE(pdev->dev.parent);
- ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
- if (!ACPI_FAILURE(ret)) {
- wov_en = dmic_status;
- if (!wov_en)
- return -ENODEV;
- } else {
- /* Incase of ACPI method read failure then jump to check_dmi_entry */
- goto check_dmi_entry;
- }
- if (is_dmic_enable)
- platform_set_drvdata(pdev, &acp6x_card);
-
-check_dmi_entry:
- /* check for any DMI overrides */
- dmi_id = dmi_first_match(yc_acp_quirk_table);
- if (dmi_id)
- platform_set_drvdata(pdev, dmi_id->driver_data);
-
- card = platform_get_drvdata(pdev);
- if (!card)
+ if (!snd_acp6x_platform_has_dmic(pci))
return -ENODEV;
- dev_info(&pdev->dev, "Enabling ACP DMIC support via %s", dmi_id ?
"DMI" : "ACPI");
+
+ platform_set_drvdata(pdev, card);
+ dev_info(&pdev->dev, "Enabling ACP DMIC support\n");
acp6x_card.dev = &pdev->dev;
ret = devm_snd_soc_register_card(&pdev->dev, card);
- if (ret) {
+ if (ret)
return dev_err_probe(&pdev->dev, ret,
- "snd_soc_register_card(%s) failed\n",
- card->name);
- }
+ "snd_soc_register_card(%s) failed\n",
+ card->name);
+
return 0;
}
diff --git a/sound/soc/amd/yc/acp6x-quirks.c b/sound/soc/amd/yc/acp6x-quirks.c
new file mode 100644
index 000000000000..864400c7ff5a
--- /dev/null
+++ b/sound/soc/amd/yc/acp6x-quirks.c
@@ -0,0 +1,829 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * AMD Yellow Carp (ACP6x) platform quirks.
+ *
+ * The ACP block shares the audio clock domain with the HDA controller, so it
+ * must only be initialized on boards that actually use its DMIC path. That
+ * cannot be derived from firmware alone: some boards ship a template _WOV
+ * method that unconditionally returns 1, and others describe nothing at all.
+ * The boards that are known to wire the DMIC are listed below.
+ *
+ * The object is linked into snd-pci-acp6x, which owns the device and makes
+ * the decision; the machine driver asks the same helper before it registers
+ * its card, so both drivers always agree.
+ */
+
+#include <linux/acpi.h>
+#include <linux/dmi.h>
+#include <linux/pci.h>
+
+#include "acp6x.h"
+
+static const struct dmi_system_id yc_acp_quirk_table[] = {
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire AG14-22P"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Lecoo"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bellator N176"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP Laptop 15-fc0xxx"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "OMEN Gaming Laptop 16-ap0xxx"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5525"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D1"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D2"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D4"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21D5"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CQ"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CR"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CM"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CN"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CH"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CJ"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CK"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21CL"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21EF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21EM"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21EN"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21HY"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21J0"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21J5"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21J6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21JN"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21M1"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21M3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21M4"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21ME"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82QF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82TL"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82UG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82UU"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82V2"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "82YM"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83AS"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83BS"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83HN"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83L3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83N6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83UU"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Nitro ANV15-41"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN17-41"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83J2"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "83J3"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M6400RC"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M3402RA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M6500RC"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M6500RE"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M6501RM"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "E1504FA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M7600RE"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M3502RA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 B7ED"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A17 HX D8WFKG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7VE"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7VF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alpha 17 C7VF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 17 D7VEK"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 17 D7VF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vector A16 HX A8WHG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A16 HX D7WFKG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Raider A18 HX A7VHG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vector A16 HX A8WIG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Raider A18 HX A9WJG"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7 AMD"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Alienware"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R1 AMD"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 14 2022"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Redmi G 2022"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Razer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Blade 14 (2022) - RZ09-0427"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Swift SFA16-41"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "IRBIS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "15NBC1011"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK PM1503CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "OMEN by HP Gaming Laptop 16z-n000"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb1xxx"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Gaming Laptop 15-fb2xxx"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A42"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A43"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A44"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A22"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A3E"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A7F"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8A81"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8B27"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8B2F"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8BD6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8EE4"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8E35"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8F06"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Victus by HP Laptop 16-e1xxx"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "MECHREVO"),
+ DMI_MATCH(DMI_BOARD_NAME, "MRID6"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "MDC"),
+ DMI_MATCH(DMI_BOARD_NAME, "Herbag_MDU"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "MDC"),
+ DMI_MATCH(DMI_BOARD_NAME, "Herbag2_MDU"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "System76"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "pang12"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "System76"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "pang13"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7UCX"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "HONOR"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "GOH-X"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "RB"),
+ DMI_MATCH(DMI_BOARD_NAME, "XyloD5_RBU"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vivobook_ASUSLaptop M6501RR_M6501RR"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK BM1503CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "PM1503CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "BM1403CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VF"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7VE"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Thin A15 B7UC"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M7601RM"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+ DMI_MATCH(DMI_BOARD_NAME, "MS-17LN"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_BOARD_NAME, "PM1403CDA"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Vivobook_ASUSLaptop M6500RE_M6500RE"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "XIAOMI"),
+ DMI_MATCH(DMI_BOARD_NAME, "TM2423"),
+ }
+ },
+ {
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "HP 255R 15.6 inch G10 Notebook PC"),
+ }
+ },
+ {}
+};
+
+/**
+ * snd_acp6x_platform_has_dmic - Check whether the platform uses the ACP DMIC.
+ * @pci: the ACP PCI function.
+ *
+ * The firmware may veto the DMIC path explicitly through _WOV; otherwise the
+ * AcpDmicConnected property or the board list decides. Anything else means
+ * "no consumer", and the caller must leave the block untouched.
+ *
+ * Return: true if the ACP DMIC path is wired on this platform.
+ */
+bool snd_acp6x_platform_has_dmic(struct pci_dev *pci)
+{
+ struct acpi_device *adev = ACPI_COMPANION(&pci->dev);
+ const union acpi_object *obj;
+ acpi_integer wov;
+
+ /*
+ * _WOV is the firmware's own verdict: zero means "no DMIC path",
+ * anything else means "look further". Without the method only the
+ * board list applies, which is what the machine driver used to do.
+ */
+ if (!ACPI_HANDLE(&pci->dev) ||
+ acpi_evaluate_integer(ACPI_HANDLE(&pci->dev), "_WOV", NULL, &wov))
+ return !!dmi_first_match(yc_acp_quirk_table);
+
+ if (!wov)
+ return false;
+
+ if (adev && !acpi_dev_get_property(adev, "AcpDmicConnected",
+ ACPI_TYPE_INTEGER, &obj) &&
+ obj->integer.value == 1)
+ return true;
+
+ return !!dmi_first_match(yc_acp_quirk_table);
+}
+EXPORT_SYMBOL_GPL(snd_acp6x_platform_has_dmic);
diff --git a/sound/soc/amd/yc/acp6x.h b/sound/soc/amd/yc/acp6x.h
index 2de7d1edf00b..ae022bfaf7d7 100644
--- a/sound/soc/amd/yc/acp6x.h
+++ b/sound/soc/amd/yc/acp6x.h
@@ -107,4 +107,5 @@ static inline void acp6x_writel(u32 val, void
__iomem *base_addr)
}
int snd_amd_acp_find_config(struct pci_dev *pci);
+bool snd_acp6x_platform_has_dmic(struct pci_dev *pci);
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 3/5] ASoC: amd: yc: ask the firmware once about the ACP DMIC path
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
2026-12-02 20:17 ` [PATCH v2 1/5] ASoC: amd: yc: stop the shared IRQ before tearing down platform devices 陳チェン
2026-12-02 20:17 ` [PATCH v2 2/5] ASoC: amd: yc: share the ACP6x DMIC board list 陳チェン
@ 2026-12-02 20:17 ` 陳チェン
2026-12-02 20:17 ` [PATCH v2 4/5] ASoC: amd: yc: refuse the ACP function when no DMIC is wired 陳チェン
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:17 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
The machine driver used to evaluate _WOV on its own, after the PCI
driver had already initialized the block. Have the PCI driver run the
check once during probe and hand the resulting flag to the machine
device through platform data, following the convention used by the
other ACP platform drivers.
The machine driver now only reads the flag, so _WOV is evaluated once
per boot and the two drivers cannot reach different conclusions.
No functional change.
Signed-off-by: MuXian Chen <a18165943161@gmail.com>
---
sound/soc/amd/yc/acp6x-mach.c | 5 ++---
sound/soc/amd/yc/acp6x-quirks.c | 1 -
sound/soc/amd/yc/pci-acp6x.c | 10 ++++++++++
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 00b086902643..e6c899db2796 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -11,7 +11,6 @@
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <linux/io.h>
-#include <linux/pci.h>
#include "acp6x.h"
@@ -45,11 +44,11 @@ static struct snd_soc_card acp6x_card = {
static int acp6x_probe(struct platform_device *pdev)
{
- struct pci_dev *pci = to_pci_dev(pdev->dev.parent);
+ const bool *dmic = pdev->dev.platform_data;
struct snd_soc_card *card = &acp6x_card;
int ret;
- if (!snd_acp6x_platform_has_dmic(pci))
+ if (!dmic || !*dmic)
return -ENODEV;
platform_set_drvdata(pdev, card);
diff --git a/sound/soc/amd/yc/acp6x-quirks.c b/sound/soc/amd/yc/acp6x-quirks.c
index 864400c7ff5a..8b9b0338f7db 100644
--- a/sound/soc/amd/yc/acp6x-quirks.c
+++ b/sound/soc/amd/yc/acp6x-quirks.c
@@ -826,4 +826,3 @@ bool snd_acp6x_platform_has_dmic(struct pci_dev *pci)
return !!dmi_first_match(yc_acp_quirk_table);
}
-EXPORT_SYMBOL_GPL(snd_acp6x_platform_has_dmic);
diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
index 23ee574592cf..6398c22d938c 100644
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -20,6 +20,7 @@ struct acp6x_dev_data {
void __iomem *acp6x_base;
struct resource *res;
bool acp6x_audio_mode;
+ bool dmic;
struct platform_device *pdev[ACP6x_DEVS];
};
@@ -152,6 +153,7 @@ static int snd_acp6x_probe(struct pci_dev *pci,
int val = 0x00;
u32 addr;
unsigned int irqflags, flag;
+ bool has_dmic;
int ret;
irqflags = IRQF_SHARED;
@@ -171,6 +173,8 @@ static int snd_acp6x_probe(struct pci_dev *pci,
dev_dbg(&pci->dev, "acp6x pci device not found\n");
return -ENODEV;
}
+ has_dmic = snd_acp6x_platform_has_dmic(pci);
+
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
return -ENODEV;
@@ -196,6 +200,7 @@ static int snd_acp6x_probe(struct pci_dev *pci,
ret = -ENOMEM;
goto release_regions;
}
+ adata->dmic = has_dmic;
pci_set_master(pci);
pci_set_drvdata(pci, adata);
ret = acp6x_init(adata->acp6x_base);
@@ -252,6 +257,11 @@ static int snd_acp6x_probe(struct pci_dev *pci,
pdevinfo[2].name = "acp_yc_mach";
pdevinfo[2].id = 0;
pdevinfo[2].parent = &pci->dev;
+ /* The flag lives as long as the PCI device, which outlives the
+ * platform devices unregistered in ->remove().
+ */
+ pdevinfo[2].data = &adata->dmic;
+ pdevinfo[2].size_data = sizeof(adata->dmic);
for (index = 0; index < ACP6x_DEVS; index++) {
adata->pdev[index] =
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 4/5] ASoC: amd: yc: refuse the ACP function when no DMIC is wired
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
` (2 preceding siblings ...)
2026-12-02 20:17 ` [PATCH v2 3/5] ASoC: amd: yc: ask the firmware once about the ACP DMIC path 陳チェン
@ 2026-12-02 20:17 ` 陳チェン
2026-12-02 20:17 ` [PATCH v2 5/5] ASoC: amd: yc: allow forcing the ACP DMIC decision 陳チェン
2026-12-03 10:48 ` [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:17 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
An ACP6x function is present on every Yellow Carp platform, including
boards where nothing is wired behind it: no DMIC array, no I2S codec
and no SoundWire peripheral. Firmware does not say so. The ACPI node
carries no consumer description, and the _WOV method on some boards is
a template that unconditionally returns 1, so the driver cannot tell
"present" from "used".
Binding the function on such a board has no upside and a real cost: the
probe path runs acp6x_init() and the runtime suspend path then gates the
audio clock (ACP_CLKMUX_SEL = 0) in acp6x_deinit(). The ACP block
shares that clock domain with the HDA controller on the same PCI
segment, and HDA can end up with
snd_hda_intel 0000:06:00.6: CORB reset timeout#2, CORBRP = 65535
sometimes without recovering. This is the regression analysed in the
work item below.
Refuse the device instead, so that nothing is enabled, mapped or
initialized and no register in the shared clock domain is written. The
PCI core suspends the function after the failed probe, which leaves it
in the state firmware configured. Boards in the list keep binding and
registering the DMIC card as before.
Link: https://gitlab.freedesktop.org/drm/amd/-/work_items/5529
Tested on a MECHREVO JIAOLONG (rev 0x62): two s2idle cycles, no CORB
errors, onboard HDA and playback unaffected.
Signed-off-by: MuXian Chen <a18165943161@gmail.com>
---
sound/soc/amd/yc/pci-acp6x.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
index 6398c22d938c..e2075f7e771b 100644
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -174,6 +174,16 @@ static int snd_acp6x_probe(struct pci_dev *pci,
return -ENODEV;
}
has_dmic = snd_acp6x_platform_has_dmic(pci);
+ if (!has_dmic) {
+ /*
+ * Nothing consumes the ACP on this board: no DMIC array, no
+ * I2S codec, no SoundWire peripheral. Binding the function
+ * would only invite acp6x_init() and the shared clock gating
+ * in acp6x_deinit(), so decline the device instead.
+ */
+ dev_info(&pci->dev, "no ACP consumer, not binding\n");
+ return -ENODEV;
+ }
if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n");
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 5/5] ASoC: amd: yc: allow forcing the ACP DMIC decision
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
` (3 preceding siblings ...)
2026-12-02 20:17 ` [PATCH v2 4/5] ASoC: amd: yc: refuse the ACP function when no DMIC is wired 陳チェン
@ 2026-12-02 20:17 ` 陳チェン
2026-12-03 10:48 ` [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: 陳チェン @ 2026-12-02 20:17 UTC (permalink / raw)
To: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: linux-sound, linux-kernel, Mario Limonciello, MuXian Chen
Board detection can be wrong in both directions: a board may wire the
DMIC without being listed, and a listed board may have it disabled in
firmware. Follow the snd-intel-dspcfg.dsp_driver convention and add a
read-only module parameter so the decision can be overridden from the
kernel command line or modprobe.d:
snd_pci_acp6x.dmic=0 auto (default)
snd_pci_acp6x.dmic=1 force the DMIC path on
snd_pci_acp6x.dmic=2 force it off
The override is applied inside snd_acp6x_platform_has_dmic(), so the
flag handed to the machine driver already reflects it. Forcing it on
initializes a block that shares its clock domain with HDA; that is the
caller's choice and may break HDA on boards that do not wire it.
Signed-off-by: MuXian Chen <a18165943161@gmail.com>
---
sound/soc/amd/yc/acp6x-quirks.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-quirks.c b/sound/soc/amd/yc/acp6x-quirks.c
index 8b9b0338f7db..44c990f68e07 100644
--- a/sound/soc/amd/yc/acp6x-quirks.c
+++ b/sound/soc/amd/yc/acp6x-quirks.c
@@ -19,6 +19,17 @@
#include "acp6x.h"
+enum acp6x_dmic_mode {
+ ACP6X_DMIC_AUTO = 0,
+ ACP6X_DMIC_ON,
+ ACP6X_DMIC_OFF,
+ ACP6X_DMIC_LAST = ACP6X_DMIC_OFF,
+};
+
+static int dmic;
+module_param(dmic, int, 0444);
+MODULE_PARM_DESC(dmic, "Force the ACP DMIC path (0=auto, 1=on, 2=off)");
+
static const struct dmi_system_id yc_acp_quirk_table[] = {
{
.matches = {
@@ -807,6 +818,9 @@ bool snd_acp6x_platform_has_dmic(struct pci_dev *pci)
const union acpi_object *obj;
acpi_integer wov;
+ if (dmic > ACP6X_DMIC_AUTO && dmic <= ACP6X_DMIC_LAST)
+ return dmic == ACP6X_DMIC_ON;
+
/*
* _WOV is the firmware's own verdict: zero means "no DMIC path",
* anything else means "look further". Without the method only the
--
2.56.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
` (4 preceding siblings ...)
2026-12-02 20:17 ` [PATCH v2 5/5] ASoC: amd: yc: allow forcing the ACP DMIC decision 陳チェン
@ 2026-12-03 10:48 ` Mark Brown
5 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-12-03 10:48 UTC (permalink / raw)
To: 陳チェン
Cc: Vijendar Mukunda, Venkata Prasad Potturu, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel,
Mario Limonciello
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
On Wed, Dec 02, 2026 at 02:15:17PM -0600, 陳チェン wrote:
> The ACP6x function is present on every Yellow Carp platform, including
> boards where nothing is wired behind it: no DMIC array, no I2S codec and
> no SoundWire peripheral. Firmware does not say so. The ACPI node
> carries no consumer description, and the _WOV method on some boards is a
> template that unconditionally returns 1, so the driver cannot tell
> "present" from "used".
This doesn't apply against current code, please check and resend.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-12-03 10:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-02 20:15 [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired 陳チェン
2026-12-02 20:17 ` [PATCH v2 1/5] ASoC: amd: yc: stop the shared IRQ before tearing down platform devices 陳チェン
2026-12-02 20:17 ` [PATCH v2 2/5] ASoC: amd: yc: share the ACP6x DMIC board list 陳チェン
2026-12-02 20:17 ` [PATCH v2 3/5] ASoC: amd: yc: ask the firmware once about the ACP DMIC path 陳チェン
2026-12-02 20:17 ` [PATCH v2 4/5] ASoC: amd: yc: refuse the ACP function when no DMIC is wired 陳チェン
2026-12-02 20:17 ` [PATCH v2 5/5] ASoC: amd: yc: allow forcing the ACP DMIC decision 陳チェン
2026-12-03 10:48 ` [PATCH v2 0/5] ASoC: amd: yc: do not bind the ACP when no DMIC is wired Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®