Public bug reported:

# Kernel Bug Report: Missing DMIC support in snd_rpl_pci_acp6x for MSI
Vector A16 HX (Dragon Range, ACP rev 0x62)

## Where to submit

**Primary — Kernel Bugzilla:**
https://bugzilla.kernel.org/enter_bug.cgi
- Product: **Drivers**
- Component: **Sound(ALSA)**

**Secondary — Linux kernel mailing list (alsa-devel):**
[email protected]

**Related existing discussion (May 2025):**
https://www.spinics.net/linux/fedora/linux-sound/msg22861.html
(Jason Mo reported the same issue; AMD's Mario Limonciello confirmed it's a 
missing feature)

**Related Arch Linux thread:**
https://bbs.archlinux.org/viewtopic.php?pid=2286013

---

## Bug Title

`ASoC: amd: rpl: snd_rpl_pci_acp6x lacks DMIC/PDM support for Dragon
Range mobile platforms (ACP rev 0x62)`

---

## Bug Description

### Summary

The `snd_rpl_pci_acp6x` driver for AMD ACP6x Audio Coprocessor (PCIe
revision 0x62) does not register any ALSA capture devices. The driver
performs basic PCI initialization (power on, reset) but does not create
the platform devices (`acp_yc_pdm_dma`, `dmic-codec`, `acp_yc_mach`)
needed for DMIC support. This leaves the built-in digital microphone
completely non-functional on Dragon Range mobile platforms.

This contrasts with the Yellow Carp driver (`snd_pci_acp6x` in
`sound/soc/amd/yc/pci-acp6x.c`) which handles revisions 0x60/0x6f and
includes full DMIC/PDM support with platform device registration.

As confirmed by AMD's Mario Limonciello on the linux-sound mailing list
(May 1, 2025): the RPL driver was developed for "Raphael" (a pure
desktop APU with no DMIC), but "Dragon Range" shares the same IO die and
is used in mobile designs where DMICs are physically connected. DMIC
support for the RPL driver is a missing feature.

### Affected Hardware

- **Laptop:** MSI Vector A16 HX A8WHG (board: MS-15MM)
- **CPU:** AMD Ryzen 9 7945HX (Dragon Range)
- **Audio Coprocessor:** AMD ACP/ACP3X/ACP6x (PCI ID 1022:15e2, **rev 0x62**)
- **Audio Codec:** Realtek ALC274 (handles speakers/headphone only)
- **DMIC:** Built-in digital microphone array (connected via ACP, works in 
Windows with "AMD Array Device" / Realtek drivers)
- **Sys Vendor:** `Micro-Star International Co., Ltd.`
- **Product Name:** `Vector A16 HX A8WHG`
- **Board Name:** `MS-15MM`

### Kernel Version Tested

- Ubuntu 24.04 LTS, kernel `6.8.0-107-generic`
- Also tested with mainline `6.12.80` — same result

### Symptoms

- `snd_rpl_pci_acp6x` loads and enables the PCI device, but creates no platform 
sub-devices
- `arecord -l` shows only the ALC274 analog capture — no DMIC device
- No `acp_yc_mach`, `acp_yc_pdm_dma`, or `dmic-codec` platform devices exist
- The microphone works perfectly in Windows 11 (dual boot)

### lspci output

```
01:00.1 Audio device: NVIDIA Corporation Device 2f80 (rev a1)
6a:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon 
High Definition Audio Controller
6a:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] 
ACP/ACP3X/ACP6x Audio Coprocessor (rev 62)
6a:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD 
Audio Controller
```

### dmesg (audio related)

```
[    2.622314] snd_rpl_pci_acp6x 0000:6a:00.5: enabling device (0000 -> 0002)
```

No further ACP/DMIC/PDM messages — the driver just initializes PCI and
stops.

### arecord -l (before fix)

```
**** List of CAPTURE Hardware Devices ****
card 2: Generic_1 [HD-Audio Generic], device 0: ALC274 Analog [ALC274 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
```

### /proc/asound/cards

```
 0 [NVidia         ]: HDA-Intel - HDA NVidia
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
 2 [Generic_1      ]: HDA-Intel - HD-Audio Generic
```

