PCI: Disable async suspend for MSI Raider A18 HX A9WJG audio
PATCH 1/1 PCI: Disable async suspend for MSI Raider A18 HX A9WJG audio
On the MSI Raider A18 HX A9WJG, the AMD ACP function and AMD Azalia/HDA function are exposed as separate PCI functions, but the ACPI CPMACPV4 table tracks their presence with shared state and uses common power-gating methods for both.
With asynchronous system suspend/resume, these two functions can resume in parallel. On this machine that can leave the HDA controller unresponsive, with CORBRP reads returning 0xffff and the kernel logging:
snd_hda_intel 0000:6a:00.6: CORB reset timeout#2, CORBRP = 65535
When this happens, HDA speaker playback fails after resume and the ACP DMIC path can also fail with PDM DMA trigger timeouts. Disabling runtime PM and D3cold for both functions does not avoid the failure, but disabling asynchronous PM globally via /sys/power/pm_async does.
Disable async suspend only for the affected MSI subsystem and only for the two AMD audio functions, so the rest of the system can continue to use async suspend/resume.
This is independent of the ASoC DMI quirk which exposes the ACP DMIC on this system; that quirk makes the microphone visible, while this PCI quirk fixes the resume ordering problem between the ACP and HDA PCI functions.
Tested on MSI Raider A18 HX A9WJG (MS-182L), BIOS E182LAMS.31A, with pm_async=1 over s2idle. After resume, HDA speaker playback worked and the PipeWire ACP DMIC source recorded successfully, with no CORB reset timeout, ACP timeout, or ASoC error in the checked post-resume log.
--- drivers/pci/quirks.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/pci/quirks.c +19 -0
@@ -1904,6 +1904,25 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_CLASS_STORADECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_JMICRON ,0x2362 , quirk_jmicron_async_suspend);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_JMICRON ,0x236f , quirk_jmicron_async_suspend); +/* +* MSI Raider A18 HX A9WJG (MS-182L) exposes ACP and Azalia as separate PCI +* functions, but ACPI uses shared power gating for both. If they suspend or +* resume in parallel, the HDA controller may become unresponsive. +*/ +static void quirk_msi_a18_audio_async_suspend (struct pci_dev *dev) +{ +if (dev->subsystem_vendor !=0x1462 || + dev->subsystem_device !=0x14a5 ) +return ; + +device_disable_async_suspend (&dev->dev); +pci_info (dev,"async suspend disabled to avoid audio power-on ordering issue\n" ); +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_AMD ,0x15e2 , + quirk_msi_a18_audio_async_suspend); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_AMD ,0x15e3 , + quirk_msi_a18_audio_async_suspend); +#ifdef CONFIG_X86_IO_APIC static void quirk_alder_ioapic (struct pci_dev *pdev) {
Signature · 1 line
2.54.0