No internal microphone with AMD ACP/ACP3X/ACP6x

Hello everyone!
I’m back from about a year on Arch because I needed to compile my own kernel module for getting the internal microphone to work.

I really really want to use NixOS though so here I am. I will stay even with no mic this time but I thought I’d at least try my luck asking for help from you knowledgeable people.

Here’s some info - let me know what else you need, and thank you for your time!

My relevant config:

  # hardware.url = "github:nixos/nixos-hardware";
  imports = [
    inputs.hardware.nixosModules.common-cpu-amd
    inputs.hardware.nixosModules.common-gpu-amd
    inputs.hardware.nixosModules.common-gpu-nvidia-disable
    inputs.hardware.nixosModules.common-pc-laptop
    inputs.hardware.nixosModules.common-pc-ssd
    ./hardware-configuration.nix
  ];

  boot.initrd.kernelModules = [ "amdgpu" "snd_pci_acp6x"];
  boot.kernelPackages = pkgs.linuxPackages_latest;
  sound.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    pulse.enable = true;
    wireplumber.enable = true;
  };

Info about my system:

neofetch --off
ab@abdev
--------
OS: NixOS 23.11.20240225.5bf1cad (Tapir) x86_64
Host: ASUSTeK COMPUTER INC. M6501RM
Kernel: 6.7.6
Uptime: 3 mins
Packages: 1005 (nix-system), 400 (nix-user)
Shell: fish 3.7.0
Resolution: 2880x1620
WM: sway
Theme: Dracula [GTK3]
Icons: Adwaita [GTK3]
Terminal: WezTerm
CPU: AMD Ryzen 7 6800H with Radeon Graphics (16) @ 4.785GHz
GPU: AMD ATI Radeon 680M
Memory: 1725MiB / 31344MiB
dmidecode -t baseboard
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.4.0 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: ASUSTeK COMPUTER INC.
        Product Name: M6501RM
        Version: 1.0
        Serial Number: N938NBCV00BWX9MB
        Asset Tag: ATN12345678901234567
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: MIDDLE
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

Handle 0x002A, DMI type 10, 26 bytes
On Board Device 1 Information
        Type: Video
        Status: Enabled
        Description: VGA
On Board Device 2 Information
        Type: Ethernet
        Status: Enabled
        Description: GLAN
On Board Device 3 Information
        Type: Ethernet
        Status: Enabled
        Description: WLAN
On Board Device 4 Information
        Type: Sound
        Status: Enabled
        Description: Audio CODEC
On Board Device 5 Information
        Type: SATA Controller
        Status: Enabled
        Description: SATA Controller
On Board Device 6 Information
        Type: Other
        Status: Enabled
        Description: USB 2.0 Controller
On Board Device 7 Information
        Type: Other
        Status: Enabled
        Description: USB 3.0 Controller
On Board Device 8 Information
        Type: Other
        Status: Enabled
        Description: SMBus Controller
On Board Device 9 Information
        Type: Other
        Status: Enabled
        Description: Card Reader
On Board Device 10 Information
        Type: Other
        Status: Enabled
        Description: Cmos Camera
On Board Device 11 Information
        Type: Other
        Status: Enabled
        Description: Bluetooth
