You are not logged in.

#1 2025-02-16 21:35:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#2 2025-02-17 09:03:01

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#3 2025-02-17 10:17:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#4 2025-02-17 14:44:59

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#5 2025-02-17 21:19:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#6 2025-02-17 21:31:06

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#7 2025-02-18 00:31:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#8 2025-02-18 08:22:36

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#9 2025-02-18 18:51:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

seth wrote:

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 packagesZsh and other configs

Offline

#10 2025-02-18 20:44:49

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#11 2025-02-18 22:25:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

% 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 packagesZsh and other configs

Offline

#12 2025-02-18 22:52:15

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

#13 2025-02-18 22:54:38

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,113

Re: Disabling an onboard microphone [SOLVED]

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

#14 2025-02-18 23:42:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#15 2025-02-21 12:21:19

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#16 2025-02-21 16:55:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,113

Re: Disabling an onboard microphone [SOLVED]

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 smile

Offline

#17 2025-02-21 22:58:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,700
Website

Re: Disabling an onboard microphone [SOLVED]

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 packagesZsh and other configs

Offline

#18 2025-02-21 23:10:20

seth
Member
Registered: 2012-09-03
Posts: 61,623

Re: Disabling an onboard microphone [SOLVED]

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

Board footer

Powered by FluxBB