我遇到了一个问题。我的笔记本电脑上有一个 4 针 3.5 毫米 (TRRS) 插孔,插有立体声耳机/麦克风。耳机立体声可以工作,但耳机麦克风不工作。笔记本电脑内置麦克风可以工作。
硬件软件 | 姓名 |
---|---|
操作系统 | Ubuntu 22.04(Windows 11 双启动) |
笔记本电脑品牌和型号 | 华硕UX3402ZA |
声卡 | 软件开发工具包 |
音频芯片组 | Realtek ALC294 |
耳机和麦克风 | Sennheiser GSP 302(是的,它适用于 Windows) |
注意:我之前必须修复内置扬声器无法正常工作的输出声音,方法是使用此补丁。除内置组合插孔的麦克风输入外,所有与音频相关的设备均运行良好。内置麦克风也运行良好。
脉冲音频
我评论了以下内容等/脉冲/默认.pa因为“耳机立体声麦克风”源状态为 SUSPENDED(暂停);暂停原因:IDLE(空闲)。
### Automatically suspend sinks/sources that become idle for too long
#load-module module-suspend-on-idle
pulseaudio 根据以下内容识别组合插孔的输入:
- 索引 4:组合插孔的输入(不工作)
- 索引 5 :内置麦克风(工作)
> $ pacmd
>>> list-sources
[...]
* index: 4
name: <alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__source>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9032
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.33 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stéréo
used by: 1
linked by: 1
configured latency: 40.00 ms; range is 0.50 .. 341.33 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDA Analog (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "ASUSTeKCOMPUTERINC.-ZenbookUX3402ZA_UX3402ZA-1.0-UX3402ZA"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "51c8"
device.string = "_ucm0001.hw:sofhdadsp"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "16384"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp: source"
device.profile.description = "Headphones Stereo Microphone"
alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
device.description = "sof-hda-dsp Headphones Stereo Microphone"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[In] Mic2: Headphones Stereo Microphone (priority 200, latency offset 0 usec, available: unknown)
properties:
active port: <[In] Mic2>
index: 5
name: <alsa_input.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_6__source>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9031
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 30419 / 46% / -20.00 dB
volume steps: 65537
muted: no
current latency: 0.46 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stéréo
used by: 1
linked by: 1
configured latency: 40.00 ms; range is 0.50 .. 341.33 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "DMIC (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "6"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "ASUSTeKCOMPUTERINC.-ZenbookUX3402ZA_UX3402ZA-1.0-UX3402ZA"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "51c8"
device.string = "_ucm0001.hw:sofhdadsp,6"
device.buffering.buffer_size = "65536"
device.buffering.fragment_size = "16384"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,6: source"
device.profile.description = "Digital Microphone"
alsa.mixer_device = "_ucm0001.hw:sofhdadsp"
device.description = "sof-hda-dsp Digital Microphone"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[In] Mic1: Digital Microphone (priority 100, latency offset 0 usec, available: unknown)
properties:
active port: <[In] Mic1>
Pavucontrol 也显示该设备,但没有检测到输入。
阿尔萨
Alsa 应该能够捕捉“HDA Analog 0”下的组合插孔麦克风的输出,但是却没有。
https://i.stack.imgur.com/S4ctu.png
我尝试更新编解码器/etc/modprobe.d/alsa-base.conf逐一使用以下选项,我没有将它们组合起来。插入组合插孔的耳机继续工作,但仍然没有检测到输入。
#options snd-hda-intel model=asus-zenbook
#options snd-hda-intel model=dell-headset-multi
#options snd-hda-intel model=aspire-headset-mic
重做任务
Realtek ALC294 上的 HdaJackRetask 仅显示连接了 2 个引脚:
- ID 0x17:内置扬声器
- ID 0x21:黑色耳机,右侧(但立体声工作正常)
没有连接“内置麦克风”或“耳机麦克风”的引脚。(请记住,内置麦克风正在工作)。
以下未连接的引脚显示“麦克风”选项:
- ID 0x19
- ID 0x1a
- ID 0x1b
我已尝试覆盖(理解“安装启动覆盖”)以下内容:
- 0x19 (单独)
- 0x1a 和 0x1b
重启后,重新打开 HDAJackRetask 不会显示它们已连接。我敢肯定这里面有问题,但我说不出来。
欢迎任何提示,我已经花了好几天时间来研究这个问题。
我认为问题出在 Alsa,因为 pulseaudio 似乎识别并运行组合插孔的输入(显示在 pavucontrol 中),但 Alsa 却不能(未显示在 alsamixer 中)。
感谢您的时间 !
资料来源:
https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Correctly_detect_microphone_plugged_in_a_4-pin_3.5mm_(TRRS)_jack
https://docs.kernel.org/sound/hd-audio/notes.html#hd-audio-codec
https://doc.ubuntu-fr.org/audio_intel_hda