lspci | grep Audio
66:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
66:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 60)
66:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller```
arecord -l

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

lsmod | grep acp
snd_acp6x_pdm_dma      12288  0
snd_soc_acp6x_mach     28672  0
snd_sof_amd_acp63      16384  0
snd_sof_amd_acp        61440  4 snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_sof_amd_renoir
snd_sof_pci            24576  4 snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_sof_amd_renoir
snd_sof_xtensa_dsp     16384  1 snd_sof_amd_acp
snd_sof               360448  2 snd_sof_amd_acp,snd_sof_pci
snd_soc_core          430080  4 snd_soc_acp6x_mach,snd_sof,snd_acp6x_pdm_dma,snd_soc_dmic
snd_rpl_pci_acp6x      16384  0
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
snd_acp_pci            12288  0
snd_acp_legacy_common    16384  1 snd_acp_pci
snd_pci_acp5x          16384  0
snd_rn_pci_acp3x       20480  0
ucsi_acpi              12288  0
typec_ucsi             61440  1 ucsi_acpi
snd_pci_acp3x          16384  0
i2c_hid_acpi           12288  0
i2c_hid                40960  1 i2c_hid_acpi
acpi_tad               20480  0
snd_pci_acp6x          16384  0
snd_pcm               196608  13 snd_sof_amd_acp,snd_hda_codec_hdmi,snd_pci_acp6x,snd_hda_intel,snd_hda_codec,snd_sof,snd_acp6x_pdm_dma,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pci_ps,snd_pcm_dmaengine
snd_acp_config         20480  9 snd_rn_pci_acp3x,snd_pci_acp6x,snd_pci_acp5x,snd_sof_amd_rembrandt,snd_sof_amd_vangogh,snd_sof_amd_acp63,snd_acp_pci,snd_pci_ps,snd_sof_amd_renoir
snd_soc_acpi           16384  2 snd_sof_amd_acp,snd_acp_config
firmware_class         53248  18 r8169,mt792x_lib,ccp,btrtl,snd_sof_amd_acp,snd_hda_intel,xhci_pci_renesas,btmtk,snd_sof,drm_display_helper,btintel,btbcm,amdgpu,btusb,mt7921_common,mt76_connac_lib,cfg80211,drm
lshw -c multimedia
  *-multimedia:0
       description: Generic
       physical id: 0.1
       bus info: pci@0000:66:00.1
       logical name: card0
       logical name: /dev/snd/controlC0
       logical name: /dev/snd/hwC0D0
       logical name: /dev/snd/pcmC0D3p
       logical name: /dev/snd/pcmC0D7p
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:113 memory:dd9c8000-dd9cbfff
  *-multimedia:1
       physical id: 0.5
       bus info: pci@0000:66:00.5
       version: 60
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_pci_acp6x latency=0
       resources: irq:44 memory:dd980000-dd9bffff
  *-multimedia:2
       description: Generic_1
       physical id: 0.6
       bus info: pci@0000:66:00.6
       logical name: card1
       logical name: /dev/snd/controlC1
       logical name: /dev/snd/hwC1D0
       logical name: /dev/snd/pcmC1D0c
       logical name: /dev/snd/pcmC1D0p
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi bus_master cap_list
       configuration: driver=snd_hda_intel latency=0
       resources: irq:114 memory:dd9c0000-dd9c7fff
  *-usb
       description: Video
       product: USB2.0 FHD UVC WebCam
       vendor: Sonix Technology Co., Ltd.
       physical id: 1
       bus info: usb@5:1
       version: 0.03
       capabilities: usb-2.01
       configuration: driver=uvcvideo maxpower=500mA speed=480Mbit/s
inxi -Azy
Audio:
  Device-1: AMD Rembrandt Radeon High Definition Audio driver: snd_hda_intel
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_pci_acp6x
  Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel
  Sound Server-1: ALSA v: k6.7.6 running: yes
  Sound Server-2: PipeWire v: 1.0.1 running: yes

Any and all help much appreciated!

I’m having the same issue with NixOS 23.11 on two laptops…

Any updates? I accidentally solved the issue on one of my laptops and now going crazy trying to understand what I did to fix it

The kernel driver snd_rpl_pci_acp6x is missing the DMIC support so far.

For DMIC support, there are three driver parts, which is the pci driver, the dma driver, and the machine driver. But in rpl patform’s driver, only has the pci part.

BTW, I think AMD just copy-paste yc platform’s code to rpl, the exist part is same. I think complete the missing parts (mach, dma) will let the DMIC stuff work, but when I do this, I received a kernel panic, I think I did something wrong but I have nothing to do with the error (I only get a blackscreen without any useful information)

For reference, the following links may be helpful.

1 Like

https://0x0.st/Pbw6.patch

sound-soc-amd-rpl-Add-DMIC-support.patch

Could you try this patch with 6.19 kernel source?
I hope this works, but on my machine, i cannot get it boot.

The forum has a message length limit that I cannot put the full patch directly in one message, if the link expires, please reply this message in this thread.

Since this post I gave up and reverted to Arch, then I got a new intel based laptop and am now back on NixOS with no issues. Good luck!

1 Like

running 21MCCTO1WW (ThinkPad T14 Gen 5)

adding boot.kernelModules = [ “snd_pci_acp6x” ]; does the trick.
modules set to boot.initrd.kernelModules will only be present in stage 1 init, so to have them in stage 2 and the actual system, you need to set boot.kernelModules. you can ofc set both but I don’t know why you’d need working audio in stage 1.