### DMI Information

```
Board Vendor:  Micro-Star International Co., Ltd.
Product Name:  Vector A16 HX A8WHG
Board Name:    MS-15MM
Sys Vendor:    Micro-Star International Co., Ltd.
```

---

## Root Cause Analysis

The `snd_rpl_pci_acp6x` driver (`sound/soc/amd/rpl/rpl-pci-acp6x.c`) is
a minimal stub. Its `snd_rpl_probe()` function only:

1. Checks PCI revision (0x62)
2. Enables the PCI device
3. Maps MMIO registers
4. Powers on and resets the ACP
5. Sets up power management

It does **NOT**:

- Read `ACP_PIN_CONFIG` to determine audio mode
- Create `acp_yc_pdm_dma` platform device (PDM DMA engine)
- Create `dmic-codec` platform device (DMIC codec)
- Create `acp_yc_mach` platform device (machine driver with DMI quirk matching)
- Set up IRQ handler for audio

Compare with `sound/soc/amd/yc/pci-acp6x.c` (Yellow Carp, rev 0x60/0x6f)
which performs all of the above in its `snd_acp6x_probe()` function.

---

## Tested Workaround

The following workaround has been tested and confirmed working on kernel
6.8.0-107-generic:

### 1. Blacklist the RPL stub driver

```bash
echo 'blacklist snd_rpl_pci_acp6x' | sudo tee /etc/modprobe.d/acp6x-dmic.conf
```

### 2. Patch `sound/soc/amd/yc/pci-acp6x.c` — add rev 0x62

```diff
--- a/sound/soc/amd/yc/pci-acp6x.c
+++ b/sound/soc/amd/yc/pci-acp6x.c
@@ -162,6 +162,7 @@
        switch (pci->revision) {
        case 0x60:
+       case 0x62:
        case 0x6f:
                break;
        default:
```

### 3. Patch `sound/soc/amd/yc/acp6x-mach.c` — add MSI Vector A16 HX to
DMI quirk table

```diff
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -475,6 +475,13 @@
        },
+       {
+               .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 = {
```

### 4. Result after patching

```
dmesg:
[    2.672698] snd_pci_acp6x 0000:6a:00.5: enabling device (0000 -> 0002)
[    3.955475] acp_yc_mach acp_yc_mach.0: Enabling ACP DMIC support via DMI

arecord -l:
**** List of CAPTURE Hardware Devices ****
card 2: Generic_1 [HD-Audio Generic], device 0: ALC274 Analog [ALC274 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: acp6x [acp6x], device 0: DMIC capture dmic-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
```

DMIC capture is fully functional — tested with `arecord` and desktop
audio settings.

---

## Suggested Proper Fix

Rather than the workaround above, the proper fix would be one of:

**Option A (minimal):** Add revision 0x62 to the YC driver's accepted
revisions and add the MSI Vector A16 HX to the DMI quirk table. This
works because the ACP hardware is register-compatible.

**Option B (proper):** Extend the RPL driver (`rpl-pci-acp6x.c`) to
create PDM/DMIC platform devices when DMIC hardware is detected, similar
to how the YC driver does it. This would benefit all Dragon Range mobile
platforms, not just this specific MSI model. This is the approach AMD
acknowledged as the correct long-term solution.

Additionally, MSI should be encouraged to add the `AcpDmicConnected`
ACPI _DSD property to their BIOS, which would allow automatic DMIC
detection without per-model DMI quirks (this mechanism already exists in
the YC driver's `acp6x_probe()`).

---

## System Information

```
OS: Ubuntu 24.04.3 LTS
Kernel: 6.8.0-107-generic (also tested 6.12.80 mainline)
Architecture: x86_64
CPU: AMD Ryzen 9 7945HX (Dragon Range)
GPU: NVIDIA RTX 5070 Ti
```

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2147528

Title:
  Kernel Bug Report: Missing DMIC support in snd_rpl_pci_acp6x for MSI
  Vector A16 HX (Dragon Range, ACP rev 0x62)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2147528/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to