我遇到一个问题,audacity 和 arecord 能够接收来自麦克风的输入,而系统的其余部分则不能,相反,它似乎只是复制音频输出。
我的系统是带有 kernel 的 EndeavourOs 6.2.13-arch1-1
。不过,我还在 liveusb Linux Mint 上测试了我的麦克风,但也无法正常工作。我的系统似乎运行带有 alsa、pulseAudio 和wireplumber 插件的 pipeline 来进行声音管理。
对于 arecord ( arecord --duration=5 --format=dat --device=hw:3,2 test-mic.wav
) 和 audacity,我必须使用卡 3、设备 2 来获取麦克风输入。
我还尝试查看 qpwgraph 程序,它确实只包含一个捕获设备,在录制时仅复制声音输出。所以看起来 pipelinewire 没有看到 alsa 看到的正确的捕获设备。我还可以使用 alsamixer 控制麦克风。
很多帖子建议解锁麦克风通道并将其中一个静音,但这对我的情况没有帮助。
我还尝试将 pavucontrol 中的配置文件更改为“pro audion”,但没有帮助。
我可以在某些应用程序中使用麦克风(目前只有 arecord 和 audacity),并且它在相同设置的 Windows 上完美运行。然而,由于某种原因,它不想在 Linux 上工作。我希望有人能帮助我解决这个问题。
相关信息:
该耳机具有组合插孔,并通过分离器连接到主板(MAG B650 TOMAHAWK WIFI)。
❯ arecord -l
**** List of CAPTURE Hardware Devices ****
card 3: Audio [USB Audio], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Audio [USB Audio], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 3: Audio [USB Audio], device 2: USB Audio [USB Audio #2]
Subdevices: 1/1
Subdevice #0: subdevice #0
❯ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
lavrate
Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
Rate Converter Plugin Using Samplerate Library
speexrate
Rate Converter Plugin Using Speex Resampler
jack
JACK Audio Connection Kit
oss
Open Sound System
pipewire
PipeWire Sound Server
pulse
PulseAudio Sound Server
speex
Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
Plugin for channel upmix (4,6,8)
vdownmix
Plugin for channel downmix (stereo) with a simple spacialization
default
Default ALSA Output (currently PipeWire Media Server)
usbstream:CARD=NVidia
HDA NVidia
USB Stream Output
usbstream:CARD=Generic_1
HD-Audio Generic
USB Stream Output
front:CARD=Generic
Front output / input
surround21:CARD=Generic
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic
4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=Generic
HD-Audio Generic
USB Stream Output
sysdefault:CARD=Audio
USB Audio, USB Audio
Default Audio Device
front:CARD=Audio,DEV=0
USB Audio, USB Audio
Front output / input
usbstream:CARD=Audio
USB Audio
USB Stream Output
❯ inxi -Axxx
Audio:
Device-1: NVIDIA GA104 High Definition Audio vendor: ZOTAC
driver: snd_hda_intel v: kernel bus-ID: 1-6:3 pcie: chip-ID: 0db0:422d
class-ID: 0300 speed: 2.5 GT/s lanes: 16 bus-ID: 01:00.1
chip-ID: 10de:228b class-ID: 0403
Device-2: AMD Rembrandt Radeon High Definition Audio
vendor: Micro-Star MSI driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s
lanes: 16 bus-ID: 0f:00.1 chip-ID: 1002:1640 class-ID: 0403
Device-3: AMD Family 17h/19h HD Audio vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel pcie: speed: 16 GT/s lanes: 16
bus-ID: 0f:00.6 chip-ID: 1022:15e3 class-ID: 0403
Device-4: Micro Star USB Audio type: USB
driver: hid-generic,snd-usb-audio,usbhid
API: ALSA v: k6.2.13-arch1-1 status: kernel-api
Server-1: sndiod v: N/A status: off
Server-2: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin
最后一条消息被标记为黄色,所以我想它们是警告,我也尝试用谷歌搜索它以查看是否弹出任何内容,但我什么也没得到:
❯ systemctl --user status --now pipewire.service
● pipewire.service - PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: enabled)
Active: active (running) since Sat 2023-04-29 02:37:46 CEST; 9s ago
TriggeredBy: ● pipewire.socket
Main PID: 21616 (pipewire)
Tasks: 2 (limit: 37369)
Memory: 8.5M
CPU: 38ms
CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/pipewire.service
└─21616 /usr/bin/pipewire
Apr 29 02:37:46 tower systemd[826]: Started PipeWire Multimedia Service.
Apr 29 02:37:46 tower pipewire[21616]: mod.rt: Can't find org.freedesktop.portal.Desktop. Is xdg-desktop-portal running?
Apr 29 02:37:46 tower pipewire[21616]: mod.rt: found session bus but no portal
以及一些相关的 cpu 信息:
❯ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 12
On-line CPU(s) list: 0-11
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 5 7600 6-Core Processor
CPU family: 25
Model: 97
Thread(s) per core: 2
Core(s) per socket: 6
Socket(s): 1
Stepping: 2
Frequency boost: enabled
CPU(s) scaling MHz: 66%
CPU max MHz: 5169,3350
CPU min MHz: 3000,0000
BogoMIPS: 7602,37
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clf
lush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm cons
tant_tsc rep_good amd_lbr_v2 nopl nonstop_tsc cpuid extd_apicid aperfmperf
rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt
aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm ss
e4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core
perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba pe
rfmon_v2 ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid
cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx51
2cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occ
up_llc cqm_mbm_total cqm_mbm_local avx512_bf16 clzero irperf xsaveerptr rdp
ru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flus
hbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2a
vic v_spec_ctrl avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq
avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid overflow_recov succor smc
a fsrm flush_l1d
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 192 KiB (6 instances)
L1i: 192 KiB (6 instances)
L2: 6 MiB (6 instances)
L3: 32 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-11
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB fil
ling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Not affected