[PATCH v2] ASoC: amd: ps: Add support for MSI Crosshair A16 HX

Sidharth Sharma posted 1 patch 1 week ago
sound/soc/amd/ps/acp63.h  |  1 +
sound/soc/amd/ps/pci-ps.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
[PATCH v2] ASoC: amd: ps: Add support for MSI Crosshair A16 HX
Posted by Sidharth Sharma 1 week ago
The MSI Crosshair A16 HX (D8WFKG) uses a Ryzen 9 8940HX processor,
which identifies with ACP PCI revision 0x62. This revision is currently
unlisted in the Pink Sardine driver, causing the probe to return -ENODEV.

Furthermore, the MSI BIOS lacks the necessary 'acp-audio-device-type'
and '_WOV' ACPI entries required to automatically route the internal
digital microphone array.

Add the 0x62 revision to the PCI validation switch block, and introduce
a DMI quirk table to manually force the PDM configuration flag for this
specific board, allowing the acp63-dmic-capture node to map correctly.

Signed-off-by: Sidharth Sharma <wednisegit@gmail.com>
---
Changes in v2:
- Moved ACP62_PCI_REV definition from pci-ps.c to acp63.h for consistency.

 sound/soc/amd/ps/acp63.h  |  1 +
 sound/soc/amd/ps/pci-ps.c | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h
index 62cb6bef1..4f955a817 100644
--- a/sound/soc/amd/ps/acp63.h
+++ b/sound/soc/amd/ps/acp63.h
@@ -11,6 +11,7 @@
 #define ACP_DEVICE_ID 0x15E2
 #define ACP63_REG_START		0x1240000
 #define ACP63_REG_END		0x125C000
+#define ACP62_PCI_REV 		0x62
 #define ACP63_PCI_REV		0x63
 #define ACP70_PCI_REV		0x70
 #define ACP71_PCI_REV		0x71
diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
index 9751cf078..561921d4b 100644
--- a/sound/soc/amd/ps/pci-ps.c
+++ b/sound/soc/amd/ps/pci-ps.c
@@ -17,10 +17,22 @@
 #include <linux/pm_runtime.h>
 #include <linux/iopoll.h>
 #include <linux/soundwire/sdw_amd.h>
+#include <linux/dmi.h>
 #include "../mach-config.h"
 
 #include "acp63.h"
 
