You are not logged in.
I have a Mini PC that has a microphone soldered to the board. The snd_hda_codec_realtek module is detecting it. Is there a parameter I can add to have the module not supply this functionality?
% journalctl -b --output=cat | grep snd
snd_hda_intel 0000:c6:00.1: enabling device (0000 -> 0002)
snd_hda_intel 0000:c6:00.1: Handle vga_switcheroo audio client
snd_hda_intel 0000:c6:00.6: enabling device (0000 -> 0002)
snd_hda_intel 0000:c6:00.1: bound 0000:c6:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC269VC: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x15/0x0/0x0/0x0/0x0)
snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
snd_hda_codec_realtek hdaudioC1D0: inputs:
snd_hda_codec_realtek hdaudioC1D0: Mic=0x18
snd_hda_codec_realtek hdaudioC1D0: Internal Mic=0x12
snd_pci_ps 0000:c6:00.5: enabling device (0000 -> 0002)
snd_hda_intel 0000:c6:00.1: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
Last edited by graysky (2025-02-18 23:43:22)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
You care for the microphone specifically (not just the entire chip because you're going to use HDMI audio anyway)?
And userspace (alsamixer) isn't an option because you want to lock the kernel¹ for security considerations?
Your best shot is likely to manipulate snd_hda_intel.model to a value away from ALC269VC that "breaks" the microphone but preserves the other features.
¹ otherwise disabling this w/ a kernel module parameter is a fallacy since a privileged user could reload the module as much as tamper w/ the device settings, limiting access to the latter would then be equivalent
Online
Yes, just the mic. As you thought, I am using sound over HDMI. I am not sure how to go about your suggestion to break the module for the mic. Have you successfully done this before/any links to share?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
No, I just know that if the "wrong" (ie. slightly off) model is picked, that has a tendency to cause broken microphones.
https://wiki.archlinux.org/title/Advanc … odetection
However, if you don't intend to use the chip at all (and simply proper userspace configuration is undesired/not an option) you can just suck way the device w/ the pci_stub module, "pci_stub.ids=vendor:device" as all that takes is looking up the vendor/device in lspci and not endless testing around which model is just about wrong enough.
Online
I need the module for HDMI audio but will explore the model option you mentioned. Thus far it seems to survive when I added the following and rebooted:
% cat /etc/modprobe.d/disablemic.conf
options snd-hda-intel model=dell-headset-multi
Also tried:
options snd-hda-intel model=dell-headset-multi
I still is it detected:
% arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Generic_1 [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
Last edited by graysky (2025-02-17 21:20:40)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The module, but not the pci device?
lspci -k
Is this for security reasons of because the mic is picking up internal noise and the coil whining gets annoying?
Online
I just don't want the mic to work at all. There is no reason for it and no BIOS option to disable it.
To keep it cleaner, I just included the output trimmed to sections that contain "snd"
c6:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
...
c6:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63)
Subsystem: Realtek Semiconductor Co., Ltd. Device 12e8
Kernel driver in use: snd_pci_ps
Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_pci_ps, snd_sof_amd_renoir, snd_sof_amd_rembrandt, snd_sof_amd_vangogh, snd_sof_amd_acp63, snd_sof_amd_acp70
c6:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
DeviceName: Realtek ALC256
Subsystem: Realtek Semiconductor Co., Ltd. Device 12e8
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Both run on snd_hda_intel, "lspci -nn" will tell you the vendor/product IDs to pass to pci_stub (5&6 seem the same product ID, so those will go in tandem)
Alternatively "snd_hda_intel.enable=1,0" (or maybe controlling the index via "snd_hda_intel.index=0,") will block one of the devices from the driver (and the first one looks like it's your HDMI controller, so we want to keep that)
Online
Alternatively "snd_hda_intel.enable=1,0" (or maybe controlling the index via "snd_hda_intel.index=0,") will block one of the devices from the driver (and the first one looks like it's your HDMI controller, so we want to keep that)
Adding snd_hda_intel.enable=1,0 to my GRUB_CMDLINE_LINUX_DEFAULT line removed both HDMI audio and the mic.
Also tried the following (one-at-a-time), none of which worked:
snd_hda_codec_generic.enable_jack_detect=0
snd_hda_intel.model=alc269-dmic
snd_hda_intel.dmic_detect=0
snd_hda_intel.probe_mask=0x1
Any ideas are welcomed.
Last edited by graysky (2025-02-18 18:54:18)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
The main question is whether you can keep
c6:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller
but block
c6:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller
(they should™ have different VIDs, AMD and RTL respectively) and whether the AMD device provides your HDMI audio (the shared loss suggests different but that's weird)
lspci -nn | grep -i audio
aplay -l
Online
% lspci -nn | grep -i audio
c6:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller [1002:1640]
c6:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor [1022:15e2] (rev 63)
c6:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h/1ah HD Audio Controller [1022:15e3]
% aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [QBQ90]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC269VC Analog [ALC269VC Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
There're two cards, but HDMI is 0, not 1
snd_hda_intel.enable=0,1
or alternatively
pci_stub.ids=1022:15e3
Either should leave you w/ only card0/HDMI and ideally w/o microphone?
Online
You should be able to disconnect the logical pin with hdajackretask or so, which can then write you a patch file that can be applied with modprobe. Maybe also look into some of the more advanced options in: https://docs.kernel.org/sound/hd-audio/ … figuration
Offline
Thanks seth, your 2nd suggestion nailed it.
GRUB_CMDLINE_LINUX_DEFAULT="audit=0 loglevel=3 drm.edid_firmware=HDMI-A-1:tv.bin pci_stub.ids=1022:15e3"
And
% arecord -l
**** List of CAPTURE Hardware Devices ****
% aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [QBQ90]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
Last edited by graysky (2025-02-18 23:44:39)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Well technically this has dropped your onboard audio device, not just the microphone, which would be counterproductive if one really wants to just disable the microphone but retain onboard speakers. But if it works it works
Offline
Not sure what you mean... on board audio HDMI works. No onboard speakers exist in this hardware.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
You've two soundcards, the HDMI one and the ALC chip.
You're not interested in the ALC chip but the subject concerns only the microphone.
We blocked the microphone by blocking the entire undesired soundcard, what gets the job done but isn't as narrow as the subject suggests.
The edited wki is btw. unrelated.
Nothing got blacklisted here - the device was handed to the pci_stub module, what can also be achieved via a modprobe.conf entry (provided that config entry was added to the initramfs if the sound modules are, but that's a general caveat of the initramfs)
Though I can't find the pci_stub driver discussed in the wiki (only referenced in vfio) so it might fit on that page as alternative to any module-blacklisting approach (afa pci devices are concerned)
Online