+static const struct dmi_system_id acp63_dmic_quirk_table[] = {
+	{
+		.ident = "MSI Crosshair A16 HX",
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A16 HX D8WFKG"),
+		}
+	},
+	{}
+};
+
 static void handle_acp70_sdw_wake_event(struct acp63_dev_data *adata)
 {
 	struct amd_sdw_manager *amd_manager;
@@ -436,6 +448,12 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
 	if (dmic_en && wov_en)
 		is_dmic_dev = true;
 
+	/* fallback for msi firmware lacking standard acpi audio routing flags */
+	if (dmi_check_system(acp63_dmic_quirk_table)) {
+		is_dmic_dev = true;
+		acp_data->is_pdm_config = true;
+	}
+
 	if (acp_data->is_sdw_config) {
 		ret = acp_scan_sdw_devices(&pci->dev, ACP63_SDW_ADDR);
 		if (!ret && acp_data->info.link_mask)
@@ -587,6 +605,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
 
 	/* ACP PCI revision id check for ACP6.3, ACP7.0 & ACP7.1 platforms */
 	switch (pci->revision) {
+	case ACP62_PCI_REV:
 	case ACP63_PCI_REV:
 	case ACP70_PCI_REV:
 	case ACP71_PCI_REV:
-- 
2.53.0
Re: [PATCH v2] ASoC: amd: ps: Add support for MSI Crosshair A16 HX
Posted by Mark Brown 6 days, 21 hours ago
On Mon, May 18, 2026 at 02:09:55AM +0530, Sidharth Sharma wrote:
> The MSI Crosshair A16 HX (D8WFKG) uses a Ryzen 9 8940HX processor,
> which identifies with ACP PCI revision 0x62. This revision is currently
> unlisted in the Pink Sardine driver, causing the probe to return -ENODEV.

> @@ -587,6 +605,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
>  
>  	/* ACP PCI revision id check for ACP6.3, ACP7.0 & ACP7.1 platforms */
>  	switch (pci->revision) {
> +	case ACP62_PCI_REV:
>  	case ACP63_PCI_REV:
>  	case ACP70_PCI_REV:
>  	case ACP71_PCI_REV:

Don't we also need an update to acp_hw_init_ops()?
Re: [PATCH v2] ASoC: amd: ps: Add support for MSI Crosshair A16 HX
Posted by Mukunda,Vijendar 6 days, 21 hours ago

On 5/18/26 14:09, Mark Brown wrote:
> On Mon, May 18, 2026 at 02:09:55AM +0530, Sidharth Sharma wrote:
>> The MSI Crosshair A16 HX (D8WFKG) uses a Ryzen 9 8940HX processor,
>> which identifies with ACP PCI revision 0x62. This revision is currently
>> unlisted in the Pink Sardine driver, causing the probe to return -ENODEV.
>> @@ -587,6 +605,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
>>   
>>   	/* ACP PCI revision id check for ACP6.3, ACP7.0 & ACP7.1 platforms */
>>   	switch (pci->revision) {
>> +	case ACP62_PCI_REV:
>>   	case ACP63_PCI_REV:
>>   	case ACP70_PCI_REV:
>>   	case ACP71_PCI_REV:
> Don't we also need an update to acp_hw_init_ops()?
This patch should be dropped. ACP PCI rev id:0x62 support is included
in sound/soc/amd/yc folder.  Code changes related to any new platform
addition for ACP PCI rev id 0x62 should be included in yc folder.

Re: [PATCH v2] ASoC: amd: ps: Add support for MSI Crosshair A16 HX
Posted by Mukunda,Vijendar 1 week ago
On 18/05/26 02:09, Sidharth Sharma wrote:
> [You don't often get email from wednisegit@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> The MSI Crosshair A16 HX (D8WFKG) uses a Ryzen 9 8940HX processor,
> which identifies with ACP PCI revision 0x62. This revision is currently
> unlisted in the Pink Sardine driver, causing the probe to return -ENODEV.
>
> Furthermore, the MSI BIOS lacks the necessary 'acp-audio-device-type'
> and '_WOV' ACPI entries required to automatically route the internal
> digital microphone array.
>
> Add the 0x62 revision to the PCI validation switch block, and introduce
> a DMI quirk table to manually force the PDM configuration flag for this
> specific board, allowing the acp63-dmic-capture node to map correctly.


For ACP platform with PCI revision id:0x62, required support is included
in YC base driver i.e sound/soc/amd/yc folder. i.e any new platform support
based on ACP6.2 should be included in YC folder.
This patch should be dropped.


>
> Signed-off-by: Sidharth Sharma <wednisegit@gmail.com>
> ---
> Changes in v2:
> - Moved ACP62_PCI_REV definition from pci-ps.c to acp63.h for consistency.
>
>  sound/soc/amd/ps/acp63.h  |  1 +
>  sound/soc/amd/ps/pci-ps.c | 19 +++++++++++++++++++
>  2 files changed, 20 insertions(+)
>
> diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h
> index 62cb6bef1..4f955a817 100644
> --- a/sound/soc/amd/ps/acp63.h
> +++ b/sound/soc/amd/ps/acp63.h
> @@ -11,6 +11,7 @@
>  #define ACP_DEVICE_ID 0x15E2
>  #define ACP63_REG_START                0x1240000
>  #define ACP63_REG_END          0x125C000
> +#define ACP62_PCI_REV          0x62
>  #define ACP63_PCI_REV          0x63
>  #define ACP70_PCI_REV          0x70
>  #define ACP71_PCI_REV          0x71
> diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c
> index 9751cf078..561921d4b 100644
> --- a/sound/soc/amd/ps/pci-ps.c
> +++ b/sound/soc/amd/ps/pci-ps.c
> @@ -17,10 +17,22 @@
>  #include <linux/pm_runtime.h>
>  #include <linux/iopoll.h>
>  #include <linux/soundwire/sdw_amd.h>
> +#include <linux/dmi.h>
>  #include "../mach-config.h"
>
>  #include "acp63.h"
>
> +static const struct dmi_system_id acp63_dmic_quirk_table[] = {
> +       {
> +               .ident = "MSI Crosshair A16 HX",
> +               .matches = {
> +                       DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
> +                       DMI_MATCH(DMI_PRODUCT_NAME, "Crosshair A16 HX D8WFKG"),
> +               }
> +       },
> +       {}
> +};
> +
>  static void handle_acp70_sdw_wake_event(struct acp63_dev_data *adata)
>  {
>         struct amd_sdw_manager *amd_manager;
> @@ -436,6 +448,12 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
>         if (dmic_en && wov_en)
>                 is_dmic_dev = true;
>
> +       /* fallback for msi firmware lacking standard acpi audio routing flags */
> +       if (dmi_check_system(acp63_dmic_quirk_table)) {
> +               is_dmic_dev = true;
> +               acp_data->is_pdm_config = true;
> +       }
> +
>         if (acp_data->is_sdw_config) {
>                 ret = acp_scan_sdw_devices(&pci->dev, ACP63_SDW_ADDR);
>                 if (!ret && acp_data->info.link_mask)
> @@ -587,6 +605,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
>
>         /* ACP PCI revision id check for ACP6.3, ACP7.0 & ACP7.1 platforms */
>         switch (pci->revision) {
> +       case ACP62_PCI_REV:
>         case ACP63_PCI_REV:
>         case ACP70_PCI_REV:
>         case ACP71_PCI_REV:
> --
> 2.53.0
>